Understanding ABI Files
【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的更多相关文章
- RASPBERRY PI 外设学习资源
参考: http://www.siongboon.com/projects/2013-07-08_raspberry_pi/index.html Raspberry Pi Get st ...
- 理解CSV文件以及ABAP中的相关操作
在很多ABAP开发中,我们使用CSV文件,有时候,关于CSV文件本身的一些问题使人迷惑.它仅仅是一种被逗号分割的文本文档吗? 让我们先来看看接下来可能要处理的几个相关组件的词汇的语义. Separat ...
- npm5 packag-lock.json
前几天升级了 Node.js v8.0 后,自带的 npm 也升级到了5.0,第一次使用的时候确实惊艳到了:原本重新安装一次模块要十几秒到事情,现在一秒多就搞定了.先不要激动,现在我来大概讲一下 np ...
- visualstu studio的 pdb调试文件
1. 该博客介绍了pdb文件的概念,作用. 将该博文复制到最后了. https://devblogs.microsoft.com/devops/understanding-symbol-files-a ...
- 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 ...
- 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 ...
- Understanding C++ Modules In C++20 (1)
Compiling evironment: linux (ubuntu 16.04)+ gcc-10.2. The Post will clarify and discuss what modules ...
- Clang与libc++abi库安装
系统ubuntu64位 Clang4.0 参考: 1 https://github.com/yangyangwithgnu/use_vim_as_ide#0.1 其中 第7章 工具链集成 2. htt ...
- ural 2073. Log Files
2073. Log Files Time limit: 1.0 secondMemory limit: 64 MB Nikolay has decided to become the best pro ...
随机推荐
- C++中的指针,指针函数和函数指针
指针是C或C++中的一大难题,因此弄懂指针对C和C++的学习有很大的帮助,最近一直在研究指针,因此写一篇随笔把心得记录一下. 简单来说指针也是一种变量,只不过指针变量所存储的不是我们直观上看到的,而是 ...
- C#程序优化的50种方案
一.用属性代替可访问的字段 1..NET数据绑定只支持数据绑定,使用属性可以获得数据绑定的好处: 2.在属性的get和set访问器重可使用lock添加多线程的支持. 二.readonly(运行时常量) ...
- python要开始记录了20181125
print('1.使用while循环输入 1 2 3 4 5 6 8 9 10') i = 1 while i < 10: i += 1 if i == 7: continue #print(' ...
- Excel技巧--实现交叉查询
如上图,要实现某个地区和某个产品的销售额查询显示.可以使用Match和Index函数的使用来实现: 1.产品名称和城市栏,制作成列表可选:使用“数据”-->“数据验证”的方法. 2.先在旁边空位 ...
- Java8-dateTimeFormatter
时间格式化LocalDate,DateTimeFormatter--->parse,ofParttern 伴随lambda表达式.streams以及一系列小优化,Java 8 推出了全新的日期时 ...
- python eval()和exec()以及complie()
1.eval() 函数 eval() 函数用来执行一个字符串表达式,并返回表达式的值. ------->> eval(expression[, globals[, locals]]) 参 ...
- [UE4]Button
一.按钮有4种状态:Normal(普通状态).Hovered(鼠标悬停状态).Pressed(鼠标按下状态).Disabled(禁用状态),可以分别给每种状态设置样式. 二.按钮有如图所示的5个事件, ...
- 冷知识点:COLLATE 关键字是什么意思?
mysql 数据库表: CREATE TABLE `book_order_test` ( `order_id` varchar(50) COLLATE utf8_bin DEFAULT NULL CO ...
- ECMAScript 6 学习总结
1.什么是ES6? 简单的说 ES6 的第一个版本,在2015年6月发布了,正式名称就是<ECMAScript 2015标准>(简称 ES2015)在2016年6月,小幅修订的<EC ...
- Node安装及自定义config
下载Node.js , Windows下安装一键到底, 没有什么说的. 主要是默认无法流畅使用, 包括流畅下载, 全局缓存之类. 如下是进一步设置, 包括: - 设置淘宝镜像. - 增加Yarn(np ...