Skip to content

Commit 23974a6

Browse files
committed
remove deprecated bridge API
1 parent 863dcd9 commit 23974a6

File tree

1 file changed

+3
-67
lines changed

1 file changed

+3
-67
lines changed

src/content/docs/en/developers/l1-and-l2-bridging/the-scroll-messenger.mdx

Lines changed: 3 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -23,77 +23,13 @@ the messenger smart contract deployed on L1, `L1ScrollMessenger`. To send a mess
2323

2424
## Finalizing transactions on L1
2525

26-
Any upcoming transactions from L2 need to be finalized using the `relayMessageWithProof` function on the Scroll Messenger
27-
contract. We call this process "submitting an Execute Withdrawal transaction," and it is required for both sending arbitrary messages and transferring assets through a gateway or the router. When you use `relayMessageWithProof`, you'll have to provide a Merkle inclusion proof showing your transaction is included in the trie of "withdrawal" messages, along with other parameters. Producing this proof and these values can be done locally and permissionlessly, but at the moment, the easiest way to retrieve these parameters is through our backend APIs:
26+
Any upcoming transactions from L2 need to be finalized using the `relayMessageWithProof` function on the Scroll Messenger contract. We call this process "submitting an Execute Withdrawal transaction," and it is required for both sending arbitrary messages and transferring assets through a gateway or the router. When you use `relayMessageWithProof`, you'll have to provide a Merkle inclusion proof showing your transaction is included in the trie of "withdrawal" messages, along with other parameters.
2827

29-
- Scroll Sepolia API: https://sepolia-api-bridge-v2.scroll.io/api/
30-
- Scroll API: https://mainnet-api-bridge-v2.scroll.io/api/
31-
32-
<Aside type="danger" title="Experimental API">
33-
This API was made for our Bridge UI. It is not yet finalized and may change in the future. We will update this guide
34-
when the API is finalized. Additionally, all examples below use the Sepolia API service -- the calls should be easily
35-
adapted to work on mainnet.
36-
</Aside>
37-
38-
Supply the address of the EOA or contract responsible for initiating the original transaction on L2 to the `/claimable`
39-
endpoint. The API backend will provide you with all the necessary information to successfully conclude the transaction on L1.
40-
Take a look at the following example:
41-
42-
```bash
43-
https://sepolia-api-bridge.scroll.io/api/claimable?address=0x031407eaaffFB4f1EC2c999bE4477E52C81de3c5&page_size=10&page=1
44-
```
45-
46-
The API should return your transaction data in the following format:
47-
48-
```json
49-
{
50-
"errcode": 0,
51-
"errmsg": "",
52-
"data": {
53-
"result": [
54-
{
55-
"hash": "0xa476850306d6ee52b127628ded34dcf2343570873cce9c5383bd497db48d4f9b",
56-
"amount": "",
57-
"to": "",
58-
"isL1": false,
59-
"l1Token": "",
60-
"l2Token": "",
61-
"blockNumber": 748,
62-
"blockTimestamp": null,
63-
"finalizeTx": {
64-
"hash": "",
65-
"amount": "",
66-
"to": "",
67-
"isL1": false,
68-
"blockNumber": 0,
69-
"blockTimestamp": null
70-
},
71-
"claimInfo": {
72-
"from": "0x031407eaaffFB4f1EC2c999bE4477E52C81de3c5",
73-
"to": "0x1039057185CFe192d16c03F5656225821A193FD5",
74-
"value": "0",
75-
"nonce": "9",
76-
"batch_hash": "0x49a18d72dbceeb957f918947b532db452c031f528e7e6bf329007066638c5e50",
77-
"message": "0xa413686200000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005686f6c6973000000000000000000000000000000000000000000000000000000",
78-
"proof": "0x69b4ee6cf9a38bed79668ddd347fef2bdff44c3760c9309fa41decfd60202d22ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5b4c11951957c6f8f642c4af61cd6b24640fec6dc7fc607ee8206a99e92410d3079f53171df5c0661d2afe86c4d97b6f34278daf6a0ea9baff5b4fc979d5629a5",
79-
"batch_index": "93"
80-
},
81-
"createdTime": null
82-
}
83-
],
84-
"total": 1
85-
}
86-
}
87-
```
88-
89-
The `claimInfo` object under the `result` json returned has all the information needed to execute your transaction on L1. The
90-
parameters needed by the `relayMessageWithProof` are: `from`, `to`, `value`, `nonce`, `message` and `proof`. Supply these to
91-
the `relayMessageWithProof` function on L1 to execute and finalize your transaction on L1.
28+
To produce this proof and these values, a batch indexing service has to be run locally: [Scroll Bridge SDK](https://github.com/scroll-tech/scroll-bridge-sdk). Further details on how to use this service are in the [docs](https://github.com/scroll-tech/scroll-bridge-sdk/blob/main/docs/document.md).
9229

9330
<Aside type="tip" title="">
9431
All L2 transactions are bundled into batches – you have to wait for the batch that includes your transaction to
95-
finalize before calling `relayMessageWithProof`. Your transaction batch index is returned in the `batch_index` value
96-
on the `/claimable` endpoint, and you can follow the progress on the [Scroll Rollup
32+
finalize before calling `relayMessageWithProof`. You can follow the progress of your batch on the [Scroll Rollup
9733
Explorer](https://scroll.io/rollupscan?page=1&per_page=10).
9834
</Aside>
9935

0 commit comments

Comments
 (0)