You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(operations-gen): add zkSync bytecode support [CLD-2780] (#1049)
## Summary
In order to use operations-gen cli to generate the deploy operations for
MCMS contracts , we need to support zksync.
Adds zkSync VM deploy bytecode support to `operations-gen` so generated
EVM `Deploy` operations can include both EVM and zkSync bytecode.
Config:
```yaml
version: "1.0.0"
chain_family: evm
input:
gobindings_package: "github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen/testdata/evm/gobindings"
zksync_bindings_package: "github.com/smartcontractkit/chainlink-deployments-framework/tools/operations-gen/testdata/evm/zksync_bindings"
output:
base_path: "."
contracts:
- contract_name: LinkToken
version: "1.0.0"
zksync_bytecode: LinkTokenZkBytecode
functions:
- name: transfer
access: public
- name: balanceOf
access: public
- name: approve
access: public
```
Closes
[CLD-2780](https://smartcontract-it.atlassian.net/browse/CLD-2780).
feat: Add zkSync VM bytecode support to operations-gen. Generated Deploy operations can now include `ZkSyncVM` bytecode via `zksync_bytecode` and `zksync_bindings_package` config fields.
Copy file name to clipboardExpand all lines: tools/operations-gen/README.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -136,6 +136,7 @@ contracts:
136
136
| `version` | Yes | Config schema version |
137
137
| `chain_family` | No | Target chain family. Only `"evm"` is supported. Defaults to `"evm"`. |
138
138
| `input.gobindings_package` | No | Parent Go import path or relative filesystem path containing versioned abigen packages. Used to derive contract bindings as `<input.gobindings_package>/<version_path>/<package_name>`. |
139
+
| `input.zksync_bindings_package` | No | Default Go import path or relative filesystem path for zkSync VM deploy bytecode. Used when a contract sets `zksync_bytecode` to a symbol only. |
139
140
| `output.base_path` | Yes | Root directory where generated files are written. Relative to the config file. |
140
141
141
142
### Contract fields
@@ -147,7 +148,8 @@ contracts:
147
148
| `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. |
148
149
| `package_name` | No | Override the generated Go package name. Defaults to `snake_case(contract_name)`. |
149
150
| `version_path` | No | Override the directory path derived from the version. Defaults to `v{major}_{minor}_{patch}`. |
150
-
| `omit_deploy` | No | Skip generation of the `Deploy` operation and bytecode constant. Defaults to `false`. |
151
+
| `omit_deploy` | No | Skip generation of the `Deploy` operation and bytecode constant. Defaults to `false`. Cannot be combined with `zksync_bytecode`. |
152
+
| `zksync_bytecode` | No | zkSync VM deploy bytecode symbol, or `{package, symbol}`. Package defaults to `input.zksync_bindings_package`, then the contract's `gobindings_package`. |
GobindingsPackagestring`yaml:"gobindings_package"`// Optional: override the derived gobindings import path or relative filesystem path for this contract.
0 commit comments