starkware-libs / starknet-specs

94 stars 76 forks source link

MSG_TO_L1.to_address should be an ETH_ADDRESS #224

Open ArielTM opened 3 months ago

ArielTM commented 3 months ago

MSG_TO_L1.to_address is defined as FELT https://github.com/starkware-libs/starknet-specs/blob/e5ce8c6f99672d9ddf85a8e1d6ef8e87169d6e8d/api/starknet_api_openrpc.json#L2934 Which is being checked against the following regex: https://github.com/starkware-libs/starknet-specs/blob/e5ce8c6f99672d9ddf85a8e1d6ef8e87169d6e8d/api/starknet_api_openrpc.json#L1303

But "to_address" is essentially an Eth address which normally contain a leading zeroes when needed.

For example, the receipt of "0x06b7f4ac059de44c9c9d9fc6ddbabe35424e3fe35b97403de41f39a63667ff9b" tx contain a message to an address with a leading zero: https://starkscan.co/tx/0x06b7f4ac059de44c9c9d9fc6ddbabe35424e3fe35b97403de41f39a63667ff9b#messagelogs

Getting the receipt of this tx might cause an error when validating against the regex as mentioned here: https://github.com/software-mansion/starknet.py/issues/1423