Skip to content
Snippets Groups Projects

[chain] Binance Smart Chain (Bifrost Refactor Avalanche -> EVM)

Merged Ursa (9R) requested to merge ursa/bsc into develop
All threads resolved!

This contains refactoring of the avalanche client package into a common evm package and the addition of Binance Smart Chain. This extends the tooling to support a make run-mocknet-fork-<chain> target for EVM chains - which will fork the mainnet chain state and automatically mint 100K USDC for the corresponding chain to the admin key used by build/scripts/evm/evm-tool.py (for aggregator swap in/out testing). In order to support this functionality the mainnet USDC tokens have been added to the testnet whitelist and the mainnet aggregator contracts have been appended to the mocknet DEX aggregator list.

Future EVM chains should be a small addition, requiring just:

  1. Chain defined in common
  2. Token list defined in common/tokenlist
  3. Bifrost chain configuration defined in config/default.yaml

If desired in mocknet the following additions are also required:

  1. Daemon added to Docker Compose configuration
  2. Extend build/scripts/evm/evm-tool.py with the new chain/endpoint
  3. Extend the chain list in build/scripts/core-unsafe.sh
  4. Extend scripts/run-mocknet-fork.sh and tools/hardhat/init.js if make run-mocknet-fork-<chain> is desired

Future Work

This change consolidates the existing non-Ethereum EVM chains into a single chain client package, but there still remains some cleanup that should occur separately to consolidate bifrost/pkg/chainclients/ethereum and bifrost/pkg/chainclients/shared/evm into the new bifrost/pkg/chainclients/evm.

Merge request reports

Merge request pipeline #877538543 passed

Merge request pipeline passed for 2df76f43

Test coverage 54.90% (0.20%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Merged by PlutoPluto 1 year ago (May 24, 2023 6:28pm UTC)

Loading

Pipeline #877991947 passed

Pipeline passed for a85659c6 on develop

Test coverage 54.90% (0.20%) from 1 job
Deployed to integ‎ration‎ 1 year ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading