diff --git a/.changeset/long-times-divide.md b/.changeset/long-times-divide.md new file mode 100644 index 000000000..abfd1e225 --- /dev/null +++ b/.changeset/long-times-divide.md @@ -0,0 +1,5 @@ +--- +"operations-gen": minor +--- + +feat: add deploy_contract_types for same-ABI multi-label deploy diff --git a/tools/operations-gen/README.md b/tools/operations-gen/README.md index 35629a4f4..00d0abae8 100644 --- a/tools/operations-gen/README.md +++ b/tools/operations-gen/README.md @@ -127,6 +127,17 @@ contracts: access: owner # Write op with MCMS support - name: getTokenPrice access: public # Read op (or public write op) + + # Same ABI, multiple datastore labels — one Deploy handles all three. + - contract_name: ManyChainMultiSig + version: "1.0.0" + deploy_contract_types: + - ProposerManyChainMultiSig + - BypasserManyChainMultiSig + - CancellerManyChainMultiSig + functions: + - name: setConfig + access: owner ``` ### Top-level fields @@ -148,8 +159,9 @@ contracts: | `gobindings_package` | No | Optional full Go import path or relative filesystem path override for this contract's abigen-generated bindings package. Required only when `input.gobindings_package` is not set. | | `package_name` | No | Override the generated Go package name. Defaults to `snake_case(contract_name)`. | | `version_path` | No | Override the directory path derived from the version. Defaults to `v{major}_{minor}_{patch}`. | -| `omit_deploy` | No | Skip generation of the `Deploy` operation and bytecode constant. Defaults to `false`. Cannot be combined with `zksync_bytecode`. | -| `zksync_bytecode` | No | zkSync VM deploy bytecode symbol, or `{package, symbol}`. Package defaults to `input.zksync_bindings_package`, then the contract's `gobindings_package`. | +| `omit_deploy` | No | Skip generation of the `Deploy` operation and bytecode constant. Defaults to `false`. Cannot be combined with `zksync_bytecode` or `deploy_contract_types`. | +| `deploy_contract_types` | No | List of `ContractType` labels (e.g. `ProposerManyChainMultiSig`) that share this contract's ABI and bytecode but need distinct datastore entries. Labels must be valid Go exported identifiers. When set, **only** these labels appear as keys in `BytecodeByTypeAndVersion` — the base `contract_name` type is excluded. Each label gets exported `var