From 2028ace09d09ba72d9e79b7faa3786aaf24c3861 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Thu, 16 May 2024 12:22:30 +0200 Subject: [PATCH 1/8] Add dependency audit contract --- contracts/DependencyAudit.cdc | 110 ++++++++++++++++++++++++++++++++++ 1 file changed, 110 insertions(+) create mode 100644 contracts/DependencyAudit.cdc diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc new file mode 100644 index 0000000..2b60c6d --- /dev/null +++ b/contracts/DependencyAudit.cdc @@ -0,0 +1,110 @@ +import "MigrationContractStaging" + +// This contract is intended to be deployed on the service account. +// It is used by the FVM calling the `checkDependencies` function from a function of the same name and singature in the FlowServiceAccount contract, +// at the end of every transaction. +// The `dependenciesAddresses` and `dependenciesNames` will be all the dependencies needded to run that transaction. +// +// The `checkDependencies` function will check if any of the dependencies are not staged in the MigrationContractStaging contract. +// If any of the dependencies are not staged, the function will emit an event with the unstaged dependencies, or panic if `panicOnUnstaged` is set to true. +access(all) contract DependencyAudit { + + access(all) let AdministratorStoragePath: StoragePath + + // The system addresses have contracts that will not be stages via the migration contract so we exclude them from the dependency chekcs + access(self) var excludedAddresses: {Address: Bool} + + access(all) var panicOnUnstaged: Bool + + access(all) event UnstagedDependencies(dependenciesAddresses: [Address], dependenciesNames: [String]) + + access(all) event PanicOnUnstagedDependenciesChanged(shouldPanic: Bool) + + // checkDependencies is called from the FlowServiceAccount contract + access(all) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { + var numDependencies = dependenciesAddresses.length + var i = 0 + + var unstagedDependenciesAddresses: [Address] = [] + var unstagedDependenciesNames: [String] = [] + + while i < numDependencies { + let isExcluded = DependencyAudit.excludedAddresses[dependenciesAddresses[i]] ?? false + if isExcluded { + i = i + 1 + continue + } + + let staged = MigrationContractStaging.isStaged(address: dependenciesAddresses[i], name: dependenciesNames[i]) + if !staged { + unstagedDependenciesAddresses.append(dependenciesAddresses[i]) + unstagedDependenciesNames.append(dependenciesNames[i]) + } + + i = i + 1 + } + + if unstagedDependenciesAddresses.length > 0 { + if DependencyAudit.panicOnUnstaged { + // If `panicOnUnstaged` is set to true, the transaction will panic if there are any unstaged dependencies + // the panic message will include the unstaged dependencies + var unstagedDependenciesString = "" + var numUnstagedDependencies = unstagedDependenciesAddresses.length + var j = 0 + while j < numUnstagedDependencies { + if j > 0 { + unstagedDependenciesString = unstagedDependenciesString.concat(", ") + } + unstagedDependenciesString = unstagedDependenciesString.concat("A.").concat(unstagedDependenciesAddresses[j].toString()).concat(".").concat(unstagedDependenciesNames[j]) + + j = j + 1 + } + + // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.0x2ceae959ed1a7e7a.MigrationContractStaging, A.0x2ceae959ed1a7e7a.DependencyAudit` + panic("Found unstaged dependencies: ".concat(unstagedDependenciesString)) + }else{ + emit UnstagedDependencies(dependenciesAddresses: unstagedDependenciesAddresses, dependenciesNames: unstagedDependenciesNames) + } + } + } + + // The Administrator resorce can be used to add or remove addresses from the excludedAddresses dictionary + // + access(all) resource Administrator { + // addExcludedAddresses add the addresses to the excludedAddresses dictionary + access(all) fun addExcludedAddresses(addresses: [Address]) { + for address in addresses { + DependencyAudit.excludedAddresses[address] = true + } + } + + // removeExcludedAddresses remove the addresses from the excludedAddresses dictionary + access(all) fun removeExcludedAddresses(addresses: [Address]) { + for address in addresses { + DependencyAudit.excludedAddresses.remove(key: address) + } + } + + // setPanicOnUnstagedDependencies sets the `panicOnUnstaged` variable to the value of `shouldPanic` + access(all) fun setPanicOnUnstagedDependencies(shouldPanic: Bool) { + DependencyAudit.panicOnUnstaged = shouldPanic + emit PanicOnUnstagedDependenciesChanged(shouldPanic: shouldPanic) + } + } + + // The admin resource is saved to the storage so that the admin can be accessed by the service account + // The `excludedAddresses` will be the addresses with the system contracracts. + init(excludedAddresses: [Address]) { + self.excludedAddresses = {} + self.panicOnUnstaged = false + + self.AdministratorStoragePath = /storage/flowDependencyAuditAdmin + + for address in excludedAddresses { + self.excludedAddresses[address] = true + } + + let admin <- create Administrator() + self.account.save(<-admin, to: self.AdministratorStoragePath) + } +} From 1c996f54de757e7361d164d7d15656b1632384ba Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Thu, 16 May 2024 15:03:31 +0200 Subject: [PATCH 2/8] DependencyAudit contract --- contracts/DependencyAudit.cdc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 2b60c6d..619e9ce 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -1,7 +1,6 @@ import "MigrationContractStaging" -// This contract is intended to be deployed on the service account. -// It is used by the FVM calling the `checkDependencies` function from a function of the same name and singature in the FlowServiceAccount contract, +// This contract ist is used by the FVM calling the `checkDependencies` function from a function of the same name and singature in the FlowServiceAccount contract, // at the end of every transaction. // The `dependenciesAddresses` and `dependenciesNames` will be all the dependencies needded to run that transaction. // @@ -21,7 +20,7 @@ access(all) contract DependencyAudit { access(all) event PanicOnUnstagedDependenciesChanged(shouldPanic: Bool) // checkDependencies is called from the FlowServiceAccount contract - access(all) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { + access(self) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { var numDependencies = dependenciesAddresses.length var i = 0 @@ -62,7 +61,7 @@ access(all) contract DependencyAudit { // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.0x2ceae959ed1a7e7a.MigrationContractStaging, A.0x2ceae959ed1a7e7a.DependencyAudit` panic("Found unstaged dependencies: ".concat(unstagedDependenciesString)) - }else{ + } else { emit UnstagedDependencies(dependenciesAddresses: unstagedDependenciesAddresses, dependenciesNames: unstagedDependenciesNames) } } From 418047b9ff7873dd8f152f3403079385ab28b167 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Thu, 16 May 2024 16:34:21 +0200 Subject: [PATCH 3/8] add tests --- contracts/DependencyAudit.cdc | 12 +- flow.json | 330 +++++++++--------- lib/go/contracts/internal/assets/assets.go | 2 + lib/go/templates/internal/assets/assets.go | 8 + tests/dependency_audit_tests.cdc | 220 ++++++++++++ .../admin/set_unstaged_cause_panic.cdc | 8 + .../admin/test_check_dependencies.cdc | 8 + 7 files changed, 416 insertions(+), 172 deletions(-) create mode 100644 tests/dependency_audit_tests.cdc create mode 100644 transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc create mode 100644 transactions/dependency-audit/admin/test_check_dependencies.cdc diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 619e9ce..651b0d9 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -21,12 +21,11 @@ access(all) contract DependencyAudit { // checkDependencies is called from the FlowServiceAccount contract access(self) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { - var numDependencies = dependenciesAddresses.length - var i = 0 - var unstagedDependenciesAddresses: [Address] = [] var unstagedDependenciesNames: [String] = [] + var numDependencies = dependenciesAddresses.length + var i = 0 while i < numDependencies { let isExcluded = DependencyAudit.excludedAddresses[dependenciesAddresses[i]] ?? false if isExcluded { @@ -89,6 +88,13 @@ access(all) contract DependencyAudit { DependencyAudit.panicOnUnstaged = shouldPanic emit PanicOnUnstagedDependenciesChanged(shouldPanic: shouldPanic) } + + // testCheckDependencies is used for testing purposes + // It will call the `checkDependencies` function with the provided dependencies + // `checkDependencies` is otherwise not callable from the outside + access(all) fun testCheckDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { + return DependencyAudit.checkDependencies(dependenciesAddresses, dependenciesNames, authorizers) + } } // The admin resource is saved to the storage so that the admin can be accessed by the service account diff --git a/flow.json b/flow.json index 415679f..98c0be0 100644 --- a/flow.json +++ b/flow.json @@ -1,170 +1,162 @@ { - "contracts": { - "A": { - "source": "./contracts/test/A.cdc", - "aliases": { - "emulator": "179b6b1cb6755e31", - "testing": "0000000000000009" - } - }, - "B": { - "source": "./contracts/test/B.cdc", - "aliases": { - "emulator": "f3fcd2c1a78f5eee", - "testing": "0000000000000010" - } - }, - "Burner": { - "source": "./contracts/standards/Burner.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "previewnet": "b6763b4399a888c8", - "testing": "0000000000000001" - } - }, - "C": { - "source": "./contracts/test/C.cdc", - "aliases": { - "emulator": "f3fcd2c1a78f5eee", - "testing": "0000000000000010" - } - }, - "Foo": { - "source": "./contracts/test/Foo.cdc", - "aliases": { - "emulator": "01cf0e2f2f715450", - "testing": "0000000000000008" - } - }, - "FungibleToken": { - "source": "./contracts/standards/FungibleToken.cdc", - "aliases": { - "emulator": "ee82856bf20e2aa6", - "mainnet": "f233dcee88fe0abe", - "testnet": "9a0766d93b6608b7" - } - }, - "MetadataViews": { - "source": "./contracts/standards/MetadataViews.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "mainnet": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" - } - }, - "MigrationContractStaging": { - "source": "./contracts/MigrationContractStaging.cdc", - "aliases": { - "crescendo": "27b2302520211b67", - "emulator": "f8d6e0586b0a20c7", - "mainnet": "56100d46aa9b0212", - "testing": "0000000000000007", - "testnet": "2ceae959ed1a7e7a" - } - }, - "NonFungibleToken": { - "source": "./contracts/standards/NonFungibleToken.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "mainnet": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" - } - }, - "StagedContractUpdates": { - "source": "./contracts/staged-contract-updates/StagedContractUpdates.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "testing": "0000000000000007" - } - }, - "ViewResolver": { - "source": "./contracts/standards/ViewResolver.cdc", - "aliases": { - "emulator": "f8d6e0586b0a20c7", - "mainnet": "1d7e57aa55817448", - "testnet": "631e88ae7f1d7c20" - } - } - }, - "networks": { - "crescendo": "access.crescendo.nodes.onflow.org: 9000", - "emulator": "127.0.0.1:3569", - "mainnet": "access.mainnet.nodes.onflow.org:9000", - "previewnet": "access.previewnet.nodes.onflow.org: 9000", - "sandboxnet": "access.sandboxnet.nodes.onflow.org:9000", - "testing": "127.0.0.1:3569", - "testnet": "access.devnet.nodes.onflow.org:9000" - }, - "accounts": { - "a-account": { - "address": "179b6b1cb6755e31", - "key": "1bbaf3239cfd9e8e35f85723f6c70f2ac5c8f50856c4667021cf9ed72eabd9f8" - }, - "abc-updater": { - "address": "e03daebed8ca0615", - "key": "caa4da634fee3ad45ce67ef8a6813987888d88f4b4e6e70b8d84685845db7f25" - }, - "bc-account": { - "address": "f3fcd2c1a78f5eee", - "key": "c06a4b0fce3bc3088a2a2e3b11a9ea5d13e251661cefa3f26af1180ad317d3dc" - }, - "emulator-account": { - "address": "f8d6e0586b0a20c7", - "key": "a08c990a1f7adb14c290d05df0f397d2de2f4d0cb18cdffed592f611f95f5d08" - }, - "emulator-ft": { - "address": "ee82856bf20e2aa6", - "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" - }, - "foo": { - "address": "01cf0e2f2f715450", - "key": "e9b7b36e9d16f47501db73e84c68e441609475ee482ee808411b2fe0bd2329da" - }, - "migration-contract-staging-crescendo": { - "address": "27b2302520211b67", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1" - } - }, - "migration-contract-staging-mainnet": { - "address": "56100d46aa9b0212", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-mainnet/cryptoKeys/evm-storage-mainnet-key/cryptoKeyVersions/1" - } - }, - "migration-contract-staging-testnet": { - "address": "2ceae959ed1a7e7a", - "key": { - "type": "google-kms", - "hashAlgorithm": "SHA2_256", - "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1" - } - } - }, - "deployments": { - "crescendo": { - "migration-contract-staging-crescendo": [ - "MigrationContractStaging" - ] - }, - "emulator": { - "emulator-account": [ - "MigrationContractStaging" - ] - }, - "mainnet": { - "migration-contract-staging-mainnet": [ - "MigrationContractStaging" - ] - }, - "testnet": { - "migration-contract-staging-testnet": [ - "MigrationContractStaging" - ] - } - } -} \ No newline at end of file + "contracts": { + "A": { + "source": "./contracts/test/A.cdc", + "aliases": { + "emulator": "179b6b1cb6755e31", + "testing": "0000000000000009" + } + }, + "B": { + "source": "./contracts/test/B.cdc", + "aliases": { + "emulator": "f3fcd2c1a78f5eee", + "testing": "0000000000000010" + } + }, + "Burner": { + "source": "./contracts/standards/Burner.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "previewnet": "b6763b4399a888c8", + "testing": "0000000000000001" + } + }, + "C": { + "source": "./contracts/test/C.cdc", + "aliases": { + "emulator": "f3fcd2c1a78f5eee", + "testing": "0000000000000010" + } + }, + "Foo": { + "source": "./contracts/test/Foo.cdc", + "aliases": { + "emulator": "01cf0e2f2f715450", + "testing": "0000000000000008" + } + }, + "FungibleToken": { + "source": "./contracts/standards/FungibleToken.cdc", + "aliases": { + "emulator": "ee82856bf20e2aa6", + "mainnet": "f233dcee88fe0abe", + "testnet": "9a0766d93b6608b7" + } + }, + "MetadataViews": { + "source": "./contracts/standards/MetadataViews.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "testnet": "631e88ae7f1d7c20" + } + }, + "MigrationContractStaging": { + "source": "./contracts/MigrationContractStaging.cdc", + "aliases": { + "crescendo": "27b2302520211b67", + "emulator": "f8d6e0586b0a20c7", + "mainnet": "56100d46aa9b0212", + "testing": "0000000000000007", + "testnet": "2ceae959ed1a7e7a" + } + }, + "NonFungibleToken": { + "source": "./contracts/standards/NonFungibleToken.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "testnet": "631e88ae7f1d7c20" + } + }, + "StagedContractUpdates": { + "source": "./contracts/staged-contract-updates/StagedContractUpdates.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "testing": "0000000000000007" + } + }, + "ViewResolver": { + "source": "./contracts/standards/ViewResolver.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "mainnet": "1d7e57aa55817448", + "testnet": "631e88ae7f1d7c20" + } + } + }, + "networks": { + "crescendo": "access.crescendo.nodes.onflow.org: 9000", + "emulator": "127.0.0.1:3569", + "mainnet": "access.mainnet.nodes.onflow.org:9000", + "previewnet": "access.previewnet.nodes.onflow.org: 9000", + "sandboxnet": "access.sandboxnet.nodes.onflow.org:9000", + "testing": "127.0.0.1:3569", + "testnet": "access.devnet.nodes.onflow.org:9000" + }, + "accounts": { + "a-account": { + "address": "179b6b1cb6755e31", + "key": "1bbaf3239cfd9e8e35f85723f6c70f2ac5c8f50856c4667021cf9ed72eabd9f8" + }, + "abc-updater": { + "address": "e03daebed8ca0615", + "key": "caa4da634fee3ad45ce67ef8a6813987888d88f4b4e6e70b8d84685845db7f25" + }, + "bc-account": { + "address": "f3fcd2c1a78f5eee", + "key": "c06a4b0fce3bc3088a2a2e3b11a9ea5d13e251661cefa3f26af1180ad317d3dc" + }, + "emulator-account": { + "address": "f8d6e0586b0a20c7", + "key": "a08c990a1f7adb14c290d05df0f397d2de2f4d0cb18cdffed592f611f95f5d08" + }, + "emulator-ft": { + "address": "ee82856bf20e2aa6", + "key": "686779d775e5fcbf8d2f4a85cb4c53525d02b7ef53230d180fc16f35d9b7d025" + }, + "foo": { + "address": "01cf0e2f2f715450", + "key": "e9b7b36e9d16f47501db73e84c68e441609475ee482ee808411b2fe0bd2329da" + }, + "migration-contract-staging-crescendo": { + "address": "27b2302520211b67", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1" + } + }, + "migration-contract-staging-mainnet": { + "address": "56100d46aa9b0212", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-mainnet/cryptoKeys/evm-storage-mainnet-key/cryptoKeyVersions/1" + } + }, + "migration-contract-staging-testnet": { + "address": "2ceae959ed1a7e7a", + "key": { + "type": "google-kms", + "hashAlgorithm": "SHA2_256", + "resourceID": "projects/dl-flow-admin/locations/global/keyRings/migration-contract-staging-testnet/cryptoKeys/evm-storage-testnet-key/cryptoKeyVersions/1" + } + } + }, + "deployments": { + "crescendo": { + "migration-contract-staging-crescendo": ["MigrationContractStaging"] + }, + "emulator": { + "emulator-account": ["MigrationContractStaging"] + }, + "mainnet": { + "migration-contract-staging-mainnet": ["MigrationContractStaging"] + }, + "testnet": { + "migration-contract-staging-testnet": ["MigrationContractStaging"] + } + } +} diff --git a/lib/go/contracts/internal/assets/assets.go b/lib/go/contracts/internal/assets/assets.go index c4d46bd..9bef7c1 100644 --- a/lib/go/contracts/internal/assets/assets.go +++ b/lib/go/contracts/internal/assets/assets.go @@ -180,6 +180,7 @@ func AssetNames() []string { // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string]func() (*asset, error){ + "DependencyAudit.cdc": dependencyauditCdc, "MigrationContractStaging.cdc": migrationcontractstagingCdc, } @@ -229,6 +230,7 @@ type bintree struct { } var _bintree = &bintree{nil, map[string]*bintree{ + "DependencyAudit.cdc": {dependencyauditCdc, map[string]*bintree{}}, "MigrationContractStaging.cdc": {migrationcontractstagingCdc, map[string]*bintree{}}, }} diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index abc4909..51aed87 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -1003,6 +1003,8 @@ var _bindata = map[string]func() (*asset, error){ "transactions/coordinator/set_block_update_boundary.cdc": transactionsCoordinatorSet_block_update_boundaryCdc, "transactions/delegatee/execute_all_delegated_updates.cdc": transactionsDelegateeExecute_all_delegated_updatesCdc, "transactions/delegatee/remove_delegated_updaters.cdc": transactionsDelegateeRemove_delegated_updatersCdc, + "transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc": transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc, + "transactions/dependency-audit/admin/test_check_dependencies.cdc": transactionsDependencyAuditAdminTest_check_dependenciesCdc, "transactions/host/publish_host_capability.cdc": transactionsHostPublish_host_capabilityCdc, "transactions/migration-contract-staging/admin/commit_migration_results.cdc": transactionsMigrationContractStagingAdminCommit_migration_resultsCdc, "transactions/migration-contract-staging/admin/set_staging_cutoff.cdc": transactionsMigrationContractStagingAdminSet_staging_cutoffCdc, @@ -1105,6 +1107,12 @@ var _bintree = &bintree{nil, map[string]*bintree{ "execute_all_delegated_updates.cdc": {transactionsDelegateeExecute_all_delegated_updatesCdc, map[string]*bintree{}}, "remove_delegated_updaters.cdc": {transactionsDelegateeRemove_delegated_updatersCdc, map[string]*bintree{}}, }}, + "dependency-audit": {nil, map[string]*bintree{ + "admin": {nil, map[string]*bintree{ + "set_unstaged_cause_panic.cdc": {transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc, map[string]*bintree{}}, + "test_check_dependencies.cdc": {transactionsDependencyAuditAdminTest_check_dependenciesCdc, map[string]*bintree{}}, + }}, + }}, "host": {nil, map[string]*bintree{ "publish_host_capability.cdc": {transactionsHostPublish_host_capabilityCdc, map[string]*bintree{}}, }}, diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc new file mode 100644 index 0000000..84352e1 --- /dev/null +++ b/tests/dependency_audit_tests.cdc @@ -0,0 +1,220 @@ +import Test +import BlockchainHelpers +import "DependencyAudit" + +// NOTE: This is an artifact of the implicit Test API - it's not clear how block height transitions between test cases +access(all) let blockHeightBoundaryDelay: UInt64 = 15 + +// Contract hosts as defined in flow.json +access(all) let adminAccount = Test.getAccount(0x0000000000000007) +access(all) let fooAccount = Test.getAccount(0x0000000000000008) +access(all) let aAccount = Test.getAccount(0x0000000000000009) +access(all) let bcAccount = Test.getAccount(0x0000000000000010) + +// Content of update contracts as hex strings +access(all) let aUpdateCode = "61636365737328616c6c2920636f6e747261637420696e746572666163652041207b0a202020200a2020202061636365737328616c6c29207265736f7572636520696e746572666163652049207b0a202020202020202061636365737328616c6c292066756e20666f6f28293a20537472696e670a202020202020202061636365737328616c6c292066756e2062617228293a20537472696e670a202020207d0a0a2020202061636365737328616c6c29207265736f757263652052203a2049207b0a202020202020202061636365737328616c6c292066756e20666f6f28293a20537472696e67207b0a20202020202020202020202072657475726e2022666f6f220a20202020202020207d0a202020202020202061636365737328616c6c292066756e2062617228293a20537472696e67207b0a20202020202020202020202072657475726e2022626172220a20202020202020207d0a202020207d0a7d" +access(all) let aUpdateCadence = String.fromUTF8(aUpdateCode.decodeHex()) ?? panic("Problem decoding aUpdateCode") + +access(all) fun setup() { + var err = Test.deployContract( + name: "MigrationContractStaging", + path: "../contracts/MigrationContractStaging.cdc", + arguments: [] + ) + Test.expect(err, Test.beNil()) + + err = Test.deployContract( + name: "Foo", + path: "../contracts/test/Foo.cdc", + arguments: [] + ) + Test.expect(err, Test.beNil()) + + err = Test.deployContract( + name: "A", + path: "../contracts/test/A.cdc", + arguments: [] + ) + Test.expect(err, Test.beNil()) + + err = Test.deployContract( + name: "B", + path: "../contracts/test/B.cdc", + arguments: [] + ) + Test.expect(err, Test.beNil()) + + err = Test.deployContract( + name: "C", + path: "../contracts/test/C.cdc", + arguments: [] + ) + Test.expect(err, Test.beNil()) + + let excludedAddresses: [Address] = [ + // exclude the admin account + 0x0000000000000007 + ] + err = Test.deployContract( + name: "DependencyAudit", + path: "../contracts/DependencyAudit.cdc", + arguments: [excludedAddresses] + ) + Test.expect(err, Test.beNil()) + + +} + + +access(all) fun testChekDependenciesWithEmptyList() { + let addresses: [Address] = [] + let names: [String] = [] + let authorizers: [Address] = [] + let commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + let events = Test.eventsOfType(Type()) + Test.assertEqual(0, events.length) +} + +access(all) fun testChekDependenciesWithExcludedEntries() { + let addresses: [Address] = [adminAccount.address] + let names: [String] = ["DependencyAudit"] + let authorizers: [Address] = [] + let commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + let events = Test.eventsOfType(Type()) + Test.assertEqual(0, events.length) +} + +access(all) fun testChekDependenciesWithUnstagedEntries() { + let addresses: [Address] = [fooAccount.address] + let names: [String] = ["Foo"] + let authorizers: [Address] = [] + let commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + let events = Test.eventsOfType(Type()) + Test.assertEqual(1, events.length) + + let evt = events[0] as! DependencyAudit.UnstagedDependencies + Test.assertEqual(1, evt.dependenciesAddresses.length) + Test.assertEqual(1, evt.dependenciesNames.length) + Test.assertEqual(fooAccount.address, evt.dependenciesAddresses[0]) + Test.assertEqual("Foo", evt.dependenciesNames[0]) +} + + +access(all) fun testChekDependenciesWithStagedEntries() { + var events = Test.eventsOfType(Type()) + Test.assertEqual(1, events.length) + + let addresses: [Address] = [aAccount.address] + let names: [String] = ["A"] + let authorizers: [Address] = [] + var commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + events = Test.eventsOfType(Type()) + Test.assertEqual(2, events.length) + let evt = events[1] as! DependencyAudit.UnstagedDependencies + Test.assertEqual(1, evt.dependenciesAddresses.length) + Test.assertEqual(1, evt.dependenciesNames.length) + Test.assertEqual(aAccount.address, evt.dependenciesAddresses[0]) + Test.assertEqual("A", evt.dependenciesNames[0]) + + let aStagingTxResult = executeTransaction( + "../transactions/migration-contract-staging/stage_contract.cdc", + ["A", aUpdateCadence], + aAccount + ) + Test.expect(aStagingTxResult, Test.beSucceeded()) + + events = Test.eventsOfType(Type()) + Test.assertEqual(2, events.length) + + commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + events = Test.eventsOfType(Type()) + Test.assertEqual(2, events.length) +} + + +access(all) fun testChekDependenciesWithMixedEntries() { + var events = Test.eventsOfType(Type()) + Test.assertEqual(2, events.length) + + let addresses: [Address] = [adminAccount.address, fooAccount.address, aAccount.address, bcAccount.address] + let names: [String] = ["DependencyAudit", "Foo", "A", "B"] + let authorizers: [Address] = [] + var commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + events = Test.eventsOfType(Type()) + Test.assertEqual(3, events.length) + + let evt = events[2] as! DependencyAudit.UnstagedDependencies + Test.assertEqual(2, evt.dependenciesAddresses.length) + Test.assertEqual(2, evt.dependenciesNames.length) + Test.assertEqual(fooAccount.address, evt.dependenciesAddresses[0]) + Test.assertEqual("Foo", evt.dependenciesNames[0]) + Test.assertEqual(bcAccount.address, evt.dependenciesAddresses[1]) + Test.assertEqual("B", evt.dependenciesNames[1]) +} + +access(all) fun testSetPanic() { + let shouldPanic: Bool = true + var commitResult = executeTransaction( + "../transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc", + [shouldPanic], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + var events = Test.eventsOfType(Type()) + Test.assertEqual(1, events.length) + + let evt = events[0] as! DependencyAudit.PanicOnUnstagedDependenciesChanged + Test.assertEqual(true, evt.shouldPanic) +} + + +access(all) fun testChekDependenciesWithUnstagedEntriesPanics() { + let addresses: [Address] = [fooAccount.address] + let names: [String] = ["Foo"] + let authorizers: [Address] = [] + let commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beFailed()) + // not sure how to test this: + // Test.expect(commitResult.error!.message, Test.contain("panic: Found unstaged dependencies: A.0x0000000000000008.Foo") ) +} diff --git a/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc b/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc new file mode 100644 index 0000000..ff4a452 --- /dev/null +++ b/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc @@ -0,0 +1,8 @@ +import "DependencyAudit" + +transaction(shouldPanic: Bool) { + prepare(signer: AuthAccount) { + signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.setPanicOnUnstagedDependencies(shouldPanic: shouldPanic) + ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") + } +} diff --git a/transactions/dependency-audit/admin/test_check_dependencies.cdc b/transactions/dependency-audit/admin/test_check_dependencies.cdc new file mode 100644 index 0000000..83b3df3 --- /dev/null +++ b/transactions/dependency-audit/admin/test_check_dependencies.cdc @@ -0,0 +1,8 @@ +import "DependencyAudit" + +transaction(dependenciesAddresses: [Address], dependenciesNames: [String], authorizers: [Address]) { + prepare(signer: AuthAccount) { + signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.testCheckDependencies(dependenciesAddresses, dependenciesNames, authorizers) + ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") + } +} From 22e28b12ed4fe0700f870d37cdf7997e14f6d699 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Fri, 17 May 2024 13:38:43 +0200 Subject: [PATCH 4/8] address review comments --- contracts/DependencyAudit.cdc | 32 ++++++++++++++++++++++---------- tests/dependency_audit_tests.cdc | 25 +++++++++++-------------- 2 files changed, 33 insertions(+), 24 deletions(-) diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 651b0d9..0e48676 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -1,6 +1,6 @@ import "MigrationContractStaging" -// This contract ist is used by the FVM calling the `checkDependencies` function from a function of the same name and singature in the FlowServiceAccount contract, +// This contract is is used by the FVM calling the `checkDependencies` function from a function of the same name and singnature in the FlowServiceAccount contract, // at the end of every transaction. // The `dependenciesAddresses` and `dependenciesNames` will be all the dependencies needded to run that transaction. // @@ -15,14 +15,13 @@ access(all) contract DependencyAudit { access(all) var panicOnUnstaged: Bool - access(all) event UnstagedDependencies(dependenciesAddresses: [Address], dependenciesNames: [String]) + access(all) event UnstagedDependencies(dependencies: [Dependency]) access(all) event PanicOnUnstagedDependenciesChanged(shouldPanic: Bool) // checkDependencies is called from the FlowServiceAccount contract access(self) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { - var unstagedDependenciesAddresses: [Address] = [] - var unstagedDependenciesNames: [String] = [] + var unstagedDependencies: [Dependency] = [] var numDependencies = dependenciesAddresses.length var i = 0 @@ -35,25 +34,24 @@ access(all) contract DependencyAudit { let staged = MigrationContractStaging.isStaged(address: dependenciesAddresses[i], name: dependenciesNames[i]) if !staged { - unstagedDependenciesAddresses.append(dependenciesAddresses[i]) - unstagedDependenciesNames.append(dependenciesNames[i]) + unstagedDependencies.append(Dependency(address: dependenciesAddresses[i], name: dependenciesNames[i])) } i = i + 1 } - if unstagedDependenciesAddresses.length > 0 { + if unstagedDependencies.length > 0 { if DependencyAudit.panicOnUnstaged { // If `panicOnUnstaged` is set to true, the transaction will panic if there are any unstaged dependencies // the panic message will include the unstaged dependencies var unstagedDependenciesString = "" - var numUnstagedDependencies = unstagedDependenciesAddresses.length + var numUnstagedDependencies = unstagedDependencies.length var j = 0 while j < numUnstagedDependencies { if j > 0 { unstagedDependenciesString = unstagedDependenciesString.concat(", ") } - unstagedDependenciesString = unstagedDependenciesString.concat("A.").concat(unstagedDependenciesAddresses[j].toString()).concat(".").concat(unstagedDependenciesNames[j]) + unstagedDependenciesString = unstagedDependenciesString.concat(unstagedDependencies[j].toString()) j = j + 1 } @@ -61,7 +59,7 @@ access(all) contract DependencyAudit { // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.0x2ceae959ed1a7e7a.MigrationContractStaging, A.0x2ceae959ed1a7e7a.DependencyAudit` panic("Found unstaged dependencies: ".concat(unstagedDependenciesString)) } else { - emit UnstagedDependencies(dependenciesAddresses: unstagedDependenciesAddresses, dependenciesNames: unstagedDependenciesNames) + emit UnstagedDependencies(dependencies: unstagedDependencies) } } } @@ -97,6 +95,20 @@ access(all) contract DependencyAudit { } } + access(all) struct Dependency { + access(all) let address: Address + access(all) let name: String + + init(address: Address, name: String) { + self.address = address + self.name = name + } + + access(all) fun toString(): String { + return "A.".concat(self.address.toString()).concat(".").concat(self.name) + } + } + // The admin resource is saved to the storage so that the admin can be accessed by the service account // The `excludedAddresses` will be the addresses with the system contracracts. init(excludedAddresses: [Address]) { diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc index 84352e1..e75c2be 100644 --- a/tests/dependency_audit_tests.cdc +++ b/tests/dependency_audit_tests.cdc @@ -111,10 +111,9 @@ access(all) fun testChekDependenciesWithUnstagedEntries() { Test.assertEqual(1, events.length) let evt = events[0] as! DependencyAudit.UnstagedDependencies - Test.assertEqual(1, evt.dependenciesAddresses.length) - Test.assertEqual(1, evt.dependenciesNames.length) - Test.assertEqual(fooAccount.address, evt.dependenciesAddresses[0]) - Test.assertEqual("Foo", evt.dependenciesNames[0]) + Test.assertEqual(1, evt.dependencies.length) + Test.assertEqual(fooAccount.address, evt.dependencies[0].address) + Test.assertEqual("Foo", evt.dependencies[0].name) } @@ -135,10 +134,9 @@ access(all) fun testChekDependenciesWithStagedEntries() { events = Test.eventsOfType(Type()) Test.assertEqual(2, events.length) let evt = events[1] as! DependencyAudit.UnstagedDependencies - Test.assertEqual(1, evt.dependenciesAddresses.length) - Test.assertEqual(1, evt.dependenciesNames.length) - Test.assertEqual(aAccount.address, evt.dependenciesAddresses[0]) - Test.assertEqual("A", evt.dependenciesNames[0]) + Test.assertEqual(1, evt.dependencies.length) + Test.assertEqual(aAccount.address, evt.dependencies[0].address) + Test.assertEqual("A", evt.dependencies[0].name) let aStagingTxResult = executeTransaction( "../transactions/migration-contract-staging/stage_contract.cdc", @@ -180,12 +178,11 @@ access(all) fun testChekDependenciesWithMixedEntries() { Test.assertEqual(3, events.length) let evt = events[2] as! DependencyAudit.UnstagedDependencies - Test.assertEqual(2, evt.dependenciesAddresses.length) - Test.assertEqual(2, evt.dependenciesNames.length) - Test.assertEqual(fooAccount.address, evt.dependenciesAddresses[0]) - Test.assertEqual("Foo", evt.dependenciesNames[0]) - Test.assertEqual(bcAccount.address, evt.dependenciesAddresses[1]) - Test.assertEqual("B", evt.dependenciesNames[1]) + Test.assertEqual(2, evt.dependencies.length) + Test.assertEqual(fooAccount.address, evt.dependencies[0].address) + Test.assertEqual("Foo", evt.dependencies[0].name) + Test.assertEqual(bcAccount.address, evt.dependencies[1].address) + Test.assertEqual("B", evt.dependencies[1].name) } access(all) fun testSetPanic() { From 14cb82891570bcde42728a2debe7c66b2d24ca63 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Tue, 21 May 2024 16:10:21 +0200 Subject: [PATCH 5/8] address review comments --- contracts/DependencyAudit.cdc | 11 +++++++---- tests/dependency_audit_tests.cdc | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 0e48676..6315ffe 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -20,7 +20,7 @@ access(all) contract DependencyAudit { access(all) event PanicOnUnstagedDependenciesChanged(shouldPanic: Bool) // checkDependencies is called from the FlowServiceAccount contract - access(self) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { + access(contract) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { var unstagedDependencies: [Dependency] = [] var numDependencies = dependenciesAddresses.length @@ -56,7 +56,7 @@ access(all) contract DependencyAudit { j = j + 1 } - // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.0x2ceae959ed1a7e7a.MigrationContractStaging, A.0x2ceae959ed1a7e7a.DependencyAudit` + // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.2ceae959ed1a7e7a.MigrationContractStaging, A.2ceae959ed1a7e7a.DependencyAudit` panic("Found unstaged dependencies: ".concat(unstagedDependenciesString)) } else { emit UnstagedDependencies(dependencies: unstagedDependencies) @@ -105,12 +105,15 @@ access(all) contract DependencyAudit { } access(all) fun toString(): String { - return "A.".concat(self.address.toString()).concat(".").concat(self.name) + var addressString = self.address.toString() + // remove 0x prefix + addressString = addressString.slice(from: 2, upTo: addressString.length) + return "A.".concat(addressString).concat(".").concat(self.name) } } // The admin resource is saved to the storage so that the admin can be accessed by the service account - // The `excludedAddresses` will be the addresses with the system contracracts. + // The `excludedAddresses` will be the addresses with the system contracts. init(excludedAddresses: [Address]) { self.excludedAddresses = {} self.panicOnUnstaged = false diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc index e75c2be..b34e5e9 100644 --- a/tests/dependency_audit_tests.cdc +++ b/tests/dependency_audit_tests.cdc @@ -213,5 +213,5 @@ access(all) fun testChekDependenciesWithUnstagedEntriesPanics() { ) Test.expect(commitResult, Test.beFailed()) // not sure how to test this: - // Test.expect(commitResult.error!.message, Test.contain("panic: Found unstaged dependencies: A.0x0000000000000008.Foo") ) + // Test.expect(commitResult.error!.message, Test.contain("panic: Found unstaged dependencies: A.0000000000000008.Foo") ) } From 0ea7b1cfd488e6176b130d6e78f8d0835d28ab0f Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Wed, 22 May 2024 16:51:47 +0200 Subject: [PATCH 6/8] change function access and panic message --- contracts/DependencyAudit.cdc | 4 ++-- tests/dependency_audit_tests.cdc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index 6315ffe..ed5132b 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -20,7 +20,7 @@ access(all) contract DependencyAudit { access(all) event PanicOnUnstagedDependenciesChanged(shouldPanic: Bool) // checkDependencies is called from the FlowServiceAccount contract - access(contract) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { + access(account) fun checkDependencies(_ dependenciesAddresses: [Address], _ dependenciesNames: [String], _ authorizers: [Address]) { var unstagedDependencies: [Dependency] = [] var numDependencies = dependenciesAddresses.length @@ -57,7 +57,7 @@ access(all) contract DependencyAudit { } // the transactions will fail with a message that looks like this: `error: panic: Found unstaged dependencies: A.2ceae959ed1a7e7a.MigrationContractStaging, A.2ceae959ed1a7e7a.DependencyAudit` - panic("Found unstaged dependencies: ".concat(unstagedDependenciesString)) + panic("This transaction is using dependencies not staged for Crescendo upgrade coming soon! Learn more: https://bit.ly/FLOWCRESCENDO. Dependencies not staged: ".concat(unstagedDependenciesString)) } else { emit UnstagedDependencies(dependencies: unstagedDependencies) } diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc index b34e5e9..fec67a6 100644 --- a/tests/dependency_audit_tests.cdc +++ b/tests/dependency_audit_tests.cdc @@ -213,5 +213,5 @@ access(all) fun testChekDependenciesWithUnstagedEntriesPanics() { ) Test.expect(commitResult, Test.beFailed()) // not sure how to test this: - // Test.expect(commitResult.error!.message, Test.contain("panic: Found unstaged dependencies: A.0000000000000008.Foo") ) + // Test.expect(commitResult.error!.message, Test.contain("panic: This transaction is using dependencies not staged for Crescendo upgrade coming soon! Learn more: https://bit.ly/FLOWCRESCENDO. Dependencies not staged: A.0000000000000008.Foo") ) } From d6b83a6f2df4dac62a29e488e054d58310481d96 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Tue, 28 May 2024 14:48:36 +0200 Subject: [PATCH 7/8] add excluded addresses --- lib/go/templates/internal/assets/assets.go | 2 ++ tests/dependency_audit_tests.cdc | 31 +++++++++++++++++++ .../admin/add_excluded_addresses.cdc | 8 +++++ 3 files changed, 41 insertions(+) create mode 100644 transactions/dependency-audit/admin/add_excluded_addresses.cdc diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index 51aed87..b4a7c5e 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -1003,6 +1003,7 @@ var _bindata = map[string]func() (*asset, error){ "transactions/coordinator/set_block_update_boundary.cdc": transactionsCoordinatorSet_block_update_boundaryCdc, "transactions/delegatee/execute_all_delegated_updates.cdc": transactionsDelegateeExecute_all_delegated_updatesCdc, "transactions/delegatee/remove_delegated_updaters.cdc": transactionsDelegateeRemove_delegated_updatersCdc, + "transactions/dependency-audit/admin/add_excluded_addresses.cdc": transactionsDependencyAuditAdminAdd_excluded_addressesCdc, "transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc": transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc, "transactions/dependency-audit/admin/test_check_dependencies.cdc": transactionsDependencyAuditAdminTest_check_dependenciesCdc, "transactions/host/publish_host_capability.cdc": transactionsHostPublish_host_capabilityCdc, @@ -1109,6 +1110,7 @@ var _bintree = &bintree{nil, map[string]*bintree{ }}, "dependency-audit": {nil, map[string]*bintree{ "admin": {nil, map[string]*bintree{ + "add_excluded_addresses.cdc": {transactionsDependencyAuditAdminAdd_excluded_addressesCdc, map[string]*bintree{}}, "set_unstaged_cause_panic.cdc": {transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc, map[string]*bintree{}}, "test_check_dependencies.cdc": {transactionsDependencyAuditAdminTest_check_dependenciesCdc, map[string]*bintree{}}, }}, diff --git a/tests/dependency_audit_tests.cdc b/tests/dependency_audit_tests.cdc index fec67a6..43c3555 100644 --- a/tests/dependency_audit_tests.cdc +++ b/tests/dependency_audit_tests.cdc @@ -185,6 +185,37 @@ access(all) fun testChekDependenciesWithMixedEntries() { Test.assertEqual("B", evt.dependencies[1].name) } +access(all) fun testSetExcludedAddresses() { + var addresses: [Address] = [bcAccount.address] + var commitResult = executeTransaction( + "../transactions/dependency-audit/admin/add_excluded_addresses.cdc", + [addresses], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + var events = Test.eventsOfType(Type()) + Test.assertEqual(3, events.length) + + addresses = [adminAccount.address, fooAccount.address, aAccount.address, bcAccount.address] + let names: [String] = ["DependencyAudit", "Foo", "A", "B"] + let authorizers: [Address] = [] + commitResult = executeTransaction( + "../transactions/dependency-audit/admin/test_check_dependencies.cdc", + [addresses, names, authorizers], + adminAccount + ) + Test.expect(commitResult, Test.beSucceeded()) + + events = Test.eventsOfType(Type()) + Test.assertEqual(4, events.length) + + let evt = events[3] as! DependencyAudit.UnstagedDependencies + Test.assertEqual(1, evt.dependencies.length) + Test.assertEqual(fooAccount.address, evt.dependencies[0].address) + Test.assertEqual("Foo", evt.dependencies[0].name) +} + access(all) fun testSetPanic() { let shouldPanic: Bool = true var commitResult = executeTransaction( diff --git a/transactions/dependency-audit/admin/add_excluded_addresses.cdc b/transactions/dependency-audit/admin/add_excluded_addresses.cdc new file mode 100644 index 0000000..a5ce411 --- /dev/null +++ b/transactions/dependency-audit/admin/add_excluded_addresses.cdc @@ -0,0 +1,8 @@ +import "DependencyAudit" + +transaction(addresses: [Address]) { + prepare(signer: AuthAccount) { + signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.addExcludedAddresses(addresses: addresses) + ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") + } +} From 6ae6b2cb30535224ea647718e5d7c014f2ef6ac8 Mon Sep 17 00:00:00 2001 From: Janez Podhostnik Date: Tue, 28 May 2024 15:55:47 +0200 Subject: [PATCH 8/8] stable-cadence fixes --- contracts/DependencyAudit.cdc | 2 +- flow.json | 9 ++- lib/go/contracts/internal/assets/assets.go | 21 +++++++ lib/go/templates/internal/assets/assets.go | 63 +++++++++++++++++++ .../admin/add_excluded_addresses.cdc | 4 +- .../admin/set_unstaged_cause_panic.cdc | 4 +- .../admin/test_check_dependencies.cdc | 4 +- 7 files changed, 99 insertions(+), 8 deletions(-) diff --git a/contracts/DependencyAudit.cdc b/contracts/DependencyAudit.cdc index ed5132b..39d5598 100644 --- a/contracts/DependencyAudit.cdc +++ b/contracts/DependencyAudit.cdc @@ -125,6 +125,6 @@ access(all) contract DependencyAudit { } let admin <- create Administrator() - self.account.save(<-admin, to: self.AdministratorStoragePath) + self.account.storage.save(<-admin, to: self.AdministratorStoragePath) } } diff --git a/flow.json b/flow.json index 98c0be0..5137363 100644 --- a/flow.json +++ b/flow.json @@ -70,6 +70,13 @@ "testnet": "631e88ae7f1d7c20" } }, + "DependencyAudit": { + "source": "./contracts/DependencyAudit.cdc", + "aliases": { + "emulator": "f8d6e0586b0a20c7", + "testing": "0000000000000007" + } + }, "StagedContractUpdates": { "source": "./contracts/staged-contract-updates/StagedContractUpdates.cdc", "aliases": { @@ -150,7 +157,7 @@ "migration-contract-staging-crescendo": ["MigrationContractStaging"] }, "emulator": { - "emulator-account": ["MigrationContractStaging"] + "emulator-account": ["MigrationContractStaging", "DependencyAudit"] }, "mainnet": { "migration-contract-staging-mainnet": ["MigrationContractStaging"] diff --git a/lib/go/contracts/internal/assets/assets.go b/lib/go/contracts/internal/assets/assets.go index 9bef7c1..642747c 100644 --- a/lib/go/contracts/internal/assets/assets.go +++ b/lib/go/contracts/internal/assets/assets.go @@ -1,5 +1,6 @@ // Code generated by go-bindata. DO NOT EDIT. // sources: +// DependencyAudit.cdc (6.098kB) // MigrationContractStaging.cdc (19.536kB) package assets @@ -69,6 +70,26 @@ func (fi bindataFileInfo) Sys() interface{} { return nil } +var _dependencyauditCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x58\x6d\x6f\xdb\xb6\x13\x7f\xef\x4f\x71\xf5\x2b\x0b\x7f\x57\x6e\x0b\xfc\x51\x54\xa8\x57\x64\x69\x0a\x0c\xe8\x13\x96\x6e\x7b\x61\x04\x33\x23\x9d\x6d\x26\x32\x69\x90\x94\x53\x2f\xc8\x77\x1f\x8e\x94\x25\x52\xa2\x9c\x0c\x05\x2a\x04\x81\x64\x1e\xef\x8e\xbf\x7b\xe0\x8f\xe4\xdb\x9d\x54\x06\xc6\x9f\xf8\x5a\x31\xc3\xa5\x38\x97\xc2\x28\x96\x9b\x4b\xc3\xd6\x5c\xac\xc7\xa3\xd1\x6c\x06\xdf\x36\x5c\x43\x5e\x8f\x00\xd7\xf4\x57\x69\x2c\xe0\xfa\x00\x66\x83\xf0\xe1\xcf\x4f\x90\xb3\xb2\xe4\x62\x6d\xbf\x97\xf9\x06\xf3\xdb\xf7\xb8\x43\x51\xa0\xc8\x39\xea\x25\xac\x2a\x91\x93\x01\x58\x29\xb9\x05\xd6\x7e\xcb\x95\x9d\xa3\xd9\x16\x41\xd0\x3f\x26\x0a\xd0\x5c\xac\x05\x33\x95\x42\xe0\xc2\xd9\x28\xe5\xdd\x25\xaa\x3d\xcf\xf1\x2c\xcf\x65\x25\x4c\xe3\xd1\x94\x7c\x64\xc6\x8a\xa1\x28\x48\x23\xee\x51\x1d\xc0\x28\x26\x34\xb3\x66\x52\xb7\x0e\x84\x65\xe1\xb9\x75\x56\x14\x0a\xb5\x26\xff\xc8\x6a\x30\xf6\x99\x6d\xe9\xf7\x3b\x5e\x96\x70\x8d\xc0\xca\xd2\x1a\xf0\x45\x40\x20\x16\x05\x16\x60\x24\xa8\x8a\xfc\x24\x2f\x42\xa3\x8d\xdd\x53\x98\x58\x23\x56\x00\xf8\x0a\x98\x38\x1c\x51\x09\xac\x31\x85\x20\xa4\x01\x6d\xd8\x1a\x8b\x23\x30\x43\xa1\x6b\xe0\xb1\x4b\xff\xed\xa9\x6a\xa7\x56\x20\xf4\x0c\xb7\xdc\x00\x13\x84\xaa\x30\x70\xc7\xcd\xc6\x0a\x55\xa2\xf6\xc4\x57\x37\x05\xa9\x60\xc7\x04\xcf\x69\x29\x4b\xfb\xf6\x45\xfc\x51\x8b\x2e\x29\x75\x34\x1a\x42\xcc\xa8\x0a\xd3\x11\xcb\x73\xd4\x7a\xc2\xca\x32\x69\x53\xac\x81\xe9\x70\x56\x15\xdc\xc0\xfd\x68\x04\x00\xe0\xcb\x96\x68\xe0\xac\xd8\x72\xc1\xb5\x51\xcc\x48\x75\x69\xa4\x62\x6b\xfc\xca\xcc\x26\x03\xef\xc3\x4d\xad\xa3\xa0\x0f\xda\xe0\x16\xd8\x31\xee\xb0\x61\x7b\x6c\xec\x6a\x17\x41\xbb\x66\x42\xe4\x1a\x1d\x28\x1a\xf6\x9c\xd9\x25\x6f\x8f\x60\xb7\xbe\x6a\x09\x77\x08\xf8\x3d\x2f\xab\x02\x49\x68\xeb\x52\x3c\xc0\xf9\x40\xd1\xbd\xcd\xb5\xbf\x0c\x8d\xe5\x2a\x81\x3d\x53\xc7\xc9\x45\x93\x8e\x19\xdc\xd7\xef\x19\xfc\x2a\x65\xf9\xd0\x5f\x3f\xcd\xeb\x80\xeb\x64\xfb\xa2\x2e\x6c\x47\x29\x3f\x05\x27\x7e\xe4\x32\x58\xb4\xb8\x5f\x25\x43\x7a\xbe\x86\x46\x7d\x75\xe7\x1b\x26\xd6\x58\x4c\xf4\x46\x56\x65\x61\x05\x9d\x4f\x49\x13\x84\x5e\x15\x50\x42\x50\xef\xc0\xa2\x85\xed\x44\xad\x07\x4e\xb9\xb1\x84\xb2\xb5\xaf\x78\xf2\x37\x44\x4b\x3d\x83\x45\xfd\x7e\x35\x85\x50\xc6\x96\x7c\x06\x8b\x4b\xa3\xb8\x58\xdb\x61\x56\x99\x8d\x54\xfc\x1f\x54\xfe\xc4\x04\xee\xad\x23\xf4\x50\x20\xaa\x08\x18\x21\x9c\x30\x87\xc5\xd5\x28\x98\x24\xaa\x6d\x00\xc4\x3c\xee\x6f\x5a\xa2\x58\x9b\x4d\x30\x95\xc3\x1c\x5e\x34\xbf\xdc\x6d\x78\x89\xc0\xe1\x6d\x4f\x65\xeb\x25\x3d\x54\x32\x5c\x5f\xd4\xc9\x06\xf3\x6e\x99\xa5\xbd\x3c\x5c\x44\x3d\x5a\xf0\xab\x2b\x78\xf7\x0e\x56\xac\xd4\x18\x58\xe0\x2b\xdf\x40\x68\xdd\x8e\xc3\x1c\x38\xfc\x0f\x5e\xf6\x46\x28\xbe\x5c\x54\xa1\xba\x87\x51\xcf\xff\xba\xe3\xcc\x07\xdb\x5e\xca\xf5\xa5\x95\x99\xb0\x63\x05\x0d\x2d\x62\x6a\xf7\x9b\xac\x9f\x02\x0b\x7e\x95\x74\xd7\xf5\xac\xb6\xdc\x5f\x54\x2c\xf8\x29\xdb\xd1\xc7\xa4\x45\xf8\x07\xdd\x49\x4e\x01\xd3\x87\xd5\x13\xe0\xab\xb8\x87\x2e\xad\xe0\x17\x78\xd1\x59\x13\x5f\xf5\x12\xa3\xd3\x68\x22\x20\xb8\x2d\xe6\xb1\x76\xef\x36\x17\x6f\x87\x74\xbd\xb6\xd9\x2e\xcc\x06\x15\xda\x0d\x89\x36\xab\xe8\xfe\x12\xb3\x4c\x4a\x9d\x8e\x2d\x6a\xcd\xd6\xe8\xd4\x72\xd1\xf4\xe4\x27\xea\x1a\xaa\x65\xd7\x10\x60\x0e\xe3\x71\x74\x8e\xa8\xb6\xb1\x7e\x08\xf3\x53\xd0\x47\x35\xdd\x04\x95\x7d\x7c\x5c\x85\xdf\xb8\x0a\x8f\x5a\xea\x47\xa4\x0e\xe5\x4d\x24\xc2\xfe\x73\x72\xb9\xc3\x83\x69\x2e\x45\xce\xcc\x64\x3c\x85\x71\x12\x55\xfe\x10\xfd\xf5\x07\xcd\xc5\x24\x16\x37\x57\xa9\x91\x4e\x6e\x92\x24\xa3\xa8\x5d\xc2\xf5\x26\xda\x79\x1e\xfa\x13\xea\x94\xf2\xf2\x54\xbb\x8c\x5a\x31\x5e\x3a\xfe\xc3\x9a\x54\xb3\x94\xa1\x94\xf2\x56\x43\xc9\x6f\xe9\x9b\xeb\x0c\x96\xa8\x94\x54\x99\x4b\xcb\x0c\x3e\xc8\x4a\x14\xf1\x24\xcc\xe0\x2c\x7d\x95\x23\xc3\x37\xff\x7f\x83\xc5\x4b\xf6\x1a\x5f\xb3\x74\xa8\xbb\x4d\x63\xc2\x9d\x6a\x5d\xf6\xd6\x63\x9d\x98\x8c\x2d\x8d\xf7\x8b\xcf\xd2\x78\x82\x3e\x24\xb5\x2d\xc5\x5c\x49\x05\xe7\x0a\x75\x8e\xa2\x90\x50\xed\xd6\x8a\x15\x44\x97\xb6\x34\x49\x4b\x29\x9e\xc1\x47\x64\x4a\xc0\x56\x2a\xcc\x60\x63\xcc\x4e\x67\xb3\xd9\x35\x37\x69\x79\x98\x7d\xf8\xf8\xe5\xaf\xf3\xdf\x2f\x2e\xcf\x2f\x3e\xbf\xff\x92\xc2\xfb\xb8\x91\x0c\xc6\xa7\xa2\xeb\xe2\xda\xed\x7f\x80\xa5\xc6\x48\x56\x5b\xa6\xfa\x04\xa6\x13\xb3\xd4\x6d\xb1\xe1\xdb\x43\xc0\x23\x03\xe6\x09\x0a\xb5\x54\x39\x42\xce\x04\x71\x46\x7b\x34\x32\x92\x58\x26\xd8\xd1\xad\xdc\xa3\xc7\x39\x1b\x9e\xd3\xdb\x6f\xa1\xe0\x36\x32\x4c\x1d\x6a\x6b\x3d\x12\x46\xb6\x2a\x32\x16\xba\xd0\x42\x41\x67\xa1\xa2\xb8\xe8\xa9\x26\x6f\xc8\x68\xeb\x07\x35\xe5\xa7\x78\xd1\x75\x81\xe8\x56\xcc\xc4\x84\x45\x38\x56\xd2\x89\x12\xa5\x54\x2d\x47\x27\x98\xd6\x9b\x7e\x30\x1f\xa7\x27\xf5\x6c\x62\x57\xb4\xbd\x0c\x06\xd0\x07\xc7\x85\xa3\x8f\x4f\x1d\xa6\x10\xa2\xa7\x87\x2a\x06\xd2\x80\xa9\x9f\x8e\x53\xea\x1c\x99\xdc\xe2\x21\x3b\x6a\x1a\xce\x76\x1f\x2c\x8d\xe6\x04\xdf\xa7\x61\xed\x4e\xfc\xbd\x8d\x7f\xcf\x14\x67\xd7\x25\x1e\xb3\x6c\xcf\xca\x0a\xe9\xfc\xb9\xf4\x4e\x07\xcb\x41\xe8\x4e\x1b\x8e\x9c\x30\x3a\xb8\x3c\xc6\x60\xe6\xe0\xa9\x08\x66\xda\x16\xf2\x5f\x0f\x39\xde\x47\x32\x00\xa5\x41\x6d\xce\x63\xa7\x1f\xdb\x2e\x28\xdc\x24\x41\x8d\x75\x57\xa9\x9d\xd4\x1e\x3d\x21\x72\x55\x1f\x4b\xf3\xe3\x3d\xc4\x23\xf7\x09\xf5\x11\x7d\xa7\xe4\x9e\x17\x43\xb4\x67\x36\x8b\xaa\xe1\x1a\x24\x31\xb1\x3b\xae\xdd\xcd\x00\x19\xb5\xb1\x6c\xca\x41\x56\x46\xf3\x02\x07\xc3\x17\x5d\xec\xcf\x3a\x91\xd1\xa3\xd0\x54\x4a\xf4\xd2\xa0\x7f\x4a\x8c\x7a\x34\xed\x3b\x31\xf5\x0d\x27\xf1\xcd\xc1\x47\x41\x1b\x55\x05\x37\x19\x9e\x83\xdd\x7b\x8c\xe6\x68\x50\x3b\x30\x28\xe8\x0e\x08\x0e\x0c\x8f\xe1\x0b\x6e\x26\x5d\x1d\xd3\x40\xb8\x0b\x8f\xc6\x72\x95\x1e\xdb\xcb\xfc\xe8\x40\x5f\xc4\x5e\xc8\xcd\xad\xaa\x58\x5a\xf7\xc2\xde\xd0\xb0\xa3\xe1\x8e\x5d\xa2\xb8\xb5\xb1\x86\xf5\xf9\xbe\x78\x44\x2e\x98\xd7\xf4\x6d\x78\xf1\x1d\x76\x0a\x57\xfc\x7b\x30\xde\xd5\x19\x7c\xa7\xba\xe4\x39\x4e\x28\x79\x33\x78\x35\x85\x6a\xf7\x4d\x66\x1d\x11\x47\xc9\x93\x58\x0e\x8d\xcf\xd2\x86\xa1\x04\x93\x92\x86\x04\xa7\xe3\xe6\xbd\x81\x6d\x20\x47\x6a\x02\xc1\x68\xf7\x6e\x37\x73\x3a\x26\xb1\xbd\xa3\x0d\xf6\x36\xd4\xdd\x5f\x81\x96\xf5\xa5\x62\x33\xa5\xe6\x18\x0e\xf9\xf6\x0a\x56\xbb\xeb\x12\xa8\xef\x44\x7c\x53\xcb\xde\x7e\xd0\xde\x6a\x86\xbb\x5d\xd3\x36\xea\x6b\xb2\xe6\x5e\x2c\x1d\x35\x79\x16\xb9\xab\x8a\x16\xa1\xc5\xa1\xbf\x6b\xce\xe1\xfe\x21\x94\xe9\x77\x66\x77\xaf\x10\x4a\x0d\x5d\xf5\xc1\x1c\x66\x35\x58\xb3\x55\x29\xef\x3a\x05\x6f\xa7\xb5\xaa\x3a\x9b\x6a\xdf\xbd\x48\x95\x3c\x9d\x75\x78\x85\xe1\xaa\x9a\xe2\xf5\xf6\x39\xe4\x0a\x99\xe9\x10\x36\x2f\xbf\x5d\xfe\xbb\xb8\xa5\xf5\x5a\x52\xca\x86\xc9\xdb\xe7\x56\xc7\x14\x8c\xcc\x4e\xc3\x90\xd4\x29\xf6\x30\xfa\x37\x00\x00\xff\xff\xa1\x1e\x0f\x3b\xd2\x17\x00\x00" + +func dependencyauditCdcBytes() ([]byte, error) { + return bindataRead( + _dependencyauditCdc, + "DependencyAudit.cdc", + ) +} + +func dependencyauditCdc() (*asset, error) { + bytes, err := dependencyauditCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "DependencyAudit.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbd, 0xab, 0xe2, 0x21, 0xa8, 0xaf, 0xb2, 0x59, 0x7e, 0x4f, 0xf3, 0xbe, 0x36, 0x9e, 0x17, 0xa2, 0x8b, 0x4d, 0x59, 0x42, 0xe1, 0xde, 0xd2, 0x9f, 0xa7, 0xec, 0x5a, 0xfd, 0xef, 0x9e, 0x29, 0x45}} + return a, nil +} + var _migrationcontractstagingCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xbc\x3c\xcb\x6e\x5b\xc9\x95\x7b\x7f\xc5\x11\x17\x36\x39\xa0\xa8\x4e\x63\x30\x0b\xc1\x8c\x5b\x91\xdd\xd3\x5e\xd8\x6d\x58\x72\xb2\x30\x8c\x4e\xe9\xde\x43\xb2\xe0\xcb\x2a\xa2\xaa\xae\x68\x8d\xe3\x7d\xbe\x73\xbe\x24\xa8\xf7\xe3\xde\x22\x69\x75\xa3\x89\x24\xb6\xc9\x7a\x9c\x73\xea\xbc\x1f\xb9\xb8\xb8\x80\xdb\x0d\x95\xd0\x70\xa6\x04\x69\x14\x50\x09\x94\x29\x64\x2d\xb6\xb0\xe2\x02\x7a\x89\x40\x19\xa8\x0d\xc2\x35\x69\x91\x35\x08\x7f\x59\xfc\x10\xd7\x6f\xe9\x5a\x10\x45\x39\x03\xd2\x08\x2e\xa5\x59\xf9\x73\xc7\xf7\xc0\x50\xed\xb9\xf8\xbc\x78\x72\x71\x71\xa1\xff\x0b\xaf\x19\xec\x04\xee\x88\x5b\xaf\x4f\x57\xfa\xee\x2d\xed\x50\x2a\xce\x70\x0e\x0f\xbc\x17\xf1\xec\x3d\xed\x3a\x78\xfb\xea\xd5\x4b\x50\x1c\xee\x10\xfa\x5d\x4b\x14\xb6\x67\xf0\xab\x06\xe3\x81\xf7\xcf\xee\xc3\x97\x7e\x6b\x8b\xfa\x60\x73\x5f\x02\xaf\x39\x19\xde\x7c\xb8\xb9\x05\xa9\xc8\x1a\x8b\x8b\xcc\x36\x83\x65\x4a\x0a\xc9\x41\x6d\x88\x32\x18\xd9\x5b\xa0\x21\x4c\x03\x82\x5f\xb0\xe9\xf5\xa5\x44\x02\x81\x1d\x11\x0a\xf8\x4a\xaf\x33\xf7\x3a\xc4\xcf\xf7\xb4\x45\x7d\x9d\xc2\x48\xa5\x48\x8d\x5b\x3e\x0a\x8a\xbd\xe8\xd2\x2c\xf9\xcb\x02\x1a\x81\x7a\x3f\x81\x5f\xb8\x54\xf0\x14\x24\xb9\x37\x90\x66\x9b\xce\x37\x5c\x2a\xca\xd6\x40\x9a\x86\xf7\x4c\x99\xcd\x3f\x2e\xa0\x21\x5d\x67\x2f\xb9\x76\x2b\xa7\x33\xd8\x11\x29\xcd\x5a\x10\xb8\x42\x61\x28\xa4\xb8\xa1\x8f\xbe\x63\x6e\xd0\x0d\xe0\x30\xb2\xc5\x39\x10\xd6\x26\x54\x68\x03\x65\x35\xdd\x22\x42\x86\x78\x96\x40\x2d\x67\x06\x4c\x02\xfa\xae\x0e\x41\x09\xc2\x24\x69\x34\x09\xce\xe0\x67\x2e\x60\xcb\x85\xdd\x6f\xee\xc2\x2f\x6a\x0e\x12\x11\x36\x4a\xed\xe4\xe5\xc5\xc5\x9a\xaa\x4d\x7f\xb7\x68\xf8\xf6\x82\xb3\x55\xc7\xf7\x17\x01\x59\x0b\x84\x79\xe2\x27\xa4\x69\x50\xca\x29\xe9\xba\x59\x84\xf9\x8d\x27\xb6\xc7\xfa\x46\x91\xb5\x46\xf9\xeb\x93\x27\x00\x00\x17\x17\xf0\x8e\xa8\x8d\xde\x20\x15\x61\x4a\xba\x6f\xcd\x1f\xee\x44\x89\xdd\x6a\x06\x1d\x2a\x68\xb1\xa3\x5b\xaa\x50\x5c\xc2\x8d\x12\x94\xad\xc7\x97\x35\x64\x27\xfb\x0e\xf5\xc1\xef\x04\xae\xe8\x97\xb1\xe5\x06\x4e\xbd\x5a\x53\xfa\x46\x71\x41\xd6\x66\x87\x5e\x1b\xfe\x31\xba\xe1\xaa\xdd\x52\x76\x70\x87\x7e\x82\x37\x64\x97\xf0\x2f\x69\x5b\x81\x52\xa2\xd4\xef\x4b\x18\x10\x21\xc8\x83\x66\x54\xc3\x12\x6d\xfe\xc8\x72\x1c\x2d\xbb\xd4\x13\x52\x5e\xc2\xd7\x2b\x7b\xea\x25\x7c\xb4\xf8\x7d\xfa\x16\xae\xbf\xdd\x20\xdc\x75\xbc\xf9\x0c\x1b\xa4\xeb\x8d\x02\xa2\x60\xbf\xa1\xcd\xc6\x31\x8e\x65\x0f\xc6\xf5\x7f\x3a\xce\xd6\x28\x34\xaf\xd8\x2b\x16\xf0\x7a\x05\x8c\x76\xf3\x6c\x6d\xf8\x19\x28\x6b\x71\x45\x19\x55\xd8\x3d\x40\xcf\x14\xed\xc2\xb5\x86\x61\x7b\xc5\x57\x2b\xb8\x27\x5d\x8f\x5a\x87\x49\x54\x8b\x21\x46\xf7\x44\x98\xf3\x28\x5b\x5f\x9b\x0d\x97\xf0\xe1\x35\x53\xff\xf3\xdf\x2f\xc2\x61\xef\x51\xf6\x9d\x92\x4e\x9e\xa1\x23\x52\x01\x6e\xfb\xce\xf0\xfd\x50\xeb\xcd\xa1\xe1\xdb\x2d\x55\xfa\xd7\xbb\x07\xb3\x85\xe8\xa7\x02\xb2\x52\x28\x80\xaf\x56\xcd\x86\x50\x36\xb2\x73\xf0\xcc\x1a\x38\x7d\xdd\x2b\x77\x5b\x60\x63\x0b\xd2\x25\x54\x7e\x78\xf1\x24\x00\xff\xea\x1e\x99\x06\xd7\xc2\xb3\xdf\xa0\x96\x40\x7f\xf5\x33\xe9\xf4\x9c\x74\x34\x9d\x83\xc0\x5d\x47\x1a\x6c\x41\x2b\x7a\x66\xbf\x0d\x87\xfd\xd3\x8a\xeb\x3f\xe1\xff\xff\xfd\x6f\xf8\x3a\x31\xbf\x4e\xe6\x30\x71\x9b\xf4\x5f\xdd\x9e\xc9\x37\x40\xd2\x6c\xa0\x45\xc6\x8d\x1e\x32\x64\x30\xbb\xe1\x0e\xcd\x17\xe4\x33\x32\xe0\xd6\x8e\x14\xec\x17\x2e\x7c\xfb\xeb\xed\xab\x4b\x78\xc9\x51\x02\xe3\x0a\xd6\x3d\x11\x84\x29\xc4\xa8\x85\x0b\x85\x2d\xf5\x7b\xd3\xa0\x8e\x06\x14\x45\x43\x0e\x27\xfd\x37\x8a\xa8\x5e\x7e\xb0\x1a\x6c\x6a\xd6\xea\x8f\x93\xdb\x0f\x1f\x5e\xbf\xf4\xcc\x30\x0f\x3f\x12\xcf\xeb\x8e\xe9\xe3\x2f\x1a\x00\x2f\xe1\xe9\xb7\x16\xbe\xd7\x2d\x32\x45\x57\x34\x2a\x8d\xe4\x4c\x43\x97\x4c\x3b\xcc\xe2\x03\xa6\x4f\x77\x80\xed\x24\x6c\xb4\x21\xb8\x43\xd4\xac\xb5\xdd\x75\xa8\xf4\x7b\xee\x37\x28\x10\x56\x84\x76\x89\xcc\x02\x11\x68\x44\xdc\x73\x28\x15\xe1\xbe\x68\xf6\x03\xc4\x70\x0e\x57\x8b\xab\x97\x2f\xdf\xbf\xba\xb9\x59\xbc\xbd\x7a\xf3\xca\x9d\xea\xbe\xd2\x54\xd7\x4f\xa1\x4d\x8e\xa7\x0f\xec\xa9\xda\xf0\x5e\xc1\x0f\x5f\x2a\x6f\x50\x61\xdd\x6b\x2f\x3b\xf1\x3d\x24\x23\x3b\xb9\xe1\xea\x96\x6e\x51\x2a\xb2\xdd\x5d\xc2\x87\x9f\xe9\x97\xf4\x55\x82\xc4\x1d\x58\x53\xd0\x20\x6a\xab\x43\x04\xf7\xcc\x19\xd4\x43\xd4\x27\xce\xf2\x1d\x66\x31\xbb\xc9\xb3\x18\xef\xda\xa0\x5e\xe6\xc0\x70\x1f\xfe\x35\x7b\xe2\x44\xf6\xbf\x46\x3e\x01\x85\x77\xfd\x5d\x47\x1b\x78\x83\x6a\xc3\x5b\xab\x9e\x61\x6c\xc3\x85\x3f\x0c\xce\xcf\xcf\x3d\x28\x7e\x9b\xf9\x2e\x2c\xd1\x3e\x05\x9c\xc3\xb5\x77\x2a\xec\x23\xb2\xd6\xb9\x15\xea\xa8\x67\xa1\x35\x7a\xcd\xbc\x2e\x0a\xa3\xe6\xaf\x0c\x57\xdb\x6b\xa5\x77\x66\x24\x8a\x7b\x73\xb4\x0c\xdc\xd7\xa4\x9e\x61\x22\xee\xee\xf6\x05\xbc\x4f\x5d\x16\xe3\xad\x09\x94\xbc\x17\x0d\x46\x0e\x36\xfc\x19\x39\x9c\x74\x9d\xb9\xc5\xb1\xaa\xe4\x1a\xcf\x6d\x2f\x95\x31\x2e\xe4\xde\xd8\x96\x80\x9f\xb4\xf0\xc3\x1d\xae\xb4\x83\x62\xb5\x57\x2f\xb1\xd5\x17\x5a\x7f\x8d\x94\xce\xda\x22\xc3\x34\xe5\x8e\x55\xcf\x9c\x07\xa7\x31\x9e\xce\x2e\xe1\x27\x83\xfa\xd7\xf0\xc8\x02\x55\x2f\x18\x3c\x3f\xf7\x9e\x9e\x5d\x68\x7e\xff\x16\x5f\xed\x47\xfd\x6a\x63\xde\x9c\x96\xbc\x28\x8f\xd1\xa3\xd3\x8f\x9a\xd9\xf7\xfc\x1b\xa3\x3f\xb5\xcb\xb7\xa7\x72\x13\x50\x1b\xbc\x98\x7e\x59\x4b\xcf\x62\xab\x7f\xa1\x35\xbd\x47\x56\x5e\xa4\x06\x0a\xc2\x18\xf7\xec\x14\x2a\x81\x74\x02\x49\xfb\xe0\x8d\x51\x6e\xce\xf5\x25\xc6\xfd\xbf\xc3\x60\xa5\x16\x85\xa5\xd8\x92\xcf\xe6\x75\x9c\xbf\xe0\xb1\x68\xed\x6e\x81\x12\x95\xb3\x10\x96\xad\xa4\xb1\x00\x0e\x76\xa2\x02\x30\x87\xdf\x2f\xa7\xb8\xc6\xea\x12\x9e\x5a\x4f\x59\xa3\x1b\x14\x7c\x66\x12\x66\xc9\x13\xef\x04\x26\xff\x32\x3a\x0e\xbb\xd5\x82\x4a\x27\x37\xef\x50\x50\xde\x5e\x35\x8a\xde\xa3\x66\x91\x89\x17\xe1\x9d\xf9\x01\x36\x44\x82\x89\xc7\x26\xe1\x90\x6f\xe1\x6f\x85\xeb\x09\x4b\x7b\x78\x8b\x82\xde\xe3\xb5\xfd\x21\x91\xc9\xa9\xc7\x39\x78\x71\x1a\xa1\x85\x7b\xa6\xe9\x6c\x1e\x88\xf2\xd6\xe0\xa6\x31\x9c\x85\xcb\xe8\xca\x9e\x5e\x38\x85\x1f\xf3\x33\x3e\xc1\x72\xa9\x3d\xb9\x02\xe9\x8b\x0b\xf8\x99\x0a\xa9\x40\xd1\x2d\xc2\x1e\x9f\x09\xd4\x1e\xbf\x46\xb4\x09\xa6\x6a\x25\xf8\xd6\xca\xb5\x97\xd7\x73\xa0\x4c\xa2\x50\xce\xb5\xb2\x5f\x0e\xb8\x7b\x48\xde\x02\xc6\x85\x3d\x65\xfa\x19\x1f\x86\x38\x7f\xd4\x47\x7c\x9a\x95\xe0\x06\x35\xc9\x70\x0f\x8e\x96\x96\xcb\xb4\x6a\xc8\x3c\x99\x36\x87\x20\x79\x15\x2d\xda\x06\x20\x2b\xdf\xee\x18\xc7\x47\x9b\x84\x8d\x6c\xa4\x65\x99\x48\xff\xef\x6c\x88\x93\x57\x83\x4e\x49\x2d\xb4\xf6\x9a\x3e\x3f\x77\x37\xcd\x41\xf1\xcb\x94\x19\xf2\x13\xac\xa6\x19\x61\xa1\x8b\x0b\xf8\x07\xea\x48\x5a\x62\x22\xcb\xe9\x5b\x64\xb6\xde\x69\xc6\x73\x68\x36\xd8\x7c\xd6\x3c\x71\x58\xb0\x53\xee\x31\x74\xf1\x3e\x12\x6b\xf1\x8b\xe7\xd7\x23\x1c\x75\xb6\x58\x69\xd6\x31\x5b\xa6\x7c\xe5\xf8\x72\xc8\x60\xb7\x07\x21\x81\x73\xaf\x4a\x82\x8e\xa9\xbe\xda\x72\x9c\xe2\x77\x5c\x08\xbe\x7f\xfe\xd4\x3d\xe3\x5f\xa7\x9a\x48\x07\x88\xae\x3f\x2f\x5e\xc0\x8e\x30\xda\x4c\x27\xd7\xbc\xef\x5a\xe3\xdb\xda\x73\x00\xbf\x50\x6b\x5e\x3d\x77\x19\x9a\x7b\x1b\xa4\x15\x55\xe1\x2b\x4f\xf2\xe3\xdd\xbd\x0b\x87\xd6\x35\x6f\x71\x5a\xe3\xa0\x43\xef\x9f\x08\xa6\xf3\x7f\x8a\x54\xc8\xb9\x7e\xfe\x61\x66\xc0\x5a\x61\x84\x8e\x4a\x93\x01\x89\xcc\xe3\xe0\xd6\x28\xe8\xb7\x7c\x72\x48\x36\x87\xaf\x4d\x76\x3b\x64\xed\x34\xd7\x3e\x87\x44\xe0\x71\x12\x56\x91\x98\xc4\xee\xbe\xc7\x2d\xbf\x77\x16\xb0\x8c\x9a\xad\x21\xb4\x42\x12\xe9\x86\xec\x9e\x0a\xce\xb6\xc8\x8e\xd8\x15\x17\x3b\x1d\xb7\x2c\x7f\x9a\x2d\xd9\xe5\xae\x89\xfe\x9c\x25\xc7\x63\x3b\x25\x35\xab\x11\x09\xac\x2f\xbd\x4e\x44\x50\x2a\xea\xdd\x96\xaa\x01\xf3\xaa\x65\x59\x9c\x7b\xd4\xf0\xb8\x95\x15\x8b\x53\xe5\xf8\x44\xd0\x75\xdc\xe7\x85\x5d\x98\xc7\xbe\xc9\xee\x88\x28\xbb\xbf\x64\xb8\x3e\x19\x97\xf3\x77\x82\xdf\x75\xb8\x85\x16\xa5\x12\xfc\x21\x3a\x29\x5e\xce\x13\x31\xd6\xc1\xfa\x91\x10\x15\xca\x30\x35\xf9\xc7\x3c\x5b\x35\x00\x36\x3f\xc3\x70\xfe\x64\x52\x7e\x3b\x8c\x59\x8d\xa4\xe4\x27\xbb\xa8\x35\x84\xfc\xe1\xd7\x5c\x66\x6c\x10\xe2\x42\x97\xff\x45\xa5\x50\x0c\x63\x90\xf7\xe6\x61\x64\x4c\xb0\x1c\x4f\x1a\x85\x44\x50\x55\xa6\xee\x29\xee\x8d\x60\xad\x51\x65\xf1\x98\x96\x03\x17\x78\x0d\x1d\xef\xc0\x56\x61\xf9\x50\x05\x58\x60\xf7\x1b\x54\x1b\x14\x99\xb0\x3b\xa9\xd2\x9a\xb2\x17\x02\x99\xea\x1e\x0c\xa5\xee\xf1\x38\x98\x55\x99\xfd\x1b\xe7\xdd\x29\x80\x7a\xa6\xff\xd7\xbf\x34\xca\xd7\x16\x80\xbf\x69\x4a\x4e\x67\x0b\x47\xcb\xe7\xcb\x91\x8d\x67\x35\x14\x95\xd0\xc1\xee\xd0\xa0\x47\xe4\x5c\xae\xee\x54\xec\x52\x95\x71\x95\xcb\x8f\xd3\x6d\x47\xd1\x1d\x13\xf7\x17\x0b\x0d\x1d\xa1\x4c\x5a\x13\xa1\x45\x6f\x45\x3a\x89\x8f\x47\xcc\x85\x09\xd8\x1a\xdf\x52\x93\x95\xae\x80\xaa\x67\x36\x15\xf5\x1d\x68\xff\xdd\x1f\x74\x1a\xe6\x35\x96\x74\x4c\x1c\xb1\xb7\x5a\xe1\xb0\x3a\x7a\xb1\x48\xef\x37\x64\x61\x2e\x4f\x3a\x46\x94\x8d\x4d\x0b\x99\x5c\x67\x88\x2d\xdb\xd4\x03\xcc\xa2\x3c\x1f\xcb\x9d\x2c\x81\x11\x78\x1d\x4c\xc8\xe9\x8a\x8b\xab\x82\x26\xb3\x98\x98\x39\x91\x07\xe2\x21\x9f\x34\x7e\x1f\x3f\x1d\x42\xaf\x34\xd9\x69\xdd\x62\x1c\x3b\xfb\xfc\x64\x7b\x20\xa8\xaf\xa3\x69\xfc\xaf\xa3\xcf\x6e\xff\xf2\x07\x3f\x7c\x70\x66\x2b\x94\xc8\x4f\x03\xa9\x44\xdf\xa8\x5a\x18\xef\x59\xdf\xa4\x17\x4f\xe6\xfd\xa3\x90\xd7\x08\x92\xaf\x4f\x09\xf3\xbb\xa3\xdb\x40\xac\x23\x61\xed\x1f\xe3\xfa\x8f\xfa\x1f\xc1\x49\xd7\x4a\x3a\xa7\x4c\x04\xe1\x1b\x60\x27\x4b\xd7\xce\xed\xf7\x22\x0c\xc1\x87\x19\x79\xe3\xb4\xbc\x33\x22\xcb\x59\x08\x87\x27\xca\xf0\x55\xd7\xe5\x0f\xaa\x7d\x53\xa9\x4d\xd4\xc7\x20\x82\x27\x09\xed\xe2\x33\x3e\xc8\x2a\xe4\xd0\x52\xe3\x5c\x10\x51\x85\xbe\x2e\xaf\x8f\xc4\xc4\x48\xea\xb8\x3e\xfa\x6a\xf9\xd2\xf3\xe7\xb7\x92\x1d\x53\x95\x56\x0b\x5f\x13\x25\x95\x72\x59\xb1\xb7\xee\xb3\xc2\xd7\x6f\x15\xb7\xd5\xdf\xa4\x3d\xb9\x01\xa4\xcb\x74\x9f\x26\x97\x89\xd1\x92\xea\x93\xb9\xf8\xac\xb8\xd2\xb1\xbf\xf3\x50\x97\x27\xaa\xa1\x88\x62\xa6\x89\x8a\xb3\xf5\x27\x82\xfc\xd1\xe5\x4b\x4d\xba\x05\x96\x3e\x7d\x3a\x08\xc4\xc7\x90\xf7\xec\x15\x0e\xab\xf2\xd3\x98\x25\x33\x75\xfa\x2d\xd9\xed\xb4\xd7\xa6\x99\xcc\x69\xfb\xa2\x30\x3a\x52\x11\xfd\x6e\xd6\x32\x02\x32\x52\x25\x3d\x4d\x54\xea\x52\x92\xe8\xb9\x3c\x09\xe5\x73\x07\xae\x62\xb9\xe2\x62\x7b\x19\xf6\x9b\x3f\x9d\x0a\xbb\xb0\x51\x72\x59\xa8\xfe\xcd\x55\x76\x7e\x7b\x7b\xf5\xe6\x55\x1d\xd7\xd3\x95\xee\xd5\xb8\xd2\x4d\x0c\x60\xc4\x24\x17\xae\xa4\x0a\xe5\xf8\x70\x00\x6d\xc6\x28\xda\x0f\x6c\x88\x9a\x3a\xab\xe0\x0a\xf5\xb3\xd1\x35\x05\x98\x0b\xc5\x2d\x40\xd3\xd9\xf8\xfa\xef\x39\xf3\x6d\x66\x4f\xdc\xf3\xa6\x34\xa2\x49\x70\x15\xff\x5e\x8b\x1f\x63\x9e\xc8\x12\x3d\x3c\x71\x4a\x39\x2d\xdf\x99\x2a\x9c\x8c\x44\x62\x7f\xda\x47\xc7\x77\x8f\xbc\x56\xdb\x7f\xeb\x8f\xc8\xef\xdf\xfb\xf8\x6b\x7f\xcf\xc7\x44\xb3\xee\xe2\xc3\x9f\xf0\xc2\x95\x0a\xa8\xfd\xfd\xc8\x21\x59\xe8\xbc\x13\x28\x91\x29\xeb\xd6\x89\xd8\xad\x40\x0e\x16\x8c\xad\x30\x12\xca\x7c\x79\x5e\x2a\x22\x14\x3c\x4d\xda\x17\x4c\xfa\x4f\xbb\xbf\x84\x3d\xb8\xfa\x69\xb8\x36\x57\x8c\xa6\x9c\x93\x94\xc1\xf6\x24\x24\xfc\x5c\x0f\x84\x3d\x3d\x9c\x48\x6d\x18\xd5\x51\xa9\x6c\xb9\xad\x28\xcf\xce\x81\x2a\x59\xb4\x46\xd8\xe2\x9d\x89\xfc\x1b\xce\x24\x6d\x51\x60\x0b\xb2\x37\xba\x69\xd5\x77\x55\xed\xec\x7c\xdb\x0a\xc1\x13\x8d\x63\x5a\x56\x7c\x09\x39\x36\x19\xc4\x8e\x36\x5f\x8b\x36\x08\x9a\x16\x86\xb0\xb7\xec\xcf\xf1\x4b\x7d\x25\xfa\xf4\x4b\xfc\x13\xee\xd1\x34\x44\xb9\xd7\xa8\x5e\x14\x56\x8c\xde\x14\x93\x38\xa1\x83\x25\x1a\x41\x73\xb9\xa5\x7c\x5a\x16\x6b\x7b\xe1\x99\x22\x30\x50\xfe\x14\x63\x70\xd4\x0b\xec\xd1\xe3\x61\x54\x4d\x4b\xc2\xcc\xeb\x3b\x4b\xe7\x61\x24\x1f\x09\x21\x85\xec\x9f\xe6\xb9\xb3\x13\x91\x2c\x93\x1b\xff\x9b\xaf\xf2\xba\xfe\xc5\x1d\x91\x6a\x52\x71\x34\x86\x07\x2f\xc3\x9b\x0e\x17\x45\xa1\x59\x8e\xe4\x5e\x94\x7f\xee\xe1\xc6\xb2\x35\x63\x59\x52\xa3\xe2\xe9\x1f\x54\x2d\xb9\x8b\x56\xd7\x28\xe3\x6a\x24\x16\xd9\xb5\xa0\x9a\x2f\x84\x40\xb9\xe3\xac\xb5\xb5\xb9\xf6\x40\x2c\xec\x64\xad\x88\x2e\x73\x11\x73\x06\xb7\xe4\xc7\xbc\x2e\x50\xb2\x57\x19\x34\x66\x27\x6a\x73\x5b\x1e\x57\x3d\x29\x0d\x36\x73\xa9\x1c\x69\x68\xb4\xad\xad\x89\x3b\x5a\x36\x68\xa5\x45\xde\xaa\x8c\xfb\xfa\x35\x91\x36\xbd\x99\x36\x8f\x8c\x1d\xaa\x17\xb9\xac\x6f\x90\xea\x5c\x8a\x0e\xc7\xd0\xf5\xda\x73\x60\xbc\x98\x62\x27\x05\x41\xc3\x12\x13\x2c\x2c\x2b\xe5\x54\x83\xd0\x72\x58\x33\x33\x3f\x26\xf0\x9f\x28\x10\xdf\x9e\x64\xc4\xf3\x49\x2b\x19\x15\xa4\x6d\x58\x0a\xcc\x62\x2a\x65\xd2\xf7\x16\x28\x22\xd6\x91\x49\x16\xe9\x59\xe3\x44\xf6\x4e\xac\x3d\x66\x24\xcb\x0a\xd1\x6f\xd3\x4e\xbd\x8d\xfd\xa7\x29\xe9\x66\x8b\xa0\x49\x17\xd6\x0a\x86\x24\x64\x20\xdf\xac\x86\xe0\x0d\x0a\x4a\x3a\xfa\x7f\xae\x94\x54\x26\x9b\x80\x32\x1d\x89\x68\x71\x72\x01\x8a\xf7\xe4\xe1\x87\x2f\x69\x2f\xd6\xe9\x98\x46\xf7\xd6\xf3\xc5\x38\xb6\x29\x8a\x89\x4f\xec\x3d\xdc\xc9\x62\x32\xcb\x3c\xe2\x53\xd1\x34\xc4\x69\x94\xc5\x8c\x9a\x8a\xa0\x01\x22\x71\xf1\x53\x34\x8f\xb5\x9c\x75\xa4\xf9\x2c\x7d\x7f\xd9\x49\x04\x88\x17\x55\x49\x60\x0c\x37\x61\xf2\x87\x50\x87\x1e\x21\x84\xec\x68\x83\x2e\xd9\xf3\xe3\x1c\xfa\xdd\x2d\xbf\xac\x2e\xee\x90\xad\xcb\x1a\xb0\xbe\x65\x67\x62\x17\x58\xc2\xe4\x6a\x32\x4a\x5a\x03\x45\x46\xf5\xb1\xc7\xb2\xc7\x9c\xfe\x1e\xc3\xda\x45\x5a\xd4\x75\x11\xff\x8e\x48\xd3\xdf\x34\xe8\x76\x4d\x9c\x47\xef\x2e\x38\x3f\xc1\x71\xbe\x6b\x7d\x58\xe4\xca\xd9\xf4\xe6\x98\x74\x3c\x34\x26\x90\xd9\x22\x61\xa9\xc3\xb1\x21\x92\x3d\xd3\x86\x79\xdd\xb3\x79\xa6\x2e\xf5\xd7\x94\x35\x5d\xdf\x5a\x37\xd1\x82\x62\x20\xe0\x22\x3d\x22\x71\x4f\x4f\x63\x86\x34\x2f\x3e\x2a\xfc\x71\x10\xc2\x69\xee\x88\xa3\x73\x1f\x2a\xc4\x31\x42\xdc\xd2\x56\xc3\xae\xc1\x1a\xcb\xad\x1c\x68\xeb\x85\x65\xbd\xa1\xee\xd0\xb6\xa1\x5f\x94\x0a\x74\xaa\x91\x9f\x1f\xba\x3e\xfa\x3b\x83\xf3\xf4\xe7\xe9\x53\x38\x3b\xb4\xbb\xf0\x5e\x0a\x95\x98\x8a\xe0\xec\x80\xe3\xe5\x20\x8f\x25\x9c\x51\x56\x36\x2d\x0e\xa3\xd9\x6c\xd7\x2d\x66\x3a\xe1\x88\x16\x36\x7e\x4f\x5b\x9f\xb3\xae\xf0\x87\x97\x02\x5b\x8c\x4f\x1b\x28\x7e\x3b\x6e\x4d\xff\x70\x6b\x08\xa7\xfa\x7a\xfa\xf3\x4b\x70\x9c\x8e\x78\x79\x37\x28\xee\x51\x56\x1a\x2c\x89\x69\x8d\x44\xf1\x4c\x0e\x72\xa9\x4e\x86\x6f\x36\x46\x7c\xd3\x36\x49\xdf\x9a\x62\xc2\x44\x43\x48\x90\x64\x85\xeb\x9e\x88\xd6\x8e\xc3\xc4\x16\xc4\xb5\x20\xda\xbf\x74\xcb\x14\x4f\x06\x6b\x1c\x7f\x9b\x30\x72\x18\x63\x9a\x5c\xf5\x9e\xca\x8d\x6d\xea\x6b\xb1\xc3\xb5\x2d\x5a\xb8\xd6\x14\x0e\x84\x71\xa3\xd0\x7c\xdb\xe6\x14\x17\xeb\x05\x6c\xfb\x4e\x51\x49\x63\xb7\xaa\x44\xd5\xef\x00\x19\xb9\xb3\x3d\xa0\xd0\xe2\x3d\x76\x7c\x87\xb1\x03\x3a\xb4\x75\x72\x66\xcc\xd4\x1d\x6e\x48\xb7\x9a\xe9\x88\x14\xa4\x25\x40\x98\xc1\x79\xf7\xfe\xf5\xdf\xaf\x6e\x5f\xd9\xf6\xd5\x86\xec\xc8\x1d\xed\xa8\x7a\x30\xd4\xd8\xf5\x77\x1d\x95\x1b\xbd\xcd\x35\xc5\x08\x6c\x90\xde\x27\xcd\xb3\x75\x37\x3a\x34\xb1\x16\xdd\xa1\x65\x15\x27\xac\xe3\x7b\x96\xbe\xdc\xe9\x8a\x30\xf4\x56\x04\x57\xf2\x80\x5b\x60\x6e\x79\x11\x7c\xc7\x98\xa0\x32\x60\x52\x09\x3d\xd3\x4b\xda\xb3\xc9\xec\xb1\xbc\xec\x32\x5b\x27\x06\x2d\x0e\x7b\x23\xe5\x26\x01\x2a\x61\x87\x3e\x4e\xc9\xac\x9a\xb4\xd3\x47\xa3\x65\xaf\x05\xfc\xca\x02\x33\x0d\xba\x79\x7d\x9d\x21\x5c\xbb\x0a\xcd\x51\x73\x7d\xa2\x4b\xc5\xf9\xe6\x54\xcb\x1c\xb6\x6c\x6c\x40\x6a\x87\x83\x64\xa1\x7d\xf9\x8a\x3d\xb8\xa4\xc8\xa0\x91\xd7\xcc\x6a\xd1\x90\x73\x86\x2d\x69\x11\xc8\x9a\xd0\xd8\x0e\x2d\xb5\xa7\xe8\x0f\x4d\x0c\x67\x18\xcf\xcb\x21\x0b\x6d\xb3\x70\x25\x4d\xaf\xaf\x44\x9c\x67\x2b\xa9\x84\x2d\x0a\xec\x1e\xc2\xad\x61\xf4\x2f\xcb\x30\xeb\x5b\xe6\x40\x06\xae\x83\x0c\x77\x85\x81\xb8\xbb\x87\x72\xe2\x2d\x9d\x0b\x74\x93\x71\xce\x8d\x0f\xb7\xa6\xd1\x57\x18\x06\x3c\x41\x5a\x3c\x1e\x5f\x07\x71\x5d\x56\x24\x75\xed\xa2\xed\x20\x66\xb4\x8c\xe4\x71\x70\x51\xda\xa2\x14\xa0\x38\x0c\xe5\x66\xf3\xca\x80\x3b\x0f\xd5\xc6\x17\x0d\x72\x1b\x83\x46\x2e\xfd\x71\x05\x91\x18\xa5\x4c\x6e\x6d\xa4\x13\x20\x6e\xfd\x74\x8c\x59\x73\x34\x9b\x11\x8a\x3a\x7d\x92\x1b\xa8\xfb\x89\x63\x35\x73\x77\x84\x63\x32\xe3\xac\xf3\x55\x55\xb4\x4e\xd7\x44\x23\xe5\xd0\x92\x68\x07\x54\xd3\x31\x7c\x12\x67\x61\xb4\x98\x18\xfa\xe6\x6d\x0a\x7d\x6c\xb0\xf1\x91\xee\xc3\x51\xe7\xc1\x3d\x72\xb9\x27\x77\x90\x4e\x6c\x0b\x83\xb2\x35\xcc\xde\xd0\xd3\x76\x3e\x58\x17\x72\x08\x29\x14\xa3\x8d\x62\x10\x9a\xc5\x8c\xe4\x8f\xfc\x36\x6c\x19\x4b\x0f\x1d\xb6\x8f\x41\xda\x42\xe6\x07\xc8\xb2\x15\x8f\xb6\x20\x66\x32\xf2\x24\xfb\x61\x56\x46\xed\x61\xa6\x9b\x77\x49\x54\x33\x32\xfa\x73\x5c\x07\xd9\x43\xbf\x96\x71\xb0\xcb\xcf\x9f\x34\x0d\x59\x8e\x42\x1e\x95\x21\x33\x96\x50\x76\xb9\x11\xe5\xee\x89\x63\x46\x27\xe9\x1c\x07\x5c\x6c\x26\xb3\x5f\x9c\xc1\x5f\xab\x6d\x65\x97\xa3\xb1\xc2\xe4\x17\x7b\x92\xcf\xba\xea\xe3\xb8\x80\xb5\x31\x90\x66\xe4\x82\xf9\x86\xab\x8c\x2e\x87\x94\x58\x2a\x06\x23\xd3\x55\xd5\xc8\x29\x7b\x4a\x37\x7c\x65\x6f\xcb\xc5\xec\xb4\x03\x60\xe9\x36\xd7\xf4\x8d\x9d\x63\xfb\xce\x92\xcc\x49\xcf\x6c\x33\xcd\x45\xd8\x25\xab\x59\xf5\x7a\x32\xfd\x51\x41\xe6\xb2\x56\x45\x19\x6a\xa1\x08\x91\xff\xdb\x50\x03\x0c\x32\xff\x45\x18\x0f\x99\x1e\x08\xef\x7f\xfa\xf0\x60\x09\x4c\x32\x20\x58\x87\x6a\x6c\x9c\xf0\x31\xd4\x3a\x8b\x65\x81\xdf\x8b\xfa\x71\x15\x18\x75\xe0\x6b\xa6\x50\x30\xd2\x1d\x1f\x14\x4c\x75\x61\x9c\xc5\xf3\x4e\x54\xd0\x68\x85\x69\xfc\xc5\xcf\x08\xe6\xb6\x79\x01\xff\x70\x7e\x93\xf3\x7a\x5d\x6a\xd6\x56\xac\x5b\xd8\x11\xb5\xf1\x9e\xf0\x20\xc4\x7b\x26\xcb\x81\xbb\x51\x6f\xcf\x7a\x5e\x71\x88\x2e\x6f\xed\x3f\x3e\x84\x75\x09\x3f\x0d\x5d\xc4\xac\xd7\xa5\xd6\xdd\x52\xef\x6f\x1f\x1f\xd1\x29\x06\x7e\x5c\xc4\xe8\xe1\xf5\x2e\xa1\xfd\xf3\x0f\xe9\xfd\x1e\xb1\xf1\x35\xe0\xf3\xb3\x2a\x66\xfd\x3b\xbb\xc0\x47\x7b\xc0\x21\x9f\x67\x4c\x22\xbb\xc3\x13\x15\x96\x2c\xcf\xe4\xf8\x14\x8c\x66\x3d\x91\xf8\xa7\xa6\x63\xdf\x39\xf2\xb6\x63\xbf\x8d\x2d\x30\x22\xb6\xee\x86\x1b\x5d\x5e\x71\xc5\x7b\xa6\x63\xa1\x4e\x72\xb7\x4f\x8e\x0c\xb4\x64\xf3\x1c\x69\xa5\xce\x35\x0f\x1d\xe1\xd3\xc3\x23\x04\xb5\x06\xc8\x61\x77\xfa\xc9\x83\x52\xbe\x25\x7a\x7c\x42\xea\x2c\x1c\x78\x64\xb3\x85\x7b\x4a\xd4\x65\x7e\xed\x2c\x31\x52\xee\xe9\x0c\x75\x7c\xee\xe0\x18\xb9\xec\x53\x98\xb1\x13\xc6\x87\x6d\x59\x02\xb7\x69\x80\x9b\x36\x29\xc6\xa0\xea\xc8\xec\xc7\x99\x4b\xba\x6b\x0f\xe6\x87\x31\x7f\xbb\x6c\x46\x74\xb8\x9a\x49\x40\x5f\xdb\x29\x34\x2f\x14\xd1\x86\x1b\xe4\xf0\xf2\x7c\x7c\x26\x24\x61\xf8\x97\x76\xaf\xcc\x22\xef\xa0\x6c\x0f\x68\xcd\x03\xda\xb2\x26\x14\x31\xab\x65\xce\x34\x17\x27\xe2\x61\x1f\xc3\x44\x8e\x95\x8e\xde\xc8\xc9\x35\x94\xbf\x93\x87\xff\xec\xe6\x5d\x3f\x6d\x59\x76\xef\x76\x9c\xb4\xcf\x7f\x3a\xbd\x77\x77\x38\x22\x94\x2a\xde\x6c\xa9\xa3\x54\xa6\xf0\x0a\x26\x4a\x4e\xaa\x73\x5a\xd1\xaa\x6f\x92\x09\x29\x58\x79\x43\x1a\x2c\x61\xf2\xdb\x24\xff\xb1\x18\xc0\x87\x65\xd6\x83\x36\xf0\x49\xd2\xa6\xb4\x49\xcd\xe3\xd1\x67\x4e\x2a\x3d\x71\xd9\xd7\x9e\xe2\xc3\xaa\x58\xee\xd2\xcd\x0e\x35\xba\x19\x67\x23\x01\x7a\x52\x8c\xff\x95\xff\x37\x38\xb0\x8c\xdd\x8d\x35\x0c\x92\x00\x31\xe4\xef\xcb\xae\x42\x4d\xcd\xda\x7e\x3f\xb3\x95\x61\xf1\x3d\x5d\x82\x27\x93\x67\x4c\x5d\xe5\x4d\xbd\x63\x53\x40\x59\x83\x78\xa8\x40\xd4\x5d\x7a\xbd\x3c\x5f\x5f\x9b\x2b\xb6\x5e\x8c\xa1\xdf\xd4\x0d\x4b\x8e\xbe\x82\xd7\x79\xdf\x9e\xfc\x27\x00\x00\xff\xff\x90\x8a\xac\x96\x50\x4c\x00\x00" func migrationcontractstagingCdcBytes() ([]byte, error) { diff --git a/lib/go/templates/internal/assets/assets.go b/lib/go/templates/internal/assets/assets.go index b4a7c5e..8e7f9ab 100644 --- a/lib/go/templates/internal/assets/assets.go +++ b/lib/go/templates/internal/assets/assets.go @@ -24,6 +24,9 @@ // transactions/coordinator/set_block_update_boundary.cdc (438B) // transactions/delegatee/execute_all_delegated_updates.cdc (770B) // transactions/delegatee/remove_delegated_updaters.cdc (634B) +// transactions/dependency-audit/admin/add_excluded_addresses.cdc (364B) +// transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc (375B) +// transactions/dependency-audit/admin/test_check_dependencies.cdc (463B) // transactions/host/publish_host_capability.cdc (2.951kB) // transactions/migration-contract-staging/admin/commit_migration_results.cdc (832B) // transactions/migration-contract-staging/admin/set_staging_cutoff.cdc (629B) @@ -588,6 +591,66 @@ func transactionsDelegateeRemove_delegated_updatersCdc() (*asset, error) { return a, nil } +var _transactionsDependencyAuditAdminAdd_excluded_addressesCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8f\xbd\x4e\x2b\x31\x10\x85\xfb\x7d\x8a\xb9\x5b\xe4\x7a\x9b\x7d\x80\x15\x62\x65\x7e\x7a\x24\x24\x1a\x44\x31\x78\x86\xc4\xd2\xae\xc7\x1a\x8f\x05\x08\xe5\xdd\x51\x70\x12\x21\x8a\xb8\x3a\xc5\xf1\x99\xef\x8b\x6b\x16\x35\xe8\xef\x38\x73\x22\x4e\xe1\xd3\x57\x8a\xd6\x77\x9d\x29\xa6\x82\xc1\xa2\x24\x87\x44\xca\xa5\x70\x99\xe0\xd9\xb7\xfc\x32\xc0\x57\x07\x00\x90\x95\x33\x2a\xbb\x12\xb7\x89\x75\x02\xac\xb6\x73\x37\xa2\x2a\xef\x4f\xb8\x54\x1e\x60\xe3\x43\x90\x9a\xec\xf4\xe3\xf0\x5a\x7b\x2c\x26\x8a\x5b\x1e\x5f\x7f\xfa\x57\x9b\x3f\x18\xa3\xa7\x35\xa6\x58\x4c\xd1\x44\xaf\xdd\x9b\xca\x3a\xc1\xc5\xd2\x63\x5b\x7c\x40\xdb\x0d\xf3\x88\x44\xf7\x1f\x61\xa9\xc4\xe4\x4f\x0e\xbf\x6d\xce\x71\x38\x93\xcd\x33\x64\x4c\x31\xb8\xfe\x56\xea\x42\x90\xc4\xa0\xe1\x5d\x3e\x0c\x07\xb8\xa3\xd7\xff\x02\x47\xb3\x7f\x7d\x5b\xde\x77\xfb\xee\x3b\x00\x00\xff\xff\x6d\xfb\xa6\x63\x6c\x01\x00\x00" + +func transactionsDependencyAuditAdminAdd_excluded_addressesCdcBytes() ([]byte, error) { + return bindataRead( + _transactionsDependencyAuditAdminAdd_excluded_addressesCdc, + "transactions/dependency-audit/admin/add_excluded_addresses.cdc", + ) +} + +func transactionsDependencyAuditAdminAdd_excluded_addressesCdc() (*asset, error) { + bytes, err := transactionsDependencyAuditAdminAdd_excluded_addressesCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "transactions/dependency-audit/admin/add_excluded_addresses.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xca, 0xc7, 0x29, 0xa9, 0x25, 0x5f, 0x20, 0x67, 0x78, 0xdf, 0x13, 0x90, 0xbc, 0xec, 0x51, 0x9f, 0x3c, 0xd9, 0xbd, 0x2c, 0xfa, 0x19, 0x3c, 0xd2, 0x6f, 0x31, 0x7c, 0x86, 0x45, 0x5f, 0x62, 0x93}} + return a, nil +} + +var _transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x8f\x41\x4b\xc4\x40\x0c\x85\xef\xfd\x15\xb1\x87\x75\x7a\xe9\x0f\x28\x62\xe9\xea\xdd\x05\xd1\x7b\x9c\x89\xed\x40\x9b\x0c\x99\x0c\x22\xb2\xff\x5d\xba\x5d\x17\xf5\xb0\xb9\x25\x79\xef\xf1\xbd\xb8\x24\x51\x83\xfa\x91\x12\x71\x20\xf6\x9f\x43\x09\xd1\xea\xaa\x32\x45\xce\xe8\x2d\x0a\xbb\x3c\x49\x99\xc3\x01\x39\xfa\x0e\xf6\x22\x73\x03\x5f\x15\x00\x40\x52\x4a\xa8\xe4\x72\x1c\x99\xb4\x03\x2c\x36\xb9\xbd\xa8\xca\xc7\x2b\xce\x85\x1a\xd8\x0d\xde\x4b\x61\xfb\x71\xac\xb3\xa9\xdb\x6c\xa2\x38\x52\xfb\x76\xd2\xdf\xed\xfe\x31\xb4\x43\x58\x22\xc7\x6c\x8a\x26\x7a\xef\xde\x55\x96\x0e\xae\x8a\x9e\xb7\xc4\x03\xda\xd4\xf4\x6d\x26\x3b\x21\x3f\xf1\x0b\x67\xc3\x91\xc2\xc5\x1c\x29\xff\x2d\xf5\x6b\x69\x2e\x9c\x7d\x0f\x69\xbd\xb8\xfa\x61\xfd\x02\x8b\xc1\x06\x7b\x1d\x03\x56\xd4\x73\xcb\xdb\x0c\xe7\x9e\x37\xf5\x96\x7c\xac\x8e\xd5\x77\x00\x00\x00\xff\xff\xa4\x32\xd6\x10\x77\x01\x00\x00" + +func transactionsDependencyAuditAdminSet_unstaged_cause_panicCdcBytes() ([]byte, error) { + return bindataRead( + _transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc, + "transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc", + ) +} + +func transactionsDependencyAuditAdminSet_unstaged_cause_panicCdc() (*asset, error) { + bytes, err := transactionsDependencyAuditAdminSet_unstaged_cause_panicCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x41, 0x2a, 0x20, 0x60, 0x49, 0x17, 0xc6, 0xaf, 0xd7, 0x32, 0x8c, 0xef, 0x2a, 0x74, 0x1d, 0x95, 0xda, 0xdf, 0x58, 0xea, 0x81, 0x60, 0xee, 0x68, 0x21, 0xee, 0x74, 0x3d, 0xb0, 0xc5, 0x39, 0x62}} + return a, nil +} + +var _transactionsDependencyAuditAdminTest_check_dependenciesCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x7c\x90\xc1\x4a\xc3\x40\x10\x86\xef\x79\x8a\x31\x87\x9a\x40\xc9\x03\x04\x31\xc4\xf6\x2c\x42\xc1\x8b\xf4\xb0\xee\x8e\xc9\x62\x33\x13\x66\x26\x88\x4a\xdf\x5d\x9a\xa4\x12\xa5\x74\x4f\x0b\xf3\xcd\xf0\x7f\x7f\xec\x7a\x16\x83\x74\x8b\x3d\x52\x40\xf2\x9f\xf5\x10\xa2\xa5\x49\x62\xe2\x48\x9d\xb7\xc8\x94\x85\xf3\x34\xa2\xd6\x21\x08\xaa\xa2\x96\xf0\x32\xff\xf7\x6b\x58\x12\x8f\xae\x1b\xa7\x3b\x93\x48\xcd\x7e\x0d\x6e\xb0\x96\x25\x7e\xa1\x2c\x97\x72\xf8\x4e\x00\x00\x7a\xc1\xde\x09\x66\x1a\x1b\x42\x29\x47\x3a\x7b\x60\x11\xfe\x78\x76\x87\x01\x73\x58\xd5\xde\xf3\x40\x76\xde\x38\xbd\x89\x2e\xd4\x58\x5c\x83\xc5\xeb\xc8\xdf\xad\xfe\x79\x14\x75\xe8\x22\x45\x35\x71\xc6\x72\x9f\xbd\x09\x77\x25\x5c\x85\x76\xd3\xc5\x27\x67\x6d\x5e\x15\x86\x6a\x9b\x16\xfd\xfb\x76\x21\x78\xb9\x8f\x0b\x25\xfc\x51\xcf\x7f\xb3\x57\x15\xf4\x8e\xa2\xcf\xd2\x0d\x0f\x87\x00\xc4\x06\x93\xc0\xf5\x68\x70\x8a\x3f\x9b\xdf\x2a\xcc\xee\x37\xe9\x74\xf9\x98\x1c\x93\x9f\x00\x00\x00\xff\xff\xa4\xad\xb1\xdb\xcf\x01\x00\x00" + +func transactionsDependencyAuditAdminTest_check_dependenciesCdcBytes() ([]byte, error) { + return bindataRead( + _transactionsDependencyAuditAdminTest_check_dependenciesCdc, + "transactions/dependency-audit/admin/test_check_dependencies.cdc", + ) +} + +func transactionsDependencyAuditAdminTest_check_dependenciesCdc() (*asset, error) { + bytes, err := transactionsDependencyAuditAdminTest_check_dependenciesCdcBytes() + if err != nil { + return nil, err + } + + info := bindataFileInfo{name: "transactions/dependency-audit/admin/test_check_dependencies.cdc", size: 0, mode: os.FileMode(0), modTime: time.Unix(0, 0)} + a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x49, 0x18, 0xac, 0xc8, 0xd0, 0xca, 0xcd, 0x4, 0x83, 0x86, 0xbb, 0xac, 0x9d, 0x37, 0x5c, 0xeb, 0xc7, 0xb0, 0x7b, 0xf8, 0x6f, 0x9d, 0x88, 0x27, 0x5b, 0x11, 0xed, 0xca, 0x93, 0xd, 0xe7, 0x13}} + return a, nil +} + var _transactionsHostPublish_host_capabilityCdc = "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x56\x5d\x6f\xe3\x36\x10\x7c\xd7\xaf\xd8\xb8\x40\x2a\x01\xae\xfc\x6e\x24\x17\x5c\x53\x1c\x2e\x40\x71\x08\xe0\xb6\xaf\xc5\x9a\x5a\x4b\xec\xd1\x24\x41\x52\x76\x8c\x20\xff\xbd\xa0\x44\xea\xc3\x96\x3f\xda\xd3\xcb\xf9\x9c\xe5\xce\xec\xec\x68\xcc\x9f\x50\x08\xb5\xff\xcc\x98\xaa\xa5\xfb\x9d\xcb\xef\x5c\x96\x49\xc2\xb7\x5a\x19\x07\xb3\x95\xc3\x92\x8a\x67\x25\x9d\x41\xe6\xfe\xd4\x05\x3a\xb2\xb3\x24\x59\x2c\x16\xe0\x8b\x2d\xb8\x8a\xc0\xf2\x52\x92\xf9\xd9\x42\x68\x03\x28\x0b\x20\xc9\x50\xdb\x5a\xf8\x13\xc0\x25\x20\x7c\x55\xd6\x81\x21\xab\x6a\xc3\x68\x0e\xba\x5e\x0b\x6e\x2b\x2e\xcb\xf8\xb7\x67\xd4\xb8\xe6\x82\xbb\x03\x6c\x94\x69\x5b\x6b\x62\x7c\xc3\xa9\x68\x20\x0d\x31\xae\x39\x49\x97\xc3\x1f\x15\xb7\xb0\x57\xb5\xf0\x48\xb8\x16\xd4\x94\x77\x05\xe0\x14\xd0\x1b\xb1\xda\x11\xa0\x59\x73\x67\xd0\x1c\x80\x85\x41\xa0\x6e\x27\x01\x25\xc7\x03\xac\xa9\x42\xb1\xc9\x3d\x58\xe2\x0c\x4a\x8b\xcc\x71\x25\xd3\xc0\xf5\x8b\x32\x4b\xf8\x5c\x14\x86\xac\xcd\xe0\x3d\x49\x00\x00\xb4\x21\x8d\x86\xd2\xb6\xc9\x12\xb0\x76\x55\xfa\xab\x32\x46\xed\xff\x42\x51\xd3\x1c\x9e\x95\x3e\x84\x8f\x2f\xd6\xd6\x14\x64\xea\xc7\x6d\x04\x56\x42\x90\x09\x15\x2b\xa7\x0c\x96\x34\x5d\xf1\xda\x92\x79\x91\x6b\xf5\xd6\x57\xcc\x61\x85\x3b\x6a\x60\x32\xb8\x0f\x10\x1d\x49\xff\x2c\x16\xf0\x1b\x19\xbe\x23\xd0\xe8\x2a\xdb\x68\x1c\x37\x76\x7f\xb4\x01\x4e\x76\x0e\xbc\x20\xe9\xf8\xe6\xe0\x57\x34\x56\x57\xc9\xc1\xfa\x3a\x00\x41\x0e\xb0\x9b\x2d\xcc\xf0\x8a\xae\x82\x47\x18\xfc\x2f\xed\x0e\xc4\x27\x00\x71\x2f\xdf\xb4\xe7\x7a\xc9\xfe\x9e\xe5\x4c\x49\x86\x2e\x08\x9e\x63\xbb\x8f\xdc\xa9\x95\x33\x5c\x96\x69\x96\x8d\x00\xb2\xbb\x11\xc1\x4a\xd9\xcb\xec\xae\x93\xf9\xda\xb6\xe8\x99\xf4\xf6\x18\xb2\xc8\xee\x7a\xed\x77\x68\x06\xd2\x2c\x07\x56\x7f\x68\xfc\xd2\x76\x8e\x38\xfd\x02\x3f\x3d\xc1\x23\x48\x2e\x86\x4b\x5c\x91\xab\xf5\xf0\x65\x51\x12\x6a\x59\x90\x11\xcd\xa6\xbc\x2c\xfe\x5f\x3f\x68\xc4\xec\x8e\xf3\x4d\x30\x7b\x6e\xdb\x91\x73\x77\xd0\x94\xa2\x5b\x4e\x6f\x2e\x83\xc7\x06\x1f\xde\x47\x9a\xf6\xb5\xf0\x18\x1b\xb2\x81\x77\xf2\x50\x90\x73\xef\xe6\x2b\x23\xa6\xe3\x7d\x1d\xf1\xb3\xb8\xa3\xb4\xc7\x9b\x83\x53\xe7\xb8\x76\x6d\x3e\x80\x84\xa5\x1b\x38\x47\x10\xa6\xf4\xe1\xe1\xe6\x9d\x7c\x4a\x37\x46\x6d\xaf\xb2\x88\xcf\xd3\x13\x68\x94\x9c\xa5\xb3\x17\xb9\x43\xc1\x0b\x50\xeb\x7f\x88\xf9\x2c\x74\x86\xd3\x8e\x0a\x68\xfb\x75\x7e\x9a\x6c\x3c\xb2\x56\x3f\x6a\xef\x31\xb4\x96\xcc\xf0\x30\xdc\xb5\xbb\xbb\xbf\x1f\x50\xbd\xcb\x59\x45\xec\x7b\x9a\xcd\x61\x4b\xd6\x62\x49\x4b\xe8\x88\xc5\x38\x18\x98\xab\x23\x39\xcb\x92\x53\x17\x1e\x65\xfa\xde\xa0\xd6\x31\x2e\xb4\xa1\x1d\x57\xb5\x15\x4d\xf0\x6e\x78\x59\x1b\x2a\x22\x13\x68\xec\x82\x0d\xc6\x2d\xee\x9c\x7c\x11\x73\x0f\x7f\xdd\xad\x53\x8e\x3a\xd9\xd2\xc3\x2f\x67\x30\x98\x21\x74\xf4\x8d\xf6\x1e\x2c\x1d\xbe\xc4\x03\x51\xb3\xf9\x49\x43\xef\xd3\x9b\x58\x8f\xd3\x6a\xb0\xd9\xf8\xc9\x87\x47\x88\xad\x1b\x92\xe3\x3c\xe6\x49\x98\x5c\xd0\xfb\x34\x26\x7f\x44\xdc\xa9\x88\x88\x27\x2e\x45\xc4\x85\x59\xd2\xdb\x1c\x31\xbd\x97\xd3\xe9\xae\x2e\x21\x1c\xf9\xbf\xd9\x71\x61\x92\x18\x27\x13\x92\x8f\x58\xfd\xf7\x1c\x39\xed\x38\x0e\x91\xe3\xe8\x88\x33\xf6\xb9\x11\xbe\xb9\x18\x1a\xc7\x77\xb7\x73\x89\xf1\x85\x4b\x14\xe2\x10\x6f\x0e\x4d\x46\x1c\x9f\x75\xaa\xf9\x3a\x86\x84\xab\xd0\xc1\x9e\x0b\x01\x5e\xed\xf6\x8e\xd7\x6a\x67\x92\x23\x6f\x71\x7f\x1d\xca\x43\xef\xb1\x03\xe3\x10\x63\x2f\x48\xdc\xd2\xb9\x37\xb4\x69\x16\x7e\xe6\x03\xb5\x6f\xb8\xa5\x57\x43\x1b\xfe\x76\xf9\x57\x7f\x0c\xd2\x5d\x99\x96\xd0\x97\x27\x63\x9f\x7d\x24\x1f\xc9\xbf\x01\x00\x00\xff\xff\x00\x86\x3f\x21\x87\x0b\x00\x00" func transactionsHostPublish_host_capabilityCdcBytes() ([]byte, error) { diff --git a/transactions/dependency-audit/admin/add_excluded_addresses.cdc b/transactions/dependency-audit/admin/add_excluded_addresses.cdc index a5ce411..b9089a7 100644 --- a/transactions/dependency-audit/admin/add_excluded_addresses.cdc +++ b/transactions/dependency-audit/admin/add_excluded_addresses.cdc @@ -1,8 +1,8 @@ import "DependencyAudit" transaction(addresses: [Address]) { - prepare(signer: AuthAccount) { - signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.addExcludedAddresses(addresses: addresses) + prepare(signer: auth(BorrowValue) &Account) { + signer.storage.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.addExcludedAddresses(addresses: addresses) ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") } } diff --git a/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc b/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc index ff4a452..2680820 100644 --- a/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc +++ b/transactions/dependency-audit/admin/set_unstaged_cause_panic.cdc @@ -1,8 +1,8 @@ import "DependencyAudit" transaction(shouldPanic: Bool) { - prepare(signer: AuthAccount) { - signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.setPanicOnUnstagedDependencies(shouldPanic: shouldPanic) + prepare(signer: auth(BorrowValue) &Account) { + signer.storage.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.setPanicOnUnstagedDependencies(shouldPanic: shouldPanic) ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") } } diff --git a/transactions/dependency-audit/admin/test_check_dependencies.cdc b/transactions/dependency-audit/admin/test_check_dependencies.cdc index 83b3df3..3a2ac88 100644 --- a/transactions/dependency-audit/admin/test_check_dependencies.cdc +++ b/transactions/dependency-audit/admin/test_check_dependencies.cdc @@ -1,8 +1,8 @@ import "DependencyAudit" transaction(dependenciesAddresses: [Address], dependenciesNames: [String], authorizers: [Address]) { - prepare(signer: AuthAccount) { - signer.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.testCheckDependencies(dependenciesAddresses, dependenciesNames, authorizers) + prepare(signer: auth(BorrowValue) &Account) { + signer.storage.borrow<&DependencyAudit.Administrator>(from: DependencyAudit.AdministratorStoragePath)?.testCheckDependencies(dependenciesAddresses, dependenciesNames, authorizers) ?? panic("Could not borrow DependencyAudit.Administrator from signer's storage!") } }