telosnetwork/open-block-explorer

proposal_hash causing msig sign & execute to fail

Closed this issue · 1 comments

Using the cleos login option and trying to sign and execute an msig It is a lot more verbose than the last version:

cleos -u https://mainnet.telos.net push transaction '{
    "expiration": "2024-07-24T15:41:07",
    "ref_block_num": 0,
    "ref_block_prefix": 0,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [
        {
            "account": "eosio.msig",
            "name": "approve",
            "authorization": [
                {
                    "actor": "jt.tcd",
                    "permission": "active"
                }
            ],
            "data": {
                "proposer": "tfpaymentacc",
                "proposal_name": "qdgiqatehlpi",
                "level": {
                    "actor": "jt.tcd",
                    "permission": "active"
                },
                "proposal_hash": null
            },
            "abi": {
                "version": "eosio::abi/1.1",
                "types": [],
                "structs": [],
                "actions": [
                    {
                        "name": "approve",
                        "type": "bytes",
                        "ricardian_contract": ""
                    }
                ],
                "tables": [],
                "ricardian_clauses": [],
                "error_messages": [],
                "abi_extensions": [],
                "variants": [],
                "action_results": []
            }
        }
    ],
    "transaction_extensions": []
}'

It seems to be adding "proposal_hash": null which nodeos doesn't like. If we remove this line, it works.

When trying to approve an msig via cleos in OBE, the transaction generated was initially invalid. The following transaction failed with the error "Bad Cast (7) Invalid cast from type 'null_type' to string Failed to deserialize variant":

cleos -u https://mainnet.telos.net push transaction '{
    "expiration": "2024-07-28T15:12:00",
    "ref_block_num": 60622,
    "ref_block_prefix": 2647414823,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [
        {
            "account": "eosio.msig",
            "name": "approve",
            "authorization": [
                {
                    "actor": "caleosblocks",
                    "permission": "active"
                }
            ],
            "data": {
                "proposer": "jesse.tcd",
                "proposal_name": "hotfix.evm",
                "level": {
                    "actor": "caleosblocks",
                    "permission": "active"
                },
                "proposal_hash": null
            },
            "abi": {
                "version": "eosio::abi/1.1",
                "types": [],
                "structs": [],
                "actions": [
                    {
                        "name": "approve",
                        "type": "bytes",
                        "ricardian_contract": ""
                    }
                ],
                "tables": [],
                "ricardian_clauses": [],
                "error_messages": [],
                "abi_extensions": [],
                "variants": [],
                "action_results": []
            }
        }
    ],
    "transaction_extensions": []
}'

The following transaction worked after removing the ABI and setting the proposal_hash field to an empty string instead of null:

cleos -u https://mainnet.telos.net push transaction '{
    "expiration": "2024-07-28T15:12:00",
    "ref_block_num": 60622,
    "ref_block_prefix": 2647414823,
    "max_net_usage_words": 0,
    "max_cpu_usage_ms": 0,
    "delay_sec": 0,
    "context_free_actions": [],
    "actions": [
        {
            "account": "eosio.msig",
            "name": "approve",
            "authorization": [
                {
                    "actor": "caleosblocks",
                    "permission": "active"
                }
            ],
            "data": {
                "proposer": "jesse.tcd",
                "proposal_name": "hotfix.evm",
                "level": {
                    "actor": "caleosblocks",
                    "permission": "active"
                }
            }
        }
    ],
    "transaction_extensions": []
}'