新手问答 谁能讲讲 push_transaction 中 data 的生成规则

NM1024 · 2018年09月20日 · 最后由 vergil 回复于 2018年09月26日 · 391 次阅读
{
    "transaction":{
        "expiration":"2018-09-19T09:26:59",
        "ref_block_num":45776,
        "ref_block_prefix":1127475773,
        "max_net_usage_words":0,
        "max_cpu_usage_ms":0,
        "delay_sec":0,
        "context_free_actions":[

        ],
        "actions":[
            {
                "account":"eosio",
                "name":"newaccount",
                "authorization":[
                    {
                        "actor":"tequan1",
                        "permission":"active"
                    }
                ],
                "data":"000000204ca3adca204208c61893b1ca01000000010003ccce062db75031518c2c912503dff61994ce48ee7d2dfdaea9f0e28ca20eab740100000001000000010003ccce062db75031518c2c912503dff61994ce48ee7d2dfdaea9f0e28ca20eab7401000000"
            },
            {
                "account":"eosio",
                "name":"buyram",
                "authorization":[
                    {
                        "actor":"tequan1",
                        "permission":"active"
                    }
                ],
                "data":"000000204ca3adca204208c61893b1ca10270000000000000453595300000000"
            },
            {
                "account":"eosio",
                "name":"delegatebw",
                "authorization":[
                    {
                        "actor":"tequan1",
                        "permission":"active"
                    }
                ],
                "data":"000000204ca3adca204208c61893b1ca102700000000000004535953000000001027000000000000045359530000000000"
            }
        ],
        "transaction_extensions":[

        ]
    },
    "available_keys":[
        "EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
        "EOS5MiwD5cPUy4gZNHQquDgFD5dPzEtqskgZwBWr1Hk3V6pMvujuG",
        "EOS7YUNnXBjwHZuhguDR9EReZgY3Nzwh5Tg3qzVauFpWgsVy1waHs",
        "EOS8PRzZoJN19VUnDxn2jPqtidCWvkqKQ4izyL7RDZkAmaDUCQCfm"
    ]
}
共收到 3 条回复

data的规则和合约有关的, 并不是每个合约都是一样的规则.

strahe 回复

为什么有的data存储在数据库中是json串有的是哈希值

不是json的hash,是具体合约data定义参数的字节流

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册