tx · AQL6ZWm8ZTqQTt3n821DVYkPYMooH4y8bcSDs6GoA3vD

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01400000 Waves

2021.05.19 02:52 [1531803] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "AQL6ZWm8ZTqQTt3n821DVYkPYMooH4y8bcSDs6GoA3vD", "fee": 1400000, "feeAssetId": null, "timestamp": 1621381970168, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "56uXaBpLwDhoLRSwvnqHyLNU9wqUKqGSNWPr7tkjU8REpsooj2McFZi6vUcX5wag4DV4Ju6TUHqtUeUgMPMQkUEd" ], "script": "base64:AAIEAAAAAAAAABkIAhIFCgMICAgSBAoCAQESABIAEgQKAggIAAAACgAAAAAPa2V5RXhjaGFuZ2VSYXRlAgAAAA1leGNoYW5nZV9yYXRlAAAAAB1rZXlFeGNoYW5nZVJhdGVTY2FsZURlbGltaXRlcgIAAAAdZXhjaGFuZ2VfcmF0ZV9zY2FsZV9kZWxpbWl0ZXIAAAAADWtleUNvbW1pc3Npb24CAAAACmNvbW1pc3Npb24AAAAAG2tleUNvbW1pc3Npb25TY2FsZURlbGltaXRlcgIAAAAaY29tbWlzc2lvbl9zY2FsZV9kZWxpbWl0ZXIAAAAABFVTRE4BAAAAIOSwcsQaO/7w9gk22WMNYWxRgCp4LSxG18pSVz66uVShAAAAAAZVV09STEQBAAAAIFw5P18I1L4GAMZe978MAfIh+BM42SxhQKId1T0PstxdAAAAAAdhc3NldElkBQAAAARVU0ROAAAAAApjb21taXNzaW9uAAAAAAAAAHUwAAAAABhjb21taXNzaW9uU2NhbGVEZWxpbWl0ZXIAAAAAAAAPQkAAAAAACm1ha2VORlRmZWUAAAAAAAAHoSAAAAAFAAAAAWkBAAAAB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llbnRBZGRyZXNzBQAAAA5hbW91bnRDYXNoYmFjawUAAAAGVVdPUkxECQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOYW1vdW50Q2FzaGJhY2sFAAAABlVXT1JMRAUAAAADbmlsAAAAAOdVtZA=", "height": 1531803, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 91CsdXtbeQHMztpYnZhp3XaYbogqXCxGR12YEtKmDh9o Next: 89nPJifB1jkjboZ8cuba1sms6BbasLPyJzpcXrDHsRqS Diff:
OldNewDifferences
1919
2020 let i = 1000000
2121
22-@Callable(j)
23-func setParams (k,l) = if ((j.caller != this))
24- then throw("Only the DApp itself can call this function")
25- else [IntegerEntry(a, k), IntegerEntry(b, l), IntegerEntry(c, h), IntegerEntry(d, i)]
22+let j = 500000
23+
24+@Callable(k)
25+func makeNFT (l,m,n) = {
26+ let o = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
27+ let p = o._1
28+ let q = o._2
29+ if ((q != g))
30+ then throw("Asset must be USDN only")
31+ else if ((j > p))
32+ then throw(("Fee for make NFT token is " + toString(j)))
33+ else if (isDefined(getString(this, n)))
34+ then throw("NFT for this productId is already issued.")
35+ else {
36+ let r = Issue(l, (((m + "[") + n) + "]"), 1, 0, true, unit, 0)
37+ let s = calculateAssetId(r)
38+[r, StringEntry(n, toBase58String(s))]
39+ }
40+ }
2641
2742
2843
29-@Callable(j)
44+@Callable(k)
45+func setParams (t,u) = if ((k.caller != this))
46+ then throw("Only the DApp itself can call this function")
47+ else [IntegerEntry(a, t), IntegerEntry(b, u), IntegerEntry(c, h), IntegerEntry(d, i)]
48+
49+
50+
51+@Callable(k)
3052 func buyUWORLD () = {
31- let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32- let n = m._1
33- let o = m._2
34- if ((o != g))
53+ let v = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
54+ let p = v._1
55+ let q = v._2
56+ if ((q != g))
3557 then throw("Asset must be USDN only")
3658 else {
37- let k = getIntegerValue(this, a)
38- let l = getIntegerValue(this, b)
39- let p = fraction(n, l, k)
40- let q = fraction(p, h, i)
41- let r = (p - q)
42-[ScriptTransfer(j.caller, r, f)]
59+ let t = getIntegerValue(this, a)
60+ let u = getIntegerValue(this, b)
61+ let w = fraction(p, u, t)
62+ let x = fraction(w, h, i)
63+ let y = (w - x)
64+[ScriptTransfer(k.caller, y, f)]
4365 }
4466 }
4567
4668
4769
48-@Callable(j)
70+@Callable(k)
4971 func sellUWORLD () = {
50- let s = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51- let n = s._1
52- let o = s._2
53- if ((o != f))
72+ let z = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
73+ let p = z._1
74+ let q = z._2
75+ if ((q != f))
5476 then throw("Asset must be UWORLD only")
5577 else {
56- let k = getIntegerValue(this, a)
57- let l = getIntegerValue(this, b)
58- let p = fraction(n, k, l)
59- let q = fraction(p, h, i)
60- let r = (p - q)
61-[ScriptTransfer(j.caller, r, e)]
78+ let t = getIntegerValue(this, a)
79+ let u = getIntegerValue(this, b)
80+ let w = fraction(p, t, u)
81+ let x = fraction(w, h, i)
82+ let y = (w - x)
83+[ScriptTransfer(k.caller, y, e)]
6284 }
6385 }
6486
6587
6688
67-@Callable(j)
68-func makePayment (t) = {
69- let u = addressFromStringValue(t)
70- let v = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
71- let n = v._1
72- let o = v._2
73- if ((o != g))
89+@Callable(k)
90+func makePayment (A,n) = {
91+ let B = addressFromStringValue(A)
92+ let C = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
93+ let p = C._1
94+ let q = C._2
95+ if ((q != g))
7496 then throw("Asset must be USDN only")
7597 else {
76- let q = fraction(n, h, i)
77- let r = (n - q)
78- let w = fraction(n, 10, 100)
79-[ScriptTransfer(u, r, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
98+ let x = fraction(p, h, i)
99+ let y = (p - x)
100+ let D = fraction(p, 10, 100)
101+ let E = fromBase58String(getStringValue(this, n))
102+ if (isDefined(E))
103+ then [ScriptTransfer(B, y, g), ScriptTransfer(B, D, f), ScriptTransfer(k.caller, D, f), ScriptTransfer(k.caller, 1, E)]
104+ else [ScriptTransfer(B, y, g), ScriptTransfer(B, D, f), ScriptTransfer(k.caller, D, f)]
80105 }
81106 }
82107
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
1212 let e = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1313
1414 let f = base58'7D191wpwpSs4WanizHWgiRhAYhCGkmpop4h3NzUQreig'
1515
1616 let g = e
1717
1818 let h = 30000
1919
2020 let i = 1000000
2121
22-@Callable(j)
23-func setParams (k,l) = if ((j.caller != this))
24- then throw("Only the DApp itself can call this function")
25- else [IntegerEntry(a, k), IntegerEntry(b, l), IntegerEntry(c, h), IntegerEntry(d, i)]
22+let j = 500000
23+
24+@Callable(k)
25+func makeNFT (l,m,n) = {
26+ let o = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
27+ let p = o._1
28+ let q = o._2
29+ if ((q != g))
30+ then throw("Asset must be USDN only")
31+ else if ((j > p))
32+ then throw(("Fee for make NFT token is " + toString(j)))
33+ else if (isDefined(getString(this, n)))
34+ then throw("NFT for this productId is already issued.")
35+ else {
36+ let r = Issue(l, (((m + "[") + n) + "]"), 1, 0, true, unit, 0)
37+ let s = calculateAssetId(r)
38+[r, StringEntry(n, toBase58String(s))]
39+ }
40+ }
2641
2742
2843
29-@Callable(j)
44+@Callable(k)
45+func setParams (t,u) = if ((k.caller != this))
46+ then throw("Only the DApp itself can call this function")
47+ else [IntegerEntry(a, t), IntegerEntry(b, u), IntegerEntry(c, h), IntegerEntry(d, i)]
48+
49+
50+
51+@Callable(k)
3052 func buyUWORLD () = {
31- let m = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
32- let n = m._1
33- let o = m._2
34- if ((o != g))
53+ let v = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
54+ let p = v._1
55+ let q = v._2
56+ if ((q != g))
3557 then throw("Asset must be USDN only")
3658 else {
37- let k = getIntegerValue(this, a)
38- let l = getIntegerValue(this, b)
39- let p = fraction(n, l, k)
40- let q = fraction(p, h, i)
41- let r = (p - q)
42-[ScriptTransfer(j.caller, r, f)]
59+ let t = getIntegerValue(this, a)
60+ let u = getIntegerValue(this, b)
61+ let w = fraction(p, u, t)
62+ let x = fraction(w, h, i)
63+ let y = (w - x)
64+[ScriptTransfer(k.caller, y, f)]
4365 }
4466 }
4567
4668
4769
48-@Callable(j)
70+@Callable(k)
4971 func sellUWORLD () = {
50- let s = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
51- let n = s._1
52- let o = s._2
53- if ((o != f))
72+ let z = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
73+ let p = z._1
74+ let q = z._2
75+ if ((q != f))
5476 then throw("Asset must be UWORLD only")
5577 else {
56- let k = getIntegerValue(this, a)
57- let l = getIntegerValue(this, b)
58- let p = fraction(n, k, l)
59- let q = fraction(p, h, i)
60- let r = (p - q)
61-[ScriptTransfer(j.caller, r, e)]
78+ let t = getIntegerValue(this, a)
79+ let u = getIntegerValue(this, b)
80+ let w = fraction(p, t, u)
81+ let x = fraction(w, h, i)
82+ let y = (w - x)
83+[ScriptTransfer(k.caller, y, e)]
6284 }
6385 }
6486
6587
6688
67-@Callable(j)
68-func makePayment (t) = {
69- let u = addressFromStringValue(t)
70- let v = $Tuple2(j.payments[0].amount, j.payments[0].assetId)
71- let n = v._1
72- let o = v._2
73- if ((o != g))
89+@Callable(k)
90+func makePayment (A,n) = {
91+ let B = addressFromStringValue(A)
92+ let C = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
93+ let p = C._1
94+ let q = C._2
95+ if ((q != g))
7496 then throw("Asset must be USDN only")
7597 else {
76- let q = fraction(n, h, i)
77- let r = (n - q)
78- let w = fraction(n, 10, 100)
79-[ScriptTransfer(u, r, g), ScriptTransfer(u, w, f), ScriptTransfer(j.caller, w, f)]
98+ let x = fraction(p, h, i)
99+ let y = (p - x)
100+ let D = fraction(p, 10, 100)
101+ let E = fromBase58String(getStringValue(this, n))
102+ if (isDefined(E))
103+ then [ScriptTransfer(B, y, g), ScriptTransfer(B, D, f), ScriptTransfer(k.caller, D, f), ScriptTransfer(k.caller, 1, E)]
104+ else [ScriptTransfer(B, y, g), ScriptTransfer(B, D, f), ScriptTransfer(k.caller, D, f)]
80105 }
81106 }
82107
83108

github/deemru/w8io/026f985 
36.56 ms