Skip to content

Commit bc97d43

Browse files
committed
docs
1 parent f09336c commit bc97d43

File tree

2 files changed

+95
-0
lines changed

2 files changed

+95
-0
lines changed

doc/polycli_ulxly.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ The command also inherits flags from parent commands.
4848

4949
- [polycli ulxly empty-proof](polycli_ulxly_empty-proof.md) - create an empty proof
5050

51+
- [polycli ulxly get-claims](polycli_ulxly_get-claims.md) - Generate ndjson for each bridge claim over a particular range of blocks
52+
5153
- [polycli ulxly get-deposits](polycli_ulxly_get-deposits.md) - Generate ndjson for each bridge deposit over a particular range of blocks
5254

5355
- [polycli ulxly get-verify-batches](polycli_ulxly_get-verify-batches.md) - Generate ndjson for each verify batch over a particular range of blocks

doc/polycli_ulxly_get-claims.md

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# `polycli ulxly get-claims`
2+
3+
> Auto-generated documentation.
4+
5+
## Table of Contents
6+
7+
- [Description](#description)
8+
- [Usage](#usage)
9+
- [Flags](#flags)
10+
- [See Also](#see-also)
11+
12+
## Description
13+
14+
Generate ndjson for each bridge claim over a particular range of blocks
15+
16+
```bash
17+
polycli ulxly get-claims [flags]
18+
```
19+
20+
## Usage
21+
22+
This command will attempt to scan a range of blocks and look for uLxLy
23+
Claim Events. This is the specific signature that we're interested
24+
in:
25+
26+
```solidity
27+
/**
28+
* @dev Emitted when a claim is done from another network
29+
*/
30+
event ClaimEvent(
31+
uint256 globalIndex,
32+
uint32 originNetwork,
33+
address originAddress,
34+
address destinationAddress,
35+
uint256 amount
36+
);
37+
```
38+
39+
If you're looking at the raw topics from on chain or in an explorer, this is the associated value:
40+
41+
`0x1df3f2a973a00d6635911755c260704e95e8a5876997546798770f76396fda4d`
42+
43+
Each event that we counter will be parsed and written as JSON to
44+
stdout. Example usage:
45+
46+
```bash
47+
polycli ulxly get-claims \
48+
--bridge-address 0x528e26b25a34a4A5d0dbDa1d57D318153d2ED582 \
49+
--rpc-url https://eth-sepolia.g.alchemy.com/v2/demo \
50+
--from-block 4880876 \
51+
--to-block 6028159 \
52+
--filter-size 9999 > cardona-4880876-to-6028159.ndjson
53+
```
54+
55+
This command will look for claim events from block `4880876` to
56+
block `6028159` in increments of `9999` blocks at a time for the
57+
contract address `0x528e26b25a34a4A5d0dbDa1d57D318153d2ED582`. The
58+
output will be written as newline delimited JSON.
59+
60+
This command is very specific for the ulxly bridge, and it's meant to
61+
serve as the input to the proof command.
62+
63+
64+
65+
## Flags
66+
67+
```bash
68+
-a, --bridge-address string The address of the ulxly bridge
69+
-i, --filter-size uint The batch size for individual filter queries (default 1000)
70+
-f, --from-block uint The start of the range of blocks to retrieve
71+
-h, --help help for get-claims
72+
-u, --rpc-url string The RPC URL to read the events data
73+
-t, --to-block uint The end of the range of blocks to retrieve
74+
```
75+
76+
The command also inherits flags from parent commands.
77+
78+
```bash
79+
--config string config file (default is $HOME/.polygon-cli.yaml)
80+
--pretty-logs Should logs be in pretty format or JSON (default true)
81+
-v, --verbosity int 0 - Silent
82+
100 Panic
83+
200 Fatal
84+
300 Error
85+
400 Warning
86+
500 Info
87+
600 Debug
88+
700 Trace (default 500)
89+
```
90+
91+
## See also
92+
93+
- [polycli ulxly](polycli_ulxly.md) - Utilities for interacting with the uLxLy bridge

0 commit comments

Comments
 (0)