Skip to content

Commit c7fd472

Browse files
authored
feat: remove deprecated things (#214)
1 parent 2fac6d8 commit c7fd472

24 files changed

+91
-1731
lines changed

README.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,28 @@ For a full overview of features you can run `aave-cli --help`
88
## Installation
99

1010
Make sure to setup your .env as most utilities rely on tenderly and will fail otherwise.
11+
1112
```
1213
TENDERLY_ACCESS_TOKEN=
1314
TENDERLY_PROJECT_SLUG=
1415
TENDERLY_ACCOUNT=
1516
```
1617

1718
Local installation
19+
1820
```
1921
npm i @bgd-labs/aave-cli
2022
```
2123

2224
Global installation
25+
2326
```
2427
npm i -g @bgd-labs/aave-cli
2528
```
2629

2730
Once installed you should be able to run commands via the `@bgd-labs/aave-cli` or the `aave-cli` binary.
2831

29-
Alteratively you can use `npx @bgd-labs/aave-cli` to run the cli via npx.
30-
31-
## Fork
32-
33-
`aave-cli fork --chainId <id>` can ge used to generate tenderly forks.
34-
The cli allows executing certain proposal/actionset IDs, an address or even local payload via aave governance.
35-
For a full overview of commands please run `aave-cli fork --help`
32+
Alternatively you can use `npx @bgd-labs/aave-cli` to run the cli via npx.
3633

3734
## Ipfs
3835

@@ -44,18 +41,14 @@ For a full overview of commands please run `aave-cli fork --help`
4441

4542
## Governance
4643

47-
### Simulation
48-
49-
`aave-cli governance simulate [proposalId]` can be used to simulate a certain proposal on tenderly (e2e across all networks). This feature is intended to be used by systems like seatbelt.
50-
5144
### View
5245

5346
`aave-cli governance view` will start a command line ui for the aave governance.
5447
The command line ui, explains how to vote and generates the proofs needed for voting or registering roots.
5548

5649
### GetStorageRoots
5750

58-
`aave-cli governance getStorageRoots --proposalId <id>` is a utilitiy that generates the storage roots for the data warehouse.
51+
`aave-cli governance getStorageRoots --proposalId <id>` is a utility that generates the storage roots for the data warehouse.
5952

6053
### GetVotingProofs
6154

bun.lockb

10.7 KB
Binary file not shown.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"devDependencies": {
2929
"@types/object-hash": "^3.0.6",
3030
"prettier": "^3.5.3",
31-
"prettier-plugin-solidity": "^2.0.0",
31+
"prettier-plugin-solidity": "^1.0.0",
3232
"tsup": "^8.3.6",
3333
"typescript": "^5.4.5",
3434
"vitest": "^2.1.5"
@@ -61,6 +61,7 @@
6161
"@bgd-labs/aave-v3-governance-cache": "^1.0.11",
6262
"@bgd-labs/js-utils": "^1.4.8",
6363
"@bgd-labs/rpc-env": "^2.3.2",
64+
"@bgd-labs/toolbox": "^0.0.40",
6465
"@commander-js/extra-typings": "^12.1.0",
6566
"@inquirer/prompts": "^7.1.0",
6667
"blockstore-core": "^5.0.2",

src/cli.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import {Command, Option} from '@commander-js/extra-typings';
33
import 'dotenv/config';
44
import packageJson from '../package.json';
55
import {addCommand as addDiffSnapshots} from './commands/diffSnaphots';
6-
import {addCommand as addFork} from './commands/fork';
76
import {addCommand as addGovernance} from './commands/governance';
87
import {addCommand as addIpfsCommand} from './commands/ipfsUpload';
98
import {addCommand as addCapoCommand} from './commands/capo';
@@ -30,7 +29,6 @@ program
3029
.showHelpAfterError();
3130
addGovernance(program);
3231
addDiffSnapshots(program);
33-
addFork(program);
3432
addIpfsCommand(program);
3533
addCapoCommand(program);
3634
addCapoSvrCommand(program);

src/commands/diffSnaphots.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {Command} from '@commander-js/extra-typings';
55
import {adiDiffReports} from '../reports/adi-diff-reports';
66
import {diffReports} from '../reports/diff-reports';
77
import {readJsonFile, readJsonString} from '../utils/json';
8-
import {diff} from '../reports/diff';
98

109
export function addCommand(program: Command) {
1110
program

src/commands/fork.ts

Lines changed: 0 additions & 147 deletions
This file was deleted.

src/commands/governance.ts

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import {
66
import type {Command} from '@commander-js/extra-typings';
77
import {confirm, input, select} from '@inquirer/prompts';
88
import {type Hex, encodeAbiParameters, encodeFunctionData, getContract} from 'viem';
9-
import {generateReport} from '../govv3/generatePayloadReport';
109
import {HUMAN_READABLE_STATE, getGovernance} from '../govv3/governance';
1110
import {getPayloadsController} from '../govv3/payloadsController';
1211
import {getAccountRPL, getBlockRLP} from '../govv3/proofs';
13-
import {simulateProposal} from '../govv3/simulate';
1412
import {findPayloadsController} from '../govv3/utils/checkAddress';
1513
import {toAddressLink, toTxLink} from '../govv3/utils/markdownUtils';
1614
import {DEFAULT_GOVERNANCE, DEFAULT_GOVERNANCE_CLIENT, FORMAT} from '../utils/constants';
@@ -36,45 +34,6 @@ enum DialogOptions {
3634
export function addCommand(program: Command) {
3735
const govV3 = program.command('governance').description('interact with governance v3 contracts');
3836

39-
govV3
40-
.command('simulate')
41-
.description('simulates a proposal on tenderly')
42-
.requiredOption('--proposalId <number>', 'proposalId to simulate via tenderly')
43-
.action(async (name, options) => {
44-
const proposalId = BigInt(options.getOptionValue('proposalId'));
45-
await simulateProposal(DEFAULT_GOVERNANCE, DEFAULT_GOVERNANCE_CLIENT, proposalId);
46-
});
47-
48-
govV3
49-
.command('simulate-payload')
50-
.description('simulates a payloadId on tenderly')
51-
.requiredOption('--chainId <number>', 'the chainId to fork of')
52-
.requiredOption('--payloadId <number>', 'payloadId to simulate via tenderly')
53-
.action(async ({payloadId: _payloadId, chainId}, options) => {
54-
await refreshCache(localCacheAdapter);
55-
const payloadId = Number(_payloadId);
56-
const client = getClient(Number(chainId));
57-
const payloadsControllerAddress = findPayloadsController(Number(chainId));
58-
const payloadsController = getPayloadsController(payloadsControllerAddress as Hex, client);
59-
const cache = await localCacheAdapter.getPayload({
60-
chainId: Number(chainId),
61-
payloadsController: payloadsControllerAddress as Hex,
62-
payloadId: Number(payloadId),
63-
});
64-
const result = await payloadsController.simulatePayloadExecutionOnTenderly(
65-
Number(payloadId),
66-
cache.logs,
67-
);
68-
console.log(
69-
await generateReport({
70-
simulation: result,
71-
payloadId: payloadId,
72-
payloadInfo: cache,
73-
client,
74-
}),
75-
);
76-
});
77-
7837
govV3
7938
.command('view')
8039
.description('shows all the proposals & state')

0 commit comments

Comments
 (0)