Skip to content

Commit

Permalink
update gen script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tritium committed Jul 27, 2023
1 parent cf4eee2 commit debf84d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 15 deletions.
9 changes: 6 additions & 3 deletions BIPs/00batched/authorizer/gen_gov_md.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ if [ -z $WEEKLY_DIR ]; then
fi

BIP_DIR="../../$WEEKLY_DIR/BIP-$BIP_NUMBER"
BIP_DIR_FROM_REPO_ROOT="BIPS/$WEEKLY_DIR/BIP-$BIP_NUMBER"

date=$DATE
## Setup git
git config --global user.name "BIP Bot"
Expand All @@ -48,9 +50,10 @@ rm -r chains
TABLE=${BIP_DIR}/results_address_sorted.md

echo "Building governance forum md file. Note you will need to review and update the top sections to talk a bit about the change and it's reasons."
sed "s/XXX/$BIP_NUMBER/g" governance_template.md > .working.md
sed "s/YYY/$PR_NUMBER/g" .working.md > .working1.md
sed "/ADDRESS_SORTED_MD_TABLE/r $TABLE" .working1.md | sed 's/ADDRESS_SORTED_MD_TABLE//' > ${BIP_DIR}/BIP-${BIP_NUMBER}.md
sed "s/{BIP_NUMBER}/$BIP_NUMBER/g" governance_template.md > .working.md
sed "s/{PR_NUMBER}/$PR_NUMBER/g" .working.md > .working1.md
sed "s/{BIP_DIR}/$BIP_DIR_FROM_REPO_ROOT/g" .working1.md > .working2.md
sed "/ADDRESS_SORTED_MD_TABLE/r $TABLE" .working2.md | sed 's/ADDRESS_SORTED_MD_TABLE//' > ${BIP_DIR}/BIP-${BIP_NUMBER}.md
echo "[See Here](BIP-${BIP_NUMBER}.md) for the governance contents." > ${BIP_DIR}/README.md

rm .working*.md
Expand Down
26 changes: 14 additions & 12 deletions BIPs/00batched/authorizer/governance_template.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
## [Payload PR - BIP-XXX](https://github.com/BalancerMaxis/multisig-ops/pull/YYY)
## Payload PR - BIP-{BIP_NUMBER}
https://github.com/BalancerMaxis/multisig-ops/pull/{PR_NUMBER}

## Background
Talk about the background of this BIP here

## English Specification

The transaction details were generated by [this script](https://github.com/BalancerMaxis/multisig-ops/blob/main/action-scripts/gen_add_permissions_payload.py) with inputs and outputs in [this directory](https://github.com/BalancerMaxis/multisig-ops/tree/staging/BIPs/BIP-XXX)
The transaction details were generated by [this script](https://github.com/BalancerMaxis/multisig-ops/blob/main/action-scripts/gen_add_permissions_payload.py) with inputs and outputs in [this directory](https://github.com/BalancerMaxis/multisig-ops/tree/staging/BIPs/BIP-{BIP_NUMBER})

The following files can be found both linked below and in the payload PR linked above:

| Filename | Description of Contents |
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| [inputs.json](https://github.com/BalancerMaxis/multisig-ops/blob/staging/BIPs/BIP-XXX/inputs.json) | The inputs to the script mapping functions and deployments to target addresses that can execute them. |
| [results_address_sorted.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/BIPs/BIP-XXX/results_address_sorted.md) | The resulting changes printed in a table sorted by target chain and target address. (to easily understand permisisons granted) |
| [results_deployment_sorted.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/BIPs/BIP-XXX/results_deployment_sorted.md) | The resulting changes printed in a table sorted by target chain and target deployment. (for verification against action ids) |
| [function_descriptions.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/BIPs/BIP-XXX/function_descriptions.md) | A table that describes what each function that is being granted privileged access to allows. | |
| [`chainname`.json](https://github.com/BalancerMaxis/multisig-ops/tree/staging/BIPs/BIP-XXX/) | For each change with changes, a transaction builder json named after said chain exists to apply the changes described in the tables. |
| Filename | Description of Contents |
|-----------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| [inputs.json](https://github.com/BalancerMaxis/multisig-ops/blob/staging/{BIP_DIR}/inputs.json) | The inputs to the script mapping functions and deployments to target addresses that can execute them. |
| [results_address_sorted.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/{BIP_DIR}/results_address_sorted.md) | The resulting changes printed in a table sorted by target chain and target address. (to easily understand permisisons granted) |
| [results_deployment_sorted.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/{BIP_DIR}/results_deployment_sorted.md) | The resulting changes printed in a table sorted by target chain and target deployment. (for verification against action ids) |
| [function_descriptions.md](https://github.com/BalancerMaxis/multisig-ops/blob/staging/{BIP_DIR}/function_descriptions.md) | A table that describes what each function that is being granted privileged access to allows. | |
| [`chainname`.json](https://github.com/BalancerMaxis/multisig-ops/tree/staging/{BIP_DIR}/) | For each change with changes, a transaction builder json named after said chain exists to apply the changes described in the tables. |

_More information about the various Balancer Multisigs and their functions can be found in the [multisig-ops repo](https://github.com/BalancerMaxis/multisig-ops/blob/staging/multisigs.md)_

# Specification

As described in the payload json, the authorizer will be called to grant the roles as described.

The change can be reviewed by the below by comparing the [results_deployment_sorted.md](https://github.com/BalancerMaxis/multisig-ops/tree/staging/BIPs/BIP-XXX/results_deployment_sorted.md) file to the source of truth, which should match the order found in the source of truth for actionIds on the [balancer-deployments](https://github.com/balancer/balancer-deployments/tree/master/action-ids).
The change can be reviewed by the below by comparing the [results_deployment_sorted.md](https://github.com/BalancerMaxis/multisig-ops/tree/staging/{BIP_DIR}/results_deployment_sorted.md) file to the source of truth, which should match the order found in the source of truth for actionIds on the [balancer-deployments](https://github.com/balancer/balancer-deployments/tree/master/action-ids).

For record, the contents of [results_address_sorted.md](https://github.com/BalancerMaxis/multisig-ops/tree/staging/BIPs/BIP-XXX/results_address_sorted.md) are printed here:
For record, the contents of [results_address_sorted.md](https://github.com/BalancerMaxis/multisig-ops/tree/staging/{BIP_DIR}/results_address_sorted.md) are printed here:


ADDRESS_SORTED_MD_TABLE

## Risk Assessment
This BIP is routine operation for provisioning a new factory. The new factories are themselves a risk mitigation.
Something should be here...


## References
Expand Down

0 comments on commit debf84d

Please sign in to comment.