Code Monkey home page Code Monkey logo

substrate-overlay-token's Introduction

substrate-overlay-token

A new SRML-based Substrate node, ready for hacking.

document

https://github.com/dmm-bclabs/overlay-token

requirements

You should install substrate on your local environment as follow.

https://github.com/paritytech/substrate#on-mac-and-ubuntu

initialize

$ ./scripts/build.sh
$ cargo build --release
$ ./target/release/substrate-overlay-token --dev

start as parent

$ ./target/release/substrate-overlay-token purge-chain --chain parent --base-path /tmp/parent -y
$ ./target/release/substrate-overlay-token --chain parent --charlie --validator --base-path /tmp/parent --ws-port 9944

start as child

$ ./target/release/substrate-overlay-token purge-chain --chain child --base-path /tmp/child -y
$ ./target/release/substrate-overlay-token --chain child --dave --validator --base-path /tmp/child --ws-port 9945

token details

states

  • init: bool
  • root: bool
  • owner: AccountId
  • name: Bytes
  • ticker: Bytes
  • totalSupply: TokenBalance
  • localSupply: TokenBalance
  • balanceOf(AccountId): TokenBalance
  • parentSupply: TokenBalance
  • childSupplies(ChildChainId): TokenBalance

functions

  • init()
  • set_parent(parent_supply)
  • transfer(receiver, value)
  • mint(value)
  • burn(value)
  • sendToParent(value)
  • sendToChild(child, value)
  • receiveFromParent(value)
  • receiveFromChild(child, value)

additional type definitions

{
  "TokenBalance": "u128",
  "ChildChainId": "u32"
}

Using docker-compose

$ cp command.sh ../
$ cd ../
$ git clone https://github.com/dmm-bclabs/substrate-overlay-token-ui.git
$ git clone https://github.com/dmm-bclabs/substrate-overlay-token-bridge.git

You can run

$ sh command.sh init {YOUR_DOMAIN}
$ sh command.sh build
$ sh command.sh run
$ sh command.sh stop

substrate-overlay-token's People

Contributors

jkcomment avatar kasakinagato avatar wshino 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.