tx · FmsDfs1hYF2fWkm8zAS6V76dWckPnxihtotDVrUSRtjS

3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL:  -0.01400000 Waves

2019.08.28 12:59 [650904] smart account 3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL > SELF 0.00000000 Waves

{ "type": 13, "id": "FmsDfs1hYF2fWkm8zAS6V76dWckPnxihtotDVrUSRtjS", "fee": 1400000, "feeAssetId": null, "timestamp": 1566986356684, "version": 1, "sender": "3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL", "senderPublicKey": "3RTmBp69DqXiohzMXcmVU1pMFssmztWoibFARiKrgTr7", "proofs": [ "3fU2w7BVSt83PaV13xdHEgDPRWviVFTFiwMxpPK7Av84YKMEVRQza9nsaB1vaK3fuwxL7BRgyS8ZB3BxRZcyNJsg" ], "script": "base64:AwQAAAAHUHViS2V5MQEAAAAgaQxxSAhSITOlMYdvwKcfK7u/x0yzOg/68EH0ax0QlWUEAAAAB1B1YktleTIBAAAAILb58FcZXTIbjEshMW6ayDB2XcNop87YatlbtNE8j6N0BAAAAARzaWcxAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAB1B1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAABHNpZzIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAHUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAkAAGYAAAACCQAAZAAAAAIFAAAABHNpZzEFAAAABHNpZzIAAAAAAAAAAADO+UOI", "chainId": 84, "height": 650904, "spentComplexity": 0 } View: original | compacted Prev: B2LgimrneTiKrC1WT4AMSUmwMwu1H85FWJh5PNA5SeLi Next: EaVVzPXDF9dcWnG6R6nU2RrD9zcKe3NK2wdcq5QL2Skm Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let a = base58'3N3LWiYdT9n8o6ecwFZGy6MCehhq6sLUFFL'
5-
6-let b = base58'9Jsnot7RWQmTsfXtezQN7igoS2q1QF1jsotaxwh8Fxp4'
7-
8-let c = unit
9-
10-let d = 0
11-
12-@Callable(e)
13-func fund () = {
14- let f = {
15- let g = e.payment
16- if ($isInstanceOf(g, "AttachedPayment"))
17- then {
18- let h = g
19- h
20- }
21- else throw("Payment not attached")
22- }
23- let i = f.assetId
24- let j = f.amount
25- if (if ((i == b))
26- then !(isDefined(getString(this, "fundA")))
27- else false)
28- then WriteSet([DataEntry("amountTokenA", j), DataEntry("fundA", "funded")])
29- else if (if ((i == c))
30- then !(isDefined(getString(this, "fundB")))
31- else false)
32- then WriteSet([DataEntry("amountTokenB", j), DataEntry("fundB", "funded")])
33- else throw("already funded or you try to fund with incorrect asset")
34- }
35-
36-
37-
38-@Callable(e)
39-func replenishment () = {
40- let f = {
41- let g = e.payment
42- if ($isInstanceOf(g, "AttachedPayment"))
43- then {
44- let h = g
45- h
46- }
47- else throw("Payment not attached")
48- }
49- let i = f.assetId
50- let j = f.amount
51- if (if ((i == b))
52- then !(isDefined(getString(this, "fundA")))
53- else false)
54- then {
55- let k = getIntegerValue(this, "amountTokenA")
56- WriteSet([DataEntry("amountTokenA", (k + j))])
57- }
58- else if (if ((i == c))
59- then !(isDefined(getString(this, "fundB")))
60- else false)
61- then {
62- let l = getIntegerValue(this, "amountTokenB")
63- WriteSet([DataEntry("amountTokenA", (l + j))])
64- }
65- else throw("there was an error in the replenishment")
66- }
67-
68-
69-
70-@Callable(e)
71-func exchanger (m) = if (if ((0 > d))
72- then true
73- else (d > 100))
74- then throw("incorrect comission value")
75- else {
76- let l = getIntegerValue(this, "amountTokenB")
77- let k = getIntegerValue(this, "amountTokenA")
78- let f = {
79- let g = e.payment
80- if ($isInstanceOf(g, "AttachedPayment"))
81- then {
82- let h = g
83- h
84- }
85- else throw("Payment not attached")
86- }
87- let i = f.assetId
88- let j = f.amount
89- if ((i == c))
90- then {
91- let n = ((fraction(k, j, (j + l)) * (100 - d)) / 100)
92- if ((m > n))
93- then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level")
94- else {
95- let o = b
96- ScriptResult(WriteSet([DataEntry("amountTokenA", (k - n)), DataEntry("amountTokenB", (l + j))]), TransferSet([ScriptTransfer(e.caller, n, o)]))
97- }
98- }
99- else if ((i == b))
100- then {
101- let n = ((fraction(l, j, (j + k)) * (100 - d)) / 100)
102- if ((m > n))
103- then throw("Price has changed dramaticaly. Receiving token amount don't satisfy specified price level")
104- else {
105- let o = c
106- ScriptResult(WriteSet([DataEntry("amountTokenA", (k + j)), DataEntry("amountTokenB", (l - n))]), TransferSet([ScriptTransfer(e.caller, n, o)]))
107- }
108- }
109- else throw("Asset is not allowed")
110- }
111-
112-
113-
114-@Callable(e)
115-func withdraw () = {
116- let p = assetBalance(this, b)
117- let q = assetBalance(this, c)
118- if ((e.caller.bytes == a))
119- then ScriptResult(WriteSet([DataEntry("amountTokenA", "withdrawn"), DataEntry("amountTokenB", "withdrawn")]), TransferSet([ScriptTransfer(e.caller, p, b), ScriptTransfer(e.caller, q, c)]))
120- else throw("You are not exchanger's owner")
121- }
122-
123-
124-@Verifier(e)
125-func r () = true
126-
2+{-# CONTENT_TYPE EXPRESSION #-}
3+let PubKey1 = base58'854p8BYzrj6yBPRPmfQur3oF1Rjc1AJ548qRp5FT5kDa'
4+let PubKey2 = base58'DKGFPozLrsiR8NM4NJzqQaBYC8NyGYjuw2hDYicQVjco'
5+let sig1 = if (sigVerify(tx.bodyBytes, tx.proofs[0], PubKey1))
6+ then 1
7+ else 0
8+let sig2 = if (sigVerify(tx.bodyBytes, tx.proofs[1], PubKey2))
9+ then 1
10+ else 0
11+((sig1 + sig2) > 0)

github/deemru/w8io/169f3d6 
30.57 ms