depoy_form.sh 1.2 KB

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env bash
  2. # 创建账号eosgetbox123
  3. cleos -u https://api.eosnewyork.io system newaccount --stake-net "0.0500 EOS" --stake-cpu "0.1500 EOS" --buy-ram-kbytes 3 eosgetadmin1 eosgetbox123 EOS5joP2McPANXpEnpDFQW2r3tYuw5BpdMD5TiopeDmxHqKy6XpJi EOS6HSUr68YM1wrAafRwVVnZWyFK5SFU2schdhFTxYpFg2pfwkcQg
  4. cleos wallet unlock -n eosget
  5. # 导入eosgetbox123的私钥
  6. cleos wallet import -n eosget --private-key
  7. # 购买内存
  8. cleos -u https://api.eosnewyork.io system buyram eosgetdice12 eosgetbox123 "50 EOS"
  9. # 抵押CPU,带宽
  10. cleos -u https://api.eosnewyork.io system delegatebw eosgetdice12 eosgetbox123 "0.1000 EOS" "1000.0000 EOS" -p eosgetdice12
  11. # 编辑合约
  12. cd /Users/ben/Desktop/eos_master
  13. eosiocpp -o contracts/box/box.wast contracts/box/box.cpp
  14. eosiocpp -g contracts/box/box.abi contracts/box/box.cpp
  15. # 使用sicbosmartco来发布sicbo合约:
  16. cleos -u https://nodes.get-scatter.com set contract eosgetbox123 contracts/box -p eosgetbox123@active
  17. # 增加修改余额的权限
  18. # cleos -u https://nodes.get-scatter.com set account permission eosgetdice12 active '{"threshold": 1,"keys": [{"key":"EOS7T2QLXGNnpkSdqAWNivGgXkjWjjGSvAoAvgQShhwpTa7dUvWfJ","weight": 1}],"accounts": [{"permission":{"actor":"eosgetdice12","permission":"eosio.code"},"weight":1}]}'