Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go multi-chain #9

Open
streamerd opened this issue Aug 10, 2022 · 1 comment
Open

go multi-chain #9

streamerd opened this issue Aug 10, 2022 · 1 comment
Assignees

Comments

@streamerd
Copy link
Member

streamerd commented Aug 10, 2022

Hello,

recently deployed the same contract, on Goerli network as well:
https://goerli.etherscan.io/address/0xe563950e3d97c1cf11665163d4b14ead092c503c

we need to keep both contracts, and and switch only when it's not connected to Rinkeby or Goerli.

@ networkHandler:
include CHAIN_ID_RINKEBY

...
if (provider) {
...
      if (window.ethereum && _currentChainId !== Number(CHAIN_ID_GOERLI)) { ...

also in read/write ops, call with variable contract addres and ABI, instead of hard coding just one.

 const handleSubmit = async (e) => {
   ...
   networkHandler(); // here will switch already network and know in which we'll land. 

    
       const contract = new ethers.Contract(
      expressionOfPeaceAddress_Goerli,
      expressionOfPeaceABI_Goerli,
      provider
    );
    
    ``
@streamerd streamerd self-assigned this Aug 13, 2022
@streamerd
Copy link
Member Author

currently switched to Görli network, and keep like this for a while. Postponed to Q4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

No branches or pull requests

1 participant