Questions tagged [evm]

For questions about the Ethereum Virtual Machine programming language, the programming language of smart contracts on the Ethereum blockchain.

173 questions
1
vote
0 answers

Assembly code for a multi-proxy smart contract implementation

Need some help modifying the proxy assembly code to work with multiple (n) implementation contracts. I need the function to revert if the implementation contract reverted, but keep on going if the implementation contract doesn't have the requested…
Roy Toledo
  • 643
  • 4
  • 20
1
vote
1 answer

Cannot deploy EVM subnet locally on Avalanche "Error: failed to query network health"

I'm trying to deploy EVM subnet locally using avalanche-cli. I'm running it on Ubuntu through WSL. Running avalanche subnet deploy somechain -l and waiting for 2 minutes returns: Error: failed to query network health: the health check failed to…
1
vote
1 answer

Convert bytecode to opcode using web3j

I can't find any documentation on this, is there a converter from bytecode to opcode inside web3j? Or do I need to build one myself?
Roie Beck
  • 1,113
  • 3
  • 15
  • 30
1
vote
1 answer

How to run an hardhat script on NodeJs so that you can fork multiple evm chains on different ports?

I want to be able to fork more chains (ethereum, bsc, etc.) than just one on my system. Hardhat doc shows, how to fork 1 chain npx hardhat node --fork https://... and it works fine. But I would like to fork them programmatically on a Nodejs…
Mr.X
  • 31
  • 3
1
vote
1 answer

How Ethereum logs feature indexes the event topics?

When I have two indexed inputs in an emitted event, the Ethereum logs index the pair or just each one separately? I mean, if I want to filter event logs using two topics, then that get's the information directly from an index of the pair, or first…
1
vote
1 answer

ERC721 Smart contract revoke approval

I've some question about ERC721 processing. I'd like to make an user to give aproval to an external smart contract for transfering one of its NFT. To do it I'm using approve(to, tokenId). Then, in some situation, the contract should be able to…
Dcp
  • 66
  • 7
1
vote
2 answers

EVM command line interface drops heading zeros in input

I am executing a dummy (smart) contract through the evm command line to understand how input is passed to the contract. I am using the following contract bytecode: 60003500 PUSH1 0x00 CALLDATALOAD STOP If I provide 0x101 as input I get the expected…
Olivier Melançon
  • 21,584
  • 4
  • 41
  • 73
1
vote
3 answers

Does a contract instance created via interfaces have the same address as the original deployed contract?

I have been following Solidity, Blockchain, and Smart Contract Course – Beginner to Expert Python Tutorial (https://www.youtube.com/watch?v=M576WGiDBdQ&t=28658s). instead of copying a ton of code, I'm trying to generalize my question as…
maskara
  • 329
  • 1
  • 2
  • 12
1
vote
1 answer

What is the alternative of "approve" in evm on Solana?

I have several wallets in evm. I give their X token access to my main wallet by calling Contract(x).approve() function. Thus i can make operations with these wallets. Now i want to do same thing on solana with solana web3 library. However i cannot…
1
vote
2 answers

Issues using a delegateCall (proxy contract with Solidity) and using variables inside the delegate contract

I've written a simple proxy contract with solidity and I've got an issue with the variables inside the delegate contract. When I delegateCall, all my variables are equal to 0, except if there are constant. Is there any reason for that or am I…
Sam
  • 11
  • 4
1
vote
2 answers

How to run a local aurora node?

I want to sync data from local node. local node need to support eth_rpc as "https://mainnet.aurora.dev" did.
sunny
  • 21
  • 3
1
vote
1 answer

How to avoid call-stack attack in the case of absence of EIP-150?

While before EIP-150, could we avoid the call-stack attack by checking return value, of low-level functions .send(), .call(), .delegatecall() and .staticcall(), whether is false or not? For example (msg.sender is a…
Cengo
  • 93
  • 5
1
vote
0 answers

Why assembly delegatecall() returns 1 instead of 0 when calling zero (0x000...) address?

I have this code in a proxy fallback: assembly { calldatacopy(mload(0x40), 0, calldatasize()) let result := delegatecall(gas(), destination, mload(0x40), calldatasize(), mload(0x40), 0) returndatacopy(mload(0x40), 0, returndatasize()) …
Whytecrowe
  • 31
  • 3
1
vote
1 answer

Solidity assembly error: Builtin function "gas" must be called

I'm writing a proxy contract in Solidity. To forward incoming calls in my fallback function I'm using inline assembly code. I'm a student and the code below is the code my instructor wrote in the tutorial. I'm receiving the following error with my…
EmmerichS
  • 11
  • 2
1
vote
0 answers

EVM parameter Source

I'm new at substrate and pallets. I have installed the frontier node (Frontier) and I need to use pallet_evm to upload smart contracts at the blockchain. The function create have 6 parameters (Source, Init, Value, Gas_limit, Gas_price and…