Questions tagged [evm]

EVM is the Ethereum Virtual Machine, the protected, distributed "sandbox area" (virtual machine) where contract execution occurs, replicated on every node in the network. EVM is also the name of the bytecode that runs on the virtual machine -- what Solidity, Serpent and LL get compiled down to before deployment.

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

What is the current state of zkEVM development?

What is the current state of zkEVM? That is - a general-purpose (not specialized like Loopring or Immutable), EVM-compatible, Solidity-compatible zk-rollup layer 2. To my knowledge they are still ...
user avatar
0 votes
0 answers
6 views

Calldata in intra-contract calls

How does calldata work for calls between contracts on Ethereum? I was under the impression that it is the data sent in the original transaction that starts the execution, however it is possible for a ...
user avatar
0 votes
0 answers
8 views

Reading return data from a Solidity `call`

Given a call to an external contract, (bool success, bytes memory returnData) = addr.call(abiEncoding); how do I read a single value of a given type from the return data, without using assembly? The ...
user avatar
1 vote
0 answers
10 views

Maximum gas estimate

eth_estimateGas provides estimated final gas consumed by transaction and accounts for gas refund in the end of transaction. However, is there a way to estimate maximum gas the transaction may consume ...
user avatar
0 votes
0 answers
14 views

Unable solve the error ""Error: Returned error: the method eth_accounts does not exist/is not available" when I run truffle migrate

I created Polygon edge server and When I run truffle migrate I am getting this weird error ->"Error: Returned error: the method eth_accounts does not exist/is not available" when I tried ...
user avatar
0 votes
1 answer
16 views

Why Solidity Compiler Allows declaring storage variables inside functions?

