Skip to content

Latest commit

 

History

History
80 lines (58 loc) · 2.64 KB

README.md

File metadata and controls

80 lines (58 loc) · 2.64 KB

About CKB

CKB is the layer 1 of Nervos Network, a public/permissionless blockchain. CKB uses Proof of Work and improved Nakamoto concensus to achieve maximized performance on average hardware and internet condition, without sacrificing decentralization and security which are the core value of blockchain.

CKB Testnet Faucet

License Telegram Group

CKB Testnet Faucet is a Testnet Aggron faucet built with React and Ruby on Rails.

It supports claim ckb testnet tokens.

Prerequisites

Initial Project

$ cd ckb-testnet-faucet/
$ EDITOR=vim rails credentials:edit (overwrite configs)
$ bin/setup
$ bundle exec rake migration:create_official_account

credential file example:

REDIS:
  URL: redis://172.31.16.215:7379/11
DB:
  USERNAME: "your db username"
  PASSWORD: "your db password"
  HOST: localhost
  PORT: 5432
  RAILS_MAX_THREADS: 30
CKB_NODE_URL: "http://localhost"
OFFICIAL_WALLET_PRIVATE_KEY: "your private key"
SECP_CELL_TYPE_HASH: "0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8"
ALLOWED_IPS:
  - 127.0.0.1
AGGRON_EXPLORER_HOST: "https://explorer.nervos.org/aggron"
secret_key_base: "your secret key base"

Running Test

$ bundle exec rails test

Run Project

# before run project you need to use `get_lock_hash_index_states` rpc check ckb indexer status
$ bundle exec rails s
# start send capacity service
$ ruby lib/claim_event_processor.rb

Deployment

You can deploy this via mina

$ mina setup
$ mina production deploy

How to Contribute

CKB Testnet Faucet is an open source project and your contribution is very much appreciated. Please check out CONTRIBUTING.md for guidelines about how to proceed.

License

CKB Testnet Faucet is released under the terms of the MIT license. See LICENSE for more information or see https://opensource.org/licenses/MIT.