Coder Social home page Coder Social logo

deploy-spark-contract's Introduction

Run a CKB dev Blockchain

Reference: Run a CKB Dev Blockchain

  1. Download the Latest CKB Binary.

  2. Import your account into ckb-cli.

    echo 33b08bb054d5dd04013156dced8ba2ce4d8cc5973e10d905a228ea1abc267e60 >> privkey
    ckb-cli account import --privkey-path privkey
    
  3. Start the CKB dev Blockchain.

    cd dev-chain
    
    // start the ckb node
    ckb run
    
    // start the ckb miner
    ckb miner
    

Compile Contracts

Reference: axon-contract readme

Compile axon contracts.

git clone https://github.com/axonweb3/axon-contract
cd axon-contract

capsule build --release

cp axon-contract/build/release/* deploy-spark-contract/bin/

Compile other contracts.

git clone https://github.com/nervosnetwork/ckb-production-scripts

cd ckb-production-scripts
make all-via-docker 

cp ckb-production-scripts/build/omni_lock deploy-spark-contract/bin/
cp ckb-production-scripts/build/xudt_rce deploy-spark-contract/bin/
cp ckb-production-scripts/build/always_success deploy-spark-contract/bin/

Switch network

ckb-cli
config --url http://127.0.0.1:8114

Deploy Contracts

Reference: How to use ckb-cli to deploy a contract

Create migration directories.

bash create-migrations.sh

Taking deploying contract stake as an example.

bash cmd.sh -c stake -f g

bash cmd.sh -c stake -f s

bash cmd.sh -c stake -f a

Upgrade Contracts

Taking upgrading contract stake as an example.

bash cmd.sh -c stake -f g -v 1

bash cmd.sh -c stake -f s -v 1

bash cmd.sh -c stake -f a -v 1

deploy-spark-contract's People

Contributors

felicityin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.