Skip to content

Conversation

@BitWonka
Copy link

@BitWonka BitWonka commented Aug 8, 2025

gm

i was getting an error message in this format and was failing the whole multicall since it didnt match the regex

{....Error message: multicall 4:114 failed ......"}

added a smol fix to make sure it matches that. also matches the previous version for backwards compatibility.

@BitWonka
Copy link
Author

BitWonka commented Aug 9, 2025

after further testing turns out the the 4 in 4:114 is not the correct index but returned on alot of calls

here;s an example of a failing rpc call with the error at index 1, we no dont get the correct position from the contract for some reason

call:

{
    "id": 1,
    "jsonrpc": "2.0",
    "method": "starknet_call",
    "params": {
        "request": {
            "contract_address": "0x05754af3760f3356da99aea5c3ec39ccac7783d925a19666ebbeca58ff0087f4",
            "entry_point_selector": "0x23ce8154ba7968a9d040577a2140e30474cee3aad4ba52d26bc483e648643f4",
            "calldata": [
                "0x5",
                "0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
                "0x1f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35",
                "0x0",
                "0x8",
                "0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
                "0x1f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35",
                "0x8",
                "0x8",
                "0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
                "0x1f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35",
                "0x10",
                "0x8",
                "0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
                "0x1f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35",
                "0x18",
                "0x8",
                "0x5dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b",
                "0x1f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35",
                "0x20",
                "0x8",
                "0x28",
                "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
                "0x54f20994579087ecae673f3904d7ffd433707ddd6c658743901b1805cc62929",
                "0xccccccccccccccccccccccccccccccc",
                "0x1744e",
                "0x0",
                "0x549cdc4",
                "0x1",
                "0x0",
                "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
                "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
                "0x0",
                "0x1",
                "0x0",
                "0x1270642",
                "0x1",
                "0x0",
                "0xda114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3",
                "0x68f5c6a61780768455de69077e07e89787839bf8166decfbf92b645209c0fb8",
                "0xc49ba5e353f7d00000000000000000",
                "0x175e",
                "0x0",
                "0x1a16774",
                "0x1",
                "0x0",
                "0xda114221cb83fa859dbdb4c44beeaa0bb37c7537ad5ae66fe5e0efd20e6eb3",
                "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
                "0x68db8bac710cb4000000000000000",
                "0xc8",
                "0x0",
                "0x79d057",
                "0x1",
                "0x0",
                "0x49d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7",
                "0x53c91253bc9682c04929ca02ed00b3e423f6710d2ee7e0d5ebb06f3ecf368a8",
                "0x68db8bac710cb4000000000000000",
                "0xc8",
                "0x0",
                "0x127034b",
                "0x1",
                "0x0"
            ]
        },
        "block_id": "latest"
    }
}

error:

{
    "error": {
        "code": 40,
        "data": {
            "revert_error": "Execution error: Error at pc=0:25:\nGot an exception while executing a hint: Execution failed. Failure reason:\nError in contract (contract address: 0x00000005dd3d2f4429af886cd1a3b08289dbcea99a294197e9eb43b0e0325b4b, class hash: 0x02a6f52c3635211b907467b53e3a712be41f0115d03f9d5903d448a1cd4f6f5c, selector: 0x01f212135402a17a986f43b71377d5a2bdbe8da74607e7904e71ebcefe98bd35):\n0x505245565f46524f4d5f4d494e ('PREV_FROM_MIN').\n\nCairo traceback (most recent call last):\nUnknown location (pc=0:128)\nUnknown location (pc=0:68)\nUnknown location (pc=0:160)\nError message: multicall 4:22 failed\nUnknown location (pc=0:177)\n"
        },
        "message": "Contract error"
    },
    "id": 1,
    "jsonrpc": "2.0"
}

@BitWonka BitWonka marked this pull request as draft August 9, 2025 00:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant