tx · 9p3A64kThR1jptuYhX8eTKvY4t1sgsLkHoD676d7dNRy

3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh:  -0.01000000 Waves

2021.07.15 07:50 [1614265] smart account 3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh > SELF 0.00000000 Waves

{ "type": 13, "id": "9p3A64kThR1jptuYhX8eTKvY4t1sgsLkHoD676d7dNRy", "fee": 1000000, "feeAssetId": null, "timestamp": 1626324627865, "version": 2, "chainId": 84, "sender": "3N51W4fn1aAAdypU26EGUwNZPr3zikN3vwh", "senderPublicKey": "D7edN6TZzQ6PbyWHGFdGMPJkkRNjR1Y32g7MmU7AXR73", "proofs": [ "3mPoGNP51WQdaSjoj3EdGbyi1MA4qYzhz7Ca5oE5bZ6uozAgqCmwC9xQ5MftWJnj56uJ4cUDbWLtyPwHJeJNQb36" ], "script": "base64:AAIFAAAAAAAAAAYIAhIAEgAAAAADAAAAAAlCTE9DS1NURVAAAAAAAAAAAAoAAAAAA1JFUwEAAAAg9zCOS72Q1vYXbBOZsGiYip0A3D8vW8S490kPXDWEHLMBAAAACnJhbmRvbWl6ZXIAAAABAAAAA2ludgQAAAAIbGFzdFBsYXkEAAAAByRtYXRjaDAJAAQcAAAAAgUAAAAEdGhpcwIAAAAIbGFzdFBsYXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAACkJ5dGVWZWN0b3IEAAAAAXMFAAAAByRtYXRjaDAFAAAAAXMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABFVuaXQBAAAADkdvbGRNaW5lcnMyMDIxCQAAAgAAAAECAAAAC01hdGNoIGVycm9yBAAAAARyYW5kCQAAywAAAAIJAADLAAAAAgkAAMsAAAACCQAAywAAAAIJAADLAAAAAgUAAAAIbGFzdFBsYXkIBQAAAANpbnYAAAANdHJhbnNhY3Rpb25JZAgFAAAAA2ludgAAAA9jYWxsZXJQdWJsaWNLZXkIBQAAAAlsYXN0QmxvY2sAAAATZ2VuZXJhdGlvblNpZ25h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eeded", "spentComplexity": 0 } View: original | compacted Prev: 9FrmauXha9yDCP9veavtQRMpZWwr4Ug8roZ7b1ofe5Xh Next: 4HnJUdhRFsoCD9ymTfmfSDQbJXFayBp3Gh6Cu9aCggR4 Diff:
OldNewDifferences
6565 }
6666 else 0
6767 }
68- let r = assetBalance(i.caller, b)
69- if ((10 > r))
68+ let r = (q + 1)
69+ let s = assetBalance(i.caller, b)
70+ if ((10 > s))
7071 then throw("Not enough, need 1000 pieces")
7172 else {
72- let s = Issue("DEMO", "DEMO", 1, 0, false)
73- let t = calculateAssetId(s)
74-[Issue("DEMO", "DEMO", 1, 0, false), Burn(b, 10), ScriptTransfer(i.caller, 1, t), IntegerEntry("ingots_count", (q + 1)), StringEntry(("ingot_" + toString(q)), toBase58String(t))]
73+ let t = Issue("DEMO", "DEMO", 1, 0, false)
74+ let u = calculateAssetId(t)
75+[Issue("DEMO", "DEMO", 1, 0, false), Burn(b, 10), ScriptTransfer(i.caller, 1, u), IntegerEntry("ingots_count", r), StringEntry(("ingot_" + toString(r)), toBase58String(u))]
7576 }
7677 }
7778
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 10
55
66 let b = base58'HdveNhSzDRiEib9RfQ5EAxmpFVica4EqvBFd2S4pdbD4'
77
88 func c (d) = {
99 let e = {
1010 let f = getBinary(this, "lastPlay")
1111 if ($isInstanceOf(f, "ByteVector"))
1212 then {
1313 let g = f
1414 g
1515 }
1616 else if ($isInstanceOf(f, "Unit"))
1717 then base58'TGCTLFoHxJ8U7rcUofN'
1818 else throw("Match error")
1919 }
2020 let h = (((((e + d.transactionId) + d.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
2121 sha256(h)
2222 }
2323
2424
2525 @Callable(i)
2626 func goToMine () = {
2727 let j = toBase58String(i.caller.bytes)
2828 let k = {
2929 let f = getInteger(this, ("wait_" + j))
3030 if ($isInstanceOf(f, "Int"))
3131 then {
3232 let l = f
3333 l
3434 }
3535 else 0
3636 }
3737 let m = (lastBlock.height + a)
3838 let n = c(i)
3939 let o = (toInt(n) % 1000)
4040 if ((k > lastBlock.height))
4141 then throw((("Still wait block " + toString(lastBlock.height)) + " for mining"))
4242 else [IntegerEntry(("wait_" + j), m), ScriptTransfer(i.caller, o, b)]
4343 }
4444
4545
4646
4747 @Callable(i)
4848 func craftIngot () = {
4949 let j = toBase58String(i.caller.bytes)
5050 let p = {
5151 let f = getInteger(this, ("craft_" + j))
5252 if ($isInstanceOf(f, "Int"))
5353 then {
5454 let l = f
5555 l
5656 }
5757 else 0
5858 }
5959 let q = {
6060 let f = getInteger(this, "ingots_count")
6161 if ($isInstanceOf(f, "Int"))
6262 then {
6363 let l = f
6464 l
6565 }
6666 else 0
6767 }
68- let r = assetBalance(i.caller, b)
69- if ((10 > r))
68+ let r = (q + 1)
69+ let s = assetBalance(i.caller, b)
70+ if ((10 > s))
7071 then throw("Not enough, need 1000 pieces")
7172 else {
72- let s = Issue("DEMO", "DEMO", 1, 0, false)
73- let t = calculateAssetId(s)
74-[Issue("DEMO", "DEMO", 1, 0, false), Burn(b, 10), ScriptTransfer(i.caller, 1, t), IntegerEntry("ingots_count", (q + 1)), StringEntry(("ingot_" + toString(q)), toBase58String(t))]
73+ let t = Issue("DEMO", "DEMO", 1, 0, false)
74+ let u = calculateAssetId(t)
75+[Issue("DEMO", "DEMO", 1, 0, false), Burn(b, 10), ScriptTransfer(i.caller, 1, u), IntegerEntry("ingots_count", r), StringEntry(("ingot_" + toString(r)), toBase58String(u))]
7576 }
7677 }
7778
7879

github/deemru/w8io/169f3d6 
32.31 ms