Skip to content

Commit

Permalink
coderabbit improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
0xDEnYO committed Feb 20, 2025
1 parent c857955 commit d11b503
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions script/deploy/safe/add-safe-owners-and-threshold.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ const main = defineCommand({
type: 'string',
description: 'Private key of the signer',
},
owners: {
type: 'string',
description: 'List of new owners to add to the safe separated by commas',
},
},
async run({ args }) {
const { network, privateKeyArg } = args
Expand Down Expand Up @@ -162,9 +158,17 @@ async function submitAndExecuteTransaction(
console.info('Transaction proposed:', safeTxHash)

// Execute the transaction immediately
const execResult = await protocolKit.executeTransaction(safeTransaction)
await execResult.transactionResponse?.wait()
console.info('Transaction executed:', safeTxHash)
try {
const execResult = await protocolKit.executeTransaction(safeTransaction)
const receipt = await execResult.transactionResponse?.wait()
if (receipt?.status === 0) {
throw new Error('Transaction failed')
}
console.info('Transaction executed:', safeTxHash)
} catch (error) {
console.error('Transaction execution failed:', error)
throw error
}

return safeTxHash
}
Expand Down

0 comments on commit d11b503

Please sign in to comment.