tx · FhmK2Qd89mHueKHU7giLxTqkvprjNqdmcR2FydDv1Q5z

3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4:  -0.01400000 Waves

2021.05.15 23:18 [1527273] smart account 3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4 > SELF 0.00000000 Waves

{ "type": 13, "id": "FhmK2Qd89mHueKHU7giLxTqkvprjNqdmcR2FydDv1Q5z", "fee": 1400000, "feeAssetId": null, "timestamp": 1621109923124, "version": 2, "chainId": 84, "sender": "3N47VNUyRs9LtYQjfh1wXoonwtxrk351iQ4", "senderPublicKey": "6L6mk8eadmViy8hb3fDkBs1maSLoVepN2mVL4wom2pus", "proofs": [ "3EzZtXMmTiqsTLqZgdVz52S78h3kLBc2iYUD4eMZKtL65X4ZWJP2m2tVbjd4NVnFUsvG7HkZoEpKEJSim6YzSVqc" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAACAAAAAAMSXNCbG9ja2VkS2V5AgAAAAppc19ibG9ja2VkAAAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkCAAAAFW1pbl93YXZlc19zd2FwX2Ftb3VudAAAAAAMc3BvbnNvclRva2VuAQAAACCKKZuoP6lfFmxrqYQcUrketdDBz2UMb3LD63UVrxSxsAAAAAACZGIJAQAAABFAZXh0ck5hdGl2ZSgxMDYyKQAAAAECAAAAIzNONUVDMnFkVWZ4SmtneWJhNlZqNlAyZzZ4U0J3eWNlN2pjAAAAAAVwcmljZQAAAAAAAAAAAgAAAAAHZGl2aWRlcgAAAAAAAJiWgAAAAAASbWluV2F2ZXNTd2FwQW1vdW50CQEAAAALdmFsdWVPckVsc2UAAAACCQAEGgAAAAIFAAAAAmRiBQAAABVNaW5XYXZlc1N3YXBBbW91bnRLZXkAAAAAAAAAAAAAAAAACWlzQmxvY2tlZAkBAAAAC3ZhbHVlT3JFbHNlAAAAAgkABBsAAAACBQAAAAJkYgUAAAAMSXNCbG9ja2VkS2V5BwAAAAEAAAABaQEAAAAIYnV5QXNzZXQAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAAB2FjY291bnQJAAQlAAAAAQgFAAAAAWkAAAAGY2FsbGVyAwkAAGYAAAACBQAAABJtaW5XYXZlc1N3YXBBbW91bnQIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAEBUaGUgc3BlY2lmaWVkIFdhdmVzIGFtb3VudCBpcyBsZXNzIHRoYW4gdGhlIHJlcXVpcmVkIG1pbmltdW0gb2YgCQABpAAAAAEFAAAAEm1pbldhdmVzU3dhcEFtb3VudAIAAAAKIHdhdmVsZXRzLgMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAApT25seSBXYXZlcyB0b2tlbiBpcyBhbGxvd2VkIGZvciBzd2FwcGluZy4DBQAAAAlpc0Jsb2NrZWQJAAACAAAAAQIAAABaY29udHJhY3QgaXMgYmxvY2tlZCBieSBFTUVSR0VOQ1kgU0hVVERPV04gYWN0aW9ucyB1bnRpbGwgcmVhY3RpdmF0aW9uIGJ5IGVtZXJnZW5jeSBvcmFjbGVzCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGsAAAADCAUAAAADcG10AAAABmFtb3VudAUAAAAFcHJpY2UFAAAAB2RpdmlkZXIFAAAADHNwb25zb3JUb2tlbgUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXmmZmk9", "height": 1527273, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7pLm2T5WqGLkrhpTq33JmkzLzrTPchq2CRZGGAycF7Cz Next: CC8wrSu8HofTzfg8LTveyzRRhLAH7RNv3Fpyr5QSfU8T Diff:
OldNewDifferences
1111
1212 let price = 2
1313
14-let divider = 100000000
14+let divider = 10000000
1515
1616 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1717
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
1212 let price = 2
1313
14-let divider = 100000000
14+let divider = 10000000
1515
1616 let minWavesSwapAmount = valueOrElse(getInteger(db, MinWavesSwapAmountKey), 0)
1717
1818 let isBlocked = valueOrElse(getBoolean(db, IsBlockedKey), false)
1919
2020 @Callable(i)
2121 func buyAsset () = {
2222 let pmt = value(i.payments[0])
2323 let account = toString(i.caller)
2424 if ((minWavesSwapAmount > pmt.amount))
2525 then throw((("The specified Waves amount is less than the required minimum of " + toString(minWavesSwapAmount)) + " wavelets."))
2626 else if (isDefined(pmt.assetId))
2727 then throw("Only Waves token is allowed for swapping.")
2828 else if (isBlocked)
2929 then throw("contract is blocked by EMERGENCY SHUTDOWN actions untill reactivation by emergency oracles")
3030 else [ScriptTransfer(i.caller, fraction(pmt.amount, price, divider), sponsorToken)]
3131 }
3232
3333
3434 @Verifier(tx)
3535 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
3636

github/deemru/w8io/026f985 
25.73 ms