|
| 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