CCIP Read support for transactions #3569
Unanswered
gskril
asked this question in
Idea / Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Viem already has native support for CCIP Read in a read context (which is awesome), but technically the spec is also meant to work with transactions. See https://eips.ethereum.org/EIPS/eip-3668#use-of-ccip-read-for-transactions
See https://github.com/gskril/solidity-fetcher for an example use case.
General flow:
awaitFoo()
that reverts with the standard CCIP Read errorOffchainLookup(sender, urls[], calldata, callbackFunction, extraData)
const res = fetch("https://example.com/{sender}/{calldata}")
foo(bytes memory res, bytes memory extraData)
Note the security consideration from the ERC:
I'm trying to figure out a way to get similar behavior without an upstream integration, but I haven't come up with a clean solution yet.
Beta Was this translation helpful? Give feedback.
All reactions