Smart Contract

TestRootContract

A.072127280188a611.TestRootContract

Deployed

22m ago
Feb 26, 2026, 09:45:01 PM UTC

Dependents

0 imports
1// Contract used for some acceptance tests
2access(all) contract TestRootContract {
3    // All the accounts created by this account for testing purposes.
4    access(all) let testAccounts: [Address]
5
6
7    // Administrator resource to restrict access to functions to the test root account
8    access(all) resource Administrator {
9        // Called after the test root account creates an account, to keep track of all the created accounts
10        access(all) fun createdTestAccount(_ address: Address) {
11            TestRootContract.testAccounts.append(address)
12        }
13    }
14
15    init() {
16        self.testAccounts = []
17
18        let admin <- create Administrator()
19        self.account.storage.save(<-admin, to: /storage/testRootAccount)
20    }
21}
22