From e45aff413ef831434b38e330d1bbe451fa84509e Mon Sep 17 00:00:00 2001 From: sakulstra Date: Mon, 25 Sep 2023 10:55:46 +0200 Subject: [PATCH 1/4] feat: expose tenderly setCode --- src/utils/tenderlyClient.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/utils/tenderlyClient.ts b/src/utils/tenderlyClient.ts index e9ebc59..5d749b2 100644 --- a/src/utils/tenderlyClient.ts +++ b/src/utils/tenderlyClient.ts @@ -395,6 +395,17 @@ class Tenderly { }), }); }; + + replaceCode = (fork: any, address: Hex, code: Hex) => { + const publicProvider = createPublicClient({ + chain: { id: 3030 } as any, + transport: http(fork.forkUrl), + }); + return publicProvider.request({ + method: 'tenderly_setCode' as any, + params: [address, code], + }); + }; } export const tenderly = new Tenderly( From 6bfb0275b59a19cbe944b2976ae5c3e7167e96b5 Mon Sep 17 00:00:00 2001 From: sakulstra Date: Tue, 3 Oct 2023 10:21:37 +0200 Subject: [PATCH 2/4] fix: work around concat bug --- src/utils/storageSlots.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/storageSlots.ts b/src/utils/storageSlots.ts index f594ff6..90cba10 100644 --- a/src/utils/storageSlots.ts +++ b/src/utils/storageSlots.ts @@ -52,5 +52,8 @@ export function getDynamicArraySlot(baseSlot: bigint, arrayIndex: number, itemSi export function getBytesValue(value: string | Hex) { const bytesString = toBytes(value); if (bytesString.length > 31) throw new Error('Error: strings > 31 bytes are not implemented'); - return concat([toHex(pad(bytesString, { size: 31, dir: 'right' })), toHex(bytesString.length * 2, { size: 1 })]); + return pad( + concat([toHex(pad(bytesString, { size: 31, dir: 'right' })), toHex(bytesString.length * 2, { size: 1 })]), + { size: 32 } + ); } From f372bee42b3b22d2dd59194b5cfe7c0f4ec5356e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 10:23:37 +0200 Subject: [PATCH 3/4] chore(release): Release v0.0.26 :rocket: :tada: (#58) Co-authored-by: Release bot :robot --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7208a4..2d0af29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,18 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.26](https://github.com/bgd-labs/report-engine/compare/v0.0.25...v0.0.26) (2023-10-03) + + +### Features + +* expose tenderly setCode ([e45aff4](https://github.com/bgd-labs/report-engine/commit/e45aff413ef831434b38e330d1bbe451fa84509e)) + + +### Bug Fixes + +* work around concat bug ([6bfb027](https://github.com/bgd-labs/report-engine/commit/6bfb0275b59a19cbe944b2976ae5c3e7167e96b5)) + ### [0.0.25](https://github.com/bgd-labs/report-engine/compare/v0.0.24...v0.0.25) (2023-09-25) diff --git a/package.json b/package.json index 5b7a185..23ed40b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@bgd-labs/aave-cli", - "version": "0.0.25", + "version": "0.0.26", "description": "A cli to perform various aave governance related tasks", "private": false, "scripts": { From 9a4b6c57630e87d20d941b7c782f4d97e62a2665 Mon Sep 17 00:00:00 2001 From: Lukas Date: Tue, 10 Oct 2023 10:26:22 +0200 Subject: [PATCH 4/4] chore: upgrade ci to use release-please (#60) --- .github/workflows/dispatch-draft-release.yml | 12 ------- .github/workflows/release-please.yml | 34 ++++++++++++++++++++ .github/workflows/test-release.yml | 22 ------------- 3 files changed, 34 insertions(+), 34 deletions(-) delete mode 100644 .github/workflows/dispatch-draft-release.yml create mode 100644 .github/workflows/release-please.yml delete mode 100644 .github/workflows/test-release.yml diff --git a/.github/workflows/dispatch-draft-release.yml b/.github/workflows/dispatch-draft-release.yml deleted file mode 100644 index de180c9..0000000 --- a/.github/workflows/dispatch-draft-release.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Draft release - -concurrency: - group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} - cancel-in-progress: true - -on: - workflow_dispatch: - -jobs: - draft-release: - uses: bgd-labs/github-workflows/.github/workflows/draft-release.yml@main diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml new file mode 100644 index 0000000..58f6c25 --- /dev/null +++ b/.github/workflows/release-please.yml @@ -0,0 +1,34 @@ +on: + push: + branches: + - main + +permissions: + contents: write + pull-requests: write + +name: release-please +jobs: + test-node: + uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main + + release-please: + runs-on: ubuntu-latest + outputs: + releaseCreated: ${{ steps.release.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@v3 + id: release + with: + release-type: node + package-name: aave-cli + pull-request-header: 'I have created a release' + + release-node: + uses: bgd-labs/github-workflows/.github/workflows/release-node.yml@main + if: ${{ needs.release-please.outputs.releaseCreated }} + needs: + - test-node + - release-please + secrets: + NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml deleted file mode 100644 index f2c09ad..0000000 --- a/.github/workflows/test-release.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Test & release - -concurrency: - group: ${{ github.workflow }} - cancel-in-progress: true - -on: - push: - branches: - - main - -jobs: - test-node: - uses: bgd-labs/github-workflows/.github/workflows/test-node.yml@main - release: - uses: bgd-labs/github-workflows/.github/workflows/release.yml@main - needs: test-node - release-node: - uses: bgd-labs/github-workflows/.github/workflows/release-node.yml@main - needs: test-node - secrets: - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}