tx · 5fPrpUKY12GboKYYecgLrMzKp2dtJ9UW73FrhEnmYwrE

3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9:  -0.01400000 Waves

2019.07.31 19:02 [610482] smart account 3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9 > SELF 0.00000000 Waves

{ "type": 13, "id": "5fPrpUKY12GboKYYecgLrMzKp2dtJ9UW73FrhEnmYwrE", "fee": 1400000, "feeAssetId": null, "timestamp": 1564588955874, "version": 1, "sender": "3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9", "senderPublicKey": "BZri78A6CXpGPmAHZNwqQXoNfWamwRZiuaBas3VdDKZp", "proofs": [ "5SS6ZnGafrYSSzF3X8BiFxVhywmdpPaUGT86UY3he25oDg58MSQBd5ho328LnU9kkAwPAFEiiqitU9ZSWLZyBmCG" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAEAAAALUHJvZHVjdG5hbWUEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFDYW4gdXNlIG9ubHkgV0FWRVMgYXQgdGhlIG1vbWVudC4EAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlwAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAApjdXJyZW50S2V5CQACWAAAAAEICAUAAAABaQAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAABXByaWNlBAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRoaXMFAAAACmN1cnJlbnRLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAMJAABmAAAAAgUAAAAFcHJpY2UIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAPUFtb3VudCBjYW5ub3QgYmUgbGVzcyB0aGFuIGl0ZW0gcHJpY2UuIFlvdSBzcGVjaWZpZWQgYW1vdW50OiAJAAGkAAAAAQgFAAAAA3BtdAAAAAZhbW91bnQCAAAADWJ1dCBwcmljZSBpcyAJAAGkAAAAAQUAAAAFcHJpY2UDCQAAZgAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAVwcmljZQkAAAIAAAABCQABLAAAAAICAAAAQEFtb3VudCBjYW5ub3QgYmUgZ3JlYXRlciB0aGFuIGl0ZW0gcHJpY2UuIFlvdSBzcGVjaWZpZWQgYW1vdW50OiAJAAGkAAAAAQgFAAAAA3BtdAAAAAZhbW91bnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAB3N0YXR1czoFAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAD2N1c3RvbWVyQWRkcmVzcwIAAAAJY29uZmlybWVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIJAAEsAAAAAgkAASwAAAACAgAAAAZwcmljZToFAAAACmN1cnJlbnRLZXkCAAAAAV8FAAAAD2N1c3RvbWVyQWRkcmVzcwUAAAAFcHJpY2UFAAAAA25pbAAAAACHxcJq", "chainId": 84, "height": 610482, "spentComplexity": 0 } View: original | compacted Prev: A881DsM7RqwgCCnV2ZfB2TUPtbmnfRhJ4zC37nHqUHpC Next: GA39hHqLgsuD9wr4Pg8E9ks3mxuZDQiwzMcfGAjHsgzp Diff:
OldNewDifferences
1818 0
1919 }
2020 if ((price > pmt.amount))
21- then throw(("Amount cannot be less than item price. You specified amount: " + toString(pmt.amount)))
21+ then throw(((("Amount cannot be less than item price. You specified amount: " + toString(pmt.amount)) + "but price is ") + toString(price)))
2222 else if ((pmt.amount > price))
2323 then throw(("Amount cannot be greater than item price. You specified amount: " + toString(pmt.amount)))
2424 else WriteSet([DataEntry(((("status:" + currentKey) + "_") + customerAddress), "confirmed"), DataEntry(((("price:" + currentKey) + "_") + customerAddress), price)])
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func purchase (Productname) = {
88 let pmt = extract(i.payment)
99 if (isDefined(pmt.assetId))
1010 then throw("Can use only WAVES at the moment.")
1111 else {
1212 let customerAddress = toBase16String(i.caller.bytes)
1313 let currentKey = toBase58String(i.caller.bytes)
1414 let price = match getInteger(this, currentKey) {
1515 case a: Int =>
1616 a
1717 case _ =>
1818 0
1919 }
2020 if ((price > pmt.amount))
21- then throw(("Amount cannot be less than item price. You specified amount: " + toString(pmt.amount)))
21+ then throw(((("Amount cannot be less than item price. You specified amount: " + toString(pmt.amount)) + "but price is ") + toString(price)))
2222 else if ((pmt.amount > price))
2323 then throw(("Amount cannot be greater than item price. You specified amount: " + toString(pmt.amount)))
2424 else WriteSet([DataEntry(((("status:" + currentKey) + "_") + customerAddress), "confirmed"), DataEntry(((("price:" + currentKey) + "_") + customerAddress), price)])
2525 }
2626 }
2727
2828

github/deemru/w8io/169f3d6 
28.87 ms