●●%▪!◇?$╳?^#◆%#╱&□?*╱%^!□^$#░▪●~%&□@%&▓■╲?*╲╲▒▓▪@█◆▓%□~▒○●■◆▓▒@~
Transaction ID
Execution Fee
0.000001 FLOWExecution Error
cannot find variable in this scope: `AuthAccount`
1import Crypto
2
3transaction(publicKey: String){
4
5 prepare(acct: AuthAccount) {
6 let key = PublicKey(
7 publicKey: publicKey.decodeHex(),
8 signatureAlgorithm: SignatureAlgorithm.ECDSA_P256
9 )
10Raw 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` --> 02177e538b20378e6e5f1c528ce292449c019a93e531e982f3ac1c6620390bb0:5:18 | 5 | prepare(acct: AuthAccount) { | ^^^^^^^^^^^ not found in this scope error: cannot find variable in this scope: `AuthAccount` --> 02177e538b20378e6e5f1c528ce292449c019a93e531e982f3ac1c6620390bb0:11:25 | 11 | let newAccount = AuthAccount(payer: acct) | ^^^^^^^^^^^ not found in this scope Was this error unhelpful? Consider suggesting an improvement here: https://github.com/onflow/cadence/issues.
Transaction Summary
TransactionScript Arguments
Cadence Script
1import Crypto
2
3transaction(publicKey: String){
4
5 prepare(acct: AuthAccount) {
6 let key = PublicKey(
7 publicKey: publicKey.decodeHex(),
8 signatureAlgorithm: SignatureAlgorithm.ECDSA_P256
9 )
10
11 let newAccount = AuthAccount(payer: acct)
12
13 newAccount.keys.add(
14 publicKey: key,
15 hashAlgorithm: HashAlgorithm.SHA3_256,
16 weight: 1000.00
17 )
18 }
19}