tx · A7E4eiFKTSKsBWTKqZ18cWsJGHmN52HjNzABb6a29yV3
3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu: -0.01000000 Waves
2022.06.02 15:05 [2078685] smart account 3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu > SELF 0.00000000 Waves
{
"type": 13,
"id": "A7E4eiFKTSKsBWTKqZ18cWsJGHmN52HjNzABb6a29yV3",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1654171515581,
"version": 2,
"chainId": 84,
"sender": "3MqpRA12epGbUr77DaY49oG6vThLgDfYAqu",
"senderPublicKey": "5zTdxm2C13mhCkkD8hK2mjmPyKaS4qvJ3iSNYSgDFUsZ",
"proofs": [
"25qFLLhwsbA8jxLk4e86bdPZiwSmmn5GuyzeAKvJgW3hBxhRDVyFAGMhyASHVc86eTSFSFJjeBvbBb7xrnpqTd8m"
],
"script": "base64:AAIFAAAAAAAAABkIAhIECgIICBIDCgEIEgMKAQgSBQoDCAECAAAADAAAAAAMbG9ja2luZ1N0b3JlAgAAAAZzdGFrZXIAAAAABWFkbWluAgAAAAVhZG1pbgEAAAAEZ2V0SQAAAAEAAAADa2V5CQAEGgAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAEZ2V0UwAAAAEAAAADa2V5CQAEHQAAAAIFAAAABHRoaXMFAAAAA2tleQEAAAAFZ2V0SVYAAAABAAAAA2tleQkBAAAABXZhbHVlAAAAAQkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkBAAAABWdldFNWAAAAAQAAAANrZXkJAQAAAAV2YWx1ZQAAAAEJAAQdAAAAAgUAAAAEdGhpcwUAAAADa2V5AQAAAAh3cml0ZUludAAAAAIAAAADa2V5AAAABXZhbHVlAwkAAGYAAAACAAAAAAAAAAAABQAAAAV2YWx1ZQkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAABd3cml0aW5nIG5lZ2F0aXZlIHZhbHVlIAkAAaQAAAABBQAAAAV2YWx1ZQIAAAAJIGZvci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xdWFsIHRvIGl0c2VsZi4AAAABaQEAAAAQdHJhbnNmZXJJbnRlcmVzdAAAAAMAAAAEdXNlcgAAAAZhbW91bnQAAAAHYXNzZXRJRAQAAAAGY2hlY2tzCQEAAAAQbG9ja2luZ1N0b3JlT25seQAAAAEFAAAAAWkDCQAAAAAAAAIFAAAABmNoZWNrcwUAAAAGY2hlY2tzCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAEFAAAABHVzZXIFAAAABmFtb3VudAUAAAAHYXNzZXRJRAUAAAADbmlsCQAAAgAAAAECAAAAJFN0cmljdCB2YWx1ZSBpcyBub3QgZXF1YWwgdG8gaXRzZWxmLgAAAAAqm1dM",
"height": 2078685,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 356sQahzvBgozx3ijCuH6SALVRhPtG9EzsZANw2hfpLd
Next: none
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = "lockingStore" |
---|
| 4 | + | let a = "staker" |
---|
5 | 5 | | |
---|
6 | | - | func b (c) = getInteger(this, c) |
---|
| 6 | + | let b = "admin" |
---|
| 7 | + | |
---|
| 8 | + | func c (d) = getInteger(this, d) |
---|
7 | 9 | | |
---|
8 | 10 | | |
---|
9 | | - | func d (c) = getString(this, c) |
---|
| 11 | + | func e (d) = getString(this, d) |
---|
10 | 12 | | |
---|
11 | 13 | | |
---|
12 | | - | func e (c) = value(getInteger(this, c)) |
---|
| 14 | + | func f (d) = value(getInteger(this, d)) |
---|
13 | 15 | | |
---|
14 | 16 | | |
---|
15 | | - | func f (c) = value(getString(this, c)) |
---|
| 17 | + | func g (d) = value(getString(this, d)) |
---|
16 | 18 | | |
---|
17 | 19 | | |
---|
18 | | - | func g (c,h) = if ((0 > h)) |
---|
19 | | - | then throw(((("writing negative value " + toString(h)) + " for key ") + c)) |
---|
20 | | - | else IntegerEntry(c, h) |
---|
| 20 | + | func h (d,i) = if ((0 > i)) |
---|
| 21 | + | then throw(((("writing negative value " + toString(i)) + " for key ") + d)) |
---|
| 22 | + | else IntegerEntry(d, i) |
---|
21 | 23 | | |
---|
22 | 24 | | |
---|
23 | | - | func i (c,h) = if ((" " == h)) |
---|
24 | | - | then throw(("writing an empty string " + h)) |
---|
25 | | - | else StringEntry(c, h) |
---|
| 25 | + | func j (d,i) = if ((" " == i)) |
---|
| 26 | + | then throw(("writing an empty string " + i)) |
---|
| 27 | + | else StringEntry(d, i) |
---|
26 | 28 | | |
---|
27 | 29 | | |
---|
28 | | - | func j (c,h) = if (!(isDefined(d(c)))) |
---|
29 | | - | then i(c, h) |
---|
30 | | - | else throw(("already initialized: " + c)) |
---|
| 30 | + | func k (d,i) = if (!(isDefined(e(d)))) |
---|
| 31 | + | then j(d, i) |
---|
| 32 | + | else throw(("already initialized: " + d)) |
---|
31 | 33 | | |
---|
32 | 34 | | |
---|
33 | | - | func k (c,h) = if (!(isDefined(d(c)))) |
---|
34 | | - | then g(c, h) |
---|
35 | | - | else throw(("already initialized: " + c)) |
---|
| 35 | + | func l (d,i) = if (!(isDefined(e(d)))) |
---|
| 36 | + | then h(d, i) |
---|
| 37 | + | else throw(("already initialized: " + d)) |
---|
36 | 38 | | |
---|
37 | 39 | | |
---|
38 | | - | func l (m) = if ((toString(m.caller) != valueOrElse(getString(this, a), "no store address"))) |
---|
| 40 | + | func m (n) = if ((toString(n.caller) != valueOrElse(getString(this, a), "no store address"))) |
---|
39 | 41 | | then throw("only the staker contract can call this function") |
---|
40 | 42 | | else true |
---|
41 | 43 | | |
---|
42 | 44 | | |
---|
43 | | - | @Callable(m) |
---|
44 | | - | func init (n) = [j(a, n)] |
---|
| 45 | + | func o (n) = if ((toString(n.caller) != valueOrElse(getString(this, b), "no admin defined"))) |
---|
| 46 | + | then throw("only an admin can call this function") |
---|
| 47 | + | else true |
---|
| 48 | + | |
---|
| 49 | + | |
---|
| 50 | + | @Callable(n) |
---|
| 51 | + | func init (p,q) = [k(a, p), k(b, q)] |
---|
45 | 52 | | |
---|
46 | 53 | | |
---|
47 | 54 | | |
---|
48 | | - | @Callable(m) |
---|
49 | | - | func transferInterest (o,p,q) = { |
---|
50 | | - | let r = l(m) |
---|
51 | | - | if ((r == r)) |
---|
52 | | - | then [ScriptTransfer(addressFromStringValue(o), p, q)] |
---|
| 55 | + | @Callable(n) |
---|
| 56 | + | func removeLockingStore (r) = { |
---|
| 57 | + | let s = o(n) |
---|
| 58 | + | if ((s == s)) |
---|
| 59 | + | then [DeleteEntry(a)] |
---|
| 60 | + | else throw("Strict value is not equal to itself.") |
---|
| 61 | + | } |
---|
| 62 | + | |
---|
| 63 | + | |
---|
| 64 | + | |
---|
| 65 | + | @Callable(n) |
---|
| 66 | + | func updateLockingStore (r) = { |
---|
| 67 | + | let s = o(n) |
---|
| 68 | + | if ((s == s)) |
---|
| 69 | + | then [DeleteEntry(a), k(a, r)] |
---|
| 70 | + | else throw("Strict value is not equal to itself.") |
---|
| 71 | + | } |
---|
| 72 | + | |
---|
| 73 | + | |
---|
| 74 | + | |
---|
| 75 | + | @Callable(n) |
---|
| 76 | + | func transferInterest (t,u,v) = { |
---|
| 77 | + | let s = m(n) |
---|
| 78 | + | if ((s == s)) |
---|
| 79 | + | then [ScriptTransfer(addressFromStringValue(t), u, v)] |
---|
53 | 80 | | else throw("Strict value is not equal to itself.") |
---|
54 | 81 | | } |
---|
55 | 82 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = "lockingStore" |
---|
| 4 | + | let a = "staker" |
---|
5 | 5 | | |
---|
6 | | - | func b (c) = getInteger(this, c) |
---|
| 6 | + | let b = "admin" |
---|
| 7 | + | |
---|
| 8 | + | func c (d) = getInteger(this, d) |
---|
7 | 9 | | |
---|
8 | 10 | | |
---|
9 | | - | func d (c) = getString(this, c) |
---|
| 11 | + | func e (d) = getString(this, d) |
---|
10 | 12 | | |
---|
11 | 13 | | |
---|
12 | | - | func e (c) = value(getInteger(this, c)) |
---|
| 14 | + | func f (d) = value(getInteger(this, d)) |
---|
13 | 15 | | |
---|
14 | 16 | | |
---|
15 | | - | func f (c) = value(getString(this, c)) |
---|
| 17 | + | func g (d) = value(getString(this, d)) |
---|
16 | 18 | | |
---|
17 | 19 | | |
---|
18 | | - | func g (c,h) = if ((0 > h)) |
---|
19 | | - | then throw(((("writing negative value " + toString(h)) + " for key ") + c)) |
---|
20 | | - | else IntegerEntry(c, h) |
---|
| 20 | + | func h (d,i) = if ((0 > i)) |
---|
| 21 | + | then throw(((("writing negative value " + toString(i)) + " for key ") + d)) |
---|
| 22 | + | else IntegerEntry(d, i) |
---|
21 | 23 | | |
---|
22 | 24 | | |
---|
23 | | - | func i (c,h) = if ((" " == h)) |
---|
24 | | - | then throw(("writing an empty string " + h)) |
---|
25 | | - | else StringEntry(c, h) |
---|
| 25 | + | func j (d,i) = if ((" " == i)) |
---|
| 26 | + | then throw(("writing an empty string " + i)) |
---|
| 27 | + | else StringEntry(d, i) |
---|
26 | 28 | | |
---|
27 | 29 | | |
---|
28 | | - | func j (c,h) = if (!(isDefined(d(c)))) |
---|
29 | | - | then i(c, h) |
---|
30 | | - | else throw(("already initialized: " + c)) |
---|
| 30 | + | func k (d,i) = if (!(isDefined(e(d)))) |
---|
| 31 | + | then j(d, i) |
---|
| 32 | + | else throw(("already initialized: " + d)) |
---|
31 | 33 | | |
---|
32 | 34 | | |
---|
33 | | - | func k (c,h) = if (!(isDefined(d(c)))) |
---|
34 | | - | then g(c, h) |
---|
35 | | - | else throw(("already initialized: " + c)) |
---|
| 35 | + | func l (d,i) = if (!(isDefined(e(d)))) |
---|
| 36 | + | then h(d, i) |
---|
| 37 | + | else throw(("already initialized: " + d)) |
---|
36 | 38 | | |
---|
37 | 39 | | |
---|
38 | | - | func l (m) = if ((toString(m.caller) != valueOrElse(getString(this, a), "no store address"))) |
---|
| 40 | + | func m (n) = if ((toString(n.caller) != valueOrElse(getString(this, a), "no store address"))) |
---|
39 | 41 | | then throw("only the staker contract can call this function") |
---|
40 | 42 | | else true |
---|
41 | 43 | | |
---|
42 | 44 | | |
---|
43 | | - | @Callable(m) |
---|
44 | | - | func init (n) = [j(a, n)] |
---|
| 45 | + | func o (n) = if ((toString(n.caller) != valueOrElse(getString(this, b), "no admin defined"))) |
---|
| 46 | + | then throw("only an admin can call this function") |
---|
| 47 | + | else true |
---|
| 48 | + | |
---|
| 49 | + | |
---|
| 50 | + | @Callable(n) |
---|
| 51 | + | func init (p,q) = [k(a, p), k(b, q)] |
---|
45 | 52 | | |
---|
46 | 53 | | |
---|
47 | 54 | | |
---|
48 | | - | @Callable(m) |
---|
49 | | - | func transferInterest (o,p,q) = { |
---|
50 | | - | let r = l(m) |
---|
51 | | - | if ((r == r)) |
---|
52 | | - | then [ScriptTransfer(addressFromStringValue(o), p, q)] |
---|
| 55 | + | @Callable(n) |
---|
| 56 | + | func removeLockingStore (r) = { |
---|
| 57 | + | let s = o(n) |
---|
| 58 | + | if ((s == s)) |
---|
| 59 | + | then [DeleteEntry(a)] |
---|
| 60 | + | else throw("Strict value is not equal to itself.") |
---|
| 61 | + | } |
---|
| 62 | + | |
---|
| 63 | + | |
---|
| 64 | + | |
---|
| 65 | + | @Callable(n) |
---|
| 66 | + | func updateLockingStore (r) = { |
---|
| 67 | + | let s = o(n) |
---|
| 68 | + | if ((s == s)) |
---|
| 69 | + | then [DeleteEntry(a), k(a, r)] |
---|
| 70 | + | else throw("Strict value is not equal to itself.") |
---|
| 71 | + | } |
---|
| 72 | + | |
---|
| 73 | + | |
---|
| 74 | + | |
---|
| 75 | + | @Callable(n) |
---|
| 76 | + | func transferInterest (t,u,v) = { |
---|
| 77 | + | let s = m(n) |
---|
| 78 | + | if ((s == s)) |
---|
| 79 | + | then [ScriptTransfer(addressFromStringValue(t), u, v)] |
---|
53 | 80 | | else throw("Strict value is not equal to itself.") |
---|
54 | 81 | | } |
---|
55 | 82 | | |
---|
56 | 83 | | |
---|