I have a situation where a set of two contracts is deployed to two addresses, for example:
share.ysn-1_0_0.ysn.testnet
market.share.ysn-1_0_0.ysn.testnet
In this case, share is an NFT contract while market is an open bids system plugged into it.
Different projects are deployed under ysn.testnet with the same pattern, and an FT contract is deployed at ysn-1_0_0.ysn.testnet.
I'm trying to figure out the best way to handle this from one front-end without too many redirects, preferably one.
A thing that came to mind is to have a proxy contract that distributes the Promise requests to the set of contracts above; is that feasible, or might it have drawbacks?
My solution ended up using localStorage to save contractAddress on sign in and sign out and having:
useEffect(switchProject, [router.asPath])
to sign out if the path is for a different project than the one signed in for.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With