Skip to content

Commit d9fdd7d

Browse files
committed
feat: add reusable workflow for proposing Safe multisig transactions
- Created a new GitHub Actions workflow for proposing transactions to a Gnosis Safe multisig wallet. - Added inputs for RPC URL, Safe address, transaction target, value, and data. - Implemented job steps for checking out the repository, setting up Node.js, installing dependencies, building the action, and proposing the transaction. - Included a README with usage instructions and a changelog. - Added TypeScript configuration and source code for the action. - Created .gitignore to exclude unnecessary files and directories. - Initialized package.json and package-lock.json for dependency management. - Added version tracking with version.txt.
1 parent 24748ea commit d9fdd7d

File tree

9 files changed

+25
-108
lines changed

9 files changed

+25
-108
lines changed

.github/workflows/safe-transaction.yml renamed to .github/workflows/propose-safe-multisig-tx.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,21 @@ jobs:
6060

6161
- name: Install dependencies
6262
run: npm ci
63-
working-directory: ./safe-transaction
63+
working-directory: ./propose-safe-multisig-tx
6464

6565
- name: Build action
6666
run: npm run build
67-
working-directory: ./safe-transaction
67+
working-directory: ./propose-safe-multisig-tx
6868

6969
- name: Propose Safe Transaction
7070
run: npm run propose
71-
working-directory: ./safe-transaction
71+
working-directory: ./propose-safe-multisig-tx
7272
env:
73-
PROPOSER_PRIVATE_KEY: ${{ secrets.proposer-private-key }}
73+
PROPOSER_PRIVATE_KEY: ${{ secrets.safe-proposer-private-key }}
7474
SAFE_API_KEY: ${{ secrets.safe-api-key }}
7575
RPC_URL: ${{ inputs.rpc-url }}
76-
INPUT_SAFE_ADDRESS: ${{ inputs.safe-address }}
77-
INPUT_TRANSACTION_TO: ${{ inputs.transaction-to }}
78-
INPUT_TRANSACTION_VALUE: ${{ inputs.transaction-value }}
79-
INPUT_TRANSACTION_DATA: ${{ inputs.transaction-data }}
76+
SAFE_ADDRESS: ${{ inputs.safe-address }}
77+
TRANSACTION_TO: ${{ inputs.transaction-to }}
78+
TRANSACTION_VALUE: ${{ inputs.transaction-value }}
79+
TRANSACTION_DATA: ${{ inputs.transaction-data }}
8080
id: safe-transaction
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Safe Transaction Proposer - Reusable Workflow
1+
# Safe Multisig Transaction Proposer - Reusable Workflow
22

33
## Overview 🌟
44

@@ -22,15 +22,15 @@ This reusable GitHub Actions workflow automates the process of proposing transac
2222

2323
| **Output** | **Description** |
2424
| ----------------- | ----------------------------------------- |
25-
| **safe-tx-hash** | Hash of the Safe transaction created |
26-
| **transaction** | Complete transaction details (JSON) |
25+
| **tx-hash** | Hash of the Safe transaction created |
26+
| **tx-details** | Complete transaction details (JSON) |
2727

2828
## Secrets πŸ”
2929

30-
| **Secret** | **Description** | **Required** |
31-
| ------------------------- | -------------------------------------------------- | ------------ |
32-
| **PROPOSER_PRIVATE_KEY** | Private key of the proposer wallet | Yes |
33-
| **SAFE_API_KEY** | Safe API key for transaction service | Yes |
30+
| **Secret** | **Description** | **Required** |
31+
| ----------------------------- | -------------------------------------------------- | ------------ |
32+
| **SAFE_PROPOSER_PRIVATE_KEY** | Private key of the proposer wallet | Yes |
33+
| **SAFE_API_KEY** | Safe API key for transaction service | Yes |
3434

3535
## How to Use This Reusable Workflow πŸ”„
3636

@@ -55,11 +55,12 @@ This reusable GitHub Actions workflow automates the process of proposing transac
5555

5656
jobs:
5757
safe-transaction:
58-
uses: ./.github/workflows/safe-transaction.yml
58+
uses: ./.github/workflows/propose-safe-multisig-tx.yml
5959
secrets:
60-
proposer-private-key: ${{ secrets.PROPOSER_PRIVATE_KEY }}
61-
rpc-url: ${{ vars.RPC_URL }}
60+
safe-proposer-private-key: ${{ secrets.SAFE_PROPOSER_PRIVATE_KEY }}
6261
safe-api-key: ${{ secrets.SAFE_API_KEY }}
62+
with:
63+
rpc-url: ${{ vars.RPC_URL }}
6364
with:
6465
safe-address: ${{ inputs.safe-address }}
6566
transaction-to: ${{ inputs.transaction-to }}
@@ -68,7 +69,7 @@ This reusable GitHub Actions workflow automates the process of proposing transac
6869
6970
2. **Configure Secrets**
7071
Ensure that the required secrets are added to your repository's settings:
71-
- `PROPOSER_PRIVATE_KEY`: The private key of the wallet that will propose the transaction
72+
- `SAFE_PROPOSER_PRIVATE_KEY`: The private key of the wallet that will propose the transaction
7273
- `SAFE_API_KEY`: Your Safe API key for the transaction service
7374

7475
## Security Considerations πŸ›‘οΈ

safe-transaction/package-lock.json renamed to propose-safe-multisig-tx/package-lock.json

Lines changed: 4 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "safe-transaction-action",
2+
"name": "propose-safe-multisig-tx-github-action",
33
"version": "1.0.0",
44
"description": "GitHub Action for proposing Safe Multisig transactions",
55
"main": "dist/index.js",

0 commit comments

Comments
Β (0)