tx · 3qMQWCiY5DtG93VetDdy6GEc3dedkN6qQhh76CHoU9Wn

3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4:  -0.01400000 Waves

2021.05.15 23:32 [1527288] smart account 3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4 > SELF 0.00000000 Waves

{ "type": 13, "id": "3qMQWCiY5DtG93VetDdy6GEc3dedkN6qQhh76CHoU9Wn", "fee": 1400000, "feeAssetId": null, "timestamp": 1621110827649, "version": 2, "chainId": 84, "sender": "3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4", "senderPublicKey": "6L6mk8eadmViy8hb3fDkBs1maSLoVepN2mVL4wom2pus", "proofs": [ "yrVfz8nccxrgmfQJTxrhdvcDHqfhEJbEXtxPHYhG5BVzMka6AjoyHcybWJ8FZQZtpVivP61gEQU2a1kCJkgGnQJ" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACQAAAAAMSXNCbG9ja2VkS2V5AgAAAAppc19ibG9ja2VkAAAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkCAAAAFW1pbl93YXZlc19zd2FwX2Ftb3VudAAAAAAFUHJpY2UCAAAAEHdhdmVzX3N3YXBfcHJpY2UAAAAADHNwb25zb3JUb2tlbgEAAAAgiimbqD+pXxZsa6mEHFK5HrXQwc9lDG9yw+t1Fa8UsbAAAAAAAmRiCQEAAAARQGV4dHJOYXRpdmUoMTA2MikAAAABAgAAACMzTjVFQzJxZFVmeEprZ3liYTZWajZQMmc2eFNCd3ljZTdqYwAAAAAHZGl2aWRlcgAAAAAAAJiWgAAAAAASbWluV2F2ZXNTd2FwQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAAAmRiBQAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkAAAAAAAAAAAAAAAAACWlzQmxvY2tlZAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAJkYgUAAAAMSXNCbG9ja2VkS2V5BwAAAAAF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AAD3NlbmRlclB1YmxpY0tlebWjWDg=", "height": 1527288, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CC8wrSu8HofTzfg8LTveyzRRhLAH7RNv3Fpyr5QSfU8T Next: none Diff:
OldNewDifferences
55
66 let MinWavesSwapAmountKey = "min_waves_swap_amount"
77
8+let Price = "waves_swap_price"
9+
810 let sponsorToken = base58'AJL4X2MaR3QZski33QRMeFZLonS6BnkcR1X72MJW8e31'
911
1012 let db = addressFromStringValue("3N5EC2qdUfxJkgyba6Vj6P2g6xSBwyce7jc")
11-
12-let price = 90
1313
1414 let divider = 10000000
1515
1616 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1717
1818 let isBlocked = valueOrElse(getBoolean(db, IsBlockedKey), false)
19+
20+let price = valueOrElse(getInteger(db, Price), 0)
1921
2022 @Callable(i)
2123 func buyAsset () = {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let IsBlockedKey = "is_blocked"
55
66 let MinWavesSwapAmountKey = "min_waves_swap_amount"
77
8+let Price = "waves_swap_price"
9+
810 let sponsorToken = base58'AJL4X2MaR3QZski33QRMeFZLonS6BnkcR1X72MJW8e31'
911
1012 let db = addressFromStringValue("3N5EC2qdUfxJkgyba6Vj6P2g6xSBwyce7jc")
11-
12-let price = 90
1313
1414 let divider = 10000000
1515
1616 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1717
1818 let isBlocked = valueOrElse(getBoolean(db, IsBlockedKey), false)
19+
20+let price = valueOrElse(getInteger(db, Price), 0)
1921
2022 @Callable(i)
2123 func buyAsset () = {
2224 let pmt = value(i.payments[0])
2325 let account = toString(i.caller)
2426 if ((minWavesSwapAmount > pmt.amount))
2527 then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets."))
2628 else if (isDefined(pmt.assetId))
2729 then throw("Only Waves token is allowed for swapping.")
2830 else if (isBlocked)
2931 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
3032 else [ScriptTransfer(i.caller, fraction(pmt.amount, price, divider), sponsorToken)]
3133 }
3234
3335
3436 @Verifier(tx)
3537 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3638

github/deemru/w8io/169f3d6 
47.68 ms