tx · A2e8DLxedk517t6rAfjb4LccxUXwFA1zDQuTsaxPjbgS 3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4: -0.01400000 Waves 2021.05.15 22:44 [1527239] smart account 3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4 > SELF 0.00000000 Waves
{ "type": 13, "id": "A2e8DLxedk517t6rAfjb4LccxUXwFA1zDQuTsaxPjbgS", "fee": 1400000, "feeAssetId": null, "timestamp": 1621107932354, "version": 2, "chainId": 84, "sender": "3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4", "senderPublicKey": "6L6mk8eadmViy8hb3fDkBs1maSLoVepN2mVL4wom2pus", "proofs": [ "2rtUr6ZG4Zf1GYv188tHFYzbGL7bKECJCRNwFBcyG6SsY2mDY3x9JDTM6oDqJBhJbApsitxuq27LSuKdg6HNZJ3T" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAABQAAAAAMSXNCbG9ja2VkS2V5AgAAAAppc19ibG9ja2VkAAAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkCAAAAFW1pbl93YXZlc19zd2FwX2Ftb3VudAAAAAAMc3BvbnNvclRva2VuAQAAACCKKZuoP6lfFmxrqYQcUrketdDBz2UMb3LD63UVrxSxsAAAAAASbWluV2F2ZXNTd2FwQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAABHRoaXMFAAAAFU1pbldhdmVzU3dhcEFtb3VudEtleQAAAAAAAAAAAAAAAAAJaXNCbG9ja2VkCQEAAAALdmFsdWVPckVsc2UAAAACCQAEGwAAAAIFAAAABHRoaXMFAAAADElzQmxvY2tlZEtleQcAAAABAAAAAWkBAAAACGJ1eUFzc2V0AAAAAAQAAAADcG10CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAApwbXRBc3NldElkCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQEAAAADmNhbGxlclB1YjU4U3RyCQACWAAAAAEIBQAAAAFpAAAAD2NhbGxlclB1YmxpY0tleQMFAAAACWlzQmxvY2tlZAkAAAIAAAABAgAAAFpjb250cmFjdCBpcyBibG9ja2VkIGJ5IEVNRVJHRU5DWSBTSFVURE9XTiBhY3Rpb25zIHVudGlsbCByZWFjdGl2YXRpb24gYnkgZW1lcmdlbmN5IG9yYWNsZXMJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyAAAAAAAAAAPoBQAAAAxzcG9uc29yVG9rZW4FAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5FDQpNw==", "height": 1527239, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AUBjb8Hyx7sk5rQUUibPH6SDrBAFbLPcWZx3rnhBPdpr Next: BGLE6RbFfjy1FfHgArANduoTiExtEHhYjMJeLmWAjwJw Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let IsBlockedKey = "is_blocked" | |
4 | 5 | ||
6 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
7 | + | ||
8 | + | let sponsorToken = base58'AJL4X2MaR3QZski33QRMeFZLonS6BnkcR1X72MJW8e31' | |
9 | + | ||
10 | + | let minWavesSwapAmount = valueOrElse(getInteger(this, MinWavesSwapAmountKey), 0) | |
11 | + | ||
12 | + | let isBlocked = valueOrElse(getBoolean(this, IsBlockedKey), false) | |
5 | 13 | ||
6 | 14 | @Callable(i) | |
7 | - | func call () = { | |
8 | - | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | - | let assetId = calculateAssetId(asset) | |
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)] | |
15 | + | func buyAsset () = { | |
16 | + | let pmt = value(i.payments[0]) | |
17 | + | let pmtAssetId = value(pmt.assetId) | |
18 | + | let callerPub58Str = toBase58String(i.callerPublicKey) | |
19 | + | if (isBlocked) | |
20 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
21 | + | else [ScriptTransfer(i.caller, 1000, sponsorToken)] | |
11 | 22 | } | |
12 | 23 | ||
13 | 24 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let IsBlockedKey = "is_blocked" | |
4 | 5 | ||
6 | + | let MinWavesSwapAmountKey = "min_waves_swap_amount" | |
7 | + | ||
8 | + | let sponsorToken = base58'AJL4X2MaR3QZski33QRMeFZLonS6BnkcR1X72MJW8e31' | |
9 | + | ||
10 | + | let minWavesSwapAmount = valueOrElse(getInteger(this, MinWavesSwapAmountKey), 0) | |
11 | + | ||
12 | + | let isBlocked = valueOrElse(getBoolean(this, IsBlockedKey), false) | |
5 | 13 | ||
6 | 14 | @Callable(i) | |
7 | - | func call () = { | |
8 | - | let asset = Issue("Asset", "", 1, 0, true, unit, 0) | |
9 | - | let assetId = calculateAssetId(asset) | |
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)] | |
15 | + | func buyAsset () = { | |
16 | + | let pmt = value(i.payments[0]) | |
17 | + | let pmtAssetId = value(pmt.assetId) | |
18 | + | let callerPub58Str = toBase58String(i.callerPublicKey) | |
19 | + | if (isBlocked) | |
20 | + | then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles") | |
21 | + | else [ScriptTransfer(i.caller, 1000, sponsorToken)] | |
11 | 22 | } | |
12 | 23 | ||
13 | 24 | ||
14 | 25 | @Verifier(tx) | |
15 | 26 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
16 | 27 |
github/deemru/w8io/026f985 38.71 ms ◑