Conversation
|
|
||
| With interop, you automatically get an account (a.k.a. aliasedAccount) on each chain, which you can control from the | ||
| source chain. | ||
| ## How to Use Interop |
There was a problem hiding this comment.
the part I've missed here is maybe an example on how can I do 2 most popular things: like ERC20 transfer or single remote call.
single remote call is already below, so ERC20 transfer example is missing.
There was a problem hiding this comment.
Expanded on token transfer 6c428ad, also mentioned Interop Library that we have, as well as places where it might be used to potentially simplify the workflows for devs/users.
| proof | ||
| ); | ||
| ``` | ||
|
|
There was a problem hiding this comment.
and here the natural question is -- where do I get all these params.
(we should probably have a helper tool like:
./interop-helper get_message_broadcast_proof --rpc XX --tx-hash YY
| ) | ||
| // Send a single cross-chain call to another L2 (ERC-7786 sendMessage) | ||
| bytes32 sendId = InteropCenter.sendMessage{value: 0.1 ether}( | ||
| recipient, // ERC-7930 address (chain ID + address) |
There was a problem hiding this comment.
nit, but I'd show what's the example value for ERC-7930
There was a problem hiding this comment.
Added example, also links to eips 614560e
| ```solidity | ||
| contract MyContract is IERC7786Recipient { | ||
| function receiveMessage( | ||
| bytes32 receiveId, |
There was a problem hiding this comment.
receiveId == sendId from the call above?
There was a problem hiding this comment.
Not necessarily, it's up to gateways (entrypoint of sending/receiving msgs to define what they assume sendId/receiveId to be, according to standard.
Do you think we should expand on that here, given it's explained in standard itself?
| ### Bundles and Call Starters | ||
|
|
||
| #### 1. Who pays for gas | ||
| #### Understanding Call Starters |
There was a problem hiding this comment.
I'd mention that this only needed if you want to combine multiple calls together.
| return IERC7786Recipient.receiveMessage.selector; | ||
| } | ||
| } | ||
| ``` |
There was a problem hiding this comment.
and here we're missing a 'tool' that would 'push' this message on the destination chain, right?
./interop-helper push_message --messageId XX --rpc YY
What ❔
The overview of interop functionality was heavily outdated, this PR brings it more up to date. It's more of a high level overview, than a deep technical detailed doc.
Why ❔
Is this a breaking change?
Operational changes
Checklist
zkstack dev fmtandzkstack dev lint.