Skip to content

Commit

Permalink
fix: add deploy timestamp asserter command (#3252)
Browse files Browse the repository at this point in the history
* Add `deploy-timestamp-asserter` command to `zkstack` that works
similarly to `deploy-multicall3` and others. The command deploys
`TimestampAsserter` contract and updates it's address in
`contracts.yaml`;
* Update `contracts` submodule to the version that has the required
function added.

Sister [PR](matter-labs/era-contracts#1058) in
the `era-contracts` repo
  • Loading branch information
ischasny authored Nov 12, 2024
1 parent 5158875 commit 88a8940
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 22 deletions.
2 changes: 1 addition & 1 deletion contracts
43 changes: 43 additions & 0 deletions zkstack_cli/crates/zkstack/completion/_zkstack.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,23 @@ _arguments "${_arguments_options[@]}" : \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(deploy-timestamp-asserter)
_arguments "${_arguments_options[@]}" : \
'--verify=[Verify deployed contracts]' \
'--verifier=[Verifier to use]:VERIFIER:(etherscan sourcify blockscout oklink)' \
'--verifier-url=[Verifier URL, if using a custom provider]:VERIFIER_URL:_default' \
'--verifier-api-key=[Verifier API key]:VERIFIER_API_KEY:_default' \
'*-a+[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \
'*--additional-args=[List of additional arguments that can be passed through the CLI]:ADDITIONAL_ARGS:_default' \
'--chain=[Chain to use]:CHAIN:_default' \
'--resume[]' \
'-v[Verbose mode]' \
'--verbose[Verbose mode]' \
'--ignore-prerequisites[Ignores prerequisites checks]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
&& ret=0
;;
(deploy-upgrader)
_arguments "${_arguments_options[@]}" : \
'--verify=[Verify deployed contracts]' \
Expand Down Expand Up @@ -674,6 +691,10 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(deploy-timestamp-asserter)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(deploy-upgrader)
_arguments "${_arguments_options[@]}" : \
&& ret=0
Expand Down Expand Up @@ -2506,6 +2527,10 @@ _arguments "${_arguments_options[@]}" : \
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(deploy-timestamp-asserter)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(deploy-upgrader)
_arguments "${_arguments_options[@]}" : \
&& ret=0
Expand Down Expand Up @@ -2998,6 +3023,7 @@ _zkstack__chain_commands() {
'initialize-bridges:Initialize bridges on L2' \
'deploy-consensus-registry:Deploy L2 consensus registry' \
'deploy-multicall3:Deploy L2 multicall3' \
'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \
'deploy-upgrader:Deploy Default Upgrader' \
'deploy-paymaster:Deploy paymaster smart contract' \
'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \
Expand Down Expand Up @@ -3040,6 +3066,11 @@ _zkstack__chain__deploy-paymaster_commands() {
local commands; commands=()
_describe -t commands 'zkstack chain deploy-paymaster commands' commands "$@"
}
(( $+functions[_zkstack__chain__deploy-timestamp-asserter_commands] )) ||
_zkstack__chain__deploy-timestamp-asserter_commands() {
local commands; commands=()
_describe -t commands 'zkstack chain deploy-timestamp-asserter commands' commands "$@"
}
(( $+functions[_zkstack__chain__deploy-upgrader_commands] )) ||
_zkstack__chain__deploy-upgrader_commands() {
local commands; commands=()
Expand Down Expand Up @@ -3101,6 +3132,7 @@ _zkstack__chain__help_commands() {
'initialize-bridges:Initialize bridges on L2' \
'deploy-consensus-registry:Deploy L2 consensus registry' \
'deploy-multicall3:Deploy L2 multicall3' \
'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \
'deploy-upgrader:Deploy Default Upgrader' \
'deploy-paymaster:Deploy paymaster smart contract' \
'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \
Expand Down Expand Up @@ -3143,6 +3175,11 @@ _zkstack__chain__help__deploy-paymaster_commands() {
local commands; commands=()
_describe -t commands 'zkstack chain help deploy-paymaster commands' commands "$@"
}
(( $+functions[_zkstack__chain__help__deploy-timestamp-asserter_commands] )) ||
_zkstack__chain__help__deploy-timestamp-asserter_commands() {
local commands; commands=()
_describe -t commands 'zkstack chain help deploy-timestamp-asserter commands' commands "$@"
}
(( $+functions[_zkstack__chain__help__deploy-upgrader_commands] )) ||
_zkstack__chain__help__deploy-upgrader_commands() {
local commands; commands=()
Expand Down Expand Up @@ -4353,6 +4390,7 @@ _zkstack__help__chain_commands() {
'initialize-bridges:Initialize bridges on L2' \
'deploy-consensus-registry:Deploy L2 consensus registry' \
'deploy-multicall3:Deploy L2 multicall3' \
'deploy-timestamp-asserter:Deploy L2 TimestampAsserter' \
'deploy-upgrader:Deploy Default Upgrader' \
'deploy-paymaster:Deploy paymaster smart contract' \
'update-token-multiplier-setter:Update Token Multiplier Setter address on L1' \
Expand Down Expand Up @@ -4394,6 +4432,11 @@ _zkstack__help__chain__deploy-paymaster_commands() {
local commands; commands=()
_describe -t commands 'zkstack help chain deploy-paymaster commands' commands "$@"
}
(( $+functions[_zkstack__help__chain__deploy-timestamp-asserter_commands] )) ||
_zkstack__help__chain__deploy-timestamp-asserter_commands() {
local commands; commands=()
_describe -t commands 'zkstack help chain deploy-timestamp-asserter commands' commands "$@"
}
(( $+functions[_zkstack__help__chain__deploy-upgrader_commands] )) ||
_zkstack__help__chain__deploy-upgrader_commands() {
local commands; commands=()
Expand Down
Loading

0 comments on commit 88a8940

Please sign in to comment.