tx · A5bUvzjWeP5FvgtF8nzpmzqyX4UVTKNdrQmd3GHNNCnd

3N4hrfxuWkoc83C7J31SCQBkJQsfTPCSoag:  -0.01000000 Waves

2019.07.15 14:19 [586826] smart account 3N4hrfxuWkoc83C7J31SCQBkJQsfTPCSoag > SELF 0.00000000 Waves

{ "type": 13, "id": "A5bUvzjWeP5FvgtF8nzpmzqyX4UVTKNdrQmd3GHNNCnd", "fee": 1000000, "feeAssetId": null, "timestamp": 1563189548263, "version": 1, "sender": "3N4hrfxuWkoc83C7J31SCQBkJQsfTPCSoag", "senderPublicKey": "6TQdkfpDP7M5rnTQ8yzpfPbihGLjwGJP13qDEAcmdzrB", "proofs": [ "oiQhoV5CZf2TRj71KHRYTNfTkRAcdRBALq3HRyp4ZuLqcyCVngB6tE8ua9FBfgLTHeh8igEgbwixxzHnWnSrtQ8" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAQAAABJ1c2VySGFzQWRtaW5BY2Nlc3MAAAABAAAAB2FkZHJlc3MJAAAAAAAAAgUAAAAHYWRkcmVzcwUAAAAEdGhpcwEAAAAEYWRkcgAAAAIAAAAHdG9rZW5JZAAAAANwYXIJAAEsAAAAAgkAASwAAAACCQACWAAAAAEFAAAAB3Rva2VuSWQCAAAAAV8FAAAAA3BhcgEAAAAFc2FkZHIAAAACAAAAB3Rva2VuSWQAAAADcGFyCQABLAAAAAIJAAEsAAAAAgUAAAAHdG9rZW5JZAIAAAABXwUAAAADcGFyAAAAAwAAAAFpAQAAAANiZXQAAAABAAAADXRva2VuSWRTdHJpbmcEAAAAFnN0YXJ0VHJhbnNhY3Rpb25IZWlnaHQJAQAAABFAZXh0ck5hdGl2ZSgxMDUwKQAAAAIFAAAABHRoaXMJAQAAAAVzYWRkcgAAAAIFAAAADXRva2VuSWRTdHJpbmcCAAAABXN0YXJ0BAAAAAl0aW1lRGVsdGEJAABlAAAAAgUAAAAGaGVpZ2h0BQAAABZzdGFydFRyYW5zYWN0aW9uSGVpZ2h0BAAAAA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aW5nBAAAAAZsZW5ndGgJAABlAAAAAgkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAVzdGFydAUAAAAGaGVpZ2h0BAAAAAVkZWx0YQkAAGUAAAACCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAAR0aGlzCQEAAAAEYWRkcgAAAAIFAAAAB3Rva2VuSWQCAAAACGR1cmF0aW9uBQAAAAZsZW5ndGgDCQAAZgAAAAIFAAAABWRlbHRhAAAAAAAAAAAACQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAACRUaGUgYXVjdGlvbiBjYW5ub3QgYmUgZmluaXNoZWQgeWV0ISAJAAGkAAAAAQUAAAAFZGVsdGECAAAAEiBtaW51dGVzIHJlbWFpbmluZwQAAAALbWF4QmV0T3duZXIJAQAAABRhZGRyZXNzRnJvbVB1YmxpY0tleQAAAAEJAAGbAAAAAQkBAAAAEUBleHRyTmF0aXZlKDEwNTMpAAAAAgUAAAAEdGhpcwkBAAAABGFkZHIAAAACBQAAAAd0b2tlbklkAgAAAAttYXhCZXRPd25lcgkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAQAAAARhZGRyAAAAAgUAAAAHdG9rZW5JZAIAAAAFc3RhcnQAAAAAAAAAAAAFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAttYXhCZXRPd25lcgAAAAAAAAAAAQUAAAAHdG9rZW5JZAUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAdTEb6+", "chainId": 84, "height": 586826, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+func a (b) = (b == this)
5+
6+
7+func c (d,e) = ((toBase58String(d) + "_") + e)
8+
9+
10+func f (d,e) = ((d + "_") + e)
11+
12+
13+@Callable(g)
14+func bet (h) = {
15+ let i = getIntegerValue(this, f(h, "start"))
16+ let j = (height - i)
17+ let k = getIntegerValue(this, f(h, "maxBet"))
18+ let l = addressFromPublicKey(toBytes(getStringValue(this, f(h, "maxBetOwner"))))
19+ let m = extract(g.payment)
20+ if ((j > getIntegerValue(this, f(h, "duration"))))
21+ then throw("The betting was closed.")
22+ else if (!(isDefined(m.assetId)))
23+ then {
24+ let n = m.amount
25+ if ((n > k))
26+ then ScriptResult(WriteSet([DataEntry(f(h, "maxBet"), n), DataEntry(f(h, "maxBetOwner"), toBase58String(g.callerPublicKey))]), TransferSet([ScriptTransfer(l, k, unit)]))
27+ else throw("Your bet isn't the max bet")
28+ }
29+ else throw("You need to place a bet using waves currency")
30+ }
31+
32+
33+
34+@Callable(g)
35+func start (o,p) = {
36+ let m = extract(g.payment)
37+ let d = extract(m.assetId)
38+ if (isDefined(d))
39+ then WriteSet([DataEntry(c(d, "start"), height), DataEntry(c(d, "maxBet"), o), DataEntry(c(d, "duration"), p), DataEntry(c(d, "maxBetOwner"), toBase58String(g.callerPublicKey))])
40+ else throw("You can't sell waves using the auction")
41+ }
42+
43+
44+
45+@Callable(g)
46+func finish (h) = {
47+ let d = toBytes(h)
48+ let q = (getIntegerValue(this, c(d, "start")) - height)
49+ let r = (getIntegerValue(this, c(d, "duration")) - q)
50+ if ((r > 0))
51+ then throw((("The auction cannot be finished yet! " + toString(r)) + " minutes remaining"))
52+ else {
53+ let l = addressFromPublicKey(toBytes(getStringValue(this, c(d, "maxBetOwner"))))
54+ ScriptResult(WriteSet([DataEntry(c(d, "start"), 0)]), TransferSet([ScriptTransfer(l, 1, d)]))
55+ }
56+ }
57+
58+
59+@Verifier(s)
60+func t () = false
61+

github/deemru/w8io/169f3d6 
36.22 ms