Closed janezpodhostnik closed 5 months ago
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
[ { "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
diff: With the currently deployed contract
--- a/deployed.txt +++ b/contracts/FlowServiceAccount.cdc @@ -2,6 +2,7 @@ import FungibleToken from 0xf233dcee88fe0abe import FlowToken from 0x1654653399040a61 import FlowFees from 0xf919ee77447b7497 import FlowStorageFees from 0xe467b9dd11fa00df +import DependencyAudit from 0xe467b9dd11fa00df pub contract FlowServiceAccount {
@@ -191,6 +192,16 @@ pub contract FlowServiceAccount { } }
dependenciesAddresses
dependenciesNames
authorizers
init() { self.transactionFee = 0.0 self.accountCreationFee = 0.0
done
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
This corresponds to the following addresses:
2. Update FlowServiceAccount
diff: With the currently deployed contract
@@ -191,6 +192,16 @@ pub contract FlowServiceAccount { } }
dependenciesAddresses
anddependenciesNames
are the addresses and names of all the contracts that the transaction depends on.authorizers
are the addresses of the accounts that authorized the transaction and the payer.init() { self.transactionFee = 0.0 self.accountCreationFee = 0.0