Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [encodefunctioncall]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

Is there any way to fake the signature selector in Solidity for abi.encodeWithSelector?

Is there any way to fake the selector pointer for an arbitrary contract address call with abi.encodeWithSelector? For example, I want to call a particular contract's deposit(...) method, but the ...
Mila A's user avatar
  • 1,219
0 votes
1 answer
7 views

Can the Aragon SDK pass any encoded action abitrarily?

In the examples section of the SDK documentation, there are encoders for a bunch of common DAO operations. However I can't see an encoding for an arbitrary contract call in the examples. Does the SDK ...
juliette_chevalier's user avatar
2 votes
1 answer
253 views

How is the data parameter constructed in the swap function of 1inch AggregationRouterV5

The swap function in AggregationRouterV5 is like this function swap( IAggregationExecutor executor, SwapDescription calldata desc, bytes calldata permit, bytes calldata data ) ...
Joe's user avatar
  • 43
6 votes
2 answers
4k views

How to call function with struct parameter in ethers?

My solidity: contract Test { struct Num { uint value; } function double(Num calldata num) external pure returns(Num memory) { return Num({ value: num.value * 2 }); } }...
António Gonçalves's user avatar
2 votes
0 answers
255 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 ...
Marlo's user avatar
  • 349
1 vote
1 answer
3k 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" ...
gino's user avatar
  • 13
0 votes
3 answers
498 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 ...
Jonathan Cruz's user avatar
2 votes
1 answer
2k 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(&...
antoniopgs's user avatar
0 votes
1 answer
747 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 ...
Ehsan Khodarahmi's user avatar