-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kurtosis setup to get deposit contract and fill genesis file
Signed-off-by: nidhi-singh02 <[email protected]>
- Loading branch information
1 parent
5d9fb51
commit 75ec992
Showing
8 changed files
with
182 additions
and
22 deletions.
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
6 changes: 5 additions & 1 deletion
6
kurtosis/src/networks/kurtosis-devnet/network-configs/genesis.json.template
Large diffs are not rendered by default.
Oops, something went wrong.
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
35 changes: 35 additions & 0 deletions
35
kurtosis/src/nodes/consensus/beacond/scripts/modify-genesis-with-deposits.sh
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,35 @@ | ||
#!/bin/bash | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
# | ||
# Copyright (C) 2024, Berachain Foundation. All rights reserved. | ||
# Use of this software is governed by the Business Source License included | ||
# in the LICENSE file of this repository and at www.mariadb.com/bsl11. | ||
# | ||
# ANY USE OF THE LICENSED WORK IN VIOLATION OF THIS LICENSE WILL AUTOMATICALLY | ||
# TERMINATE YOUR RIGHTS UNDER THIS LICENSE FOR THE CURRENT AND ALL OTHER | ||
# VERSIONS OF THE LICENSED WORK. | ||
# | ||
# THIS LICENSE DOES NOT GRANT YOU ANY RIGHT IN ANY TRADEMARK OR LOGO OF | ||
# LICENSOR OR ITS AFFILIATES (PROVIDED THAT YOU MAY USE A TRADEMARK OR LOGO OF | ||
# LICENSOR AS EXPRESSLY REQUIRED BY THIS LICENSE). | ||
# | ||
# TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON | ||
# AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, | ||
# EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF | ||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND | ||
# TITLE. | ||
|
||
|
||
# Sets the deposit storage in the the new eth-genesis file in the home directory. | ||
/usr/bin/beacond genesis set-deposit-storage $ETH_GENESIS --home /tmp/config_genesis/.beacond | ||
|
||
# Get values directly from the storage fields | ||
DEPOSIT_COUNT=$(jq -r '.alloc["0x4242424242424242424242424242424242424242"].storage["0x0000000000000000000000000000000000000000000000000000000000000000"]' /tmp/config_genesis/.beacond/genesis.json) | ||
DEPOSIT_ROOT=$(jq -r '.alloc["0x4242424242424242424242424242424242424242"].storage["0x0000000000000000000000000000000000000000000000000000000000000001"]' /tmp/config_genesis/.beacond/genesis.json) | ||
|
||
/usr/bin/beacond genesis execution-payload /tmp/config_genesis/.beacond/genesis.json --home /tmp/config_genesis/.beacond | ||
|
||
# Write each value to separate files for easier parsing | ||
mkdir -p /tmp/values | ||
printf "%s" "$DEPOSIT_COUNT" > /tmp/values/deposit_count.txt | ||
printf "%s" "$DEPOSIT_ROOT" > /tmp/values/deposit_root.txt |
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
Oops, something went wrong.