tx · Ds97igpf2vjYHsWmMmgG3QUU5FWDbV535fbeFYDNareb

3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF:  -0.01400000 Waves

2020.03.11 22:29 [904908] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves

{ "type": 13, "id": "Ds97igpf2vjYHsWmMmgG3QUU5FWDbV535fbeFYDNareb", "fee": 1400000, "feeAssetId": null, "timestamp": 1583955004907, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "3H3qAy4ZR2c96i1uEbuB15P4sov2bJ6KtBuKBbz5jgUm1yK2q59eaKJ6E4Ens4x7rBVmYvC5cjv9k376Rfx4YHZd" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAABQAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAAAA1PcmFjbGVBZGRyZXNzCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAADU9yYWNsZUFkZHJlc3MFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAABAAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAA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AAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAAOb3duZXJQdWJsaWNLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYHTZ4D+A==", "chainId": 84, "height": 904908, "spentComplexity": 0 } View: original | compacted Prev: J2LFZQFo4NpoFCeTywdJhGgUrnsFzagT1s7pmQD7jFT9 Next: GFf3SRaMSzZbgvHeTgWQc3eiTy78WnhDvuzqtRGd5wn6 Diff:
OldNewDifferences
6565 if ((m == 0))
6666 then throw("rate 0")
6767 else {
68- let n = j.amount
68+ let n = (j.amount * m)
6969 let o = (l + j.amount)
7070 ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, a)]))
7171 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'Ea6CdDfumo8ZFecxUSWKAjZpQXmkRC79WB4ktu3KffPn'
55
66 let b = base58'B957NA5BEM8quCDhe1fUPkqBSdCZdJunNxjGE8FRJkWx'
77
88 let c = base58'9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3'
99
1010 let d = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
1111
1212 func e (f) = {
1313 let g = getInteger(d, f)
1414 if ($isInstanceOf(g, "Int"))
1515 then {
1616 let h = g
1717 h
1818 }
1919 else 0
2020 }
2121
2222
2323 @Callable(i)
2424 func deposit () = {
2525 let j = extract(i.payment)
2626 if (isDefined(j.assetId))
2727 then if ((j.assetId == b))
2828 then {
2929 let k = toBase58String(i.caller.bytes)
3030 let l = {
3131 let g = getInteger(this, (k + "_uscoin"))
3232 if ($isInstanceOf(g, "Int"))
3333 then {
3434 let h = g
3535 h
3636 }
3737 else 0
3838 }
3939 let m = e("waves_usd_2")
4040 let n = (j.amount * 100)
4141 let o = (l + j.amount)
4242 ScriptResult(WriteSet([DataEntry((k + "_uscoin"), o)]), TransferSet([ScriptTransfer(i.caller, n, a)]))
4343 }
4444 else throw("can hodl USCoin only at the moment")
4545 else {
4646 let k = toBase58String(i.caller.bytes)
4747 let l = {
4848 let g = getInteger(this, (k + "_waves"))
4949 if ($isInstanceOf(g, "Int"))
5050 then {
5151 let h = g
5252 h
5353 }
5454 else 0
5555 }
5656 let m = {
5757 let g = getInteger(d, "waves_usd_2")
5858 if ($isInstanceOf(g, "Int"))
5959 then {
6060 let h = g
6161 h
6262 }
6363 else 0
6464 }
6565 if ((m == 0))
6666 then throw("rate 0")
6767 else {
68- let n = j.amount
68+ let n = (j.amount * m)
6969 let o = (l + j.amount)
7070 ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, a)]))
7171 }
7272 }
7373 }
7474
7575
7676
7777 @Callable(i)
7878 func withdrawUSCoin () = {
7979 let j = extract(i.payment)
8080 if (isDefined(j.assetId))
8181 then if ((j.assetId == a))
8282 then {
8383 let k = toBase58String(i.caller.bytes)
8484 let l = {
8585 let g = getInteger(this, (k + "_uscoin"))
8686 if ($isInstanceOf(g, "Int"))
8787 then {
8888 let h = g
8989 h
9090 }
9191 else 0
9292 }
9393 let m = e("waves_usd_2")
9494 let n = (j.amount / 100)
9595 let o = (l - n)
9696 if ((0 > j.amount))
9797 then throw("Can't withdraw negative amount")
9898 else if ((0 > o))
9999 then throw("Not enough USCoin Deposited")
100100 else ScriptResult(WriteSet([DataEntry((k + "_uscoin"), o)]), TransferSet([ScriptTransfer(i.caller, n, b)]))
101101 }
102102 else throw("You Can Withdraw with EUCoin only")
103103 else throw("You Can Withdraw with EUCoin only")
104104 }
105105
106106
107107
108108 @Callable(i)
109109 func withdrawWaves () = {
110110 let j = extract(i.payment)
111111 if (isDefined(j.assetId))
112112 then if ((j.assetId == a))
113113 then {
114114 let k = toBase58String(i.caller.bytes)
115115 let l = {
116116 let g = getInteger(this, (k + "_waves"))
117117 if ($isInstanceOf(g, "Int"))
118118 then {
119119 let h = g
120120 h
121121 }
122122 else 0
123123 }
124124 let m = e("waves_usd_2")
125125 let n = j.amount
126126 let o = (l - n)
127127 if ((0 > j.amount))
128128 then throw("Can't withdraw negative amount")
129129 else if ((0 > o))
130130 then throw("Not enough Waves Deposited")
131131 else ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, unit)]))
132132 }
133133 else throw("You Can Withdraw with EUCoin only")
134134 else throw("You Can Withdraw with EUCoin only")
135135 }
136136
137137
138138
139139 @Callable(i)
140140 func getFaucet (p) = {
141141 let k = toBase58String(i.caller.bytes)
142142 let l = {
143143 let g = getInteger(this, (k + "_faucet"))
144144 if ($isInstanceOf(g, "Int"))
145145 then {
146146 let h = g
147147 h
148148 }
149149 else 0
150150 }
151151 if ((0 > p))
152152 then throw("Can't withdraw negative amount")
153153 else if ((l > 0))
154154 then throw("Faucet already taken")
155155 else ScriptResult(WriteSet([DataEntry((k + "_faucet"), p)]), TransferSet([ScriptTransfer(i.caller, p, a)]))
156156 }
157157
158158
159159 @Verifier(q)
160160 func r () = {
161161 let g = q
162162 if ($isInstanceOf(g, "SetScriptTransaction"))
163163 then {
164164 let s = g
165165 sigVerify(q.bodyBytes, q.proofs[0], c)
166166 }
167167 else if ($isInstanceOf(g, "DataTransaction"))
168168 then {
169169 let s = g
170170 true
171171 }
172172 else false
173173 }
174174

github/deemru/w8io/169f3d6 
43.33 ms