Skip to content

Instantly share code, notes, and snippets.

@aaronbuchwald
Last active August 15, 2022 22:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronbuchwald/b3af9da34678f542ce31717e7963085b to your computer and use it in GitHub Desktop.
Save aaronbuchwald/b3af9da34678f542ce31717e7963085b to your computer and use it in GitHub Desktop.
This Gist contains the JSON network upgrade to activate the fee config manager on WAGMI on August 16, 2022 at 10:00am EDT
{
"precompileUpgrades": [
{
"feeManagerConfig": {
"adminAddresses": ["0x6f0f6DA1852857d7789f68a28bba866671f3880D"],
"blockTimestamp": 1660658400
}
}
]
}
@aaronbuchwald
Copy link
Author

Documentation for performing subnet-evm network upgrades: https://docs.avax.network/subnets/customize-a-subnet#network-upgrades-enabledisable-precompiles

You will need to place this JSON file within <chain-config-dir/2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt/upgrade.json

2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt is the blockchainID for WAGMI

@aaronbuchwald
Copy link
Author

When your node restarts, you should see a log that looks like this which contains the precompile upgrade that you just configured:

INFO [08-15|15:42:26.496] <2ebCneCbwthjQ1rYT41nhd7M76Hc6YmosMAQrTFhBq8qeqh6tt Chain> github.com/ava-labs/subnet-evm/eth/backend.go:155: Initialised chain configuration config="{ChainID: 11111 Homestead: 0 EIP150: 0 EIP155: 0 EIP158: 0 Byzantium: 0 Constantinople: 0 Petersburg: 0 Istanbul: 0, Muir Glacier: 0, Subnet EVM: 0, FeeConfig: {\"gasLimit\":20000000,\"targetBlockRate\":2,\"minBaseFee\":1000000000,\"targetGas\":100000000,\"baseFeeChangeDenominator\":48,\"minBlockGasCost\":0,\"maxBlockGasCost\":10000000,\"blockGasCostStep\":500000}, AllowFeeRecipients: false, NetworkUpgrades: {\"subnetEVMTimestamp\":0}, PrecompileUpgrade: {}, UpgradeConfig: {\"precompileUpgrades\":[{\"feeManagerConfig\":{\"adminAddresses\":[\"0x6f0f6da1852857d7789f68a28bba866671f3880d\"],\"blockTimestamp\":1660658400}}]}, Engine: Dummy Consensus Engine}"

The important part here is the precompile upgrade in the printed config:

{
  "precompileUpgrades": [
    {
      "feeManagerConfig": {
        "adminAddresses": [
          "0x6f0f6da1852857d7789f68a28bba866671f3880d"
        ],
        "blockTimestamp": 1660658400
      }
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment