File tree Expand file tree Collapse file tree 3 files changed +15
-1
lines changed
Expand file tree Collapse file tree 3 files changed +15
-1
lines changed Original file line number Diff line number Diff line change 1414 description : ' Target address for the transaction'
1515 required : true
1616 type : string
17+ chain-id :
18+ description : ' Chain ID of the blockchain network (default: 42161 for Arbitrum)'
19+ required : false
20+ default : ' 42161'
21+ type : string
1722 transaction-value :
1823 description : ' Value to send in the transaction (in wei, default: 0)'
1924 required : false
7681 INPUT_RPC_URL : ${{ inputs.rpc-url }}
7782 INPUT_SAFE_ADDRESS : ${{ inputs.safe-address }}
7883 INPUT_TARGET_ADDRESS : ${{ inputs.transaction-target-address }}
84+ INPUT_CHAIN_ID : ${{ inputs.chain-id }}
7985 INPUT_TRANSACTION_VALUE : ${{ inputs.transaction-value }}
8086 INPUT_TRANSACTION_DATA : ${{ inputs.transaction-data }}
8187 id : safe-transaction
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ This reusable GitHub Actions workflow automates the process of creating and prop
1010| ------------------------ | ------------------------------------------------------------- | ------------ | ----------------------------------- |
1111| ** proposer-private-key** | Private key of the proposer wallet | Yes | - |
1212| ** rpc-url** | RPC URL for the blockchain network | Yes | - |
13+ | ** chain-id** | Chain ID of the blockchain network | No | ` 42161 ` (Arbitrum) |
1314| ** safe-address** | Address of the Safe contract | Yes | - |
1415| ** transaction-target-address** | Target address for the transaction | Yes | - |
1516| ** safe-api-key** | Safe API key for transaction service | Yes | - |
@@ -46,6 +47,10 @@ This reusable GitHub Actions workflow automates the process of creating and prop
4647 transaction-target-address :
4748 description : ' Target contract address'
4849 required : true
50+ chain-id :
51+ description : ' Chain ID (e.g., 1 for Ethereum, 42161 for Arbitrum)'
52+ required : false
53+ default : ' 42161'
4954 transaction-data :
5055 description : ' Transaction data (0x prefixed)'
5156 required : false
@@ -61,6 +66,7 @@ This reusable GitHub Actions workflow automates the process of creating and prop
6166 with :
6267 safe-address : ${{ inputs.safe-address }}
6368 transaction-target-address : ${{ inputs.transaction-target-address }}
69+ chain-id : ${{ inputs.chain-id }}
6470 transaction-data : ${{ inputs.transaction-data }}
6571 ` ` `
6672
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ async function run() {
99 // Get inputs from environment variables
1010 const proposerPrivateKey = process . env . INPUT_PROPOSER_PRIVATE_KEY ;
1111 const rpcUrl = process . env . INPUT_RPC_URL ;
12+ const chainId = process . env . INPUT_CHAIN_ID || "42161" ; // Default to Arbitrum
1213 const safeAddress = process . env . INPUT_SAFE_ADDRESS ;
1314 const transactionTargetAddress = process . env . INPUT_TARGET_ADDRESS ;
1415 const safeApiKey = process . env . INPUT_SAFE_API_KEY ;
@@ -27,6 +28,7 @@ async function run() {
2728 }
2829
2930 core . info ( `🚀 Starting Safe transaction proposal...` ) ;
31+ core . info ( `🌐 Chain ID: ${ chainId } ` ) ;
3032 core . info ( `📍 Safe Address: ${ safeAddress } ` ) ;
3133 core . info ( `🎯 Target Address: ${ transactionTargetAddress } ` ) ;
3234
@@ -36,7 +38,7 @@ async function run() {
3638
3739 // Initialize API Kit
3840 const apiKit = new SafeApiKit ( {
39- chainId : 42161n , // Arbitrum
41+ chainId : BigInt ( chainId ) ,
4042 apiKey : safeApiKey ,
4143 } ) ;
4244
You can’t perform that action at this time.
0 commit comments