█▓╳&@╱&▓#^◇~&○╲▫○╲~░?#▒╳╱*?○◇#▓#█╱◇■╱╱●▒╲~╱●*~%!□%▒!█╱?●^^░◆▒╲*@
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` --> 66728d64366697da00f176194d9ecee158225182d2c562a615eb073ed913b124:5:18 | 5 | prepare(acct: AuthAccount) { | ^^^^^^^^^^^ not found in this scope; check for typos or declare it See documentation at: https://cadence-lang.org/docs/language/constants-and-variables error: cannot find variable in this scope: `AuthAccount` --> 66728d64366697da00f176194d9ecee158225182d2c562a615eb073ed913b124:11:25 | 11 | let newAccount = AuthAccount(payer: acct) | ^^^^^^^^^^^ not found in this scope; check for typos or declare it See documentation at: https://cadence-lang.org/docs/language/constants-and-variables 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}