tx · FaMJ1CiQ4NChrg6EwGxVS1eaNs4DJsAB4gATKKfgF2SJ

3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6:  -0.01000000 Waves

2021.06.30 21:24 [1593474] smart account 3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6 > SELF 0.00000000 Waves

{ "type": 13, "id": "FaMJ1CiQ4NChrg6EwGxVS1eaNs4DJsAB4gATKKfgF2SJ", "fee": 1000000, "feeAssetId": null, "timestamp": 1625077523376, "version": 2, "chainId": 84, "sender": "3N3FtJGWEXex57HajuvYKKHU33PS4fwmQH6", "senderPublicKey": "4f5Wt4MDH3Qt6DMuZQid3zoj463xCUkNdUWjUcChuedh", "proofs": [ "bzhNFek2ptUmvvuuU5Ad1jQHtg6s3QWPjhYvCdFdrJDdEnKdA1eUTSFwczMENcsmasVQzvApWJ2hbxoHBKDFFq2" ], "script": "base64:AAIFAAAAAAAAABYIAhIDCgEIEgMKAQgSAwoBCBIDCgEIAAAAAwAAAAADSlBOAQAAACBFqLGvjcwUgk68Uea/woMfyoMncahjkWcixg2ZF+iMxQAAAAAER09MRAEAAAAgLR44CaQZZUypJtV0fmMzG/7TvBdMmwMi7yR7k3IM0LwAAAAACUJMT0NLU1RFUAAAAAAAAAAACgAAAAQAAAABaQEAAAAHYnV5VW5pdAAAAAEAAAAHYXNzZXRJRAQAAAAEY29zdAQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzCQABLAAAAAICAAAABWNvc3RfBQAAAAdhc3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAAA3BtdAkBAAAABXZhbHVlAAAAAQkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAVd29ya3Mgd2l0aCB3YXZlcyBvbmx5Awk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c3NldElEAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAEAAAABmNhbGxlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAduZXdXYWl0CQAAZAAAAAIIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0BQAAAAlCTE9DS1NURVADCQEAAAACIT0AAAACBQAAAAZjYWxsZXIFAAAABW93bmVyCQAAAgAAAAECAAAAEllvdSBhcmUgbm90IG93bmVyIQMJAABmAAAAAgUAAAAEd2FpdAgFAAAACWxhc3RCbG9jawAAAAZoZWlnaHQJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAEVN0aWxsIHdhaXQgYmxvY2sgCQABpAAAAAEIBQAAAAlsYXN0QmxvY2sAAAAGaGVpZ2h0AgAAABIgZm9yIG5ldyBhZHZlbnR1cmUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAB6EgBQAAAANKUE4JAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAAEsAAAAAgIAAAAFd2FpdF8FAAAAB2Fzc2V0SUQFAAAAB25ld1dhaXQFAAAAA25pbAAAAABFHrkm", "height": 1593474, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BmBn2N8FN3kBp5iCMvYuidkkwNoqVVAA1WywhH57VCL2 Next: ChU8GmggvyKtTNc3BYh8DGjNs555DQHAUnujr1YzHUUe Diff:
OldNewDifferences
3434 case _ =>
3535 throw("Can't find asset")
3636 }
37- throw(x)
37+ let dataArray = split(x, "-")
38+ let dna = dataArray[2]
39+ throw(dna)
3840 }
3941
4042
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let JPN = base58'5gvKrU3yetdPyMisTo8JiE737U9ZXLp4XkCy2aeE7BbA'
55
66 let GOLD = base58'4385BhNBpLMpBM2Gdt8Z6edjdxYgV4Eb2eE5VvUmxrLK'
77
88 let BLOCKSTEP = 10
99
1010 @Callable(i)
1111 func buyUnit (assetID) = {
1212 let cost = match getInteger(this, ("cost_" + assetID)) {
1313 case a: Int =>
1414 a
1515 case _ =>
1616 0
1717 }
1818 let pmt = value(i.payments[0])
1919 if (isDefined(pmt.assetId))
2020 then throw("works with waves only")
2121 else if ((pmt.amount != cost))
2222 then throw("Wrong cost")
2323 else [ScriptTransfer(i.caller, 1, fromBase58String(assetID)), StringEntry(("owner_" + assetID), toBase58String(i.caller.bytes))]
2424 }
2525
2626
2727
2828 @Callable(i)
2929 func fightWith (samu1) = {
3030 let nftData1 = fromBase58String(samu1)
3131 let x = match assetInfo(nftData1) {
3232 case asset: Asset =>
3333 asset.name
3434 case _ =>
3535 throw("Can't find asset")
3636 }
37- throw(x)
37+ let dataArray = split(x, "-")
38+ let dna = dataArray[2]
39+ throw(dna)
3840 }
3941
4042
4143
4244 @Callable(i)
4345 func goToForest (assetID) = {
4446 let owner = match getString(this, ("owner_" + assetID)) {
4547 case a: String =>
4648 a
4749 case _ =>
4850 ""
4951 }
5052 let wait = match getInteger(this, ("wait_" + assetID)) {
5153 case a: Int =>
5254 a
5355 case _ =>
5456 0
5557 }
5658 let caller = toBase58String(i.caller.bytes)
5759 let newWait = (lastBlock.height + (BLOCKSTEP * 3))
5860 let count = ((lastBlock.height % 100) + 1)
5961 if ((caller != owner))
6062 then throw("You are not owner!")
6163 else if ((wait > lastBlock.height))
6264 then throw((("Still wait block " + toString(lastBlock.height)) + " for forest-walking"))
6365 else [ScriptTransfer(i.caller, count, GOLD), IntegerEntry(("wait_" + assetID), newWait)]
6466 }
6567
6668
6769
6870 @Callable(i)
6971 func goToAdventure (assetID) = {
7072 let owner = match getString(this, ("owner_" + assetID)) {
7173 case a: String =>
7274 a
7375 case _ =>
7476 ""
7577 }
7678 let wait = match getInteger(this, ("wait_" + assetID)) {
7779 case a: Int =>
7880 a
7981 case _ =>
8082 0
8183 }
8284 let caller = toBase58String(i.caller.bytes)
8385 let newWait = (lastBlock.height + BLOCKSTEP)
8486 if ((caller != owner))
8587 then throw("You are not owner!")
8688 else if ((wait > lastBlock.height))
8789 then throw((("Still wait block " + toString(lastBlock.height)) + " for new adventure"))
8890 else [ScriptTransfer(i.caller, 500000, JPN), IntegerEntry(("wait_" + assetID), newWait)]
8991 }
9092
9193

github/deemru/w8io/169f3d6 
40.02 ms