Linked Questions

2 votes
1 answer

Understanding data payload on contract call [duplicate]

I'm running truffle's default example Metacoin: import "ConvertLib.sol"; contract MetaCoin { mapping (address => uint) balances; function MetaCoin() { balances[tx.origin] = 10000; } ...
Henrique Barcelos's user avatar
3 votes
0 answers

Why is it required to know the function selector in a smart contract to call the function? [duplicate]

I understand what a function selector is and how it is computed: The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order ...
sherlock's user avatar
  • 201
1 vote
1 answer

Why do I need a contract's code/abi to interact with it [duplicate]

The "At Address" button in the remix deploy tab is to interact with an already existing contract. So why is it necessary (to be able to interact with it) to: paste the code of the contract ...
IBeFrogs's user avatar
3 votes
0 answers

How to make sense of the "data" sent to execute a contract? [duplicate]

I'm trying to understand the technical details of Ethereum and one thing I can't find any info about is the data to be sent to a contract. For example, I have a very simple coin flip betting ...
Earlz's user avatar
  • 471
81 votes
13 answers

How to get contract internal transactions

I'd like to get the contract internal transactions like: I'm using web3 API. Is there any way to do it? Where do ...
Paul Exchange's user avatar
54 votes
8 answers

How to quickly test a Solidity function?

There are snippets and functions of Solidity code provided on this Ethereum Stack Exchange and other sites. What are ways to quickly test them, possibly debug a little, and play around?
eth's user avatar
  • 85.9k
75 votes
7 answers

How do you get a json file (ABI) from a known contract address?

I want to watch a Solidity contract using the Mist browser. I know how to do that and it needs the address and the json. I have the address, but I don't have the json. I do have the source code. Can ...
Thomas Jay Rush's user avatar
64 votes
7 answers

How can I verify that a contract on the blockchain matches the source code?

Given the (Solidity) source code of a smart contract, is there a way to deterministically compile the code and compare it with the code on the blockchain? I want to verify that the contract does what ...
J-B's user avatar
  • 8,961
57 votes
4 answers

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 ...
MethDamon's user avatar
  • 803
32 votes
3 answers

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 ...
Sheikh's user avatar
  • 455
16 votes
9 answers

Is there a way to extract ABI from a deployed contract?

I am building a web UI for testing smart contracts and currently I have to supply the ABI for a contract I test. Is there a way to extract the ABI from a deployed contract (preferably programmatically)...
Andrey's user avatar
  • 1,147
25 votes
5 answers

Pass a function as a parameter in Solidity

Can you pass a function as a parameter in Solidity? My guess: There is the concept of address in Solidity, but they represent contracts. Contracts can have fallback functions, but I don't think you ...
Karl Floersch's user avatar
25 votes
2 answers

Do I need a compiled contract just to get the ABI definition?

Why do I need a compiled version of the contract just to get the ABI definition? Seems like the contract address should be enough. Im very confused because I am simply trying to run a contract ...
ZMitton's user avatar
  • 2,760
18 votes
1 answer

What does Solidity's "call" function mean?

address nameReg = 0x72ba7d8e73fe8eb666ea66babc8116a41bfb10e2;"register", "MyName"); //1"fun(uint256)")), a); //2 if(!{throw;} //3 Here ...
Jim Green's user avatar
  • 687
12 votes
3 answers

How does the EVM find the entry of a called function?

I read the source code of go-ethereum and confused about how does the EVM find the entry of a called function. As the specification said, the data field in a transaction specifies the function and the ...
rong jialei's user avatar

15 30 50 per page