tx · kGvUWxe2yKtbURaYe33xr3PLryapsWWpjuvCryTf6en

3N8bfBHf85mChgxdRoTj11XEHHREfQmz6dw:  -0.01000000 Waves

2023.03.13 01:53 [2487438] smart account 3N8bfBHf85mChgxdRoTj11XEHHREfQmz6dw > SELF 0.00000000 Waves

{ "type": 13, "id": "kGvUWxe2yKtbURaYe33xr3PLryapsWWpjuvCryTf6en", "fee": 1000000, "feeAssetId": null, "timestamp": 1678661639854, "version": 2, "chainId": 84, "sender": "3N8bfBHf85mChgxdRoTj11XEHHREfQmz6dw", "senderPublicKey": "6G9zJtFnV938b3kA2t6HebP8i69A1NMGVQ5qQ78fF1FR", "proofs": [ "2nCaoaGJpF5RfLYNZtv2bnEwmwdU8SR34BJUkQ6muvft5mzfBDpGXVHCM77ZgeiNf3V2n7TcdbPwcgXgWKJZ244c" ], "script": "base64:AAIFAAAAAAAAACEIAhILCgkBAQEBCAgICAESABIAEgUKAwEICBIFCgMBAQEAAAAVAAAAAAJwcwIAAAANUFJFU0FMRV9TVEFSVAAAAAACcGQCAAAAEFBSRVNBTEVfRFVSQVRJT04AAAAAAmNzAgAAAAtDTEFJTV9TVEFSVAAAAAACY2QCAAAADkNMQUlNX0RVUkFUSU9OAAAAAAFwAgAAAAlQUklDRV9JRE8AAAAABHAxSUQCAAAAEFBSSUNFXzFfQVNTRVRfSUQAAAAACmFkbWluRXJyb3ICAAAALk9ubHkgdGhlIEFkbWluIGl0c2VsZiBjYW4gaW52b2tlIHRoaXMgZnVuY3Rpb24AAAAABHAySUQCAAAAEFBSSUNFXzJfQVNTRVRfSUQAAAAABHAzSUQCAAAAEFBSSUNFXzNfQVNTRVRfSUQAAAAABHA0SUQCAAAAEFBSSUNFXzRfQVNTRVRfSUQAAAAAA21pYQIAAAARTUlOX0FNT1VOVF9JTlZFU1QAAAAABW1haW5hAgAAAApNQUlOX0FTU0VUAAAAAAdmb3JTYWxlAgAAAA5UT1RBTF9GT1JfU0FMRQAAAAAJdG90YWxTYWxlAgAAA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W5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAAB2FkZHJlc3MFAAAABVZhbHVlCQACWQAAAAEFAAAAB2Fzc2V0SWQFAAAAA25pbAkAAAIAAAABBQAAAAphZG1pbkVycm9yAAAAAWkBAAAABHRpbWUAAAADAAAADHByZXNhbGVTdGFydAAAAA9wcmVzYWxlRHVyYXRpb24AAAAUZGlzdHJpYnV0aW9uRHVyYXRpb24DAwkAAAAAAAACCAUAAAABaQAAAAZjYWxsZXIFAAAABHRoaXMGCQAAAAAAAAIICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMJAQAAABFAZXh0ck5hdGl2ZSgxMDUyKQAAAAIFAAAABHRoaXMCAAAABWFkbWluAwkAAGcAAAACBQAAAA9wcmVzYWxlRHVyYXRpb24FAAAADHByZXNhbGVTdGFydAkAAAIAAAABAgAAADJQcmVzYWxlRHVyYXRpb24gY2FuJ3QgYmUgYmlnZ2VyIHRoYW4gIFByZXNhbGVTdGFydAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAACcHMFAAAADHByZXNhbGVTdGFydAkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAACcGQFAAAAD3ByZXNhbGVEdXJhdGlvbgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgUAAAAFZGlzZHUFAAAAFGRpc3RyaWJ1dGlvbkR1cmF0aW9uBQAAAANuaWwJAAACAAAAAQUAAAAKYWRtaW5FcnJvcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5gi4MDQ==", "height": 2487438, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 2zAEnCMo4o9pQEm57rHWbZwV4pM2mF7PnUxD1L1hx8hS Next: 3Ck2G8Mytn8CGR7KDCHGdR1Yeto8RB9ZA8cATjRFvtJ2 Diff:
OldNewDifferences
4040 func s (t) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(t))).id, (("Asset Id: " + t) + " is invalid.")))
4141
4242
43-@Callable(u)
44-func AddAdmin (v) = if ((u.caller.bytes == this.bytes))
45- then [StringEntry("admin", v)]
46- else throw(g)
43+let u = "3PLVPoB6KsXCtqowhzWJStijNw7SjsPKsq6"
4744
45+let v = Address(fromBase58String(u))
4846
49-
50-@Callable(u)
51-func constructor (w,x,y,z,A,B,C,D,E) = {
52- let F = s(A)
47+@Callable(w)
48+func constructor (x,y,z,A,B,C,D,E,F) = {
5349 let G = s(B)
5450 let H = s(C)
55- if (if ((u.caller == this))
51+ let I = s(D)
52+ if (if ((w.caller == this))
5653 then true
57- else (u.caller.bytes == getBinaryValue(this, "admin")))
58- then if ((x >= w))
54+ else (w.caller.bytes == getBinaryValue(v, "admin")))
55+ then if ((y >= x))
5956 then throw("PresaleDuration can't be bigger than PresaleStart")
60- else if ((E > z))
57+ else if ((F > A))
6158 then throw("minInvestAmount can't be bigger than price")
62- else if (if (if ((F == G))
59+ else if (if (if ((G == H))
6360 then true
64- else (F == H))
61+ else (G == I))
6562 then true
66- else (G == H))
63+ else (H == I))
6764 then throw("Each Asset must be different from the other.")
68- else [StringEntry(f, A), StringEntry(h, B), StringEntry(i, C), StringEntry(j, D), IntegerEntry(a, w), IntegerEntry(b, x), IntegerEntry(e, z), IntegerEntry(k, E), IntegerEntry(n, 0), IntegerEntry(p, y)]
65+ else [StringEntry(f, B), StringEntry(h, C), StringEntry(i, D), StringEntry(j, E), IntegerEntry(a, x), IntegerEntry(b, y), IntegerEntry(e, A), IntegerEntry(k, F), IntegerEntry(n, 0), IntegerEntry(p, z)]
6966 else throw(g)
7067 }
7168
7269
7370
74-@Callable(u)
75-func set () = if (if ((u.caller == this))
71+@Callable(w)
72+func set () = if (if ((w.caller == this))
7673 then true
77- else (u.caller.bytes == getBinaryValue(this, "admin")))
78- then if ((size(u.payments) != 1))
74+ else (w.caller.bytes == getBinaryValue(v, "admin")))
75+ then if ((size(w.payments) != 1))
7976 then throw("exactly 1 payment must be attached")
80- else [IntegerEntry(m, value(u.payments[0]).amount), BinaryEntry(l, value(u.payments[0].assetId))]
77+ else [IntegerEntry(m, value(w.payments[0]).amount), BinaryEntry(l, value(w.payments[0].assetId))]
8178 else throw(g)
8279
8380
8481
85-@Callable(u)
82+@Callable(w)
8683 func invest () = {
87- let I = getBinaryValue(this, l)
88- let w = getIntegerValue(this, a)
89- let x = getIntegerValue(this, b)
90- let J = (w + x)
91- let z = getIntegerValue(this, e)
92- let K = height
93- let L = value(u.payments[0])
94- let M = toBase58String(value(L.assetId))
95- let N = L.amount
96- let F = getStringValue(this, f)
97- let G = getStringValue(this, h)
98- let H = getStringValue(this, i)
99- let O = getStringValue(this, j)
100- let P = getIntegerValue(this, n)
101- let Q = getIntegerValue(this, m)
102- let R = getIntegerValue(this, k)
103- if ((w >= K))
84+ let J = getBinaryValue(this, l)
85+ let x = getIntegerValue(this, a)
86+ let y = getIntegerValue(this, b)
87+ let K = (x + y)
88+ let A = getIntegerValue(this, e)
89+ let L = height
90+ let M = value(w.payments[0])
91+ let N = toBase58String(value(M.assetId))
92+ let O = M.amount
93+ let G = getStringValue(this, f)
94+ let H = getStringValue(this, h)
95+ let I = getStringValue(this, i)
96+ let P = getStringValue(this, j)
97+ let Q = getIntegerValue(this, n)
98+ let R = getIntegerValue(this, m)
99+ let S = getIntegerValue(this, k)
100+ if ((x >= L))
104101 then throw("presale has not been started yet")
105- else if ((K >= J))
102+ else if ((L >= K))
106103 then throw("presale has been already ended")
107- else if ((size(u.payments) != 1))
104+ else if ((size(w.payments) != 1))
108105 then throw("exactly 1 payment is expected")
109- else if (if (if (if ((M != F))
110- then (M != G)
106+ else if (if (if (if ((N != G))
107+ then (N != H)
111108 else false)
112- then (M != H)
109+ then (N != I)
113110 else false)
114- then (M != O)
111+ then (N != P)
115112 else false)
116- then throw(((("invalid payment asset id:" + M) + " Expected:") + F))
117- else if ((P >= Q))
113+ then throw(((("invalid payment asset id:" + N) + " Expected:") + G))
114+ else if ((Q >= R))
118115 then throw("Pre-sale asset has been - sold consider to use smaller payment")
119- else if ((R > N))
116+ else if ((S > O))
120117 then throw("Amount less than the minimum to be invested.")
121118 else {
122- let S = ((N / z) * q)
123- let T = {
124- let U = getInteger(this, (o + toBase58String(u.caller.bytes)))
125- if ($isInstanceOf(U, "Int"))
119+ let T = ((O / A) * q)
120+ let U = {
121+ let V = getInteger(this, (o + toBase58String(w.caller.bytes)))
122+ if ($isInstanceOf(V, "Int"))
126123 then {
127- let V = U
128- V
124+ let W = V
125+ W
129126 }
130127 else 0
131128 }
132-[ScriptTransfer(u.caller, S, I), IntegerEntry(n, (P + S)), IntegerEntry((o + toBase58String(u.caller.bytes)), (S + T)), IntegerEntry(((((o + toBase58String(u.caller.bytes)) + "__") + M) + "__VALUE"), N), BooleanEntry((((o + toBase58String(u.caller.bytes)) + "__") + M), true)]
129+[ScriptTransfer(w.caller, T, J), IntegerEntry(n, (Q + T)), IntegerEntry((o + toBase58String(w.caller.bytes)), (T + U)), IntegerEntry(((((o + toBase58String(w.caller.bytes)) + "__") + N) + "__VALUE"), O), BooleanEntry((((o + toBase58String(w.caller.bytes)) + "__") + N), true)]
133130 }
134131 }
135132
136133
137134
138-@Callable(u)
139-func adminV (W,v,t) = if (if ((u.caller == this))
135+@Callable(w)
136+func adminV (X,Y,t) = if (if ((w.caller == this))
140137 then true
141- else (u.caller == Address(getBinaryValue(this, "admin"))))
142- then [ScriptTransfer(Address(fromBase58String(v)), W, fromBase58String(t))]
138+ else (w.caller == Address(getBinaryValue(this, "admin"))))
139+ then [ScriptTransfer(Address(fromBase58String(Y)), X, fromBase58String(t))]
143140 else throw(g)
144141
145142
146143
147-@Callable(u)
148-func time (w,x,y) = if (if ((u.caller == this))
144+@Callable(w)
145+func time (x,y,z) = if (if ((w.caller == this))
149146 then true
150- else (u.caller.bytes == getBinaryValue(this, "admin")))
151- then if ((x >= w))
147+ else (w.caller.bytes == getBinaryValue(this, "admin")))
148+ then if ((y >= x))
152149 then throw("PresaleDuration can't be bigger than PresaleStart")
153- else [IntegerEntry(a, w), IntegerEntry(b, x), IntegerEntry(p, y)]
150+ else [IntegerEntry(a, x), IntegerEntry(b, y), IntegerEntry(p, z)]
154151 else throw(g)
155152
156153
157-@Verifier(X)
158-func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey)
154+@Verifier(Z)
155+func aa () = sigVerify(Z.bodyBytes, Z.proofs[0], Z.senderPublicKey)
159156
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "PRESALE_START"
55
66 let b = "PRESALE_DURATION"
77
88 let c = "CLAIM_START"
99
1010 let d = "CLAIM_DURATION"
1111
1212 let e = "PRICE_IDO"
1313
1414 let f = "PRICE_1_ASSET_ID"
1515
1616 let g = "Only the Admin itself can invoke this function"
1717
1818 let h = "PRICE_2_ASSET_ID"
1919
2020 let i = "PRICE_3_ASSET_ID"
2121
2222 let j = "PRICE_4_ASSET_ID"
2323
2424 let k = "MIN_AMOUNT_INVEST"
2525
2626 let l = "MAIN_ASSET"
2727
2828 let m = "TOTAL_FOR_SALE"
2929
3030 let n = "TOTAL_SALE"
3131
3232 let o = "TOTAL_INVEST_"
3333
3434 let p = "DISTRIBUTION_DURATION"
3535
3636 let q = 100000000
3737
3838 let r = 10000000000
3939
4040 func s (t) = toBase58String(valueOrErrorMessage(value(assetInfo(fromBase58String(t))).id, (("Asset Id: " + t) + " is invalid.")))
4141
4242
43-@Callable(u)
44-func AddAdmin (v) = if ((u.caller.bytes == this.bytes))
45- then [StringEntry("admin", v)]
46- else throw(g)
43+let u = "3PLVPoB6KsXCtqowhzWJStijNw7SjsPKsq6"
4744
45+let v = Address(fromBase58String(u))
4846
49-
50-@Callable(u)
51-func constructor (w,x,y,z,A,B,C,D,E) = {
52- let F = s(A)
47+@Callable(w)
48+func constructor (x,y,z,A,B,C,D,E,F) = {
5349 let G = s(B)
5450 let H = s(C)
55- if (if ((u.caller == this))
51+ let I = s(D)
52+ if (if ((w.caller == this))
5653 then true
57- else (u.caller.bytes == getBinaryValue(this, "admin")))
58- then if ((x >= w))
54+ else (w.caller.bytes == getBinaryValue(v, "admin")))
55+ then if ((y >= x))
5956 then throw("PresaleDuration can't be bigger than PresaleStart")
60- else if ((E > z))
57+ else if ((F > A))
6158 then throw("minInvestAmount can't be bigger than price")
62- else if (if (if ((F == G))
59+ else if (if (if ((G == H))
6360 then true
64- else (F == H))
61+ else (G == I))
6562 then true
66- else (G == H))
63+ else (H == I))
6764 then throw("Each Asset must be different from the other.")
68- else [StringEntry(f, A), StringEntry(h, B), StringEntry(i, C), StringEntry(j, D), IntegerEntry(a, w), IntegerEntry(b, x), IntegerEntry(e, z), IntegerEntry(k, E), IntegerEntry(n, 0), IntegerEntry(p, y)]
65+ else [StringEntry(f, B), StringEntry(h, C), StringEntry(i, D), StringEntry(j, E), IntegerEntry(a, x), IntegerEntry(b, y), IntegerEntry(e, A), IntegerEntry(k, F), IntegerEntry(n, 0), IntegerEntry(p, z)]
6966 else throw(g)
7067 }
7168
7269
7370
74-@Callable(u)
75-func set () = if (if ((u.caller == this))
71+@Callable(w)
72+func set () = if (if ((w.caller == this))
7673 then true
77- else (u.caller.bytes == getBinaryValue(this, "admin")))
78- then if ((size(u.payments) != 1))
74+ else (w.caller.bytes == getBinaryValue(v, "admin")))
75+ then if ((size(w.payments) != 1))
7976 then throw("exactly 1 payment must be attached")
80- else [IntegerEntry(m, value(u.payments[0]).amount), BinaryEntry(l, value(u.payments[0].assetId))]
77+ else [IntegerEntry(m, value(w.payments[0]).amount), BinaryEntry(l, value(w.payments[0].assetId))]
8178 else throw(g)
8279
8380
8481
85-@Callable(u)
82+@Callable(w)
8683 func invest () = {
87- let I = getBinaryValue(this, l)
88- let w = getIntegerValue(this, a)
89- let x = getIntegerValue(this, b)
90- let J = (w + x)
91- let z = getIntegerValue(this, e)
92- let K = height
93- let L = value(u.payments[0])
94- let M = toBase58String(value(L.assetId))
95- let N = L.amount
96- let F = getStringValue(this, f)
97- let G = getStringValue(this, h)
98- let H = getStringValue(this, i)
99- let O = getStringValue(this, j)
100- let P = getIntegerValue(this, n)
101- let Q = getIntegerValue(this, m)
102- let R = getIntegerValue(this, k)
103- if ((w >= K))
84+ let J = getBinaryValue(this, l)
85+ let x = getIntegerValue(this, a)
86+ let y = getIntegerValue(this, b)
87+ let K = (x + y)
88+ let A = getIntegerValue(this, e)
89+ let L = height
90+ let M = value(w.payments[0])
91+ let N = toBase58String(value(M.assetId))
92+ let O = M.amount
93+ let G = getStringValue(this, f)
94+ let H = getStringValue(this, h)
95+ let I = getStringValue(this, i)
96+ let P = getStringValue(this, j)
97+ let Q = getIntegerValue(this, n)
98+ let R = getIntegerValue(this, m)
99+ let S = getIntegerValue(this, k)
100+ if ((x >= L))
104101 then throw("presale has not been started yet")
105- else if ((K >= J))
102+ else if ((L >= K))
106103 then throw("presale has been already ended")
107- else if ((size(u.payments) != 1))
104+ else if ((size(w.payments) != 1))
108105 then throw("exactly 1 payment is expected")
109- else if (if (if (if ((M != F))
110- then (M != G)
106+ else if (if (if (if ((N != G))
107+ then (N != H)
111108 else false)
112- then (M != H)
109+ then (N != I)
113110 else false)
114- then (M != O)
111+ then (N != P)
115112 else false)
116- then throw(((("invalid payment asset id:" + M) + " Expected:") + F))
117- else if ((P >= Q))
113+ then throw(((("invalid payment asset id:" + N) + " Expected:") + G))
114+ else if ((Q >= R))
118115 then throw("Pre-sale asset has been - sold consider to use smaller payment")
119- else if ((R > N))
116+ else if ((S > O))
120117 then throw("Amount less than the minimum to be invested.")
121118 else {
122- let S = ((N / z) * q)
123- let T = {
124- let U = getInteger(this, (o + toBase58String(u.caller.bytes)))
125- if ($isInstanceOf(U, "Int"))
119+ let T = ((O / A) * q)
120+ let U = {
121+ let V = getInteger(this, (o + toBase58String(w.caller.bytes)))
122+ if ($isInstanceOf(V, "Int"))
126123 then {
127- let V = U
128- V
124+ let W = V
125+ W
129126 }
130127 else 0
131128 }
132-[ScriptTransfer(u.caller, S, I), IntegerEntry(n, (P + S)), IntegerEntry((o + toBase58String(u.caller.bytes)), (S + T)), IntegerEntry(((((o + toBase58String(u.caller.bytes)) + "__") + M) + "__VALUE"), N), BooleanEntry((((o + toBase58String(u.caller.bytes)) + "__") + M), true)]
129+[ScriptTransfer(w.caller, T, J), IntegerEntry(n, (Q + T)), IntegerEntry((o + toBase58String(w.caller.bytes)), (T + U)), IntegerEntry(((((o + toBase58String(w.caller.bytes)) + "__") + N) + "__VALUE"), O), BooleanEntry((((o + toBase58String(w.caller.bytes)) + "__") + N), true)]
133130 }
134131 }
135132
136133
137134
138-@Callable(u)
139-func adminV (W,v,t) = if (if ((u.caller == this))
135+@Callable(w)
136+func adminV (X,Y,t) = if (if ((w.caller == this))
140137 then true
141- else (u.caller == Address(getBinaryValue(this, "admin"))))
142- then [ScriptTransfer(Address(fromBase58String(v)), W, fromBase58String(t))]
138+ else (w.caller == Address(getBinaryValue(this, "admin"))))
139+ then [ScriptTransfer(Address(fromBase58String(Y)), X, fromBase58String(t))]
143140 else throw(g)
144141
145142
146143
147-@Callable(u)
148-func time (w,x,y) = if (if ((u.caller == this))
144+@Callable(w)
145+func time (x,y,z) = if (if ((w.caller == this))
149146 then true
150- else (u.caller.bytes == getBinaryValue(this, "admin")))
151- then if ((x >= w))
147+ else (w.caller.bytes == getBinaryValue(this, "admin")))
148+ then if ((y >= x))
152149 then throw("PresaleDuration can't be bigger than PresaleStart")
153- else [IntegerEntry(a, w), IntegerEntry(b, x), IntegerEntry(p, y)]
150+ else [IntegerEntry(a, x), IntegerEntry(b, y), IntegerEntry(p, z)]
154151 else throw(g)
155152
156153
157-@Verifier(X)
158-func Y () = sigVerify(X.bodyBytes, X.proofs[0], X.senderPublicKey)
154+@Verifier(Z)
155+func aa () = sigVerify(Z.bodyBytes, Z.proofs[0], Z.senderPublicKey)
159156

github/deemru/w8io/169f3d6 
61.30 ms