Skip to content

fahad143/aurora-relayer

 
 

Repository files navigation

Aurora Relayer

Project license Discord Lints

Implements a JSON-RPC server compatible with Ethereum's Web3 API for Aurora Engine instances deployed on the NEAR Protocol.

Prerequisites

Usage

Usage for Testnet

To run the relayer locally, execute:

NEAR_ENV=testnet docker-compose up

You can customize the configuration by copying config/testnet.yaml to config/local.yaml and editing that file. (The configuration settings in config/local.yaml override the defaults from config/testnet.yaml.)

Usage for LocalNet

To run the relayer locally, first start nearcore and then execute:

NEAR_ENV=localnet docker-compose up

You can customize the configuration by copying config/localnet.yaml to config/local.yaml and editing that file. (The configuration settings in config/local.yaml override the defaults from config/localnet.yaml.)

Endpoint URL

The relayer's HTTP endpoint is served up on the TCP port 8545 by default.

For example, you can send a Web3 JSON-RPC request to the endpoint using HTTPie, as follows:

http post http://localhost:8545 jsonrpc=2.0 id=1 method=eth_blockNumber params:='[]'

Configuration

To customize configuration settings, create a config/local.yaml file.

Configuration settings are loaded firstly from config/default.yaml, then from config/$NEAR_ENV.yaml, and lastly from config/local.yaml. Settings in files loaded later override the same settings from files loaded earlier.

Configuring a signing key

To be able to call eth_sendRawTransaction, you must have a NEAR account and signing key on the network you are relaying to, and said NEAR account must have a sufficient Ⓝ balance to be able to send transactions.

To configure the signing account and private key, place the JSON key file into the config/ directory and edit config/local.yaml as follows:

signer: you.testnet
signerKey: config/you.testnet.json

If you're using the NEAR CLI, you will find your signing keys stored as JSON key files under your $HOME/.near-credentials/ directory.

Status

Method Status Notes
web3_clientVersion
web3_sha3
net_listening
net_peerCount
net_version
eth_accounts
eth_blockNumber
eth_call
eth_chainId
eth_coinbase
eth_compileLLL Unsupported
eth_compileSerpent Unsupported
eth_compileSolidity Unsupported
eth_estimateGas
eth_gasPrice
eth_getBalance
eth_getBlockByHash
eth_getBlockByNumber
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber
eth_getCode
eth_getCompilers
eth_getFilterChanges 🚧
eth_getFilterLogs 🚧
eth_getLogs 🚧
eth_getProof EIP-1186
eth_getStorageAt
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionByHash 🚧
eth_getTransactionCount
eth_getTransactionReceipt 🚧
eth_getUncleByBlockHashAndIndex
eth_getUncleByBlockNumberAndIndex
eth_getUncleCountByBlockHash
eth_getUncleCountByBlockNumber
eth_getWork Unsupported
eth_hashrate
eth_mining
eth_newBlockFilter 🚧
eth_newFilter 🚧
eth_newPendingTransactionFilter
eth_pendingTransactions Undocumented
eth_protocolVersion
eth_sendRawTransaction
eth_sendTransaction Unsupported
eth_sign Unsupported
eth_signTransaction Unsupported
eth_signTypedData Unsupported
eth_submitHashrate Unsupported
eth_submitWork Unsupported
eth_syncing
eth_uninstallFilter 🚧
db_getHex Deprecated
db_getString Deprecated
db_putHex Deprecated
db_putString Deprecated
shh_addToGroup Discontinued
shh_getFilterChanges Discontinued
shh_getMessages Discontinued
shh_hasIdentity Discontinued
shh_newFilter Discontinued
shh_newGroup Discontinued
shh_newIdentity Discontinued
shh_post Discontinued
shh_uninstallFilter Discontinued
shh_version Discontinued
txpool_content Geth extension
txpool_inspect Geth extension
txpool_status Geth extension
parity_pendingTransactions Parity extension

Legend: ❌ = not supported. 🚧 = work in progress. ✅ = supported.

About

Web3-compatible relayer server for Aurora.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 63.6%
  • PLpgSQL 12.5%
  • Shell 9.7%
  • Raku 5.5%
  • Go 5.4%
  • JavaScript 2.2%
  • Makefile 1.1%