Questions tagged [evm]

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

173 questions
3
votes
1 answer

Solidity size of mapping type

In Solidity, is there a maximum number of keys or key-value pairs that a mapping can store? If so, what is the maximum? Furthermore, does the maximum number differ depending on the variable types of the keys and the values of that mapping? For…
fieldlee
  • 63
  • 1
  • 5
3
votes
2 answers

Solidity Assembly, the mstore function, and the width of a word in bytes

I'm learning Solidity Assembly and I'm confused about something. I'm looking at this library called Seriality. Specifically, this function: https://github.com/pouladzade/Seriality/blob/master/src/TypesToBytes.sol#L21 function bytes32ToBytes(uint…
user1558646
  • 145
  • 4
  • 9
3
votes
1 answer

Ethereum Smart Contract Assembler

For learning purposes I would like to write Ethereum Smart Contracts directly in Assembler. By that I mean I want to write the opcodes from the yellow paper somewhere, which then gets converted to bytecode. However there doesn't seem to be a pure…
2
votes
0 answers

Is there a way to consistently find ends of the Solidity functions in the corresponding EVM assembly?

I've been working on a project that analyzes EVM-assembly of Solidity smart contracts. Currently I am stuck with the problem of finding the endings of all the contract functions in the assembly. There is a bruteforce approach with simulating the EVM…
artyom448
  • 21
  • 3
2
votes
1 answer

Where event LogFeeTransfer is used in polygon contract?

When I decoded and checked a transaction's log about the polygon contract (0x0000000000000000000000000000000000001010), I found the signature like "LogFeeTransfer(address,address,address,uint256,uint256,uint256,uint256,uint256)". However I can't…
ttt
  • 23
  • 3
2
votes
0 answers

Quorum: "invalid opcode: SELFBALANCE" error unless 'petersburg' chosen manually

We are running a GoQuorum 27.7 network. In Remix with 'default' as the EVM version, when running the function SELFBALANCE it gives the error: invalid opcode: SELFBALANCE . However, when manually choosing "petersburg" as the EVM version, it works…
ShadiAyoub
  • 21
  • 1
2
votes
1 answer

Which EVM opcodes produce traces on GoEthereum

I was reading through the Geth docs and noticed it mentioning traces. It covered when traces occur and mentioned that logs are created anytime there are traces. The simplest type of transaction trace that Geth can generate are raw EVM opcode…
0xKitsune
  • 131
  • 6
2
votes
1 answer

Recursive evm message calls in solidity

I need to make recursive evm message calls. Based on my understanding of how solidity works, calls within the same contract don't trigger an evm message. But for my use case I want each of these recursive calls to be evm message calls. It's a…
Stylishcoder
  • 1,142
  • 1
  • 11
  • 21
2
votes
1 answer

Distribute fees evenly to many addresses(pull method) in Solidity

I want to distribute a fee from every transaction to a mapping(address=>uint) of 3000 addresses, evenly. Now, that is an issue because the function will run out of gas, so I've heard, that instead of a push method, a pull method should be able to…
Svante
  • 112
  • 11
2
votes
0 answers

How do i get an Ethereum address in python starting from a v,r,s signature?

I am trying to get the address that signed the transaction below in Moonbeam EVM (a Polkadot EVM compatible parachain). By loading the contract ABI i am able to get the call parameters by doing this: from web3 import Web3 w3 =…
JohnUopini
  • 960
  • 9
  • 24
2
votes
1 answer

Python with solcx don't find evm (vs code)

I was following this course on ytb and after making the same code than him I encoutered a problem with solcx. Tanks a lot in advance. This is the error message (i'm french so the first line is french but i think you'll understand): Information�:…
2
votes
0 answers

How can I run function in a contract by evm?

I'm a newbie in solidity and Ethereum. I build the evmc project on github to run my smart contract locally. I first compile my contract by solc and use the following command: solc --abi --asm --hashes --bin --overwrite -o . hello.sol Here is my…
张品戈
  • 89
  • 1
  • 4
2
votes
1 answer

Why jumping into an instruction even if containing a JUMPDEST does not work?

Here’s my whole program. The reasoning behind it is the larger is the program on Ethereum, the more it costs money to load it (as the gas cost is per byte and quite high). CALLER CALLDATASIZE ISZERO PUSH1 0x07 JUMPI PUSH3 0x5b6000 SSTORE So I’m…
user2284570
  • 2,891
  • 3
  • 26
  • 74
2
votes
2 answers

`paint_evm::Event` is not implemented for `Event`

Following the adding a module to your runtime, I'm trying to implement the Parity Substrate paint-evm trait for the Dothereum Runtime. According to my previous work: How to implement the EVM Trait for a Substrate Runtime? I implemented the EVM…
q9f
  • 11,293
  • 8
  • 57
  • 96
2
votes
0 answers

C binary code (after compilation) to EVM bytecode conversion

Consider the following example: Suppose I have a function ADD written in C language that adds two integers int A and int B and returns the sum C. Now, I want to verify that my function ADD worked correctly using the Ethereum blockchain. To do so, I…
NB18
  • 21
  • 1
1
2
3
11 12