@relay-protocol/settlement-abis 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,31 @@
1
+ # Contract ABIs for Relay Protocol
2
+
3
+ This package contains the ABIs for the Relay Protocol settlement contracts, exported
4
+ from the Foundry build output.
5
+
6
+ ## How to use
7
+
8
+ ```typescript
9
+ import { RelayHub, RelayAllocator } from "@relay-protocol/settlement-abis"
10
+
11
+ const logs = await client.getContractEvents({
12
+ address: hubAddress,
13
+ abi: RelayHub,
14
+ eventName: "Transfer",
15
+ })
16
+ ```
17
+
18
+ Each export is a plain ABI array, so it works with viem, ethers, and anything else
19
+ that accepts a JSON ABI.
20
+
21
+ ## Regenerating the ABIs
22
+
23
+ The contents of `src/abis/` and `src/index.ts` are generated - do not edit them by hand.
24
+ After modifying contract source code, regenerate and commit the result:
25
+
26
+ ```sh
27
+ yarn workspace @relay-settlement/smart-contracts build:abis
28
+ ```
29
+
30
+ `src/versions/` is hand-curated - it merges historical contract ABIs so the consumer can
31
+ decode legacy transactions, and the generator never writes there.