Skip to content
Develop DApps on CITA
Branch: master
Clone or download
zengbing15 Merge pull request #33 from timmyz/fix-readme
replace the git clone url `appchain` to `cita`
Latest commit 1cfb6d4 May 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
migrations fix:set the compiler solc version for given sample;update to new cita… Mar 4, 2019
LICENSE Create LICENSE Aug 14, 2018 replace the git clone url to May 16, 2019 replace the git clone url to May 16, 2019
package.json fix: make deployment work on cita v0.19 Apr 9, 2019
truffle-box.json update: change name Aug 6, 2018
truffle-config.js fix: make deployment work on cita v0.19 Apr 9, 2019



English | 简体中文

CITA-Truffle-Box is based on truffle-box to develop and used for developing DApps on CITA. Please refer toour document for more details about CITA.

Notice: This project rewrite truffle migrate part of truffle-box, please read truffle-tutorial first, especially RUNNING MIGRATIONS part.


  1. Install Truffle globally

To use CITA-Truffle-Box, please install truffle.

yarn global add truffle
  1. Download
git clone
cd cita-truffle-box/
rm -rf .git
yarn install


You can configure your box in truffle.js.

The configure options are shown below.

module.exports = {
  networks: {
    development: {
      host: 'ip_address', // eg. ''
      port: 'port', // eg. 1337
      network_id: '*', // Use '*' to match any network id
      privateKey: 'private key', // a string, required
      // the following parameters are OPTIONAL
      // validUntilBlock: 999999, // an int,  default to (current block number)+88
      // nonce: '999', // a string, default to random int
      // quota: 999999, // an int, defaut to 999999
    }, // you can add other network after here


You must use 'development' as the key for now.

  • host[required]
    Specify the host ip_address, don't add protocol name.

  • port[required]
    Specify the host port.

  • network_id[required]
    In order to be compatible with truffle, you have to set this attribute, but it's meaningless here.

  • privateKey [required]
    Your private key for sending transaction.

  • nonce [optional]
    Nonce is a string used to prevent double-spending, default to be a random number from 1 ~ 100. Note that the type of nonce is string.

  • quota [optional]
    Similar to gas in ethereum, default value is 99999.

  • validUntilBlock [optional]
    Similar to timeout, default to be current block height + 88


Compile the smart contract.

truffle compile


First, add your migration scripts in /migration, for the details, please refer RUNNING MIGRATIONS for more details.

Input the command to do migration. (Note that we can NOT use truffle migrate command here...)

yarn migrate
You can’t perform that action at this time.