Add lock and burn token function to eosio.token contract.
- Fully compatible with eosio.token contracts. so you can use below commands to interact with this contract.
cleos get currency stats ${contract_name} ${symbol_name}
cleos get currency balance ${contract_name} ${owner} ${symbol_name}
cleos transfer -c ${contract_name} ${from} ${to} ${asset} ${memo}
- You can set the lock rules for each user, and you can set the start time of the locking issue.
- issuer can burn the tokens away in the issuer's balance, which will also reduce the total token supply.
说明:审查报告中需包含
- 合约文件的ipfs地址,合约文件包括 *.hpp *.cpp *.wasm *.wast *.abi
- eos-dev镜像的 version 和 id (eosio/eos-dev作为统一编译环境)
- 编译命令
Note: Audit report should includes:
- the ipfs addresses of the contract files. The contract files include *.hpp *.cpp *.wasm *.wast *.abi.
- eos-dev image version and id (we use docker image eosio/eos-dev as unified compiler environment)
- compiling commands
Audit Report: image-url
整个审核过程中,为了保证相关文件内容的确定性,合约文件均采用IPFS进行存储和获取。
交付和审核的内容均以 ipfs 地址为准,而不是以 github repo 中的文件为准。
- 项目方将定稿的合约文件上传到ipfs网络,并在下表中填写对应文件的ipfs地址,之后向安全团队提出审查申请。
- 安全团队根据ipfs地址下载合约文件进行审查。
- 若发现漏洞,安全团队和项目方协作修改文件,之后,项目方重新上传合约文件到ipfs网络,再次审核。
- 审核通过后,安全团队提供审核报告。
During the entire audit process, in order to ensure the certainty of the content, the contract files are stored and acquired by IPFS protocal. The files of delivery and audit are based on the IPFs address, not the files in GitHub repo.
- The project party uploads the finalized contract files to the IPFS network, fills in the IPFS address of the corresponding files in the following table, and then submits an application for audit to the security team.
- the security team will audit the contract documents according to the IPFS address.
- If a vulnerability is found, the security team and the project party cooperate to modify the source code. After that, the project party uploads these updated contract files to the IPFS network again, and security team audit again.
- when the audit passed, the security team will provide the audit report.
version | file | ipfs address |
---|---|---|
v1 | tokenlock.hpp | QmaBdrXhooSjajKvKNnYViMTg4kTzdJV96LAsFasuyUPZT |
v1 | tokenlock.cpp | Qmca5a3vCvctaNzC7hbDkda3gAD1CR6pyWAjM5S5L8kPdK |
v1 | tokenlock.wast | QmXLXEmLQqRL8ZMPoskH5rwwebRHKrHfz7hL6v8C7tNqWU |
v1 | tokenlock.wasm | Qmef92Gfr5CMqnAXLytDcVfTDtbVjZvTjrjqJSsu2wAtT1 |
v1 | tokenlock.abi | QmVQPWTZD2xvZLjU83aaWpjPtNo5fG5rbvhSeeXkkxbLTt |
version: v1
eosio-dev: version v1.1.1 , image id 8fa0988c81cc
build command:
cd contracts/tokenlock
docker run --rm -v `pwd`:/scts eosio/eos-dev:v1.1.1 bash -c "cd /scts \
&& eosiocpp -o ${contract}.wast ${contract}.cpp \
&& eosiocpp -g ${contract}.abi ${contract}.cpp"
Notes:
ipfs gateway list
you can access these files through any active ipfs gateway, such as https://ipfs.io/ipfs/<ipfs-address>
.
ipfs add <file name>
ipfs get <ipfs address>