Skip to content

issue-#177#181

Merged
andrewnguyen22 merged 19 commits into
mainfrom
issue-#177
May 20, 2025
Merged

issue-#177#181
andrewnguyen22 merged 19 commits into
mainfrom
issue-#177

Conversation

@andrewnguyen22

@andrewnguyen22 andrewnguyen22 commented May 12, 2025

Copy link
Copy Markdown
Collaborator

Description

Wrap Canopy with the Ethereum JSON-RPC interface as specified here: https://ethereum.org/en/developers/docs/apis/json-rpc

Documentation

https://github.com/canopy-network/canopy/blob/issue-%23177/fsm/ethereum.md

How to test with metamask

  1. Add custom network
  • Network: Canopy
  • RPC URL: localhost:50002/v1/eth
  • Chain ID: 4294967297
  • Symbol: CNPY
  1. Send CNPY to your metamask address
  2. See balance change
  3. Send CNPY from your metamask wallet

Related Issues

Closes: #177

Changes Made

  1. Implement the endpoints in this specification: https://ethereum.github.io/execution-apis/api-documentation/
  2. Implement RLP decoding for Ethereum transactions and accept that as a valid Canopy Transactions
  3. Added an indexer method to retrieve a block header only
  4. Added protections around some protobuf fields

Motivation

Should allow (at least partial) compatibility with existing tooling like Metamask

Checklist

  • I have tested the changes locally and verified they work as intended.
  • I have appropriately titled my branch issue-#<issue-number>.
  • I have run re-built the web-wallet and/or block explorer (if applicable).
  • I have run npm run prettier to format the web-wallet and/or block explorer (if applicable)
  • I have updated documentation (if applicable).
  • I have included tests for the changes (if applicable).

Required Tags

  • Priority: Medium
  • Module: RPC

@andrewnguyen22 andrewnguyen22 marked this pull request as draft May 12, 2025 23:52
@andrewnguyen22 andrewnguyen22 changed the title untested - first pass Canopy with Ethereum JSON RPC May 12, 2025
@andrewnguyen22 andrewnguyen22 changed the title Canopy with Ethereum JSON RPC issue-#177 May 12, 2025
@andrewnguyen22 andrewnguyen22 added High Priority Highest priority issue Medium Shirt 2 weeks worth of work Medium Priority Medium priority issue FSM Finite State Machine module RPC Plugin or 3rd party chain module and removed High Priority Highest priority issue labels May 12, 2025
@andrewnguyen22 andrewnguyen22 self-assigned this May 12, 2025
@andrewnguyen22 andrewnguyen22 marked this pull request as ready for review May 17, 2025 22:39
@andrewnguyen22

Copy link
Copy Markdown
Collaborator Author

@rem1niscence no rush on this review

Tested with metamask

image
image
image

@andrewnguyen22 andrewnguyen22 merged commit 38ea0c4 into main May 20, 2025
2 checks passed
@andrewnguyen22 andrewnguyen22 deleted the issue-#177 branch May 20, 2025 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FSM Finite State Machine module Medium Priority Medium priority issue Medium Shirt 2 weeks worth of work RPC Plugin or 3rd party chain module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Eth RPC compatibility for easy integration with existing tools

1 participant