Questions tagged [encodefunctioncall]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
23 views

Is there a way to call a function via a selector from within a contract?

In the case of calling a function with signature foo(uint256) from contract A, I could use this construction in solidity: address(A).call(abi.encodeWithSignature("foo(uint256)", 100)); // or ...
user avatar
  • 147
1 vote
1 answer
547 views

encode_abi encode function call

I am trying to convert Javascript code to Python and believe the equivalent "web3.eth.abi.encodeFunctionSignature" function in JS to encode ABI in Python is with the "encode_abi" ...
user avatar
  • 13
0 votes
3 answers
219 views

call to FundMe.getVersion errored: VM execution error. Reverted 0x

I'm trying to get the version to show up when I test it but keep receiving this message. call to FundMe.getVersion errored: VM execution error. Reverted 0x // SPDX-License-Identifier: MIT pragma ...
user avatar
1 vote
1 answer
393 views

How to web3 "encodeFunctionCall" a payable function?

I want to encode a call for mint() payable with a msg.value of 8 ETH. My code: web3.eth.abi.encodeFunctionCall({ type: 'function', name: 'mint', payable: true, value: web3.utils.toWei(&...
user avatar
0 votes
1 answer
285 views

Howto use encodeFunctionCall with nested, array or non-string parameters?

Web3.js has a method named encodefunctioncall with the following signature: encodeFunctionCall(abiItem: AbiItem, params: string[]): string; The first parameter is ABI interface of that function and ...
user avatar