tx · 4XamF6khEMBHypq4b3rWsPUNDyhp5gT1wVJkmthEgqv9

3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH:  -0.00400000 Waves

2022.09.25 16:53 [2244753] smart account 3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH > SELF 0.00000000 Waves

{ "type": 13, "id": "4XamF6khEMBHypq4b3rWsPUNDyhp5gT1wVJkmthEgqv9", "fee": 400000, "feeAssetId": null, "timestamp": 1664114035770, "version": 2, "chainId": 84, "sender": "3MxssetYXJfiGwzo9pqChsSwYj3tCYq5FFH", "senderPublicKey": "46sMMaC9rMPQdyTE87RpcnevTY9oheuDqzfnuQzoyCtv", "proofs": [ "4shpQQ8PLQe7QQrCwzyFLGnR4dmh6ha16xC4aLDZpNhtM5q1x5GD8yE7JBn9As2Uv7KjRU7KwfF3LRSbDjwNnHAk" ], "script": "base64:BgIYCAISBwoFAQEBAQESBAoCAQgSBQoDAQgBCgERZ2V0SW50ZWdlck9yVGhyb3cCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJoIAgUHYWRkcmVzcwUDa2V5CQCsAgIJAKwCAgkArAICAgxDYW4ndCByZWFkICcFA2tleQINJyBhdCBhZGRyZXNzIAkApQgBBQdhZGRyZXNzARNnZXRJbnRlZ2VyT3JEZWZhdWx0AwdhZGRyZXNzA2tleQdkZWZhdWx0CQELdmFsdWVPckVsc2UCCQCaCAIFB2FkZHJlc3MFA2tleQUHZGVmYXVsdAERcGFyc2VJbnRPckRlZmF1bHQCCG1heWJlSW50B2RlZmF1bHQJAQt2YWx1ZU9yRWxzZQIJALYJAQUIbWF5YmVJbnQFB2RlZmF1bHQACGF1Y1N0YXJ0CQERZ2V0SW50ZWdlck9yVGhyb3cCBQR0aGlzAg5pbml0X3RpbWVzdGFtcAALYmlkRHVyYXRpb24JARFnZXRJbnRlZ2VyT3JUaHJvdwIFBHRoaXMCDGJpZF9kdXJhdGlvbgAOcmV2ZWFsRHVyYXRpb24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2YWx1ZQEJAJ0IAgUEdGhpcwkBBXZhbHVlAQUSdG9wQmlkZGVyUmV2ZWFsS2V5BAx0b3BCaWRBbW91bnQJAQ1wYXJzZUludFZhbHVlAQkAkQMCCQC1CQIFDXRvcEJpZGRlckRhdGECASwAAQMDCQBmAgUJYmlkQW1vdW50BQx0b3BCaWRBbW91bnQJAGcCBQdkZXBvc2l0BQliaWRBbW91bnQHCQDNCAIFCXJldmVhbEJpZAkBC1N0cmluZ0VudHJ5AgUGdG9wS2V5BQlyZXZlYWxLZXkFCXJldmVhbEJpZAkAzQgCBQlyZXZlYWxCaWQJAQtTdHJpbmdFbnRyeQIFBnRvcEtleQUJcmV2ZWFsS2V5ALc7Jnk=", "height": 2244753, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DjNupLd74zpzo19usda4tfG3rAEAo1eNw6DDKj5orhag Next: 9wjTV58BXSA33YMHQzzcEzFiKfMKzJW7RwfK4iNzwJhH Diff:
OldNewDifferences
7272 let E = ((((toString(x) + "_") + b) + "_") + y)
7373 let F = ("reveal_" + E)
7474 let G = ((("top_" + toString(x)) + "_") + t)
75- let H = valueOrErrorMessage(getInteger(this, ("bid_" + E)), ("Bid doesn't exists" + y))
75+ let H = valueOrErrorMessage(getInteger(this, ("bid_" + E)), ("Bid doesn't exists " + y))
7676 let I = m()
7777 let o = I._1
7878 let C = I._2
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 @Callable(v)
3939 func init (w,i,j,k,l) = if ((this != v.caller))
4040 then throw("only self calls are allowed")
4141 else [IntegerEntry("init_timestamp", w), IntegerEntry("bid_duration", i), IntegerEntry("reveal_duration", j), IntegerEntry("error_fee", k), IntegerEntry("minimal_bid", l)]
4242
4343
4444
4545 @Callable(v)
4646 func bid (x,y) = {
4747 let b = toString(v.caller)
4848 let z = ((((("bid_" + toString(x)) + "_") + b) + "_") + y)
4949 let A = if (if ((size(v.payments) == 1))
5050 then (v.payments[0].assetId == unit)
5151 else false)
5252 then v.payments[0].amount
5353 else throw("Single payment required")
5454 let B = m()
5555 let o = B._1
5656 let C = B._2
5757 if ((o != x))
5858 then throw("Auctions is already over")
5959 else if ((C != "bid"))
6060 then throw("Bid period is over")
6161 else if (isDefined(getInteger(this, z)))
6262 then throw("Bid with exact amount already presented")
6363 else [IntegerEntry(z, A)]
6464 }
6565
6666
6767
6868 @Callable(v)
6969 func reveal (x,t,D) = {
7070 let b = toString(v.caller)
7171 let y = s(t, D)
7272 let E = ((((toString(x) + "_") + b) + "_") + y)
7373 let F = ("reveal_" + E)
7474 let G = ((("top_" + toString(x)) + "_") + t)
75- let H = valueOrErrorMessage(getInteger(this, ("bid_" + E)), ("Bid doesn't exists" + y))
75+ let H = valueOrErrorMessage(getInteger(this, ("bid_" + E)), ("Bid doesn't exists " + y))
7676 let I = m()
7777 let o = I._1
7878 let C = I._2
7979 if ((o != x))
8080 then throw("Auctions is already over")
8181 else if ((C != "reveal"))
8282 then throw("Reveal period is over")
8383 else if (isDefined(getString(this, F)))
8484 then throw("Bid is already revealed")
8585 else {
8686 let J = [StringEntry(F, ((((toString(H) + ",") + toString(D)) + ",") + t))]
8787 let K = getString(this, G)
8888 if (isDefined(K))
8989 then {
9090 let L = value(getString(this, value(K)))
9191 let M = parseIntValue(split(L, ",")[1])
9292 if (if ((D > M))
9393 then (H >= D)
9494 else false)
9595 then (J :+ StringEntry(G, F))
9696 else J
9797 }
9898 else (J :+ StringEntry(G, F))
9999 }
100100 }
101101
102102

github/deemru/w8io/169f3d6 
28.13 ms