tx · GSCiShWzB6Mzf1kREHM4bdrG1SxVqp8RkBy3RHqAwYTM

3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF:  -0.01400000 Waves

2020.03.11 21:48 [904861] smart account 3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF > SELF 0.00000000 Waves

{ "type": 13, "id": "GSCiShWzB6Mzf1kREHM4bdrG1SxVqp8RkBy3RHqAwYTM", "fee": 1400000, "feeAssetId": null, "timestamp": 1583952510174, "version": 1, "sender": "3N5jpkcHiH5R36y9cYnoXhVHe4pxRkS3peF", "senderPublicKey": "9v3cUhWaBqFKLuHQTbz2osNsxRANDcpaRZja43mFNkR3", "proofs": [ "m5mbs5q9jM8A1twvq3UF2mVcLmpdhwK6RLEuG6bYbGMvjx6bvc7Wvutfo8H4LwzHt3nF2CBqjWZQy2Zm6tzt6KH" ], "script": "base64:AAIDAAAAAAAAAA0IARIAEgASABIDCgEBAAAABQAAAAAGRVVDb2luAQAAACDJofoUphCC2vgdQrn0R0tQm4QOreBLRVolNScltI/WUQAAAAAGVVNDb2luAQAAACCWpimiLpI8FZFaHXIW3ZwI74bEgcPecoAv5ODcRcQ7/QAAAAAOb3duZXJQdWJsaWNLZXkBAAAAIIR0OzhzTJc1ozXjp3CfISpQxO2vbrCrTGSiFABFRe8mAAAAAA1PcmFjbGVBZGRyZXNzCQEAAAAHQWRkcmVzcwAAAAEJAAGbAAAAAQIAAAAjM05BY29lV2RVVFduOGNzWEpQRzQ3djFGanRqY2ZxeGI1dHUBAAAADmdldE51bWJlckJ5S2V5AAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAANT3JhY2xlQWRkcmVzcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAAAAAAEAAAAAWkBAAAAB2RlcG9zaXQAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAA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AAAAAAAAABQAAAA5vd25lclB1YmxpY0tleQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwBgeZWYSF", "chainId": 84, "height": 904861, "spentComplexity": 0 } View: original | compacted Prev: 8eAZXqdiowrtgvgRXTPy9oT42cDPR1LfHqg1pD5BHSdB Next: 8sQt1rbCfmgMkaT1YCXhAG72QuAqLKqUbXTVDN2hjgWv Diff:
OldNewDifferences
5353 }
5454 else 0
5555 }
56- let m = e("waves_usd_2")
56+ let m = {
57+ let g = getInteger(d, "waves_usd_2")
58+ if ($isInstanceOf(g, "Int"))
59+ then {
60+ let h = g
61+ h
62+ }
63+ else 0
64+ }
5765 let n = j.amount
5866 let o = (l + j.amount)
5967 ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, a)]))
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 = Address(toBytes("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 }
56- let m = e("waves_usd_2")
56+ let m = {
57+ let g = getInteger(d, "waves_usd_2")
58+ if ($isInstanceOf(g, "Int"))
59+ then {
60+ let h = g
61+ h
62+ }
63+ else 0
64+ }
5765 let n = j.amount
5866 let o = (l + j.amount)
5967 ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, a)]))
6068 }
6169 }
6270
6371
6472
6573 @Callable(i)
6674 func withdrawUSCoin () = {
6775 let j = extract(i.payment)
6876 if (isDefined(j.assetId))
6977 then if ((j.assetId == a))
7078 then {
7179 let k = toBase58String(i.caller.bytes)
7280 let l = {
7381 let g = getInteger(this, (k + "_uscoin"))
7482 if ($isInstanceOf(g, "Int"))
7583 then {
7684 let h = g
7785 h
7886 }
7987 else 0
8088 }
8189 let m = e("waves_usd_2")
8290 let n = (j.amount / 100)
8391 let o = (l - n)
8492 if ((0 > j.amount))
8593 then throw("Can't withdraw negative amount")
8694 else if ((0 > o))
8795 then throw("Not enough USCoin Deposited")
8896 else ScriptResult(WriteSet([DataEntry((k + "_uscoin"), o)]), TransferSet([ScriptTransfer(i.caller, n, b)]))
8997 }
9098 else throw("You Can Withdraw with EUCoin only")
9199 else throw("You Can Withdraw with EUCoin only")
92100 }
93101
94102
95103
96104 @Callable(i)
97105 func withdrawWaves () = {
98106 let j = extract(i.payment)
99107 if (isDefined(j.assetId))
100108 then if ((j.assetId == a))
101109 then {
102110 let k = toBase58String(i.caller.bytes)
103111 let l = {
104112 let g = getInteger(this, (k + "_waves"))
105113 if ($isInstanceOf(g, "Int"))
106114 then {
107115 let h = g
108116 h
109117 }
110118 else 0
111119 }
112120 let m = e("waves_usd_2")
113121 let n = j.amount
114122 let o = (l - n)
115123 if ((0 > j.amount))
116124 then throw("Can't withdraw negative amount")
117125 else if ((0 > o))
118126 then throw("Not enough Waves Deposited")
119127 else ScriptResult(WriteSet([DataEntry((k + "_waves"), o)]), TransferSet([ScriptTransfer(i.caller, n, unit)]))
120128 }
121129 else throw("You Can Withdraw with EUCoin only")
122130 else throw("You Can Withdraw with EUCoin only")
123131 }
124132
125133
126134
127135 @Callable(i)
128136 func getFaucet (p) = {
129137 let k = toBase58String(i.caller.bytes)
130138 let l = {
131139 let g = getInteger(this, (k + "_faucet"))
132140 if ($isInstanceOf(g, "Int"))
133141 then {
134142 let h = g
135143 h
136144 }
137145 else 0
138146 }
139147 if ((0 > p))
140148 then throw("Can't withdraw negative amount")
141149 else if ((l > 0))
142150 then throw("Faucet already taken")
143151 else ScriptResult(WriteSet([DataEntry((k + "_faucet"), p)]), TransferSet([ScriptTransfer(i.caller, p, a)]))
144152 }
145153
146154
147155 @Verifier(q)
148156 func r () = {
149157 let g = q
150158 if ($isInstanceOf(g, "SetScriptTransaction"))
151159 then {
152160 let s = g
153161 sigVerify(q.bodyBytes, q.proofs[0], c)
154162 }
155163 else if ($isInstanceOf(g, "DataTransaction"))
156164 then {
157165 let s = g
158166 true
159167 }
160168 else false
161169 }
162170

github/deemru/w8io/169f3d6 
32.83 ms