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. Git版本库创建(包含文件权限设置 Linux环境下)

    确保git服务已安装成功,如果没有安装git服务查看:Git源码安装 Linux指定安装目录 1.创建git用户,并设置密码.并禁止git用户通过shell登录服务器(注意如果需要安装gitolite ...

  2. 洛谷P1219 :八皇后(DFS+回溯)

    题目描述 检查一个如下的6 x 6的跳棋棋盘,有六个棋子被放置在棋盘上,使得每行.每列有且只有一个,每条对角线(包括两条主对角线的所有平行线)上至多有一个棋子. 上面的布局可以用序列2 4 6 1 3 ...

  3. alpha冲刺(7/10)

    前言 队名:旅法师 作业链接 队长博客 燃尽图 会议 会议照片 会议内容 陈晓彬(组长) 今日进展: 召开会议 撰写博客 项目初步整合前端代码 问题困扰: 大家可能因为某些问题会联系卡在某个点很久,需 ...

  4. 12.python-metaclass元类

    1.python中一切皆是对象,类本身也是一个对象,当使用关键字class的时候,python解释器在加载class的时候会创建一个对象(这里的对象指的是类而非类的实例) class Foo: #cl ...

  5. ionic使用的一些技巧

    使用ionic总结: 1.全局禁用缓存的方法是:  $ionicConfigProvider.views.maxCache(0); 2. 在不同的用户输入场景下,需要显示不同的键盘模式以方便用户输入, ...

  6. Linux 开机启动 php socket

    问题 php socket 服务在服务器重启后无法自动启动,需要添加开机启动脚本.有以下问题 开机延迟3分钟后,再启动socket服务 socket服务有3个模块需要按照先后顺序启动  registe ...

  7. windows与linux换行规则

    在计算机还没有出现之前,有一种叫做电传打字机(Teletype Model 33)的玩意,每秒钟可以打10个字符.但是它有一个问题,就是打完一行换行的时候,要用去0.2秒,正好可以打两个字符.要是在这 ...

  8. Tomcat整体架构分析

    下面让我们来看看Tomcat容器的整体结构: 本文的目的是覆盖这张图中所涉及的主要请求处理组件.而上图中的一些高级主题如集群和安全则不是在本文讨论的范围之内. 本图中,Service, Host, C ...

  9. Android App启动速度优化

    解决在桌面上点击APP图标后经过一两秒后才显示页面,以及App启动后主界面显示过慢问题 一.应用的启动方式 1.冷启动:当启动应用时,后台没有该应用的进程,这时系统会首先会创建一个新的进程分配给该应用 ...

  10. python3学习笔记五(列表2)

    参考http://www.runoob.com/python3/python3-list.html 嵌套列表 a = ['a','b','c']b = [1,2,3]x = [a, b]print(x ...