|
@@ -1,105 +1,8 @@
|
|
|
-## 生成账号 & 部署合约
|
|
|
-1. ### 可以用命令行生成公钥/私钥
|
|
|
-bendeMacBook-Pro:~ ben$ `cleos create key --to-console`
|
|
|
-Private key: 5JgZ2aRteVHmAXdGmjLWzUMMTNMgkoaEcRnSzuQA2nRGMwAsNqB
|
|
|
-Public key: EOS5UJR2Np5NPaAJaNpew5aQBRpEKdKBKftPcWhA5fngx3mrax2Bp
|
|
|
+### 记录数据
|
|
|
|
|
|
-2. ### 通过网站生成账号
|
|
|
-账号地址:[http://jungle.cryptolions.io/#account](http://jungle.cryptolions.io/#account)
|
|
|
-输入 12位的账号、以及上面生成的公钥 生成账号
|
|
|
-<br>
|
|
|
-Account name: luckpoint2co
|
|
|
-Owner Public Key: EOS5UJR2Np5NPaAJaNpew5aQBRpEKdKBKftPcWhA5fngx3mrax2Bp
|
|
|
-Active Public Key: EOS5UJR2Np5NPaAJaNpew5aQBRpEKdKBKftPcWhA5fngx3mrax2Bp
|
|
|
-<br>
|
|
|
-检验账号是否创建:
|
|
|
-`cleos -u https://api.jungle.alohaeos.com/ get account luckpoint2co`
|
|
|
-* ### 创建一个钱包
|
|
|
- * `cleos wallet create --to-console` 或者是 `cleos wallet create --name mywallet --to-console`
|
|
|
- 注意:不带 `--name xxx` 时则使用 `default` 为钱包名字;
|
|
|
- 如果想对指定钱包操作,每次都需要带上这个参数及名字,在往下的`cleos`对钱包的操作中不再重复
|
|
|
-
|
|
|
- * `cleos wallet unlock --password PW5xxxxxxxxxx...`
|
|
|
- 后面紧跟着是前面生成的密钥,当然也可能通过隐性的方式输入密钥
|
|
|
- 如:`cleos wallet unlock`,会提示输入密钥
|
|
|
-
|
|
|
- * 导入 luckpoint2co 账号的私钥
|
|
|
- `cleos wallet import --private-key 5JgZ2aRteVHmAXdGmjLWzUMMTNMgkoaEcRnSzuQA2nRGMwAsNqB`
|
|
|
-* ### 编译 & 发布合约
|
|
|
- * 使用 eosiocpp 脚本编译 .cpp 和 .abi 文件:
|
|
|
-
|
|
|
- ```
|
|
|
- cd eos
|
|
|
- eosiocpp -o contracts/dice/dice.wast contracts/dice/dice.cpp
|
|
|
- eosiocpp -g contracts/dice/dice.abi contracts/dice/dice.cpp
|
|
|
- ```
|
|
|
- * 使用luckpoint2co来发布合约:
|
|
|
-
|
|
|
- ```
|
|
|
- cd eos
|
|
|
- cleos -u https://api.jungle.alohaeos.com/ set contract luckpoint2co contracts/dice -p luckpoint2co@active
|
|
|
- ```
|
|
|
- 可能出现的问题:
|
|
|
- <font color=red>Error 3080001: Account using more than allotted RAM usage</font>
|
|
|
- <font color=gold>
|
|
|
- Error Details:
|
|
|
- account luckpoint2co has insufficient ram; needs 349456 bytes has 167452 bytes
|
|
|
- </font>
|
|
|
-
|
|
|
- * 买内存Ram:
|
|
|
- `cleos system buyram payer receiver "10 EOS"`
|
|
|
- 例子:
|
|
|
- cleos -u https://api.jungle.alohaeos.com/ system buyram luckpoint2co luckpoint2co --kbytes 1000
|
|
|
- 可能出现的问题:
|
|
|
- <font color=red>Error 3050003: eosio_assert_message assertion failure</font>
|
|
|
- <font color=gold>
|
|
|
-Error Details:
|
|
|
-assertion failure with message: no balance object found
|
|
|
-pending console output:
|
|
|
- </font>
|
|
|
- * 查询用户余额:
|
|
|
- cleos -u https://api.jungle.alohaeos.com/ get currency balance eosio.token luckpoint2co
|
|
|
- 输出:
|
|
|
-
|
|
|
- ```
|
|
|
- 439.6621 EOS
|
|
|
- 500.0000 JUNGLE
|
|
|
- ```
|
|
|
- * 测试网添加EOS币:
|
|
|
- [http://jungle.cryptolions.io/#faucet](http://jungle.cryptolions.io/#faucet)
|
|
|
- 输入 luckpoint2co ,点击"Send Coins".
|
|
|
-
|
|
|
|
|
|
+,因为clickhouse支持数组插入,与一般的ddl不一样,所以弄了一个sql工具类,主要是来构造插入语句(支持插入数组),这个方法是来源第三方包```smi2/phpclickhouse```,基础框架不支持数组插入,放在了```/protected/extensions/SqlUtils.php```
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-XXX445
|
|
|
-
|
|
|
-![screenshot of conversion](https://raw.github.com/adam-p/markdown-here/master/store-assets/markdown-here-image1.gimp.png)
|
|
|
-
|
|
|
-### Table of Contents
|
|
|
-**[Installation Instructions](#installation-instructions)**<br>
|
|
|
-**[Usage Instructions](#usage-instructions)**<br>
|
|
|
-**[Troubleshooting](#troubleshooting)**<br>
|
|
|
-**[Compatibility](#compatibility)**<br>
|
|
|
-**[Notes and Miscellaneous](#notes-and-miscellaneous)**<br>
|
|
|
-**[Building the Extension Bundles](#building-the-extension-bundles)**<br>
|
|
|
-**[Next Steps, Credits, Feedback, License](#next-steps)**<br>
|
|
|
-
|
|
|
-## Installation Instructions
|
|
|
-
|
|
|
-### Chrome
|
|
|
-
|
|
|
-#### Chrome Web Store
|
|
|
-
|
|
|
-Go to the [Chrome Web Store page for *Markdown Here*](https://chrome.google.com/webstore/detail/elifhakcjgalahccnjkneoccemfahfoa) and install normally.
|
|
|
-
|
|
|
-After installing, make sure to reload your webmail or restart Chrome!
|
|
|
+记录方法```actionGetData```
|
|
|
+把数据拼装,并且批量插入数据,在```/protected/controllers/TestController```
|