tx · 2ouMD1yZhQjWwXZm3KenK3Sn167FXGr1VVqNTgbqWaK1

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01400000 Waves

2021.05.07 12:41 [1515095] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "2ouMD1yZhQjWwXZm3KenK3Sn167FXGr1VVqNTgbqWaK1", "fee": 1400000, "feeAssetId": null, "timestamp": 1620380501802, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "4YaG7u7vLPhMqr3jGyzy5RhYMUGBPPJK1YLGWFMR6xsCrPiFAvR13YJ3do3gfRAPjEAPzqJMAqWsPm3DJRE8XC4C" ], "script": "base64:AAIEAAAAAAAAABEIAhIECgIBARIAEgASAwoBCAAAAAkAAAAAD2tleUV4Y2hhbmdlUmF0ZQIAAAANZXhjaGFuZ2VfcmF0ZQAAAAAda2V5RXhjaGFuZ2VSYXRlU2NhbGVEZWxpbWl0ZXICAAAAHWV4Y2hhbmdlX3JhdGVfc2NhbGVfZGVsaW1pdGVyAAAAAA1rZXlDb21taXNzaW9uAgAAAApjb21taXNzaW9uAAAAABtrZXlDb21taXNzaW9uU2NhbGVEZWxpbWl0ZXICAAAAGmNvbW1pc3Npb25fc2NhbGVfZGVsaW1pdGVyAAAAAARVU0ROAQAAACDksHLEGjv+8PYJNtljDWFsUYAqeC0sRtfKUlc+urlUoQAAAAAGVVdPUkxEAQAAACAtGFOlUDuo5uQJ1exIGoVYlbyPhEbn5MXvOd7nG64s6QAAAAAHYXNzZXRJZAUAAAAEVVNETgAAAAAKY29tbWlzc2lvbgAAAAAAAAB1MAAAAAAYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyAAAAAAAAD0JAAAAABAAAAAFpAQAAAAlzZXRQYXJhbXMAAAACAAAADGV4Y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AAF0Fzc2V0IG11c3QgYmUgVVNETiBvbmx5BAAAABBhbW91bnRDb21taXNzaW9uCQAAawAAAAMFAAAACXBtdEFtb3VudAUAAAAKY29tbWlzc2lvbgUAAAAYY29tbWlzc2lvblNjYWxlRGVsaW1pdGVyBAAAABdhbW91bnRXaXRob3V0Q29tbWlzc2lvbgkAAGUAAAACBQAAAAlwbXRBbW91bnQFAAAAEGFtb3VudENvbW1pc3Npb24EAAAADmFtb3VudENhc2hiYWNrCQAAawAAAAMFAAAACXBtdEFtb3VudAAAAAAAAAAACgAAAAAAAAAAZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABByZWNpcGllbnRBZGRyZXNzBQAAABdhbW91bnRXaXRob3V0Q29tbWlzc2lvbgUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABByZWNpcGllbnRBZGRyZXNzBQAAAA5hbW91bnRDYXNoYmFjawUAAAAGVVdPUkxECQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOYW1vdW50Q2FzaGJhY2sFAAAABlVXT1JMRAUAAAADbmlsAAAAAKCXZOQ=", "height": 1515095, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GyZscZDR6jNh3Fx2y88kroBkVoRYrjjTB1Q63ibCVSn9 Next: 9hWQQt6c6bgk4zvAPFWHv44zH7kRnbVFF7nJjJzS7dXo Diff:
OldNewDifferences
99
1010 let d = "commission_scale_delimiter"
1111
12-let e = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
12+let e = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1313
1414 let f = base58'432rwiV6mi3SJGLkhGPeyHVNUj8rEgHpXwyc1yXj4M6Y'
1515
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "exchange_rate"
55
66 let b = "exchange_rate_scale_delimiter"
77
88 let c = "commission"
99
1010 let d = "commission_scale_delimiter"
1111
12-let e = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
12+let e = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1313
1414 let f = base58'432rwiV6mi3SJGLkhGPeyHVNUj8rEgHpXwyc1yXj4M6Y'
1515
1616 let g = e
1717
1818 let h = 30000
1919
2020 let i = 1000000
2121
2222 @Callable(j)
2323 func setParams (k,l) = if ((j.caller != this))
2424 then throw("Only the DApp itself can call this function")
2525 else [IntegerEntry(a, k), IntegerEntry(b, l), IntegerEntry(c, h), IntegerEntry(d, i)]
2626
2727
2828
2929 @Callable(j)
3030 func buyUWORLD () = {
3131 let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
3232 let n = m._1
3333 let o = m._2
3434 if ((o != g))
3535 then throw("Asset must be USDN only")
3636 else {
3737 let k = getIntegerValue(this, a)
3838 let l = getIntegerValue(this, b)
3939 let p = fraction(n, k, l)
4040 let q = fraction(p, h, i)
4141 let r = (p - q)
4242 [ScriptTransfer(j.caller, r, f)]
4343 }
4444 }
4545
4646
4747
4848 @Callable(j)
4949 func sellUWORLD () = {
5050 let s = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
5151 let n = s._1
5252 let o = s._2
5353 if ((o != f))
5454 then throw("Asset must be UWORLD only")
5555 else {
5656 let k = getIntegerValue(this, a)
5757 let l = getIntegerValue(this, b)
5858 let p = fraction(n, l, k)
5959 let q = fraction(p, h, i)
6060 let r = (p - q)
6161 [ScriptTransfer(j.caller, r, e)]
6262 }
6363 }
6464
6565
6666
6767 @Callable(j)
6868 func makePayment (t) = {
6969 let u = addressFromStringValue(t)
7070 let v = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
7171 let n = v._1
7272 let o = v._2
7373 if ((o != g))
7474 then throw("Asset must be USDN only")
7575 else {
7676 let q = fraction(n, h, i)
7777 let r = (n - q)
7878 let w = fraction(n, 10, 100)
7979 [ScriptTransfer(u, r, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
8080 }
8181 }
8282
8383

github/deemru/w8io/026f985 
26.89 ms