tx · 8FZQ7N7ZZA3xPtMUHLoLxufQfE7j1fNcpqWPj3sQo6wx

3MrerouesBAhSFEeaz8ok11iDxb485QT26p:  -0.01400000 Waves

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

{ "type": 13, "id": "8FZQ7N7ZZA3xPtMUHLoLxufQfE7j1fNcpqWPj3sQo6wx", "fee": 1400000, "feeAssetId": null, "timestamp": 1566986356590, "version": 1, "sender": "3MrerouesBAhSFEeaz8ok11iDxb485QT26p", "senderPublicKey": "AHTkw9xnupErRdcDWwGTvG5B6Mu1kwqX6qSCfxyMWtMy", "proofs": [ "5zP6vgBdGad7JbTmuJBftPbSqCH6LoXrdZMMnRRUB6AT79fUD9RXnei9pxTb47WpPToAvMk8kEQ12MU2k46Tku7Z" ], "script": "base64:AwQAAAAHUHViS2V5MQEAAAAgaQxxSAhSITOlMYdvwKcfK7u/x0yzOg/68EH0ax0QlWUEAAAAB1B1YktleTIBAAAAILb58FcZXTIbjEshMW6ayDB2XcNop87YatlbtNE8j6N0BAAAAARzaWcxAwkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAFAAAAB1B1YktleTEAAAAAAAAAAAEAAAAAAAAAAAAEAAAABHNpZzIDCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAQUAAAAHUHViS2V5MgAAAAAAAAAAAQAAAAAAAAAAAAkAAGYAAAACCQAAZAAAAAIFAAAABHNpZzEFAAAABHNpZzIAAAAAAAAAAADO+UOI", "chainId": 84, "height": 650904, "spentComplexity": 0 } View: original | compacted Prev: BMVasv7fZ5jdn8E5DKk9y35TyBFmLEZnoGD5M6wcSZhP Next: 6KFeb1rdepStJAbnonRWT9NPgaZ19ugLw4cHnP3UUqVD Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
2-{-# SCRIPT_TYPE ACCOUNT #-}
3-{-# CONTENT_TYPE DAPP #-}
4-func depositImpl (pmt,caller) = if (isDefined(pmt.assetId))
5- then throw("can hodl waves only at the moment")
6- else {
7- let currentKey = toBase58String(caller.bytes)
8- let currentAmount = match getInteger(this, currentKey) {
9- case a: Int =>
10- a
11- case _ =>
12- 0
13- }
14- let newAmount = (currentAmount + pmt.amount)
15- WriteSet([DataEntry(currentKey, newAmount)])
16- }
17-
18-
19-@Callable(i)
20-func default () = depositImpl(extract(i.payment), i.caller)
21-
22-
23-
24-@Callable(i)
25-func deposit () = depositImpl(extract(i.payment), i.caller)
26-
27-
28-
29-@Callable(i)
30-func withdraw (amount,donate,name,vec) = {
31- let expectedVec = toBytes("Hello, Ride4DApp!")
32- let donationAddress = extract(addressFromString("3N4sxBoGovhPyScZ8DyXaXL9tWKtG6kBvSj"))
33- let withdrawTotal = if (donate)
34- then (2 * amount)
35- else amount
36- let currentKey = toBase58String(i.caller.bytes)
37- let currentAmount = match getInteger(this, currentKey) {
38- case a: Int =>
39- a
40- case _ =>
41- 0
42- }
43- let newAmount = (currentAmount - withdrawTotal)
44- if ((0 > withdrawTotal))
45- then throw("Can't withdraw negative amount")
46- else if ((0 > newAmount))
47- then throw("Not enough balance")
48- else if ((expectedVec != vec))
49- then throw("vec parameter doesn't match expected value")
50- else ScriptResult(WriteSet([DataEntry(currentKey, newAmount), DataEntry((name + " Total"), withdrawTotal), DataEntry((name + " Donation"), amount)]), TransferSet([ScriptTransfer(i.caller, amount, unit), ScriptTransfer(donationAddress, amount, unit)]))
51- }
52-
53-
54-@Verifier(tx)
55-func verify () = true
56-
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/026f985 
28.11 ms