New answers tagged contract-invocation
0
votes
Local hardhat node throws "Error: Transaction reverted" in the terminal for transactions that pass successfully
I found a workaround that is working well so far. I ran into the Error: Transaction reverted: function selector was not recognized and there's no fallback function issue just "sometimes", ...
2
votes
Accepted
How to encode arbitrary amount of parameters for encodeWithSignature without adding them to function definition?
Your problem is that you're using abi.encode with abi.encodeWithSignature, and encoding your address twice.
abi.encode takes your address and pads it with zeros to make it 32 bytes long since EVM ...
1
vote
Accepted
Why doesn't this try/catch block catch the revert in `asset.symbol`?
try..catch doesn't catch the boundary exceptions, just the inner method call. Exactly that, what you have mentioned:
checks if address is not void
checks if extcodesize exists
--checks if method ...
1
vote
Wrapping ETH into WETH via ethers -- WETH coins on my balance won't appear
The address you're using for WETH (0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2) is the address on Ethereum mainnet. Notice on the goerli etherscan page for that address, there's no contract tab. That's ...
1
vote
Does the EVM revert if a call is attempted to an address that doesn't have code?
A call, any call, has a caller, can have a value and can have some data. The value can be zero, the data can be empty, doesn't matter. By default as explained in the chosen answer, all calls are valid....
0
votes
Can the EVM execute a function over multiple blocks?
Nope It can't. A block is a compilation of transactions that is sent to the Ethereum network and when the block of particular number is validated by validator, only then a transaction passes through. ...
0
votes
Can the EVM execute a function over multiple blocks?
No, execution must happen within one block - though of course if that is not "enough" the execution will instead run out of gas and revert.
0
votes
Call smart contract method with ethers.js version 6
await contract.getFunction("FUNCTION_NAME").call(null);
this might help for ehters js 6
please take into consideration that you can replace null with an object that represents the call ...
Top 50 recent answers are included
Related Tags
contract-invocation × 1169contract-development × 362
solidity × 354
web3js × 187
contract-design × 183
transactions × 120
contract-deployment × 116
go-ethereum × 93
contract-debugging × 65
remix × 55
gas × 52
truffle × 42
tokens × 38
evm × 35
abi × 35
metamask × 33
javascript × 33
ethers.js × 31
blockchain × 30
addresses × 30
events × 29
erc-20 × 28
nodejs × 28
ether × 27
etherscan × 21