-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: makefile updated as per latest bootstraper commit * refactor: deleted extra files * changelog and linting --------- Co-authored-by: mohiiit <[email protected]>
- Loading branch information
Showing
5 changed files
with
85 additions
and
29 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
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,22 @@ | ||
{ | ||
"eth_rpc": "http://127.0.0.1:8545", | ||
"eth_priv_key": "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80", | ||
"rollup_seq_url": "http://127.0.0.1:9944", | ||
"rollup_priv_key": "0xabcd", | ||
"eth_chain_id": 31337, | ||
"l1_deployer_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
"l1_wait_time": "15", | ||
"sn_os_program_hash": "0x41fc2a467ef8649580631912517edcab7674173f1dbfa2e9b64fbcd82bc4d79", | ||
"config_hash_version": "StarknetOsConfig2", | ||
"app_chain_id": "MADARA_DEVNET", | ||
"fee_token_address": "0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7", | ||
"native_fee_token_address": "0x04718f5a0fc34cc1af16a1cdee98ffb20c31f5cd61d6ab07201858f4287c938d", | ||
"cross_chain_wait_time": 20, | ||
"l1_multisig_address": "0x70997970C51812dc3A010C7d01b50e0d17dc79C8", | ||
"l2_multisig_address": "0x556455b8ac8bc00e0ad061d7df5458fa3c372304877663fa21d492a8d5e9435", | ||
"verifier_address": "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512", | ||
"operator_address": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", | ||
"dev": false, | ||
"core_contract_address": "0x99bba657f2bbc93c02d617f8ba121cb8fc104acf", | ||
"core_contract_implementation_address": "0x4826533b4897376654bb4d4ad88b7fafd0c98528" | ||
} |
Submodule madara-bootstrapper
updated
29 files
+33 −7 | .github/workflows/test-bridge.yml | |
+3 −1 | .gitignore | |
+83 −0 | Cargo.lock | |
+3 −0 | Cargo.toml | |
+ − | src/.DS_Store | |
+22 −0 | src/configs/devnet.json | |
+23 −8 | src/contract_clients/config.rs | |
+15 −16 | src/contract_clients/core_contract.rs | |
+6 −6 | src/contract_clients/eth_bridge.rs | |
+2 −0 | src/contract_clients/legacy_class.rs | |
+2 −1 | src/contract_clients/mod.rs | |
+39 −18 | src/contract_clients/starknet_sovereign.rs | |
+39 −18 | src/contract_clients/starknet_validity.rs | |
+13 −13 | src/contract_clients/token_bridge.rs | |
+15 −19 | src/contract_clients/utils.rs | |
+161 −126 | src/main.rs | |
+6 −6 | src/setup_scripts/account_setup.rs | |
+1 −1 | src/setup_scripts/argent.rs | |
+10 −10 | src/setup_scripts/braavos.rs | |
+7 −5 | src/setup_scripts/core_contract.rs | |
+12 −9 | src/setup_scripts/erc20_bridge.rs | |
+20 −17 | src/setup_scripts/eth_bridge.rs | |
+14 −9 | src/setup_scripts/udc.rs | |
+2 −1 | src/tests/constants.rs | |
+44 −47 | src/tests/erc20_bridge.rs | |
+40 −42 | src/tests/eth_bridge.rs | |
+172 −0 | src/tests/madara.rs | |
+93 −58 | src/tests/mod.rs | |
+1 −1 | src/utils/mod.rs |
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 |
---|---|---|
@@ -1,15 +1,43 @@ | ||
#!/bin/bash | ||
|
||
ENV_FILE="$(pwd)/.makefile.json" | ||
key="$1" | ||
value="$2" | ||
# Check if required arguments are provided | ||
if [ "$#" -ne 3 ]; then | ||
echo "Usage: $0 <json_file_path> <key> <value>" | ||
exit 1 | ||
fi | ||
|
||
json_file="$1" | ||
key="$2" | ||
value="$3" | ||
|
||
# Create directory structure if it doesn't exist | ||
directory=$(dirname "$json_file") | ||
mkdir -p "$directory" | ||
|
||
# Create the environment file if it doesn't exist | ||
if [ ! -f "$ENV_FILE" ]; then | ||
echo '{}' > "$ENV_FILE" | ||
# If file doesn't exist, create an empty JSON object | ||
if [ ! -f "$json_file" ]; then | ||
echo "{}" > "$json_file" | ||
fi | ||
|
||
# Use jq to update the JSON file with the new key-value pair | ||
jq --arg key "$key" --arg value "$value" \ | ||
'.[$key] = $value' "$ENV_FILE" > "$ENV_FILE.tmp" && \ | ||
mv "$ENV_FILE.tmp" "$ENV_FILE" | ||
# Check if the file is valid JSON | ||
if ! jq empty "$json_file" 2>/dev/null; then | ||
echo "Error: File exists but is not valid JSON" | ||
exit 1 | ||
fi | ||
|
||
# Update or add the key-value pair | ||
# The value is treated as a string. If you need to preserve type, | ||
# remove the quotes around "$value" in the jq command | ||
jq --arg k "$key" --arg v "$value" '.[$k] = $v' "$json_file" > "$json_file.tmp" | ||
|
||
# Check if jq command was successful | ||
if [ $? -eq 0 ]; then | ||
mv "$json_file.tmp" "$json_file" | ||
echo "Successfully updated $json_file" | ||
echo "Current content:" | ||
cat "$json_file" | ||
else | ||
rm -f "$json_file.tmp" | ||
echo "Error: Failed to update JSON file" | ||
exit 1 | ||
fi |