Zeus 入门¶
概述¶
zeus-cmd 是一个可扩展的命令行工具. SDK 的扩展称之为 “boxes”.
Boxes¶
- EOSIO dApp 开发支持
- DAPP 服务支持
硬件要求¶
升级¶
npm update -g @liquidapps/zeus-cmd
测试¶
zeus unbox helloworld
cd helloworld
zeus test
示例 Boxes¶
vRAM¶
- coldtoken - vRAM based eosio.token
- deepfreeze - vRAM based cold storage contract
- vgrab - vRAM based airgrab for eosio.token
- cardgame - vRAM supported elemental battles
- registry - Generic Registry - the1registry
Zeus 扩展¶
Misc.¶
- microauctions - Micro Auctions
- eos-detective-reports - EOS Detective Reports - by EOSNation
- helloworld - Hello World
- token - Standard eosio.token
其他选项¶
zeus compile #compile contracts
zeus migrate #migrate contracts (deploy to local eos.node)
项目结构¶
文件夹结构¶
extensions/
contracts/
frontends/
models/
test/
migrations/
utils/
services/
zeus-box.json
zeus-config.js
zeus-box.json¶
{
"ignore": [
"README.md"
],
"commands": {
"Compile contracts": "zeus compile",
"Migrate contracts": "zeus migrate",
"Test contracts": "zeus test"
},
"install":{
"npm": {
}
},
"hooks": {
"post-unpack": "echo hello"
}
}
zeus-config.js¶
module.exports = {
defaultArgs:{
chain:"eos",
network:"development"
},
chains:{
eos:{
networks: {
development: {
host: "localhost",
port: 7545,
network_id: "*", // Match any network id
secured: false
},
jungle: {
host: "localhost",
port: 7545,
network_id: "*", // Match any network id
secured: false
},
mainnet:{
host: "localhost",
port: 7545,
network_id: "*", // Match any network id
secured: false
}
}
}
}
};
有关权限错误的说明:¶
推荐使用 NVM
sudo apt install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.34.0/install.sh | bash
exec bash
nvm install 10
nvm use 10
或者尝试如下:
sudo groupadd docker
sudo usermod -aG docker $USER
#如果仍然遇到错误:
sudo chmod 666 /var/run/docker.sock