tx · DpgeXiBTNXkExnv9LTbDgKz4hNw12d4boZ7Ah7EnLor8

3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH:  -0.01000000 Waves

2021.10.31 04:29 [1769830] smart account 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH > SELF 0.00000000 Waves

{ "type": 13, "id": "DpgeXiBTNXkExnv9LTbDgKz4hNw12d4boZ7Ah7EnLor8", "fee": 1000000, "feeAssetId": null, "timestamp": 1635643782401, "version": 2, "chainId": 84, "sender": "3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH", "senderPublicKey": "6it1s6XyHkFTbzgCJPXSeHjyLYixDHy6hJgzzfbntDGB", "proofs": [ "4Q1ep16otnosGWaMzXGepP69piaT9tad4CZgJXa4gFFoj9wFqi651XfXUZD61ioYdLd6cgqofcPjqR92Ti5BACHF" ], "script": "base64:AAIFAAAAAAAAAAwIAhIDCgEIEgMKAQEAAAAHAAAAAAZtZHN0aWQBAAAAIAYu1kRFDCnSZz0aQgjpMvwys70UJVtRnhDUh1FQYpqKAAAAAAtnb29kYWNjb3VudAIAAAAjM016WHFvMnJCeGMzWEVLUFZjWUhEcnNnUDdqbUU2Y0dnNkMAAAAADU9yYWNsZUFkZHJlc3MJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQFgs5g7sHJWLf0iLmoL9RVDbyuM78yCVYAAAAABGJhbmQJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVQFgs5g7sHJWLf0iLmoL9RVDbyuM78yCVYAAAAAA3VzZAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAANT3JhY2xlQWRkcmVzcwIAAAAHdXNkcmF0ZQAAAAAHdXNkYmFuZAkBAAAAEUBleHRyTmF0aXZlKDEwNTApAAAAAgUAAAANT3JhY2xlQWRkcmVzcwIAAAAFV0FWRVMBAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkCQAAZwAAAAIIBQAAAAFwAAAABmFtb3VudAAAAAAAAJiWgAAAAAIAAAABaQEAAAAHYnV5bWRzdAAAAAEAAAAJdGhlU3RyaW5nAwkBAAAAC2lzUGF5bWVudE9rAAAAAQUAAAABaQQAAAACcHAJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAEAAAABGFtbnQIBQAAAAJwcAAAAAZhbW91bnQEAAAACm1kc3RhbW91bnQJAABoAAAAAgkAAGgAAAACCQAAaAAAAAIJAABpAAAAAgUAAAAEYW1udAAAAAAABfXhAAUAAAADdXNkAAAAAAAAACcQAAAAAAAAAABkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAKbWRzdGFtb3VudAUAAAAGbWRzdGlkBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQAAAABaQEAAAAKY2hhbmdlcmF0ZQAAAAEAAAAEcmF0ZQQAAAAHY29tcGFyZQkABCUAAAABCAUAAAABaQAAAAZjYWxsZXIDCQAAAAAAAAIFAAAAB2NvbXBhcmUFAAAAC2dvb2RhY2NvdW50CQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACAgAAAAd1c2RyYXRlBQAAAARyYXRlBQAAAANuaWwJAAACAAAAAQIAAAALQkFEIEFDQ09VTlQAAAAA66Ax9Q==", "height": 1769830, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BaofEAFmfAE7bpT6g5QzkRMZq4D6mDZdNJ4FSCQPm2kY Next: F7Rhbqe7114mtoL5Ycs2wEngBhjHfZrvhhAB1vt2MVdH Diff:
OldNewDifferences
77
88 let OracleAddress = Address(base58'3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH')
99
10+let band = Address(base58'3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH')
11+
1012 let usd = getIntegerValue(OracleAddress, "usdrate")
13+
14+let usdband = getIntegerValue(OracleAddress, "WAVES")
1115
1216 func isPaymentOk (i) = if ((size(i.payments) == 0))
1317 then throw("Payment not attached")
2529 then {
2630 let pp = i.payments[0]
2731 let amnt = pp.amount
28- let mdstamount = (((amnt * usd) * 100000) / 100000000)
32+ let mdstamount = ((((amnt / 100000000) * usd) * 10000) * 100)
2933 [ScriptTransfer(i.caller, mdstamount, mdstid)]
3034 }
3135 else throw("Wrong payment amount or asset")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let mdstid = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT'
55
66 let goodaccount = "3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C"
77
88 let OracleAddress = Address(base58'3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH')
99
10+let band = Address(base58'3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH')
11+
1012 let usd = getIntegerValue(OracleAddress, "usdrate")
13+
14+let usdband = getIntegerValue(OracleAddress, "WAVES")
1115
1216 func isPaymentOk (i) = if ((size(i.payments) == 0))
1317 then throw("Payment not attached")
1418 else {
1519 let p = i.payments[0]
1620 match p.assetId {
1721 case _ =>
1822 (p.amount >= 10000000)
1923 }
2024 }
2125
2226
2327 @Callable(i)
2428 func buymdst (theString) = if (isPaymentOk(i))
2529 then {
2630 let pp = i.payments[0]
2731 let amnt = pp.amount
28- let mdstamount = (((amnt * usd) * 100000) / 100000000)
32+ let mdstamount = ((((amnt / 100000000) * usd) * 10000) * 100)
2933 [ScriptTransfer(i.caller, mdstamount, mdstid)]
3034 }
3135 else throw("Wrong payment amount or asset")
3236
3337
3438
3539 @Callable(i)
3640 func changerate (rate) = {
3741 let compare = toString(i.caller)
3842 if ((compare == goodaccount))
3943 then [IntegerEntry("usdrate", rate)]
4044 else throw("BAD ACCOUNT")
4145 }
4246
4347

github/deemru/w8io/026f985 
24.94 ms