Skip to content

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

@marsrobertson

Description

@marsrobertson

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions