-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (78 loc) · 2.63 KB
/
propose-safe-multisig-tx.yml
File metadata and controls
84 lines (78 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: 'Propose Safe Multisig Transaction'
on:
workflow_call:
inputs:
rpc-url:
description: 'RPC URL for the blockchain network'
required: true
type: string
safe-address:
description: 'Address of the Safe contract'
required: true
type: string
transaction-to:
description: 'Target address of the transaction'
required: true
type: string
transaction-value:
description: 'Value to send in the transaction (in wei, default: 0)'
required: false
default: '0'
type: string
transaction-data:
description: 'Transaction data/calldata'
required: true
type: string
dry-run:
description: 'If true, validate and prepare the transaction without proposing it'
required: false
default: false
type: boolean
secrets:
safe-proposer-private-key:
description: 'Private key of the proposer wallet'
required: true
safe-api-key:
description: 'Safe API key for transaction service'
required: true
outputs:
tx-hash:
description: 'Hash of the Safe transaction'
value: ${{ jobs.propose-transaction.outputs.tx-hash }}
tx-details:
description: 'Created transaction details'
value: ${{ jobs.propose-transaction.outputs.tx-details }}
jobs:
propose-transaction:
runs-on: ubuntu-latest
outputs:
tx-hash: ${{ steps.safe-transaction.outputs.tx-hash }}
tx-details: ${{ steps.safe-transaction.outputs.tx-details }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: iExecBlockchainComputing/github-actions-workflows
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install dependencies
run: npm ci
working-directory: ./propose-safe-multisig-tx
- name: Build action
run: npm run build
working-directory: ./propose-safe-multisig-tx
- name: Propose Safe Transaction
run: npm run propose
working-directory: ./propose-safe-multisig-tx
env:
RPC_URL: ${{ inputs.rpc-url }}
SAFE_ADDRESS: ${{ inputs.safe-address }}
TRANSACTION_TO: ${{ inputs.transaction-to }}
TRANSACTION_VALUE: ${{ inputs.transaction-value }}
TRANSACTION_DATA: ${{ inputs.transaction-data }}
SAFE_PROPOSER_PRIVATE_KEY: ${{ secrets.safe-proposer-private-key }}
SAFE_API_KEY: ${{ secrets.safe-api-key }}
DRY_RUN: ${{ inputs.dry-run }}
id: safe-transaction