Git Product home page Git Product logo

hedera-json-rpc-relay's People

Contributors

acuarica avatar alfredog87 avatar anastasiya-kovaliova avatar ar-conmit avatar arianejasuwienas avatar bguiz avatar bmino avatar daniel-k-ivanov avatar dependabot[bot] avatar dimitrovmaksim avatar ebadiere avatar georgi-l95 avatar isavov avatar ivo-yankov avatar josedev-union avatar konstantinabl avatar lukelee-sl avatar mshakeg avatar nana-ec avatar natanasow avatar nickeynikolovv avatar quiet-node avatar rafaelkallis avatar rbair23 avatar rbarkersl avatar rustyshacklefurd avatar shemnon avatar stefan-stefanooov avatar swirlds-automation avatar ted-yeh-vc avatar

Stargazers

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

Watchers

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

hedera-json-rpc-relay's Issues

Add license headers to code files

As part of Open Source readiness all code files require a license header a below

/*-
 *
 * Hedera JSON RPC Relay
 *
 * Copyright (C) 2021 - 2022 Hedera Hashgraph, LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 */

Add Repo Code Coverage

As part of Open Source readiness the repo should have code coverage metrics to help maintain and improve quality

Implement eth_getStorageAt

Implement eth_getStorageAt.

As noted in HIP 482

  • Call /api/v1/blocks/{blockNumber} mirror node REST API as it maps a block number to a consensus timestamp. If the block number is latest or pending, then this API call can be omitted.
  • Using block timestamp or latest call /api/v1/contracts/{id}/results?timestamp=lte:{block.endTimestamp}&limit=1&order=desc to get results.
  • Desired time can then be passed to /api/v1/contracts/{id}/results/{timestamp} to get the contract state information.

Add License file

As part of Open Source readiness the repo requires a License file.
In accordance with project direction this will be Apache License 2.0

Implement eth_chainId

As per initial discussion - try and have it as env variable so that the user can set it
Return it hardcoded.

Verify eth_getBalance implementation + unit tests

Document HBAR transfer Relay interaction steps to a markdown file

Problem

The relay demo has a few setup steps that are necessary to see a run that highlights the true value of the relay.
Since this can be involving we should document in a separate markdown file for easy reference and reproduction to allow eth devs to hit the ground running

The HBAR transfer flow is the primary scenario

Scenario 1: Transfer HBAR between 2 users

  • Setup up 2 hedera accounts
  • Configure separate wallets to point to a deployed Hedera JSON RPC Relay - could be 2 different relays for same network
  • Connect a wallet to each Hedera account
  • Send HBAR between users

Solution

Add documentation highlighting the flow.
New markdown should be placed under /docs and README should reference it

Documentation may include

Steps
Code snippets
Screen shots - if applicable

Alternatives

No response

Deploy relay to integration environment

Deploy current main version of relay to integration environment.

For now this may utilize the docker image or docker-compose flow.
Eventually this should be replaced by automatic deployment upon successful PR merges

Implement eth_getWork

Provide static response { code: -32000. message: 'No mining work available yet' }

Add simple Helm chart to support deployment

Chart should utilize deployed docker image and support simple k8s deployment for varied environments

Can draw inspiration from Mirror Node charts
hedera-mirror-web3 should be exactly what we need to start off with.
hedera-mirror-rest may show more mature logic and tie closely since it's also a node app

Implement all non supported endpoints

Add route handlers for all non supported ednpoints returning static response { code: -32601. message: 'Unsupported JSON-RPC method' }

routes include

  • rpc.use('web3_sha', async (params: any) => { });
  • rpc.use('parity_nextNonce', async (params: any) => { });
  • rpc.use('net_peerCount', async (params: any) => { });
  • rpc.use('eth_submitHashrate', async (params: any) => { });
  • rpc.use('eth_signTypedData', async (params: any) => { });
  • rpc.use('eth_signTransaction', async (params: any) => { });
  • rpc.use('eth_sign', async (params: any) => { });
  • rpc.use('eth_sendTransaction', async (params: any) => { });
  • rpc.use('eth_protocolVersion', async (params: any) => { });
  • rpc.use('eth_getProof', async (params: any) => { });
  • rpc.use('eth_coinbase', async (params: any) => { });

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.