What is token hex API and transaction abi in the abieos repo? Can ABI be generated for any transaction on the EOS block chain? If yes, then how?

1 Answer 1


Assuming you're referring to this file, the two are as follows:

tokenHexApi: an array of characters representing the hexadecimal representation of a contract ABI.

const char tokenHexApi[] = "0e656f73696f3a3a6162692f312e30010c6163636f756e745f6e616d65046e61"

If we do some conversion from hex to ASCII, we get something like this:


So this is just a typical contract ABI in hex encoding.

Similarly, transactionAbi is an ABI is JSON.

They are used in abieos_set_abi_hex() and abieos_set_abi() functions in order to upload the ABI to the blockchain (similar to cleos set abi).

Can ABI be generated for any transaction on the EOS block chain?

These are set abi transactions that push an ABI to the chain. ABIs are generated for contracts, and transactions deliver them to the blockchain.

  • thanks but how was ABI converted to JSON? and by contract ABI do you mean the contract.abi file which is generated using eosiocpp -g contract.abi contract.cpp?
    – kstnew
    Aug 11, 2018 at 10:46
  • "how was ABI converted to JSON?" <- you mean hex to JSON to interface with the ABI? hex doesn't need to be converted to JSON; JSON needs to be converted to binary. hex is converted to binary as well here and yes, I mean contract.abi-type of abi
    – confused00
    Aug 11, 2018 at 10:48
  • are the contents of contract.abi file in json format?
    – kstnew
    Aug 11, 2018 at 10:57
  • all the ones i've seen have been json, yes
    – confused00
    Aug 11, 2018 at 10:59
  • does that mean tokenHexApi[] is hexadecimal representation of transactionAbi[] ?
    – kstnew
    Aug 11, 2018 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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