-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main' into codingsh/add-transa…
…ctions-types
- Loading branch information
Showing
5 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
## Gas | ||
|
||
minimum_word_size = (size + 31) / 32 | ||
init_code_cost = {gasPrices|initCodeWordCost} * minimum_word_size | ||
code_deposit_cost = {gasPrices|createData} * deployed_code_size | ||
|
||
static_gas = {gasPrices|create} | ||
dynamic_gas = init_code_cost + memory_expansion_cost + deployment_code_execution_cost + code_deposit_cost | ||
|
||
The `deployment_code_execution_cost` is the cost of whatever opcode is run to deploy the new contract. | ||
On top of that, there are additional costs for storing the code of the new contract and performing a jumpdest-analysis, respectively shown as `code_deposit_cost` and `init_code_cost`. | ||
The memory expansion cost explanation can be found [here](/about). | ||
|
||
The new contract address is added in the warm addresses. See section [access sets](/about). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
## Gas | ||
|
||
minimum_word_size = (size + 31) / 32 | ||
init_code_cost = {gasPrices|initCodeWordCost} * minimum_word_size | ||
hash_cost = {gasPrices|sha3Word} * minimum_word_size | ||
code_deposit_cost = {gasPrices|createData} * deployed_code_size | ||
|
||
static_gas = {gasPrices|create} | ||
dynamic_gas = init_code_cost + hash_cost + memory_expansion_cost + deployment_code_execution_cost + code_deposit_cost | ||
|
||
The `deployment_code_execution_cost` is the cost of whatever opcode is run to deploy the new contract. | ||
On top of that, there are additional costs for storing the code of the new contract and performing a jumpdest-analysis, respectively shown as `code_deposit_cost` and `init_code_cost`. | ||
The difference with [CREATE](#F0) is an additional cost to hash the initialisation code before. | ||
The memory expansion cost explanation can be found [here](/about). | ||
|
||
The new contract address is added in the warm addresses. See section [access sets](/about). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters