Skip to main content

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
27 views

How to create crypto scam? [closed]

I want learn create crypto scam websites how I can to do this? This for education goals not for do something bad.
Eligijus Girdenis's user avatar
1 vote
0 answers
15 views

Can evm make an EOA transaction during another transaction?

I want to deploy a smart contract that would do something like this: transfer eth from the contract to account A make a transaction to another smart contract from account A(given the nonce and the ...
Andrew Slock's user avatar
1 vote
1 answer
20 views

Is arrays a hash tables in Solidity?

I have one theoretic question. I know that mapping in Solidity is representation of hash tables, where we have hashed key and value stored to this key. Also arrays in EVM stores values in keccak256(...
Victor's user avatar
  • 55
0 votes
1 answer
21 views

Forge Test Contract Transfer EvmError: Revert

Context Trying to run through the same tests for the default contract for Hardhat's basic Lock.sol, and getting errors with .transfer. Tested this in Remix and the functionality works, but under the ...
codingwithmanny's user avatar
2 votes
1 answer
70 views

How to determine if a target network supports a given EVM opcode?

As a smart contract developer or security researcher, I want to know whether a given EVM opcode is supported on the target network before deployment. This is especially important when using newer ...
Giovanni Di Siena's user avatar
0 votes
1 answer
33 views

Any way that I can append a data along with a EVM smart contract transaction?

I want to append some data along with the Ethereum contract call. for example, tokenContract.approve. I understand we can add the plain data to data field when we do a plain transaction. Just like ...
Eric Lee's user avatar
  • 161
0 votes
3 answers
33 views

Is this `isContract()` a built in function in solidity?

Please, is this isContract() a built in function in solidity? if yes please how do implement it.
JVC's user avatar
  • 5
0 votes
0 answers
28 views

for EOA to EOA simple value transfer transactions, how is the EVM state updated if no EVM operations are performed?

I understand that the EVM is mostly used to run smart contracts computations, and not involved for EOA to EOA simple value transfer transactions. However, then how is the world state Trie updated no ...
Z Oscar's user avatar
0 votes
1 answer
27 views

How datatypes work in solidity?

As we know the EVM provides a key/value store which is a 32-byte key pointing to a 32-byte value. We can imagine how integers or even strings can be stored there, but the main question is how solidity ...
Keyhan Alizadeh's user avatar
1 vote
1 answer
42 views

How OPCODES fees were defined?

When a function from a contract is executed the total cost, in weis, is calculated based on the OPCODES executed. For example, this question shows how to calculate the gas cost for keccak, that is 30 ...
Rafael's user avatar
  • 429
1 vote
1 answer
23 views

Transaction Priority in Producing Block

I've got one question about priority in ethers mempool tx. I've checked all transactions in some blocks, discovered that they are not confirmed in order of gas fee, even the tx with lower fee ...
Aiden's user avatar
  • 11
1 vote
1 answer
26 views

Looking for comprehensive documentation for Solidity-generated bytecode

I'm currently working on analyzing the bytecode of smart contracts generated by Solidity. While examining the bytecode, I've encountered various opcodes and structures that I need to understand in ...
Mere's user avatar
  • 21
1 vote
1 answer
39 views

Solidity gaslimit for chaining call?

i have the following: contract Example { function A() external { (bool success,) = address(this).call{gas: 1_000_000}(abi.encodeWithSelector(this.B.selector)); console.log("A&...
Junion's user avatar
  • 13
1 vote
1 answer
28 views

How does EVM chains update the states of Predeploys?

I was checking one of the predeploys contract on BASE, which is the L1BlockNumber contract at https://basescan.org/address/0x4200000000000000000000000000000000000013#readProxyContract This contract ...
johnhckuo's user avatar
  • 405
0 votes
0 answers
31 views

Can't supply assets to Compound via call Solidity

I have Smart Contract I make two functions supplyLiquidity with call opcode and supplyLiquidity1 where using interface instead // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; import {IERC20} ...
Victor's user avatar
  • 55
0 votes
1 answer
40 views

What Post-Quantum Secure Hash Functions Are Available for Usage in Solidity Smart Contracts?

Question: I am developing Solidity smart contracts and am concerned about the future security of cryptographic hash functions in the face of quantum computing advancements. Specifically, I am looking ...
Nerses Asaturyan's user avatar
1 vote
0 answers
21 views

Is there a way to simulate what deployed bytecode would look like by having the bytecode without actually deploying it on blockchain?

I have an upgradable contract that I want to upgrade if it is not having the latest code. I know hardhat handles it by storing what has been deployed previously in a file, but I don't want to do that ...
Seyed Mohammad Chavoshian's user avatar
0 votes
1 answer
35 views

Understanding discrepancies between Etherscan deployed bytecode and locally compiled bytecode for smart contracts

I’m experiencing an issue when examining the bytecode of this smart contract 0x7c21C4Bbd63D05Fa9F788e38d14e18FC52E9557B. After locating the contract on Etherscan and viewing the contract code in the “...
Mere's user avatar
  • 21
0 votes
0 answers
19 views

Where to find callee smart contract address?

I am working on smart contract analysis and focusing on smart contract interaction. My goal is to avoid executing the contracts and I wanted to know if it is possible to get the address of a called ...
Charles Lohest's user avatar
0 votes
0 answers
44 views

react project cannot get the data from the contract

I copied a project and there is a problem when ( tried to access the page of my react app it shows "failed to fetch" ERROR Failed to fetch TypeError: Failed to fetch at HttpProvider.<...
sasya's user avatar
  • 1
3 votes
1 answer
74 views

Is it possible to emit generic events using assembly?

I'm trying out a proxy / upgrade pattern where the deployed contract is an ERC-721 but it delegates as much functionality to a "controller" contract as possible. The storage is split between ...
okwme's user avatar
  • 325
0 votes
1 answer
70 views

How to batch multiple calls through a single function?

I have a smart contract that implements monolithic functions. These functions are designed to do one job when called by a user. However, a user may be interested in batching multiple calls into a ...
smol-ninja's user avatar
1 vote
1 answer
39 views

Question about SLOAD and JUMP/JUMPI in EVM Bytecode

I have a question about the behavior of EVM bytecode. When an SLOAD instruction is executed and the next opcode is a JUMP or JUMPI, can the value pushed onto the stack by the SLOAD be considered a ...
Mere's user avatar
  • 21
1 vote
1 answer
121 views

abi.decode throwing error, panic: out of memory

solidity types data structure is like this: enum RequestType { SpecificReq, ArbitraryReq } enum ChannelType { InterestBearingOpen, InterestBearingMutual, } ...
Nilesh Gupta's user avatar
0 votes
1 answer
38 views

Interact with Deployed Contract

Can we interact with a deployed contract without web3 library meaning through another contract. Can we make a call to another contract inside of a contract through may be assembly keyword that makes ...
seojunchian's user avatar
0 votes
1 answer
119 views

Foundry tests fail with `[NotActivated] EvmError: NotActivated` while fork test

The fork tests works perfectly well with Hardhat. But when I tried with Foundry using different evm_version in foundry.toml file and also tried compiling with different versions solc = "0.8.18&...
Pankaj Jagtap's user avatar
0 votes
0 answers
10 views

Tokenized margin positions

Is there a protocol in DeFi that tokenizes long & short positions? So you're able to buy a token that represents all variables from N position.
dNyrM's user avatar
  • 938
0 votes
1 answer
15 views

A smart contract already has a non-zero balance even at the start of its non-payable constructor

Solidity compiler version: 0.8.23 Foundry version: 0.2.0 When deploying a smart contract to a forked url of Sepolia, using: console.log("Contract Balance: ",address(this).balance); as the ...
Mighty_Hotdog's user avatar
0 votes
1 answer
82 views

How to monitor new pairs and liquidity pools in mempool pending transactions?

I have a task to monitor newly created pairs PairCreated() and adding new liquidity pools Mint(). That is some kind of sniper bots like banana or maestro that are watching mempool and send buy ...
sirjay's user avatar
  • 103
0 votes
0 answers
49 views

Uniswap v3 Mainnet vs Sepolia EvmError: Revert

I'm struggling to solve EvmError: Revert, while calling createAndInitializePoolIfNecessary function on Uniswap v3 NonfungiblePositionManager contract. I have wrote function that contains this code: ...
Neftyr's user avatar
  • 3
0 votes
0 answers
33 views

How do I determine the constructor bytecode for contracts created by another contract

I am looking to decode constructor arguments for EVM contracts. Some contracts are created by externally owned accounts, but many are created via a contract transaction. In both cases how can I ...
Matthew's user avatar
0 votes
1 answer
368 views

I can't deploy my Token because of EVM version (?)

This is my code, I tried every evm version paris,berlin,istanbul etc. I can't figure out why it doesn't work. Also this is a school project that's why the version is very old we're using an old parent ...
Erdem Arif Akalin's user avatar
0 votes
1 answer
63 views

ERC721 NFT is empty in Avalanche Fuji Testnet

I am using OpenZeppelin to generate this simple contract and Remix IDE to deploy it and interact with it using Core Wallet as injected provider: // SPDX-License-Identifier: MIT // Compatible with ...
Jose Miguel Vega Lopez's user avatar
0 votes
0 answers
60 views

Uniswap OLD revert after swap

I am initializing new pool, and have a contract that allows doing swap on it utilizing TWAP Oracle. I have tested the TWAP and in tests it needed 1 second delay to return correct quotes, until doing a ...
Jan Kwiatkowski's user avatar
1 vote
1 answer
78 views

How do forks in Foundry work?

What you fork a chain in foundry, what chain data does it copy? Does it copy OPCODEs and their gas as well?
smol-ninja's user avatar
2 votes
1 answer
143 views

Do all EVM chains use the same minimum transaction gas of 21000?

Do all EVM chain use 21,000 gas as a minimum transaction gas for simple ETH payments? Optimism seems to do so. How about the other EVM chains?
Paul Razvan Berg's user avatar
1 vote
0 answers
17 views

Ethereum RETURN opocde memory expansion cost

I am currently implementing a version of the ethereum EVM and am running into a problem when implementing memory expansion costs for the RETURN opcode. When returning data from addresses outside the ...
max-wickham's user avatar
1 vote
1 answer
33 views

Storage ops / gas spent

Is it possible to know the amount of storage operations (or gas spent) that are between, let's say 4 functions, or a full contract? Is foundry capable of this? Thanks!
dNyrM's user avatar
  • 938
0 votes
1 answer
28 views

can we send value as well as call smart contract function using CALL

CALL opcode consumes value of the stack (which is transferred to the account). It can also additionally consume stack items to pass input to the smart contract account function. Can both happen ...
Sudeep Kumar's user avatar
1 vote
2 answers
56 views

what's the point of CODECOPY opcode

CODECOPY is used to copy the executing program's opcode onto the memory. I wonder what's the use of this though. Is there a deployed example where CODECOPY is useful?
Sudeep Kumar's user avatar
0 votes
1 answer
32 views

Is it safe to reuse same memory slots for both inputs and ouputs when working with assembly call?

Is it safe to reuse memory for both inputs and ouputs when working with assembly call? If not, what can go wrong? Contract below uses assembly to call Target contract YulStaticCall { function ...
tsknakamura's user avatar
3 votes
2 answers
455 views

Issue with Accounts Not Displaying in Remix VM (Cancun and Shanghai) Environments

I'm encountering an issue with Remix VM where, after successful compilation, the accounts are not displaying in the "Deploy" section. This problem persists in both the Cancun and Shanghai ...
Piña's user avatar
  • 33
0 votes
1 answer
43 views

Why the method _castToPure in hardhat/console.sol can convert a view method to a pure one?

I have a question when read the console.sol. There is a method named _castToPure that can convert a view method _sendLogPayloadImplementation into a pure method. I cant understand the reason and ...
Alvan's user avatar
  • 31
0 votes
1 answer
24 views

How to determine whether code is running in a JS VM such as Remix, as opposed to ETH mainnet?

block.chainid always returns 1 for both Remix VM and ETH mainnet. There has to be some intrinsic variable that will always return a different value compared to the other environment. I'm aware I could ...
Ashraile's user avatar
  • 125
0 votes
1 answer
123 views

Deploying contract through create2 is returning a zero address

In this function I am deploying a contract through create2 and in this NFTImplementation is just a standard ERC721 implementation. The function always reverts due to the address returned from the ...
Surya M D G's user avatar
0 votes
1 answer
26 views

Adding a custom devnet to remix

I am trying to deploy a smart contract to a new EVM Devnet with its dedicated ChainID. I've got the RPC endpoint, but when I try to add it as a custom External HTTP Provider in remix, I get an "...
GoLDs's user avatar
  • 1
0 votes
1 answer
121 views

Runtime bytecode not contained in creation bytecode

I'm currently delving into EVM and contract bytecode. My understanding is that by sending a transaction to the NULL address with both the initcode and contract code, and ensuring that the init code ...
kaspyjrefluss8's user avatar
1 vote
1 answer
132 views

How can I decode the output of the first call and use it to send a transaction?

I am attempting to call view function “0x…” with argument of value “3…” to a specific address “0x…” and also send X wei to that address I am looking to acquire the hash of the successful tx. Tools/...
QuantumDomain's user avatar
1 vote
0 answers
21 views

Blind signing when trying to send USDT over Arbitrum network

I am trying to send USDT ERC20 token through arbitrum network and all things go well until i want to personally sign it using my hardware wallet. seems like the ABI is wrong or corrupt as i get bling ...
saugat giri's user avatar
0 votes
2 answers
33 views

Why out of gas if it doesn't consume that much in the end?

I tried modify gas limit to a number I checked it should be enough to run transfer on USDT (62,800) but failed with "out of gas" error. When I send another transaction without modifying ...
zklim's user avatar
  • 3

1
2 3 4 5
22