GithubHelp home page GithubHelp logo

zilliqa / apidocs Goto Github PK

View Code? Open in Web Editor NEW
3.0 20.0 7.0 1.66 MB

JSON RPC Documentation for Zilliqa

Home Page: https://apidocs.zilliqa.com

License: MIT License

Ruby 1.91% Shell 1.54% JavaScript 87.69% HTML 1.03% SCSS 7.84%
jsonrpc

apidocs's Introduction

Zilliqa JSON-RPC API documentation. Powered by Slate.

Overview

Zilliqa apidocs contains the documentation of all JSON-RPC methods used to interact with Zilliqa nodes in order to transact and deploy/call contracts. You may currently find support for:

Contributing to Zilliqa apidocs

Prerequisites

You're going to need the following to contribute:

  • Linux or macOS โ€” Windows may work, but is unsupported.
  • Ruby, version 2.3.1 or newer
  • Bundler โ€” If Ruby is already installed, but the bundle command doesn't work, just run gem install bundler in a terminal.

Running apidocs locally

  1. Fork this repository on GitHub.

  2. Clone your forked repository (not our original one) to your hard drive with

    git clone https://github.com/Zilliqa/apidocs.git && cd apidocs
  3. Initialize and start Slate. You can either do this locally, or with Vagrant:

    # either run this to run locally
    bundle install
    bundle exec middleman server
    
    # OR run this to run with vagrant
    vagrant up

You can now see the docs at http://localhost:4567.

Contributing guidelines

  • Learn more about editing Slate markdown HERE.
  • Please adhere to the Code of Conduct when participating in the Zilliqa community.
  • Please utilise the PR template when submitting Pull Requests to this repository.

apidocs's People

Contributors

agonzalezro avatar amritkumar avatar anfedorov avatar ansnunez avatar bb111189 avatar blackxored avatar bootstraponline avatar chrissrogers avatar cvkef avatar deepgully avatar dependabot[bot] avatar djpowers avatar dlackty avatar jdahdah avatar kevin-buttercoin avatar lord avatar maks3w avatar marcguyer avatar mccricardo avatar pomier avatar readmecritic avatar realityking avatar renlulu avatar rezanachmad avatar rickyrauch avatar rlord avatar snowsledge avatar sobstel avatar vassyz avatar victorquinn avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apidocs's Issues

Missing module name in CreateTransaction

PROBLEM:

from pyzil.crypto import zilkey
from pyzil.zilliqa import chain
chain.set_active_chain(chain.MainNet)

my_key = zilkey.ZilKey(private_key="0xe19d05c5452598e24caad4a0d85a49146f7be089515c905ae6a19e8a578a6930")

payload = {
    "to_addr": "4baf5fada8e5db92c3d3242618c5b47133ae003c",
    "amount": "1000000000000",
    "gas_price": "1000000000",
    "gas_limit": 1,
    "code": "",
    "data": "",
    "priority": False,
}

params = active_chain.build_transaction_params(my_key, **payload)
txn_info = active_chain.api.CreateTransaction(params)
print(txn_info)

The active_chain in the third-last and the second last line are missing the module name chain.

SOLUTION:

from pyzil.crypto import zilkey
from pyzil.zilliqa import chain
chain.set_active_chain(chain.MainNet)

my_key = zilkey.ZilKey(private_key="0xe19d05c5452598e24caad4a0d85a49146f7be089515c905ae6a19e8a578a6930")

payload = {
    "to_addr": "4baf5fada8e5db92c3d3242618c5b47133ae003c",
    "amount": "1000000000000",
    "gas_price": "1000000000",
    "gas_limit": 1,
    "code": "",
    "data": "",
    "priority": False,
}

params = chain.active_chain.build_transaction_params(my_key, **payload)
txn_info = chain.active_chain.api.CreateTransaction(params)
print(txn_info)

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.