2

For a project of mine I would like to run a standalone new EVM with precise specifications. After having instantiated and set up the vm, I have a deployed a test contract using the vm « Create » function.

However I don’t understand how to invoke specific methods of the contract using go-ethereum.

I thought I could use the Call and CallCode functions but they don’t indicate any argument concerning the methods except the input byte array.

Any help really appreciated,

Thanks

2

The method is carried in the input bytes as per this the yellow paper. See here: http://gavwood.com/paper.pdf.

Much more information is here: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI. The thing you're looking for is called the function selector in that page.

  • Hello, thanks for your very useful response. I was able to find an example of your explanation in the runtime_test.go – Solerus Oct 15 '18 at 16:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.