tx · GATeXYCAXSJm86V6ep643KUpqSyyqoQkF671GWsMU8sD 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W: -0.01000000 Waves 2021.09.17 23:22 [1707523] smart account 3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W > SELF 0.00000000 Waves
{ "type": 13, "id": "GATeXYCAXSJm86V6ep643KUpqSyyqoQkF671GWsMU8sD", "fee": 1000000, "feeAssetId": null, "timestamp": 1631910235643, "version": 2, "chainId": 84, "sender": "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W", "senderPublicKey": "4Tgbt8hFUrh9Ljuh7RR6JU7FGF6Vy8J55djUNpJj8DvX", "proofs": [ "2mV6V4FmzA5XqFg3KFHfTxKd5mWWPYcH3W7ShrojsiwgdBDVcDCWQfsxWK3tdCFNWVzCN3DdwP7CED95fcVLGuo5" ], "script": "base64:AAIFAAAAAAAAAQEIAhIFCgMICAgaBwoCYTESAWkaDAoCYTISBmFjdGlvbhoKCgJhMxIEdHlwZRoRCgJhNBILdmFsdWVBY3Rpb24aEwoCYTUSDXRyYW5zYWN0aW9uSWQaGAoCYTYSEmN1cnJlbnRXYWxsZXRCeXRlcxoPCgJhNxIJcGF5QW1vdW50GhMKAmE4Eg1jdXJyZW50V2FsbGV0Gg0KAmE5EgduYW1lTmZ0GhAKAmIxEgpoaXN0b3JpY0lkGg0KAmIyEgckbWF0Y2gwGgcKAmIzEgF0GhUKAmI0Eg9pbml0aWFsUG93ZXJOZnQaCwoCYjUSBXBvd2VyGg4KAmI2EghuZXdQb3dlcgAAAAAAAAABAAAAAmExAQAAAAVzdGFydAAAAAMAAAACYTIAAAACYTMAAAACYTQEAAAAAmE1CQACWAAAAAEIBQAAAAJhMQAAAA10cmFuc2FjdGlvbklkBAAAAAJhNggFAAAAAmExAAAABmNhbGxlcgQAAAACYTcJAQAAAAV2YWx1ZQAAAAEICQABkQAAAAIIBQAAAAJhMQAAAAhwYXltZW50cwAAAAAAAAA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8FAAAAAmE4BQAAAAJiNgUAAAADbmlsAwMJAAAAAAAAAgUAAAACYTICAAAACFNlbmQgTkZUCQAAAAAAAAIFAAAAAmE4AgAAACMzTjdZbTFXSzNaYUZwN1ZmanZ6NktGUkdGNkF4c0FYbTc2VwcJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAAAmEzAAAAAAAAAAABCQACWQAAAAEFAAAAAmE0BQAAAANuaWwJAAACAAAAAQIAAAAtQWxnbyBkZXUgZXJyYWRvISBWZXJpZmlxdWUgc3VhIHNvbGljaXRhw6fDo28hAAAAAPetqpY=", "height": 1707523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8B7PVqcBcMAQTooW5uDS3Jt1MxCSgvaXCz6VSpYyTikx Next: KsvtbzbsApMg4wWKT2bbZts9UKDkBFr2odFULJv6ikk Diff:
Old | New | Differences | |
---|---|---|---|
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | let newPower = (power + initialPowerNft) | |
32 | - | if ((action == "Buy NFT")) | |
32 | + | if (if ((action == "Buy NFT")) | |
33 | + | then ((payAmount / 1000) == initialPowerNft) | |
34 | + | else false) | |
33 | 35 | then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower)] | |
34 | 36 | else if (if ((action == "Send NFT")) | |
35 | 37 | then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | ||
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func start (action,type,valueAction) = { | |
8 | 8 | let transactionId = toBase58String(i.transactionId) | |
9 | 9 | let currentWalletBytes = i.caller | |
10 | 10 | let payAmount = value(i.payments[0].amount) | |
11 | 11 | let currentWallet = toBase58String(i.caller.bytes) | |
12 | 12 | let nameNft = ((((((("nft_" + type) + "_") + take(transactionId, 10)) + "_") + currentWallet) + "_") + transactionId) | |
13 | 13 | let historicId = match getInteger(this, "historicId") { | |
14 | 14 | case t: Int => | |
15 | 15 | t | |
16 | 16 | case _ => | |
17 | 17 | 0 | |
18 | 18 | } | |
19 | 19 | let initialPowerNft = match getInteger(this, ("List_NFT_" + type)) { | |
20 | 20 | case t: Int => | |
21 | 21 | t | |
22 | 22 | case _ => | |
23 | 23 | 0 | |
24 | 24 | } | |
25 | 25 | let power = match getInteger(this, ("power_" + currentWallet)) { | |
26 | 26 | case t: Int => | |
27 | 27 | t | |
28 | 28 | case _ => | |
29 | 29 | 0 | |
30 | 30 | } | |
31 | 31 | let newPower = (power + initialPowerNft) | |
32 | - | if ((action == "Buy NFT")) | |
32 | + | if (if ((action == "Buy NFT")) | |
33 | + | then ((payAmount / 1000) == initialPowerNft) | |
34 | + | else false) | |
33 | 35 | then [Issue(((take(type, 6) + "_") + take(transactionId, 9)), "", 1, 0, false), IntegerEntry(nameNft, initialPowerNft), IntegerEntry(("power_" + currentWallet), newPower)] | |
34 | 36 | else if (if ((action == "Send NFT")) | |
35 | 37 | then (currentWallet == "3N7Ym1WK3ZaFp7Vfjvz6KFRGF6AxsAXm76W") | |
36 | 38 | else false) | |
37 | 39 | then [ScriptTransfer(Address(fromBase58String(type)), 1, fromBase58String(valueAction))] | |
38 | 40 | else throw("Algo deu errado! Verifique sua solicitação!") | |
39 | 41 | } | |
40 | 42 | ||
41 | 43 |
github/deemru/w8io/026f985 42.56 ms ◑