Ethereum RPC API support

Call Smart Contract

Pando-eth-rpc-adaptor

The Pando-eth-rpc-adaptor project is aiming to provide an adaptor which translates the Pando RPC interface to the Ethereum RPC interface.

Setup

First, install **Go ** and set environment variables GOPATH , GOBIN, and PATH. Next, clone the Pando blockchain repo and install Pando following the steps below:

mkdir -p usr/local/go/src/github.com/pandoprojects 
cd usr/local/go/src/github.com/pandoprojects
git clone https://
cd usr/local/go/src/github.com/pandoprojects/pando
export GO111MODULE=on
make install

Next, clone the pando-eth-rpc-adaptor repo:

cd usr/local/go/src/github.com/pandoprojects
git clone https://github.com/pandoprojects/Pando-eth-rpc-libary.git pando-eth-rpc-adaptor

Build and Install

Build the binary under macOS or Linux

Following the steps below to build the pando-eth-rpc-adaptor binary and copy it into your $GOPATH/bin.

Cross compilation for Windows

On a macOS machine, the following command should build the pando-eth-rpc-adaptor.exe binary under build/windows/

Run the Adaptor with a local Pando private testnet

First, run a private testnet Pando node with its RPC port opened at 16888:

Then, open another terminal, create the config folder for the RPC adaptor

Use your favorite editor to open file ../pandoprojects/eth-rpc-adaptor/config.yaml, paste in the follow content, save and close the file:

Then, launch the adaptor binary with the following command:

The RPC adaptor will first create 10 test wallets, which will be useful for running tests with dev tools like Truffle, Hardhat. After the test wallets are created, the ETH RPC APIs will be ready for use.

RPC APIs

The RPC APIs should conform to the Ethereum JSON RPC API standard: https://eth.wiki/json-rpc/API. We currently support the following Ethereum RPC APIs:

The following examples demonstrate how to interact with the RPC APIs using the curl command:

Last updated