tx · AvT16XRz5LeDDDYmFhfPZnVEeeoA3VgVrB8wgrF8BCW1

3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4:  -0.01400000 Waves

2020.11.18 17:01 [1270875] smart account 3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4 > SELF 0.00000000 Waves

{ "type": 13, "id": "AvT16XRz5LeDDDYmFhfPZnVEeeoA3VgVrB8wgrF8BCW1", "fee": 1400000, "feeAssetId": null, "timestamp": 1605708109302, "version": 2, "chainId": 84, "sender": "3MxRqURevjNgwbz8kneeUwGPzCtszagdsx4", "senderPublicKey": "2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv", "proofs": [ "44A2KAYY28qW138Qz3tnCD9qrqfp1dkWfixVtifuNqeyEA9AChvnWCQCYzShHYt7FvPfMX5ab3Cijwjj9MFWMTAd" ], "script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAwAAAAARYWNjb3VudDFQdWJsaWNLZXkBAAAAIPeNeDDs4TWVhR1bzOk94lFsHOraL9B/FRj0XfVMj0hOAAAAABFhY2NvdW50MlB1YmxpY0tleQEAAAAgG1e/aEwKrtMkcq9WyiLLAHtKPJgLd/oAoUXcKuUDIhUAAAAADm90aGVyUHVibGljS2V5AQAAACDnblGJprjxGAm9jEz8V5M0TOEG6bhNvbMQquBNrx0dWgAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAANwbXQJAQAAAAV2YWx1ZQAAAAEIBQAAAAFpAAAACHBheW1lbnRzAwkBAAAACWlzRGVmaW5lZAAAAAEICQABkQAAAAIFAAAAA3BtdAAAAAAAAAAAAAAAAAdhc3NldElkCQAAAgAAAAECAAAACG9ubHkgd3dzBAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQM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1hdGNoMAYDAwUAAAAQYWNjb3VudDFhY2NvdW50MgYFAAAADWFjY291bnQxb3RoZXIGBQAAAA1hY2NvdW50Mm90aGVy7XVrYw==", "height": 1270875, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: Buapt4Y8hQds49duX211UexFvSLzeYP4FquMfoDYFzt8 Next: BTT2t6sVT8BKhZmi7qZUTWYJvyUk3kqBvqyXu53uxLjD Diff:
OldNewDifferences
2323 if ((price > pmt[0].amount))
2424 then throw("moar moeny")
2525 else if ((pmt[0].amount > price))
26- then throw("tu macz money")
26+ then throw(toString(price))
2727 else if ((size(pmt) > 1))
2828 then throw("single item only")
2929 else [StringEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddress), price)]
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let account1PublicKey = base58'HfLpRhXtnuCabRyNT6z7soaXcbUpwLUhjyBCVQ4szwzd'
55
66 let account2PublicKey = base58'2qjcWuL7QitmuhkSTM7CnNxurCYXuqJ9ubswLBGmXfDv'
77
88 let otherPublicKey = base58'GaQkBG6yLLAarb8wvPrEKnQhFqWomD2ZGT1T4vVx24qw'
99
1010 @Callable(i)
1111 func purchase () = {
1212 let pmt = value(i.payments)
1313 if (isDefined(pmt[0].assetId))
1414 then throw("only wws")
1515 else {
1616 let customerAddress = toBase58String(i.caller.bytes)
1717 let price = match getInteger(this, "item_A_coupon_price") {
1818 case a: Int =>
1919 a
2020 case _ =>
2121 0
2222 }
2323 if ((price > pmt[0].amount))
2424 then throw("moar moeny")
2525 else if ((pmt[0].amount > price))
26- then throw("tu macz money")
26+ then throw(toString(price))
2727 else if ((size(pmt) > 1))
2828 then throw("single item only")
2929 else [StringEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddress), price)]
3030 }
3131 }
3232
3333
3434 @Verifier(tx)
3535 func verify () = {
3636 let account1 = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], account1PublicKey))
3737 then true
3838 else sigVerify(tx.bodyBytes, tx.proofs[1], account1PublicKey))
3939 then true
4040 else sigVerify(tx.bodyBytes, tx.proofs[2], account1PublicKey)
4141 let account2 = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], account2PublicKey))
4242 then true
4343 else sigVerify(tx.bodyBytes, tx.proofs[1], account2PublicKey))
4444 then true
4545 else sigVerify(tx.bodyBytes, tx.proofs[2], account2PublicKey)
4646 let other = if (if (sigVerify(tx.bodyBytes, tx.proofs[0], otherPublicKey))
4747 then true
4848 else sigVerify(tx.bodyBytes, tx.proofs[1], otherPublicKey))
4949 then true
5050 else sigVerify(tx.bodyBytes, tx.proofs[2], otherPublicKey)
5151 let account1account2 = if (account1)
5252 then account2
5353 else false
5454 let account1other = if (account1)
5555 then other
5656 else false
5757 let account2other = if (other)
5858 then account2
5959 else false
6060 match tx {
6161 case d: SetScriptTransaction =>
6262 true
6363 case d: DataTransaction =>
6464 true
6565 case _ =>
6666 if (if (account1account2)
6767 then true
6868 else account1other)
6969 then true
7070 else account2other
7171 }
7272 }
7373

github/deemru/w8io/169f3d6 
29.63 ms