GithubHelp home page GithubHelp logo

icon-score-dev's Introduction

icon-score-dev

CircleCI

an example of icon-score smart contract development

setting up

prepare python environment by pyenv and virtualenv

pyenv install 3.6.5
pyenv virtualenv 3.6.5 icon-dev

clone the repository

git clone [email protected]:LayerXcom/icon-score-dev.git
cd icon-score-dev
pyenv local icon-dev && pip install -U pip

install dependencies

brew install leveldb
brew install autoconf automake libtool pkg-config
brew install rabbitmq && brew services start rabbitmq

set up t-bears and sdks

git clone https://github.com/icon-project/t-bears.git
cd t-bears && ./build.sh
cd dist && pip install <t-bears>.whl

start local network

tbears start

test

tberas test layerx

deploy

password of Key@Top1 keystore equals its file name: Key@Top1

❯ tbears deploy layerx
Input your keystore password:
Send deploy request successfully.
If you want to check SCORE deployed successfully, execute txresult command
transaction hash: 0x40bc6423fb87434f206fc541b5524c10f01bebe09f35a4e6af927496760cc4c2

and then check its SCORE address

❯ tbears txresult 0xa4f7987ac4cf325da246381506f72615e932d8e9376a542eb67fa85d57f9af79
Transaction result: {
    "jsonrpc": "2.0",
    "result": {
        "txHash": "0xa4f7987ac4cf325da246381506f72615e932d8e9376a542eb67fa85d57f9af79",
        "blockHeight": "0x631",
        "blockHash": "0x7ffeed4e27c7c307e6afc006bda7667b5353bb4f95e8e3cc56c387c659026fda",
        "txIndex": "0x0",
        "to": "cx0000000000000000000000000000000000000000",
        "scoreAddress": "cx3a2115b00690f39e14ec227e0ad50f980f480a53",
        "stepUsed": "0x13c8100",
        "stepPrice": "0x0",
        "cumulativeStepUsed": "0x13c8100",
        "eventLogs": [],
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1"
    },
    "id": 1
}

call methods

❯ tbears call calls/call_hello.json
response : {
    "jsonrpc": "2.0",
    "result": "Hello",
    "id": 1
}

References

icon-score-dev's People

Contributors

mathetake avatar

Watchers

Kentaro Takahashi avatar Yasuharu Sawada avatar Jun Katagiri avatar y_matsuwitter avatar James Cloos avatar yudetamago avatar Taisuke Fujita avatar Ryo Shibayama avatar mosa avatar Akahane Naoki avatar chosty avatar es335ab avatar jkcomment avatar Yoshiki Nakagawa avatar Shinji Takae avatar Masashi Salvador Mitsuzawa avatar Yuki Takeichi avatar Masaru Matsunaga avatar yusuke kido avatar Masahiro Kajiwara 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.