Solidity does not cause any compile errors for this code although the storage variable data is declared with no reference to actually storage (initially) contract Test { struct Data { uint256 ...
user avatar
  • 105
0 votes
0 answers
19 views

Does anyone know what is the purpose of "this;" at the end of the function [duplicate]

// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; contract Delegate { address public owner; constructor(address _owner) public { owner = _owner; } function pwn() public { ...
user avatar
0 votes
0 answers
21 views

EVM RPC Test Suite to test proper implementation of JSON-RPC Specifications

I'm looking for an existing and still supported EVM RPC Test Suite to test if a custom RPC implementation is in line with the official JSON-RPC Specifications. I'm not looking to build my own suite, I ...
user avatar
0 votes
0 answers
9 views

Using Hyperledger QBFT suitable for public chains?

I am thing process of creating my own public EVM network, i found the best approach available would be using QBFT on HyperLedger Besu as it is Proof Of Authority and secure for production uses. But ...
user avatar
  • 1
0 votes
0 answers
16 views

convert bytecode to opcode using web3j [duplicate]

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? regards
user avatar
  • 101
0 votes
0 answers
19 views

Redeploy contract after each test case

I'm using hardhat for testing contract and what I've noticed when I was testing pause and unpause - that beforeEach doesn't actually redeploy contract from It to It, so if in the first It I pause ...
user avatar
0 votes
1 answer
12 views

Revert execution error when a transaction is performed

I'm new in solidity and I'm triying to build a kind of DAO system. The issue is that when I call the proposalCreation function (which has 2 input parameters of string type) the code crash and I do not ...
user avatar
0 votes
0 answers
24 views

Array operations inside a struct that contain array

I have a struct and has functions to add packages and claim packages but I am unhappy and feel unsafe doing this with a code like this. Are there any methods/libraries that do exactly this? struct ...
user avatar
1 vote
1 answer
44 views

Is Nonce Stored in State?

I read these paragraphs from the Whitepaper and Mastering Ethereum book. And I'm confused. Is nonce stored at state, or not? Whitepaper says: If the value transfer failed because the sender did not ...
user avatar
0 votes
1 answer
41 views

EVM are stack and memory part of the EVM context

Does anyone knows what happens to the stack and memory of the EVM when an external contract is invoked? Do the stack and memory get "cleaned" in order for the external contract to execute ...
user avatar
1 vote
1 answer
32 views

Is it possible to call contract that has no function?

For example I have a contract that has the following bytecode 0x433d52593df3 (contract that returns the current block number if called). How could I call such a contract?
user avatar
  • 56
0 votes
0 answers
16 views

transfer back tokens to smart contract in _afterTokenTransfer()

I am trying to implement this functionality in _afterTokenTransfer() function. In this function, the amount that's being transferred, which at this point is already inside "to" wallet. ...
user avatar
  • 1
0 votes
1 answer
41 views

Solidity: try / catch call to external non-existent address method

I have two contracts: A and B. callFoo() of contract B must call the method foo() of contract A. If method foo() exists on contract A, callFoo() must return true, false otherwise. Here is the code: ...
user avatar
0 votes
1 answer
23 views

VM Exception while processing transaction: revert — Transferring ether from EOA to contract account

Problem summary I get the following error whenever I try transferring ether from an EOA(externally owned account) to a contract account in one of my functions as seen below. I am currently using the ...
user avatar
  • 105
0 votes
0 answers
17 views

Figure out the address used at construction time for a regular smart contract

Is there anyway to figure out what was the address used at construction time and find it in the bytecode? For example I know that for libraries they are storing it in the contract in order to be able ...
user avatar
  • 56
1 vote
1 answer
28 views

Access contract's runtime code from one of its functions

Is there anyway to access the runtime code of a function from its contract? Using assembly may be? Thanks
user avatar
  • 56
0 votes
0 answers
6 views

Do all optimistic rollup virtual machines need to execute EVM bytecode?

Do all optimistic rollups need to be execute EVM bytecode, because the transactions also need to be able to be executed on mainnet in case of a fraud proof? Trying to understand rollups better, any ...
user avatar
  • 1
0 votes
1 answer
17 views

How confirmations works and why this value change

I am new in Ethereum smart contracts programming i was reading but is no clear for me. How confirmations works (if i am writing bad concepts please tell me i jus wana be better :3 ) I undestand that ...
user avatar
1 vote
1 answer
44 views

Is there a way to check if a call is a call or a delegatecall?

I want to add a modifier to one of my function that checks wether the function call is a call or a delegatecall? Is there any way to figure that out? May be with some assembly?
user avatar
  • 56
0 votes
2 answers
17 views

What is the site that shows all the tokens I own in my Ethereum 0x... address across all other L2 EVM compatible chains?

Is there a site that shows all the tokens I own in my Ethereum address along with all the L2 EVM compatible chains?
user avatar
0 votes
0 answers
15 views

Simulating transactions without verification overhead

I'd like to simulate transactions at maximum throughput. However, I think most simulation tools/approaches include verification of transaction signatures and block mining meta. Since I'm the one ...
user avatar
0 votes
0 answers
9 views

Why this delegatecall -> call tx is not completing?

I wish I had a better title for this but I simply do not know what is going on. The function simply stops during _mint function at _balances[account] = oldAccountBalance.add(amount); My goal is to ...
user avatar
  • 173
0 votes
0 answers
16 views

Is it worth it to deeply understand the EVM to become a smart contract auditor?

I have a huge interest in becoming a smart contract auditor and wonder if it is worth the time to really learn how the EVM works? It seems like most if not all vulnerabilities I read about are because ...
user avatar
1 vote
0 answers
39 views

How to configure EVM in IntelliJ with Solidity plugin

There is a related question/answer from 5 years ago but back then the plugin only provided syntax highlighting. Now, I know I can compile from the solidity file opened in IntelliJ, clicking on a play/...
user avatar
0 votes
0 answers
15 views

Contract initialization opcodes

Every contract I compile starts with the following opcodes: Is this just a design choice by Solidity, or a "rule" in Ethereum? Otherwise it seems like every time the EVM starts up, it would ...
user avatar
0 votes
1 answer
57 views

mapped struct storage layout (slots) and collsions

I want to establish a pattern that ensures no storage slot collisions between current and future (compliant) versions of a contract behind a transparent proxy. In particular, contracts that are meant ...
user avatar
  • 51.2k
0 votes
0 answers
25 views

Fixed length for dynamic arrays

Let me explain, I am creating a contract which will be storing about 1000 token addresses and the token prices. I am using an array like this. address[] internal assetList; I cannot create static ...
user avatar
0 votes
1 answer
33 views

If not in the EVM, where do internal functions execute?

The Ethereum documentation says that internal functions are not executed in the EVM, while external ones are: If not in the EVM, where are internal functions executed? Does this simply mean that ...
user avatar
  • 125
0 votes
1 answer
37 views

What is the purpose of static and trusted nodes on BNB Smart Chain (BSC)?

I would like to create my own BSC node, therefore I am learning about nodes. I understand the main part of the concept, but in the BSC node docs I found mentions to static and trusted nodes. The ...
user avatar
  • 186
0 votes
0 answers
24 views

ERC721 function deployed with create2 stops working after a particular function is called

So I'm working on an NFT marketplace smart contract and one of the features in this marketplace allows users to deploy their own collection (this is basically a smart contract that extends the ERC721 ...
user avatar
0 votes
1 answer
59 views

Deploy contract with Bytecode from smart contract

I have a contract that has a function deployContract(bytes memory runtimeBytecode) I want this function to be able to deploy the bytes sent to it as a new smart contract. I understand that I will have ...
user avatar
  • 56
2 votes
2 answers
150 views

What is the maximum amount of gas the Ethereum Virtual Machine can handle?

I'd like to know the EVM gas limit of a single node with modern computing specs. My understanding is that the current gas limit of Ethereum(15m/block or 1m/s) is constrained such that all nodes in the ...
user avatar
  • 230
0 votes
1 answer
26 views

Why dedicated ADDMOD opcode?

Is the ADDMOD that commonly used that we needed to create a specific opcode for it? Why couldn't we simply use the ADD opcode + the MOD opcode together? The same question is also valid for the MULMOD ...
user avatar
0 votes
0 answers
22 views

What is evm_increaseTime function and can we use it for real world blockchain or only for testing smart contracts?

I have been going through evm_increaseTime and evm_mine functions but not able to detail it properly and having doubts with following questions: What is evm_increaseTime function? Where do we use ...
user avatar
0 votes
0 answers
37 views

BSC testnet showing weird input parameter names

My token smart contract has a "bridgeSend" function, which i wrote custom by myself. The function is basically just a wrapper around the transfer function. It allows users to send tokens to ...
user avatar
0 votes
1 answer
13 views

What are the default Etherscan readable methods?

I am deploying NFT contracts on EVM compatible networks with an "etherscan" tx scanner. I can see that sometimes the method of the tx listed is an alphanumeric string like 0xc203b6b8. But ...
user avatar
  • 558
1 vote
1 answer
34 views

How is the Gas Price field in Metamask populated?

I have an evm compatible blockchain with a price limit set to 10000. However when I go to submit a transaction to a validator, Metamask populates the gas price at 0: How can I ensure transactions are ...
user avatar
1 vote
1 answer
30 views

Opcode LOG3 Data Value Problem

I am trying to get the Event data from LOG3 but the data sometimes on stack5 and sometimes on stack6, can anyone help? for example, transfer amount = 1 of both two transfer functions, take a look at ...
user avatar
  • 13
1 vote
1 answer
20 views

msg.val payable compiler implimentation optcode

How does the ethereum evm handle msg.val transfers? There is no opt code I can see which changes the balance of an account.
user avatar
0 votes
1 answer
29 views

How does a single getter call get chosen by a node if there's no reward associated?

A tx uses gas to incentivize being picked up by a node. On the other hand, a getter doesn't. It just returns the value. How does a single getter call get chosen by a node if there's no reward ...
user avatar
  • 21
0 votes
1 answer
29 views

ERC20 -> ERC20 Swapping liquidity pool

I want to write a system that will exchange any ERC20 for any other ERC20 registered in the system using Uniswap I already wrote a contract for Ether swap in DAI and back with UniswapRouterV2 My ...
user avatar
0 votes
0 answers
28 views

Can you call an archive function at a block height before a contract was deployed?

I am working on a system that indexes events and calls a number of archive functions at the block height that the events are emitted. In order to reduce the amount of time that the system is waiting ...
user avatar
0 votes
0 answers
59 views

understanding hardhat JSON-RPC url - when is it used by DAPP?

I have a react.js app running using Portis wallet and I deployed one of my smart contracts using hardhat, using the url obtained from pokt.network and the other from default public url: https://rpc....
user avatar
  • 62
1 vote
0 answers
25 views

Contract scoped memory variables in solidity

By my research I haven't found a way to have contract scoped memory variables. My objective is to have a mutex like the one described here https://www.blunderingcode.com/writing-secure-solidity/ but ...
user avatar
  • 113
0 votes
1 answer
25 views

How can I parallelize the execution of smart contract transactions?

I am doing research and I would like to increase the transaction throughput by parallelizing. With respect to smart contracts what can I parallelize? Ideally I would like to use CUDA.
user avatar

1
2 3 4 5
16