tx · J2LFZQFo4NpoFCeTywdJhGgUrnsFzagT1s7pmQD7jFT9

3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF:  -0.01400000 Waves

2020.03.11 22:27 [904906] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves

{ "type": 13, "id": "J2LFZQFo4NpoFCeTywdJhGgUrnsFzagT1s7pmQD7jFT9", "fee": 1400000, "feeAssetId": null, "timestamp": 1583954882617, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "22XmLnK853BDRX7f3bmJo2ejc3z6DQxWKX7bhh2QPkanAuEASCtwrzaimRmzzyYkJFkh2CM7PS49ZbbXkbKf5hjg" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAABQAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAAAA1PcmFjbGVBZGRyZXNzCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAECAAAAIzNOQWNvZVdkVVRXbjhjc1hKUEc0N3YxRmp0amNmcXhiNXR1AQAAAA5nZXROdW1iZXJCeUtleQAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAADU9yYWNsZUFkZHJlc3MFAAAAA2tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAAAABAAAAAFpAQAAAAdkZXBvc2l0AAAAAAQAAAADcG10CQEAAAAHZXh0cmFjd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UAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAADm93bmVyUHVibGljS2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAAAWQFAAAAByRtYXRjaDAGBwVx2Ls=", "chainId": 84, "height": 904906, "spentComplexity": 0 } View: original | compacted Prev: 8sQt1rbCfmgMkaT1YCXhAG72QuAqLKqUbXTVDN2hjgWv Next: Ds97igpf2vjYHsWmMmgG3QUU5FWDbV535fbeFYDNareb Diff:
OldNewDifferences
77
88 let c = base58'9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3'
99
10-let d = Address(toBytes("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu"))
10+let d = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
1111
1212 func e (f) = {
1313 let g = getInteger(d, f)
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
10-let d = Address(toBytes("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu"))
10+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 {
6868 let n = j.amount
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 
28.62 ms