TransactionSEALED
╳▪●~!□*^▒◆^^▫#▪@●*□◇●╱!□#^!▓╲○*&◇▓●*○▫~!@■█■█#◆□!!%◇▒▒╲$@○▪$^○▪~
Transaction ID
Execution Error
Error Code: 1118
error caused by: 1 error occurred:
Raw Error
[Error Code: 1118] error caused by: 1 error occurred: * [Error Code: 1118] payer 021d6625f303abbe has insufficient balance to attempt transaction execution (required balance: 0.00100000)
Transaction Summary
TransactionScript Arguments
0keyString
2a1ece1b00728b1858b179bf028fc1c7701fa23f58a796ae38ad34dde7ff956f884cd0d2c2f7b53c4e9e99ce53e26eef0d0a127536b17732814712a406bc043c
1signatureAlgorithmUInt8
1
2hashAlgorithmUInt8
3
3weightUFix64
1000.00000000
Cadence Script
1import Crypto
2
3transaction(key: String, signatureAlgorithm: UInt8, hashAlgorithm: UInt8, weight: UFix64) {
4 prepare(signer: auth(BorrowValue, Storage) &Account) {
5 pre {
6 signatureAlgorithm >= 1 && signatureAlgorithm <= 3: "Must provide a signature algorithm raw value that is 1, 2, or 3"
7 hashAlgorithm >= 1 && hashAlgorithm <= 6: "Must provide a hash algorithm raw value that is between 1 and 6"
8 weight <= 1000.0: "The key weight must be between 0 and 1000"
9 }
10
11 let publicKey = PublicKey(
12 publicKey: key.decodeHex(),
13 signatureAlgorithm: SignatureAlgorithm(rawValue: signatureAlgorithm)!
14 )
15
16 let account = Account(payer: signer)
17
18 account.keys.add(publicKey: publicKey, hashAlgorithm: HashAlgorithm(rawValue: hashAlgorithm)!, weight: weight)
19 }
20}