EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

failed to serialize the context_free_actions #814

Open crazybits opened 4 years ago

crazybits commented 4 years ago

Version of EOSJS eosjs@master

Describe the bug failed to serialize the context_free_actions,looks like eosio.null has no abi on mainnet, but the eosjs try to fetch abi.

To Reproduce

await api.transact({
            actions: actions,
            context_free_actions: [{ account: "eosio.null",name: "nonce",authorization: [],data: "010f"}],
        }, { blocksBehind: 3, expireSeconds: 3600 });

err | 2020-11-24 13:34: Error: fetching abi for eosio.null: Read past end of buffer 2|app | 2020-11-24 13:34: at SerialBuffer.get /node_modules/eosjs/src/eosjs-serialize.ts:182:15) 2|app | 2020-11-24 13:34: at SerialBuffer.getVaruint32 (/node_modules/eosjs/src/eosjs-serialize.ts:273:28)

Desktop (please complete the following information):

sanaraufx commented 3 years ago

This is a constraint on how mainnet was configured. Please try on your personal network and verify if eosjs works as expected with the correct ABI. Thanks.

o-alexandrov commented 3 years ago

Having the same issue in testnet. Btw, nonce doesn't exist in the master branch in tests

Has the recommended approach to make transactions unique changed?

No, it's a bug in eosjs. See #1009