TransactionSEALED
^▒░╳◆$╳▒&%▫#▫*^◇○▓!##▓╲╱█^@▒╳&@█?*╲╱~■╲▫▓█@*$▒?▪╳^▒▪●◆█░▪&◆^▪╳▓?
Transaction ID
Execution Error
Error Code: 1101
cannot find variable in this scope: `AuthAccount`
Error ContextLine 4
1import Crypto
2
3transaction(publicKeys: [Crypto.KeyListEntry], contracts: {String: String}) {
4 prepare(signer: AuthAccount) {
5 let account = AuthAccount(payer: signer)
6
7 // add all the keys to the account
8 for key in publicKeys {
9 account.keys.add(publicKey: key.publicKey, hashAlgorithm: key.hashAlgorithm, weight: key.weight)Call Stack
→
→
Raw Error
[Error Code: 1101] error caused by: 1 error occurred: * transaction preprocess failed: [Error Code: 1101] cadence runtime error: Execution failed: error: cannot find type in this scope: `AuthAccount` --> 0b0c4b14166d699ab7d80455c36bdef22ca65349b5510ab18f84a8f03e9b50a0:4:17 | 4 | prepare(signer: AuthAccount) { | ^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `AuthAccount` --> 0b0c4b14166d699ab7d80455c36bdef22ca65349b5510ab18f84a8f03e9b50a0:5:16 | 5 | let account = AuthAccount(payer: signer) | ^^^^^^^^^^^ not found in this scope
Transaction Summary
TransactionScript Arguments
0publicKeys[Crypto.KeyListEntry]
[
{
"keyIndex": "1000",
"publicKey": {
"publicKey": [
"96",
"82",
"83",
"127",
"8",
"227",
"128",
"151",
"148",
"121",
"11",
"209",
"154",
"76",
"208",
"40",
"183",
"73",
"130",
"69",
"210",
"172",
"6",
"245",
"222",
"14",
"217",
"56",
"165",
"46",
"153",
"250",
"49",
"255",
"10",
"112",
"143",
"55",
"14",
"2",
"21",
"13",
"210",
"99",
"143",
"240",
"247",
"120",
"97",
"11",
"38",
"192",
"142",
"204",
"145",
"70",
"6",
"110",
"194",
"194",
"204",
"192",
"89",
"154"
],
"signatureAlgorithm": {
"id": "SignatureAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
}
},
"hashAlgorithm": {
"id": "HashAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
},
"weight": "1000.00000000",
"isRevoked": false
},
{
"keyIndex": "1000",
"publicKey": {
"publicKey": [
"96",
"82",
"83",
"127",
"8",
"227",
"128",
"151",
"148",
"121",
"11",
"209",
"154",
"76",
"208",
"40",
"183",
"73",
"130",
"69",
"210",
"172",
"6",
"245",
"222",
"14",
"217",
"56",
"165",
"46",
"153",
"250",
"49",
"255",
"10",
"112",
"143",
"55",
"14",
"2",
"21",
"13",
"210",
"99",
"143",
"240",
"247",
"120",
"97",
"11",
"38",
"192",
"142",
"204",
"145",
"70",
"6",
"110",
"194",
"194",
"204",
"192",
"89",
"154"
],
"signatureAlgorithm": {
"id": "SignatureAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
}
},
"hashAlgorithm": {
"id": "HashAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
},
"weight": "1000.00000000",
"isRevoked": false
},
{
"keyIndex": "1000",
"publicKey": {
"publicKey": [
"96",
"82",
"83",
"127",
"8",
"227",
"128",
"151",
"148",
"121",
"11",
"209",
"154",
"76",
"208",
"40",
"183",
"73",
"130",
"69",
"210",
"172",
"6",
"245",
"222",
"14",
"217",
"56",
"165",
"46",
"153",
"250",
"49",
"255",
"10",
"112",
"143",
"55",
"14",
"2",
"21",
"13",
"210",
"99",
"143",
"240",
"247",
"120",
"97",
"11",
"38",
"192",
"142",
"204",
"145",
"70",
"6",
"110",
"194",
"194",
"204",
"192",
"89",
"154"
],
"signatureAlgorithm": {
"id": "SignatureAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
}
},
"hashAlgorithm": {
"id": "HashAlgorithm",
"fields": [
{
"name": "rawValue",
"value": {
"type": "UInt8",
"value": "1"
}
}
]
},
"weight": "1000.00000000",
"isRevoked": false
}
]1contracts{String
{}Cadence Script
1import Crypto
2
3transaction(publicKeys: [Crypto.KeyListEntry], contracts: {String: String}) {
4 prepare(signer: AuthAccount) {
5 let account = AuthAccount(payer: signer)
6
7 // add all the keys to the account
8 for key in publicKeys {
9 account.keys.add(publicKey: key.publicKey, hashAlgorithm: key.hashAlgorithm, weight: key.weight)
10 }
11
12 // add contracts if provided
13 for contract in contracts.keys {
14 account.contracts.add(name: contract, code: contracts[contract]!.decodeHex())
15 }
16 }
17}