chore: document bannable flag in deploy scripts - #18
Conversation
Updates deploy script summaries and example add_config calldata for the validators that support per-context banning (opus, erc20, governance): - Adds bannable as the trailing config field in docs - Updates example calldata to include 0/1 bannable values - Removes stale "Registration Only: false" line from opus summary Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Claude finished @starknetdev's task —— View job Claude Review - General Engineering Reviewrun=24710507619 attempt=1 sha=6ff6f2cebc8de3e455502468aa2d12dc97de93d8 scope=general Todo List
Review FindingsNo issues found. The changes are well-executed documentation updates that accurately reflect the addition of the ERC20 Balance Validator (
Governance Validator (
Opus Troves Validator (
The documentation changes are accurate, consistent, and improve developer experience by:
Summary0 CRITICAL, 0 HIGH, 0 MEDIUM, 0 LOW, 0 INFO |
Codex Review - General Engineering ReviewReview process failed to complete. |
There was a problem hiding this comment.
Code Review
This pull request updates the deployment scripts for ERC20 balance, governance, and Opus troves validators to include a new 'bannable' flag in their configurations, enabling optional per-context banning. Several issues were identified in the example sncast commands where the required Span length prefix was missing from the calldata for the add_config function across multiple files.
| echo " --contract-address \$ERC20_VALIDATOR \\" | ||
| echo " --function add_config \\" | ||
| echo " --calldata <tournament_id> <entry_limit> <token_address> 1000000000000000000000 0 0 0 0 0 0" | ||
| echo " --calldata <tournament_id> <entry_limit> <token_address> 1000000000000000000000 0 0 0 0 0 0 1" |
There was a problem hiding this comment.
The example calldata for add_config is missing the length of the config Span. In Starknet, calldata for a Span must be preceded by its length. Since the config array now contains 9 elements (token_address, min_low, min_high, max_low, max_high, val_low, val_high, max_entries, bannable), the value 9 should be inserted before <token_address>.
| echo " --calldata <tournament_id> <entry_limit> <token_address> 1000000000000000000000 0 0 0 0 0 0 1" | |
| --calldata <tournament_id> <entry_limit> 9 <token_address> 1000000000000000000000 0 0 0 0 0 0 1 |
| echo " --function add_config \\" | ||
| echo " --calldata <tournament_id> <entry_limit> 0 1000000000000000000 1000000000000000000 50" | ||
| echo " # Config: asset_count=0 (wildcard), threshold=1 yin, value_per_entry=1 yin, max=50" | ||
| echo " --calldata <tournament_id> <entry_limit> 0 1000000000000000000 1000000000000000000 50 1" |
There was a problem hiding this comment.
The example calldata is missing the length of the config Span. For this wildcard configuration, there are 5 elements in the config array (asset_count, threshold, value_per_entry, max_entries, bannable), so the value 5 should be included before the 0.
| echo " --calldata <tournament_id> <entry_limit> 0 1000000000000000000 1000000000000000000 50 1" | |
| --calldata <tournament_id> <entry_limit> 5 0 1000000000000000000 1000000000000000000 50 1 |
| echo " --function add_config \\" | ||
| echo " --calldata <tournament_id> <entry_limit> 1 \$STRK_ADDRESS 10000000000000000000 500000000000000000 20" | ||
| echo " # Config: asset_count=1, asset=STRK, threshold=10 yin, value_per_entry=0.5 yin, max=20" | ||
| echo " --calldata <tournament_id> <entry_limit> 1 \$STRK_ADDRESS 10000000000000000000 500000000000000000 20 1" |
There was a problem hiding this comment.
The example calldata is missing the length of the config Span. For this single-asset configuration, there are 6 elements in the config array, so the value 6 should be included before the 1.
| echo " --calldata <tournament_id> <entry_limit> 1 \$STRK_ADDRESS 10000000000000000000 500000000000000000 20 1" | |
| --calldata <tournament_id> <entry_limit> 6 1 \$STRK_ADDRESS 10000000000000000000 500000000000000000 20 1 |
| echo " --function add_config \\" | ||
| echo " --calldata <tournament_id> <entry_limit> 2 \$STRK_ADDRESS \$WSTETH_ADDRESS 5000000000000000000 2000000000000000000 0" | ||
| echo " # Config: asset_count=2, assets=STRK+wstETH, threshold=5 yin, value_per_entry=2 yin, max=0 (unlimited)" | ||
| echo " --calldata <tournament_id> <entry_limit> 2 \$STRK_ADDRESS \$WSTETH_ADDRESS 5000000000000000000 2000000000000000000 0 0" |
There was a problem hiding this comment.
The example calldata is missing the length of the config Span. For this two-asset configuration, there are 7 elements in the config array, so the value 7 should be included before the 2.
| echo " --calldata <tournament_id> <entry_limit> 2 \$STRK_ADDRESS \$WSTETH_ADDRESS 5000000000000000000 2000000000000000000 0 0" | |
| --calldata <tournament_id> <entry_limit> 7 2 \$STRK_ADDRESS \$WSTETH_ADDRESS 5000000000000000000 2000000000000000000 0 0 |
Summary
Updates the bannable validators' deploy scripts (opus, erc20, governance) to document the new
bannabletrailing config field in their post-deployment summaries and exampleadd_configcalldata.Why
The deploy script for opus_troves was used to deploy to mainnet today (
0x04229a6f53e1fb331c4b0ff77846aaf92e3288f97a77c565e9dfece904ff7f3b). Its summary still showed "Registration Only: false (allows banning)" — stale text from before #17 — and example calldata didn't include the newbannableflag.Changes
config[N+4]: bannabledoc, appended1or0to all 3 example calldatasNote
Doc/script-only changes. No contract changes.
🤖 Generated with Claude Code