Skip to content

Commit

Permalink
feat: add sender to ERC7802 events (#464)
Browse files Browse the repository at this point in the history
* feat: add sender to ERC7802 events (#9)

* fix: lint
  • Loading branch information
agusduha authored Dec 3, 2024
1 parent 6467cb1 commit c0c5042
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions specs/interop/token-bridging.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,15 @@ crosschainBurn(address _account, uint256 _amount)
MUST trigger when `crosschainMint` is called

```solidity
event CrosschainMint(address indexed _to, uint256 _amount)
event CrosschainMint(address indexed _to, uint256 _amount, address indexed _sender)
```

#### `CrosschainBurn`

MUST trigger when `crosschainBurn` is called

```solidity
event CrosschainBurn(address indexed _from, uint256 _amount)
event CrosschainBurn(address indexed _from, uint256 _amount, address indexed _sender)
```

## `SuperchainERC20Bridge`
Expand Down Expand Up @@ -142,15 +142,15 @@ sequenceDiagram
from->>L2SBA: sendERC20(tokenAddr, to, amount, chainID)
L2SBA->>SuperERC20_A: crosschainBurn(from, amount)
SuperERC20_A-->SuperERC20_A: emit CrosschainBurn(from, amount)
SuperERC20_A-->SuperERC20_A: emit CrosschainBurn(from, amount, sender)
L2SBA->>Messenger_A: sendMessage(chainId, message)
Messenger_A->>L2SBA: return msgHash_
L2SBA-->L2SBA: emit SentERC20(tokenAddr, from, to, amount, destination)
L2SBA->>from: return msgHash_
Inbox->>Messenger_B: relayMessage()
Messenger_B->>L2SBB: relayERC20(tokenAddr, from, to, amount)
L2SBB->>SuperERC20_B: crosschainMint(to, amount)
SuperERC20_B-->SuperERC20_B: emit CrosschainMint(to, amount)
SuperERC20_B-->SuperERC20_B: emit CrosschainMint(to, amount, sender)
L2SBB-->L2SBB: emit RelayedERC20(tokenAddr, from, to, amount, source)
```

Expand Down Expand Up @@ -239,14 +239,14 @@ sequenceDiagram
from->>Intermediate_A: sendWithData(data)
Intermediate_A->>L2SBA: sendERC20To(tokenAddr, to, amount, chainID)
L2SBA->>SuperERC20_A: crosschainBurn(from, amount)
SuperERC20_A-->SuperERC20_A: emit CrosschainBurn(from, amount)
SuperERC20_A-->SuperERC20_A: emit CrosschainBurn(from, amount, sender)
L2SBA->>Messenger_A: sendMessage(chainId, message)
L2SBA-->L2SBA: emit SentERC20(tokenAddr, from, to, amount, destination)
Intermediate_A->>Messenger_A: sendMessage(chainId, to, data)
Inbox->>Messenger_B: relayMessage()
Messenger_B->>L2SBB: relayERC20(tokenAddr, from, to, amount)
L2SBB->>SuperERC20_B: crosschainMint(to, amount)
SuperERC20_B-->SuperERC20_B: emit CrosschainMint(to, amount)
SuperERC20_B-->SuperERC20_B: emit CrosschainMint(to, amount, sender)
Inbox->>Messenger_B: relayMessage(): call
L2SBB-->L2SBB: emit RelayedERC20(tokenAddr, from, to, amount, source)
Messenger_B->>to: call(data)
Expand Down

0 comments on commit c0c5042

Please sign in to comment.