查询ABI
命令格式:$ cleos get code -a ${contract}.abi ${contract}
我们可以在区块链中查询合约的.abi,我们可以在其中查看可用操作列表及其各自的消息结构
$ cleos get code -a currency.abi currency
code hash: 9b9db1a7940503a88535517049e64467a6e8f4e9e03af15e9968ec89dd794975
saving abi to currency.abi
$ cat currency.abi
{
"types": [{
"newTypeName": "AccountName",
"type": "Name"
}
],
"structs": [{
"name": "transfer",
"base": "",
"fields": {
"from": "AccountName",
"to": "AccountName",
"amount": "UInt64"
}
},{
"name": "account",
"base": "",
"fields": {
"account": "Name",
"balance": "UInt64"
}
}
],
"actions": [{
"action": "transfer",
"type": "transfer"
}
],
"tables": [{
"table": "account",
"indextype": "i64",
"keynames": [
"account"
],
"keytype": [],
"type": "account"
}
]
}
分享个《EOS智能合约与DApp开发入门教程》,欢迎大家来学习互动:
本教程帮助你快速入门EOS区块链去中心化应用的开发,内容涵盖EOS工具链、账户与钱包、发行代币、智能合约开发与部署、使用代码与智能合约交互等核心知识点,最后综合运用React和EOS的各知识点完成一个便签DApp的开发。
来源:oschina
链接:https://my.oschina.net/u/3837977/blog/1915844