tx · 6iKwBM18VxhwvsPGHhtiahvXFSFeFqNmgfzvT75eTCyG 3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P: -0.01000000 Waves 2023.05.31 07:45 [2601682] smart account 3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P > SELF 0.00000000 Waves
{ "type": 13, "id": "6iKwBM18VxhwvsPGHhtiahvXFSFeFqNmgfzvT75eTCyG", "fee": 1000000, "feeAssetId": null, "timestamp": 1685508336058, "version": 2, "chainId": 84, "sender": "3N7KPSUwpMgvDEVGw1DYBnKDiixSQUXhn2P", "senderPublicKey": "BTvXQMmkgSf57dbcqWxpEvbi3ZYcEeWFkkXDZC6FrneM", "proofs": [ "2eDTaaEjq6hiwiQT8LHsyHb2NNqp4ct2Xmv2yendtJXR3eFCNshAZExJhCUxS6mtR7JjDo6AqdAAf4wQZcayKRuk" ], "script": "base64:BgILCAISABIAEgMKAQEBAAxvd25lckFkZHJlc3MCIzNNdmpBYURZSHBTNEE1SzRDVjNrWk1NRUg5bTlKZEJTdmJxAwFpAQRjYWxsAAQFYXNzZXQJAMMIBwIFQXNzZXQCAAABAAAGBQR1bml0AAAEB2Fzc2V0SWQJALgIAQUFYXNzZXQJAMwIAgkBC0JpbmFyeUVudHJ5AgIDYmluAQAJAMwIAgkBDEJvb2xlYW5FbnRyeQICBGJvb2wGCQDMCAIJAQxJbnRlZ2VyRW50cnkCAgNpbnQAAQkAzAgCCQELU3RyaW5nRW50cnkCAgNzdHICAAkAzAgCCQELRGVsZXRlRW50cnkBAgNzdHIJAMwIAgUFYXNzZXQJAMwIAgkBB1JlaXNzdWUDBQdhc3NldElkAAEHCQDMCAIJAQRCdXJuAgUHYXNzZXRJZAABCQDMCAIJAQ5TY3JpcHRUcmFuc2ZlcgMIBQFpBmNhbGxlcgABBQdhc3NldElkBQNuaWwBaQEHZGVwb3NpdAAECmN1cnJlbnRLZXkJANgEAQgIBQFpBmNhbGxlcgVieXRlcwQNZGVwb3NpdEFtb3VudA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dAUDbmlsAIJ0T98=", "height": 2601682, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 3kCgctn8UTQtPQPzqTq415tFqZjJFrHGjwRY4TcwnaDj Next: 6py2KX9oKWHjv8AHGXqfSjG1nEcZTzrUDV2LBfz2FCQf Diff:
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ownerAddress = "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq" | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | - | @Verifier(tx) | |
47 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
48 | - |
Old | New | Differences | |
---|---|---|---|
1 | - | {-# STDLIB_VERSION | |
1 | + | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let ownerAddress = "3MvjAaDYHpS4A5K4CV3kZMMEH9m9JdBSvbq" | |
5 | 5 | ||
6 | 6 | @Callable(i) | |
7 | 7 | func call () = { | |
8 | 8 | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | 9 | let assetId = calculateAssetId(asset) | |
10 | 10 | [BinaryEntry("bin", base58''), BooleanEntry("bool", true), IntegerEntry("int", 1), StringEntry("str", ""), DeleteEntry("str"), asset, Reissue(assetId, 1, false), Burn(assetId, 1), ScriptTransfer(i.caller, 1, assetId)] | |
11 | 11 | } | |
12 | 12 | ||
13 | 13 | ||
14 | 14 | ||
15 | 15 | @Callable(i) | |
16 | 16 | func deposit () = { | |
17 | 17 | let currentKey = toBase58String(i.caller.bytes) | |
18 | 18 | let depositAmount = (i.payments[0].amount - 5000000) | |
19 | 19 | let platformfee = 5000000 | |
20 | 20 | let totalPlatformFee = getIntegerValue(this, ("platform_bal" + ownerAddress)) | |
21 | 21 | let platformFeeInc = (totalPlatformFee + platformfee) | |
22 | 22 | [IntegerEntry(("balance_" + currentKey), depositAmount), IntegerEntry(("platform_bal_" + ownerAddress), platformFeeInc)] | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | ||
27 | 27 | @Callable(i) | |
28 | 28 | func withDraw (amountToWithDraw) = { | |
29 | 29 | let Caller = toBase58String(i.caller.bytes) | |
30 | 30 | let currentKey = toBase58String(i.caller.bytes) | |
31 | 31 | let currentAmount = match getInteger(this, ("platform_bal_" + Caller)) { | |
32 | 32 | case a: Int => | |
33 | 33 | a | |
34 | 34 | case _ => | |
35 | 35 | 0 | |
36 | 36 | } | |
37 | 37 | let newAmount = (currentAmount - amountToWithDraw) | |
38 | 38 | if ((Caller != ownerAddress)) | |
39 | 39 | then throw("Not Authorized") | |
40 | 40 | else if ((currentAmount == 0)) | |
41 | 41 | then throw("No sufficent amount available") | |
42 | 42 | else [IntegerEntry(("platform_bal" + ownerAddress), newAmount), ScriptTransfer(i.caller, amountToWithDraw, unit)] | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | - | @Verifier(tx) | |
47 | - | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
48 | - |
github/deemru/w8io/169f3d6 25.64 ms ◑