tx · CZ8itX1YtgkepHrXNdaTiwCLztwv3ZPYbUueQ84sVijD

3MyLnBsVm9pw43K9eba5UExxb3efeai91KP:  -0.01000000 Waves

2022.12.22 15:47 [2371521] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves

{ "type": 13, "id": "CZ8itX1YtgkepHrXNdaTiwCLztwv3ZPYbUueQ84sVijD", "fee": 1000000, "feeAssetId": null, "timestamp": 1671713266383, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "31morfdVKZFFFTGQ3Lp7fz1tXXogvmmyEBebLGmD7vLD7LqWhXCHsuyChrgHG3uGoAv4AZ8Z3MDYVUTcwbtrQZXv" ], "script": "base64:AAIFAAAAAAAAACIIAhIDCgEEEgASCQoHCAgIAQEIARIDCgEBEgASABIDCgEIAAAAEQAAAAAGYWRtUHViAQAAACDCbSeYCFZIOpb4r9LWa8L402jDi6OfxQF86gIW2LZmcwAAAAAMcGF5bWVudEFzc2V0AQAAACAhOUTpKXxfz4r4M5I49SS+rwv2+rnVA49FLcaoUr/6uQAAAAALc2h1dERvd25LZXkCAAAACl9zaHV0RG93bl8AAAAACGV2ZW50S2V5AgAAAAdfZXZlbnRfAAAAAApwYXltZW50S2V5AgAAAAlfcGF5bWVudF8AAAAAEGdsb2JhbEV2ZW50SWRLZXkCAAAACV9ldmVudElkXwAAAAANc3RhcnRCbG9ja0tleQIAAAAMX3N0YXJ0QmxvY2tfAAAAAAtlbmRCbG9ja0tleQIAAAAKX2VuZEJsb2NrXwAAAAAIaW1hZ2VLZXkCAAAAB19pbWFnZV8AAAAACG93bmVyS2V5AgAAAAdfb3duZXJfAAAAAAZ1cmxLZXkCAAAABV91cmxfAAAAAApoYXJkQ2FwS2V5AgAAAAlfaGFyZENhcF8AAAAACHRpdGxlS2V5AgAAAAdfdGl0bGVf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AAAAAAAAggFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAZhZG1QdWIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwJAAACAAAAAQIAAAAfeW91IGFyZSBub3QgYWxsb3dlZCB0byBkbyB0aGlzIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5o1CYDg==", "height": 2371521, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8Wcznytk6JB1VENMz98LymQHRiWrcVxJqA3ACvKTC81F Next: Edf3zztHwQbf29tdqpPKTnhCgKeWrVcWfMNUN9PuV62c Diff:
OldNewDifferences
55
66 let b = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
77
8-let c = "_event_"
8+let c = "_shutDown_"
99
10-let d = "_payment_"
10+let d = "_event_"
1111
12-let e = "_eventId_"
12+let e = "_payment_"
1313
14-let f = "_startBlock_"
14+let f = "_eventId_"
1515
16-let g = "_endBlock_"
16+let g = "_startBlock_"
1717
18-let h = "_image_"
18+let h = "_endBlock_"
1919
20-let i = "_owner_"
20+let i = "_image_"
2121
22-let j = "_url_"
22+let j = "_owner_"
2323
24-let k = "_hardCap_"
24+let k = "_url_"
2525
26-let l = "_title_"
26+let l = "_hardCap_"
2727
28-let m = "_shareHolderCount_"
28+let m = "_title_"
2929
30-let n = "_totalPayment_"
30+let n = "_shareHolderCount_"
3131
32-let o = "_walletPayment_"
32+let o = "_totalPayment_"
3333
34-func p (q) = {
35- let r = b
36- if ((size(q.payments) == 0))
34+let p = "_walletPayment_"
35+
36+func q (r) = {
37+ let s = b
38+ if ((size(r.payments) == 0))
3739 then throw("Payment not attached")
3840 else {
39- let s = q.payments[0]
40- let t = s.assetId
41- if ($isInstanceOf(t, "ByteVector"))
41+ let t = r.payments[0]
42+ let u = t.assetId
43+ if ($isInstanceOf(u, "ByteVector"))
4244 then {
43- let u = t
44- if ((u == r))
45- then (s.amount > 0)
45+ let v = u
46+ if ((v == s))
47+ then (t.amount > 0)
4648 else false
4749 }
4850 else throw("Wrong payment asset")
5052 }
5153
5254
53-@Callable(q)
54-func shutdown () = throw("shutdown")
55+@Callable(r)
56+func shutdown (w) = {
57+ let x = valueOrElse(getBoolean(this, c), true)
58+ if ((r.callerPublicKey == a))
59+ then [BooleanEntry(c, x)]
60+ else throw("you are not allow to do this!")
61+ }
5562
5663
5764
58-@Callable(q)
65+@Callable(r)
5966 func settings () = throw("settings")
6067
6168
6269
63-@Callable(q)
64-func create (v,w,x,y,z,A,B) = {
65- let C = valueOrElse(getInteger(this, e), 0)
66- let D = (C + 1)
67- if ((q.callerPublicKey == a))
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)]
70+@Callable(r)
71+func create (y,z,A,B,C,D,E) = {
72+ let F = valueOrElse(getInteger(this, f), 0)
73+ let G = (F + 1)
74+ if ((r.callerPublicKey == a))
75+ then [StringEntry(((d + i) + toString(G)), z), StringEntry(((d + j) + toString(G)), A), StringEntry(((d + m) + toString(G)), y), IntegerEntry(((d + g) + toString(G)), B), IntegerEntry(((d + h) + toString(G)), C), StringEntry(((d + k) + toString(G)), D), IntegerEntry(((d + l) + toString(G)), E), IntegerEntry((d + f), G)]
6976 else throw("you are not allowed")
7077 }
7178
7279
7380
74-@Callable(q)
75-func funding (C) = {
76- let y = valueOrErrorMessage(getInteger(this, ((c + f) + toString(C))), "err")
77- let z = valueOrErrorMessage(getInteger(this, ((c + g) + toString(C))), "err")
78- let B = valueOrErrorMessage(getInteger(this, ((c + k) + toString(C))), "err")
79- let E = toBase58String(q.caller.bytes)
80- let F = valueOrElse(getInteger(this, ((d + n) + toString(C))), 0)
81- let G = valueOrElse(getInteger(this, (((d + o) + E) + toString(C))), 0)
82- let H = valueOrElse(getInteger(this, ((d + m) + toString(C))), 0)
83- if ((y > height))
81+@Callable(r)
82+func funding (F) = {
83+ let B = valueOrErrorMessage(getInteger(this, ((d + g) + toString(F))), "err")
84+ let C = valueOrErrorMessage(getInteger(this, ((d + h) + toString(F))), "err")
85+ let E = valueOrErrorMessage(getInteger(this, ((d + l) + toString(F))), "err")
86+ let H = toBase58String(r.caller.bytes)
87+ let I = valueOrElse(getInteger(this, ((e + o) + toString(F))), 0)
88+ let J = valueOrElse(getInteger(this, (((e + p) + H) + toString(F))), 0)
89+ let K = valueOrElse(getInteger(this, ((e + n) + toString(F))), 0)
90+ if ((B > height))
8491 then throw("crowdfunding not started")
85- else if ((height >= z))
92+ else if ((height >= C))
8693 then throw("crowdfunding is over")
87- else if ((F >= B))
94+ else if ((I >= E))
8895 then throw("crowdfunding is reached to hard cap. thank you for participating!")
89- else if (!(p(q)))
96+ else if (!(q(r)))
9097 then throw("you have to attach payment greater than zero")
9198 else {
92- let s = q.payments[0]
93- let I = s.amount
94-[IntegerEntry(((d + m) + toString(C)), (H + 1)), IntegerEntry(((d + n) + toString(C)), (F + I)), IntegerEntry(((((d + o) + E) + "_") + toString(C)), (G + I))]
99+ let x = valueOrElse(getBoolean(this, c), true)
100+ if (x)
101+ then throw("emergency shutdown")
102+ else {
103+ let t = r.payments[0]
104+ let L = t.amount
105+[IntegerEntry(((e + n) + toString(F)), (K + 1)), IntegerEntry(((e + o) + toString(F)), (I + L)), IntegerEntry(((((e + p) + H) + "_") + toString(F)), (J + L))]
106+ }
95107 }
96108 }
97109
98110
99111
100-@Callable(q)
112+@Callable(r)
101113 func claim () = throw("event owner will claim the money")
102114
103115
104116
105-@Callable(q)
117+@Callable(r)
106118 func refund () = throw("if not success payers gonna refund")
107119
108120
109121
110-@Callable(q)
111-func delete (J) = if ((q.callerPublicKey == a))
112- then [DeleteEntry(J)]
122+@Callable(r)
123+func delete (M) = if ((r.callerPublicKey == a))
124+ then [DeleteEntry(M)]
113125 else throw("you are not allowed to do this!")
114126
115127
116-@Verifier(K)
117-func L () = sigVerify(K.bodyBytes, K.proofs[0], K.senderPublicKey)
128+@Verifier(N)
129+func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
118130
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx'
55
66 let b = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
77
8-let c = "_event_"
8+let c = "_shutDown_"
99
10-let d = "_payment_"
10+let d = "_event_"
1111
12-let e = "_eventId_"
12+let e = "_payment_"
1313
14-let f = "_startBlock_"
14+let f = "_eventId_"
1515
16-let g = "_endBlock_"
16+let g = "_startBlock_"
1717
18-let h = "_image_"
18+let h = "_endBlock_"
1919
20-let i = "_owner_"
20+let i = "_image_"
2121
22-let j = "_url_"
22+let j = "_owner_"
2323
24-let k = "_hardCap_"
24+let k = "_url_"
2525
26-let l = "_title_"
26+let l = "_hardCap_"
2727
28-let m = "_shareHolderCount_"
28+let m = "_title_"
2929
30-let n = "_totalPayment_"
30+let n = "_shareHolderCount_"
3131
32-let o = "_walletPayment_"
32+let o = "_totalPayment_"
3333
34-func p (q) = {
35- let r = b
36- if ((size(q.payments) == 0))
34+let p = "_walletPayment_"
35+
36+func q (r) = {
37+ let s = b
38+ if ((size(r.payments) == 0))
3739 then throw("Payment not attached")
3840 else {
39- let s = q.payments[0]
40- let t = s.assetId
41- if ($isInstanceOf(t, "ByteVector"))
41+ let t = r.payments[0]
42+ let u = t.assetId
43+ if ($isInstanceOf(u, "ByteVector"))
4244 then {
43- let u = t
44- if ((u == r))
45- then (s.amount > 0)
45+ let v = u
46+ if ((v == s))
47+ then (t.amount > 0)
4648 else false
4749 }
4850 else throw("Wrong payment asset")
4951 }
5052 }
5153
5254
53-@Callable(q)
54-func shutdown () = throw("shutdown")
55+@Callable(r)
56+func shutdown (w) = {
57+ let x = valueOrElse(getBoolean(this, c), true)
58+ if ((r.callerPublicKey == a))
59+ then [BooleanEntry(c, x)]
60+ else throw("you are not allow to do this!")
61+ }
5562
5663
5764
58-@Callable(q)
65+@Callable(r)
5966 func settings () = throw("settings")
6067
6168
6269
63-@Callable(q)
64-func create (v,w,x,y,z,A,B) = {
65- let C = valueOrElse(getInteger(this, e), 0)
66- let D = (C + 1)
67- if ((q.callerPublicKey == a))
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)]
70+@Callable(r)
71+func create (y,z,A,B,C,D,E) = {
72+ let F = valueOrElse(getInteger(this, f), 0)
73+ let G = (F + 1)
74+ if ((r.callerPublicKey == a))
75+ then [StringEntry(((d + i) + toString(G)), z), StringEntry(((d + j) + toString(G)), A), StringEntry(((d + m) + toString(G)), y), IntegerEntry(((d + g) + toString(G)), B), IntegerEntry(((d + h) + toString(G)), C), StringEntry(((d + k) + toString(G)), D), IntegerEntry(((d + l) + toString(G)), E), IntegerEntry((d + f), G)]
6976 else throw("you are not allowed")
7077 }
7178
7279
7380
74-@Callable(q)
75-func funding (C) = {
76- let y = valueOrErrorMessage(getInteger(this, ((c + f) + toString(C))), "err")
77- let z = valueOrErrorMessage(getInteger(this, ((c + g) + toString(C))), "err")
78- let B = valueOrErrorMessage(getInteger(this, ((c + k) + toString(C))), "err")
79- let E = toBase58String(q.caller.bytes)
80- let F = valueOrElse(getInteger(this, ((d + n) + toString(C))), 0)
81- let G = valueOrElse(getInteger(this, (((d + o) + E) + toString(C))), 0)
82- let H = valueOrElse(getInteger(this, ((d + m) + toString(C))), 0)
83- if ((y > height))
81+@Callable(r)
82+func funding (F) = {
83+ let B = valueOrErrorMessage(getInteger(this, ((d + g) + toString(F))), "err")
84+ let C = valueOrErrorMessage(getInteger(this, ((d + h) + toString(F))), "err")
85+ let E = valueOrErrorMessage(getInteger(this, ((d + l) + toString(F))), "err")
86+ let H = toBase58String(r.caller.bytes)
87+ let I = valueOrElse(getInteger(this, ((e + o) + toString(F))), 0)
88+ let J = valueOrElse(getInteger(this, (((e + p) + H) + toString(F))), 0)
89+ let K = valueOrElse(getInteger(this, ((e + n) + toString(F))), 0)
90+ if ((B > height))
8491 then throw("crowdfunding not started")
85- else if ((height >= z))
92+ else if ((height >= C))
8693 then throw("crowdfunding is over")
87- else if ((F >= B))
94+ else if ((I >= E))
8895 then throw("crowdfunding is reached to hard cap. thank you for participating!")
89- else if (!(p(q)))
96+ else if (!(q(r)))
9097 then throw("you have to attach payment greater than zero")
9198 else {
92- let s = q.payments[0]
93- let I = s.amount
94-[IntegerEntry(((d + m) + toString(C)), (H + 1)), IntegerEntry(((d + n) + toString(C)), (F + I)), IntegerEntry(((((d + o) + E) + "_") + toString(C)), (G + I))]
99+ let x = valueOrElse(getBoolean(this, c), true)
100+ if (x)
101+ then throw("emergency shutdown")
102+ else {
103+ let t = r.payments[0]
104+ let L = t.amount
105+[IntegerEntry(((e + n) + toString(F)), (K + 1)), IntegerEntry(((e + o) + toString(F)), (I + L)), IntegerEntry(((((e + p) + H) + "_") + toString(F)), (J + L))]
106+ }
95107 }
96108 }
97109
98110
99111
100-@Callable(q)
112+@Callable(r)
101113 func claim () = throw("event owner will claim the money")
102114
103115
104116
105-@Callable(q)
117+@Callable(r)
106118 func refund () = throw("if not success payers gonna refund")
107119
108120
109121
110-@Callable(q)
111-func delete (J) = if ((q.callerPublicKey == a))
112- then [DeleteEntry(J)]
122+@Callable(r)
123+func delete (M) = if ((r.callerPublicKey == a))
124+ then [DeleteEntry(M)]
113125 else throw("you are not allowed to do this!")
114126
115127
116-@Verifier(K)
117-func L () = sigVerify(K.bodyBytes, K.proofs[0], K.senderPublicKey)
128+@Verifier(N)
129+func O () = sigVerify(N.bodyBytes, N.proofs[0], N.senderPublicKey)
118130

github/deemru/w8io/026f985 
47.72 ms