I am making an offline transaction. I am providing the API with the following parameters as an object:

rpc: new JsonRpc('https://jungle.eos.dfuse.io/', { fetch }),
signatureProvider: new JsSignatureProvider(this.privateKeys),
textDecoder: new TextDecoder(),
textEncoder: new TextEncoder(),
chainId: 'e70aaab8997e1dfce58fbfac80cbbb8fecec7b99cf982a9444273cbc64c41473',
abiProvider, authorityProvider: Promise.resolve(this.privateKeys)

I am fetching the abi from /get_raw_abi. Using JSON.stringify() to convert it into a string, then converting it to base64 using buffer, then converting that to binary by base64ToBinary

I am saving the result as follows:

const result = await this.eosApi.transact({
    actions: [createAccount, buyRam, delegateBw],
    ref_block_num: refBlockNum,
    ref_block_prefix: RefBlockPrefix,
    expiration: new Date(new Date().getTime() + 30 * 60000)
    }, {
    broadcast: false, sign: true

I am getting the error: Error: fetching abi for eosio: Unsupported abi version

Where am I going wrong?


It would be easier to help you out if you'll post the definitions of createAccount, buyRam, delegateBw & abiProvider and tell us what eosjs version you're using. :)

Post comment edit: Found the issue - eosjs's JsonRpc currently messes things up when being instantiated with an endpoint with a trailing forward slash, just use https://jungle.eos.dfuse.io instead of https://jungle.eos.dfuse.io/.

P.S. - I was about to open a pull request for eosjs to fix this, but then I saw they already fixed it in the develop branch - https://github.com/EOSIO/eosjs/blob/develop/src/eosjs-jsonrpc.ts#L33 (damn...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.