Skip to content

citahub/homebrew-cita

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

homebrew-cita

More details at CITAHub Docs.

Installation

brew tap cryptape/cita

By default, binaries installed by cita will be placed into:

/usr/local/Cellar/cita/0.24.0

Run cita help for more detailed information.

Install docker

brew cask install docker

Note: Please click docker icon and share /usr/local/Cellar/cita.

Install cita

brew install cita

It will install cita_secp256k1_sha3 by default.

Getting-Started

Create Chain

$ cita create --super_admin "0x141d051b1b1922bf686f5df8aad45cefbcb0b696" --nodes "127.0.0.1:4000,127.0.0.1:4001,127.0.0.1:4002,127.0.0.1:4003"

Setup Chain

$ cita setup test-chain/0
$ cita setup test-chain/1
$ cita setup test-chain/2
$ cita setup test-chain/3

Start Chain

$ cita start test-chain/0
$ cita start test-chain/1
$ cita start test-chain/2
$ cita start test-chain/3

Test chain available

Request (get block numbers of the chain):

$ curl -X POST --data '{"jsonrpc":"2.0","method":"blockNumber","params":[],"id":74}' 127.0.0.1:1337

Result:

{
  "jsonrpc": "2.0",
  "id": 74,
  "result": "0x55"
}

Stop Chain

$ cita stop test-chain/0

Usages

$ cita
Usage: cita <command> <node> [options]
where <command> is one of the following:
    { help | create | port | setup | start | stop | restart
      ping | top | backup | clean | logs | logrotate }
Run `cita help` for more detailed information.

Presets

Here are some default sets, you can reset them on your own:

Set Port

$ cita port 42:42
# The docker port is `1337:1337` by default, if you need to, use this.

Contributing

CITA is still in active development. Building a blockchain platform is a huge task, we need your help. Any contribution is welcome.

Please check cryptape/cita for more details.

License

Apache

Releases

No releases published

Packages

No packages published

Languages