EOS源码
摘要:【EOS源码】 1、在 libraries/chain/include/eosio/chain/ 目录下。 permission_level 定义如下: account_name、permission_name 等以下类型是都是 name 的别名。 而 name 是 eosio::chain:: 命
阅读全文
eosjs
摘要:【eosjs】 Javascript API,用于帮助访问与 EOSIO RPC API. 1、安装 2、Signature Provider The Signature Provider holds private keys and is responsible for signing trans
阅读全文
EOS的发币逻辑
摘要:【EOS的发币逻辑】 EOS官网的Guide中(参考[1]),描述了如何发自己的Token: 1、创建一个contract。 2、有一些create、transfer、close action。 3、发布,调用一下create,即发行了一种币。 发完币后,可以通过cleos命令,获取发币信息: 但是
阅读全文
加入 Jungle Testnet
摘要:【加入 Jungle Testnet】 主网测试需要消耗大量 EOS,JungleTestnet为我们提供了一个测试用的EOS主链,上面的EOS可以通过申请获得。每6小时可以申请100EOS。 【创建账号】 1、数据的查询。 JungleTestnet的数据在 eospark.com 上可以查看。e
阅读全文
Setting up Scatter for Web Applications
摘要:【Setting up Scatter for Web Applications】 If you are still using scatter-js please move over to scatterjs-core. 1、ScatterJS 分为以下5个部分: 2、浏览器中可以通过 <scri
阅读全文
EOS踩坑记 2
摘要:【EOS踩坑记 2】 1、--contracts-console 在开发模式下,需要将 nodeos 添加此选项。 2、Debug Method The main method used to debug smart contract is Caveman Debugging, where we u
阅读全文
Communication Model
摘要:【Communication Model】 EOSIO actions operate primarily in a message-based communication architecture. A client invokes actions by sending (pushing) mes
阅读全文
EOS踩坑记
摘要:【EOS踩坑记】 1、每个account只能更新自己的contract,即使两个account的秘钥相同,也不允许。 如下,使用alice的权限来更新james的contract。会返回 Missing required authority错误。 应该改为: 2、contract class 名可以
阅读全文
Windows导入EOS工程
摘要:【Windows导入EOS工程】 编写 EOS 智能合约时,有许多EOS提供的结构、函数、宏。文档对这些内容的描述毕竟模糊,再多的文档也比不过看实际的代码,所以还要下载EOS代码看一下。 最好有个IDE,能够智能跳转。比如官方的Hello Demo中,有一个类型叫name,如果有IDE的自动跳转,C
阅读全文
搭建EOS环境
摘要:【搭建EOS环境】 1、Ubuntu 18.04 下安装eosio 在~目录下创建 contracts 目录。 2、启动钱包。 启动成功的话,可以看见下面的输出。 3、启动nodeos These settings accomplish the following: Using a work dir
阅读全文
加入EOS主网
摘要:【加入EOS主网】 根据之前的博文,可以直接在本地测试单节点网络。这里再给出一下。详情见[参考1]。 cleos 通过 --url指定连接的 nodeos,通过 --wallet-url 指定连接的 --wallet-url。若要连接主网,将 --url改为主网的nodeos地址即可。 原开发用cl
阅读全文
Add Inline Actions
摘要:【Add Inline Actions】 1、为了使用 inline action,需要给 eosio.code 账号添加active权限。 To use the 'activeauthority inline you will need your contract's to give active
阅读全文
Secondary Indices
摘要:【Secondary Indices】 EOSIO has the ability to sort tables by up to 16 indices. A table's struct cannot be modified when it has data in it. \ 1、添加第二列索引
阅读全文
Data Persistence
摘要:【Data Persistence】 1、构建环境。 2、新建合约,有两要点注意 1)class 与类名间添加 [[eosio::contract]] 2)新类继承于 public eosio::contract 3、创建Table Record 结构. 注意在 struct 和 name 之间,要
阅读全文
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 JS
阅读全文
Deploy, Issue and Transfer Tokens
摘要:【Deploy, Issue and Transfer Tokens】 本例使用 eosio.token 合约来尝试发行Token. 1、签出 eosio.contracts。 这里头有很多eosio写的标准合约。 我们将使用上图中的 eosio.token 合约来练习发布 token。 2、eos
阅读全文
Smart Contract - Hello World
摘要:【编写Smart Contract】 1、包含头文件. 2、使用命名空间 3、实现一个空的合约 4、合约中添加一个action 5、添加转发表 6、使用 eosio-cpp -o --abigen 生成 .wasm、.abi 7、用set contract 命令发布合约 -p 指明需要 hello的
阅读全文
EOS 权限
摘要:【EOS权限】 1、查看权限 2、使用 cleos set account permission 命令来修改权限 可以看到,owner、active 这种东西叫做 permission,这其中具体的内容叫做 authority。如下例: $ cleos set account permission
阅读全文
cleos
摘要:【cleos】 1、在.bashrc中加入以下代码,方便直接使用 cleos,7777是nodeos端口,5555是keosd端口。 2、进入bash的命令 3、创建钱包需要 --file 或 --to-console 命令 cleos wallet create 的选项有三个: 可以看到,如果没有
阅读全文
EOS.IO Technical White Paper v2
摘要:【EOS.IO Technical White Paper v2】 Abstract: The EOS.IO software introduces a new blockchain architecture designed to enable vertical and horizontal sc
阅读全文