tx · DREo4bv1htqsktC6SqKm3Srk4J8511DcHFLGQsBzzLi3 3MuTGUHGPBRKK25pphSWnKzjkaxmvWDqjHh: -0.01000000 Waves 2021.10.04 13:50 [1731377] smart account 3MuTGUHGPBRKK25pphSWnKzjkaxmvWDqjHh > SELF 0.00000000 Waves
{ "type": 13, "id": "DREo4bv1htqsktC6SqKm3Srk4J8511DcHFLGQsBzzLi3", "fee": 1000000, "feeAssetId": null, "timestamp": 1633344634926, "version": 1, "sender": "3MuTGUHGPBRKK25pphSWnKzjkaxmvWDqjHh", "senderPublicKey": "4GyzGA6ys13V3sd51fSHY2o9yTfKM9CQBtPteLd4VqUx", "proofs": [ "4U2jK7HWT2tqTihXf8AnsfzUT7WTRcrgt3PLp9MN8MQN1YoiEZCVDxpAgusLzUFWhEWFUXRAEtNHtkvno4D2z1ne" ], "script": "base64:AAIFAAAAAAAAAAsIAhIFCgMBAQgSAAAAABYAAAAAA1NFUAIAAAACX18AAAAAFUlkeENmZ0NsYWltU3RhcnRCbG9jawAAAAAAAAAAAQAAAAAYSWR4Q2ZnQ2xhaW1WZXN0aW5nUGVyaW9kAAAAAAAAAAACAAAAABJJZHhDZmdDbGFpbUFzc2V0SWQAAAAAAAAAAAMAAAAAFElkeENmZ0NsYWltQXNzZXRNdWx0AAAAAAAAAAAEAAAAABVJZHhDZmdDbGFpbUFzc2V0T3duZXIAAAAAAAAAAAUAAAAAG0lkeENmZ0NsYWltQXNzZXRUb3RhbEFtb3VudAAAAAAAAAAABgAAAAAbSWR4VG90YWxzVG90YWxDbGFpbWVkQW1vdW50AAAAAAAAAAABAAAAABhJZHhUb3RhbHNSZW1haW5pbmdBbW91bnQAAAAAAAAAAAIAAAAAGklkeFRvdGFsc0xhc3RDbGFpbWVkSGVpZ2h0AAAAAAAAAAADAQAAAA9nZXRTdHJpbmdPckZhaWwAAAABAAAAA2tleQkBAAAAE3ZhbHVlT3JFcnJvck1lc3NhZ2UAAAACCQAEIgAAAAEFAAAAA2tleQkAASwA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AAABhjZmdDbGFpbUFzc2V0VG90YWxBbW91bnQFAAAADmNsYWltaW5nQmxvY2tzBQAAABBjZmdDbGFpbUR1cmF0aW9uCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC3VzZXJBZGRyZXNzBQAAABNjbGFpbWluZ0Fzc2V0QW1vdW50CQACWQAAAAEFAAAAEWNmZ0NsYWltQXNzZXRJZDU4CQAETAAAAAIJAQAAAAtUb3RhbHNFbnRyeQAAAAQJAQAAAAlrZXlUb3RhbHMAAAAACQEAAAAPcmVhZFRvdGFsc0FycmF5AAAAAAUAAAATY2xhaW1pbmdBc3NldEFtb3VudAUAAAATbGFzdENhbHVsYXRpb25CbG9jawkABEwAAAACCQEAAAAaQ2xhaW1PcGVyYXRpb25IaXN0b3J5RW50cnkAAAAGBQAAAA11c2VyQWRkcmVzczU4BQAAABNjbGFpbWluZ0Fzc2V0QW1vdW50BQAAAA5jbGFpbWluZ0Jsb2NrcwUAAAAUZmlyc3RDYWx1bGF0aW9uQmxvY2sFAAAAE2xhc3RDYWx1bGF0aW9uQmxvY2sIBQAAAAFpAAAADXRyYW5zYWN0aW9uSWQFAAAAA25pbAAAAADjpPVi", "chainId": 84, "height": 1731377, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let a = "__" | |
5 | + | ||
6 | + | let b = 1 | |
7 | + | ||
8 | + | let c = 2 | |
9 | + | ||
10 | + | let d = 3 | |
11 | + | ||
12 | + | let e = 4 | |
13 | + | ||
14 | + | let f = 5 | |
15 | + | ||
16 | + | let g = 6 | |
17 | + | ||
18 | + | let h = 1 | |
19 | + | ||
20 | + | let i = 2 | |
21 | + | ||
22 | + | let j = 3 | |
23 | + | ||
24 | + | func k (l) = valueOrErrorMessage(getString(l), (("mandatory this." + l) + " is not defined")) | |
25 | + | ||
26 | + | ||
27 | + | func m (n,o,p,q,r,s) = makeString(["%d%d%s%d%s%d%", n, o, p, q, r, s], a) | |
28 | + | ||
29 | + | ||
30 | + | func t (n,o,p,q,u,v) = m(toString(n), toString(o), p, toString(q), u, toString(v)) | |
31 | + | ||
32 | + | ||
33 | + | func w (x,y,z) = makeString(["%d%d%d", x, y, z], a) | |
34 | + | ||
35 | + | ||
36 | + | func A (B,C,D,E) = makeString(["%d%d%d%d%d%d", toString(height), toString(lastBlock.timestamp), toString(B), toString(C), toString(D), toString(E)], a) | |
37 | + | ||
38 | + | ||
39 | + | func F () = "%s__config" | |
40 | + | ||
41 | + | ||
42 | + | func G () = "%s__totals" | |
43 | + | ||
44 | + | ||
45 | + | func H (I,J,K) = makeString(["%s%s%s%s__history", I, J, K], a) | |
46 | + | ||
47 | + | ||
48 | + | func L () = split(k(F()), a) | |
49 | + | ||
50 | + | ||
51 | + | func M () = split(k(G()), a) | |
52 | + | ||
53 | + | ||
54 | + | func N (l,O,P,Q) = { | |
55 | + | let x = parseIntValue(O[h]) | |
56 | + | let R = parseIntValue(O[i]) | |
57 | + | let z = parseIntValue(O[j]) | |
58 | + | let S = (x + P) | |
59 | + | let T = (R - P) | |
60 | + | if ((0 > T)) | |
61 | + | then throw("invalid math") | |
62 | + | else StringEntry(l, w(toString(S), toString(T), toString(Q))) | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func U (J,B,C,V,W,X) = StringEntry(H("claim", J, toBase58String(X)), A(B, C, V, W)) | |
67 | + | ||
68 | + | ||
69 | + | @Callable(Y) | |
70 | + | func constructor (n,Z,aa) = { | |
71 | + | let ab = (n + Z) | |
72 | + | if (isDefined(getString(F()))) | |
73 | + | then throw("already initialized") | |
74 | + | else if ((size(Y.payments) != 1)) | |
75 | + | then throw("exactly 1 payment must be attached") | |
76 | + | else if (("3P6psRiDvESp5JFojvywfumf6KEmQ1RYgbn" != toString(Y.caller))) | |
77 | + | then throw("not authorized") | |
78 | + | else { | |
79 | + | let ac = valueOrErrorMessage(addressFromString(aa), "Invalid beneficiarAddress passed") | |
80 | + | let ad = value(Y.payments[0]) | |
81 | + | let ae = value(ad.assetId) | |
82 | + | let af = valueOrErrorMessage(assetInfo(ae), "fail to load ido asset info") | |
83 | + | let ag = toBase58String(ae) | |
84 | + | let ah = pow(10, 0, af.decimals, 0, 0, DOWN) | |
85 | + | let ai = ad.amount | |
86 | + | [StringEntry(F(), t(n, Z, ag, ah, toString(ac), ai)), StringEntry(G(), w("0", toString(ai), "0"))] | |
87 | + | } | |
88 | + | } | |
89 | + | ||
90 | + | ||
91 | + | ||
92 | + | @Callable(Y) | |
93 | + | func claim () = { | |
94 | + | let aj = L() | |
95 | + | let ak = parseIntValue(aj[b]) | |
96 | + | let al = parseIntValue(aj[c]) | |
97 | + | let am = (ak + al) | |
98 | + | let an = aj[d] | |
99 | + | let ao = aj[f] | |
100 | + | let ap = parseIntValue(aj[g]) | |
101 | + | let J = Y.caller | |
102 | + | let aq = toString(J) | |
103 | + | let ar = M() | |
104 | + | let x = parseIntValue(ar[h]) | |
105 | + | let as = parseIntValue(ar[i]) | |
106 | + | let z = parseIntValue(ar[j]) | |
107 | + | if ((aq != ao)) | |
108 | + | then throw("permissions denied") | |
109 | + | else if ((ak > height)) | |
110 | + | then throw(("Wait claim start block: " + toString(ak))) | |
111 | + | else { | |
112 | + | let E = if ((height > am)) | |
113 | + | then am | |
114 | + | else height | |
115 | + | let D = if ((z == 0)) | |
116 | + | then ak | |
117 | + | else z | |
118 | + | let C = (E - D) | |
119 | + | let at = fraction(ap, C, al) | |
120 | + | [ScriptTransfer(J, at, fromBase58String(an)), N(G(), M(), at, E), U(aq, at, C, D, E, Y.transactionId)] | |
121 | + | } | |
122 | + | } | |
123 | + | ||
124 | + |
github/deemru/w8io/026f985 18.86 ms ◑