tx · DwaGfQqDhed3uj4fRCekMjgqypBLwjWCevY9RPG6uQGV

3MuADE2ryaHKiVHXg5uFLyB4NYnvQJLZBUv:  -0.01400000 Waves

2019.12.25 12:44 [824364] smart account 3MuADE2ryaHKiVHXg5uFLyB4NYnvQJLZBUv > SELF 0.00000000 Waves

{ "type": 13, "id": "DwaGfQqDhed3uj4fRCekMjgqypBLwjWCevY9RPG6uQGV", "fee": 1400000, "feeAssetId": null, "timestamp": 1577267064293, "version": 1, "sender": "3MuADE2ryaHKiVHXg5uFLyB4NYnvQJLZBUv", "senderPublicKey": "A4bJfnBhBTVh7GRNr1hHz6iqJta6eBbaExPDG7UapoaD", "proofs": [ "5Qa9icGzdVP2sj2o7pFZXKovi9PD9rALkQQTLuZfwxubdtxSJMFCfNJDBHJjfBoQCS6Dq9Ktfz5EwrstMqTkLTLg" ], "script": "base64:AAIDAAAAAAAAABMIARIICgYIAQEBAQESABIDCgEIAAAAGQAAAAAHd2F2ZWxldAAAAAAABfXhAAAAAAAPd2F2ZXNEZXBvc2l0QW10CQAAaAAAAAIAAAAAAAAACigFAAAAB3dhdmVsZXQAAAAADWJ0Y0RlcG9zaXRBbXQJAABpAAAAAgkAAGgAAAACAAAAAAAAAAooBQAAAAd3YXZlbGV0AAAAAAAAACcQAAAAAA1ldGhEZXBvc2l0QW10CQAAaAAAAAIAAAAAAAAAAA0FAAAAB3dhdmVsZXQAAAAADWx0Y0RlcG9zaXRBbXQJAABoAAAAAgAAAAAAAAAAJwUAAAAHd2F2ZWxldAAAAAAOd2VzdERlcG9zaXRBbXQJAABoAAAAAgAAAAAAAABlkAUAAAAHd2F2ZWxldAAAAAANd2N0RGVwb3NpdEFtdAkAAGgAAAACAAAAAAAAAGWQBQAAAAd3YXZlbGV0AAAAABJEcmFnb25GcnVpdEFkZHJlc3MCAAAAIzNNekRHOXJ0MTNFdTV1dzRtWnFrRzVheERpaWp2VlNEYmpjAAAAAA1kaXZQcm9ncmFtUHViCQACWQAAAAECAAAALEE0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Gl2aWRlbmRzV2l0aGRyYXduCQEAAAAbZ2V0RGl2aWRlbmRzV2l0aGRyYXduQW1vdW50AAAAAQUAAAAJYXNzZXROYW1lBAAAAAlkaXZpZGVuZHMJAQAAABJnZXREaXZpZGVuZEJhbGFuY2UAAAADCAUAAAADdHR4AAAAB2Fzc2V0SWQFAAAAEmRpdmlkZW5kc1dpdGhkcmF3bgUAAAAQZGl2aWRlbmRzUGVyY2VudAQAAAAOYWNjb3VudEJhbGFuY2UJAAPrAAAAAgUAAAAEdGhpcwgFAAAAA3R0eAAAAAdhc3NldElkCQAAZwAAAAIJAABlAAAAAgUAAAAOYWNjb3VudEJhbGFuY2UIBQAAAAN0dHgAAAAGYW1vdW50BQAAAAlkaXZpZGVuZHMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF0ludm9rZVNjcmlwdFRyYW5zYWN0aW9uBAAAAANpdHgFAAAAByRtYXRjaDAGBwf6E7fH", "chainId": 84, "height": 824364, "spentComplexity": 0 } View: original | compacted Prev: BuJqY8mhyJ9CmEnJAVCpLcCgJeNkwhPSQSu4cnmHcfFk Next: 36569vB25gWNF8iX8UV3DSLYTLCoET3kLshoGv8c1tq7 Diff:
OldNewDifferences
158158 let O = A(t, V.amount)
159159 let W = getString(this, (t + "_DepositState"))
160160 if ((W == "Created"))
161- then ScriptResult(WriteSet([DataEntry((t + "_DepositOwner"), T), DataEntry((t + "_DepositState"), "Active"), DataEntry((T + "_DividendsWithdrawn"), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(h), O, V.assetId)]))
161+ then ScriptResult(WriteSet([DataEntry((t + "_DepositOwner"), T), DataEntry((t + "_DepositState"), "Active"), DataEntry((t + "_DividendsWithdrawn"), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(h), O, V.assetId)]))
162162 else throw("Deposit is unavailable")
163163 }
164164
171171 let K = G(t)
172172 let J = H(t)
173173 let X = I(E, J, K)
174- ScriptResult(WriteSet([DataEntry((u + "_DividendsWithdrawn"), (J + X))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(u)), X, E)]))
174+ ScriptResult(WriteSet([DataEntry((t + "_DividendsWithdrawn"), (J + X))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(u)), X, E)]))
175175 }
176176
177177
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = 100000000
55
66 let b = (2600 * a)
77
88 let c = ((2600 * a) / 10000)
99
1010 let d = (13 * a)
1111
1212 let e = (39 * a)
1313
1414 let f = (26000 * a)
1515
1616 let g = (26000 * a)
1717
1818 let h = "3MzDG9rt13Eu5uw4mZqkG5axDiijvVSDbjc"
1919
2020 let i = fromBase58String("A4bJfnBhBTVh7GRNr1hHz6iqJta6eBbaExPDG7UapoaD")
2121
2222 let j = fromBase58String("5yjcfvH6iuwrkFghXuWaJeMppaQ893FSs8HCAgVQzuNY")
2323
2424 let k = unit
2525
2626 let l = base58'8HRQdqJBBeqZvgMtg6we6sw11i5GzpFNs7onNeVRBmaq'
2727
2828 let m = base58'4oHq3C7ar7kmcRHEZBrgPyGtU6fkqJ1pHoRYboKeYSWQ'
2929
3030 let n = base58'Gd9pdZw9muDBZwwsQLqyigRJCDABbiJaksmemzFCorsV'
3131
3232 let o = base58'C2Pz1Q9QYaF9MkK9J9mX9vAMVc25R3w6Lr5g5B5Yje87'
3333
3434 let p = base58'AMQkRmWSWHEd1nMDvDZFkadoCFCxRkDzBsEbscJ9ZZ2P'
3535
3636 func q (r) = if ((r == j))
3737 then r
3838 else throw("You cannot create deposits")
3939
4040
4141 func s (t,r) = {
4242 let u = getString(this, (t + "_DepositOwner"))
4343 if ((r == u))
4444 then r
4545 else throw("Only deposit owner can withdrawal dividends")
4646 }
4747
4848
4949 func v (t) = {
5050 let w = (t + "_DepositOwner")
5151 let x = getString(this, w)
5252 let y = x
5353 if ($isInstanceOf(y, "String"))
5454 then {
5555 let z = y
5656 true
5757 }
5858 else false
5959 }
6060
6161
6262 func A (t,B) = {
6363 let w = (t + "_DepositAmount")
6464 let x = getInteger(this, w)
6565 let C = {
6666 let y = x
6767 if ($isInstanceOf(y, "Int"))
6868 then {
6969 let z = y
7070 z
7171 }
7272 else throw("Couldn't find deposit amount")
7373 }
7474 if ((B == C))
7575 then B
7676 else throw("Amount is incorrect")
7777 }
7878
7979
8080 func D (E) = if (!(isDefined(E)))
8181 then "WAVES"
8282 else if ((E == l))
8383 then "BTC"
8484 else if ((E == m))
8585 then "ETH"
8686 else if ((E == n))
8787 then "LTC"
8888 else if ((E == o))
8989 then "VST"
9090 else if ((E == p))
9191 then "WCT"
9292 else throw("AssetId is incorrect")
9393
9494
9595 func F (t) = if ((t == "WAVES"))
9696 then k
9797 else if ((t == "BTC"))
9898 then l
9999 else if ((t == "ETH"))
100100 then m
101101 else if ((t == "LTC"))
102102 then n
103103 else if ((t == "VST"))
104104 then o
105105 else if ((t == "WCT"))
106106 then p
107107 else throw("Asset name is incorrect")
108108
109109
110110 func G (t) = {
111111 let w = (t + "_DividendPercent")
112112 let x = getInteger(this, w)
113113 let y = x
114114 if ($isInstanceOf(y, "Int"))
115115 then {
116116 let z = y
117117 z
118118 }
119119 else throw("Couldn't Find dividend percent")
120120 }
121121
122122
123123 func H (t) = {
124124 let x = getInteger(this, (t + "_DividendsWithdrawn"))
125125 let y = x
126126 if ($isInstanceOf(y, "Int"))
127127 then {
128128 let z = y
129129 z
130130 }
131131 else 0
132132 }
133133
134134
135135 func I (E,J,K) = {
136136 let L = (assetBalance(this, E) + J)
137137 let M = ((L * K) / 100)
138138 (M - J)
139139 }
140140
141141
142142 @Callable(N)
143143 func createDeposit (t,O,P,Q,R,S) = {
144144 let T = q(N.callerPublicKey)
145145 let U = v(t)
146146 if (U)
147147 then throw("Deposit is already created")
148148 else WriteSet([DataEntry((t + "_DepositState"), "Created"), DataEntry((t + "_DepositAmount"), O), DataEntry((t + "_DividendPercent"), P), DataEntry((t + "_DepositStartBlock"), Q), DataEntry((t + "_DepositStartTimestamp"), S), DataEntry((t + "_DepositDurationBlock"), R)])
149149 }
150150
151151
152152
153153 @Callable(N)
154154 func deposit () = {
155155 let T = toBase58String(N.callerPublicKey)
156156 let V = extract(N.payment)
157157 let t = D(V.assetId)
158158 let O = A(t, V.amount)
159159 let W = getString(this, (t + "_DepositState"))
160160 if ((W == "Created"))
161- then ScriptResult(WriteSet([DataEntry((t + "_DepositOwner"), T), DataEntry((t + "_DepositState"), "Active"), DataEntry((T + "_DividendsWithdrawn"), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(h), O, V.assetId)]))
161+ then ScriptResult(WriteSet([DataEntry((t + "_DepositOwner"), T), DataEntry((t + "_DepositState"), "Active"), DataEntry((t + "_DividendsWithdrawn"), 0)]), TransferSet([ScriptTransfer(addressFromStringValue(h), O, V.assetId)]))
162162 else throw("Deposit is unavailable")
163163 }
164164
165165
166166
167167 @Callable(N)
168168 func withdrawDividends (t) = {
169169 let E = F(t)
170170 let u = s(t, toBase58String(N.callerPublicKey))
171171 let K = G(t)
172172 let J = H(t)
173173 let X = I(E, J, K)
174- ScriptResult(WriteSet([DataEntry((u + "_DividendsWithdrawn"), (J + X))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(u)), X, E)]))
174+ ScriptResult(WriteSet([DataEntry((t + "_DividendsWithdrawn"), (J + X))]), TransferSet([ScriptTransfer(addressFromPublicKey(fromBase58String(u)), X, E)]))
175175 }
176176
177177
178178 @Verifier(Y)
179179 func Z () = if (sigVerify(Y.bodyBytes, Y.proofs[0], i))
180180 then {
181181 let y = Y
182182 if ($isInstanceOf(y, "SetScriptTransaction"))
183183 then {
184184 let aa = y
185185 true
186186 }
187187 else if ($isInstanceOf(y, "TransferTransaction"))
188188 then {
189189 let ab = y
190190 let t = D(ab.assetId)
191191 let K = G(t)
192192 let J = H(t)
193193 let ac = I(ab.assetId, J, K)
194194 let ad = assetBalance(this, ab.assetId)
195195 ((ad - ab.amount) >= ac)
196196 }
197197 else if ($isInstanceOf(y, "InvokeScriptTransaction"))
198198 then {
199199 let ae = y
200200 true
201201 }
202202 else false
203203 }
204204 else false
205205

github/deemru/w8io/026f985 
50.16 ms