Questions tagged [calldata]

Questions about the "data" part in a transaction, which can be accessed by "msg.data". web3.eth.getTransaction calls this field "input".

Filter by
Sorted by
Tagged with
42
votes
3answers
35k views

How to call a contract method using the eth_call JSON-RPC API

Ok, so I'm trying to call a contract method using the methods provided by the Ethereum JSON RPC interface. The JSON RPC is running on an Ubuntu machine. Unfortunately, I can't really get a result back ...
27
votes
2answers
16k views

What is the ethereum transaction data structure?

I'd like to know the detail of the Ethereum transaction data structure. What data is stored in transaction?
6
votes
2answers
809 views

Why does an empty message still invoke the code of the contract?

An empty message still invokes the code of the contract and is the mechanism that allows Solidity to implement a feature of a fallback function per contract. But when msg.data is empty, why does ...
16
votes
6answers
12k views

Encoding/Decoding contract ABI data

How to encode and decode ABI data? Can someone show me an example with web3js library?
21
votes
3answers
26k views

What does “intrinsic gas too low” mean?

I'm running the Mist wallet, and I've deployed this contract to testnet (from https://ethereum.stackexchange.com/a/179/520) : contract Notary{ struct Document { uint timestamp; ...
5
votes
1answer
667 views

Accessing the last function parameter from msg.data

I have a fallback (unnamed) function in my contract and I know that the last parameter (or first, does not matter) passed is always an uint. Is it possible to somehow access it though the msg.data?
3
votes
1answer
159 views

What is a function selector?

I am reading an article, it says: To enable deployment on the Ethereum platform, the contract functions are compiled into EVM bytecode and a piece of code called function selector is added, ...
3
votes
2answers
5k views

How do I “Add Data” to a send transaction in Solidity

In myetherwallet, there is an +Advanced: Add Data Section where I can add data to the transaction. How can I add this same data in a transaction I make in Solidity?
13
votes
2answers
6k views

What is msg.data?

Is msg.data equal to {from: addr1, data:something}? How to handle the data 'something'? when execution this code: web3.eth.sendTransaction({from: ..., to: addressOfE, data: something}); how to ...
8
votes
1answer
2k views

Private chain: Extracting the “data” from an account?

I have initiated and mined a transaction between two accounts. I also included a data field in this transaction. This is just random hex data. Here is the command: eth.sendTransaction({from:...
8
votes
1answer
1k views

Private chain: Maximum size of “data” field in an Ethereum transaction?

The data field can be used to send arbitrary data in a transaction. I am aware that the amount of gas required increases with the increase in size of data, but, is there a limit to the size that's ...
3
votes
1answer
1k views

Can you help me parse this input data from a newProposal transaction from The DAO?

Every Ethereum transaction that represents a function call on a smart contract holds an input field with data that corresponds to the data sent through the interface of the function. For example, this ...
0
votes
0answers
80 views

Are there any libraries/tools for encoding input for data field of web3.eth.call method? [duplicate]

You can call contract functions using web3.eth.call method. Information on which function to call and what arguments to pass to this function is encoded according to the rules that can be found here. ...
6
votes
1answer
2k views

How can I send some message from contract to address

Is it possible? And if it is, how can I send some data from contract to address. Something like msg.sender.send.data("0x0")(value)
8
votes
2answers
793 views

Can msg.data be used as an identifier?

I'm looking at the multisig wallet implementation here and I see the usage of sha3(msg.data,block.number) being used as an identifier. What exactly is inside the msg.data and why is it unique enough ...
6
votes
2answers
547 views

Is sending some datas in the data field safe?

An airdrop ask to send it 0ETH with 150000 GAS and some datas in DATA field. Is it safe? What could be the aim of this transaction? Thanks.
4
votes
2answers
921 views

What is calldata?

What is calldata? I learned that there are three types of memories: Storage Memory Stack In the Ethereum docs, it says that the function parameters are of type memory by default. However, I've also ...
1
vote
0answers
487 views

abstract way of calling internal function instead of `this.call(callData)`

In Solidity I can call an internal function (inside the same contract that is calling it) the "usual" way: myFunc(); or I can call it via .call, as discussed here or here: callData = bytes4(sha3("...
2
votes
3answers
115 views

Can I send data to non-contract address?

Metamask allows to attach data to any transaction. What happens if I send some data with some ETH to existing non-contract address? Is that data recorded on the blockchain? Can I read it later?
1
vote
2answers
62 views

Thinking through from traditional DB to ETH

I am looking for a data structure kind of like this: [ "data": { "id": 0, "hash" : "5feceb66ffc86f38d952786c6d696c79c2dbc239dd4e91b46729d73a27fb57e9", "owner" : 0, "status" : "...
1
vote
1answer
533 views

How to send data to smart contract?

I have the variable w1_temp, which i need to send to contract I have the following code: var W1Temp = require('w1temp') var Web3 = require('web3') var web3 = new Web3() web3.setProvider(new web3....