onflow / service-account

2 stars 9 forks source link

Deploy the DependencyAudit contract and upgrade the service account #294

Closed janezpodhostnik closed 3 months ago

janezpodhostnik commented 3 months ago

Overview

The dependency audit contract is responsible for emitting an event whenever there are any unstated dependencies (contracts) used in a transaction https://github.com/onflow/contract-updater/blob/main/contracts/DependencyAudit.cdc.

To use it the DependencyAudit contract has to be deployed to the service account, and the service account contract needs to be updated to include a call to the dependency audit contract: https://github.com/onflow/flow-core-contracts/pull/430

1. Deploy DependencyAudit

[
    {
        "type": "Array",
        "value": [
            {
                "type": "Address",
                "value": "0x8624b52f9ddcd04a"
            },
            {
                "type": "Address",
                "value": "0xe467b9dd11fa00df"
            },
            {
                "type": "Address",
                "value": "0x8d0e87b65159ae63"
            },
            {
                "type": "Address",
                "value": "0x62430cf28c26d095"
            },
            {
                "type": "Address",
                "value": "0xf919ee77447b7497"
            },
            {
                "type": "Address",
                "value": "0x1654653399040a61"
            },
            {
                "type": "Address",
                "value": "0xf233dcee88fe0abe"
            },
            {
                "type": "Address",
                "value": "0x1d7e57aa55817448"
            },
            {
                "type": "Address",
                "value": "0xb19436aae4d94622"
            },
            {
                "type": "Address",
                "value": "0x220c1b4155f86f2f"
            }
        ]
    }
]

This corresponds to the following addresses:

8624b52f9ddcd04a, Epoch, IDTableStaking, ClusterQC, DKG
e467b9dd11fa00df, FlowServiceAccount, NodeVersionBeacon, RandomBeaconHistory, FlowStorageFees, EVM
8d0e87b65159ae63, FlowStakingCollection, LockedTokens
62430cf28c26d095, StakingProxy
f919ee77447b7497, FlowFees
1654653399040a61, FlowToken
f233dcee88fe0abe, FungibleToken, FungibleTokenMetadataViews, FungibleTokenSwitchboard, Burner
1d7e57aa55817448, NonFungibleToken, MetadataViews, ViewResolver
b19436aae4d94622, FiatToken
220c1b4155f86f2f, OnChainMultiSig

[!NOTE]
These will be the addresses that are skipped when checking which dependencies are staged or not

2. Update FlowServiceAccount

@@ -191,6 +192,16 @@ pub contract FlowServiceAccount { } }

janezpodhostnik commented 3 months ago

done