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

Annoying issue with VPN - not fetching latest data from chain #27

Open
marsrobertson opened this issue Feb 4, 2024 · 0 comments
Open

Comments

@marsrobertson
Copy link
Member

marsrobertson commented Feb 4, 2024

Illustration of the issue: https://www.youtube.com/watch?v=XyC9XKWfcYY

  1. Create a new organisation dialog
  2. First transaction works
  3. Second transaction fails

We are trying to fetch data from chain, but lookup by guid resolves to 0
telegram-cloud-photo-size-4-5909196485113790660-y

Workaround

Rather than reading data from chain, simulate the transaction first to know what result it will return

image

We need address of the deployed organisation, it should be possible to grab it through simulated transaction:
image

WAGMI: https://wagmi.sh/react/api/hooks/useSimulateContract
VIEM: https://viem.sh/docs/contract/simulateContract.html

Difficulty I'm facing:
image

Even after updating to latest:
image

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

No branches or pull requests

1 participant