Content pfp
Content
@
0 reply
0 recast
2 reactions

Spencer Graham 🧢 pfp
Spencer Graham 🧢
@spengrah.eth
If I received a transfer of an ERC20 token (say, USDC), what would need to be true to be able to later prove onchain that the transfer occurred? Other than still having that token in my account, of course. I'm thinking about things like being able to prove that I received the transfer from a given account.
1 reply
0 recast
1 reaction

Matt Solomon pfp
Matt Solomon
@msolomon.eth
What exactly are you trying to do, can you just eth_getLogs for the Transfer log?
1 reply
0 recast
2 reactions

Spencer Graham 🧢 pfp
Spencer Graham 🧢
@spengrah.eth
I don't think what I'm hoping to do is possible without either a custom token or external input. I would ideally like to be able to submit some kind of proof of the previous transfer that a smart contract can verify, ie so that other contracts can use that data point as an input to their logic.
2 replies
0 recast
0 reaction

Matt Solomon pfp
Matt Solomon
@msolomon.eth
You will be able to do this with native interop on OP chains, where any event can be used as an initiating messages. Then you can execute that message on other chains—or in your case on the same chain—with a guarantee that the input log exists :) https://specs.optimism.io/interop/overview.html
1 reply
0 recast
1 reaction

Spencer Graham 🧢 pfp
Spencer Graham 🧢
@spengrah.eth
well that’s dope! Is there a rough timeline for this?
1 reply
0 recast
1 reaction

Matt Solomon pfp
Matt Solomon
@msolomon.eth
I’m not sure of the latest, so deferring to @tynes for that one
1 reply
0 recast
0 reaction

Mark Tyneway pfp
Mark Tyneway
@tynes
Today its possible to unwrap a blockhash and prove a receipt into the receipts root in the block header. That receipt would contain the log you care about We are aiming to ship interop by end of year, where events become the primitive for cross chain actions. Will become way cheaper to do what you want to do
1 reply
0 recast
2 reactions

carter pfp
carter
@carter
just finding this - looking to solve the same problem where i want to prove that a transaction was included at some point historically. is this possible yet onchain?
1 reply
0 recast
0 reaction

Mark Tyneway pfp
Mark Tyneway
@tynes
You can unwrap it from the blockhash. Not a great devex but it's the only way that works generically across any transaction
1 reply
0 recast
2 reactions

carter pfp
carter
@carter
thanks for the follow up! i can look this up too, but do you know of any good examples of this in the wild? unfortunately the constraints i'm working with are - tx block may be more than 256 blocks ago (no available blockhash) - want to be able to do this trustlessly (no third party supplying blockhash) so i'm not sure i can just use the blockhash, unless there's a way i don't know of yet to get past ones?
0 reply
0 recast
0 reaction