Giter Site home page Giter Site logo

bondtoken's Introduction

Near Contract Enviroment

해당 환경은 Near Contract 개발을 위한 것으로, 🧑‍💻Visual Studio Code, 🐋Docker for Mac을 필요로 합니다.

시작 방법

# near localnet을 background로 실행, 기본적으로 4개의 샤드 및 4개의 Account가 설정됨.
$ nearup localnet --binary-path /nearcore/target/release

# cli의 작동 모드를 local로 변경
$ export NODE_ENV=local

# node0의 full access key를 생성함.
# 참고: https://github.com/near/nearup/issues/64
$ near create-account yoonsung.node0 --masterAccount node0 --initialBalance 100000 --keyPath ~/.near/localnet/node0/validator_key.json

다양한 near-cli 사용은 docs.near.org 에서 확인하실 수 있습니다.

Build

# Contract가 위치한 폴더 내부
$ ./build.sh

Test

# 전체 테스트
$ cargo test
# `fungible_token`만 테스트 하는 경우
$ cargo test --package fungible_token -- --nocapture

Deploy

# 배포할 컨트랙트의 Account를 미리 생성
$ near create-account contract_name.yoonsung.node0 --masterAccount yoonsung.node0 --keyPath ~/.near/localnet/node0/validator_key.json
# 폴더 이동
$ cd fungible_token
# 컨트랙트 배포
$ near deploy --accountId contract_name.yoonsung.node0 --wasmFile ./res/fungible_token.wasm --keyPath ~/.near/localnet/node0/validator_key.json
# 이 단계에서 Node 접근에 대한 오류가 발생하면, nearup stop을 수행후 다시 노드들을 실행시켜 사용 가능.

bondtoken's People

Contributors

nipol avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bondtoken's Issues

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.