tx · E1SzTx5SL3mgWPtnMiru63GEghY5uVcxR3HAgNqZCnLi

3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6:  -0.01000000 Waves

2021.06.29 21:36 [1592044] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "E1SzTx5SL3mgWPtnMiru63GEghY5uVcxR3HAgNqZCnLi", "fee": 1000000, "feeAssetId": null, "timestamp": 1624991833231, "version": 2, "chainId": 84, "sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6", "senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh", "proofs": [ "PeLX71yyU9vvqTF17m4tB3rsPUecC115KrZ4rkHkRaWizuAeths3AU4onisxfzG9qwt7YTJnAuBMn71d3ppeEzp" ], "script": "base64:AAIEAAAAAAAAAAwIAhIDCgEIEgMKAQgAAAABAAAAAANKUE4BAAAAIEWosa+NzBSCTrxR5r/Cgx/KgydxqGORZyLGDZkX6IzFAAAAAgAAAAFpAQAAAAdidXlVbml0AAAAAQAAAAdhc3NldElEBAAAAARjb3N0BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMJAAEsAAAAAgIAAAAFY29zdF8FAAAAB2Fzc2V0SUQDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAABV3b3JrcyB3aXRoIHdhdmVzIG9ubHkDCQEAAAACIT0AAAACCAUAAAADcG10AAAABmFtb3VudAUAAAAEY29zdAkAAAIAAAABAgAAAApXcm9uZyBjb3N0CQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2Zlcg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AAAHoSAFAAAAA0pQTgkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAAhiYWxhbmNlXwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzAAAAAAAAB6EgCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAICAAAABXdhaXRfBQAAAAdhc3NldElEBQAAAAduZXdXYWl0BQAAAANuaWwAAAAA6GhQFw==", "height": 1592044, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 6ZtygHREtVKv4h92FPvxLcqS3EQpjf2CKv48ZExbgMpy Next: 386oAaA4T3FBz85VR2qYeynsemNDHBPGBZVUbNnwsNSC Diff:
OldNewDifferences
3535 }
3636 else ""
3737 }
38- let i = toBase58String(b.caller.bytes)
39- let j = (lastBlock.height + 100)
40- if ((i != h))
38+ let i = {
39+ let e = getInteger(this, ("wait_" + c))
40+ if ($isInstanceOf(e, "Int"))
41+ then {
42+ let f = e
43+ f
44+ }
45+ else 0
46+ }
47+ let j = toBase58String(b.caller.bytes)
48+ let k = (lastBlock.height + 100)
49+ if ((j != h))
4150 then throw("You are not owner!")
42- else [ScriptTransfer(b.caller, 500000, a), IntegerEntry(("balance_" + toBase58String(b.caller.bytes)), 500000), IntegerEntry(("wait_" + c), j)]
51+ else if ((i > lastBlock.height))
52+ then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure"))
53+ else [ScriptTransfer(b.caller, 500000, a), IntegerEntry(("balance_" + toBase58String(b.caller.bytes)), 500000), IntegerEntry(("wait_" + c), k)]
4354 }
4455
4556
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA'
55
66 @Callable(b)
77 func buyUnit (c) = {
88 let d = {
99 let e = getInteger(this, ("cost_" + c))
1010 if ($isInstanceOf(e, "Int"))
1111 then {
1212 let f = e
1313 f
1414 }
1515 else 0
1616 }
1717 let g = value(b.payments[0])
1818 if (isDefined(g.assetId))
1919 then throw("works with waves only")
2020 else if ((g.amount != d))
2121 then throw("Wrong cost")
2222 else [ScriptTransfer(b.caller, 1, fromBase58String(c)), StringEntry(("owner_" + c), toBase58String(b.caller.bytes))]
2323 }
2424
2525
2626
2727 @Callable(b)
2828 func goToForest (c) = {
2929 let h = {
3030 let e = getString(this, ("owner_" + c))
3131 if ($isInstanceOf(e, "String"))
3232 then {
3333 let f = e
3434 f
3535 }
3636 else ""
3737 }
38- let i = toBase58String(b.caller.bytes)
39- let j = (lastBlock.height + 100)
40- if ((i != h))
38+ let i = {
39+ let e = getInteger(this, ("wait_" + c))
40+ if ($isInstanceOf(e, "Int"))
41+ then {
42+ let f = e
43+ f
44+ }
45+ else 0
46+ }
47+ let j = toBase58String(b.caller.bytes)
48+ let k = (lastBlock.height + 100)
49+ if ((j != h))
4150 then throw("You are not owner!")
42- else [ScriptTransfer(b.caller, 500000, a), IntegerEntry(("balance_" + toBase58String(b.caller.bytes)), 500000), IntegerEntry(("wait_" + c), j)]
51+ else if ((i > lastBlock.height))
52+ then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure"))
53+ else [ScriptTransfer(b.caller, 500000, a), IntegerEntry(("balance_" + toBase58String(b.caller.bytes)), 500000), IntegerEntry(("wait_" + c), k)]
4354 }
4455
4556

github/deemru/w8io/169f3d6 
40.30 ms