-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* set staging accounts Signed-off-by: Gregory Edison <[email protected]> * rename + update e2e pipeline workflow and script Signed-off-by: Gregory Edison <[email protected]> * update GH_TOKEN to GITHUB_TOKEN Signed-off-by: Gregory Edison <[email protected]> * update urls Signed-off-by: Gregory Edison <[email protected]> * fix addresses Signed-off-by: Gregory Edison <[email protected]> * fix script + karnot config Signed-off-by: Gregory Edison <[email protected]> * typos Signed-off-by: Gregory Edison <[email protected]> * skip CairoPrecompiles Signed-off-by: Gregory Edison <[email protected]> * fix e2e pipeline script Signed-off-by: Gregory Edison <[email protected]> * revert changes to other files Signed-off-by: Gregory Edison <[email protected]> * update workflow Signed-off-by: Gregory Edison <[email protected]> * fix workflow fmt Signed-off-by: Gregory Edison <[email protected]> * use github token in action Signed-off-by: Gregory Edison <[email protected]> * add comments Signed-off-by: Gregory Edison <[email protected]> --------- Signed-off-by: Gregory Edison <[email protected]>
- Loading branch information
Showing
5 changed files
with
137 additions
and
100 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,65 +1,65 @@ | ||
{ | ||
"config": { | ||
"chainId": 1337, | ||
"homesteadBlock": 0, | ||
"eip150Block": 0, | ||
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"byzantiumBlock": 0, | ||
"constantinopleBlock": 0, | ||
"petersburgBlock": 0, | ||
"istanbulBlock": 0, | ||
"muirGlacierBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"arrowGlacierBlock": 0, | ||
"grayGlacierBlock": 0, | ||
"shanghaiTime": 0, | ||
"terminalTotalDifficulty": 0, | ||
"terminalTotalDifficultyPassed": true, | ||
"ethash": {} | ||
}, | ||
"nonce": "0x0", | ||
"timestamp": "0x0", | ||
"extraData": "0x", | ||
"gasLimit": "0x4c4b40", | ||
"difficulty": "0x1", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { | ||
"0000000000000000000000000000000000031ec7": { | ||
"code": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a9059cbb14610030575b600080fd5b61004a6004803603810190610045919061016a565b610060565b60405161005791906101c5565b60405180910390f35b60008273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516100bf91906101ef565b60405180910390a36001905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610101826100d6565b9050919050565b610111816100f6565b811461011c57600080fd5b50565b60008135905061012e81610108565b92915050565b6000819050919050565b61014781610134565b811461015257600080fd5b50565b6000813590506101648161013e565b92915050565b60008060408385031215610181576101806100d1565b5b600061018f8582860161011f565b92505060206101a085828601610155565b9150509250929050565b60008115159050919050565b6101bf816101aa565b82525050565b60006020820190506101da60008301846101b6565b92915050565b6101e981610134565b82525050565b600060208201905061020460008301846101e0565b9291505056fea2646970667358221220b469033f4b77b9565ee84e0a2f04d496b18160d26034d54f9487e57788fd36d564736f6c63430008120033", | ||
"balance": "0xde0b6b3a7640000" | ||
"config": { | ||
"chainId": 1337, | ||
"homesteadBlock": 0, | ||
"eip150Block": 0, | ||
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"eip155Block": 0, | ||
"eip158Block": 0, | ||
"byzantiumBlock": 0, | ||
"constantinopleBlock": 0, | ||
"petersburgBlock": 0, | ||
"istanbulBlock": 0, | ||
"muirGlacierBlock": 0, | ||
"berlinBlock": 0, | ||
"londonBlock": 0, | ||
"arrowGlacierBlock": 0, | ||
"grayGlacierBlock": 0, | ||
"shanghaiTime": 0, | ||
"terminalTotalDifficulty": 0, | ||
"terminalTotalDifficultyPassed": true, | ||
"ethash": {} | ||
}, | ||
"658bdf435d810c91414ec09147daa6db62406379": { | ||
"balance": "0x487a9a304539440000" | ||
"nonce": "0x0", | ||
"timestamp": "0x0", | ||
"extraData": "0x", | ||
"gasLimit": "0x4c4b40", | ||
"difficulty": "0x1", | ||
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"coinbase": "0x0000000000000000000000000000000000000000", | ||
"alloc": { | ||
"0000000000000000000000000000000000031ec7": { | ||
"code": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063a9059cbb14610030575b600080fd5b61004a6004803603810190610045919061016a565b610060565b60405161005791906101c5565b60405180910390f35b60008273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516100bf91906101ef565b60405180910390a36001905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000610101826100d6565b9050919050565b610111816100f6565b811461011c57600080fd5b50565b60008135905061012e81610108565b92915050565b6000819050919050565b61014781610134565b811461015257600080fd5b50565b6000813590506101648161013e565b92915050565b60008060408385031215610181576101806100d1565b5b600061018f8582860161011f565b92505060206101a085828601610155565b9150509250929050565b60008115159050919050565b6101bf816101aa565b82525050565b60006020820190506101da60008301846101b6565b92915050565b6101e981610134565b82525050565b600060208201905061020460008301846101e0565b9291505056fea2646970667358221220b469033f4b77b9565ee84e0a2f04d496b18160d26034d54f9487e57788fd36d564736f6c63430008120033", | ||
"balance": "0xde0b6b3a7640000" | ||
}, | ||
"658bdf435d810c91414ec09147daa6db62406379": { | ||
"balance": "0x487a9a304539440000" | ||
}, | ||
"aa00000000000000000000000000000000000000": { | ||
"code": "0x6042", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"0x0100000000000000000000000000000000000000000000000000000000000000": "0x0100000000000000000000000000000000000000000000000000000000000000", | ||
"0x0200000000000000000000000000000000000000000000000000000000000000": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"0x0300000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000303" | ||
}, | ||
"balance": "0x1", | ||
"nonce": "0x1" | ||
}, | ||
"bb00000000000000000000000000000000000000": { | ||
"code": "0x600154600354", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"0x0100000000000000000000000000000000000000000000000000000000000000": "0x0100000000000000000000000000000000000000000000000000000000000000", | ||
"0x0200000000000000000000000000000000000000000000000000000000000000": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"0x0300000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000303" | ||
}, | ||
"balance": "0x2", | ||
"nonce": "0x1" | ||
} | ||
}, | ||
"aa00000000000000000000000000000000000000": { | ||
"code": "0x6042", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"0x0100000000000000000000000000000000000000000000000000000000000000": "0x0100000000000000000000000000000000000000000000000000000000000000", | ||
"0x0200000000000000000000000000000000000000000000000000000000000000": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"0x0300000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000303" | ||
}, | ||
"balance": "0x1", | ||
"nonce": "0x1" | ||
}, | ||
"bb00000000000000000000000000000000000000": { | ||
"code": "0x600154600354", | ||
"storage": { | ||
"0x0000000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"0x0100000000000000000000000000000000000000000000000000000000000000": "0x0100000000000000000000000000000000000000000000000000000000000000", | ||
"0x0200000000000000000000000000000000000000000000000000000000000000": "0x0200000000000000000000000000000000000000000000000000000000000000", | ||
"0x0300000000000000000000000000000000000000000000000000000000000000": "0x0000000000000000000000000000000000000000000000000000000000000303" | ||
}, | ||
"balance": "0x2", | ||
"nonce": "0x1" | ||
} | ||
}, | ||
"number": "0x0", | ||
"gasUsed": "0x0", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"baseFeePerGas": "0x3b9aca00" | ||
"number": "0x0", | ||
"gasUsed": "0x0", | ||
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"baseFeePerGas": "0x3b9aca00" | ||
} |
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 |
---|---|---|
|
@@ -32,12 +32,12 @@ for arg in "$@"; do | |
deploy) | ||
run_deploy=true | ||
;; | ||
--staging) | ||
ENV="kakarot-staging" | ||
;; | ||
--sepolia) | ||
ENV="sepolia" | ||
;; | ||
--staging) | ||
ENV="sepolia-staging" | ||
;; | ||
*) | ||
echo "Unknown argument: ${arg}" | ||
usage | ||
|
@@ -50,59 +50,69 @@ if [ -z "${ENV}" ]; then | |
echo "Please provide the environment to test against" | ||
exit 1 | ||
fi | ||
if [ -z "${INFURA_KEY}" ]; then | ||
echo "Please provide the INFURA_KEY environment variable" | ||
exit 1 | ||
fi | ||
|
||
cd ../lib/kakarot || exit | ||
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION="python" | ||
export STARKNET_NETWORK="${ENV}" | ||
export L1_RPC_URL="https://sepolia.infura.io/v3/${INFURA_KEY}" | ||
|
||
# Set the environment variables based on the provided environment | ||
if [ "${ENV}" = "sepolia" ]; then | ||
# Note: you might need to modify the following values in `lib/kakarot/kakarot_scripts/constants.py`: | ||
# - NETWORKS["sepolia"].rpc_url = https://juno-kakarot-sepolia.karnot.xyz | ||
# - NETWORKS["sepolia"].max_wait = 40 | ||
export STARKNET_SEPOLIA_RPC_URL="https://juno-kakarot-sepolia.karnot.xyz" | ||
export RPC_URL="https://juno-kakarot-sepolia.karnot.xyz" | ||
export RPC_NAME="starknet-sepolia" | ||
export CHECK_INTERVAL=1 | ||
export MAX_WAIT=50 | ||
export WEB3_HTTP_PROVIDER_URI="https://rpc-kakarot-sepolia.karnot.xyz/" | ||
if [ -z "${STARKNET_SEPOLIA_ACCOUNT_ADDRESS}" ]; then | ||
echo "Please provide the STARKNET_SEPOLIA_ACCOUNT_ADDRESS environment variable" | ||
echo "Please provide the STARKNET_SEPOLIA_ACCOUNT_ADDRESS environment variable." | ||
exit 1 | ||
fi | ||
if [ -z "${STARKNET_SEPOLIA_PRIVATE_KEY}" ]; then | ||
echo "Please provide the STARKNET_SEPOLIA_PRIVATE_KEY environment variable" | ||
echo "Please provide the STARKNET_SEPOLIA_PRIVATE_KEY environment variable." | ||
exit 1 | ||
fi | ||
if [ -z "${EVM_PRIVATE_KEY}" ]; then | ||
echo "Please provide the EVM_PRIVATE_KEY environment variable" | ||
echo "Please provide the EVM_PRIVATE_KEY environment variable." | ||
exit 1 | ||
fi | ||
SKIP="--ignore tests/end_to_end/L1L2Messaging --ignore tests/end_to_end/CairoPrecompiles --ignore tests/end_to_end/EvmPrecompiles --ignore tests/end_to_end/test_kakarot.py" | ||
elif [ "${ENV}" = "kakarot-staging" ]; then | ||
SKIP="--ignore tests/end_to_end/L1L2Messaging --ignore tests/end_to_end/CairoPrecompiles -k 'not test_should_set_account_bytecode and not test_should_set_account_nonce and not test_should_upgrade_account_class and not test_should_raise_when_class_hash_is_not_declared and not test_should_upgrade_class_hash and not test_should_transfer_ownership and not test_should_return_transaction_count and not test_should_withdraw_all_eth'" | ||
elif [ "${ENV}" = "sepolia-staging" ]; then | ||
export EVM_PRIVATE_KEY="0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d" | ||
export KAKAROT_STAGING_RPC_URL="https://juno-kakarot-testnet-stage.karnot.xyz" | ||
export KAKAROT_STAGING_ACCOUNT_ADDRESS="0x7ecf6cd45c32ce84812e660cc176cb8b4de2e7a6d5916fe326bf871466fbe02" | ||
export WEB3_HTTP_PROVIDER_URI="https://kkrt-rpc-kakarot-testnet-stage.karnot.xyz" | ||
if [ -z "${KAKAROT_STAGING_PRIVATE_KEY}" ]; then | ||
echo "Please provide the KAKAROT_STAGING_PRIVATE_KEY environment variable. The private key should be loaded using gpg: gpg -r [email protected] --decrypt path/to/encrypted/key.gpg" | ||
export RPC_URL="https://juno-kakarot-sepolia.karnot.xyz/" | ||
export RPC_NAME="starknet-sepolia-staging" | ||
export CHECK_INTERVAL=1 | ||
export MAX_WAIT=50 | ||
export WEB3_HTTP_PROVIDER_URI="https://rpc-kakarot-sepolia-staging.karnot.xyz/" | ||
if [ -z "${STARKNET_SEPOLIA_STAGING_ACCOUNT_ADDRESS}" ]; then | ||
echo "Please provide the STARKNET_SEPOLIA_STAGING_ACCOUNT_ADDRESS environment variable." | ||
exit 1 | ||
fi | ||
if [ -z "${STARKNET_SEPOLIA_STAGING_PRIVATE_KEY}" ]; then | ||
echo "Please provide the STARKNET_SEPOLIA_STAGING_PRIVATE_KEY environment variable." | ||
exit 1 | ||
fi | ||
|
||
SKIP="--ignore tests/end_to_end/L1L2Messaging" | ||
SKIP="--ignore tests/end_to_end/L1L2Messaging --ignore tests/end_to_end/CairoPrecompiles -k 'not test_should_set_account_bytecode and not test_should_set_account_nonce and not test_should_upgrade_account_class and not test_should_raise_when_class_hash_is_not_declared and not test_should_upgrade_class_hash and not test_should_transfer_ownership and not test_should_return_transaction_count and not test_should_withdraw_all_eth'" | ||
fi | ||
|
||
# Deploy the contracts if the deploy command is provided | ||
if ${run_deploy}; then | ||
echo "Deploying the contracts to the ${ENV} environment" | ||
|
||
make setup && make build-sol && make build && make fetch-ssj-artifacts && make build-cairo1 | ||
uv run python ./kakarot_scripts/deploy_kakarot.py | ||
uv sync --all-extras --dev && make build-sol && make build | ||
uv run deploy | ||
fi | ||
|
||
# Run the tests if the test command is provided | ||
if ${run_test}; then | ||
echo "Running tests for the ${ENV} environment. Skipping: ${SKIP}" | ||
|
||
KAKAROT_ADDRESS=$(jq -r '.kakarot.address' ./deployments/kakarot-"${ENV}"/deployments.json) | ||
UNINITIALIZED_ACCOUNT_CLASS_HASH=$(jq -r '.uninitialized_account' ./deployments/kakarot-"${ENV}"/declarations.json) | ||
ACCOUNT_CONTRACT_CLASS_HASH=$(jq -r '.account_contract' ./deployments/kakarot-"${ENV}"/declarations.json) | ||
KAKAROT_ADDRESS=$(jq -r '.kakarot' ./deployments/starknet-"${ENV}"/deployments.json) | ||
UNINITIALIZED_ACCOUNT_CLASS_HASH=$(jq -r '.uninitialized_account' ./deployments/starknet-"${ENV}"/declarations.json) | ||
ACCOUNT_CONTRACT_CLASS_HASH=$(jq -r '.account_contract' ./deployments/starknet-"${ENV}"/declarations.json) | ||
|
||
export KAKAROT_ADDRESS="${KAKAROT_ADDRESS}" | ||
export UNINITIALIZED_ACCOUNT_CLASS_HASH="${UNINITIALIZED_ACCOUNT_CLASS_HASH}" | ||
|