DeploySEALED
▪▓&▪╳□*╱◇○▫╲~&╳╳╳~▪^*░◇■░░^%#%╱▒▫@╲@░○●▪◆&^▪*?╳▫^■●^□▒╱&■◆▪○▫▒*█
Transaction ID
Execution Fee
0.00000499 FLOWTransaction Summary
DeployContract deployment
Contract deployment
Script Arguments
0contractNameString
BenchmarkRoot
1codeString
access(all) contract BenchmarkRoot {
// All the accounts created by this account for benchmarking purposes.
access(all) let benchmarkAccounts: [Address]
access(all) event NewBenchmarkAccount(_ address: Address)
access(all) event ExistingBenchmarkAccount(_ address: Address)
access(all) resource Administrator {
access(all) fun add(_ address: Address) {
BenchmarkRoot.benchmarkAccounts.append(address)
emit NewBenchmarkAccount(address)
}
access(all) fun getAddress(_ index: Int): Address? {
if index < BenchmarkRoot.benchmarkAccounts.length {
let address = BenchmarkRoot.benchmarkAccounts[index]
emit ExistingBenchmarkAccount(address)
return address
}
return nil
}
}
init() {
self.benchmarkAccounts = []
let admin <- create Administrator()
self.account.storage.save(<-admin, to: /storage/benchmarkRootAdmin)
}
}
Cadence Script
1transaction(contractName: String, code: String) {
2 prepare(admin: auth(UpdateContract) &Account) {
3 admin.contracts.update(name: contractName, code: code.utf8)
4 }
5 }