dao/operations/customer-f3bc8a15-3b10-4be5.../terminus-update-mainnet-202...

2.2 KiB

Update the Terminus contract

The Terminus contract is deployed as an EIP2535 Diamond proxy contract with a Terminus facet attached to it.

This checklist describes how to update the TerminusFacet on the Terminus diamond contract.

Deployed addresses

You will modify this section as you go through the checklist

TerminusFacet address

export TERMINUS_FACET_ADDRESS="0x6396813307826Fb315e65CA7138A41CFa09a8AB3"

Environment variables

  • export DAO_NETWORK=<desired brownie network>
  • export DAO_OWNER=<path to keystore file for owner account>
  • export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)
  • export MAX_FEE_PER_GAS="200 gwei"
  • export MAX_PRIORITY_FEE_PER_GAS="80 gwei"
  • export CONFIRMATIONS=1
  • export TERMINUS_DIAMOND=0x99A558BDBdE247C2B2716f0D4cFb0E246DFB697D

Detach existing TerminusFacet

  • Remove TerminusFacet from diamond. (This may require checkout of earlier commit and brownie compile.)
dao core facet-cut \
    --address $TERMINUS_DIAMOND \
    --network $DAO_NETWORK \
    --sender $DAO_OWNER \
    --max-fee-per-gas "$MAX_FEE_PER_GAS" \
    --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \
    --confirmations $CONFIRMATIONS \
    --facet-name TerminusFacet \
    --action remove

Deploy TerminusFacet

  • Check out relevant commit and brownie compile.

  • Deploy TerminusFacet contract

dao terminus deploy \
    --network $DAO_NETWORK \
    --sender $DAO_OWNER \
    --max-fee-per-gas "$MAX_FEE_PER_GAS" \
    --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \
    --confirmations $CONFIRMATIONS
  • Export address of deployed contract as export TERMINUS_FACET_ADDRESS=0x6396813307826Fb315e65CA7138A41CFa09a8AB3

  • Store address of deployed contract under Deployed addresses / TerminusFacet address above

  • Attach TerminusFacet to diamond:

dao core facet-cut \
    --address $TERMINUS_DIAMOND \
    --network $DAO_NETWORK \
    --sender $DAO_OWNER \
    --max-fee-per-gas "$MAX_FEE_PER_GAS" \
    --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \
    --confirmations $CONFIRMATIONS \
    --facet-name TerminusFacet \
    --facet-address $TERMINUS_FACET_ADDRESS \
    --action add