You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/bridging/bridging-fa-how.md
+35-75Lines changed: 35 additions & 75 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -110,93 +110,53 @@ When a deposit is ready to be claimed, the FA bridging precompiled contract (`0x
110
110
111
111
Field | Type | Description
112
112
--- | --- | ---
113
-
`depositId` | uint265 | The ID of the bridging transaction that users need to claim the pending deposit
114
-
`recipient` | address | The Etherlink account that will receive the claimed tokens
115
-
`amount` | uint256 | The amount of tokens
116
-
`timelock` | uint256 | ???
117
-
`depositCount` | uint256 | ???
113
+
`ticketHash` | uint256 | The hash of the ticket that represents the transferred tokens, computed as `keccak256(L1 ticketer + content)`
114
+
`proxy` | address | The proxy address through which the deposit is routed
115
+
`nonce` | uint256 | The global counter for the transaction
116
+
`receiver` | address | The Etherlink address that receives the tokens
117
+
`amount` | uint256 | The amount of tokens in the transaction
118
+
`inboxLevel` | uint256 | The layer 1 block in which the deposit was submitted
119
+
`inboxMsgId` | uint256 | An identifier for the Smart Rollup inbox message
118
120
119
121
### `Deposit` event
120
122
121
123
When a deposit has been claimed, the FA bridging precompiled contract (`0xff0...0002`) emits a `Deposit` event that includes the following information:
122
124
123
125
Field | Type | Description
124
126
--- | --- | ---
125
-
`nonce` | unit256 | The nonce for the bridging transaction
126
-
`receiver` | address | The Etherlink account that received the claimed tokens
127
+
`ticketHash` | uint256 | The hash of the ticket that represents the transferred tokens, computed as `keccak256(L1 ticketer + content)`
128
+
`ticketOwner` | address | The ERC-20 proxy contract that manages the tokens
129
+
`receiver` | address | The ERC-20 proxy contract that manages the tokens (a duplicate of the `ticketOwner` field)
127
130
`amount` | uint256 | The amount of tokens
128
-
`inbox_level` | unit256 | ???
129
-
`inbox_msg_id` | unit256 | The ID of the bridging transaction
130
-
131
-
TODO ^ This info from `etherlink/kernel_latest/evm_execution/src/fa_bridge/deposit.rs` does not match with the blog post, which says that the signature should be `Deposit(uint256,address,address,uint256,uint256,uint256)`
131
+
`inboxLevel` | uint256 | The layer 1 block in which the deposit was submitted
132
+
`inboxMsgId` | uint256 | An identifier for the Smart Rollup inbox message, which you can use to find the corresponding `QueuedDeposit` event and the Etherlink address that receives the tokens
132
133
133
134
### `Withdrawal` event
134
135
135
136
When an account initiates a withdrawal, the FA bridging precompiled contract (`0xff0...0002`) emits a `Withdrawal` event that includes the following information:
136
137
137
138
Field | Type | Description
138
139
--- | --- | ---
139
-
`amount` | unit256 | The amount of tokens
140
-
`sender` | address | The address of the Etherlink account sending the tokens
141
-
`receiver` | bytes22 | A bytecode representation of the Tezos address of the account receiving the tokens
142
-
`withdrawalId` | unit256 | The ID of the bridging transaction
143
-
144
-
### TODO other events
145
-
146
-
TODO other withdrawal events from `etherlink/kernel_latest/evm_execution/src/fa_bridge/withdrawal.rs` but I'm not sure if these fields translate directly to the fields in the event because they seemed to be different for the deposit events:
147
-
148
-
```rust
149
-
alloy_sol_types::sol! {
150
-
eventSolStandardWithdrawalInput (
151
-
addressticket_owner,
152
-
bytesrouting_info,
153
-
uint256amount,
154
-
bytes22ticketer,
155
-
bytescontent,
156
-
);
157
-
}
158
-
159
-
alloy_sol_types::sol! {
160
-
eventSolFastWithdrawalInput (
161
-
addressticket_owner,
162
-
bytesrouting_info,
163
-
uint256amount,
164
-
bytes22ticketer,
165
-
bytescontent,
166
-
stringfast_withdrawal_contract_address,
167
-
bytespayload,
168
-
);
169
-
}
170
-
171
-
alloy_sol_types::sol! {
172
-
eventSolStandardWithdrawalProxyCallData (
173
-
addresssender,
174
-
uint256amount,
175
-
uint256ticket_hash,
176
-
);
177
-
}
178
-
179
-
alloy_sol_types::sol! {
180
-
eventSolStandardWithdrawalEvent (
181
-
addresssender,
182
-
addressticket_owner,
183
-
bytes22receiver,
184
-
bytes22proxy,
185
-
uint256amount,
186
-
uint256withdrawal_id,
187
-
);
188
-
}
189
-
190
-
alloy_sol_types::sol! {
191
-
eventSolFastFAWithdrawalEvent (
192
-
addresssender,
193
-
addressticket_owner,
194
-
bytes22receiver,
195
-
bytes22proxy,
196
-
uint256amount,
197
-
uint256withdrawal_id,
198
-
uint256timestamp,
199
-
bytespayload,
200
-
);
201
-
}
202
-
```
140
+
`ticketHash` | uint256 | The hash of the ticket that represents the transferred tokens, computed as `keccak256(L1 ticketer + content)`
141
+
`sender` | address | The Etherlink address that is withdrawing the tokens
142
+
`ticketOwner` | address | The ERC-20 proxy contract that manages the tokens
143
+
`receiver` | bytes22 | The layer 1 address that receives the tokens
144
+
`proxy` | bytes22 | The proxy address through which the deposit is routed
145
+
`amount` | uint256 | The amount of tokens
146
+
`withdrawalId` | uint256 | An internal ID for the withdrawal
147
+
148
+
### `FastFaWithdrawal` event
149
+
150
+
When an account initiates a fast withdrawal, the FA bridging precompiled contract (`0xff0...0002`) emits a `FastFaWithdrawal` event that includes the following information:
151
+
152
+
Field | Type | Description
153
+
--- | --- | ---
154
+
`ticketHash` | uint256 | The hash of the ticket that represents the transferred tokens, computed as `keccak256(L1 ticketer + content)`
155
+
`sender` | address | The Etherlink address that is withdrawing the tokens
156
+
`ticketOwner` | address | The ERC-20 proxy contract that manages the tokens
157
+
`receiver` | bytes22 | The layer 1 address that receives the tokens
158
+
`proxy` | bytes22 | The proxy address through which the deposit is routed
159
+
`amount` | uint256 | The amount of tokens
160
+
`withdrawalId` | uint256 | An internal ID for the withdrawal
161
+
`timestamp` | uint256 | The timestamp of the block that includes the fast withdrawal request
162
+
`payload` | bytes | Information about the fast withdrawal to forward to the fast withdrawal contact
0 commit comments