Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ethereum-package
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
ethereum-package
Commits
1be7efa0
Unverified
Commit
1be7efa0
authored
Aug 26, 2024
by
Barnabas Busa
Committed by
GitHub
Aug 26, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add prefunded accounts (#752)
parent
a433c50e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
27 additions
and
6 deletions
+27
-6
README.md
README.md
+20
-6
network_params.yaml
network_params.yaml
+1
-0
input_parser.star
src/package_io/input_parser.star
+3
-0
sanity_check.star
src/package_io/sanity_check.star
+1
-0
el_cl_genesis_generator.star
...data_generator/el_cl_genesis/el_cl_genesis_generator.star
+1
-0
values.env.tmpl
static_files/genesis-generation-config/el-cl/values.env.tmpl
+1
-0
No files found.
README.md
View file @
1be7efa0
...
@@ -533,18 +533,32 @@ network_params:
...
@@ -533,18 +533,32 @@ network_params:
# Preloaded contracts for the chain
# Preloaded contracts for the chain
additional_preloaded_contracts
:
{}
additional_preloaded_contracts
:
{}
# example: To set a contract code at a certain address:
# Example:
# additional_preloaded_contracts: '{
# "0x123463a4B065722E99115D6c222f267d9cABb524":
# "0x123463a4B065722E99115D6c222f267d9cABb524":
# balance: "1ETH"
# {
# code: "0x1234"
# balance: "1ETH",
# storage: {}
# code: "0x1234",
# nonce: 0
# storage: {},
# secretKey: "0x"
# nonce: 0,
# secretKey: "0x",
# }
# }'
# Repository override for devnet networks
# Repository override for devnet networks
# Default: ethpandaops
# Default: ethpandaops
devnet_repo
:
ethpandaops
devnet_repo
:
ethpandaops
# A number of prefunded accounts to be created
# Defaults to no prefunded accounts
# Example:
# prefunded_accounts: '{"0x25941dC771bB64514Fc8abBce970307Fb9d477e9": {"balance": "10ETH"}}'
# 10ETH to the account 0x25941dC771bB64514Fc8abBce970307Fb9d477e9
# To prefund multiple accounts, separate them with a comma
#
# prefunded_accounts: '{"0x25941dC771bB64514Fc8abBce970307Fb9d477e9": {"balance": "10ETH"}, "0x4107be99052d895e3ee461C685b042Aa975ab5c0": {"balance": "1ETH"}}'
prefunded_accounts
:
{}
# Global parameters for the network
# Global parameters for the network
# By default includes
# By default includes
...
...
network_params.yaml
View file @
1be7efa0
...
@@ -85,6 +85,7 @@ network_params:
...
@@ -85,6 +85,7 @@ network_params:
max_blobs_per_block
:
6
max_blobs_per_block
:
6
additional_preloaded_contracts
:
{}
additional_preloaded_contracts
:
{}
devnet_repo
:
ethpandaops
devnet_repo
:
ethpandaops
prefunded_accounts
:
{}
additional_services
:
[]
additional_services
:
[]
dora_params
:
dora_params
:
image
:
"
"
image
:
"
"
...
...
src/package_io/input_parser.star
View file @
1be7efa0
...
@@ -289,6 +289,7 @@ def input_parser(plan, input_args):
...
@@ -289,6 +289,7 @@ def input_parser(plan, input_args):
"additional_preloaded_contracts"
"additional_preloaded_contracts"
],
],
devnet_repo=result["network_params"]["devnet_repo"],
devnet_repo=result["network_params"]["devnet_repo"],
prefunded_accounts=result["network_params"]["prefunded_accounts"],
),
),
mev_params=struct(
mev_params=struct(
mev_relay_image=result["mev_params"]["mev_relay_image"],
mev_relay_image=result["mev_params"]["mev_relay_image"],
...
@@ -811,6 +812,7 @@ def default_network_params():
...
@@ -811,6 +812,7 @@ def default_network_params():
"preset": "mainnet",
"preset": "mainnet",
"additional_preloaded_contracts": {},
"additional_preloaded_contracts": {},
"devnet_repo": "ethpandaops",
"devnet_repo": "ethpandaops",
"prefunded_accounts": {},
}
}
...
@@ -844,6 +846,7 @@ def default_minimal_network_params():
...
@@ -844,6 +846,7 @@ def default_minimal_network_params():
"preset": "minimal",
"preset": "minimal",
"additional_preloaded_contracts": {},
"additional_preloaded_contracts": {},
"devnet_repo": "ethpandaops",
"devnet_repo": "ethpandaops",
"prefunded_accounts": {},
}
}
...
...
src/package_io/sanity_check.star
View file @
1be7efa0
...
@@ -142,6 +142,7 @@ SUBCATEGORY_PARAMS = {
...
@@ -142,6 +142,7 @@ SUBCATEGORY_PARAMS = {
"preset",
"preset",
"additional_preloaded_contracts",
"additional_preloaded_contracts",
"devnet_repo",
"devnet_repo",
"prefunded_accounts",
],
],
"dora_params": [
"dora_params": [
"image",
"image",
...
...
src/prelaunch_data_generator/el_cl_genesis/el_cl_genesis_generator.star
View file @
1be7efa0
...
@@ -129,4 +129,5 @@ def new_env_file_for_el_cl_genesis_data(
...
@@ -129,4 +129,5 @@ def new_env_file_for_el_cl_genesis_data(
"AdditionalPreloadedContracts": json.encode(
"AdditionalPreloadedContracts": json.encode(
network_params.additional_preloaded_contracts
network_params.additional_preloaded_contracts
),
),
"PrefundedAccounts": json.encode(network_params.prefunded_accounts),
}
}
static_files/genesis-generation-config/el-cl/values.env.tmpl
View file @
1be7efa0
...
@@ -34,3 +34,4 @@ export SAMPLES_PER_SLOT={{ .SamplesPerSlot }}
...
@@ -34,3 +34,4 @@ export SAMPLES_PER_SLOT={{ .SamplesPerSlot }}
export CUSTODY_REQUIREMENT={{ .CustodyRequirement }}
export CUSTODY_REQUIREMENT={{ .CustodyRequirement }}
export MAX_BLOBS_PER_BLOCK={{ .MaxBlobsPerBlock }}
export MAX_BLOBS_PER_BLOCK={{ .MaxBlobsPerBlock }}
export ADDITIONAL_PRELOADED_CONTRACTS={{ .AdditionalPreloadedContracts }}
export ADDITIONAL_PRELOADED_CONTRACTS={{ .AdditionalPreloadedContracts }}
export EL_PREMINE_ADDRS={{ .PrefundedAccounts }}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment