Added support for multiple blockchains#64
Added support for multiple blockchains#64shivambisen wants to merge 6 commits intoStabilityNexus:mainfrom
Conversation
|
Polygon Mumbai is depricated, Binance Smart Chain is not needed. |
|
I have made the suggested changes please review |
| import { foundry, polygonAmoy, sepolia, goerli, AppKitNetwork } from '@reown/appkit/networks'; | ||
|
|
||
|
|
||
| const milkomedaTestnet: AppKitNetwork = { |
There was a problem hiding this comment.
This is repeated code (used in siwe/index.ts as well, could you put in a seperate file and import it from there?)
There was a problem hiding this comment.
I will create a networks file and export milkomedaTestnet as Bruno mentioned in the community. I referred to Clowder for guidance, and this network configuration should work as expected.
package.json
Outdated
| }, | ||
| "dependencies": { | ||
| "@wagmi/chains": "^1.8.0", | ||
| "@wagmi/core": "^2.16.3", |
There was a problem hiding this comment.
Why is this needed?
There was a problem hiding this comment.
No, it's not required. I might have accidentally installed it. I will be careful from next time
|
Ethereum Goerli is also deprecated. |
|
made required changes |
fc7a3e9 to
41319ef
Compare
|
|
||
| function getOrCreateAnvilEthConfig() public view returns (NetworkConfig memory anvilNetworkConfig) { | ||
| anvilNetworkConfig = NetworkConfig({deployerKey: DEFAULT_ANVIL_PRIVATE_KEY}); | ||
| function getSepoliaConfig() public view returns (NetworkConfig memory) { |
There was a problem hiding this comment.
see the latest commit.
| @@ -1 +1 @@ | |||
| {"fairFund":"0x5FbDB2315678afecb367f032d93F642f64180aa3"} No newline at end of file | |||
| {"ethereumMordor": "0x3B081a1a7aE4d8C7247d65BB669CF55a65F1A870","polygonTestnet": "0xF4aaAaD23abE965Ae584D98a95F5802dC142F32d"} No newline at end of file | |||
There was a problem hiding this comment.
Where is the address for polygon mainnet?
|
Please make a PR on |
|
@adityabhattad2021 i have raised a PR on develop branch and provided a video too |
|
completed with #76 |
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