tx · 2C6pgdwhXuPye7QoDAvuFCztFprwanYLA4NPkScNz7L7

3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH:  -0.01000000 Waves

2021.10.31 04:53 [1769855] smart account 3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH > SELF 0.00000000 Waves

{ "type": 13, "id": "2C6pgdwhXuPye7QoDAvuFCztFprwanYLA4NPkScNz7L7", "fee": 1000000, "feeAssetId": null, "timestamp": 1635645250766, "version": 2, "chainId": 84, "sender": "3MpRDrT92zK6yWJh47UdA8mRDH7f2F3CSzH", "senderPublicKey": "6it1s6XyHkFTbzgCJPXSeHjyLYixDHy6hJgzzfbntDGB", "proofs": [ "4WASmC4QAVnezRgsH3vp86pGZzAUoBs8t7Q7HBH7goZM9NAgMRJdmHCHr8p3gxGtTpLJgovwUdpmzqhPChRKhNUS" ], "script": "base64:AAIFAAAAAAAAABEIAhIDCgEIEgMKAQgSAwoBAQAAAAUAAAAABm1kc3RpZAEAAAAgBi7WREUMKdJnPRpCCOky/DKzvRQlW1GeENSHUVBimooAAAAAC2dvb2RhY2NvdW50AgAAACMzTXpYcW8yckJ4YzNYRUtQVmNZSERyc2dQN2ptRTZjR2c2QwAAAAANT3JhY2xlQWRkcmVzcwkBAAAAB0FkZHJlc3MAAAABAQAAABoBVAWCzmDuwclYt/SIuagv1FUNvK4zvzIJVgAAAAADdXNkCQEAAAARQGV4dHJOYXRpdmUoMTA1MCkAAAACBQAAAA1PcmFjbGVBZGRyZXNzAgAAAAd1c2RyYXRlAQAAAAtpc1BheW1lbnRPawAAAAEAAAABaQMJAAAAAAAAAgkAAZAAAAABCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAkAAAIAAAABAgAAABRQYXltZW50IG5vdCBhdHRhY2hlZAQAAAABcAkAAZEAAAACCAUAAAABaQAAAAhwYXltZW50cwAAAAAAAAAAAAQAAAAHJG1hdGNoMAgFAAAAAXAAAAAHYXNzZXRJZAkAAGcAAAACCAUAAAABcAAA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gIAAAAHdXNkcmF0ZQUAAAAEcmF0ZQUAAAADbmlsCQAAAgAAAAECAAAAC0JBRCBBQ0NPVU5UAAAAACyDVwU=", "height": 1769855, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BPx6ZqErW9PSEpC8ZuWiudXZCu4ZfxXJ4gZqXPrNAwWY Next: none Diff:
OldNewDifferences
2525 then {
2626 let pp = i.payments[0]
2727 let amnt = pp.amount
28+ let mdstamount = (((amnt / 1000000) * usd) * 5000)
29+[ScriptTransfer(i.caller, mdstamount, mdstid)]
30+ }
31+ else throw("Wrong payment amount or asset")
32+
33+
34+
35+@Callable(i)
36+func privmdst (theString) = if (isPaymentOk(i))
37+ then {
38+ let pp = i.payments[0]
39+ let amnt = pp.amount
2840 let mdstamount = (((amnt / 1000000) * usd) * 10000)
2941 [ScriptTransfer(i.caller, mdstamount, mdstid)]
3042 }
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
1010 let usd = getIntegerValue(OracleAddress, "usdrate")
1111
1212 func isPaymentOk (i) = if ((size(i.payments) == 0))
1313 then throw("Payment not attached")
1414 else {
1515 let p = i.payments[0]
1616 match p.assetId {
1717 case _ =>
1818 (p.amount >= 10000000)
1919 }
2020 }
2121
2222
2323 @Callable(i)
2424 func buymdst (theString) = if (isPaymentOk(i))
2525 then {
2626 let pp = i.payments[0]
2727 let amnt = pp.amount
28+ let mdstamount = (((amnt / 1000000) * usd) * 5000)
29+[ScriptTransfer(i.caller, mdstamount, mdstid)]
30+ }
31+ else throw("Wrong payment amount or asset")
32+
33+
34+
35+@Callable(i)
36+func privmdst (theString) = if (isPaymentOk(i))
37+ then {
38+ let pp = i.payments[0]
39+ let amnt = pp.amount
2840 let mdstamount = (((amnt / 1000000) * usd) * 10000)
2941 [ScriptTransfer(i.caller, mdstamount, mdstid)]
3042 }
3143 else throw("Wrong payment amount or asset")
3244
3345
3446
3547 @Callable(i)
3648 func changerate (rate) = {
3749 let compare = toString(i.caller)
3850 if ((compare == goodaccount))
3951 then [IntegerEntry("usdrate", rate)]
4052 else throw("BAD ACCOUNT")
4153 }
4254
4355

github/deemru/w8io/026f985 
23.09 ms