Added Chain support for ETH Classic Testnet with chain wise contract address selection#76
Merged
adityabhattad2021 merged 8 commits intoStabilityNexus:developfrom Mar 9, 2025
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue:
Fixes #45.
Overview
Previously, FairFund smart contracts and the frontend were deployed and configured only for Polygon. To reach a wider audience, this update adds support for an additional EVM-compatible network—Ethereum Classic Testnet—by updating both the deployment process and frontend integration.
Changes Made:
Ethereum Classic Testnet Deployment:
Updated deployment scripts to deploy and verify the FairFund smart contracts on Ethereum Modor and verification trough Blockscout.
Contract Registry:
Implemented a registry mapping that maps each supported chain (currently Polygon and Ethereum Classic Testnet) to its corresponding deployed contract address. This registry is maintained in production/FairFunddeployment.json file for frontend consumption.(Deployfaifund.s.sol)
Frontend Architecture Updates:
Dynamic Contract Address Mapping:
Refactored the constants.ts file and vault-form.tsx to implement a chain-to-contract-address mapping system. The frontend now dynamically selects the correct contract address based on the connected chain.
Networks:
added a networks file to configure addition networks which are not included into @reown/appkit/networks
Updated Wagmi Configuration:
Modified the Wagmi configuration to support multiple networks.
Testing
Smart Contract Testing:
The contract functions have been verified on both Polygon amoy and Ethereum Classic Testnets.
Frontend Testing:
Dynamic contract address selection and network-specific configurations were tested by creating test vaults and adding funds into vault
Test Video:- https://drive.google.com/file/d/1atsLyzyhKwLftdZKxec8HfOytbBTnWd4/view?usp=sharing