Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Generate all addresses, fix launchers #130

Merged
merged 7 commits into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/cl/hildr/hildr_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def launch(
existing_cl_clients,
l1_config_env_vars,
sequencer_enabled,
interop_params,
):
# beacon_node_identity_recipe = PostHttpRequestRecipe(
# endpoint="/",
Expand Down
6 changes: 4 additions & 2 deletions src/contracts/contract_deployer.star
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ FUND_SCRIPT_FILEPATH = "../../static_files/scripts"

utils = import_module("../util.star")

ethereum_package_genesis_constants = import_module("github.com/ethpandaops/ethereum-package/src/prelaunch_data_generator/genesis_constants/genesis_constants.star")


CANNED_VALUES = (
("int", "eip1559Denominator", 50),
Expand Down Expand Up @@ -48,12 +50,12 @@ def deploy_contracts(plan, priv_key, l1_config_env_vars, optimism_args, l1_netwo
name="op-deployer-fund-script",
)

collect_fund = plan.run_sh(
plan.run_sh(
name="op-deployer-fund",
description="Collect keys, and fund addresses",
image=utils.DEPLOYMENT_UTILS_IMAGE,
env_vars={
"PRIVATE_KEY": str(priv_key),
"PRIVATE_KEY": ethereum_package_genesis_constants.PRE_FUNDED_ACCOUNTS[19].private_key,
"FUND_VALUE": "10ether",
"L1_NETWORK": str(l1_network),
}
Expand Down
1 change: 1 addition & 0 deletions src/el_cl_launcher.star
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def launch(
all_cl_contexts,
l1_config_env_vars,
False,
interop_params,
)
all_cl_contexts.append(cl_builder_context)

Expand Down
14 changes: 6 additions & 8 deletions static_files/scripts/fund.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ write_keyfile() {
}

send() {
cast send $1 --value "$FUND_VALUE" --private-key "$PRIVATE_KEY" --nonce "$nonce" --async
cast send $1 --value "$FUND_VALUE" --private-key "$PRIVATE_KEY" --timeout 60 --nonce "$nonce" &
nonce=$((nonce+1))
}

Expand All @@ -28,11 +28,6 @@ for chain_id in "${chain_ids[@]}"; do
role="${roles[$index]}"
role_idx=$((index+1))

# Skip wallet addrs for anything other Proposer/Batcher/Sequencer/Challenger if not on local L1
if [[ "${L1_NETWORK}" != "local" && $role_idx -gt 4 ]]; then
continue
fi

private_key=$(cast wallet private-key "$mnemonic" "m/44'/60'/2'/$chain_id/$role_idx")
address=$(cast wallet address "${private_key}")
write_keyfile "${address}" "${private_key}" "${role}-$chain_id"
Expand All @@ -46,9 +41,10 @@ for chain_id in "${chain_ids[@]}"; do
done

# Add the L1 and L2 faucet information to each chain's wallet data
# Use chain 20 from the ethereum_package to prevent conflicts
chain_wallets=$(echo "$chain_wallets" | jq \
--arg addr "$addr" \
--arg private_key "0x$PRIVATE_KEY" \
--arg addr "0xafF0CA253b97e54440965855cec0A8a2E2399896" \
--arg private_key "0x4b9f63ecf84210c5366c66d68fa1f5da1fa4f634fad6dfc86178e4d79ff9e59" \
mslipper marked this conversation as resolved.
Show resolved Hide resolved
'.["l1FaucetPrivateKey"] = $private_key | .["l1FaucetAddress"] = $addr')

chain_wallets=$(echo "$chain_wallets" | jq \
Expand All @@ -66,3 +62,5 @@ done
echo "Wallet private key and addresses"
echo "$wallets_json" > "/network-data/wallets.json"
echo "$wallets_json"

wait
Loading