Skip to content

Commit

Permalink
feat: additional functionality for the generator (bgd-labs#484) (bgd-…
Browse files Browse the repository at this point in the history
…labs#525)

* feat: additional functionality for the generator (bgd-labs#484)

by passing the -u/--update flag when using the -c options the cached
block height will get updated

* fix: bump deps

* fix: update helpers

* fix: update actions

* fix: update readme

---------

Co-authored-by: Alice <[email protected]>
  • Loading branch information
sakulstra and Rozengarden authored Nov 19, 2024
1 parent cd6c048 commit ad22f03
Show file tree
Hide file tree
Showing 9 changed files with 4,158 additions and 2,248 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ipfs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@ jobs:
ref: ${{ inputs.myCommit }}
persist-credentials: true

- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "yarn"

- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: bgd-labs/github-workflows/.github/actions/setup-node@main

- name: Get all changed *.md file(s)
id: changed-files
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,12 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: "yarn"
- uses: actions/checkout@v4

- name: Install dependencies
run: yarn install --frozen-lockfile
- uses: bgd-labs/github-workflows/.github/actions/setup-node@main

- name: Enforce linting
run: yarn lint --check
run: npm run lint --check

test-sol:
name: Foundry build n test
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ zkout/
# editors
.idea

# well, looks strange to ignore package-lock, but we have only pretter and it's temproray
package-lock.json
node_modules
yarn.lock

# ignore foundry deploy artifacts
broadcast/
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ The template ships with sensible default so you can use default `foundry` comman
```sh
cp .env.example .env
forge install
yarn
npm i
```

### Create an aip

This repository includes a generator to help you bootstrap the required files for an `AIP`.
To generate a proposal you need to run: `yarn generate`
To generate a proposal you need to run: `npm run generate`

To get a full list of available commands run `yarn generate --help`
To get a full list of available commands run `npm run generate -- --help`

```sh
yarn generate --help
yarn run v1.22.19
npm run generate -- --help
$ tsx generator/cli --help
Usage: proposal-generator [options]

Expand Down
4 changes: 4 additions & 0 deletions generator/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ program
).choices(Object.values(VOTING_NETWORK)),
)
.addOption(new Option('-c, --configFile <string>', 'path to config file'))
.addOption(new Option('-u, --update', 'when used with -c update block height'))
.allowExcessArguments(false)
.parse(process.argv);

Expand Down Expand Up @@ -138,6 +139,9 @@ if (options.configFile) {
const module = v2
? FEATURE_MODULES_V2.find((m) => m.value === feature)!
: FEATURE_MODULES_V3.find((m) => m.value === feature)!;
if (options.update) {
poolConfigs[pool]!.cache = await generateDeterministicPoolCache(pool);
}
poolConfigs[pool]!.artifacts.push(
module.build({
options,
Expand Down
2 changes: 1 addition & 1 deletion lib/aave-helpers
Loading

0 comments on commit ad22f03

Please sign in to comment.