@aave-dao/aave-helpers-js 1.0.7 → 1.0.9
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 +27 -10
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/protocol-diff-C2SNG4ee.mjs +3387 -0
- package/dist/protocol-diff-CnKXLpiL.cjs +3450 -0
- package/package.json +1 -1
- package/dist/protocol-diff-BB9QZ_ZN.mjs +0 -2162
- package/dist/protocol-diff-QsvWEZ3c.cjs +0 -2225
package/README.md
CHANGED
|
@@ -37,17 +37,34 @@ const md = await diffSnapshots(preSnapshot, postSnapshot);
|
|
|
37
37
|
|
|
38
38
|
## Event Database
|
|
39
39
|
|
|
40
|
-
`utils/eventDb.
|
|
40
|
+
`utils/eventDb.ts` is a collection of Solidity event ABIs used to decode transaction logs in reports. If a report shows raw topics/data instead of a decoded event name, the event ABI is likely missing from this file.
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
### Adding events from a verified contract
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
Use the `add-events` script to automatically fetch events from a block explorer and add any missing ones to the database:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
# By chain ID and address
|
|
48
|
+
npx tsx scripts/add-events.ts <chainId> <address>
|
|
49
|
+
|
|
50
|
+
# Examples
|
|
51
|
+
npx tsx scripts/add-events.ts 1 0x5ac4182a1dd41aeef465e40b82fd326bf66ab82c
|
|
52
|
+
npx tsx scripts/add-events.ts 137 0xSomePolygonAddress
|
|
51
53
|
```
|
|
52
54
|
|
|
53
|
-
|
|
55
|
+
The script will:
|
|
56
|
+
|
|
57
|
+
- Fetch the contract ABI from the block explorer (Etherscan, etc.)
|
|
58
|
+
- If the contract is a proxy, also fetch the implementation ABI
|
|
59
|
+
- Compare against the existing event database and add only missing events
|
|
60
|
+
- Running it twice on the same contract is safe (idempotent)
|
|
61
|
+
|
|
62
|
+
Requires `ETHERSCAN_API_KEY` environment variable. Optionally set `EXPLORER_PROXY` to override the explorer API URL.
|
|
63
|
+
|
|
64
|
+
### Claude Code skill
|
|
65
|
+
|
|
66
|
+
If you're using Claude Code, you can ask it to add events by providing an explorer URL:
|
|
67
|
+
|
|
68
|
+
> add events from https://etherscan.io/address/0x5ac4182a1dd41aeef465e40b82fd326bf66ab82c
|
|
69
|
+
|
|
70
|
+
It will parse the URL, determine the chain ID, and run the script automatically.
|
package/dist/cli.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const require_protocol_diff = require('./protocol-diff-
|
|
2
|
+
const require_protocol_diff = require('./protocol-diff-CnKXLpiL.cjs');
|
|
3
3
|
let _bgd_labs_toolbox = require("@bgd-labs/toolbox");
|
|
4
4
|
let viem = require("viem");
|
|
5
5
|
let fs = require("fs");
|
package/dist/cli.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as diffSnapshots } from "./protocol-diff-
|
|
2
|
+
import { t as diffSnapshots } from "./protocol-diff-C2SNG4ee.mjs";
|
|
3
3
|
import { Aip, IPayloadsController_ABI, cidV0ToBs58, getMdContractName, getPayloadsController, hash, makePayloadExecutableOnTestClient, parseFrontmatterMd, renderTenderlyReport, tenderly_createVnet } from "@bgd-labs/toolbox";
|
|
4
4
|
import { encodeFunctionData, parseAbi, zeroAddress } from "viem";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs";
|
package/dist/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_protocol_diff = require('./protocol-diff-
|
|
2
|
+
const require_protocol_diff = require('./protocol-diff-CnKXLpiL.cjs');
|
|
3
3
|
|
|
4
4
|
exports.diff = require_protocol_diff.diff;
|
|
5
5
|
exports.diffSnapshots = require_protocol_diff.diffSnapshots;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as isChange, i as hasChanges, n as eventDb, r as diff, t as diffSnapshots } from "./protocol-diff-
|
|
1
|
+
import { a as isChange, i as hasChanges, n as eventDb, r as diff, t as diffSnapshots } from "./protocol-diff-C2SNG4ee.mjs";
|
|
2
2
|
|
|
3
3
|
export { diff, diffSnapshots, eventDb, hasChanges, isChange };
|