tx · ADEVQy7NTuyiKWCi6hjERR7zqqA7p8M3BNBBvhE9Yw2C 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP: -0.01000000 Waves 2022.12.22 14:00 [2371412] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves
{ "type": 13, "id": "ADEVQy7NTuyiKWCi6hjERR7zqqA7p8M3BNBBvhE9Yw2C", "fee": 1000000, "feeAssetId": null, "timestamp": 1671706813282, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "3RSCzMUcSYRtpwM7zk1opg9BpsabkhqiExGiZDfJoKiq8RVZPvnFVCwxPKkrvs8z2BL9uWKZvKcsTu4vMnbi2mr6" ], "script": "base64:AAIFAAAAAAAAAB8IAhIAEgASCQoHCAgIAQEIARIDCgEBEgASABIDCgEIAAAAEAAAAAAGYWRtUHViAQAAACDCbSeYCFZIOpb4r9LWa8L402jDi6OfxQF86gIW2LZmcwAAAAAMcGF5bWVudEFzc2V0AQAAACAhOUTpKXxfz4r4M5I49SS+rwv2+rnVA49FLcaoUr/6uQAAAAAIZXZlbnRLZXkCAAAAB19ldmVudF8AAAAACnBheW1lbnRLZXkCAAAAA19wXwAAAAAQZ2xvYmFsRXZlbnRJZEtleQIAAAAJX2V2ZW50SWRfAAAAAA1zdGFydEJsb2NrS2V5AgAAAAxfc3RhcnRCbG9ja18AAAAAC2VuZEJsb2NrS2V5AgAAAApfZW5kQmxvY2tfAAAAAAhpbWFnZUtleQIAAAAHX2ltYWdlXwAAAAAIb3duZXJLZXkCAAAAB19vd25lcl8AAAAABnVybEtleQIAAAAFX3VybF8AAAAACmhhcmRDYXBLZXkCAAAACV9oYXJkQ2FwXwAAAAAIdGl0bGVLZXkCAAAAB190aXRsZV8AAAAAE3NoYXJlSG9sZGVyQ291bnRLZXkCAAAAEl9zaGFyZU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AAAAIFAAAACnBheW1lbnRLZXkFAAAAD3RvdGFsUGF5bWVudEtleQkAAaQAAAABBQAAAAdldmVudElkCQAAZAAAAAIFAAAADHRvdGFsUGF5bWVudAUAAAANcGF5bWVudEFtb3VudAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgUAAAAKcGF5bWVudEtleQUAAAAQd2FsbGV0UGF5bWVudEtleQUAAAAKY3VycmVudEtleQkAAaQAAAABBQAAAAdldmVudElkCQAAZAAAAAIFAAAADXdhbGxldFBheW1lbnQFAAAADXBheW1lbnRBbW91bnQFAAAAA25pbAAAAAFpAQAAAAVjbGFpbQAAAAAJAAACAAAAAQIAAAAgZXZlbnQgb3duZXIgd2lsbCBjbGFpbSB0aGUgbW9uZXkAAAABaQEAAAAGcmVmdW5kAAAAAAkAAAIAAAABAgAAACJpZiBub3Qgc3VjY2VzcyBwYXllcnMgZ29ubmEgcmVmdW5kAAAAAWkBAAAABmRlbGV0ZQAAAAEAAAADa2V5AwkAAAAAAAACCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAABmFkbVB1YgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANrZXkFAAAAA25pbAkAAAIAAAABAgAAAB95b3UgYXJlIG5vdCBhbGxvd2VkIHRvIGRvIHRoaXMhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmXrCQs", "height": 2371412, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AApqRyrQSF48dUxEgMy55suavF82ipXJAGmNo3ngKDxp Next: HwPhrikPUtUfax3gB9BHYtFhfLhfHFmR5cNgVz6yhtnE Diff:
Old | New | Differences | |
---|---|---|---|
80 | 80 | let F = valueOrElse(getInteger(this, ((d + n) + toString(C))), 0) | |
81 | 81 | let G = valueOrElse(getInteger(this, (((d + o) + E) + toString(C))), 0) | |
82 | 82 | let H = valueOrElse(getInteger(this, ((d + m) + toString(C))), 0) | |
83 | - | if (( | |
83 | + | if ((y > height)) | |
84 | 84 | then throw("crowdfunding not started") | |
85 | - | else if (( | |
85 | + | else if ((height >= z)) | |
86 | 86 | then throw("crowdfunding is over") | |
87 | 87 | else if ((F >= B)) | |
88 | 88 | then throw("crowdfunding is reached to hard cap. thank you for participating!") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx' | |
5 | 5 | ||
6 | 6 | let b = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk' | |
7 | 7 | ||
8 | 8 | let c = "_event_" | |
9 | 9 | ||
10 | 10 | let d = "_p_" | |
11 | 11 | ||
12 | 12 | let e = "_eventId_" | |
13 | 13 | ||
14 | 14 | let f = "_startBlock_" | |
15 | 15 | ||
16 | 16 | let g = "_endBlock_" | |
17 | 17 | ||
18 | 18 | let h = "_image_" | |
19 | 19 | ||
20 | 20 | let i = "_owner_" | |
21 | 21 | ||
22 | 22 | let j = "_url_" | |
23 | 23 | ||
24 | 24 | let k = "_hardCap_" | |
25 | 25 | ||
26 | 26 | let l = "_title_" | |
27 | 27 | ||
28 | 28 | let m = "_shareHolderCount_" | |
29 | 29 | ||
30 | 30 | let n = "_totalPayment_" | |
31 | 31 | ||
32 | 32 | let o = "_walletPayment_" | |
33 | 33 | ||
34 | 34 | func p (q) = { | |
35 | 35 | let r = b | |
36 | 36 | if ((size(q.payments) == 0)) | |
37 | 37 | then throw("Payment not attached") | |
38 | 38 | else { | |
39 | 39 | let s = q.payments[0] | |
40 | 40 | let t = s.assetId | |
41 | 41 | if ($isInstanceOf(t, "ByteVector")) | |
42 | 42 | then { | |
43 | 43 | let u = t | |
44 | 44 | if ((u == r)) | |
45 | 45 | then (s.amount > 0) | |
46 | 46 | else false | |
47 | 47 | } | |
48 | 48 | else throw("Wrong payment asset") | |
49 | 49 | } | |
50 | 50 | } | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | @Callable(q) | |
54 | 54 | func shutdown () = throw("shutdown") | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | ||
58 | 58 | @Callable(q) | |
59 | 59 | func settings () = throw("settings") | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | ||
63 | 63 | @Callable(q) | |
64 | 64 | func create (v,w,x,y,z,A,B) = { | |
65 | 65 | let C = valueOrElse(getInteger(this, e), 0) | |
66 | 66 | let D = (C + 1) | |
67 | 67 | if ((q.callerPublicKey == a)) | |
68 | 68 | then [StringEntry(((c + h) + toString(D)), w), StringEntry(((c + i) + toString(D)), x), StringEntry(((c + l) + toString(D)), v), IntegerEntry(((c + f) + toString(D)), y), IntegerEntry(((c + g) + toString(D)), z), StringEntry(((c + j) + toString(D)), A), IntegerEntry(((c + k) + toString(D)), B), IntegerEntry((c + e), D)] | |
69 | 69 | else throw("you are not allowed") | |
70 | 70 | } | |
71 | 71 | ||
72 | 72 | ||
73 | 73 | ||
74 | 74 | @Callable(q) | |
75 | 75 | func funding (C) = { | |
76 | 76 | let y = valueOrErrorMessage(getInteger(this, ((c + f) + toString(C))), "err") | |
77 | 77 | let z = valueOrErrorMessage(getInteger(this, ((c + g) + toString(C))), "err") | |
78 | 78 | let B = valueOrErrorMessage(getInteger(this, ((c + k) + toString(C))), "err") | |
79 | 79 | let E = toBase58String(q.caller.bytes) | |
80 | 80 | let F = valueOrElse(getInteger(this, ((d + n) + toString(C))), 0) | |
81 | 81 | let G = valueOrElse(getInteger(this, (((d + o) + E) + toString(C))), 0) | |
82 | 82 | let H = valueOrElse(getInteger(this, ((d + m) + toString(C))), 0) | |
83 | - | if (( | |
83 | + | if ((y > height)) | |
84 | 84 | then throw("crowdfunding not started") | |
85 | - | else if (( | |
85 | + | else if ((height >= z)) | |
86 | 86 | then throw("crowdfunding is over") | |
87 | 87 | else if ((F >= B)) | |
88 | 88 | then throw("crowdfunding is reached to hard cap. thank you for participating!") | |
89 | 89 | else if (!(p(q))) | |
90 | 90 | then throw("you have to attach payment greater than zero") | |
91 | 91 | else { | |
92 | 92 | let s = q.payments[0] | |
93 | 93 | let I = s.amount | |
94 | 94 | [IntegerEntry(((d + m) + toString(C)), (H + 1)), IntegerEntry(((d + n) + toString(C)), (F + I)), IntegerEntry((((d + o) + E) + toString(C)), (G + I))] | |
95 | 95 | } | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(q) | |
101 | 101 | func claim () = throw("event owner will claim the money") | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | ||
105 | 105 | @Callable(q) | |
106 | 106 | func refund () = throw("if not success payers gonna refund") | |
107 | 107 | ||
108 | 108 | ||
109 | 109 | ||
110 | 110 | @Callable(q) | |
111 | 111 | func delete (J) = if ((q.callerPublicKey == a)) | |
112 | 112 | then [DeleteEntry(J)] | |
113 | 113 | else throw("you are not allowed to do this!") | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | @Verifier(K) | |
117 | 117 | func L () = sigVerify(K.bodyBytes, K.proofs[0], K.senderPublicKey) | |
118 | 118 |
github/deemru/w8io/026f985 48.26 ms ◑