Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

test: end2end testing for staging #1173

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion deployments/kakarot-staging/declarations.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"OpenzeppelinAccount": "0x6153ccf69fd20f832c794df36e19135f0070d0576144f0b47f75a226e4be530",
"Cairo1Helpers": "0x28ece3751ecf5bdf2d791eb64a65bfb6a8816432b698870dba2f38a36101d58",
"Cairo1HelpersFixture": "0x4e7811d9bbba41193bd3c77d05c16f7aaa55dd1d601686b50f6fa0e3766a712",
"replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5"
"replace_class": "0xa187318c5e79b010cf45975f589f0a8d441fadde5b1e7ccad46501568437b5",
"Counter": "0x2abf5b9916d3c6ae6000ab239bf5aba8b40d9a1750ffc54b6d281ac83137382"
}
10 changes: 10 additions & 0 deletions deployments/kakarot-staging/deployments.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,15 @@
"address": "0x2824d6ed6759ac4c4a54a39b78d04c0e48be8937237026bf8c3bf46a8bea722",
"tx": "0x1f45a18adeb4392601cba7e3fd5683bac007378cede633fe6df0b5c95267e9d",
"artifact": "build/kakarot.json"
},
"EVM": {
"address": "0x3c710d6ea68220a3c5f39e7728f24ebcd178d38e4135474bd66c34297b89b0",
"tx": "0x72ce89a5f301b8767248039a6e78e9caca4c666765136240225ac01468b5a8a",
"artifact": "build/fixtures/EVM.json"
},
"Counter": {
"address": "0x3735b9c1dfd45b40149c0227b9981b6dbd14168d5f0f9a1c7a7b3faad9cd630",
"tx": "0x4b135a5df36ac6446be7a8b6bed8ba991377db19c9b375c19434ff6c25ef1f1",
"artifact": "build/fixtures/Counter.json"
}
}
29 changes: 16 additions & 13 deletions kakarot_scripts/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
logger.setLevel(logging.INFO)
load_dotenv()

# Hardcode block gas limit to 20M
BLOCK_GAS_LIMIT = 20_000_000
# Hardcode block gas limit to 7M
BLOCK_GAS_LIMIT = 7_000_000

BEACON_ROOT_ADDRESS = "0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02"

Expand Down Expand Up @@ -131,18 +131,21 @@
WEB3 = Web3()

try:
response = requests.post(
RPC_CLIENT.url,
json={
"jsonrpc": "2.0",
"method": "starknet_chainId",
"params": [],
"id": 0,
},
)
payload = json.loads(response.text)
if WEB3.is_connected():
chain_id = WEB3.eth.chain_id
else:
response = requests.post(
RPC_CLIENT.url,
json={
"jsonrpc": "2.0",
"method": "starknet_chainId",
"params": [],
"id": 0,
},
)
payload = json.loads(response.text)

chain_id = int(payload["result"], 16)
chain_id = int(payload["result"], 16)
except (
requests.exceptions.ConnectionError,
requests.exceptions.MissingSchema,
Expand Down
4 changes: 2 additions & 2 deletions tests/end_to_end/bytecodes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from kakarot_scripts.constants import COINBASE, NETWORK
from kakarot_scripts.constants import BLOCK_GAS_LIMIT, COINBASE, NETWORK

test_cases = [
{
Expand Down Expand Up @@ -931,7 +931,7 @@
"value": 0,
"code": "4500",
"calldata": "",
"stack": "20000000",
"stack": str(BLOCK_GAS_LIMIT),
"memory": "",
"return_data": "",
"success": 1,
Expand Down
Loading