Skip to content

Commit

Permalink
fix: end 2 end staging (#1190)
Browse files Browse the repository at this point in the history
<!--- Please provide a general summary of your changes in the title
above -->

<!-- Give an estimate of the time you spent on this PR in terms of work
days.
Did you spend 0.5 days on this PR or rather 2 days?  -->

Time spent on this PR: 0.4 day

## Pull request type

<!-- Please try to limit your pull request to one type,
submit multiple pull requests if needed. -->

Please check the type of change your PR introduces:

- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [x] Other (please describe): staging

## What is the current behavior?
Some of the tests are failing on staging. Upgrade is also failing on
staging.

Resolves #NA

## What is the new behavior?
- Fix failing tests
- Fix upgrade flow
- linting

<!-- Reviewable:start -->
- - -
This change is [<img src="https://reviewable.io/review_button.svg"
height="34" align="absmiddle"
alt="Reviewable"/>](https://reviewable.io/reviews/kkrt-labs/kakarot/1190)
<!-- Reviewable:end -->
  • Loading branch information
greged93 committed Jun 7, 2024
1 parent 0cf51c2 commit 5660664
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 15 deletions.
7 changes: 3 additions & 4 deletions deployments/kakarot-staging/declarations.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
{
"kakarot": "0x62ec1206e3414e42e0307c224b123ec72dc5e836784a3a30acfce4df6d6adeb",
"kakarot": "0x7a4394ca8608f89bb947e81d364e18a3651369c67ec1f008ae2b9fae3dee69a",
"account_contract": "0x1276d0b017701646f8646b69de6c3b3584edce71879678a679f28c07a9971cf",
"account_contract_fixture": "0x3a247bfdb923a0e950871336d9ffd9d1d052ef79ce31909954f5c2e81e77e00",
"uninitialized_account": "0x600f6862938312a05a0cfecba0dcaf37693efc9e4075a6adfb62e196022678e",
"EVM": "0x1e86af8bd14b5a8ca212ec28c066061acbd5b2cfd923cd9403a242503f7819e",
"EVM": "0x7f14daf9420729ca261433e62404b0415c308e15f7f6fc576f665110e2ac8b9",
"OpenzeppelinAccount": "0x6153ccf69fd20f832c794df36e19135f0070d0576144f0b47f75a226e4be530",
"Cairo1Helpers": "0x28ece3751ecf5bdf2d791eb64a65bfb6a8816432b698870dba2f38a36101d58",
"Cairo1HelpersFixture": "0x4e7811d9bbba41193bd3c77d05c16f7aaa55dd1d601686b50f6fa0e3766a712",
"replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5",
"Counter": "0x2abf5b9916d3c6ae6000ab239bf5aba8b40d9a1750ffc54b6d281ac83137382"
"replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5"
}
4 changes: 2 additions & 2 deletions deployments/kakarot-staging/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"artifact": "build/kakarot.json"
},
"EVM": {
"address": "0x3c710d6ea68220a3c5f39e7728f24ebcd178d38e4135474bd66c34297b89b0",
"tx": "0x72ce89a5f301b8767248039a6e78e9caca4c666765136240225ac01468b5a8a",
"address": "0x75902a70542cd56454643f9c3fead34d3acb77012ed4c4a0356bcd044a73dc4",
"tx": "0x40c861ad7dcb7a5fd90f0d3164c99c6e6e9d746820f9a0fa34f98d2f9c22bdc",
"artifact": "build/fixtures/EVM.json"
},
"Counter": {
Expand Down
6 changes: 3 additions & 3 deletions kakarot_scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
"name": "kakarot-staging",
"explorer_url": "",
"rpc_url": os.getenv("KAKAROT_STAGING_RPC_URL"),
"devnet": False,
"check_interval": 6,
"max_wait": 360,
"devnet": True,
"check_interval": 1,
"max_wait": 30,
},
}

Expand Down
2 changes: 1 addition & 1 deletion kakarot_scripts/deploy_kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ async def main():
await invoke(
"kakarot",
"set_cairo1_helpers_class_hash",
class_hash["uninitialized_account"],
class_hash["Cairo1Helpers"],
)
else:
logger.info("✅ Kakarot already up to date.")
Expand Down
6 changes: 3 additions & 3 deletions kakarot_scripts/utils/kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ async def deploy(
contract = get_contract(contract_app, contract_name, caller_eoa=caller_eoa)
max_fee = kwargs.pop("max_fee", None)
value = kwargs.pop("value", 0)
receipt, response, success, gas_used = await eth_send_transaction(
receipt, response, success, _ = await eth_send_transaction(
to=0,
gas=int(TRANSACTION_GAS_LIMIT),
data=contract.constructor(*args, **kwargs).data_in_transaction,
Expand Down Expand Up @@ -505,11 +505,11 @@ async def store_bytecode(bytecode: Union[str, bytes], **kwargs):
{RETURN}
{bytecode.hex()}"""
)
receipt, response, success, gas_used = await eth_send_transaction(
_, response, success, _ = await eth_send_transaction(
to=0, data=deploy_bytecode, **kwargs
)
assert success
starknet_address, evm_address = response
_, evm_address = response
stored_bytecode = await eth_get_code(evm_address)
assert stored_bytecode == bytecode
return evm_address
Expand Down
2 changes: 1 addition & 1 deletion kakarot_scripts/utils/starknet.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ async def get_starknet_account(
calldata=[],
)
public_key = (
await RPC_CLIENT.call_contract(call=call, block_hash="latest")
await RPC_CLIENT.call_contract(call=call, block_hash="pending")
)[0]
break
except Exception as err:
Expand Down
1 change: 0 additions & 1 deletion tests/end_to_end/test_kakarot.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ async def test_eth_call_should_succeed(
assert result.gas_used == 21_000

class TestUpgrade:

async def test_should_raise_when_caller_is_not_owner(
self, starknet, kakarot, invoke, other, class_hashes
):
Expand Down

0 comments on commit 5660664

Please sign in to comment.