tx · F3HGUnsaU9SYovRExpA8DGLmgo1LYHwhfna98sWwvoVb

3N9gCgZp6acUQSRjKT1Dj2YxrKVjKREaVr2:  -0.01400000 Waves

2019.08.28 13:00 [650905] smart account 3N9gCgZp6acUQSRjKT1Dj2YxrKVjKREaVr2 > SELF 0.00000000 Waves

{ "type": 13, "id": "F3HGUnsaU9SYovRExpA8DGLmgo1LYHwhfna98sWwvoVb", "fee": 1400000, "feeAssetId": null, "timestamp": 1566986437063, "version": 1, "sender": "3N9gCgZp6acUQSRjKT1Dj2YxrKVjKREaVr2", "senderPublicKey": "5pHdyrSDWgZu1GZkTJdDtdYgZzbVv1aKqdnzU85EuZXy", "proofs": [ "3ht4F4SoBvxgi4JVfSB8U3aa6oZxTCJWAk3A3ahG8rs7KVdqCKyc691vaidBGLij369m7hGvb5h42TD3ts5TJ4QW" ], "script": "base64:AwQAAAAHUHViS2V5MQEAAAAgaQxxSAhSITOlMYdvwKcfK7u/x0yzOg/68EH0ax0QlWUEAAAAB1B1YktleTIBAAAAILb58FcZXTIbjEshMW6ayDB2XcNop87YatlbtNE8j6N0BAAAAARzaWcxAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAB1B1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAABHNpZzIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAHUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAkAAGYAAAACCQAAZAAAAAIFAAAABHNpZzEFAAAABHNpZzIAAAAAAAAAAADO+UOI", "chainId": 84, "height": 650905, "spentComplexity": 0 } View: original | compacted Prev: G5L8Kb1i7gpS6hJrnM5hWoKvVRGBhPpRvz2MymgsTa9z Next: Cfs7UL2gy14xskneKQuZS4GfftapVN75PYWV1X5FbJuW Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-let wavesLets = 100000000
5-
6-let TotalAmountKey = "TotalAmount"
7-
8-let TotalAmountLeftKey = "TotalAmountLeft"
9-
10-let receiverPubKey = base58'8xLZH4uWaXHqxNcaf48a41X1bnYhPmkYs4kKcSBHp3xR'
11-
12-let receiver = addressFromPublicKey(receiverPubKey)
13-
14-let LastPaymentKey = "LastPayment"
15-
16-let PaymentTimeout = 10
17-
18-let MaxSalary = 1
19-
20-@Callable(i)
21-func deposit () = {
22- let pmt = extract(i.payment)
23- if (isDefined(pmt.assetId))
24- then throw("can hodl waves only at the moment")
25- else {
26- let currentKey = toBase58String(i.caller.bytes)
27- let currentAmount = match getInteger(this, currentKey) {
28- case a: Int =>
29- a
30- case _ =>
31- 0
32- }
33- let currentTotalAmount = match getInteger(this, TotalAmountKey) {
34- case a: Int =>
35- a
36- case _ =>
37- 0
38- }
39- let currentAmountLeft = match getInteger(this, TotalAmountLeftKey) {
40- case a: Int =>
41- a
42- case _ =>
43- 0
44- }
45- let newAmount = (currentAmount + pmt.amount)
46- let newtotalAmount = (currentTotalAmount + pmt.amount)
47- let newtotalamountleft = (currentAmountLeft + pmt.amount)
48- WriteSet([DataEntry(currentKey, newAmount), DataEntry(TotalAmountKey, newtotalAmount), DataEntry(TotalAmountLeftKey, newtotalamountleft)])
49- }
50- }
51-
52-
53-
54-@Callable(i)
55-func withdraw (amount) = {
56- let currentKey = toBase58String(i.caller.bytes)
57- let AllowedSigner = (i.caller == receiver)
58- let currentAmountLeft = match getInteger(this, TotalAmountLeftKey) {
59- case a: Int =>
60- a
61- case _ =>
62- 0
63- }
64- let lastPayment = match getInteger(this, LastPaymentKey) {
65- case a: Int =>
66- a
67- case _ =>
68- 0
69- }
70- if (!(AllowedSigner))
71- then throw("Withdraw is only allowed by recipient")
72- else if (((lastPayment + PaymentTimeout) > height))
73- then throw("Next payment not yet allowed")
74- else {
75- let newAmountLeft = (currentAmountLeft - amount)
76- if ((0 > amount))
77- then throw("Can't withdraw negative amount")
78- else if ((amount > (MaxSalary * wavesLets)))
79- then throw((("Not allowed to withdraw more than " + toString(MaxSalary)) + " WAVES"))
80- else if ((0 > newAmountLeft))
81- then throw("Not enough balance")
82- else ScriptResult(WriteSet([DataEntry(TotalAmountLeftKey, newAmountLeft), DataEntry(LastPaymentKey, height)]), TransferSet([ScriptTransfer(receiver, amount, unit)]))
83- }
84- }
85-
86-
87-@Verifier(tx)
88-func verify () = match tx {
89- case s: SetScriptTransaction =>
90- true
91- case _ =>
92- false
93-}
94-
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 
37.20 ms