Understanding ABI Files

  ABI files can be generated using the eosio-cpp utility provided by eosio.cdt. The Application Binary Interface (ABI) is a JSON-based description.

1、ABI的基本结构

{
"version": "eosio::abi/1.0",
"types": [],
"structs": [],
"actions": [],
"tables": [],
"ricardian_clauses": [],
"abi_extensions": [],
"___comment" : ""
}

2、types describe the custom types that are used as a parameter in any public action or struct that needs to be described in the ABI.

  EOSIO implements a number of custom built-ins. Built-in types don't need to be described in an ABI file. If you would like to familiarize yourself with EOSIO's built-ins, they are defined here

  

3、structs

  action的数据会存在于 structs中。如create action。

{
"name": "create",
"base": "",
"fields": [
{
"name":"issuer",
"type":"name"
},
{
"name":"maximum_supply",
"type":"asset"
}
]
}

  

  struct会被写入 structs中。

{
"name": "currency_stats",
"base": "",
"fields": [
{
"name":"supply",
"type":"asset"
},
{
"name":"max_supply",
"type":"asset"
},
{
"name":"issuer",
"type":"account_name"
}
]
}

  

4、actions

{
"name": "transfer", //The name of the action as defined in the contract
"type": "transfer", //The name of the implicit struct as described in the ABI
"ricardian_contract": "" //An optional ricardian clause to associate to this action describing its intended functionality.
}

  每一个action会隐含(implicit)创建一个struct,通过type来指向。action'name struct'name are not required to be equal.

5、tables

6、Every time you 1)change a struct, 2)add a table, 3)add an action or 4)add parameters to an action, 5)use a new type, you will need to remember to update your ABI file. In many cases failure to update your ABI file will not produce any error.

7、

参考:

1、https://developers.eos.io/eosio-home/docs/the-abi

Understanding ABI Files的更多相关文章

  1. RASPBERRY PI 外设学习资源

    参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi         Get st ...

  2. 理解CSV文件以及ABAP中的相关操作

    在很多ABAP开发中,我们使用CSV文件,有时候,关于CSV文件本身的一些问题使人迷惑.它仅仅是一种被逗号分割的文本文档吗? 让我们先来看看接下来可能要处理的几个相关组件的词汇的语义. Separat ...

  3. npm5 packag-lock.json

    前几天升级了 Node.js v8.0 后,自带的 npm 也升级到了5.0,第一次使用的时候确实惊艳到了:原本重新安装一次模块要十几秒到事情,现在一秒多就搞定了.先不要激动,现在我来大概讲一下 np ...

  4. visualstu studio的 pdb调试文件

    1. 该博客介绍了pdb文件的概念,作用. 将该博文复制到最后了. https://devblogs.microsoft.com/devops/understanding-symbol-files-a ...

  5. What you should know about .so files

    In its early days, the Android OS was pretty much supporting only one CPU architecture: ARMv5.Do you ...

  6. Linking code for an enhanced application binary interface (ABI) with decode time instruction optimization

    A code sequence made up multiple instructions and specifying an offset from a base address is identi ...

  7. Understanding C++ Modules In C++20 (1)

    Compiling evironment: linux (ubuntu 16.04)+ gcc-10.2. The Post will clarify and discuss what modules ...

  8. Clang与libc++abi库安装

    系统ubuntu64位 Clang4.0 参考: 1 https://github.com/yangyangwithgnu/use_vim_as_ide#0.1 其中 第7章 工具链集成 2. htt ...

  9. ural 2073. Log Files

    2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...

随机推荐

  1. Windows下用PIP安装scipy出现no lapack/blas resources found

    Windows下升级了pandas,但是发现scipy包随后引用出错,后来确认需重新安装scipy, 在用PIP安装scipy出现no lapack/blas resources found的错误,具 ...

  2. webpack初步学习

    https://segmentfault.com/a/1190000006178770 该篇文章足够webpack入门的学习了,对webpack有个初步的了解和认识.

  3. Python数据存储:pickle模块的使用讲解

    在机器学习中,我们常常需要把训练好的模型存储起来,这样在进行决策时直接将模型读出,而不需要重新训练模型,这样就大大节约了时间.Python提供的pickle模块就很好地解决了这个问题,它可以序列化对象 ...

  4. uip移植telnetd并加入自己定义命令

    版权声明: https://blog.csdn.net/cp1300/article/details/30541507 刚刚移植了一下uip的telnetd,还是比較简单方便的. 首先加入文件,注意u ...

  5. Http原理与实践

    Http原理 一.使用Http协议最简单的例子 1.输入URL打开网页 2.AJAX获取数据 3.img标签加载图片 二.Cache-Control 1.public.private 2.must-r ...

  6. zookeeper的WEB客户端zkui使用

    转载自:http://blog.csdn.net/csolo/article/details/53694665 前面几篇实践说明了zookeeper如何配置和部署,如何开发,因为大多是后台操作,对于维 ...

  7. DataTable.Select 处理关联表数据

    DataSet.Clone  会拷贝表结构,关联关系也会拷贝, 用Select 筛选后ImportRow 导入新的DataTable,然后处理关联DataTable DataSet ds2 = dsS ...

  8. DokuWiki 插件使用

    本身DokuWiki提供了一些公共,但是不是很强大,所以可以安装一些插件. 安装方法可以参考:https://www.dokuwiki.org/extensions 下面列举出我觉得好用的一些插件: ...

  9. solr6.4.1搜索引擎(3)增量同步mysql数据库

    尚未实现首次同步mysql数据库的,请参考我的另一篇文章http://www.cnblogs.com/zhuwenjoyce/p/6512378.html(solr6.4.1搜索引擎同步mysql数据 ...

  10. PAT 乙级 1086 就不告诉你 (15 分)

    1086 就不告诉你 (15 分) 做作业的时候,邻座的小盆友问你:“五乘以七等于多少?”你应该不失礼貌地围笑着告诉他:“五十三.”本题就要求你,对任何一对给定的正整数,倒着输出它们的乘积. 输入格式 ...