在QTUM测试网络上体验参与ICO众筹


  • qtum team

    在QTUM测试网络上体验ICO众筹

    1.简介

    • 合约地址:802045d58789706b9c0111c8fda5319af8b91413
    • 代币名称:SKY
    • 起始时间:北京时间2017年8月23日11:00:00
    • 结束时间:北京时间2017年8月30日00:00:00
    • 兑换比例:1 QTUM = 100 SKY
    • 最小众筹目标:100万 SKY(未达到最小目标可退还QTUM)
    • 最大众筹目标:1亿 SKY
    • 创始团队占比:10%
    • 合约源码:https://github.com/icodeface/SimpleCrowdSale
    • 注:此token仅供测试娱乐所用,无任何实际价值
    • 没有测试币的同学可以在这里领取 http://skynet.qtum.me/

    2.桌面钱包安装

    3.参与众筹

    • 在钱包的“Send to Smart Contract”页面,填入合约地址Contract Address:802045d58789706b9c0111c8fda5319af8b91413,参数 Data Hex:d7bb99ba, 众筹QTUM数量Amount:xxx 。
    • 点击“Send To Contract”即参与本次ICO。
    • 同时记录下弹窗中的sender和hash160地址,以便后续使用。

    4.查看token数量

    • 待交易被确认即可查看token数量
    • 新建一个名为interface.json 的文件,内容如下:[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"endTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"finalize","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"founder","outputs":[{"name":"","type":"address"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"refund","outputs":[],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"standard","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenContributionCap","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"startTime","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenContributionMin","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"tokenContributionRate","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"founderPercentOfTotal","outputs":[{"name":"","type":"uint8"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"type":"function"},{"constant":true,"inputs":[],"name":"funding","outputs":[{"name":"","type":"bool"}],"payable":false,"type":"function"},{"constant":false,"inputs":[],"name":"contribute","outputs":[{"name":"amount","type":"uint256"}],"payable":true,"type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"type":"function"},{"inputs":[],"payable":false,"type":"constructor"},{"payable":true,"type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_this","type":"address"}],"name":"ContractCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_contributor","type":"address"},{"indexed":false,"name":"_amount","type":"uint256"},{"indexed":false,"name":"_return","type":"uint256"}],"name":"Contribution","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Refund","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_time","type":"uint256"}],"name":"Finalized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_from","type":"address"},{"indexed":true,"name":"_to","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"_owner","type":"address"},{"indexed":true,"name":"_spender","type":"address"},{"indexed":false,"name":"_value","type":"uint256"}],"name":"Approval","type":"event"}]
    • 使用ethabi(https://github.com/paritytech/ethabi)对参数进行编码,执行命令ethabi encode function interface.json balanceOf -p 上一步保存hash160地址,将返回的数据保存下来。
    • 在钱包的“Call Contract”页面,填入合约地址Contract Address:802045d58789706b9c0111c8fda5319af8b91413, 参数 Data Hex :上一步保存的数据。
    • 点击“Call Contratc”,即可在弹窗数据的output中看到16进制的token数量。

      16进制的3e8转换为10进制即为1000

    5.使用手机钱包查看

    • 打开QTUM手机钱包(源码地址https://github.com/qtumproject/qtum-android ,https://github.com/qtumproject/qtum-ios),
    • 在“Profile”页中选择“Smart Contract”,在二级页面中选择“Watch Token”
    • 填写Token Name:SKY
    • 地址Token Address:802045d58789706b9c0111c8fda5319af8b91413
    • ABI 接口:把interface.json中的数据复制过来。
    • 点击OK即可完成
    • 在主页面侧滑进入Other Tokens页

    6.转移token

    这里以桌面钱包向手机钱包中转移token为例

    • 复制手机钱包中QTUM地址
    • 在桌面钱包的Console页面输入命令 gethexaddress "手机钱包中QTUM地址",得到该地址的hash160地址,保存下来。

    • 使用命令ethabi encode function interface.json transfer -p 上一步保存hash160地址 数量 --lenient ,保存返回的数据。
    • 在钱包的“Send to Smart Contract”页面,填入合约地址Contract Address:802045d58789706b9c0111c8fda5319af8b91413, 参数 Data Hex:上一步保存的数据, Sender Address 填写第一步中保存的地址。
    • 点击“Send to Contract”,片刻之后便可在手机钱包上看到token了。


  • This post is deleted!

Log in to reply
 

Looks like your connection to QTUM was lost, please wait while we try to reconnect.