0.0.1 • Published 7 years ago
appchain-truffle-box v0.0.1
AppChain-Truffle-Box
Installation
Install truffle
npm install -g truffleUnbox Repository
truffle unbox Cryptape/AppChain-Truffle-BoxInstall Dependencies
npm installUsage
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 compileMigration
Add migration scripts in
migrationMigrate to CITA
npm run cita:migrate
0.0.1
7 years ago