tx · 6xGLTZue8e9aXVLTqTWDWGotF94RJWK9F4YwWRoB7mms

3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH:  -0.00500000 Waves

2022.09.25 20:39 [2244975] smart account 3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH > SELF 0.00000000 Waves

{ "type": 13, "id": "6xGLTZue8e9aXVLTqTWDWGotF94RJWK9F4YwWRoB7mms", "fee": 500000, "feeAssetId": null, "timestamp": 1664127581360, "version": 2, "chainId": 84, "sender": "3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH", "senderPublicKey": "46sMMaC9rMPQdyTE87RpcnevTY9oheuDqzfnuQzoyCtv", "proofs": [ "4T8nxvtwLboxFmJAmnMXY4pjsgViHtgSoLCCF4ZYcuX8vFz6EHoG2e5eM4qYxvWuuytu4xCaYDSpojVBkXsSXhgL" ], "script": "base64:BgIkCAISBwoFAQEBAQESBAoCAQgSBQoDAQgBEgQKAgEYEgQKAgEYCwERZ2V0SW50ZWdlck9yVGhyb3cCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQCsAgIJAKwCAgkArAICAgxDYW4ndCByZWFkICcFA2tleQINJyBhdCBhZGRyZXNzIAkApQgBBQdhZGRyZXNzARNnZXRJbnRlZ2VyT3JEZWZhdWx0AwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQUHZGVmYXVsdAERcGFyc2VJbnRPckRlZmF1bHQCCG1heWJlSW50B2RlZmF1bHQJAQt2YWx1ZU9yRWxzZQIJALYJAQUIbWF5YmVJbnQFB2RlZmF1bHQACGF1Y1N0YXJ0CQERZ2V0SW50ZWdlck9yVGhyb3cCBQR0aGlzAg5pbml0X3RpbWVzdGFtcAALYmlkRHVyYXRpb24JARFnZXRJbnRlZ2VyT3JUaHJvdwIFBHRoaXMCDGJpZF9kdXJhdGlvbgAOcmV2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ABAwMDCQBmAgUJYmlkQW1vdW50BQx0b3BCaWRBbW91bnQJAGcCBQdkZXBvc2l0BQliaWRBbW91bnQHCQAAAgUJYXVjdGlvbklkBQx0b3BBdWN0aW9uSWQHCQDNCAIFCXJldmVhbEJpZAkBC1N0cmluZ0VudHJ5AgUGdG9wS2V5BQlyZXZlYWxLZXkFCXJldmVhbEJpZAMJAGcCBQdkZXBvc2l0BQliaWRBbW91bnQJAM0IAgUJcmV2ZWFsQmlkCQELU3RyaW5nRW50cnkCBQZ0b3BLZXkFCXJldmVhbEtleQUJcmV2ZWFsQmlkA2ludgEIZmluYWxpemUCCWF1Y3Rpb25JZAZoYXNoZXMEB2FkZHJlc3MIBQNpbnYGY2FsbGVyCQENd3JhcEZpbmFsbGl6ZQMFCWF1Y3Rpb25JZAUGaGFzaGVzBQdhZGRyZXNzA2ludgEOZmluYWxpemVPcmlnaW4CCWF1Y3Rpb25JZAZoYXNoZXMEB2FkZHJlc3MIBQNpbnYMb3JpZ2luQ2FsbGVyCQENd3JhcEZpbmFsbGl6ZQMFCWF1Y3Rpb25JZAUGaGFzaGVzBQdhZGRyZXNzAKPHFBc=", "height": 2244975, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: C6SMm233V6fiwz69ZX7nbYk3AdVXthZ8cFiMkoQYsgpb Next: D9r9AcdsTGQt4SjWSAktJsqH7D6bQLhy6BeHf534iYUn Diff:
OldNewDifferences
4545 let G = ("reveal_" + E)
4646 let H = getString(this, G)
4747 let I = {
48- let J = split(valueOrErrorMessage(H, (("Bid with hash " + D) + " not found")), ",")
48+ let J = split(valueOrErrorMessage(H, (("Bid with hash " + D) + " not found")), "_")
4949 $Tuple3(parseIntValue(J[0]), parseIntValue(J[1]), J[2])
5050 }
5151 let K = I._1
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func a (b,c) = valueOrErrorMessage(getInteger(b, c), ((("Can't read '" + c) + "' at address ") + toString(b)))
55
66
77 func d (b,c,e) = valueOrElse(getInteger(b, c), e)
88
99
1010 func f (g,e) = valueOrElse(parseInt(g), e)
1111
1212
1313 let h = a(this, "init_timestamp")
1414
1515 let i = a(this, "bid_duration")
1616
1717 let j = a(this, "reveal_duration")
1818
1919 let k = a(this, "error_fee")
2020
2121 let l = a(this, "minimal_bid")
2222
2323 func m () = {
2424 let n = (i + j)
2525 let o = ((lastBlock.timestamp - h) / n)
2626 let p = ((o * n) + h)
2727 let q = (lastBlock.timestamp - p)
2828 let r = if ((q > i))
2929 then "reveal"
3030 else "bid"
3131 $Tuple2(o, r)
3232 }
3333
3434
3535 func s (t,u) = toBase58String(blake2b256_16Kb(keccak256_16Kb((toBytes(t) + toBytes(u)))))
3636
3737
3838 func v (w,x,b) = {
3939 let y = toString(b)
4040 let z = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
4141 func A (B,C) = {
4242 let D = x[C]
4343 let E = ((((toString(w) + "_") + y) + "_") + D)
4444 let F = ("bid_" + E)
4545 let G = ("reveal_" + E)
4646 let H = getString(this, G)
4747 let I = {
48- let J = split(valueOrErrorMessage(H, (("Bid with hash " + D) + " not found")), ",")
48+ let J = split(valueOrErrorMessage(H, (("Bid with hash " + D) + " not found")), "_")
4949 $Tuple3(parseIntValue(J[0]), parseIntValue(J[1]), J[2])
5050 }
5151 let K = I._1
5252 let L = I._2
5353 let t = I._3
5454 let M = ("top_" + t)
5555 let N = valueOrErrorMessage(getString(this, M), "Auction winner has not been determined")
5656 let O = parseIntValue(split(N, "_")[1])
5757 let P = if (if ((L > K))
5858 then true
5959 else (O != w))
6060 then (K - fraction(K, 10, 100))
6161 else if ((N == G))
6262 then (K - L)
6363 else K
6464 let Q = [DeleteEntry(G), DeleteEntry(F), ScriptTransfer(b, P, unit)]
6565 (B ++ Q)
6666 }
6767
6868 let R = z
6969 let S = size(R)
7070 let T = nil
7171 func U (V,W) = if ((W >= S))
7272 then V
7373 else A(V, R[W])
7474
7575 func X (V,W) = if ((W >= S))
7676 then V
7777 else throw("List size exceeds 10")
7878
7979 X(U(U(U(U(U(U(U(U(U(U(T, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10)
8080 }
8181
8282
8383 @Callable(Y)
8484 func init (Z,i,j,k,l) = if ((this != Y.caller))
8585 then throw("only self calls are allowed")
8686 else [IntegerEntry("init_timestamp", Z), IntegerEntry("bid_duration", i), IntegerEntry("reveal_duration", j), IntegerEntry("error_fee", k), IntegerEntry("minimal_bid", l)]
8787
8888
8989
9090 @Callable(Y)
9191 func bid (w,D) = {
9292 let b = toString(Y.caller)
9393 let F = ((((("bid_" + toString(w)) + "_") + b) + "_") + D)
9494 let aa = if (if ((size(Y.payments) == 1))
9595 then (Y.payments[0].assetId == unit)
9696 else false)
9797 then Y.payments[0].amount
9898 else throw("Single payment required")
9999 let ab = m()
100100 let o = ab._1
101101 let ac = ab._2
102102 if ((o != w))
103103 then throw("Auctions is already over")
104104 else if ((ac != "bid"))
105105 then throw("Bid period is over")
106106 else if (isDefined(getInteger(this, F)))
107107 then throw("Bid with exact amount already presented")
108108 else [IntegerEntry(F, aa)]
109109 }
110110
111111
112112
113113 @Callable(Y)
114114 func reveal (w,t,ad) = {
115115 let b = toString(Y.caller)
116116 let D = s(t, ad)
117117 let E = ((((toString(w) + "_") + b) + "_") + D)
118118 let G = ("reveal_" + E)
119119 let M = ("top_" + t)
120120 let K = valueOrErrorMessage(getInteger(this, ("bid_" + E)), ("Bid doesn't exists " + D))
121121 let ae = m()
122122 let o = ae._1
123123 let ac = ae._2
124124 if ((o != w))
125125 then throw("Auctions is already over")
126126 else if ((ac != "reveal"))
127127 then throw("Reveal period is over")
128128 else if (isDefined(getString(this, G)))
129129 then throw("Bid is already revealed")
130130 else {
131131 let af = [StringEntry(G, ((((toString(K) + ",") + toString(ad)) + ",") + t))]
132132 let ag = getString(this, M)
133133 if (isDefined(ag))
134134 then {
135135 let ah = value(ag)
136136 let ai = value(getString(this, ah))
137137 let aj = parseIntValue(split(ai, ",")[1])
138138 let ak = parseIntValue(split(ah, "_")[1])
139139 if (if (if ((ad > aj))
140140 then (K >= ad)
141141 else false)
142142 then (w == ak)
143143 else false)
144144 then (af :+ StringEntry(M, G))
145145 else af
146146 }
147147 else if ((K >= ad))
148148 then (af :+ StringEntry(M, G))
149149 else af
150150 }
151151 }
152152
153153
154154
155155 @Callable(Y)
156156 func finalize (w,x) = {
157157 let b = Y.caller
158158 v(w, x, b)
159159 }
160160
161161
162162
163163 @Callable(Y)
164164 func finalizeOrigin (w,x) = {
165165 let b = Y.originCaller
166166 v(w, x, b)
167167 }
168168
169169

github/deemru/w8io/fabc49c 
49.83 ms