tx · 2GAS8qHCS21MCFuvVwgaLDZUKbyZgJViYmonVrwNM1LG

3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id:  -0.01000000 Waves

2021.07.13 02:19 [1611032] smart account 3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id > SELF 0.00000000 Waves

{ "type": 13, "id": "2GAS8qHCS21MCFuvVwgaLDZUKbyZgJViYmonVrwNM1LG", "fee": 1000000, "feeAssetId": null, "timestamp": 1626131957340, "version": 2, "chainId": 84, "sender": "3NADYuG3G91PrmsrRqQfyeDCf2Pi53UV5id", "senderPublicKey": "8agr5kfwDL7NLuMetvciXCcd9TcDKZhRwYZPPTAShaCC", "proofs": [ "2APDDS1D5xh64AaKXRdmg586C4k6qvLe3HWXxT4AkkRngeGVkwkru3C8iUpRMqgZ2LdccuF6gAXbLcmAPctryp12" ], "script": "base64:AAIEAAAAAAAAABUIAhIFCgMICAgSABIAEgASBAoCCAgAAAAKAAAAAA5rZXlCdXlVTFVTUmF0ZQIAAAANYnV5X1VMVVNfcmF0ZQAAAAAca2V5QnV5VUxVU1JhdGVTY2FsZURlbGltaXRlcgIAAAAdYnV5X1VMVVNfcmF0ZV9zY2FsZV9kZWxpbWl0ZXIAAAAAD2tleVNlbGxVTFVTUmF0ZQIAAAAOc2VsbF9VTFVTX3JhdGUAAAAAHWtleVNlbGxVTFVTUmF0ZVNjYWxlRGVsaW1pdGVyAgAAAB5zZWxsX1VMVVNfcmF0ZV9zY2FsZV9kZWxpbWl0ZXIAAAAADWtleU1ha2VORlRGZWUCAAAAEGtleV9tYWtlX05GVF9mZWUAAAAADWtleUNvbW1pc3Npb24CAAAACmNvbW1pc3Npb24AAAAAG2tleUNvbW1pc3Npb25TY2FsZURlbGltaXRlcgIAAAAaY29tbWlzc2lvbl9zY2FsZV9kZWxpbWl0ZXIAAAAABFVTRE4BAAAAIOSwcsQaO/7w9gk22WMNYWxRgCp4LSxG18pSVz66uVShAAAAAARVTFVTAQAAACD+I8+AbqmFdbZ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uc2ZlcgAAAAMFAAAAEHJlY2lwaWVudEFkZHJlc3MFAAAAF2Ftb3VudFdpdGhvdXRDb21taXNzaW9uBQAAAAdhc3NldElkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAOYW1vdW50Q2FzaGJhY2sFAAAABFVMVVMFAAAAA25pbAAAAAAWL5sg", "height": 1611032, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: smYedfZSApFd3DSZSYdY6MjHjZimL9qJfpeac59cPW7 Next: BLqg4XdSr1MqZirMZDmj61NdjdWAnnZGMWV3hynpTyZL Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = "buy_ULUS_rate"
55
66 let b = "buy_ULUS_rate_scale_delimiter"
77
88 let c = "sell_ULUS_rate"
99
1010 let d = "sell_ULUS_rate_scale_delimiter"
1111
1212 let e = "key_make_NFT_fee"
1313
1414 let f = "commission"
1515
1616 let g = "commission_scale_delimiter"
1717
1818 let h = base58'GPi1Q6QVgUmuomtThbim81hBYBEUWyf5BVmE4Tnd3sNg'
1919
2020 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 buyULUS () = {
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 sellULUS () = {
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 ULUS 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/026f985 
30.33 ms