tx · 5QvBRmBdu2wVgp5dK7jttrdYLKqT2KUWSBViP6rKHxND

3Mv1jeYrZLjzFaQHVVWKfKoC2Q88zUh4QJi:  -0.01400000 Waves

2019.06.23 13:18 [554556] smart account 3Mv1jeYrZLjzFaQHVVWKfKoC2Q88zUh4QJi > SELF 0.00000000 Waves

{ "type": 13, "id": "5QvBRmBdu2wVgp5dK7jttrdYLKqT2KUWSBViP6rKHxND", "fee": 1400000, "feeAssetId": null, "timestamp": 1561285110836, "version": 1, "sender": "3Mv1jeYrZLjzFaQHVVWKfKoC2Q88zUh4QJi", "senderPublicKey": "BHFS1nkiKnpfwyR1K27mC8Hx2QuzDwMwUcNQps6NbD9A", "proofs": [ "3J2DzKW6CBfTtCm3XnSTPMuavcCC3Fq23bg4LFfxum9EnAyxvwN39FQz4qGUawYbioPCMZs2gcHWDaXWZ7fTRRXy" ], "script": "base64:AAIDAAAAAAAAAAAAAAABAAAAAAtvd25lclB1YktleQEAAAAgmL56zWUyvLx9tZV2237SbmCmbtk/pa8bE+0Lx9TEWkkAAAABAAAAAWkBAAAACHB1cmNoYXNlAAAAAAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIGNhbiB1c2UgV0FWRVMgb25seSBhdCB0aGUgbW9tZW50BAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQIAAAAucHVyY2hhc2UgYW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAMHB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgaGlnaGVyIHRoYW4gaXRlbSBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAACBzdGF0dXM6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzAgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAfcHJpY2U6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAFkBQAAAAckbWF0Y2gwCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAUAAAALb3duZXJQdWJLZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAYHprhD1Q==", "chainId": 84, "height": 554556, "spentComplexity": 0 } View: original | compacted Prev: HhLvACRF1R8PLBjTj2BNBWGC3uNvyDGRZAyr3hgvQx1Q Next: none Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let ownerPubKey = base58'BHFS1nkiKnpfwyR1K27mC8Hx2QuzDwMwUcNQps6NbD9A'
55
66 @Callable(i)
77 func purchase () = {
2525 }
2626
2727
28+@Verifier(tx)
29+func verify () = match tx {
30+ case d: SetScriptTransaction =>
31+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
32+ case d: DataTransaction =>
33+ true
34+ case _ =>
35+ false
36+}
37+
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-
4+let ownerPubKey = base58'BHFS1nkiKnpfwyR1K27mC8Hx2QuzDwMwUcNQps6NbD9A'
55
66 @Callable(i)
77 func purchase () = {
88 let pmt = extract(i.payment)
99 if (isDefined(pmt.assetId))
1010 then throw("can use WAVES only at the moment")
1111 else {
1212 let customerAddress = toBase58String(i.caller.bytes)
1313 let price = match getInteger(this, "item_A_coupon_price") {
1414 case a: Int =>
1515 a
1616 case _ =>
1717 0
1818 }
1919 if ((price > pmt.amount))
2020 then throw("purchase amount cannot be less than item price")
2121 else if ((pmt.amount > price))
2222 then throw("purchase amount cannot be higher than item price")
2323 else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerAddress), price)])
2424 }
2525 }
2626
2727
28+@Verifier(tx)
29+func verify () = match tx {
30+ case d: SetScriptTransaction =>
31+ sigVerify(tx.bodyBytes, tx.proofs[0], ownerPubKey)
32+ case d: DataTransaction =>
33+ true
34+ case _ =>
35+ false
36+}
37+

github/deemru/w8io/169f3d6 
30.24 ms