Add propose to onesig and multisig hardhat task#546
Conversation
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a new Hardhat task for proposing arbitrary OmniTransactions from a JSON file via either OneSig or Safe multisig, and adjusts devtools dependencies (including a pnpm patch) to address multisig proposal issues.
Changes:
- Add
stg:propose:transactionstask that loads transactions from a JSON file and routes them throughSUBTASK_LZ_SIGN_AND_SENDwith either a Safe or OneSig signer factory. - Patch
@layerzerolabs/protocol-devtools-evm@5.0.1to batchEndpointV2.setConfig()transactions. - Update dependency versions/lockfile and register the new pnpm patched dependency.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Updates resolved dependency graph; adds patched dependency entry and version adjustments. |
| patches/@layerzerolabs__protocol-devtools-evm@5.0.1.patch | Patches EndpointV2.setConfig() to split config updates into chunks. |
| packages/stg-evm-v2/package.json | Pins devtools EVM/protocol devtools EVM versions consistent with the multisig fix approach. |
| packages/stg-evm-v2/devtools/tasks/proposeTransactions.ts | New task: reads transactions.json (or provided path) and proposes via Safe/OneSig. |
| packages/stg-evm-v2/devtools/tasks/index.ts | Registers the new propose-transactions task module. |
| packages/stg-evm-v2/devtools/tasks/constants.ts | Adds TASK_STG_PROPOSE_TRANSACTIONS constant. |
| packages/stg-devtools-evm-hardhat-v2/package.json | Aligns devtools dependency versions with the pinned/patch-compatible set. |
| package.json | Registers the pnpm patched dependency for @layerzerolabs/protocol-devtools-evm@5.0.1. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return parsed.map((entry: RawOmniTransaction, i: number) => { | ||
| const label = `transactions[${i}]` | ||
|
|
||
| if (typeof entry.point?.eid !== 'number') { | ||
| throw new Error(`${label}: point.eid must be a number`) | ||
| } | ||
| if (typeof entry.point?.address !== 'string' || !entry.point.address) { |
| if (typeof entry.point?.address !== 'string' || !entry.point.address) { | ||
| throw new Error(`${label}: point.address must be a non-empty string`) | ||
| } |
| if (typeof entry.data !== 'string') { | ||
| throw new Error(`${label}: data must be a hex string`) | ||
| } |
| if (entry.value !== undefined) { | ||
| tx.value = BigInt(entry.value) | ||
| } |
In this PR