tx · 2H7QemUsbWYtKziR3hQsd3fRKB31VK4gsyq71DjbfQGN

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01400000 Waves

2021.06.21 11:59 [1579934] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "2H7QemUsbWYtKziR3hQsd3fRKB31VK4gsyq71DjbfQGN", "fee": 1400000, "feeAssetId": null, "timestamp": 1624265745832, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "48aksFNT3r93he4m6MnTaBeMVxo6VWqb6RQq379udS6WKgbp1EbiUR1iD5pkZZZby2ubrMio7MDMrfna8Kqj1E3d" ], "script": "base64:AAIEAAAAAAAAABUIAhIFCgMICAgSABIAEgASBAoCCAgAAAAKAAAAABBrZXlCdXlVV09STERSYXRlAgAAAA9idXlfVVdPUkxEX3JhdGUAAAAAHmtleUJ1eVVXT1JMRFJhdGVTY2FsZURlbGltaXRlcgIAAAAfYnV5X1VXT1JMRF9yYXRlX3NjYWxlX2RlbGltaXRlcgAAAAARa2V5U2VsbFVXT1JMRFJhdGUCAAAAEHNlbGxfVVdPUkxEX3JhdGUAAAAAH2tleVNlbGxVV09STERSYXRlU2NhbGVEZWxpbWl0ZXICAAAAIHNlbGxfVVdPUkxEX3JhdGVfc2NhbGVfZGVsaW1pdGVyAAAAAA1rZXlNYWtlTkZURmVlAgAAABBrZXlfbWFrZV9ORlRfZmVlAAAAAA1rZXlDb21taXNzaW9uAgAAAApjb21taXNzaW9uAAAAABtrZXlDb21taXNzaW9uU2NhbGVEZWxpbWl0ZXICAAAAGmNvbW1pc3Npb25fc2NhbGVfZGVsaW1pdGVyAAAAAARVU0ROAQAAACDksHLEGjv+8PYJNtljDWFsUYAqeC0sRtfKUlc+urlUoQAAAAAGVVdPUkxEAQAAACD+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AOU2NyaXB0VHJhbnNmZXIAAAADBQAAABByZWNpcGllbnRBZGRyZXNzBQAAABdhbW91bnRXaXRob3V0Q29tbWlzc2lvbgUAAAAHYXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAADmFtb3VudENhc2hiYWNrBQAAAAZVV09STEQFAAAAA25pbAAAAABRczOE", "height": 1579934, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7KY4WKeKifdorUY8t75VqUpuTaRt4LEfahgdanA3tB5X Next: smYedfZSApFd3DSZSYdY6MjHjZimL9qJfpeac59cPW7 Diff:
OldNewDifferences
1515
1616 let g = "commission_scale_delimiter"
1717
18-let h = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
18+let h = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1919
20-let i = base58'432rwiV6mi3SJGLkhGPeyHVNUj8rEgHpXwyc1yXj4M6Y'
20+let i = base58'J74E8AHdZobVSkA3YboiRrxFUs4odMVxK8tGMg6QXA1n'
2121
2222 let j = h
2323
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "buy_UWORLD_rate"
55
66 let b = "buy_UWORLD_rate_scale_delimiter"
77
88 let c = "sell_UWORLD_rate"
99
1010 let d = "sell_UWORLD_rate_scale_delimiter"
1111
1212 let e = "key_make_NFT_fee"
1313
1414 let f = "commission"
1515
1616 let g = "commission_scale_delimiter"
1717
18-let h = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
18+let h = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1919
20-let i = base58'432rwiV6mi3SJGLkhGPeyHVNUj8rEgHpXwyc1yXj4M6Y'
20+let i = base58'J74E8AHdZobVSkA3YboiRrxFUs4odMVxK8tGMg6QXA1n'
2121
2222 let j = h
2323
2424 @Callable(k)
2525 func makeNFT (l,m,n) = {
2626 let o = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
2727 let p = o._1
2828 let q = o._2
2929 let r = getIntegerValue(this, e)
3030 if ((q != j))
3131 then throw("Asset must be USDN only")
3232 else if ((r > p))
3333 then throw(("Fee for make NFT token is " + toString(r)))
3434 else if (isDefined(getString(this, n)))
3535 then throw("NFT for this productId is already issued.")
3636 else {
3737 let s = Issue(l, (((m + "[") + n) + "]"), 1, 0, false, unit, 0)
3838 let t = calculateAssetId(s)
3939 [s, StringEntry(n, toBase58String(t))]
4040 }
4141 }
4242
4343
4444
4545 @Callable(k)
4646 func setParams () = if ((k.caller != this))
4747 then throw("Only the DApp itself can call this function")
4848 else [IntegerEntry(a, 150000), IntegerEntry(b, 1000), IntegerEntry(c, 100000), IntegerEntry(d, 1000), IntegerEntry(f, 30000), IntegerEntry(g, 1000000), IntegerEntry(e, 1000000)]
4949
5050
5151
5252 @Callable(k)
5353 func buyUWORLD () = {
5454 let u = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
5555 let p = u._1
5656 let q = u._2
5757 if ((q != j))
5858 then throw("Asset must be USDN only")
5959 else {
6060 let v = getIntegerValue(this, a)
6161 let w = getIntegerValue(this, b)
6262 let x = fraction(p, w, v)
6363 let y = x
6464 [ScriptTransfer(k.caller, y, i)]
6565 }
6666 }
6767
6868
6969
7070 @Callable(k)
7171 func sellUWORLD () = {
7272 let z = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
7373 let p = z._1
7474 let q = z._2
7575 if ((q != i))
7676 then throw("Asset must be UWORLD only")
7777 else {
7878 let v = getIntegerValue(this, c)
7979 let w = getIntegerValue(this, d)
8080 let x = fraction(p, v, w)
8181 let y = x
8282 [ScriptTransfer(k.caller, y, h)]
8383 }
8484 }
8585
8686
8787
8888 @Callable(k)
8989 func makePayment (A,n) = {
9090 let B = addressFromStringValue(A)
9191 let C = $Tuple2(k.payments[0].amount, k.payments[0].assetId)
9292 let p = C._1
9393 let q = C._2
9494 if ((q != j))
9595 then throw("Asset must be USDN only")
9696 else {
9797 let D = getIntegerValue(this, f)
9898 let E = getIntegerValue(this, g)
9999 let F = fraction(p, D, E)
100100 let y = (p - F)
101101 let G = fraction(p, 100, 1000000)
102102 if (isDefined(getString(this, n)))
103103 then {
104104 let H = fromBase58String(getStringValue(this, n))
105105 [ScriptTransfer(B, y, j), ScriptTransfer(k.caller, G, i), ScriptTransfer(k.caller, 1, H)]
106106 }
107107 else [ScriptTransfer(B, y, j), ScriptTransfer(k.caller, G, i)]
108108 }
109109 }
110110
111111

github/deemru/w8io/169f3d6 
40.13 ms