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 ...
随机推荐
- Cortex-M3 跳转到指定bin执行
跳转前指定sp和msp: #if defined(__GNUC__) __attribute__(( naked )) static void set_sp(unsigned long addr) { ...
- Xcode 和 VisualC++输出流的差别的理解
将这样一段程序分别运行与Visual Studio 和 Xcode上边的结果: #include <iostream> using namespace std; int main() { ...
- 2018.4.24 快排查找第K大
import java.util.Arrays; /* 核心思想:利用快排思想,先假定从大到小排序,找枢纽,枢纽会把大小分开它的两边,当枢纽下标等于k时, 即分了k位在它左边或右边,也就是最大或最小的 ...
- while RE Validation
一.简介 为什么需要正则表达式? 文本的复杂处理 正则表达式的优势和用途? 一种强大而灵活的文本处理工具: 大部分编程语言.数据库.文本编辑器.开发环境都支持正则表达式. 正则表达式定义: 正如它的名 ...
- C++11如何减少内存拷贝次数
C++11中出现了很多迷人的特性.例如智能指针实现高效的内存管理,std::bind和std::function函数封装器,以及lambda实现的函数对象语法糖,都是使我着迷的地方. 而C++11最大 ...
- 使用samba或NFS实现文件共享
- PythonStudy——格式化输入小练习
# 练习:用户输入姓名.年龄.工作.爱好 ,然后打印成以下格式# ------------ info of Egon -----------# Name : Egon# Age : 22# Sex : ...
- 百度网盘提交提取密码:根据cookies获取loginId 的js
java下载百度网盘中资料,发现网上都只有关于公开分享的实现,没有关于私有分享的实现,抓包发现有一个关键参数:logid url:https://pan.baidu.com/share/verify? ...
- Oracle DBA最常用的269条命令
1 运行SQLPLUS工具 sqlplus 2 以OS的默认身份连接 / as sysdba 3 显示当前用户名 show user 4 直接进入SQLPLUS命令提示符 sqlplus /nolog ...
- 【算法和数据结构】_16_小算法_IntToStr: 将整型数据转换为字符串
/* IntToStr: 将整型数据转换为字符串 */ #include <stdio.h> void int_to_str(const unsigned long int i_numbe ...