tx · 6dbArGBxr88325yTEfRadVdVYkQP8mW1oGa4kwWQd49T

3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK:  -0.01000000 Waves

2022.11.01 12:58 [2297894] smart account 3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK > SELF 0.00000000 Waves

{ "type": 13, "id": "6dbArGBxr88325yTEfRadVdVYkQP8mW1oGa4kwWQd49T", "fee": 1000000, "feeAssetId": null, "timestamp": 1667296694793, "version": 2, "chainId": 84, "sender": "3N66job2d8LT5VRVrR6sVrm5TetTVjHiBgK", "senderPublicKey": "HtiQy2G7cXKiGN6z5x5aCuKqMKhLWN6RQCkkrstfEnpQ", "proofs": [ "3oU4ywinzwkbbV6FKpmaph8AtFLDBYyY3Gpwj9DFz9izPViLGLj2Z6AgGNLeApUCXc6whp5iTSAaGyV8iYW3dAxu" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAAEAAAAAAluZnRJc3N1ZWQCAAAACXdhc0luaXRlZAAAAAAKbmZ0QXNzZXRJZAIAAAALbmZ0X2Fzc2V0SWQAAAAAD1RvdGFsbmZ0U3dhcHBlZAIAAAAMdG90YWxTd2FwcGVkAAAAAA1vbGRuZnRBc3NldElkAQAAAAAAAAACAAAAAWkBAAAAC2lzc3VlTmV3bmZ0AAAAAAMJAQAAAAIhPQAAAAIJAAQgAAAAAQUAAAAJbmZ0SXNzdWVkBQAAAAR1bml0CQAAAgAAAAEJAAEsAAAAAgIAAAAvTmV3IG5mdCBpcyBhbHJlYWR5IGlzc3VlZCBhbmQgaXRzIGFzc2V0IGlkIGlzOiAJAQAAABFAZXh0ck5hdGl2ZSgxMDU4KQAAAAEFAAAACm5mdEFzc2V0SWQEAAAABm5ld05mdAkABEMAAAAHAgAAAAhEdWNrIEVnZwIAAABQVXRpbGl0eSBhbmQgUmV3YXJkIHRva2VuIEAgV2F2ZXNEdWNrcy5jb20gZ2FtZS4gVGhlIGR1Y2tpZXN0IHRva2VuIGluIHRoZSB3b3JsZC4A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AAAAHUmVpc3N1ZQAAAAMFAAAADW5ld0VnZ0Fzc2V0SWQFAAAADXN3YXBwZWRBbW91bnQGCQAETAAAAAIFAAAAB3JlaXNzdWUJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAVzd2FwXwkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkAgAAAAdfYW1vdW50BQAAAAx0b1N3YXBBbW91bnQJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIFAAAAD1RvdGFsbmZ0U3dhcHBlZAkAAGQAAAACBQAAAA90b3RhbFN3YXBwZWRWYWwFAAAADHRvU3dhcEFtb3VudAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADXN3YXBwZWRBbW91bnQFAAAADW5ld0VnZ0Fzc2V0SWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5tD1HEA==", "height": 2297894, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 31v5w7DFT1QNjeJ79TiRvaXbfdayTkEcvqAWMbScpo9w Next: 8Mbb5mLaQp8129KHum5eqicKPBnk9GHXidKAAchfuj8u Full:
OldNewDifferences
1-{-# STDLIB_VERSION 3 #-}
1+{-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let a = (1440 * 30)
4+let a = "wasInited"
55
6-@Callable(b)
7-func startAuction (c,d,e) = {
8- let f = toBase58String(b.transactionId)
9- let g = (lastBlock.height + c)
10- let h = extract(b.payment)
11- if ((c > a))
12- then throw(("Duration is too long. Must be less than " + toString(a)))
13- else WriteSet([DataEntry(f, g), DataEntry((f + "_organizer"), toBase58String(b.caller.bytes)), DataEntry((f + "_lot_assetId"), if (isDefined(h.assetId))
14- then toBase58String(value(h.assetId))
15- else "WAVES"), DataEntry((f + "_lot_amount"), h.amount), DataEntry((f + "_startPrice"), d), DataEntry((f + "_priceAssetId"), e)])
16- }
6+let b = "nft_assetId"
7+
8+let c = "totalSwapped"
9+
10+let d = base58''
11+
12+@Callable(e)
13+func issueNewnft () = if ((getBoolean(a) != unit))
14+ then throw(("New nft is already issued and its asset id is: " + getStringValue(b)))
15+ else {
16+ let f = Issue("Duck Egg", "Utility and Reward token @ WavesDucks.com game. The duckiest token in the world.", 1, 8, true, unit, 0)
17+ let g = calculateAssetId(f)
18+[f, BooleanEntry(a, true), StringEntry(b, toBase58String(g))]
19+ }
1720
1821
1922
20-@Callable(b)
21-func bid (f) = {
22- let h = extract(b.payment)
23- let i = if (isDefined(h.assetId))
24- then toBase58String(value(h.assetId))
25- else "WAVES"
26- let j = toBase58String(b.caller.bytes)
27- let g = getIntegerValue(this, f)
28- let d = getIntegerValue(this, (f + "_startPrice"))
29- let e = getStringValue(this, (f + "_priceAssetId"))
30- let k = getInteger(this, (f + "_winAmount"))
31- let l = getString(this, (f + "_winner"))
32- let m = if (isDefined(l))
33- then (value(l) == j)
34- else false
35- let n = (h.amount + (if (m)
36- then value(k)
37- else 0))
38- if ((lastBlock.height >= g))
39- then throw("Auction already finished")
40- else if ((e != i))
41- then throw((("Bid must be in asset '" + e) + "'"))
42- else if (if (if (isDefined(k))
43- then (value(k) >= n)
44- else false)
45- then true
46- else if (!(isDefined(k)))
47- then (d >= n)
48- else false)
49- then throw(("Bid must be more then " + toString(if (isDefined(k))
50- then value(k)
51- else d)))
52- else if (if (m)
53- then true
54- else !(isDefined(l)))
55- then WriteSet([DataEntry((f + "_winner"), j), DataEntry((f + "_winAmount"), n)])
56- else {
57- let o = addressFromStringValue(value(l))
58- let p = if (if ((e == "WAVES"))
59- then true
60- else (e == ""))
61- then unit
62- else fromBase58String(e)
63- ScriptResult(WriteSet([DataEntry((f + "_winner"), j), DataEntry((f + "_winAmount"), n)]), TransferSet([ScriptTransfer(o, value(k), p)]))
23+@Callable(e)
24+func swapEgg () = if ((size(e.payments) != 1))
25+ then throw("You can attach only EGG tokens")
26+ else if ((value(e.payments[0]).assetId != d))
27+ then throw("You can attach only EGG tokens")
28+ else {
29+ let h = {
30+ let i = getInteger(c)
31+ if ($isInstanceOf(i, "Int"))
32+ then {
33+ let j = i
34+ j
6435 }
65- }
36+ else 0
37+ }
38+ let k = fromBase58String(getStringValue(b))
39+ let l = value(e.payments[0]).amount
40+ let m = (l * 1000000)
41+ let n = Reissue(k, m, true)
42+[n, IntegerEntry((("swap_" + toBase58String(e.transactionId)) + "_amount"), l), IntegerEntry(c, (h + l)), ScriptTransfer(e.caller, m, k)]
43+ }
6644
6745
68-
69-@Callable(b)
70-func withdraw (f) = {
71- let h = extract(b.payment)
72- let i = if (isDefined(h.assetId))
73- then toBase58String(value(h.assetId))
74- else "WAVES"
75- let j = toBase58String(b.caller.bytes)
76- let g = getIntegerValue(this, f)
77- let q = getStringValue(this, (f + "_organizer"))
78- let l = getString(this, (f + "_winner"))
79- let r = getStringValue(this, (f + "_lot_assetId"))
80- let s = getIntegerValue(this, (f + "_lot_amount"))
81- let e = getStringValue(this, (f + "_priceAssetId"))
82- let k = getIntegerValue(this, (f + "_winAmount"))
83- let t = if ((r == "WAVES"))
84- then unit
85- else fromBase58String(r)
86- let p = if (if ((e == "WAVES"))
87- then true
88- else (e == ""))
89- then unit
90- else fromBase58String(e)
91- let u = addressFromStringValue(value(l))
92- let v = addressFromStringValue(value(q))
93- let w = getInteger(this, ((f + "_bidder_") + j))
94- if ((g > lastBlock.height))
95- then throw("Auction is not finished yet")
96- else if (!(isDefined(l)))
97- then if (isDefined(getString(this, (f + "_lot_passed"))))
98- then throw("Organizer has already got his lot back")
99- else ScriptResult(WriteSet([DataEntry((f + "_lot_passed"), q)]), TransferSet([ScriptTransfer(v, s, t)]))
100- else if (isDefined(getString(this, (f + "_lot_passed"))))
101- then throw("Lot is already passed to the winner, and organizer got his reward")
102- else ScriptResult(WriteSet([DataEntry((f + "_lot_passed"), toBase58String(u.bytes))]), TransferSet([ScriptTransfer(u, s, t), ScriptTransfer(v, k, p)]))
103- }
104-
46+@Verifier(o)
47+func p () = sigVerify(o.bodyBytes, o.proofs[0], o.senderPublicKey)
10548

github/deemru/w8io/026f985 
87.87 ms