Skip to content

[ADD]: Shared Components for Bifrost EVM Chain Clients

Eridanus (9R) requested to merge eridanus/bifrost-shared-evm into develop

This PR creates a bunch of shared components for use in the chain clients of EVM-based block chains that support the ETH RPC api. There should be no changes to the functionality of the eth chain client, this is just a refactor.

Goals are:

  1. Reduce code duplication of nearly identical EVM chain clients
  2. Reduce dev time of new EVM chain clients
  3. Allow for appropriate flexibility through white-labeling
  • Create a white-labeled SmartContractLogParser to be used in parsing logs from Router txs
  • Create a white-labeled TokenManager to manage a LevelDB of ERC20 tokens, interface with ERC20 token contracts to retrieve balances, symbols, and decimals, and provide helper functions like decimal conversion
  • Move the KeySignWrapper to a shared component, to be used in both the ETH client and the AVAX client
  • Create a EthRpc, which interfaces with the ETH RPC endpoints of any blockchain that supports it
Edited by Eridanus (9R)

Merge request reports