tx · 3skRifYSV37wido7xWA1oU3f8fF67gCf8JVRXzsGRLT7

3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh:  -0.01000000 Waves

2021.07.22 19:45 [1625107] smart account 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh > SELF 0.00000000 Waves

{ "type": 13, "id": "3skRifYSV37wido7xWA1oU3f8fF67gCf8JVRXzsGRLT7", "fee": 1000000, "feeAssetId": null, "timestamp": 1626972310793, "version": 2, "chainId": 84, "sender": "3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh", "senderPublicKey": "D7edN6TZzQ6PbyWHGFdGMPJkkRNjR1Y32g7MmU7AXR73", "proofs": [ "NsZ93AgAT7TpfmtgagsbVu7vYRajrLPXGQQXZbKBBu2nJU97wYiBN7tNKXaDiHqfuyrLqafHwyhN347R5o71yoc" ], "script": "base64:AAIFAAAAAAAAABAIAhIAEgMKAQESAwoBARIAAAAABQAAAAAJQkxPQ0tTVEVQAAAAAAAAAAAKAAAAAAlJTkdPVENPU1QAAAAAAAAAA+gAAAAACFBMT1RDT1NUAAAAAAAAAYagAAAAAAVnTHVtcAEAAAAg9zCOS72Q1vYXbBOZsGiYip0A3D8vW8S490kPXDWEHLMBAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAIbGFzdFBsYXkEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAIbGFzdE1pbmUDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQBAAAADkdvbGRNaW5lcnMyMDIxCQAAAgAAAAECAAAAC01hdGNoIGVycm9yBAAAAARyYW5kCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAAIbGFzdFBsYXkIBQAAAANpbnYAAAANdHJhbnNhY3Rpb25JZAgFAAAAA2ludgAAAA9j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Y2FsbGVyBQAAAAduZXdXYWl0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgAAAAAAAAAD6AUAAAAFZ0x1bXAJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAFcGxvdF8FAAAABmNhbGxlcgUAAAALbmV3UGxvdFNpemUFAAAAA25pbAAAAACOmUBl", "height": 1625107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GY1bnnCtSAebiySBkV5665U7BrhVqdkjXjHz1ivNfAmu Next: HyfQWhLYxAiTacCB8Ph37vSPjBpr9GjN4kr7crJ2kHAS Diff:
OldNewDifferences
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10
55
6-let b = 10
6+let b = 1000
77
88 let c = 100000
99
1111
1212 func e (f) = {
1313 let g = {
14- let h = getBinary(this, "lastPlay")
14+ let h = getBinary(this, "lastMine")
1515 if ($isInstanceOf(h, "ByteVector"))
1616 then {
1717 let i = h
4343 let q = (toInt(p) % 1000)
4444 if ((m > lastBlock.height))
4545 then throw((("Wait block " + toString(m)) + " for mining again"))
46- else [IntegerEntry(("wait_" + l), o), ScriptTransfer(k.caller, q, d)]
46+ else [IntegerEntry(("wait_" + l), o), ScriptTransfer(k.caller, q, d), BinaryEntry("lastMine", p)]
4747 }
4848
4949
120120 else {
121121 let v = k.payments[0]
122122 if (isDefined(v.assetId))
123- then throw("Payment only in ЦФМУЫ")
123+ then throw("Payment only in WAVES")
124124 else if ((v.amount != (A * c)))
125125 then throw((("Payment expected " + toString((A * c))) + " WAVELET"))
126126 else [IntegerEntry(("plot_" + l), A)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10
55
6-let b = 10
6+let b = 1000
77
88 let c = 100000
99
1010 let d = base58'HdveNhSzDRiEib9RfQ5EAxmpFVica4EqvBFd2S4pdbD4'
1111
1212 func e (f) = {
1313 let g = {
14- let h = getBinary(this, "lastPlay")
14+ let h = getBinary(this, "lastMine")
1515 if ($isInstanceOf(h, "ByteVector"))
1616 then {
1717 let i = h
1818 i
1919 }
2020 else if ($isInstanceOf(h, "Unit"))
2121 then base58'TGCTLFoHxJ8U7rcUofN'
2222 else throw("Match error")
2323 }
2424 let j = (((((g + f.transactionId) + f.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
2525 sha256(j)
2626 }
2727
2828
2929 @Callable(k)
3030 func goToMine () = {
3131 let l = toBase58String(k.caller.bytes)
3232 let m = {
3333 let h = getInteger(this, ("wait_" + l))
3434 if ($isInstanceOf(h, "Int"))
3535 then {
3636 let n = h
3737 n
3838 }
3939 else 0
4040 }
4141 let o = (lastBlock.height + a)
4242 let p = e(k)
4343 let q = (toInt(p) % 1000)
4444 if ((m > lastBlock.height))
4545 then throw((("Wait block " + toString(m)) + " for mining again"))
46- else [IntegerEntry(("wait_" + l), o), ScriptTransfer(k.caller, q, d)]
46+ else [IntegerEntry(("wait_" + l), o), ScriptTransfer(k.caller, q, d), BinaryEntry("lastMine", p)]
4747 }
4848
4949
5050
5151 @Callable(k)
5252 func craftIngot (q) = {
5353 let l = toBase58String(k.caller.bytes)
5454 let r = {
5555 let h = getInteger(this, ("craft_" + l))
5656 if ($isInstanceOf(h, "Int"))
5757 then {
5858 let n = h
5959 n
6060 }
6161 else 0
6262 }
6363 let s = {
6464 let h = getInteger(this, "ingots_count")
6565 if ($isInstanceOf(h, "Int"))
6666 then {
6767 let n = h
6868 n
6969 }
7070 else 0
7171 }
7272 let t = (s + 1)
7373 let u = (lastBlock.height + a)
7474 if ((size(k.payments) == 0))
7575 then throw("Payment wasn't attached")
7676 else if ((r > lastBlock.height))
7777 then throw((("Wait block " + toString(r)) + " for crafting again"))
7878 else if (if (if ((q != 1))
7979 then (q != 10)
8080 else false)
8181 then (q != 50)
8282 else false)
8383 then throw("Wrong ingot's weight!")
8484 else {
8585 let v = k.payments[0]
8686 if ((v.assetId != d))
8787 then throw("Payment only in gLump")
8888 else if ((v.amount != (b * q)))
8989 then throw((("Payment expected " + toString((b * q))) + " gLump"))
9090 else {
9191 let w = ("INGOT" + toString(t))
9292 let x = (((((("{\"weight\":" + toString(q)) + ",\"uid\":") + toString(t)) + ",\"made_by\":\"") + l) + "\"}")
9393 let y = Issue(w, x, 1, 0, false)
9494 let z = calculateAssetId(y)
9595 [Burn(d, (b * q)), Issue(w, x, 1, 0, false), ScriptTransfer(k.caller, 1, z), IntegerEntry("ingots_count", t), StringEntry(("ingot_" + toString(t)), toBase58String(z)), IntegerEntry(("craft_" + l), u)]
9696 }
9797 }
9898 }
9999
100100
101101
102102 @Callable(k)
103103 func buyPlot (A) = {
104104 let l = toBase58String(k.caller.bytes)
105105 let B = {
106106 let h = getInteger(this, ("plot_" + l))
107107 if ($isInstanceOf(h, "Int"))
108108 then {
109109 let n = h
110110 n
111111 }
112112 else 0
113113 }
114114 if ((B > 0))
115115 then throw("You already have a plot!")
116116 else if (if ((0 > B))
117117 then true
118118 else (B > 1000))
119119 then throw("Correct size value from 1 to 1000")
120120 else {
121121 let v = k.payments[0]
122122 if (isDefined(v.assetId))
123- then throw("Payment only in ЦФМУЫ")
123+ then throw("Payment only in WAVES")
124124 else if ((v.amount != (A * c)))
125125 then throw((("Payment expected " + toString((A * c))) + " WAVELET"))
126126 else [IntegerEntry(("plot_" + l), A)]
127127 }
128128 }
129129
130130
131131
132132 @Callable(k)
133133 func goToPlot () = {
134134 let l = toBase58String(k.caller.bytes)
135135 let B = {
136136 let h = getInteger(this, ("plot_" + l))
137137 if ($isInstanceOf(h, "Int"))
138138 then {
139139 let n = h
140140 n
141141 }
142142 else 0
143143 }
144144 let m = {
145145 let h = getInteger(this, ("wait_" + l))
146146 if ($isInstanceOf(h, "Int"))
147147 then {
148148 let n = h
149149 n
150150 }
151151 else 0
152152 }
153153 let o = (lastBlock.height + a)
154154 let C = (B - 1)
155155 if ((0 >= B))
156156 then throw("Plot is empty, buy new!")
157157 else if ((m > lastBlock.height))
158158 then throw((("Wait block " + toString(m)) + " for mining again"))
159159 else [IntegerEntry(("wait_" + l), o), ScriptTransfer(k.caller, 1000, d), IntegerEntry(("plot_" + l), C)]
160160 }
161161
162162

github/deemru/w8io/169f3d6 
34.35 ms