Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/alita-moore-patch-5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Woodpile37 committed Oct 20, 2023
2 parents 7ec38a8 + 20e6dd0 commit 62d137a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions EIPS/eip-1014.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ created: 2018-04-20

Adds a new opcode (`CREATE2`) at `0xf5`, which takes 4 stack arguments: endowment, memory_start, memory_length, salt. Behaves identically to `CREATE` (`0xf0`), except using `keccak256( 0xff ++ address ++ salt ++ keccak256(init_code))[12:]` instead of the usual sender-and-nonce-hash as the address where the contract is initialized at.


The `CREATE2` has the same `gas` schema as `CREATE`, but also an extra `hashcost` of `GSHA3WORD * ceil(len(init_code) / 32)`, to account for the hashing that must be performed. The `hashcost` is deducted at the same time as memory-expansion gas and `CreateGas` is deducted: _before_ evaluation of the resulting address and the execution of `init_code`.

- `0xff` is a single byte,
Expand Down

0 comments on commit 62d137a

Please sign in to comment.