0.0.1 • Published 6 years ago
appchain-truffle-box v0.0.1
AppChain-Truffle-Box
Installation
Install truffle
npm install -g truffle
Unbox Repository
truffle unbox Cryptape/AppChain-Truffle-Box
Install Dependencies
npm install
Usage
Config
You can configure your box in truffle-cita.js
.
module.exports = {
networks: {
development: {
host: '127.0.0.1',
port: 1337,
network_id: '*', // Match any network id
},
},
contractInfo: {
chainId: 0,
privkey: 'private key',
// validUntilBlock: [block number + 88],
// nonce: [random int],
// quota: [999999],
// version: [0],
},
}
networks
Set network by --network [network name]
One of host + port
and provider
should be configured to deploy smart contract to cita
contractInfo
chainId required
Chain id of cita, default to 0.
privkey required
Your private key to send transaction.
nonce optional
Use to prevent double-spending, default to random integer from 1 - 100
quota optional
Similar to gas, default to 99999
version optional
default to 0
validUntilBlock
Similar to timeout, default to current height + 88
Compile
truffle compile
Migration
Add migration scripts in
migration
Migrate to CITA
npm run cita:migrate
0.0.1
6 years ago