刘洋的博客分享 http://blog.sciencenet.cn/u/outcrop 管中窥豹,盲人摸象

博文

AEX 11 Fungible Token Standard(dratf)

已有 2860 次阅读 2019-11-17 11:49 |个人分类:计算机应用技术|系统分类:科研笔记

草案完善中,记录下

Interface

contract AEX11Token {
    record meta_info = { name : string
                         symbol : string
                         decimals : int}
    entrypoint meta(): meta_info
    entrypoint total_supply() external : int
    entrypoint balance_of(holder: address) : option(int)

    external default_operators() : list(address)
    external is_operator_for(operator: address, holder: address) : bool
    stateful external authorize_operator(operator: address)
    stateful external revoke_operator(operator: address)

    entrypoint stateful transfer(to: address, amount: int, data: string)
    entrypoint stateful op_transfer(from: address, to: address, amount: int, data: string, op_data: string)

    entrypoint stateful burn(amount: int, data: string)
    entrypoint stateful op_burn(from: address, amount: int, data: string, op_data: string)

    datetype event =
        // operator, from, to, amount ,data, op_data
        Transfer(indexed address,  // operator
                 indexed address,  // from
                 address,          // to
                 int,              // amount
                 string,           // data
                 string)           // op_data
      | Mint(indexed address,  // operator
             indexed address,  // to
             int,              // amount
             string,           // data
             string)           // op_data
      | Burned(indexed address,  // operator
               indexed address,  // from
               int,              // amount
               string,           // data
               string)           // op_data
      | AuthorizedOperator(indexed address,  // operator
                           indexed address)  // holder
      | RevokedOperator(indexed address,  // oprator
                        indexed address)  // holder
}

The token contract MUST implement the above interface. The implementation MUST follow the specifications described below.


来源:https://github.com/aeternity/AEXs/blob/master/AEXS/aex-11.md



https://blog.sciencenet.cn/blog-1750-1206469.html

上一篇:【科学网首发】加热介质转换法提取动物脂肪
下一篇:告别2019,迎来2020
收藏 IP: 14.221.236.*| 热度|

1 杨正瓴

该博文允许注册用户评论 请点击登录 评论 (3 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-26 13:18

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部