tx · C6R1q8tzqP3tQXxuDn6b9cWyGBzoq2oxbE6KjeQ3ToqL
3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496: -0.01000000 Waves
2025.01.02 13:10 [3441439] smart account 3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496 > SELF 0.00000000 Waves
{
"type": 13,
"id": "C6R1q8tzqP3tQXxuDn6b9cWyGBzoq2oxbE6KjeQ3ToqL",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1735812649665,
"version": 2,
"chainId": 84,
"sender": "3N5NY2v5wdKQJbCvQA5o5hSihn7t7wYZ496",
"senderPublicKey": "8Ti3dhEToApephiZ47QJeuQX3UYifveNLPQjNstsLho9",
"proofs": [
"5ib8QhaoGLuVuYnMtVrab77RytDH13pBj3rDyM9TBf3shisRpfhERP2K9QgRR4r8xVKjGbayaEb8wQByaa3sAxrr"
],
"script": "base64:AAIFAAAAAAAAABQIAhIFCgMICAgSAwoBCBIECgIICAAAAAMAAAAADGFkbWluQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVAqh3jB68WUdF1MeXFctJAWzG0XQgRHu1wAAAAALZEFwcEFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSNFVN42dVClMcMW1BboH6NujWeWSoZV/ABAAAADXNlYXJjaEZvclVzZXIAAAABAAAAB2FkZHJlc3MEAAAABHVzZXIEAAAAByRtYXRjaDAJAAQiAAAAAQUAAAAHYWRkcmVzcwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAgAAAAdObyBVc2VyBQAAAAR1c2VyAAAAAwAAAAFpAQAAAA9yZWdpc3RlckFjY291bnQAAAADAAAAB2FkZHJlc3MAAAAEcm9sZQAAAARuYW1lAwkBAAAAAiE9AAAAAggFAAAAAWkAAAAGY2FsbGVyBQAAAAxhZG1pbkFkZHJlc3MJAAACAAAAAQIAAAAkT25seSB0aGUgYW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wDCQEAAAACIT0AAAACBQAAAAppbnZva2VUYXNrBQAAAAppbnZva2VUYXNrCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgUAAAADbmlsAAAAALNuH1U=",
"height": 3441439,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 2qCufYWWKYzNDL7L62DG66YPmq8JfZVmQ9dH7fN4wmFQ
Next: 9GYPAyfhqiYimH47YRCuTtH4YP9W1tuJsBGd9iX3mfeq
Diff:
Old | New | | Differences |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | @Callable(h) |
---|
30 | | - | func deleteAccount (d) = if ((h.caller != a)) |
---|
31 | | - | then throw("Only the admin can delete accounts") |
---|
32 | | - | else [DeleteEntry(d), DeleteEntry((d + "_name"))] |
---|
| 30 | + | func deleteAccount (d) = { |
---|
| 31 | + | let k = h.callerPublicKey |
---|
| 32 | + | let e = c(toBase58String(k)) |
---|
| 33 | + | if ((e != "Admin")) |
---|
| 34 | + | then throw("Only the admin can delete accounts") |
---|
| 35 | + | else [DeleteEntry(d), DeleteEntry((d + "_name"))] |
---|
| 36 | + | } |
---|
33 | 37 | | |
---|
34 | 38 | | |
---|
35 | 39 | | |
---|
36 | 40 | | @Callable(h) |
---|
37 | | - | func saveData (k,l) = { |
---|
38 | | - | let m = h.callerPublicKey |
---|
39 | | - | let e = c(toBase58String(m)) |
---|
| 41 | + | func saveData (l,m) = { |
---|
| 42 | + | let k = h.callerPublicKey |
---|
| 43 | + | let e = c(toBase58String(k)) |
---|
40 | 44 | | if ((e == "No User")) |
---|
41 | 45 | | then throw("User not eligible") |
---|
42 | 46 | | else { |
---|
43 | | - | let n = [k, l] |
---|
| 47 | + | let n = [l, m] |
---|
44 | 48 | | let o = invoke(b, "SaveData", n, nil) |
---|
45 | 49 | | if ((o != o)) |
---|
46 | 50 | | then throw("Strict value is not equal to itself.") |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = Address(base58'3MptJSctbAkp5fddvpQmWYjjKrSoim6dL38') |
---|
5 | 5 | | |
---|
6 | 6 | | let b = Address(base58'3N2n4bjG8CjdKiwLPyp3hBM4MDJ3XwMZR5h') |
---|
7 | 7 | | |
---|
8 | 8 | | func c (d) = { |
---|
9 | 9 | | let e = { |
---|
10 | 10 | | let f = getString(d) |
---|
11 | 11 | | if ($isInstanceOf(f, "String")) |
---|
12 | 12 | | then { |
---|
13 | 13 | | let g = f |
---|
14 | 14 | | g |
---|
15 | 15 | | } |
---|
16 | 16 | | else "No User" |
---|
17 | 17 | | } |
---|
18 | 18 | | e |
---|
19 | 19 | | } |
---|
20 | 20 | | |
---|
21 | 21 | | |
---|
22 | 22 | | @Callable(h) |
---|
23 | 23 | | func registerAccount (d,i,j) = if ((h.caller != a)) |
---|
24 | 24 | | then throw("Only the admin can register accounts") |
---|
25 | 25 | | else [StringEntry(d, i), StringEntry((d + "_name"), j)] |
---|
26 | 26 | | |
---|
27 | 27 | | |
---|
28 | 28 | | |
---|
29 | 29 | | @Callable(h) |
---|
30 | | - | func deleteAccount (d) = if ((h.caller != a)) |
---|
31 | | - | then throw("Only the admin can delete accounts") |
---|
32 | | - | else [DeleteEntry(d), DeleteEntry((d + "_name"))] |
---|
| 30 | + | func deleteAccount (d) = { |
---|
| 31 | + | let k = h.callerPublicKey |
---|
| 32 | + | let e = c(toBase58String(k)) |
---|
| 33 | + | if ((e != "Admin")) |
---|
| 34 | + | then throw("Only the admin can delete accounts") |
---|
| 35 | + | else [DeleteEntry(d), DeleteEntry((d + "_name"))] |
---|
| 36 | + | } |
---|
33 | 37 | | |
---|
34 | 38 | | |
---|
35 | 39 | | |
---|
36 | 40 | | @Callable(h) |
---|
37 | | - | func saveData (k,l) = { |
---|
38 | | - | let m = h.callerPublicKey |
---|
39 | | - | let e = c(toBase58String(m)) |
---|
| 41 | + | func saveData (l,m) = { |
---|
| 42 | + | let k = h.callerPublicKey |
---|
| 43 | + | let e = c(toBase58String(k)) |
---|
40 | 44 | | if ((e == "No User")) |
---|
41 | 45 | | then throw("User not eligible") |
---|
42 | 46 | | else { |
---|
43 | | - | let n = [k, l] |
---|
| 47 | + | let n = [l, m] |
---|
44 | 48 | | let o = invoke(b, "SaveData", n, nil) |
---|
45 | 49 | | if ((o != o)) |
---|
46 | 50 | | then throw("Strict value is not equal to itself.") |
---|
47 | 51 | | else nil |
---|
48 | 52 | | } |
---|
49 | 53 | | } |
---|
50 | 54 | | |
---|
51 | 55 | | |
---|