tx · J5WcWLczipdooSDvjoTtcs8qaFosiuX4XtFsEsvJ428o
3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496: -0.01000000 Waves
2024.12.02 12:50 [3396876] smart account 3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496 > SELF 0.00000000 Waves
{
"type": 13,
"id": "J5WcWLczipdooSDvjoTtcs8qaFosiuX4XtFsEsvJ428o",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1733133121976,
"version": 2,
"chainId": 84,
"sender": "3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496",
"senderPublicKey": "8Ti3dhEToApephiZ47QJeuQX3UYifveNLPQjNstsLho9",
"proofs": [
"4qMt19dnxBL93fzRpp8KekKoFyQjqYz9CjUam5mX14awUV36W7cSSy3xPTCRamvEZoT3CLa3ja6BQUCCDy7bAzvy"
],
"script": "base64:AAIFAAAAAAAAABIIAhIECgIICBIDCgEIEgMKAQgAAAADAAAAAAxhZG1pbkFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQKod4wevFlHRdTHlxXLSQFsxtF0IER7tcAAAAAC2RBcHBBZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUjRVTeNnVQpTHDFtQW6B+jbo1nlkqGVfwAQAAAA1zZWFyY2hGb3JVc2VyAAAAAQAAAAdhZGRyZXNzBAAAAAR1c2VyBAAAAAckbWF0Y2gwCQAEIgAAAAEFAAAAB2FkZHJlc3MDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABcwUAAAAHJG1hdGNoMAUAAAABcwIAAAAHTm8gVXNlcgUAAAAEdXNlcgAAAAMAAAABaQEAAAAPcmVnaXN0ZXJBY2NvdW50AAAAAgAAAAdhZGRyZXNzAAAABHJvbGUDCQEAAAACIT0AAAACCAUAAAABaQAAAAZjYWxsZXIFAAAADGFkbWluQWRkcmVzcwkAAAIAAAABAgAAACRPbmx5IHRoZSBhZG1pbiBjYW4gcmVnaXN0ZXIgYWNjb3VudHMJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgUAAAAHYWRkcmVzcwUAAAAEcm9sZQUAAAADbmlsAAAAAWkBAAAADWRlbGV0ZUFjY291bnQAAAABAAAAB2FkZHJlc3MDCQEAAAACIT0AAAACCAUAAAABaQAAAAZjYWxsZXIFAAAADGFkbWluQWRkcmVzcwkAAAIAAAABAgAAACJPbmx5IHRoZSBhZG1pbiBjYW4gZGVsZXRlIGFjY291bnRzCQAETAAAAAIJAQAAAAtEZWxldGVFbnRyeQAAAAEFAAAAB2FkZHJlc3MFAAAAA25pbAAAAAFpAQAAAAhzYXZlRGF0YQAAAAEAAAALdGVtcGVyYXR1cmUEAAAABmNhbGxlcggFAAAAAWkAAAAGY2FsbGVyBAAAAAR1c2VyCQEAAAANc2VhcmNoRm9yVXNlcgAAAAEJAAJYAAAAAQgFAAAABmNhbGxlcgAAAAVieXRlcwMJAAAAAAAAAgUAAAAEdXNlcgIAAAAHTm8gVXNlcgkAAAIAAAABAgAAABFVc2VyIG5vdCBlbGlnaWJsZQQAAAAKcGFyYW1ldGVycwkABEwAAAACBQAAAAt0ZW1wZXJhdHVyZQUAAAADbmlsBAAAAAppbnZva2VUYXNrCQAD/AAAAAQFAAAAC2RBcHBBZGRyZXNzAgAAAAhTYXZlRGF0YQUAAAAKcGFyYW1ldGVycwUAAAADbmlsAwkBAAAAAiE9AAAAAgUAAAAKaW52b2tlVGFzawUAAAAKaW52b2tlVGFzawkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4FAAAAA25pbAAAAADrry5t",
"height": 3396876,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 4fGMqfpeZ9H8yujFhY7sKWkWnP3vYVvugqC9jdMtXQQQ
Next: none
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | func a () = { |
---|
5 | | - | let a = { |
---|
6 | | - | let b = getString("stored_public_key") |
---|
7 | | - | if ($isInstanceOf(b, "String")) |
---|
| 4 | + | let a = Address(base58'3MptJSctbAkp5fddvpQmWYjjKrSoim6dL38') |
---|
| 5 | + | |
---|
| 6 | + | let b = Address(base58'3N2n4bjG8CjdKiwLPyp3hBM4MDJ3XwMZR5h') |
---|
| 7 | + | |
---|
| 8 | + | func c (d) = { |
---|
| 9 | + | let e = { |
---|
| 10 | + | let f = getString(d) |
---|
| 11 | + | if ($isInstanceOf(f, "String")) |
---|
8 | 12 | | then { |
---|
9 | | - | let c = b |
---|
10 | | - | c |
---|
| 13 | + | let g = f |
---|
| 14 | + | g |
---|
11 | 15 | | } |
---|
12 | 16 | | else "No User" |
---|
13 | 17 | | } |
---|
14 | | - | a |
---|
| 18 | + | e |
---|
15 | 19 | | } |
---|
16 | 20 | | |
---|
17 | 21 | | |
---|
18 | | - | @Callable(d) |
---|
19 | | - | func registerPublicKey () = { |
---|
20 | | - | let e = d.callerPublicKey |
---|
21 | | - | [StringEntry("stored_public_key", toBase58String(e))] |
---|
22 | | - | } |
---|
| 22 | + | @Callable(h) |
---|
| 23 | + | func registerAccount (d,i) = if ((h.caller != a)) |
---|
| 24 | + | then throw("Only the admin can register accounts") |
---|
| 25 | + | else [StringEntry(d, i)] |
---|
23 | 26 | | |
---|
24 | 27 | | |
---|
25 | 28 | | |
---|
26 | | - | @Callable(d) |
---|
27 | | - | func verifyProof (f,g) = { |
---|
28 | | - | let h = a() |
---|
29 | | - | let i = toBytes(h) |
---|
30 | | - | if (groth16Verify(f, i, g)) |
---|
31 | | - | then [StringEntry("verification", "success")] |
---|
32 | | - | else throw("Invalid Zero-Knowledge Proof") |
---|
| 29 | + | @Callable(h) |
---|
| 30 | + | func deleteAccount (d) = if ((h.caller != a)) |
---|
| 31 | + | then throw("Only the admin can delete accounts") |
---|
| 32 | + | else [DeleteEntry(d)] |
---|
| 33 | + | |
---|
| 34 | + | |
---|
| 35 | + | |
---|
| 36 | + | @Callable(h) |
---|
| 37 | + | func saveData (j) = { |
---|
| 38 | + | let k = h.caller |
---|
| 39 | + | let e = c(toBase58String(k.bytes)) |
---|
| 40 | + | if ((e == "No User")) |
---|
| 41 | + | then throw("User not eligible") |
---|
| 42 | + | else { |
---|
| 43 | + | let l = [j] |
---|
| 44 | + | let m = invoke(b, "SaveData", l, nil) |
---|
| 45 | + | if ((m != m)) |
---|
| 46 | + | then throw("Strict value is not equal to itself.") |
---|
| 47 | + | else nil |
---|
| 48 | + | } |
---|
33 | 49 | | } |
---|
34 | 50 | | |
---|
35 | 51 | | |
---|