tx · 7pLm2T5WqGLkrhpTq33JmkzLzrTPchq2CRZGGAycF7Cz

3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4:  -0.01400000 Waves

2021.05.15 23:17 [1527272] smart account 3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4 > SELF 0.00000000 Waves

{ "type": 13, "id": "7pLm2T5WqGLkrhpTq33JmkzLzrTPchq2CRZGGAycF7Cz", "fee": 1400000, "feeAssetId": null, "timestamp": 1621109863838, "version": 2, "chainId": 84, "sender": "3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4", "senderPublicKey": "6L6mk8eadmViy8hb3fDkBs1maSLoVepN2mVL4wom2pus", "proofs": [ "5x63H1tA8hkvD45dsKPCm6Tk7dP4fXFLJT8GSuCVM8xZwCYCqkUeBNSUD15MnfmwRBrUtV3sTYvSS2yFuSHwBJsV" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACAAAAAAMSXNCbG9ja2VkS2V5AgAAAAppc19ibG9ja2VkAAAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkCAAAAFW1pbl93YXZlc19zd2FwX2Ftb3VudAAAAAAMc3BvbnNvclRva2VuAQAAACCKKZuoP6lfFmxrqYQcUrketdDBz2UMb3LD63UVrxSxsAAAAAACZGIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNONUVDMnFkVWZ4SmtneWJhNlZqNlAyZzZ4U0J3eWNlN2pjAAAAAAVwcmljZQAAAAAAAAAAAgAAAAAHZGl2aWRlcgAAAAAABfXhAAAAAAASbWluV2F2ZXNTd2FwQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAAAmRiBQAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkAAAAAAAAAAAAAAAAACWlzQmxvY2tlZAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAJkYgUAAAAMSXNCbG9ja2VkS2V5BwAAAAEAAAABaQEAAAAIYnV5QXNzZXQAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAB2FjY291bnQJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkAAGYAAAACBQAAABJtaW5XYXZlc1N3YXBBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAEBUaGUgc3BlY2lmaWVkIFdhdmVzIGFtb3VudCBpcyBsZXNzIHRoYW4gdGhlIHJlcXVpcmVkIG1pbmltdW0gb2YgCQABpAAAAAEFAAAAEm1pbldhdmVzU3dhcEFtb3VudAIAAAAKIHdhdmVsZXRzLgMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAApT25seSBXYXZlcyB0b2tlbiBpcyBhbGxvd2VkIGZvciBzd2FwcGluZy4DBQAAAAlpc0Jsb2NrZWQJAAACAAAAAQIAAABaY29udHJhY3QgaXMgYmxvY2tlZCBieSBFTUVSR0VOQ1kgU0hVVERPV04gYWN0aW9ucyB1bnRpbGwgcmVhY3RpdmF0aW9uIGJ5IGVtZXJnZW5jeSBvcmFjbGVzCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGsAAAADCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UFAAAAB2RpdmlkZXIFAAAADHNwb25zb3JUb2tlbgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk8Lm0b", "height": 1527272, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CHa8jwr4sNN7H5UFhVM9tbej6ShLkEz7V7q9w3SzUN2M Next: FhmK2Qd89mHueKHU7giLxTqkvprjNqdmcR2FydDv1Q5z Diff:
OldNewDifferences
99
1010 let db = addressFromStringValue("3N5EC2qdUfxJkgyba6Vj6P2g6xSBwyce7jc")
1111
12-let price = 1
12+let price = 2
13+
14+let divider = 100000000
1315
1416 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1517
2527 then throw("Only Waves token is allowed for swapping.")
2628 else if (isBlocked)
2729 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
28- else [ScriptTransfer(i.caller, fraction(pmt.amount, 1, 1), sponsorToken)]
30+ else [ScriptTransfer(i.caller, fraction(pmt.amount, price, divider), sponsorToken)]
2931 }
3032
3133
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
88 let sponsorToken = base58'AJL4X2MaR3QZski33QRMeFZLonS6BnkcR1X72MJW8e31'
99
1010 let db = addressFromStringValue("3N5EC2qdUfxJkgyba6Vj6P2g6xSBwyce7jc")
1111
12-let price = 1
12+let price = 2
13+
14+let divider = 100000000
1315
1416 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1517
1618 let isBlocked = valueOrElse(getBoolean(db, IsBlockedKey), false)
1719
1820 @Callable(i)
1921 func buyAsset () = {
2022 let pmt = value(i.payments[0])
2123 let account = toString(i.caller)
2224 if ((minWavesSwapAmount > pmt.amount))
2325 then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets."))
2426 else if (isDefined(pmt.assetId))
2527 then throw("Only Waves token is allowed for swapping.")
2628 else if (isBlocked)
2729 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
28- else [ScriptTransfer(i.caller, fraction(pmt.amount, 1, 1), sponsorToken)]
30+ else [ScriptTransfer(i.caller, fraction(pmt.amount, price, divider), sponsorToken)]
2931 }
3032
3133
3234 @Verifier(tx)
3335 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3436

github/deemru/w8io/026f985 
68.27 ms