Giter Site home page Giter Site logo

bep2-can's Introduction


Mirror This repo mirrors from Gitlab to Github. Please commit to the Gitlab repo: https://gitlab.com/canyacoin/binancechain/bep2-can


bep2-can

Repository to cover the listing of CAN on BinanceChain

Setting up

Decide how to interact with BinanceChain:

Type Description Server Requirements
CLI (command line interface) Useful for quickly interacting with BinanceChain. Small server(1gb/25gb)
LightClient Useful for deeper analysis 0f BinanceChain with only about 50mb of space required. Small server (1gb/25gb)
Full Node Required to host the full chain. As as at date, testnet uses 6GB. Medium server (16gb/320gb)

Create a new instance to host the Binance CLI client.

Chosen: Ubuntu 16.04.6 x64 1gb/25gb DigitalOcean VPS

Note the DEX and data-seed nodes:

https://testnet-dex.binance.org/api/v1/peers

https://testnet-dex.binance.org:443
https://data-seed-pre-0-s3.binance.org:443
https://data-seed-pre-1-s3.binance.org:443
https://data-seed-pre-2-s3.binance.org:443
https://seed-pre-s3.binance.org:443

You should connect to one of the data-seed nodes

Note testnet fees:

https://testnet-dex.binance.org/api/v1/fees

Mainnet Fees:

https://docs.binance.org/trading-spec.html#current-fees-table-on-mainnet

Note the ChainID to use:

https://docs.binance.org/api-reference/cli.html#which-chain-id-to-use

Testnet: Binance-Chain-Nile

Mainnet: Binance-Chain-Tigris

Run the CLI

Reference: https://docs.binance.org/api-reference/cli.html

Get the binary:

git clone https://github.com/binance-chain/node-binary.git

Get on to CLI (testnet v0.5.8.1) Note: 0.5.8.1 fixed the Ledger bug.

cd node-binary/cli/testnet/0.5.8.1/linux

Getting and Sending tBNB

Reference: https://docs.binance.org/transfer.html

Create three testnet accounts:

./tbnbcli keys add test_acc1
./tbnbcli keys add test_acc2
./tbnbcli keys add test_acc3

Get tBNB tokens (5 x 200BNB required): https://www.binance.com/en/dex/testnet/address

Query your own balance:

./tbnbcli account tbnb1xxxxxxx --chain-id Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:443 --indent

Send enough of your test BNB to a single account:

./tbnbcli send --chain-id=Binance-Chain-Nile --from=test_acc2 --amount=10000000000:BNB --to=tbnb1xxxx

note: 100000000:BNB is equal to 1 BNB (8 decimal places)

Creating Tokens

Reference: https://docs.binance.org/tokens.html

Issue a test Token (burns 200BNB):

./tbnbcli token issue --token-name “testTKN” --total-supply 10000000000000000 --symbol tTKN --chain-id=Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:80 --trust-node --from test_acc1

Practice burning some:

./tbnbcli token burn --amount 33300000000 --symbol XXX-XXX --from test_acc1 --chain-id=Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:80 --trust-node

Practise freezing some:

./tbnbcli token freeze --amount 33300000000 --symbol XXX-XXX --from test_acc1 --chain-id=Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:80 --trust-node

Submit a listing proposal

Reference: https://docs.binance.org/governance.html

Requires: 800BNB

Create a listing proposal.

./tbnbcli gov submit-list-proposal --from test_acc1 --deposit 10000000000:BNB --base-asset-symbol XXX-XXX --quote-asset-symbol BNB --init-price 1000000 --title "list XXX-XXX/BNB" --description "list XXX-XXX/BNB" --expire-time 1556586654 --chain-id=Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:80 --json

Note, expire-time is in unix date form. To convert date to unix epoch:

date -d "2019-05-01" +"%s"

Once voted by Binance validators, then submit a listing transaction:

./tbnbcli dex list -s XXX-XXX --quote-asset-symbol BNB --from test_acc1 —init-price 100000000 --proposal-id XXX --chain-id=Binance-Chain-Nile --node=data-seed-pre-2-s1.binance.org:80 --json

https://docs.binance.org/list.html

Using the Tool

Navigate to node-binary/tools and locate the issue.sh and propose.sh bash scripts.

Copy in the 0.5.8.1 tbnbcli and bnbcli files to this directory

cp $HOME/node-binary/cli/testnet/0.5.8.1/mac/tbnbcli $HOME/node-binary/tools/tbnbcli
cp $HOME/node-binary/cli/prod/0.5.8.1/mac/bnbcli $HOME/node-binary/tools/bnbcli

Connect and create a Ledger Key:

./bnbcli keys add ledger_key --ledger

Start the script:

bash issue.sh

Follow the script guide.

bep2-can's People

Contributors

canyateam avatar jpthor 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.