npm install -g truffle
truffle unbox Cryptape/AppChain-Truffle-Box
npm install
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],
},
}
Set network by --network [network name]
One of host + port
and provider
should be configured to deploy smart contract to cita
Chain id of cita, default to 0.
Your private key to send transaction.
Use to prevent double-spending, default to random integer from 1 - 100
Similar to gas, default to 99999
default to 0
Similar to timeout, default to current height + 88
truffle compile
-
Add migration scripts in
migration
-
Migrate to CITA
npm run cita:migrate