tx · 3sosdhUbkoefVgdbTKq8N5PSTkeECtxXCz3HgDZRyiF5 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw: -0.01000000 Waves 2023.03.13 13:53 [2488154] smart account 3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw > SELF 0.00000000 Waves
{ "type": 13, "id": "3sosdhUbkoefVgdbTKq8N5PSTkeECtxXCz3HgDZRyiF5", "fee": 1000000, "feeAssetId": null, "timestamp": 1678704974201, "version": 2, "chainId": 84, "sender": "3NBYw8rxLmTvyEdsvaYor8nHG6GJ4NjB2Aw", "senderPublicKey": "4NDsd3dGKXuKLCoSbYvcWCX276K9ShP75cs9HTBMLJEN", "proofs": [ "5n4nYrsXimtWh1nkDThGjDjYKAckpN6x65f8VRb4hyMXceJvfnxQZ7t1h5htMSW6TXSZ4xoGDsXEsZonBDiGnBaE" ], "script": "base64:BgIMCAISAwoBCBIDCgEIAgAFdGVhbXMBIIVjlaPziI6w3gwXjghOv5o/krsm2zrodo4W3BQiKkh+AAVXQVZFUwEAAgFpAQ1hc2ltaVRyYW5zZmVyAQ1yZWNlcGllbnRBZGRyBAZjYWxsZXIICAUBaQZjYWxsZXIFYnl0ZXMEB3JlY2l2ZXIJANkEAQUNcmVjZXBpZW50QWRkcgQGYW1vdW50CAkAkQMCCAUBaQhwYXltZW50cwAABmFtb3VudAkAzAgCCQEMSW50ZWdlckVudHJ5AgkArAICCQDYBAEFBmNhbGxlcgIJX3RyYW5zZmVyBQZhbW91bnQJAMwIAgkBC1N0cmluZ0VudHJ5AgkArAICCQDYBAEFBmNhbGxlcgIMX3RyYW5zZmVyX3RvBQ1yZWNlcGllbnRBZGRyCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMJAQdBZGRyZXNzAQUHcmVjaXZlcgUGYW1vdW50BQV0ZWFtcwUDbmlsAWkBDXdhdmVzVHJhbnNmZXIBDXJlY2VwaWVudEFkZHIEBmNhbGxlcggIBQFpBmNhbGxlcgVieXRlcwQHcmVjaXZlcgkA2QQBBQ1yZWNlcGllbnRBZGRyBAZhbW91bnQICQCRAwIIBQFpCHBheW1lbnRzAAAGYW1vdW50CQDMCAIJAQxJbnRlZ2VyRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAglfdHJhbnNmZXIFBmFtb3VudAkAzAgCCQELU3RyaW5nRW50cnkCCQCsAgIJANgEAQUGY2FsbGVyAgxfdHJhbnNmZXJfdG8FDXJlY2VwaWVudEFkZHIJAMwIAgkBDlNjcmlwdFRyYW5zZmVyAwkBB0FkZHJlc3MBBQdyZWNpdmVyBQZhbW91bnQFBHVuaXQFA25pbAChxn+Z", "height": 2488154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HmmAm6GuWHs7aYstqE6RH2WdFoqw5442xUoP5bKbM5Mc Next: AEvc8aNwi5qx5q2Tg4M2xz2VZbpFnnyHQThvGXn9Lr7W Full:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let separator = "_" | |
5 | - | ||
6 | - | let kBuy = "buy" | |
7 | - | ||
8 | - | let kPrice = "price" | |
9 | - | ||
10 | - | let kSell = "sell" | |
11 | - | ||
12 | - | let maxAuctionDuration = 30 | |
13 | - | ||
14 | 4 | let teams = base58'9yhJDfWjPpv6tFjWRD1AJyBQwausJf2ZdxzLn86Uknnq' | |
15 | 5 | ||
16 | 6 | let WAVES = base58'' | |
17 | 7 | ||
18 | - | let kBid = "bid" | |
19 | - | ||
20 | - | let paused = true | |
21 | - | ||
22 | - | let statusForNFT = $Tuple4("OPEN", "CLOSED", "REWARDED", "CANCELED") | |
23 | - | ||
24 | - | let dAppAddress = base58'3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq' | |
25 | - | ||
26 | - | func isNft (assetId) = match assetInfo(assetId) { | |
27 | - | case token: Asset => | |
28 | - | if (if ((token.decimals == 0)) | |
29 | - | then (token.quantity == 1) | |
30 | - | else false) | |
31 | - | then (token.reissuable == false) | |
32 | - | else false | |
33 | - | case _ => | |
34 | - | false | |
35 | - | } | |
36 | - | ||
37 | - | ||
38 | 8 | @Callable(i) | |
39 | - | func | |
9 | + | func asimiTransfer (recepientAddr) = { | |
40 | 10 | let caller = i.caller.bytes | |
41 | - | if ((pause == "true")) | |
42 | - | then [StringEntry(pause, ("true" + pause))] | |
43 | - | else if ((paused == false)) | |
44 | - | then [StringEntry(pause, ("false" + pause))] | |
45 | - | else nil | |
11 | + | let reciver = fromBase58String(recepientAddr) | |
12 | + | let amount = i.payments[0].amount | |
13 | + | [IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr), ScriptTransfer(Address(reciver), amount, teams)] | |
46 | 14 | } | |
47 | 15 | ||
48 | 16 | ||
49 | 17 | ||
50 | 18 | @Callable(i) | |
51 | - | func createNft (pause,nft_name,nft_owner,nft_dAppAddress,nft_type,nft_tags,nft_selling_price,nft_description,nft_onSell,nft_data) = { | |
52 | - | let newToken = Issue(nft_name, nft_description, 1, 0, false) | |
53 | - | let issueId = calculateAssetId(newToken) | |
54 | - | let txId = i.transactionId | |
55 | - | if ((pause == "true")) | |
56 | - | then throw("function is paused for sometimes") | |
57 | - | else [newToken, ScriptTransfer(i.caller, 1, issueId), StringEntry(((toBase58String(issueId) + separator) + "Owner"), toString(i.caller)), StringEntry(((toBase58String(issueId) + separator) + "nft_type"), nft_type), StringEntry(((toBase58String(issueId) + separator) + "nft_tags"), nft_tags), StringEntry(((toBase58String(issueId) + separator) + "nft_dAppAddress"), nft_dAppAddress), IntegerEntry(((toBase58String(issueId) + separator) + "nft_selling_price"), nft_selling_price), StringEntry(((toBase58String(issueId) + separator) + "nft_onSell"), nft_onSell), StringEntry(((toBase58String(issueId) + separator) + "nft_data"), nft_data), StringEntry(((toBase58String(txId) + separator) + "issue_nft"), toBase58String(issueId))] | |
19 | + | func wavesTransfer (recepientAddr) = { | |
20 | + | let caller = i.caller.bytes | |
21 | + | let reciver = fromBase58String(recepientAddr) | |
22 | + | let amount = i.payments[0].amount | |
23 | + | [IntegerEntry((toBase58String(caller) + "_transfer"), amount), StringEntry((toBase58String(caller) + "_transfer_to"), recepientAddr), ScriptTransfer(Address(reciver), amount, unit)] | |
58 | 24 | } | |
59 | 25 | ||
60 | 26 |
github/deemru/w8io/026f985 26.42 ms ◑