Smart Contract
KeyTester
A.6e7129e36c5feb54.KeyTester
1
2access(all) contract KeyTester {
3
4 access(all) fun testFunc(acc: auth(Keys) &Account, str: String) {
5 let key = PublicKey(
6 publicKey: str.decodeHex(),
7 signatureAlgorithm: SignatureAlgorithm(rawValue: 1)!
8 )
9 acc.keys.add(
10 publicKey: key,
11 hashAlgorithm: HashAlgorithm(rawValue: 1)!,
12 weight: 1000.0
13 )
14 }
15}
16
17
18
19
20
21
22
23
24
25
26