From 20387c132d8369e6582953e8f0378fece9a6916d Mon Sep 17 00:00:00 2001 From: whichqua Date: Fri, 8 Nov 2024 14:51:38 +0300 Subject: [PATCH 1/5] test: add a reproduction of the bug encountered --- .../compiled/test_proxy_account_compiled.json | 2319 ++++++++++++++++ .../cairo0/compiled/test_proxy_compiled.json | 2448 +++++++++++++++++ .../feature_contracts/cairo0/test_proxy.cairo | 112 + .../cairo0/test_proxy_account.cairo | 98 + tests/integration/deploy_txn_tests.rs | 70 + 5 files changed, 5047 insertions(+) create mode 100644 tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_account_compiled.json create mode 100644 tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_compiled.json create mode 100644 tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy.cairo create mode 100644 tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy_account.cairo diff --git a/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_account_compiled.json b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_account_compiled.json new file mode 100644 index 00000000..2a069452 --- /dev/null +++ b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_account_compiled.json @@ -0,0 +1,2319 @@ +{ + "abi": [ + { + "members": [ + { + "name": "to", + "offset": 0, + "type": "felt" + }, + { + "name": "selector", + "offset": 1, + "type": "felt" + }, + { + "name": "data_offset", + "offset": 2, + "type": "felt" + }, + { + "name": "data_len", + "offset": 3, + "type": "felt" + } + ], + "name": "CallArray", + "size": 4, + "type": "struct" + }, + { + "inputs": [ + { + "name": "call_array_len", + "type": "felt" + }, + { + "name": "call_array", + "type": "CallArray*" + }, + { + "name": "calldata_len", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "__validate__", + "outputs": [], + "type": "function" + }, + { + "inputs": [ + { + "name": "call_array_len", + "type": "felt" + }, + { + "name": "call_array", + "type": "CallArray*" + }, + { + "name": "calldata_len", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "__execute__", + "outputs": [ + { + "name": "retdata_size", + "type": "felt" + }, + { + "name": "retdata", + "type": "felt*" + } + ], + "type": "function" + }, + { + "inputs": [ + { + "name": "class_hash", + "type": "felt" + } + ], + "name": "__validate_declare__", + "outputs": [], + "type": "function" + }, + { + "inputs": [ + { + "name": "selector", + "type": "felt" + }, + { + "name": "calldata_size", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "__validate_deploy__", + "outputs": [], + "type": "function" + }, + { + "inputs": [ + { + "name": "arg1", + "type": "felt" + }, + { + "name": "arg2", + "type": "felt" + } + ], + "name": "foo", + "outputs": [], + "type": "function" + } + ], + "entry_points_by_type": { + "CONSTRUCTOR": [], + "EXTERNAL": [ + { + "offset": 87, + "selector": "0x15d40a3d6ca2ac30f4031e42be28da9b056fef9bb7357ac5e85627ee876e5ad" + }, + { + "offset": 34, + "selector": "0x162da33a4585851fe8d3af3c2a9c60b557814e221e0d4f30ff0b2189d9c7775" + }, + { + "offset": 189, + "selector": "0x1b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d" + }, + { + "offset": 130, + "selector": "0x289da278a8dc833409cabfdad1581e8e7d40e42dcaed693fa4008dcdb4963b3" + }, + { + "offset": 166, + "selector": "0x36fcbf06cd96843058359e1a75928beacfac10727dab22a3972f0af8aa92895" + } + ], + "L1_HANDLER": [] + }, + "program": { + "attributes": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__main__.__validate_deploy__" + ], + "end_pc": 161, + "flow_tracking_data": { + "ap_tracking": { + "group": 10, + "offset": 6 + }, + "reference_ids": {} + }, + "name": "error_message", + "start_pc": 155, + "value": "assertion failed" + } + ], + "builtins": [ + "pedersen", + "range_check", + "ecdsa" + ], + "compiler_version": "0.13.2", + "data": [ + "0x40780017fff7fff", + "0x1", + "0x208b7fff7fff7ffe", + "0x20780017fff7ffd", + "0x3", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480080007fff8000", + "0x400080007ffd7fff", + "0x482480017ffd8001", + "0x1", + "0x482480017ffd8001", + "0x1", + "0xa0680017fff7ffe", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb", + "0x402a7ffc7ffd7fff", + "0x208b7fff7fff7ffe", + "0x480680017fff8000", + "0x4765745478496e666f", + "0x400280007ffd7fff", + "0x482680017ffd8000", + "0x2", + "0x480280017ffd8000", + "0x208b7fff7fff7ffe", + "0x400380007ffc7ffd", + "0x482680017ffc8000", + "0x1", + "0x208b7fff7fff7ffe", + "0x480a7ff67fff8000", + "0x480a7ff77fff8000", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x208b7fff7fff7ffe", + "0x480280027ffb8000", + "0x480280007ffd8000", + "0x400080007ffe7fff", + "0x482680017ffd8000", + "0x1", + "0x480280007ffd8000", + "0x484480017fff8000", + "0x4", + "0x48307fff7ffd8000", + "0x480280027ffb8000", + "0x480080007ffe8000", + "0x400080017ffe7fff", + "0x482480017ffd8000", + "0x1", + "0x480080007ffc8000", + "0x48307fff7ffe8000", + "0x402a7ffd7ffc7fff", + "0x480280027ffb8000", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280037ffb8000", + "0x482480017ffc8000", + "0x2", + "0x480280007ffd8000", + "0x482680017ffd8000", + "0x1", + "0x480080007ff38000", + "0x482480017ff28000", + "0x1", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffdf", + "0x40780017fff7fff", + "0x1", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x48127ffc7fff8000", + "0x48127ffa7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x0", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffb4", + "0x480a7ff67fff8000", + "0x480a7ff77fff8000", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x480280027ffb8000", + "0x480280007ffd8000", + "0x400080007ffe7fff", + "0x482680017ffd8000", + "0x1", + "0x480280007ffd8000", + "0x484480017fff8000", + "0x4", + "0x48307fff7ffd8000", + "0x480280027ffb8000", + "0x480080007ffe8000", + "0x400080017ffe7fff", + "0x482480017ffd8000", + "0x1", + "0x480080007ffc8000", + "0x48307fff7ffe8000", + "0x402a7ffd7ffc7fff", + "0x480280027ffb8000", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280037ffb8000", + "0x482480017ffc8000", + "0x2", + "0x480280007ffd8000", + "0x482680017ffd8000", + "0x1", + "0x480080007ff38000", + "0x482480017ff28000", + "0x1", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffd8", + "0x48127ffa7fff8000", + "0x48127ffa7fff8000", + "0x48127ffb7fff8000", + "0x48127ff97fff8000", + "0x48127ffa7fff8000", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ff97fff8000", + "0x480a7ffa7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x1", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280037ffb8000", + "0x480280027ffb8000", + "0x480280007ffd8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff4", + "0x40780017fff7fff", + "0x1", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x48127ffc7fff8000", + "0x48127ffa7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x0", + "0x480a7ff77fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff7a", + "0x480080037fff8000", + "0x480a7ffa7fff8000", + "0x482480017ffe8000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffff", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff7b", + "0x48127ff87fff8000", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x48127ffc7fff8000", + "0x208b7fff7fff7ffe", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280037ffb8000", + "0x480280027ffb8000", + "0x480a7ffa7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffea", + "0x40780017fff7fff", + "0x1", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x48127ffc7fff8000", + "0x48127ffa7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ff97fff8000", + "0x480a7ffa7fff8000", + "0x480a7ffb7fff8000", + "0x208b7fff7fff7ffe", + "0x482680017ffd8000", + "0x2", + "0x402a7ffd7ffc7fff", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x480280007ffd8000", + "0x480280017ffd8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff5", + "0x40780017fff7fff", + "0x1", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480280037ffb8000", + "0x480680017fff8000", + "0x0", + "0x48127ffa7fff8000", + "0x208b7fff7fff7ffe" + ], + "debug_info": null, + "hints": { + "0": [ + { + "accessible_scopes": [ + "starkware.cairo.common.alloc", + "starkware.cairo.common.alloc.alloc" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 0, + "offset": 0 + }, + "reference_ids": {} + } + } + ], + "6": [ + { + "accessible_scopes": [ + "starkware.cairo.common.memcpy", + "starkware.cairo.common.memcpy.memcpy" + ], + "code": "vm_enter_scope({'n': ids.len})", + "flow_tracking_data": { + "ap_tracking": { + "group": 1, + "offset": 0 + }, + "reference_ids": { + "starkware.cairo.common.memcpy.memcpy.len": 0 + } + } + } + ], + "14": [ + { + "accessible_scopes": [ + "starkware.cairo.common.memcpy", + "starkware.cairo.common.memcpy.memcpy" + ], + "code": "n -= 1\nids.continue_copying = 1 if n > 0 else 0", + "flow_tracking_data": { + "ap_tracking": { + "group": 1, + "offset": 5 + }, + "reference_ids": { + "starkware.cairo.common.memcpy.memcpy.continue_copying": 1 + } + } + } + ], + "17": [ + { + "accessible_scopes": [ + "starkware.cairo.common.memcpy", + "starkware.cairo.common.memcpy.memcpy" + ], + "code": "vm_exit_scope()", + "flow_tracking_data": { + "ap_tracking": { + "group": 1, + "offset": 6 + }, + "reference_ids": {} + } + } + ], + "21": [ + { + "accessible_scopes": [ + "starkware.starknet.common.syscalls", + "starkware.starknet.common.syscalls.get_tx_info" + ], + "code": "syscall_handler.get_tx_info(segments=segments, syscall_ptr=ids.syscall_ptr)", + "flow_tracking_data": { + "ap_tracking": { + "group": 2, + "offset": 1 + }, + "reference_ids": { + "starkware.starknet.common.syscalls.get_tx_info.syscall_ptr": 2 + } + } + } + ], + "25": [ + { + "accessible_scopes": [ + "starkware.cairo.common.math", + "starkware.cairo.common.math.assert_nn" + ], + "code": "from starkware.cairo.common.math_utils import assert_integer\nassert_integer(ids.a)\nassert 0 <= ids.a % PRIME < range_check_builtin.bound, f'a = {ids.a} is out of range.'", + "flow_tracking_data": { + "ap_tracking": { + "group": 3, + "offset": 0 + }, + "reference_ids": { + "starkware.cairo.common.math.assert_nn.a": 3 + } + } + } + ], + "65": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.__validate__" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 5, + "offset": 26 + }, + "reference_ids": {} + } + } + ], + "140": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.__validate_declare__" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 9, + "offset": 12 + }, + "reference_ids": {} + } + } + ], + "175": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.__validate_deploy__" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 11, + "offset": 25 + }, + "reference_ids": {} + } + } + ], + "199": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.foo" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 13, + "offset": 11 + }, + "reference_ids": {} + } + } + ] + }, + "identifiers": { + "__main__.Call": { + "full_name": "__main__.Call", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_len": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 1 + }, + "to": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.CallArray": { + "full_name": "__main__.CallArray", + "members": { + "data_len": { + "cairo_type": "felt", + "offset": 3 + }, + "data_offset": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 1 + }, + "to": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.HashBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "type": "alias" + }, + "__main__.SignatureBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.SignatureBuiltin", + "type": "alias" + }, + "__main__.__execute__": { + "decorators": [ + "external", + "raw_output" + ], + "pc": 75, + "type": "function" + }, + "__main__.__execute__.Args": { + "full_name": "__main__.__execute__.Args", + "members": { + "call_array": { + "cairo_type": "__main__.CallArray*", + "offset": 1 + }, + "call_array_len": { + "cairo_type": "felt", + "offset": 0 + }, + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_len": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__execute__.ImplicitArgs": { + "full_name": "__main__.__execute__.ImplicitArgs", + "members": { + "ecdsa_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.SignatureBuiltin*", + "offset": 2 + }, + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 3 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__execute__.Return": { + "cairo_type": "(retdata_size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__main__.__execute__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.__validate__": { + "decorators": [ + "external" + ], + "pc": 29, + "type": "function" + }, + "__main__.__validate__.Args": { + "full_name": "__main__.__validate__.Args", + "members": { + "call_array": { + "cairo_type": "__main__.CallArray*", + "offset": 1 + }, + "call_array_len": { + "cairo_type": "felt", + "offset": 0 + }, + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_len": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__validate__.ImplicitArgs": { + "full_name": "__main__.__validate__.ImplicitArgs", + "members": { + "ecdsa_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.SignatureBuiltin*", + "offset": 2 + }, + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 3 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__validate__.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.__validate__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.__validate_declare__": { + "decorators": [ + "external" + ], + "pc": 125, + "type": "function" + }, + "__main__.__validate_declare__.Args": { + "full_name": "__main__.__validate_declare__.Args", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__.__validate_declare__.ImplicitArgs": { + "full_name": "__main__.__validate_declare__.ImplicitArgs", + "members": { + "ecdsa_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.SignatureBuiltin*", + "offset": 2 + }, + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 3 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__validate_declare__.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.__validate_declare__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.__validate_deploy__": { + "decorators": [ + "raw_input", + "external" + ], + "pc": 150, + "type": "function" + }, + "__main__.__validate_deploy__.Args": { + "full_name": "__main__.__validate_deploy__.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 2 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.__validate_deploy__.ImplicitArgs": { + "full_name": "__main__.__validate_deploy__.ImplicitArgs", + "members": { + "ecdsa_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.SignatureBuiltin*", + "offset": 2 + }, + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 3 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.__validate_deploy__.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.__validate_deploy__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.alloc": { + "destination": "starkware.cairo.common.alloc.alloc", + "type": "alias" + }, + "__main__.assert_nn": { + "destination": "starkware.cairo.common.math.assert_nn", + "type": "alias" + }, + "__main__.foo": { + "decorators": [ + "external" + ], + "pc": 185, + "type": "function" + }, + "__main__.foo.Args": { + "full_name": "__main__.foo.Args", + "members": { + "arg1": { + "cairo_type": "felt", + "offset": 0 + }, + "arg2": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "__main__.foo.ImplicitArgs": { + "full_name": "__main__.foo.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.foo.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.foo.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.get_tx_info": { + "destination": "starkware.starknet.common.syscalls.get_tx_info", + "type": "alias" + }, + "__main__.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.__execute__": { + "decorators": [ + "external", + "raw_output" + ], + "pc": 87, + "type": "function" + }, + "__wrappers__.__execute__.Args": { + "full_name": "__wrappers__.__execute__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__execute__.ImplicitArgs": { + "full_name": "__wrappers__.__execute__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__execute__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, ecdsa_ptr: starkware.cairo.common.cairo_builtins.SignatureBuiltin*, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__execute__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__execute__.__wrapped_func": { + "destination": "__main__.__execute__", + "type": "alias" + }, + "__wrappers__.__execute___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.__validate__": { + "decorators": [ + "external" + ], + "pc": 34, + "type": "function" + }, + "__wrappers__.__validate__.Args": { + "full_name": "__wrappers__.__validate__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate__.ImplicitArgs": { + "full_name": "__wrappers__.__validate__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, ecdsa_ptr: starkware.cairo.common.cairo_builtins.SignatureBuiltin*, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__validate__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__validate__.__wrapped_func": { + "destination": "__main__.__validate__", + "type": "alias" + }, + "__wrappers__.__validate___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.__validate_declare__": { + "decorators": [ + "external" + ], + "pc": 130, + "type": "function" + }, + "__wrappers__.__validate_declare__.Args": { + "full_name": "__wrappers__.__validate_declare__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate_declare__.ImplicitArgs": { + "full_name": "__wrappers__.__validate_declare__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate_declare__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, ecdsa_ptr: starkware.cairo.common.cairo_builtins.SignatureBuiltin*, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__validate_declare__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__validate_declare__.__wrapped_func": { + "destination": "__main__.__validate_declare__", + "type": "alias" + }, + "__wrappers__.__validate_declare___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.__validate_deploy__": { + "decorators": [ + "raw_input", + "external" + ], + "pc": 166, + "type": "function" + }, + "__wrappers__.__validate_deploy__.Args": { + "full_name": "__wrappers__.__validate_deploy__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate_deploy__.ImplicitArgs": { + "full_name": "__wrappers__.__validate_deploy__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__validate_deploy__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, ecdsa_ptr: starkware.cairo.common.cairo_builtins.SignatureBuiltin*, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__validate_deploy__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__validate_deploy__.__wrapped_func": { + "destination": "__main__.__validate_deploy__", + "type": "alias" + }, + "__wrappers__.__validate_deploy___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.foo": { + "decorators": [ + "external" + ], + "pc": 189, + "type": "function" + }, + "__wrappers__.foo.Args": { + "full_name": "__wrappers__.foo.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.foo.ImplicitArgs": { + "full_name": "__wrappers__.foo.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.foo.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, ecdsa_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.foo.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.foo.__wrapped_func": { + "destination": "__main__.foo", + "type": "alias" + }, + "__wrappers__.foo_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "starkware.cairo.common.alloc.alloc": { + "decorators": [], + "pc": 0, + "type": "function" + }, + "starkware.cairo.common.alloc.alloc.Args": { + "full_name": "starkware.cairo.common.alloc.alloc.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "starkware.cairo.common.alloc.alloc.ImplicitArgs": { + "full_name": "starkware.cairo.common.alloc.alloc.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "starkware.cairo.common.alloc.alloc.Return": { + "cairo_type": "(ptr: felt*)", + "type": "type_definition" + }, + "starkware.cairo.common.alloc.alloc.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.bool.FALSE": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.bool.TRUE": { + "type": "const", + "value": 1 + }, + "starkware.cairo.common.cairo_builtins.BitwiseBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin", + "members": { + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "x_and_y": { + "cairo_type": "felt", + "offset": 2 + }, + "x_or_y": { + "cairo_type": "felt", + "offset": 4 + }, + "x_xor_y": { + "cairo_type": "felt", + "offset": 3 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.EcOpBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.EcOpBuiltin", + "members": { + "m": { + "cairo_type": "felt", + "offset": 4 + }, + "p": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 0 + }, + "q": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 2 + }, + "r": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.EcPoint": { + "destination": "starkware.cairo.common.ec_point.EcPoint", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.HashBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "members": { + "result": { + "cairo_type": "felt", + "offset": 2 + }, + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.KeccakBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.KeccakBuiltin", + "members": { + "input": { + "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "offset": 0 + }, + "output": { + "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "offset": 8 + } + }, + "size": 16, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.KeccakBuiltinState": { + "destination": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.ModBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.ModBuiltin", + "members": { + "n": { + "cairo_type": "felt", + "offset": 6 + }, + "offsets_ptr": { + "cairo_type": "felt*", + "offset": 5 + }, + "p": { + "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384", + "offset": 0 + }, + "values_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384*", + "offset": 4 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.PoseidonBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin", + "members": { + "input": { + "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "offset": 0 + }, + "output": { + "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "offset": 3 + } + }, + "size": 6, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.PoseidonBuiltinState": { + "destination": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.SignatureBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.SignatureBuiltin", + "members": { + "message": { + "cairo_type": "felt", + "offset": 1 + }, + "pub_key": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.UInt384": { + "full_name": "starkware.cairo.common.cairo_builtins.UInt384", + "members": { + "d0": { + "cairo_type": "felt", + "offset": 0 + }, + "d1": { + "cairo_type": "felt", + "offset": 1 + }, + "d2": { + "cairo_type": "felt", + "offset": 2 + }, + "d3": { + "cairo_type": "felt", + "offset": 3 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.cairo.common.dict_access.DictAccess": { + "full_name": "starkware.cairo.common.dict_access.DictAccess", + "members": { + "key": { + "cairo_type": "felt", + "offset": 0 + }, + "new_value": { + "cairo_type": "felt", + "offset": 2 + }, + "prev_value": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.cairo.common.ec_point.EcPoint": { + "full_name": "starkware.cairo.common.ec_point.EcPoint", + "members": { + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.hash.HashBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "type": "alias" + }, + "starkware.cairo.common.keccak_state.KeccakBuiltinState": { + "full_name": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "members": { + "s0": { + "cairo_type": "felt", + "offset": 0 + }, + "s1": { + "cairo_type": "felt", + "offset": 1 + }, + "s2": { + "cairo_type": "felt", + "offset": 2 + }, + "s3": { + "cairo_type": "felt", + "offset": 3 + }, + "s4": { + "cairo_type": "felt", + "offset": 4 + }, + "s5": { + "cairo_type": "felt", + "offset": 5 + }, + "s6": { + "cairo_type": "felt", + "offset": 6 + }, + "s7": { + "cairo_type": "felt", + "offset": 7 + } + }, + "size": 8, + "type": "struct" + }, + "starkware.cairo.common.math.FALSE": { + "destination": "starkware.cairo.common.bool.FALSE", + "type": "alias" + }, + "starkware.cairo.common.math.TRUE": { + "destination": "starkware.cairo.common.bool.TRUE", + "type": "alias" + }, + "starkware.cairo.common.math.assert_nn": { + "decorators": [], + "pc": 25, + "type": "function" + }, + "starkware.cairo.common.math.assert_nn.Args": { + "full_name": "starkware.cairo.common.math.assert_nn.Args", + "members": { + "a": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn.ImplicitArgs": { + "full_name": "starkware.cairo.common.math.assert_nn.ImplicitArgs", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_nn.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.math.assert_nn.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.math.assert_nn.a": { + "cairo_type": "felt", + "full_name": "starkware.cairo.common.math.assert_nn.a", + "references": [ + { + "ap_tracking_data": { + "group": 3, + "offset": 0 + }, + "pc": 25, + "value": "[cast(fp + (-3), felt*)]" + } + ], + "type": "reference" + }, + "starkware.cairo.common.memcpy.memcpy": { + "decorators": [], + "pc": 3, + "type": "function" + }, + "starkware.cairo.common.memcpy.memcpy.Args": { + "full_name": "starkware.cairo.common.memcpy.memcpy.Args", + "members": { + "dst": { + "cairo_type": "felt*", + "offset": 0 + }, + "len": { + "cairo_type": "felt", + "offset": 2 + }, + "src": { + "cairo_type": "felt*", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.cairo.common.memcpy.memcpy.ImplicitArgs": { + "full_name": "starkware.cairo.common.memcpy.memcpy.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "starkware.cairo.common.memcpy.memcpy.LoopFrame": { + "full_name": "starkware.cairo.common.memcpy.memcpy.LoopFrame", + "members": { + "dst": { + "cairo_type": "felt*", + "offset": 0 + }, + "src": { + "cairo_type": "felt*", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.memcpy.memcpy.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.memcpy.memcpy.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.memcpy.memcpy.continue_copying": { + "cairo_type": "felt", + "full_name": "starkware.cairo.common.memcpy.memcpy.continue_copying", + "references": [ + { + "ap_tracking_data": { + "group": 1, + "offset": 3 + }, + "pc": 10, + "value": "[cast(ap, felt*)]" + } + ], + "type": "reference" + }, + "starkware.cairo.common.memcpy.memcpy.len": { + "cairo_type": "felt", + "full_name": "starkware.cairo.common.memcpy.memcpy.len", + "references": [ + { + "ap_tracking_data": { + "group": 1, + "offset": 0 + }, + "pc": 3, + "value": "[cast(fp + (-3), felt*)]" + } + ], + "type": "reference" + }, + "starkware.cairo.common.memcpy.memcpy.loop": { + "pc": 8, + "type": "label" + }, + "starkware.cairo.common.poseidon_state.PoseidonBuiltinState": { + "full_name": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "members": { + "s0": { + "cairo_type": "felt", + "offset": 0 + }, + "s1": { + "cairo_type": "felt", + "offset": 1 + }, + "s2": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.storage.ADDR_BOUND": { + "type": "const", + "value": -106710729501573572985208420194530329073740042555888586719489 + }, + "starkware.starknet.common.storage.MAX_STORAGE_ITEM_SIZE": { + "type": "const", + "value": 256 + }, + "starkware.starknet.common.storage.assert_250_bit": { + "destination": "starkware.cairo.common.math.assert_250_bit", + "type": "alias" + }, + "starkware.starknet.common.syscalls.CALL_CONTRACT_SELECTOR": { + "type": "const", + "value": 20853273475220472486191784820 + }, + "starkware.starknet.common.syscalls.CallContract": { + "full_name": "starkware.starknet.common.syscalls.CallContract", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractResponse", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.starknet.common.syscalls.CallContractRequest": { + "full_name": "starkware.starknet.common.syscalls.CallContractRequest", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "contract_address": { + "cairo_type": "felt", + "offset": 1 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.CallContractResponse": { + "full_name": "starkware.starknet.common.syscalls.CallContractResponse", + "members": { + "retdata": { + "cairo_type": "felt*", + "offset": 1 + }, + "retdata_size": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DELEGATE_CALL_SELECTOR": { + "type": "const", + "value": 21167594061783206823196716140 + }, + "starkware.starknet.common.syscalls.DELEGATE_L1_HANDLER_SELECTOR": { + "type": "const", + "value": 23274015802972845247556842986379118667122 + }, + "starkware.starknet.common.syscalls.DEPLOY_SELECTOR": { + "type": "const", + "value": 75202468540281 + }, + "starkware.starknet.common.syscalls.Deploy": { + "full_name": "starkware.starknet.common.syscalls.Deploy", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.DeployRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.DeployResponse", + "offset": 6 + } + }, + "size": 9, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DeployRequest": { + "full_name": "starkware.starknet.common.syscalls.DeployRequest", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "constructor_calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "constructor_calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "contract_address_salt": { + "cairo_type": "felt", + "offset": 2 + }, + "deploy_from_zero": { + "cairo_type": "felt", + "offset": 5 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 6, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DeployResponse": { + "full_name": "starkware.starknet.common.syscalls.DeployResponse", + "members": { + "constructor_retdata": { + "cairo_type": "felt*", + "offset": 2 + }, + "constructor_retdata_size": { + "cairo_type": "felt", + "offset": 1 + }, + "contract_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DictAccess": { + "destination": "starkware.cairo.common.dict_access.DictAccess", + "type": "alias" + }, + "starkware.starknet.common.syscalls.EMIT_EVENT_SELECTOR": { + "type": "const", + "value": 1280709301550335749748 + }, + "starkware.starknet.common.syscalls.EmitEvent": { + "full_name": "starkware.starknet.common.syscalls.EmitEvent", + "members": { + "data": { + "cairo_type": "felt*", + "offset": 4 + }, + "data_len": { + "cairo_type": "felt", + "offset": 3 + }, + "keys": { + "cairo_type": "felt*", + "offset": 2 + }, + "keys_len": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GET_BLOCK_NUMBER_SELECTOR": { + "type": "const", + "value": 1448089106835523001438702345020786 + }, + "starkware.starknet.common.syscalls.GET_BLOCK_TIMESTAMP_SELECTOR": { + "type": "const", + "value": 24294903732626645868215235778792757751152 + }, + "starkware.starknet.common.syscalls.GET_CALLER_ADDRESS_SELECTOR": { + "type": "const", + "value": 94901967781393078444254803017658102643 + }, + "starkware.starknet.common.syscalls.GET_CONTRACT_ADDRESS_SELECTOR": { + "type": "const", + "value": 6219495360805491471215297013070624192820083 + }, + "starkware.starknet.common.syscalls.GET_SEQUENCER_ADDRESS_SELECTOR": { + "type": "const", + "value": 1592190833581991703053805829594610833820054387 + }, + "starkware.starknet.common.syscalls.GET_TX_INFO_SELECTOR": { + "type": "const", + "value": 1317029390204112103023 + }, + "starkware.starknet.common.syscalls.GET_TX_SIGNATURE_SELECTOR": { + "type": "const", + "value": 1448089128652340074717162277007973 + }, + "starkware.starknet.common.syscalls.GetBlockNumber": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumber", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockNumberRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockNumberResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockNumberRequest": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumberRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockNumberResponse": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumberResponse", + "members": { + "block_number": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestamp": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestamp", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockTimestampRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockTimestampResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestampRequest": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestampRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestampResponse": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestampResponse", + "members": { + "block_timestamp": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddress": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetCallerAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetCallerAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddressResponse", + "members": { + "caller_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddress": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetContractAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetContractAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddressResponse", + "members": { + "contract_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddress": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetSequencerAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetSequencerAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddressResponse", + "members": { + "sequencer_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfo": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfo", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxInfoRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxInfoResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfoRequest": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfoRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfoResponse": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfoResponse", + "members": { + "tx_info": { + "cairo_type": "starkware.starknet.common.syscalls.TxInfo*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignature": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignature", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxSignatureRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxSignatureResponse", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignatureRequest": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignatureRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignatureResponse": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignatureResponse", + "members": { + "signature": { + "cairo_type": "felt*", + "offset": 1 + }, + "signature_len": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.LIBRARY_CALL_L1_HANDLER_SELECTOR": { + "type": "const", + "value": 436233452754198157705746250789557519228244616562 + }, + "starkware.starknet.common.syscalls.LIBRARY_CALL_SELECTOR": { + "type": "const", + "value": 92376026794327011772951660 + }, + "starkware.starknet.common.syscalls.LibraryCall": { + "full_name": "starkware.starknet.common.syscalls.LibraryCall", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.LibraryCallRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractResponse", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.starknet.common.syscalls.LibraryCallRequest": { + "full_name": "starkware.starknet.common.syscalls.LibraryCallRequest", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.REPLACE_CLASS_SELECTOR": { + "type": "const", + "value": 25500403217443378527601783667 + }, + "starkware.starknet.common.syscalls.ReplaceClass": { + "full_name": "starkware.starknet.common.syscalls.ReplaceClass", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.SEND_MESSAGE_TO_L1_SELECTOR": { + "type": "const", + "value": 433017908768303439907196859243777073 + }, + "starkware.starknet.common.syscalls.STORAGE_READ_SELECTOR": { + "type": "const", + "value": 100890693370601760042082660 + }, + "starkware.starknet.common.syscalls.STORAGE_WRITE_SELECTOR": { + "type": "const", + "value": 25828017502874050592466629733 + }, + "starkware.starknet.common.syscalls.SendMessageToL1SysCall": { + "full_name": "starkware.starknet.common.syscalls.SendMessageToL1SysCall", + "members": { + "payload_ptr": { + "cairo_type": "felt*", + "offset": 3 + }, + "payload_size": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + }, + "to_address": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageRead": { + "full_name": "starkware.starknet.common.syscalls.StorageRead", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.StorageReadRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.StorageReadResponse", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageReadRequest": { + "full_name": "starkware.starknet.common.syscalls.StorageReadRequest", + "members": { + "address": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageReadResponse": { + "full_name": "starkware.starknet.common.syscalls.StorageReadResponse", + "members": { + "value": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageWrite": { + "full_name": "starkware.starknet.common.syscalls.StorageWrite", + "members": { + "address": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + }, + "value": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.TxInfo": { + "full_name": "starkware.starknet.common.syscalls.TxInfo", + "members": { + "account_contract_address": { + "cairo_type": "felt", + "offset": 1 + }, + "chain_id": { + "cairo_type": "felt", + "offset": 6 + }, + "max_fee": { + "cairo_type": "felt", + "offset": 2 + }, + "nonce": { + "cairo_type": "felt", + "offset": 7 + }, + "signature": { + "cairo_type": "felt*", + "offset": 4 + }, + "signature_len": { + "cairo_type": "felt", + "offset": 3 + }, + "transaction_hash": { + "cairo_type": "felt", + "offset": 5 + }, + "version": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 8, + "type": "struct" + }, + "starkware.starknet.common.syscalls.get_tx_info": { + "decorators": [], + "pc": 18, + "type": "function" + }, + "starkware.starknet.common.syscalls.get_tx_info.Args": { + "full_name": "starkware.starknet.common.syscalls.get_tx_info.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "starkware.starknet.common.syscalls.get_tx_info.ImplicitArgs": { + "full_name": "starkware.starknet.common.syscalls.get_tx_info.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.get_tx_info.Return": { + "cairo_type": "(tx_info: starkware.starknet.common.syscalls.TxInfo*)", + "type": "type_definition" + }, + "starkware.starknet.common.syscalls.get_tx_info.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.starknet.common.syscalls.get_tx_info.syscall_ptr": { + "cairo_type": "felt*", + "full_name": "starkware.starknet.common.syscalls.get_tx_info.syscall_ptr", + "references": [ + { + "ap_tracking_data": { + "group": 2, + "offset": 0 + }, + "pc": 18, + "value": "[cast(fp + (-3), felt**)]" + }, + { + "ap_tracking_data": { + "group": 2, + "offset": 1 + }, + "pc": 21, + "value": "cast([fp + (-3)] + 2, felt*)" + } + ], + "type": "reference" + } + }, + "main_scope": "__main__", + "prime": "0x800000000000011000000000000000000000000000000000000000000000001", + "reference_manager": { + "references": [ + { + "ap_tracking_data": { + "group": 1, + "offset": 0 + }, + "pc": 3, + "value": "[cast(fp + (-3), felt*)]" + }, + { + "ap_tracking_data": { + "group": 1, + "offset": 3 + }, + "pc": 10, + "value": "[cast(ap, felt*)]" + }, + { + "ap_tracking_data": { + "group": 2, + "offset": 0 + }, + "pc": 18, + "value": "[cast(fp + (-3), felt**)]" + }, + { + "ap_tracking_data": { + "group": 3, + "offset": 0 + }, + "pc": 25, + "value": "[cast(fp + (-3), felt*)]" + } + ] + } + } +} diff --git a/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_compiled.json b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_compiled.json new file mode 100644 index 00000000..8c622784 --- /dev/null +++ b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/compiled/test_proxy_compiled.json @@ -0,0 +1,2448 @@ +{ + "abi": [ + { + "inputs": [ + { + "name": "implementation", + "type": "felt" + }, + { + "name": "selector", + "type": "felt" + }, + { + "name": "calldata_len", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "constructor", + "outputs": [], + "type": "constructor" + }, + { + "inputs": [ + { + "name": "selector", + "type": "felt" + }, + { + "name": "calldata_size", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "__default__", + "outputs": [ + { + "name": "retdata_size", + "type": "felt" + }, + { + "name": "retdata", + "type": "felt*" + } + ], + "type": "function" + }, + { + "inputs": [ + { + "name": "selector", + "type": "felt" + }, + { + "name": "calldata_size", + "type": "felt" + }, + { + "name": "calldata", + "type": "felt*" + } + ], + "name": "__l1_default__", + "outputs": [], + "type": "l1_handler" + }, + { + "inputs": [], + "name": "get_implementation", + "outputs": [ + { + "name": "implementation", + "type": "felt" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "entry_points_by_type": { + "CONSTRUCTOR": [ + { + "offset": 108, + "selector": "0x28ffe4ff0f226a9107253e17a904099aa4f63a02a5621de0576e5aa71bc5194" + } + ], + "EXTERNAL": [ + { + "offset": 155, + "selector": "0x0" + }, + { + "offset": 212, + "selector": "0x21691762da057c1b71f851f9b709e0c143628acf6e0cbc9735411a65663d747" + } + ], + "L1_HANDLER": [ + { + "offset": 180, + "selector": "0x0" + } + ] + }, + "program": { + "attributes": [], + "builtins": [ + "pedersen", + "range_check" + ], + "compiler_version": "0.13.2", + "data": [ + "0x480680017fff8000", + "0x4c69627261727943616c6c", + "0x400280007ff97fff", + "0x400380017ff97ffa", + "0x400380027ff97ffb", + "0x400380037ff97ffc", + "0x400380047ff97ffd", + "0x482680017ff98000", + "0x7", + "0x480280057ff98000", + "0x480280067ff98000", + "0x208b7fff7fff7ffe", + "0x480680017fff8000", + "0x4c69627261727943616c6c4c3148616e646c6572", + "0x400280007ff97fff", + "0x400380017ff97ffa", + "0x400380027ff97ffb", + "0x400380037ff97ffc", + "0x400380047ff97ffd", + "0x482680017ff98000", + "0x7", + "0x480280057ff98000", + "0x480280067ff98000", + "0x208b7fff7fff7ffe", + "0x480680017fff8000", + "0x53746f7261676552656164", + "0x400280007ffc7fff", + "0x400380017ffc7ffd", + "0x482680017ffc8000", + "0x3", + "0x480280027ffc8000", + "0x208b7fff7fff7ffe", + "0x480680017fff8000", + "0x53746f726167655772697465", + "0x400280007ffb7fff", + "0x400380017ffb7ffc", + "0x400380027ffb7ffd", + "0x482680017ffb8000", + "0x3", + "0x208b7fff7fff7ffe", + "0x20780017fff7ffd", + "0x4", + "0x400780017fff7ffd", + "0x1", + "0x208b7fff7fff7ffe", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x480680017fff8000", + "0xf920571b9f85bdd92a867cfdc73319d0f8836f0e69e06e4c5566b6203f75cc", + "0x208b7fff7fff7ffe", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffa", + "0x480a7ffb7fff8000", + "0x48127ffe7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe1", + "0x48127ffe7fff8000", + "0x48127ff57fff8000", + "0x48127ff57fff8000", + "0x48127ffc7fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffed", + "0x480a7ffa7fff8000", + "0x48127ffe7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffdb", + "0x48127ff67fff8000", + "0x48127ff67fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe5", + "0x208b7fff7fff7ffe", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffd7", + "0x480a7ffa7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe8", + "0x208b7fff7fff7ffe", + "0x480a7ff77fff8000", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x480a7ffa7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff3", + "0x48127ffd7fff8000", + "0x480a7ffa7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff9b", + "0x48127ffd7fff8000", + "0x48127ff27fff8000", + "0x48127ff27fff8000", + "0x208b7fff7fff7ffe", + "0x480280027ffb8000", + "0x480280027ffd8000", + "0x400080007ffe7fff", + "0x482680017ffd8000", + "0x3", + "0x480280027ffd8000", + "0x48307fff7ffe8000", + "0x402a7ffd7ffc7fff", + "0x480280027ffb8000", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x482480017ffd8000", + "0x1", + "0x480280007ffd8000", + "0x480280017ffd8000", + "0x480280027ffd8000", + "0x482680017ffd8000", + "0x3", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffde", + "0x40780017fff7fff", + "0x1", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffb7fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x480a7ffa7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffc0", + "0x48127ffc7fff8000", + "0x48127ffe7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff6e", + "0x48127ffd7fff8000", + "0x48127ff17fff8000", + "0x48127ff17fff8000", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x208b7fff7fff7ffe", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x480a7ffa7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffe9", + "0x208b7fff7fff7ffe", + "0x480a7ff87fff8000", + "0x480a7ff97fff8000", + "0x480a7ffa7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffa5", + "0x48127ffc7fff8000", + "0x48127ffe7fff8000", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff5f", + "0x48127ffd7fff8000", + "0x48127ff17fff8000", + "0x48127ff17fff8000", + "0x208b7fff7fff7ffe", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x480a7ffa7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffeb", + "0x40780017fff7fff", + "0x1", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x48127ffc7fff8000", + "0x480680017fff8000", + "0x0", + "0x48127ffb7fff8000", + "0x208b7fff7fff7ffe", + "0x480a7ffb7fff8000", + "0x480a7ffc7fff8000", + "0x480a7ffd7fff8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffff84", + "0x208b7fff7fff7ffe", + "0x40780017fff7fff", + "0x1", + "0x4003800080007ffc", + "0x4826800180008000", + "0x1", + "0x480a7ffd7fff8000", + "0x4828800080007ffe", + "0x480a80007fff8000", + "0x208b7fff7fff7ffe", + "0x402b7ffd7ffc7ffd", + "0x480280007ffb8000", + "0x480280017ffb8000", + "0x480280027ffb8000", + "0x1104800180018000", + "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffee", + "0x48127ffe7fff8000", + "0x1104800180018000", + "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff1", + "0x48127ff47fff8000", + "0x48127ff47fff8000", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x48127ffb7fff8000", + "0x208b7fff7fff7ffe" + ], + "debug_info": null, + "hints": { + "7": [ + { + "accessible_scopes": [ + "starkware.starknet.common.syscalls", + "starkware.starknet.common.syscalls.library_call" + ], + "code": "syscall_handler.library_call(segments=segments, syscall_ptr=ids.syscall_ptr)", + "flow_tracking_data": { + "ap_tracking": { + "group": 0, + "offset": 1 + }, + "reference_ids": { + "starkware.starknet.common.syscalls.library_call.syscall_ptr": 0 + } + } + } + ], + "19": [ + { + "accessible_scopes": [ + "starkware.starknet.common.syscalls", + "starkware.starknet.common.syscalls.library_call_l1_handler" + ], + "code": "syscall_handler.library_call_l1_handler(segments=segments, syscall_ptr=ids.syscall_ptr)", + "flow_tracking_data": { + "ap_tracking": { + "group": 1, + "offset": 1 + }, + "reference_ids": { + "starkware.starknet.common.syscalls.library_call_l1_handler.syscall_ptr": 1 + } + } + } + ], + "28": [ + { + "accessible_scopes": [ + "starkware.starknet.common.syscalls", + "starkware.starknet.common.syscalls.storage_read" + ], + "code": "syscall_handler.storage_read(segments=segments, syscall_ptr=ids.syscall_ptr)", + "flow_tracking_data": { + "ap_tracking": { + "group": 2, + "offset": 1 + }, + "reference_ids": { + "starkware.starknet.common.syscalls.storage_read.syscall_ptr": 2 + } + } + } + ], + "37": [ + { + "accessible_scopes": [ + "starkware.starknet.common.syscalls", + "starkware.starknet.common.syscalls.storage_write" + ], + "code": "syscall_handler.storage_write(segments=segments, syscall_ptr=ids.syscall_ptr)", + "flow_tracking_data": { + "ap_tracking": { + "group": 3, + "offset": 1 + }, + "reference_ids": { + "starkware.starknet.common.syscalls.storage_write.syscall_ptr": 3 + } + } + } + ], + "40": [ + { + "accessible_scopes": [ + "starkware.cairo.common.math", + "starkware.cairo.common.math.assert_not_zero" + ], + "code": "from starkware.cairo.common.math_utils import assert_integer\nassert_integer(ids.value)\nassert ids.value % PRIME != 0, f'assert_not_zero failed: {ids.value} = 0.'", + "flow_tracking_data": { + "ap_tracking": { + "group": 4, + "offset": 0 + }, + "reference_ids": { + "starkware.cairo.common.math.assert_not_zero.value": 4 + } + } + } + ], + "128": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.constructor" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 11, + "offset": 60 + }, + "reference_ids": {} + } + } + ], + "188": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.__l1_default__" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 15, + "offset": 50 + }, + "reference_ids": {} + } + } + ], + "203": [ + { + "accessible_scopes": [ + "__main__", + "__main__", + "__wrappers__", + "__wrappers__.get_implementation_encode_return" + ], + "code": "memory[ap] = segments.add()", + "flow_tracking_data": { + "ap_tracking": { + "group": 17, + "offset": 0 + }, + "reference_ids": {} + } + } + ] + }, + "identifiers": { + "__main__.HashBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "type": "alias" + }, + "__main__.__default__": { + "decorators": [ + "external", + "raw_input", + "raw_output" + ], + "pc": 137, + "type": "function" + }, + "__main__.__default__.Args": { + "full_name": "__main__.__default__.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 2 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.__default__.ImplicitArgs": { + "full_name": "__main__.__default__.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.__default__.Return": { + "cairo_type": "(retdata_size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__main__.__default__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.__l1_default__": { + "decorators": [ + "l1_handler", + "raw_input" + ], + "pc": 164, + "type": "function" + }, + "__main__.__l1_default__.Args": { + "full_name": "__main__.__l1_default__.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 2 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.__l1_default__.ImplicitArgs": { + "full_name": "__main__.__l1_default__.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.__l1_default__.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.__l1_default__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._get_implementation": { + "decorators": [], + "pc": 75, + "type": "function" + }, + "__main__._get_implementation.Args": { + "full_name": "__main__._get_implementation.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__._get_implementation.ImplicitArgs": { + "full_name": "__main__._get_implementation.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__._get_implementation.Return": { + "cairo_type": "(implementation: felt)", + "type": "type_definition" + }, + "__main__._get_implementation.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._implementation": { + "type": "namespace" + }, + "__main__._implementation.Args": { + "full_name": "__main__._implementation.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__._implementation.HashBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "type": "alias" + }, + "__main__._implementation.ImplicitArgs": { + "full_name": "__main__._implementation.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__._implementation.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__._implementation.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._implementation.addr": { + "decorators": [], + "pc": 45, + "type": "function" + }, + "__main__._implementation.addr.Args": { + "full_name": "__main__._implementation.addr.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__._implementation.addr.ImplicitArgs": { + "full_name": "__main__._implementation.addr.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 0 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "__main__._implementation.addr.Return": { + "cairo_type": "(res: felt)", + "type": "type_definition" + }, + "__main__._implementation.addr.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._implementation.hash2": { + "destination": "starkware.cairo.common.hash.hash2", + "type": "alias" + }, + "__main__._implementation.normalize_address": { + "destination": "starkware.starknet.common.storage.normalize_address", + "type": "alias" + }, + "__main__._implementation.read": { + "decorators": [], + "pc": 50, + "type": "function" + }, + "__main__._implementation.read.Args": { + "full_name": "__main__._implementation.read.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__._implementation.read.ImplicitArgs": { + "full_name": "__main__._implementation.read.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__._implementation.read.Return": { + "cairo_type": "(address: felt)", + "type": "type_definition" + }, + "__main__._implementation.read.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._implementation.storage_read": { + "destination": "starkware.starknet.common.syscalls.storage_read", + "type": "alias" + }, + "__main__._implementation.storage_write": { + "destination": "starkware.starknet.common.syscalls.storage_write", + "type": "alias" + }, + "__main__._implementation.write": { + "decorators": [], + "pc": 63, + "type": "function" + }, + "__main__._implementation.write.Args": { + "full_name": "__main__._implementation.write.Args", + "members": { + "value": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__._implementation.write.ImplicitArgs": { + "full_name": "__main__._implementation.write.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__._implementation.write.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__._implementation.write.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__._set_implementation": { + "decorators": [], + "pc": 81, + "type": "function" + }, + "__main__._set_implementation.Args": { + "full_name": "__main__._set_implementation.Args", + "members": { + "implementation": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "__main__._set_implementation.ImplicitArgs": { + "full_name": "__main__._set_implementation.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__._set_implementation.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__._set_implementation.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.assert_not_zero": { + "destination": "starkware.cairo.common.math.assert_not_zero", + "type": "alias" + }, + "__main__.constructor": { + "decorators": [ + "constructor" + ], + "pc": 91, + "type": "function" + }, + "__main__.constructor.Args": { + "full_name": "__main__.constructor.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_len": { + "cairo_type": "felt", + "offset": 2 + }, + "implementation": { + "cairo_type": "felt", + "offset": 0 + }, + "selector": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "__main__.constructor.ImplicitArgs": { + "full_name": "__main__.constructor.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.constructor.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "__main__.constructor.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.get_implementation": { + "decorators": [ + "view" + ], + "pc": 197, + "type": "function" + }, + "__main__.get_implementation.Args": { + "full_name": "__main__.get_implementation.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__main__.get_implementation.ImplicitArgs": { + "full_name": "__main__.get_implementation.ImplicitArgs", + "members": { + "pedersen_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.HashBuiltin*", + "offset": 1 + }, + "range_check_ptr": { + "cairo_type": "felt", + "offset": 2 + }, + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "__main__.get_implementation.Return": { + "cairo_type": "(implementation: felt)", + "type": "type_definition" + }, + "__main__.get_implementation.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__main__.library_call": { + "destination": "starkware.starknet.common.syscalls.library_call", + "type": "alias" + }, + "__main__.library_call_l1_handler": { + "destination": "starkware.starknet.common.syscalls.library_call_l1_handler", + "type": "alias" + }, + "__wrappers__.__default__": { + "decorators": [ + "external", + "raw_input", + "raw_output" + ], + "pc": 155, + "type": "function" + }, + "__wrappers__.__default__.Args": { + "full_name": "__wrappers__.__default__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__default__.ImplicitArgs": { + "full_name": "__wrappers__.__default__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__default__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__default__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__default__.__wrapped_func": { + "destination": "__main__.__default__", + "type": "alias" + }, + "__wrappers__.__default___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.__l1_default__": { + "decorators": [ + "l1_handler", + "raw_input" + ], + "pc": 180, + "type": "function" + }, + "__wrappers__.__l1_default__.Args": { + "full_name": "__wrappers__.__l1_default__.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__l1_default__.ImplicitArgs": { + "full_name": "__wrappers__.__l1_default__.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.__l1_default__.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.__l1_default__.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.__l1_default__.__wrapped_func": { + "destination": "__main__.__l1_default__", + "type": "alias" + }, + "__wrappers__.__l1_default___encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.constructor": { + "decorators": [ + "constructor" + ], + "pc": 108, + "type": "function" + }, + "__wrappers__.constructor.Args": { + "full_name": "__wrappers__.constructor.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.constructor.ImplicitArgs": { + "full_name": "__wrappers__.constructor.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.constructor.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.constructor.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.constructor.__wrapped_func": { + "destination": "__main__.constructor", + "type": "alias" + }, + "__wrappers__.constructor_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "__wrappers__.get_implementation": { + "decorators": [ + "view" + ], + "pc": 212, + "type": "function" + }, + "__wrappers__.get_implementation.Args": { + "full_name": "__wrappers__.get_implementation.Args", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.get_implementation.ImplicitArgs": { + "full_name": "__wrappers__.get_implementation.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.get_implementation.Return": { + "cairo_type": "(syscall_ptr: felt*, pedersen_ptr: starkware.cairo.common.cairo_builtins.HashBuiltin*, range_check_ptr: felt, size: felt, retdata: felt*)", + "type": "type_definition" + }, + "__wrappers__.get_implementation.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "__wrappers__.get_implementation.__wrapped_func": { + "destination": "__main__.get_implementation", + "type": "alias" + }, + "__wrappers__.get_implementation_encode_return": { + "decorators": [], + "pc": 203, + "type": "function" + }, + "__wrappers__.get_implementation_encode_return.Args": { + "full_name": "__wrappers__.get_implementation_encode_return.Args", + "members": { + "range_check_ptr": { + "cairo_type": "felt", + "offset": 1 + }, + "ret_value": { + "cairo_type": "(implementation: felt)", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "__wrappers__.get_implementation_encode_return.ImplicitArgs": { + "full_name": "__wrappers__.get_implementation_encode_return.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "__wrappers__.get_implementation_encode_return.Return": { + "cairo_type": "(range_check_ptr: felt, data_len: felt, data: felt*)", + "type": "type_definition" + }, + "__wrappers__.get_implementation_encode_return.SIZEOF_LOCALS": { + "type": "const", + "value": 1 + }, + "__wrappers__.get_implementation_encode_return.memcpy": { + "destination": "starkware.cairo.common.memcpy.memcpy", + "type": "alias" + }, + "starkware.cairo.common.bool.FALSE": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.bool.TRUE": { + "type": "const", + "value": 1 + }, + "starkware.cairo.common.cairo_builtins.BitwiseBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin", + "members": { + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "x_and_y": { + "cairo_type": "felt", + "offset": 2 + }, + "x_or_y": { + "cairo_type": "felt", + "offset": 4 + }, + "x_xor_y": { + "cairo_type": "felt", + "offset": 3 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.EcOpBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.EcOpBuiltin", + "members": { + "m": { + "cairo_type": "felt", + "offset": 4 + }, + "p": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 0 + }, + "q": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 2 + }, + "r": { + "cairo_type": "starkware.cairo.common.ec_point.EcPoint", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.EcPoint": { + "destination": "starkware.cairo.common.ec_point.EcPoint", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.HashBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "members": { + "result": { + "cairo_type": "felt", + "offset": 2 + }, + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.KeccakBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.KeccakBuiltin", + "members": { + "input": { + "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "offset": 0 + }, + "output": { + "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "offset": 8 + } + }, + "size": 16, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.KeccakBuiltinState": { + "destination": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.ModBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.ModBuiltin", + "members": { + "n": { + "cairo_type": "felt", + "offset": 6 + }, + "offsets_ptr": { + "cairo_type": "felt*", + "offset": 5 + }, + "p": { + "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384", + "offset": 0 + }, + "values_ptr": { + "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384*", + "offset": 4 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.PoseidonBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin", + "members": { + "input": { + "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "offset": 0 + }, + "output": { + "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "offset": 3 + } + }, + "size": 6, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.PoseidonBuiltinState": { + "destination": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "type": "alias" + }, + "starkware.cairo.common.cairo_builtins.SignatureBuiltin": { + "full_name": "starkware.cairo.common.cairo_builtins.SignatureBuiltin", + "members": { + "message": { + "cairo_type": "felt", + "offset": 1 + }, + "pub_key": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.cairo_builtins.UInt384": { + "full_name": "starkware.cairo.common.cairo_builtins.UInt384", + "members": { + "d0": { + "cairo_type": "felt", + "offset": 0 + }, + "d1": { + "cairo_type": "felt", + "offset": 1 + }, + "d2": { + "cairo_type": "felt", + "offset": 2 + }, + "d3": { + "cairo_type": "felt", + "offset": 3 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.cairo.common.dict_access.DictAccess": { + "full_name": "starkware.cairo.common.dict_access.DictAccess", + "members": { + "key": { + "cairo_type": "felt", + "offset": 0 + }, + "new_value": { + "cairo_type": "felt", + "offset": 2 + }, + "prev_value": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.cairo.common.ec_point.EcPoint": { + "full_name": "starkware.cairo.common.ec_point.EcPoint", + "members": { + "x": { + "cairo_type": "felt", + "offset": 0 + }, + "y": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.cairo.common.hash.HashBuiltin": { + "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin", + "type": "alias" + }, + "starkware.cairo.common.keccak_state.KeccakBuiltinState": { + "full_name": "starkware.cairo.common.keccak_state.KeccakBuiltinState", + "members": { + "s0": { + "cairo_type": "felt", + "offset": 0 + }, + "s1": { + "cairo_type": "felt", + "offset": 1 + }, + "s2": { + "cairo_type": "felt", + "offset": 2 + }, + "s3": { + "cairo_type": "felt", + "offset": 3 + }, + "s4": { + "cairo_type": "felt", + "offset": 4 + }, + "s5": { + "cairo_type": "felt", + "offset": 5 + }, + "s6": { + "cairo_type": "felt", + "offset": 6 + }, + "s7": { + "cairo_type": "felt", + "offset": 7 + } + }, + "size": 8, + "type": "struct" + }, + "starkware.cairo.common.math.FALSE": { + "destination": "starkware.cairo.common.bool.FALSE", + "type": "alias" + }, + "starkware.cairo.common.math.TRUE": { + "destination": "starkware.cairo.common.bool.TRUE", + "type": "alias" + }, + "starkware.cairo.common.math.assert_not_zero": { + "decorators": [], + "pc": 40, + "type": "function" + }, + "starkware.cairo.common.math.assert_not_zero.Args": { + "full_name": "starkware.cairo.common.math.assert_not_zero.Args", + "members": { + "value": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.cairo.common.math.assert_not_zero.ImplicitArgs": { + "full_name": "starkware.cairo.common.math.assert_not_zero.ImplicitArgs", + "members": {}, + "size": 0, + "type": "struct" + }, + "starkware.cairo.common.math.assert_not_zero.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.cairo.common.math.assert_not_zero.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.cairo.common.math.assert_not_zero.value": { + "cairo_type": "felt", + "full_name": "starkware.cairo.common.math.assert_not_zero.value", + "references": [ + { + "ap_tracking_data": { + "group": 4, + "offset": 0 + }, + "pc": 40, + "value": "[cast(fp + (-3), felt*)]" + } + ], + "type": "reference" + }, + "starkware.cairo.common.poseidon_state.PoseidonBuiltinState": { + "full_name": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState", + "members": { + "s0": { + "cairo_type": "felt", + "offset": 0 + }, + "s1": { + "cairo_type": "felt", + "offset": 1 + }, + "s2": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.storage.ADDR_BOUND": { + "type": "const", + "value": -106710729501573572985208420194530329073740042555888586719489 + }, + "starkware.starknet.common.storage.MAX_STORAGE_ITEM_SIZE": { + "type": "const", + "value": 256 + }, + "starkware.starknet.common.storage.assert_250_bit": { + "destination": "starkware.cairo.common.math.assert_250_bit", + "type": "alias" + }, + "starkware.starknet.common.syscalls.CALL_CONTRACT_SELECTOR": { + "type": "const", + "value": 20853273475220472486191784820 + }, + "starkware.starknet.common.syscalls.CallContract": { + "full_name": "starkware.starknet.common.syscalls.CallContract", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractResponse", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.starknet.common.syscalls.CallContractRequest": { + "full_name": "starkware.starknet.common.syscalls.CallContractRequest", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "contract_address": { + "cairo_type": "felt", + "offset": 1 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.CallContractResponse": { + "full_name": "starkware.starknet.common.syscalls.CallContractResponse", + "members": { + "retdata": { + "cairo_type": "felt*", + "offset": 1 + }, + "retdata_size": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DELEGATE_CALL_SELECTOR": { + "type": "const", + "value": 21167594061783206823196716140 + }, + "starkware.starknet.common.syscalls.DELEGATE_L1_HANDLER_SELECTOR": { + "type": "const", + "value": 23274015802972845247556842986379118667122 + }, + "starkware.starknet.common.syscalls.DEPLOY_SELECTOR": { + "type": "const", + "value": 75202468540281 + }, + "starkware.starknet.common.syscalls.Deploy": { + "full_name": "starkware.starknet.common.syscalls.Deploy", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.DeployRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.DeployResponse", + "offset": 6 + } + }, + "size": 9, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DeployRequest": { + "full_name": "starkware.starknet.common.syscalls.DeployRequest", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "constructor_calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "constructor_calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "contract_address_salt": { + "cairo_type": "felt", + "offset": 2 + }, + "deploy_from_zero": { + "cairo_type": "felt", + "offset": 5 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 6, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DeployResponse": { + "full_name": "starkware.starknet.common.syscalls.DeployResponse", + "members": { + "constructor_retdata": { + "cairo_type": "felt*", + "offset": 2 + }, + "constructor_retdata_size": { + "cairo_type": "felt", + "offset": 1 + }, + "contract_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.DictAccess": { + "destination": "starkware.cairo.common.dict_access.DictAccess", + "type": "alias" + }, + "starkware.starknet.common.syscalls.EMIT_EVENT_SELECTOR": { + "type": "const", + "value": 1280709301550335749748 + }, + "starkware.starknet.common.syscalls.EmitEvent": { + "full_name": "starkware.starknet.common.syscalls.EmitEvent", + "members": { + "data": { + "cairo_type": "felt*", + "offset": 4 + }, + "data_len": { + "cairo_type": "felt", + "offset": 3 + }, + "keys": { + "cairo_type": "felt*", + "offset": 2 + }, + "keys_len": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GET_BLOCK_NUMBER_SELECTOR": { + "type": "const", + "value": 1448089106835523001438702345020786 + }, + "starkware.starknet.common.syscalls.GET_BLOCK_TIMESTAMP_SELECTOR": { + "type": "const", + "value": 24294903732626645868215235778792757751152 + }, + "starkware.starknet.common.syscalls.GET_CALLER_ADDRESS_SELECTOR": { + "type": "const", + "value": 94901967781393078444254803017658102643 + }, + "starkware.starknet.common.syscalls.GET_CONTRACT_ADDRESS_SELECTOR": { + "type": "const", + "value": 6219495360805491471215297013070624192820083 + }, + "starkware.starknet.common.syscalls.GET_SEQUENCER_ADDRESS_SELECTOR": { + "type": "const", + "value": 1592190833581991703053805829594610833820054387 + }, + "starkware.starknet.common.syscalls.GET_TX_INFO_SELECTOR": { + "type": "const", + "value": 1317029390204112103023 + }, + "starkware.starknet.common.syscalls.GET_TX_SIGNATURE_SELECTOR": { + "type": "const", + "value": 1448089128652340074717162277007973 + }, + "starkware.starknet.common.syscalls.GetBlockNumber": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumber", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockNumberRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockNumberResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockNumberRequest": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumberRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockNumberResponse": { + "full_name": "starkware.starknet.common.syscalls.GetBlockNumberResponse", + "members": { + "block_number": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestamp": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestamp", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockTimestampRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetBlockTimestampResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestampRequest": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestampRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetBlockTimestampResponse": { + "full_name": "starkware.starknet.common.syscalls.GetBlockTimestampResponse", + "members": { + "block_timestamp": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddress": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetCallerAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetCallerAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetCallerAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetCallerAddressResponse", + "members": { + "caller_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddress": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetContractAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetContractAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetContractAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetContractAddressResponse", + "members": { + "contract_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddress": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddress", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetSequencerAddressRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetSequencerAddressResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddressRequest": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddressRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetSequencerAddressResponse": { + "full_name": "starkware.starknet.common.syscalls.GetSequencerAddressResponse", + "members": { + "sequencer_address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfo": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfo", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxInfoRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxInfoResponse", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfoRequest": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfoRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxInfoResponse": { + "full_name": "starkware.starknet.common.syscalls.GetTxInfoResponse", + "members": { + "tx_info": { + "cairo_type": "starkware.starknet.common.syscalls.TxInfo*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignature": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignature", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxSignatureRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.GetTxSignatureResponse", + "offset": 1 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignatureRequest": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignatureRequest", + "members": { + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.GetTxSignatureResponse": { + "full_name": "starkware.starknet.common.syscalls.GetTxSignatureResponse", + "members": { + "signature": { + "cairo_type": "felt*", + "offset": 1 + }, + "signature_len": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.LIBRARY_CALL_L1_HANDLER_SELECTOR": { + "type": "const", + "value": 436233452754198157705746250789557519228244616562 + }, + "starkware.starknet.common.syscalls.LIBRARY_CALL_SELECTOR": { + "type": "const", + "value": 92376026794327011772951660 + }, + "starkware.starknet.common.syscalls.LibraryCall": { + "full_name": "starkware.starknet.common.syscalls.LibraryCall", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.LibraryCallRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.CallContractResponse", + "offset": 5 + } + }, + "size": 7, + "type": "struct" + }, + "starkware.starknet.common.syscalls.LibraryCallRequest": { + "full_name": "starkware.starknet.common.syscalls.LibraryCallRequest", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 4 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 3 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 5, + "type": "struct" + }, + "starkware.starknet.common.syscalls.REPLACE_CLASS_SELECTOR": { + "type": "const", + "value": 25500403217443378527601783667 + }, + "starkware.starknet.common.syscalls.ReplaceClass": { + "full_name": "starkware.starknet.common.syscalls.ReplaceClass", + "members": { + "class_hash": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.SEND_MESSAGE_TO_L1_SELECTOR": { + "type": "const", + "value": 433017908768303439907196859243777073 + }, + "starkware.starknet.common.syscalls.STORAGE_READ_SELECTOR": { + "type": "const", + "value": 100890693370601760042082660 + }, + "starkware.starknet.common.syscalls.STORAGE_WRITE_SELECTOR": { + "type": "const", + "value": 25828017502874050592466629733 + }, + "starkware.starknet.common.syscalls.SendMessageToL1SysCall": { + "full_name": "starkware.starknet.common.syscalls.SendMessageToL1SysCall", + "members": { + "payload_ptr": { + "cairo_type": "felt*", + "offset": 3 + }, + "payload_size": { + "cairo_type": "felt", + "offset": 2 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + }, + "to_address": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageRead": { + "full_name": "starkware.starknet.common.syscalls.StorageRead", + "members": { + "request": { + "cairo_type": "starkware.starknet.common.syscalls.StorageReadRequest", + "offset": 0 + }, + "response": { + "cairo_type": "starkware.starknet.common.syscalls.StorageReadResponse", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageReadRequest": { + "full_name": "starkware.starknet.common.syscalls.StorageReadRequest", + "members": { + "address": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageReadResponse": { + "full_name": "starkware.starknet.common.syscalls.StorageReadResponse", + "members": { + "value": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.StorageWrite": { + "full_name": "starkware.starknet.common.syscalls.StorageWrite", + "members": { + "address": { + "cairo_type": "felt", + "offset": 1 + }, + "selector": { + "cairo_type": "felt", + "offset": 0 + }, + "value": { + "cairo_type": "felt", + "offset": 2 + } + }, + "size": 3, + "type": "struct" + }, + "starkware.starknet.common.syscalls.TxInfo": { + "full_name": "starkware.starknet.common.syscalls.TxInfo", + "members": { + "account_contract_address": { + "cairo_type": "felt", + "offset": 1 + }, + "chain_id": { + "cairo_type": "felt", + "offset": 6 + }, + "max_fee": { + "cairo_type": "felt", + "offset": 2 + }, + "nonce": { + "cairo_type": "felt", + "offset": 7 + }, + "signature": { + "cairo_type": "felt*", + "offset": 4 + }, + "signature_len": { + "cairo_type": "felt", + "offset": 3 + }, + "transaction_hash": { + "cairo_type": "felt", + "offset": 5 + }, + "version": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 8, + "type": "struct" + }, + "starkware.starknet.common.syscalls.library_call": { + "decorators": [], + "pc": 0, + "type": "function" + }, + "starkware.starknet.common.syscalls.library_call.Args": { + "full_name": "starkware.starknet.common.syscalls.library_call.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 2 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 0 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.starknet.common.syscalls.library_call.ImplicitArgs": { + "full_name": "starkware.starknet.common.syscalls.library_call.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.library_call.Return": { + "cairo_type": "(retdata_size: felt, retdata: felt*)", + "type": "type_definition" + }, + "starkware.starknet.common.syscalls.library_call.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.starknet.common.syscalls.library_call.syscall_ptr": { + "cairo_type": "felt*", + "full_name": "starkware.starknet.common.syscalls.library_call.syscall_ptr", + "references": [ + { + "ap_tracking_data": { + "group": 0, + "offset": 0 + }, + "pc": 0, + "value": "[cast(fp + (-7), felt**)]" + }, + { + "ap_tracking_data": { + "group": 0, + "offset": 1 + }, + "pc": 7, + "value": "cast([fp + (-7)] + 7, felt*)" + } + ], + "type": "reference" + }, + "starkware.starknet.common.syscalls.library_call_l1_handler": { + "decorators": [], + "pc": 12, + "type": "function" + }, + "starkware.starknet.common.syscalls.library_call_l1_handler.Args": { + "full_name": "starkware.starknet.common.syscalls.library_call_l1_handler.Args", + "members": { + "calldata": { + "cairo_type": "felt*", + "offset": 3 + }, + "calldata_size": { + "cairo_type": "felt", + "offset": 2 + }, + "class_hash": { + "cairo_type": "felt", + "offset": 0 + }, + "function_selector": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 4, + "type": "struct" + }, + "starkware.starknet.common.syscalls.library_call_l1_handler.ImplicitArgs": { + "full_name": "starkware.starknet.common.syscalls.library_call_l1_handler.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.library_call_l1_handler.Return": { + "cairo_type": "(retdata_size: felt, retdata: felt*)", + "type": "type_definition" + }, + "starkware.starknet.common.syscalls.library_call_l1_handler.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.starknet.common.syscalls.library_call_l1_handler.syscall_ptr": { + "cairo_type": "felt*", + "full_name": "starkware.starknet.common.syscalls.library_call_l1_handler.syscall_ptr", + "references": [ + { + "ap_tracking_data": { + "group": 1, + "offset": 0 + }, + "pc": 12, + "value": "[cast(fp + (-7), felt**)]" + }, + { + "ap_tracking_data": { + "group": 1, + "offset": 1 + }, + "pc": 19, + "value": "cast([fp + (-7)] + 7, felt*)" + } + ], + "type": "reference" + }, + "starkware.starknet.common.syscalls.storage_read": { + "decorators": [], + "pc": 24, + "type": "function" + }, + "starkware.starknet.common.syscalls.storage_read.Args": { + "full_name": "starkware.starknet.common.syscalls.storage_read.Args", + "members": { + "address": { + "cairo_type": "felt", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.storage_read.ImplicitArgs": { + "full_name": "starkware.starknet.common.syscalls.storage_read.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.storage_read.Return": { + "cairo_type": "(value: felt)", + "type": "type_definition" + }, + "starkware.starknet.common.syscalls.storage_read.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.starknet.common.syscalls.storage_read.syscall_ptr": { + "cairo_type": "felt*", + "full_name": "starkware.starknet.common.syscalls.storage_read.syscall_ptr", + "references": [ + { + "ap_tracking_data": { + "group": 2, + "offset": 0 + }, + "pc": 24, + "value": "[cast(fp + (-4), felt**)]" + }, + { + "ap_tracking_data": { + "group": 2, + "offset": 1 + }, + "pc": 28, + "value": "cast([fp + (-4)] + 3, felt*)" + } + ], + "type": "reference" + }, + "starkware.starknet.common.syscalls.storage_write": { + "decorators": [], + "pc": 32, + "type": "function" + }, + "starkware.starknet.common.syscalls.storage_write.Args": { + "full_name": "starkware.starknet.common.syscalls.storage_write.Args", + "members": { + "address": { + "cairo_type": "felt", + "offset": 0 + }, + "value": { + "cairo_type": "felt", + "offset": 1 + } + }, + "size": 2, + "type": "struct" + }, + "starkware.starknet.common.syscalls.storage_write.ImplicitArgs": { + "full_name": "starkware.starknet.common.syscalls.storage_write.ImplicitArgs", + "members": { + "syscall_ptr": { + "cairo_type": "felt*", + "offset": 0 + } + }, + "size": 1, + "type": "struct" + }, + "starkware.starknet.common.syscalls.storage_write.Return": { + "cairo_type": "()", + "type": "type_definition" + }, + "starkware.starknet.common.syscalls.storage_write.SIZEOF_LOCALS": { + "type": "const", + "value": 0 + }, + "starkware.starknet.common.syscalls.storage_write.syscall_ptr": { + "cairo_type": "felt*", + "full_name": "starkware.starknet.common.syscalls.storage_write.syscall_ptr", + "references": [ + { + "ap_tracking_data": { + "group": 3, + "offset": 0 + }, + "pc": 32, + "value": "[cast(fp + (-5), felt**)]" + }, + { + "ap_tracking_data": { + "group": 3, + "offset": 1 + }, + "pc": 37, + "value": "cast([fp + (-5)] + 3, felt*)" + } + ], + "type": "reference" + } + }, + "main_scope": "__main__", + "prime": "0x800000000000011000000000000000000000000000000000000000000000001", + "reference_manager": { + "references": [ + { + "ap_tracking_data": { + "group": 0, + "offset": 0 + }, + "pc": 0, + "value": "[cast(fp + (-7), felt**)]" + }, + { + "ap_tracking_data": { + "group": 1, + "offset": 0 + }, + "pc": 12, + "value": "[cast(fp + (-7), felt**)]" + }, + { + "ap_tracking_data": { + "group": 2, + "offset": 0 + }, + "pc": 24, + "value": "[cast(fp + (-4), felt**)]" + }, + { + "ap_tracking_data": { + "group": 3, + "offset": 0 + }, + "pc": 32, + "value": "[cast(fp + (-5), felt**)]" + }, + { + "ap_tracking_data": { + "group": 4, + "offset": 0 + }, + "pc": 40, + "value": "[cast(fp + (-3), felt*)]" + } + ] + } + } +} diff --git a/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy.cairo b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy.cairo new file mode 100644 index 00000000..4aad1e68 --- /dev/null +++ b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy.cairo @@ -0,0 +1,112 @@ +%lang starknet + +from starkware.cairo.common.cairo_builtins import HashBuiltin +from starkware.starknet.common.syscalls import library_call, library_call_l1_handler +from starkware.cairo.common.math import assert_not_zero + + +@storage_var +func _implementation() -> (address : felt) { + +} + +func _get_implementation{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + range_check_ptr + } () -> (implementation: felt) { + let (res) = _implementation.read(); + return (implementation=res); + } + +func _set_implementation{ + syscall_ptr : felt*, + pedersen_ptr : HashBuiltin*, + range_check_ptr + } ( + implementation: felt + ) { + assert_not_zero(implementation); + _implementation.write(implementation); + return (); + } + + + +@constructor +func constructor{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + range_check_ptr + } ( + implementation: felt, + selector: felt, + calldata_len: felt, + calldata: felt* + ) { + _set_implementation(implementation); + library_call( + class_hash=implementation, + function_selector=selector, + calldata_size=calldata_len, + calldata=calldata); + return (); + } + + +@external +@raw_input +@raw_output +func __default__{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + range_check_ptr + } ( + selector : felt, + calldata_size : felt, + calldata : felt* + ) -> ( + retdata_size : felt, + retdata : felt* + ) { + let (implementation) = _get_implementation(); + + let (retdata_size : felt, retdata : felt*) = library_call( + class_hash=implementation, + function_selector=selector, + calldata_size=calldata_size, + calldata=calldata); + return (retdata_size=retdata_size, retdata=retdata); + } + +@l1_handler +@raw_input +func __l1_default__{ + syscall_ptr : felt*, + pedersen_ptr : HashBuiltin*, + range_check_ptr + } ( + selector : felt, + calldata_size : felt, + calldata : felt* + ) { + let (implementation) = _get_implementation(); + + library_call_l1_handler( + class_hash=implementation, + function_selector=selector, + calldata_size=calldata_size, + calldata=calldata); + return (); + } + + +@view +func get_implementation{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + range_check_ptr + } () -> (implementation: felt) { + let (implementation) = _get_implementation(); + return (implementation=implementation); + } diff --git a/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy_account.cairo b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy_account.cairo new file mode 100644 index 00000000..81fd705c --- /dev/null +++ b/tests/integration/contracts/blockifier_contracts/feature_contracts/cairo0/test_proxy_account.cairo @@ -0,0 +1,98 @@ +%lang starknet + +from starkware.cairo.common.cairo_builtins import HashBuiltin, SignatureBuiltin +from starkware.cairo.common.alloc import alloc +from starkware.cairo.common.memcpy import memcpy + +from starkware.cairo.common.math import assert_nn +from starkware.starknet.common.syscalls import ( + get_tx_info +) + +struct Call { + to: felt, + selector: felt, + calldata_len: felt, + calldata: felt*, +} + +struct CallArray { + to: felt, + selector: felt, + data_offset: felt, + data_len: felt, +} + +@external +func __validate__{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + ecdsa_ptr: SignatureBuiltin*, + range_check_ptr +} ( + call_array_len: felt, + call_array: CallArray*, + calldata_len: felt, + calldata: felt* +) { + return (); +} + +@external +@raw_output +func __execute__{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + ecdsa_ptr: SignatureBuiltin*, + range_check_ptr +} ( + call_array_len: felt, + call_array: CallArray*, + calldata_len: felt, + calldata: felt* +) -> ( + retdata_size: felt, retdata: felt* +) { + alloc_locals; + let (retdata: felt*) = alloc(); + + return (retdata_size=0, retdata=retdata); +} + +@external +func __validate_declare__{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + ecdsa_ptr: SignatureBuiltin*, + range_check_ptr +} ( + class_hash: felt +) { + return (); +} + +@raw_input +@external +func __validate_deploy__{ + syscall_ptr: felt*, + pedersen_ptr: HashBuiltin*, + ecdsa_ptr: SignatureBuiltin*, + range_check_ptr +} (selector: felt, calldata_size: felt, calldata: felt*) { + alloc_locals; + // get the tx info + let (tx_info) = get_tx_info(); + with_attr error_message("assertion failed") { + assert_nn(tx_info.signature_len - 2); + } + + return (); +} + +@external +func foo{syscall_ptr: felt*, pedersen_ptr: HashBuiltin*, range_check_ptr}( + arg1: felt, + arg2: felt +) { + return (); +} diff --git a/tests/integration/deploy_txn_tests.rs b/tests/integration/deploy_txn_tests.rs index e0e9eb3b..a496f169 100644 --- a/tests/integration/deploy_txn_tests.rs +++ b/tests/integration/deploy_txn_tests.rs @@ -358,3 +358,73 @@ async fn deploy_via_invoke_no_calldata_cairo1_account( .await .expect("OS run failed"); } + +#[rstest] +#[tokio::test(flavor = "multi_thread", worker_threads = 1)] +async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) { + let test_proxy = load_cairo0_feature_contract("test_proxy"); + let test_proxy_account = load_cairo0_feature_contract("test_proxy_account"); + let class_hash = class_hash!("0x1583cf1817fbd5b625b60695ddc506e5f1784e30518ca2ea9e56caa0c5c5509"); + + let args: Vec = [ + "0x9ea83ef3294e2b3e2655642e8340dfacc330175a70fe79367e199215b7ffa1", // test_proxy_account contract + "0x1b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d", // selector_from_name("foo") + "0x2", // len of foo() arguments + "0x0", // arg1 + "0x0", // arg2 + ] + .into_iter() + .map(Felt252::from_hex_unchecked) + .collect(); + + let ctor_calldata = Calldata(args.into()); + let deployed_contract_address = calculate_contract_address( + ContractAddressSalt::default(), + class_hash, + &ctor_calldata, + contract_address!("0x0"), + ) + .expect("Failed to calculate the contract address"); + + let initial_state = StarknetStateBuilder::new(&block_context) + .deploy_cairo0_contract(test_proxy.0, test_proxy.1) + .deploy_cairo0_contract(test_proxy_account.0, test_proxy_account.1) + .fund_account(deployed_contract_address, BALANCE, BALANCE) + .set_default_balance(BALANCE, BALANCE) + .build() + .await; + + let tx_version = TransactionVersion::ONE; + let mut nonce_manager = NonceManager::default(); + + let test_proxy = initial_state.deployed_cairo0_contracts.get("test_proxy").unwrap(); + + let deployed_account_class_hash = test_proxy.declaration.class_hash; + // Sanity check, as we hardcode the class hash in the fixture we verify that we have + // the right one. + assert_eq!(class_hash, deployed_account_class_hash); + + let deploy_account_tx = AccountTransaction::DeployAccount(deploy_account_tx( + deploy_account_tx_args! { + class_hash: deployed_account_class_hash, + max_fee, + contract_address_salt: ContractAddressSalt::default(), + version: tx_version, + constructor_calldata: ctor_calldata + }, + &mut nonce_manager, + )); + + let txs = vec![deploy_account_tx].into_iter().map(Into::into).collect(); + let _result = execute_txs_and_run_os( + crate::common::DEFAULT_COMPILED_OS, + initial_state.cached_state, + block_context, + txs, + initial_state.cairo0_compiled_classes, + initial_state.cairo1_compiled_classes, + HashMap::default(), + ) + .await + .expect("OS run failed"); +} From eb072f3d7976d878197c8f9989cb83caeaaa2a34 Mon Sep 17 00:00:00 2001 From: whichqua Date: Fri, 8 Nov 2024 17:09:27 +0300 Subject: [PATCH 2/5] fix: add required parts to reproduce the specific part of the issue --- tests/integration/deploy_txn_tests.rs | 81 +++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 5 deletions(-) diff --git a/tests/integration/deploy_txn_tests.rs b/tests/integration/deploy_txn_tests.rs index a496f169..4e5396b1 100644 --- a/tests/integration/deploy_txn_tests.rs +++ b/tests/integration/deploy_txn_tests.rs @@ -9,7 +9,7 @@ use blockifier::{deploy_account_tx_args, invoke_tx_args}; use cairo_vm::Felt252; use rstest::{fixture, rstest}; use starknet_api::core::{calculate_contract_address, ClassHash, ContractAddress, PatriciaKey}; -use starknet_api::transaction::{Calldata, ContractAddressSalt, Fee, TransactionVersion}; +use starknet_api::transaction::{Calldata, ContractAddressSalt, Fee, TransactionSignature, TransactionVersion}; use starknet_api::{class_hash, contract_address, felt, patricia_key}; use crate::common::block_context; @@ -359,6 +359,71 @@ async fn deploy_via_invoke_no_calldata_cairo1_account( .expect("OS run failed"); } +#[rstest] +#[tokio::test(flavor = "multi_thread", worker_threads = 1)] +async fn deploy_cairo0_without_proxy(block_context: BlockContext, max_fee: Fee) { + let test_proxy_account = load_cairo0_feature_contract("test_proxy_account"); + let class_hash = class_hash!("0x9ea83ef3294e2b3e2655642e8340dfacc330175a70fe79367e199215b7ffa1"); + + let args: Vec = vec![]; + + let ctor_calldata = Calldata(args.into()); + let deployed_contract_address = calculate_contract_address( + ContractAddressSalt::default(), + class_hash, + &ctor_calldata, + contract_address!("0x0"), + ) + .expect("Failed to calculate the contract address"); + + let initial_state = StarknetStateBuilder::new(&block_context) + .deploy_cairo0_contract(test_proxy_account.0, test_proxy_account.1) + .fund_account(deployed_contract_address, BALANCE, BALANCE) + .set_default_balance(BALANCE, BALANCE) + .build() + .await; + + let tx_version = TransactionVersion::ONE; + let mut nonce_manager = NonceManager::default(); + + let test_proxy_account = initial_state.deployed_cairo0_contracts.get("test_proxy_account").unwrap(); + + let deployed_account_class_hash = test_proxy_account.declaration.class_hash; + // Sanity check, as we hardcode the class hash in the fixture we verify that we have + // the right one. + assert_eq!(class_hash, deployed_account_class_hash); + + let deploy_account_tx = AccountTransaction::DeployAccount(deploy_account_tx( + deploy_account_tx_args! { + class_hash: deployed_account_class_hash, + max_fee, + contract_address_salt: ContractAddressSalt::default(), + version: tx_version, + constructor_calldata: ctor_calldata, + signature: TransactionSignature([ + "0x0", + "0x0", + ].into_iter() + .map(Felt252::from_hex_unchecked) + .collect()), + }, + &mut nonce_manager, + )); + + let txs = vec![deploy_account_tx].into_iter().map(Into::into).collect(); + let _result = execute_txs_and_run_os( + crate::common::DEFAULT_COMPILED_OS, + initial_state.cached_state, + block_context, + txs, + initial_state.cairo0_compiled_classes, + initial_state.cairo1_compiled_classes, + HashMap::default(), + ) + .await + .expect("OS run failed"); +} + #[rstest] #[tokio::test(flavor = "multi_thread", worker_threads = 1)] async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) { @@ -369,9 +434,9 @@ async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) { let args: Vec = [ "0x9ea83ef3294e2b3e2655642e8340dfacc330175a70fe79367e199215b7ffa1", // test_proxy_account contract "0x1b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d", // selector_from_name("foo") - "0x2", // len of foo() arguments - "0x0", // arg1 - "0x0", // arg2 + "0x2", // len of foo() arguments + "0x0", // arg1 + "0x0", // arg2 ] .into_iter() .map(Felt252::from_hex_unchecked) @@ -410,7 +475,13 @@ async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) { max_fee, contract_address_salt: ContractAddressSalt::default(), version: tx_version, - constructor_calldata: ctor_calldata + constructor_calldata: ctor_calldata, + signature: TransactionSignature([ + "0x0", + "0x0", + ].into_iter() + .map(Felt252::from_hex_unchecked) + .collect()), }, &mut nonce_manager, )); From e5c21dcbccd3f73a3db8e447b327e6a9be40146d Mon Sep 17 00:00:00 2001 From: whichqua Date: Thu, 14 Nov 2024 17:02:53 +0300 Subject: [PATCH 3/5] fix: use a ptr instead of relocatable with deprecated_tx_info --- crates/bin/prove_block/tests/prove_block.rs | 1 + crates/starknet-os/src/hints/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bin/prove_block/tests/prove_block.rs b/crates/bin/prove_block/tests/prove_block.rs index 061233c4..3dc866a3 100644 --- a/crates/bin/prove_block/tests/prove_block.rs +++ b/crates/bin/prove_block/tests/prove_block.rs @@ -62,6 +62,7 @@ const DEFAULT_COMPILED_OS: &[u8] = include_bytes!("../../../../build/os_latest.j #[case::timestamp_rounding_2(167815)] #[case::missing_constant_max_high(164684)] #[case::retdata_not_a_relocatable(160033)] +#[case::get_tx_info_using_ptr_over_relocatable(243766)] #[ignore = "Requires a running Pathfinder node"] #[tokio::test(flavor = "multi_thread")] async fn test_prove_selected_blocks(#[case] block_number: u64) { diff --git a/crates/starknet-os/src/hints/mod.rs b/crates/starknet-os/src/hints/mod.rs index 0fcbc6c6..4f109830 100644 --- a/crates/starknet-os/src/hints/mod.rs +++ b/crates/starknet-os/src/hints/mod.rs @@ -627,7 +627,7 @@ where PCS: PerContractStorage + 'static, { let deprecated_tx_info_ptr = - get_relocatable_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?; + get_ptr_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?; let execution_helper = exec_scopes.get::>(vars::scopes::EXECUTION_HELPER)?; execution_helper.start_tx(Some(deprecated_tx_info_ptr)).await; From 03b6108048b3c7a4cd757aacb16367af9afd1cfe Mon Sep 17 00:00:00 2001 From: whichqua Date: Thu, 14 Nov 2024 17:06:48 +0300 Subject: [PATCH 4/5] lint: cargo fmt --- crates/starknet-os/src/hints/mod.rs | 3 +-- tests/integration/deploy_txn_tests.rs | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/crates/starknet-os/src/hints/mod.rs b/crates/starknet-os/src/hints/mod.rs index 4f109830..d8ac0dcc 100644 --- a/crates/starknet-os/src/hints/mod.rs +++ b/crates/starknet-os/src/hints/mod.rs @@ -626,8 +626,7 @@ pub async fn start_tx_async( where PCS: PerContractStorage + 'static, { - let deprecated_tx_info_ptr = - get_ptr_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?; + let deprecated_tx_info_ptr = get_ptr_from_var_name(vars::ids::DEPRECATED_TX_INFO, vm, ids_data, ap_tracking)?; let execution_helper = exec_scopes.get::>(vars::scopes::EXECUTION_HELPER)?; execution_helper.start_tx(Some(deprecated_tx_info_ptr)).await; diff --git a/tests/integration/deploy_txn_tests.rs b/tests/integration/deploy_txn_tests.rs index 4e5396b1..8370c744 100644 --- a/tests/integration/deploy_txn_tests.rs +++ b/tests/integration/deploy_txn_tests.rs @@ -434,9 +434,9 @@ async fn deploy_cairo0_via_proxy(block_context: BlockContext, max_fee: Fee) { let args: Vec = [ "0x9ea83ef3294e2b3e2655642e8340dfacc330175a70fe79367e199215b7ffa1", // test_proxy_account contract "0x1b1a0649752af1b28b3dc29a1556eee781e4a4c3a1f7f53f90fa834de098c4d", // selector_from_name("foo") - "0x2", // len of foo() arguments - "0x0", // arg1 - "0x0", // arg2 + "0x2", // len of foo() arguments + "0x0", // arg1 + "0x0", // arg2 ] .into_iter() .map(Felt252::from_hex_unchecked) From 2ad932709d2005428c43f19a91c13c0596c6841a Mon Sep 17 00:00:00 2001 From: whichqua Date: Thu, 14 Nov 2024 17:41:56 +0300 Subject: [PATCH 5/5] fix: tests to use ptr instead of relocatable --- crates/starknet-os/src/hints/tests.rs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/crates/starknet-os/src/hints/tests.rs b/crates/starknet-os/src/hints/tests.rs index dbbe92ac..d15f34d0 100644 --- a/crates/starknet-os/src/hints/tests.rs +++ b/crates/starknet-os/src/hints/tests.rs @@ -158,7 +158,9 @@ pub mod tests { vm.add_memory_segment(); vm.add_memory_segment(); - let ids_data = ids_data![vars::ids::DEPRECATED_TX_INFO]; + let mut ids_data = HashMap::new(); + ids_data.insert(vars::ids::DEPRECATED_TX_INFO.to_owned(), HintReference::new(0, 0, false, false)); + let ap_tracking = ApTracking::default(); let mut exec_scopes = ExecutionScopes::new(); @@ -191,7 +193,8 @@ pub mod tests { vm.add_memory_segment(); vm.add_memory_segment(); - let ids_data = ids_data![vars::ids::DEPRECATED_TX_INFO]; + let mut ids_data = HashMap::new(); + ids_data.insert(vars::ids::DEPRECATED_TX_INFO.to_owned(), HintReference::new(0, 0, false, false)); let ap_tracking = ApTracking::default(); let mut exec_scopes = ExecutionScopes::new(); @@ -231,7 +234,9 @@ pub mod tests { vm.add_memory_segment(); vm.add_memory_segment(); - let ids_data = ids_data![vars::ids::DEPRECATED_TX_INFO]; + let mut ids_data = HashMap::new(); + ids_data.insert(vars::ids::DEPRECATED_TX_INFO.to_owned(), HintReference::new(0, 0, false, false)); + let ap_tracking = ApTracking::default(); let mut exec_scopes = ExecutionScopes::new();