From c00280f69f916a1a51147d4e130ea3b7a3f6d5fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Walter?= Date: Wed, 9 Oct 2024 13:13:02 +0200 Subject: [PATCH] New sepolia deployemnts (#1484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change is [Reviewable](https://reviewable.io/reviews/kkrt-labs/kakarot/1484) --- .../starknet-mainnet/declarations.json | 29 ++++++++++--------- .../starknet-sepolia/declarations.json | 20 ++++++------- deployments/starknet-sepolia/deployments.json | 8 ++--- .../starknet-sepolia/kakarot_deployments.json | 4 +-- kakarot_scripts/utils/kakarot.py | 6 ++-- kakarot_scripts/utils/starknet.py | 13 +++++---- 6 files changed, 42 insertions(+), 38 deletions(-) diff --git a/deployments/starknet-mainnet/declarations.json b/deployments/starknet-mainnet/declarations.json index f73723b6b..e91122242 100644 --- a/deployments/starknet-mainnet/declarations.json +++ b/deployments/starknet-mainnet/declarations.json @@ -1,17 +1,18 @@ { - "account_contract": "0x40c09824ef6c8bbced0385dec75e77cecec9329c6b3abbfb113cdcef0a4b7fa", - "Cairo1Helpers": "0x28ece3751ecf5bdf2d791eb64a65bfb6a8816432b698870dba2f38a36101d58", - "Cairo1HelpersFixture": "0x4e7811d9bbba41193bd3c77d05c16f7aaa55dd1d601686b50f6fa0e3766a712", - "Counter": "0x4fc47610d8c9ce0bcfc2f9e03658f0fbcd3e0a9c351a1aa59d465a33533a7c8", - "ERC20": "0x3c5ee4bc12f4247cd8071150c3f5d9bee71f40b0ef7aeae59f468d898f60933", - "EVM": "0x7ffa7cfa35add74c4d352c3e00d14ab1594d447c1725648779972756acd4d61", - "kakarot": "0x841570a0996b9c1a5548c62b1a46d40dfb0149b8151db86f6f9ce2e7953191", + "account_contract": "0x25d4b4889979f3df8171991f6a0163b42b756daebf313bcd0dec74cacf903f9", + "BalanceSender": "0x74bbbe278acf68f240004d5e38c9d12a7dea6c8d6c7e956d691509d5844be6c", + "BenchmarkCairoCalls": "0x58dc8a979af32668e05579313d1d6c672d3b668f72778780e8b2e97964159c3", + "Cairo1Helpers": "0x6c84a7ed6ee3fa25d198f058b8c8a06d9d4e4dc040efd6fa4d741f00fdc1b63", + "Cairo1HelpersFixture": "0x3810527e57a1df22d701b2c48f3d739e8fe3550876cb16435706d1448f89cbe", + "Counter": "0x27ccfaf84757dabd7885d410018bf0e264c881e4799a47f555b96bf21e5af5b", + "ERC20": "0xb36ee7670ae475d6c195e066201a526f7d850bb01961850405dcbd7aedd9bc", + "EVM": "0x586235fb226e2703fae36312476786cb6a70a5632ebcc4a5e4f9c642566f964", + "kakarot": "0x6583c98e878bb450518cccb0c667d6279cb780dc0eac1bcae883ce1e34e8771", "MockPragmaOracle": "0x675f00328ff84f127d71b179b3f3a3a06ce8432054770cddd5729c8d62866da", - "OpenzeppelinAccount": "0x6153ccf69fd20f832c794df36e19135f0070d0576144f0b47f75a226e4be530", - "replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5", + "OpenzeppelinAccount": "0x3a58e037be64a3608dfe423eeb8a77b400b0f56f1f5e0ed4937d3c873f988e2", + "replace_class": "0x451a4decb11b581b288d8a0512ab6f6ea7f1fd89caefbb415e510ec7f17efe1", "StarknetToken": "0x314a6a9f01e5a28beb6a7e2e8907243469d98a7e364054657e7593bea5dcee7", - "uninitialized_account_fixture": "0x2957ff0877441dddcd140e6af50a3d45712f4f7205a36a846110a70297036be", - "uninitialized_account": "0x45f7d0803659c3f58b5b6ba46f349178253dadabbfc6ab47fa1ba4bab4699f8", - "UniversalLibraryCaller": "0x244fd35db35b48882ca2e6c2966821bd54f302b131fb22ea98e5534da390482", - "BalanceSender": "0x566fa5364a088be0e9bb7ab51a3af985245d8a0a0afbe4fd1c046af7ad8cff8" -} + "uninitialized_account_fixture": "0x60d4817e4e3881965ff4e27a55a4a7da7bf2865c7209bdb367af2f86c740b35", + "uninitialized_account": "0x7b2de5e73ff7eb338d76c967dd5aa3f3004574d326b8c1402bb819d4983b8b6", + "UniversalLibraryCaller": "0x244fd35db35b48882ca2e6c2966821bd54f302b131fb22ea98e5534da390482" +} \ No newline at end of file diff --git a/deployments/starknet-sepolia/declarations.json b/deployments/starknet-sepolia/declarations.json index 2dd7a4290..e91122242 100644 --- a/deployments/starknet-sepolia/declarations.json +++ b/deployments/starknet-sepolia/declarations.json @@ -1,18 +1,18 @@ { - "account_contract": "0x3c64a1702579c371fc47af9231b5537ba2bfbc82834890216dc0bc5688d1810", - "BalanceSender": "0x652f09b751d24d5ccf79d24d6ddbaae7ffd1e898b036f905dfae567938e95f6", + "account_contract": "0x25d4b4889979f3df8171991f6a0163b42b756daebf313bcd0dec74cacf903f9", + "BalanceSender": "0x74bbbe278acf68f240004d5e38c9d12a7dea6c8d6c7e956d691509d5844be6c", "BenchmarkCairoCalls": "0x58dc8a979af32668e05579313d1d6c672d3b668f72778780e8b2e97964159c3", "Cairo1Helpers": "0x6c84a7ed6ee3fa25d198f058b8c8a06d9d4e4dc040efd6fa4d741f00fdc1b63", "Cairo1HelpersFixture": "0x3810527e57a1df22d701b2c48f3d739e8fe3550876cb16435706d1448f89cbe", - "Counter": "0x4fc47610d8c9ce0bcfc2f9e03658f0fbcd3e0a9c351a1aa59d465a33533a7c8", - "ERC20": "0x3c5ee4bc12f4247cd8071150c3f5d9bee71f40b0ef7aeae59f468d898f60933", - "EVM": "0x5ace47f3aa5e8082d48b8ba8c957ba51c7fd29b457408f465d27bf1c6783e21", - "kakarot": "0x764a6eff6f91d769c066a240c29ed2fa756c71cda385188a8cb1437aaeaf79f", + "Counter": "0x27ccfaf84757dabd7885d410018bf0e264c881e4799a47f555b96bf21e5af5b", + "ERC20": "0xb36ee7670ae475d6c195e066201a526f7d850bb01961850405dcbd7aedd9bc", + "EVM": "0x586235fb226e2703fae36312476786cb6a70a5632ebcc4a5e4f9c642566f964", + "kakarot": "0x6583c98e878bb450518cccb0c667d6279cb780dc0eac1bcae883ce1e34e8771", "MockPragmaOracle": "0x675f00328ff84f127d71b179b3f3a3a06ce8432054770cddd5729c8d62866da", - "OpenzeppelinAccount": "0x6153ccf69fd20f832c794df36e19135f0070d0576144f0b47f75a226e4be530", - "replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5", + "OpenzeppelinAccount": "0x3a58e037be64a3608dfe423eeb8a77b400b0f56f1f5e0ed4937d3c873f988e2", + "replace_class": "0x451a4decb11b581b288d8a0512ab6f6ea7f1fd89caefbb415e510ec7f17efe1", "StarknetToken": "0x314a6a9f01e5a28beb6a7e2e8907243469d98a7e364054657e7593bea5dcee7", - "uninitialized_account_fixture": "0x84ca495a2c045060cb2a0a0abe69d089454c41ecf6627cdc36a724618910d9", - "uninitialized_account": "0x5977621f53b7d1b129446775bd7d5a573f8a87297c6287853d52219ffb90c9", + "uninitialized_account_fixture": "0x60d4817e4e3881965ff4e27a55a4a7da7bf2865c7209bdb367af2f86c740b35", + "uninitialized_account": "0x7b2de5e73ff7eb338d76c967dd5aa3f3004574d326b8c1402bb819d4983b8b6", "UniversalLibraryCaller": "0x244fd35db35b48882ca2e6c2966821bd54f302b131fb22ea98e5534da390482" } \ No newline at end of file diff --git a/deployments/starknet-sepolia/deployments.json b/deployments/starknet-sepolia/deployments.json index a8c1a534a..b6c9e38f7 100644 --- a/deployments/starknet-sepolia/deployments.json +++ b/deployments/starknet-sepolia/deployments.json @@ -1,8 +1,8 @@ { - "kakarot": "0x78bd079b79aa45111313f200a22e5c52ff7526c746d73b65672cc28acbe2263", - "EVM": "0x6ae512c704e2fafbc06e6a6401e9ce02d534aad4bc34400fc1d8d82e88be316", - "Counter": "0x2d6741b182475b7cfc62ec1000fbcba553ea08f2e603fa2840d0288cd2d1e3c", + "kakarot": "0x1d2e513630d8120666fc6e7d52ad0c01479fd99c183baac79fff9135f46e359", + "EVM": "0x77fbe27deb2caf8199b6b385b6cd9aa57203654bca4cbe8c3aece3f3991d545", + "Counter": "0x49ef4ec31812310ea4d33b98d8e462515cf753b8f6245899d2ff3b22e07a403", "MockPragmaOracle": "0x17e64c92b06da9a331da9fd333a683a33019ae2a393254caf332d4158edc74d", "UniversalLibraryCaller": "0x4e23e34042e1f0198311e2dcfc9565c214a48261574f2b37a7f12d1f65100f1", "BenchmarkCairoCalls": "0x6ea732a6102b65dc04b54ec35304d5f27d1c3fbc81fd6810bd90b126f2e0d11" -} +} \ No newline at end of file diff --git a/deployments/starknet-sepolia/kakarot_deployments.json b/deployments/starknet-sepolia/kakarot_deployments.json index f92c8a6de..537d07c28 100644 --- a/deployments/starknet-sepolia/kakarot_deployments.json +++ b/deployments/starknet-sepolia/kakarot_deployments.json @@ -1,10 +1,10 @@ { "Bridge": { "address": "0x5fbdb2315678afecb367f032d93f642f64180aa3", - "starknet_address": "0x231fc0a786be568c112a84dfc0b44dc923d1cee902ff4903b2ef89db010ccb6" + "starknet_address": "0x31af0ca9f2991fc54f20c54c66d87dd8492066a0a38ab50faa1f4df144f36d9" }, "WETH": { "address": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512", - "starknet_address": "0x673b8462d6d2e1d1ddb8399e9a3e7a22bcbcb13e038727a8353d3ded1ab2d60" + "starknet_address": "0x50ebf948c87f34b5b491ca0f07c9a0a912fe3a11e1f0a73eff9aa5bea86304a" } } \ No newline at end of file diff --git a/kakarot_scripts/utils/kakarot.py b/kakarot_scripts/utils/kakarot.py index 79234c23c..c7590ac69 100644 --- a/kakarot_scripts/utils/kakarot.py +++ b/kakarot_scripts/utils/kakarot.py @@ -480,9 +480,9 @@ async def send_pre_eip155_transaction( await _invoke_starknet( "kakarot", "set_authorized_pre_eip155_tx", int(evm_address, 16), msg_hash ) - nonce = await _call_starknet( - "account_contract", "get_nonce", address=starknet_address - ) + nonce = ( + await _call_starknet("account_contract", "get_nonce", address=starknet_address) + ).nonce if nonce != 0: logger.info( f"ℹ️ Nonce for {evm_address} is not 0 ({nonce}), skipping transaction" diff --git a/kakarot_scripts/utils/starknet.py b/kakarot_scripts/utils/starknet.py index 3a281993c..cbd97b270 100644 --- a/kakarot_scripts/utils/starknet.py +++ b/kakarot_scripts/utils/starknet.py @@ -288,9 +288,11 @@ def get_artifact(contract_name): return Artifact(sierra=None, casm=artifacts[0]) # Cairo 1 artifacts - artifacts = list(CAIRO_DIR.glob(f"**/*{contract_name}.*.json")) or list( - BUILD_DIR_SSJ.glob(f"**/*{contract_name}.*.json") - ) + artifacts = list(BUILD_DIR_SSJ.glob(f"**/*{contract_name}.*.json")) or [ + artifact + for artifact in list(CAIRO_DIR.glob(f"**/*{contract_name}.*.json")) + if "test" not in str(artifact) + ] if artifacts: sierra, casm = ( artifacts @@ -610,8 +612,8 @@ async def execute_v1(account, calls): json=data, ) return { - "transaction_hash": response.json()["transactionHash"], - "status": response.json()["state"], + "transaction_hash": response.json()["content"]["transactionHash"], + "status": response.json()["content"]["state"], } params = _create_broadcasted_txn(transaction=transaction) @@ -656,6 +658,7 @@ async def invoke( ) else: contract = get_contract(contract_id, address=address, provider=account) + _selector_to_name[get_selector_from_name(function_name)] = function_name call = contract.functions[function_name].prepare_invoke_v1(*calldata) response = await execute_v1(account, call)