New answers tagged

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", ...
JuanXavier's user avatar
2 votes

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 ...
Adam Boudj's user avatar
  • 2,200
1 vote

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 ...
tenbits's user avatar
  • 1,075
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 ...
natewelch_'s user avatar
  • 11.6k
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....
Mouradif's user avatar
  • 228
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. ...
Mr.SsS's user avatar
  • 395
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.
Tobias Kienzler's user avatar
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 ...
Elie Elia's user avatar

Top 50 recent answers are included