feat: Add ChainSubmissionStrategy and update hyperlane submit (#4380)
### Description - This PR is a prerequisite for https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4225 - Adds `ChainSubmissionStrategy` which is a ChainMap of SubmissionStrategy - Moves the submissionStrategy logic out of the context to allow `--strategy` to be used for both cases (mostly to not having to parse and validate 2 schemas in `getSubmissionStrategy()`) - Adds logic to assume that all `--transactions` are of the same chainId with explicit validation ### Backward compatibility Yes ### Testing Manualpull/4391/head
parent
38a52deac2
commit
f2783c03bb
@ -0,0 +1,6 @@ |
||||
--- |
||||
'@hyperlane-xyz/cli': minor |
||||
'@hyperlane-xyz/sdk': minor |
||||
--- |
||||
|
||||
Add ChainSubmissionStrategySchema |
@ -1,4 +1,3 @@ |
||||
chain: alfajores |
||||
submitter: |
||||
type: impersonatedAccount |
||||
userAddress: '0x16F4898F47c085C41d7Cc6b1dc72B91EA617dcBb' |
||||
|
@ -1,3 +1,2 @@ |
||||
chain: alfajores |
||||
submitter: |
||||
type: jsonRpc |
||||
|
@ -1,5 +1,11 @@ |
||||
import { z } from 'zod'; |
||||
|
||||
import { SubmissionStrategySchema } from './schemas.js'; |
||||
import { |
||||
ChainSubmissionStrategySchema, |
||||
SubmissionStrategySchema, |
||||
} from './schemas.js'; |
||||
|
||||
export type SubmissionStrategy = z.infer<typeof SubmissionStrategySchema>; |
||||
export type ChainSubmissionStrategy = z.infer< |
||||
typeof ChainSubmissionStrategySchema |
||||
>; |
||||
|
Loading…
Reference in new issue