tx · AwmD1VSDeLiiGkanKpCSH7z8Dk2tXBaFhA2VvYEUj9ed
3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn: -0.01000000 Waves
2022.11.01 14:59 [2298017] smart account 3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn > SELF 0.00000000 Waves
{
"type": 13,
"id": "AwmD1VSDeLiiGkanKpCSH7z8Dk2tXBaFhA2VvYEUj9ed",
"fee": 1000000,
"feeAssetId": null,
"timestamp": 1667303997970,
"version": 2,
"chainId": 84,
"sender": "3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn",
"senderPublicKey": "Cq4RbcVcQJpCWyHiACDqUf2PbU8PaX949Dun9wRSeDzE",
"proofs": [
"53LEZmAo1QvPZ7kbxVho1BK7NM8nUAs5BqU8QCNbhMtBmc9ShSNgLNDJ6jpu2FmdMzXXafsMfxyTbPZYj5cpCf8K"
],
"script": "base64:AAIFAAAAAAAAAA0IAhIECgIICBIDCgEIAAAACgAAAAAKbmZ0QXNzZXRJZAEAAAAAAAAAABBpbmN1YmF0b3JBZGRyZXNzAQAAAAAAAAAAC3VzZXJBZGRyZXNzAQAAAAAAAAAAF2NvbGxlY3RpdmVNYXN0ZXJBZGRyZXNzAQAAAAAAAAAABXJlZjIwCQAETAAAAAICAAAAAAUAAAADbmlsAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAAAAAAAAABAAAAE21hc3RlclRyeUdldEJvb2xlYW4AAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBsAAAACCQEAAAAHQWRkcmVzcwAAAAEFAAAAF2NvbGxlY3RpdmVNYXN0ZXJBZGRyZXNzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAB0Jvb2xlYW4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5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXlDNE+d",
"height": 2298017,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: 4oCboyW3iKd9zTC8rQ1LM8YrYjvKXiUMDdTPVih4hYb6
Next: 2w8iJnTuhU5C8iwpPVLCaxofMDUiDqZKYV9Fx67Gp5hV
Diff:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF' |
---|
| 4 | + | let a = base58'' |
---|
5 | 5 | | |
---|
6 | | - | let b = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv' |
---|
| 6 | + | let b = base58'' |
---|
7 | 7 | | |
---|
8 | | - | let c = base58'3PAETTtuW7aSiyKtn9GuML3RgtV1xdq1mQW' |
---|
| 8 | + | let c = base58'' |
---|
9 | 9 | | |
---|
10 | | - | let d = base58'3PDktsxDVEcoobpEBJcausnKo4enhcWUDEF' |
---|
| 10 | + | let d = base58'' |
---|
11 | 11 | | |
---|
12 | | - | let e = ["3PR66kMvUDE1QvYAg8r6e1xDX7QbnTV7JW5"] |
---|
| 12 | + | let e = [""] |
---|
13 | 13 | | |
---|
14 | 14 | | func f (g) = { |
---|
15 | 15 | | let h = getInteger(this, g) |
---|
|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | 63 | | @Callable(q) |
---|
64 | | - | func addRefKey (p,r) = if ((q.caller != this)) |
---|
| 64 | + | func addgatewayKey (p,r) = if ((q.caller != this)) |
---|
65 | 65 | | then throw("admin only") |
---|
66 | 66 | | else { |
---|
67 | 67 | | let s = (("key_" + r) + "_refererAddress") |
---|
|
73 | 73 | | |
---|
74 | 74 | | |
---|
75 | 75 | | @Callable(q) |
---|
76 | | - | func refPayment (r) = { |
---|
77 | | - | let t = toString(q.originCaller) |
---|
| 76 | + | func gatewayreward (t) = { |
---|
| 77 | + | let u = toString(q.originCaller) |
---|
78 | 78 | | if (if ((q.caller.bytes != b)) |
---|
79 | 79 | | then (q.caller.bytes != c) |
---|
80 | 80 | | else false) |
---|
81 | 81 | | then throw("This method can be called only by farming and incubator dApps") |
---|
82 | | - | else if (if ((r == "")) |
---|
83 | | - | then (n((("address_" + t) + "_referedBy")) == "") |
---|
| 82 | + | else if (if ((t == "")) |
---|
| 83 | + | then (n((("address_" + u) + "_referedBy")) == "") |
---|
84 | 84 | | else false) |
---|
85 | 85 | | then nil |
---|
86 | | - | else if (j(("farm_" + t))) |
---|
| 86 | + | else if (j(("gateway_" + u))) |
---|
87 | 87 | | then nil |
---|
88 | 88 | | else { |
---|
89 | | - | let u = { |
---|
90 | | - | let h = getString(this, (("key_" + r) + "_refererAddress")) |
---|
| 89 | + | let v = { |
---|
| 90 | + | let h = getString(this, (("key_" + t) + "_refererAddress")) |
---|
91 | 91 | | if ($isInstanceOf(h, "String")) |
---|
92 | 92 | | then { |
---|
93 | | - | let v = h |
---|
94 | | - | v |
---|
| 93 | + | let w = h |
---|
| 94 | + | w |
---|
95 | 95 | | } |
---|
96 | | - | else r |
---|
| 96 | + | else t |
---|
97 | 97 | | } |
---|
98 | | - | let p = { |
---|
99 | | - | let h = getString(this, (("address_" + t) + "_referedBy")) |
---|
| 98 | + | let x = { |
---|
| 99 | + | let h = getString(this, (("address_" + u) + "_referedBy")) |
---|
100 | 100 | | if ($isInstanceOf(h, "String")) |
---|
101 | 101 | | then { |
---|
102 | | - | let v = h |
---|
103 | | - | v |
---|
| 102 | + | let w = h |
---|
| 103 | + | w |
---|
104 | 104 | | } |
---|
105 | | - | else u |
---|
| 105 | + | else v |
---|
106 | 106 | | } |
---|
107 | | - | let w = (q.payments[0].amount * o(p)) |
---|
108 | | - | if ((addressFromString(p) == unit)) |
---|
| 107 | + | let y = (q.payments[0].amount * o(x)) |
---|
| 108 | + | if ((addressFromString(x) == unit)) |
---|
109 | 109 | | then nil |
---|
110 | 110 | | else { |
---|
111 | | - | let x = addressFromStringValue(p) |
---|
112 | | - | let y = addressFromStringValue(t) |
---|
113 | | - | let z = w |
---|
114 | | - | let A = (("address_" + p) + "_earnedReward") |
---|
115 | | - | let B = (((("referer_" + p) + "_referal_") + t) + "_deliveredReward") |
---|
116 | | - | if ((p == t)) |
---|
| 111 | + | let z = addressFromStringValue(x) |
---|
| 112 | + | let A = addressFromStringValue(u) |
---|
| 113 | + | let B = y |
---|
| 114 | + | let C = (("address_" + x) + "_earnedReward") |
---|
| 115 | + | let D = (((("referer_" + x) + "_referal_") + u) + "_deliveredReward") |
---|
| 116 | + | if ((x == u)) |
---|
117 | 117 | | then nil |
---|
118 | | - | else [StringEntry((("address_" + t) + "_referedBy"), p), IntegerEntry(A, (f(A) + z)), IntegerEntry(B, (f(B) + z)), IntegerEntry((((("referer_" + p) + "_referal_") + t) + "_amount"), (f((((("referer_" + p) + "_referal_") + t) + "_amount")) + 1)), ScriptTransfer(x, z, a)] |
---|
| 118 | + | else [StringEntry((("address_" + u) + "_referedBy"), x), IntegerEntry(C, (f(C) + B)), IntegerEntry(D, (f(D) + B)), IntegerEntry((((("referer_" + x) + "_referal_") + u) + "_amount"), (f((((("referer_" + x) + "_referal_") + u) + "_amount")) + 1)), ScriptTransfer(z, B, c)] |
---|
119 | 119 | | } |
---|
120 | 120 | | } |
---|
121 | 121 | | } |
---|
122 | 122 | | |
---|
123 | 123 | | |
---|
124 | | - | @Verifier(C) |
---|
125 | | - | func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey) |
---|
| 124 | + | @Verifier(E) |
---|
| 125 | + | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) |
---|
126 | 126 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 5 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | | - | let a = base58'JCGDtrVy64cCJ1wCKfCaiNQMnyYwii71TbE5QeAHfxgF' |
---|
| 4 | + | let a = base58'' |
---|
5 | 5 | | |
---|
6 | | - | let b = base58'3PEktVux2RhchSN63DsDo4b4mz4QqzKSeDv' |
---|
| 6 | + | let b = base58'' |
---|
7 | 7 | | |
---|
8 | | - | let c = base58'3PAETTtuW7aSiyKtn9GuML3RgtV1xdq1mQW' |
---|
| 8 | + | let c = base58'' |
---|
9 | 9 | | |
---|
10 | | - | let d = base58'3PDktsxDVEcoobpEBJcausnKo4enhcWUDEF' |
---|
| 10 | + | let d = base58'' |
---|
11 | 11 | | |
---|
12 | | - | let e = ["3PR66kMvUDE1QvYAg8r6e1xDX7QbnTV7JW5"] |
---|
| 12 | + | let e = [""] |
---|
13 | 13 | | |
---|
14 | 14 | | func f (g) = { |
---|
15 | 15 | | let h = getInteger(this, g) |
---|
16 | 16 | | if ($isInstanceOf(h, "Int")) |
---|
17 | 17 | | then { |
---|
18 | 18 | | let i = h |
---|
19 | 19 | | i |
---|
20 | 20 | | } |
---|
21 | 21 | | else 0 |
---|
22 | 22 | | } |
---|
23 | 23 | | |
---|
24 | 24 | | |
---|
25 | 25 | | func j (g) = { |
---|
26 | 26 | | let h = getBoolean(Address(d), g) |
---|
27 | 27 | | if ($isInstanceOf(h, "Boolean")) |
---|
28 | 28 | | then { |
---|
29 | 29 | | let i = h |
---|
30 | 30 | | i |
---|
31 | 31 | | } |
---|
32 | 32 | | else false |
---|
33 | 33 | | } |
---|
34 | 34 | | |
---|
35 | 35 | | |
---|
36 | 36 | | func k (l) = { |
---|
37 | 37 | | let h = addressFromString(l) |
---|
38 | 38 | | if ($isInstanceOf(h, "Address")) |
---|
39 | 39 | | then { |
---|
40 | 40 | | let m = h |
---|
41 | 41 | | true |
---|
42 | 42 | | } |
---|
43 | 43 | | else false |
---|
44 | 44 | | } |
---|
45 | 45 | | |
---|
46 | 46 | | |
---|
47 | 47 | | func n (g) = { |
---|
48 | 48 | | let h = getString(this, g) |
---|
49 | 49 | | if ($isInstanceOf(h, "String")) |
---|
50 | 50 | | then { |
---|
51 | 51 | | let m = h |
---|
52 | 52 | | m |
---|
53 | 53 | | } |
---|
54 | 54 | | else "" |
---|
55 | 55 | | } |
---|
56 | 56 | | |
---|
57 | 57 | | |
---|
58 | 58 | | func o (p) = if ((indexOf(e, p) != unit)) |
---|
59 | 59 | | then 4 |
---|
60 | 60 | | else 1 |
---|
61 | 61 | | |
---|
62 | 62 | | |
---|
63 | 63 | | @Callable(q) |
---|
64 | | - | func addRefKey (p,r) = if ((q.caller != this)) |
---|
| 64 | + | func addgatewayKey (p,r) = if ((q.caller != this)) |
---|
65 | 65 | | then throw("admin only") |
---|
66 | 66 | | else { |
---|
67 | 67 | | let s = (("key_" + r) + "_refererAddress") |
---|
68 | 68 | | if ((n(s) == "")) |
---|
69 | 69 | | then [StringEntry(s, p), StringEntry(((("address_" + p) + "_refererKey_") + r), r)] |
---|
70 | 70 | | else throw((("The ref key \"" + r) + "\" is already registered")) |
---|
71 | 71 | | } |
---|
72 | 72 | | |
---|
73 | 73 | | |
---|
74 | 74 | | |
---|
75 | 75 | | @Callable(q) |
---|
76 | | - | func refPayment (r) = { |
---|
77 | | - | let t = toString(q.originCaller) |
---|
| 76 | + | func gatewayreward (t) = { |
---|
| 77 | + | let u = toString(q.originCaller) |
---|
78 | 78 | | if (if ((q.caller.bytes != b)) |
---|
79 | 79 | | then (q.caller.bytes != c) |
---|
80 | 80 | | else false) |
---|
81 | 81 | | then throw("This method can be called only by farming and incubator dApps") |
---|
82 | | - | else if (if ((r == "")) |
---|
83 | | - | then (n((("address_" + t) + "_referedBy")) == "") |
---|
| 82 | + | else if (if ((t == "")) |
---|
| 83 | + | then (n((("address_" + u) + "_referedBy")) == "") |
---|
84 | 84 | | else false) |
---|
85 | 85 | | then nil |
---|
86 | | - | else if (j(("farm_" + t))) |
---|
| 86 | + | else if (j(("gateway_" + u))) |
---|
87 | 87 | | then nil |
---|
88 | 88 | | else { |
---|
89 | | - | let u = { |
---|
90 | | - | let h = getString(this, (("key_" + r) + "_refererAddress")) |
---|
| 89 | + | let v = { |
---|
| 90 | + | let h = getString(this, (("key_" + t) + "_refererAddress")) |
---|
91 | 91 | | if ($isInstanceOf(h, "String")) |
---|
92 | 92 | | then { |
---|
93 | | - | let v = h |
---|
94 | | - | v |
---|
| 93 | + | let w = h |
---|
| 94 | + | w |
---|
95 | 95 | | } |
---|
96 | | - | else r |
---|
| 96 | + | else t |
---|
97 | 97 | | } |
---|
98 | | - | let p = { |
---|
99 | | - | let h = getString(this, (("address_" + t) + "_referedBy")) |
---|
| 98 | + | let x = { |
---|
| 99 | + | let h = getString(this, (("address_" + u) + "_referedBy")) |
---|
100 | 100 | | if ($isInstanceOf(h, "String")) |
---|
101 | 101 | | then { |
---|
102 | | - | let v = h |
---|
103 | | - | v |
---|
| 102 | + | let w = h |
---|
| 103 | + | w |
---|
104 | 104 | | } |
---|
105 | | - | else u |
---|
| 105 | + | else v |
---|
106 | 106 | | } |
---|
107 | | - | let w = (q.payments[0].amount * o(p)) |
---|
108 | | - | if ((addressFromString(p) == unit)) |
---|
| 107 | + | let y = (q.payments[0].amount * o(x)) |
---|
| 108 | + | if ((addressFromString(x) == unit)) |
---|
109 | 109 | | then nil |
---|
110 | 110 | | else { |
---|
111 | | - | let x = addressFromStringValue(p) |
---|
112 | | - | let y = addressFromStringValue(t) |
---|
113 | | - | let z = w |
---|
114 | | - | let A = (("address_" + p) + "_earnedReward") |
---|
115 | | - | let B = (((("referer_" + p) + "_referal_") + t) + "_deliveredReward") |
---|
116 | | - | if ((p == t)) |
---|
| 111 | + | let z = addressFromStringValue(x) |
---|
| 112 | + | let A = addressFromStringValue(u) |
---|
| 113 | + | let B = y |
---|
| 114 | + | let C = (("address_" + x) + "_earnedReward") |
---|
| 115 | + | let D = (((("referer_" + x) + "_referal_") + u) + "_deliveredReward") |
---|
| 116 | + | if ((x == u)) |
---|
117 | 117 | | then nil |
---|
118 | | - | else [StringEntry((("address_" + t) + "_referedBy"), p), IntegerEntry(A, (f(A) + z)), IntegerEntry(B, (f(B) + z)), IntegerEntry((((("referer_" + p) + "_referal_") + t) + "_amount"), (f((((("referer_" + p) + "_referal_") + t) + "_amount")) + 1)), ScriptTransfer(x, z, a)] |
---|
| 118 | + | else [StringEntry((("address_" + u) + "_referedBy"), x), IntegerEntry(C, (f(C) + B)), IntegerEntry(D, (f(D) + B)), IntegerEntry((((("referer_" + x) + "_referal_") + u) + "_amount"), (f((((("referer_" + x) + "_referal_") + u) + "_amount")) + 1)), ScriptTransfer(z, B, c)] |
---|
119 | 119 | | } |
---|
120 | 120 | | } |
---|
121 | 121 | | } |
---|
122 | 122 | | |
---|
123 | 123 | | |
---|
124 | | - | @Verifier(C) |
---|
125 | | - | func D () = sigVerify(C.bodyBytes, C.proofs[0], C.senderPublicKey) |
---|
| 124 | + | @Verifier(E) |
---|
| 125 | + | func F () = sigVerify(E.bodyBytes, E.proofs[0], E.senderPublicKey) |
---|
126 | 126 | | |
---|