tx · 73GEufqkgET8UiCV3ih7eny1za32Q6iZbVZNve4yKe5T

3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq:  -0.01400000 Waves

2022.01.11 01:30 [1873448] smart account 3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq > SELF 0.00000000 Waves

{ "type": 13, "id": "73GEufqkgET8UiCV3ih7eny1za32Q6iZbVZNve4yKe5T", "fee": 1400000, "feeAssetId": null, "timestamp": 1641853893731, "version": 2, "chainId": 84, "sender": "3MpniGh4Ab64nzX6AXtoL5tzeC5EwSyHuaq", "senderPublicKey": "HxF3FdYr3sD3ju9Y1wL4d5kmRtKJGhgSSYQkCyo78xGn", "proofs": [ "2DfkdcNsYaHG8cAC5Xs8QfVCgSVtvNMudiHwDJQVBCrJEoLbqzALFdmAY9CVScScjHSHgTjcGEpgzJxCrkS9P2PJ" ], "script": "base64:AAIFAAAAAAAAAIoIAhIAEgASAwoBCBoSCgFhEg1hY2NvdW50UHViS2V5GgYKAWISAWkaDAoBYxIHcGF5bWVudBoRCgFkEgxjdXN0b21lckFkZHIaCgoBZRIFcHJpY2UaDAoBZhIHJG1hdGNoMBoGCgFnEgF0GggKAWgSA2tleRoHCgFpEgJ0eBoLCgFqEgZ2ZXJpZnkAAAABAAAAAAFhAQAAACD74c8fxHITmic4XJURczmbArRsu8kqaItHqXO3wdtFBwAAAAMAAAABYgEAAAAIcHVyY2hhc2UAAAAABAAAAAFjCQABkQAAAAIIBQAAAAFiAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAFjAAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAYT25seSBzaG91bGQgcGF5IGluIHdhdmVzBAAAAAFkCQACWAAAAAEICAUAAAABYgAAAAZjYWxsZXIAAAAFYnl0ZXMEAAAAAWUEAAAAAWYJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAABZgIA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AggFAAAAAWkAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAABaQAAAA9zZW5kZXJQdWJsaWNLZXnVIn2J", "height": 1873448, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EGSRFdtxKcD6Pig3ndoRPdzBgdjM65HSXG9suw8XzWRr Next: FBqnYqzcxC2mDudFec3gJsqkbRatDSPat3S3EjNoDiTz Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let accountPubKey = base58'HxF3FdYr3sD3ju9Y1wL4d5kmRtKJGhgSSYQkCyo78xGn'
55
66 @Callable(i)
77 func purchase () = {
88 let payment = i.payments[0]
99 if (isDefined(payment.assetId))
1010 then throw("Only should pay in waves")
1111 else {
1212 let customerAddr = toBase58String(i.caller.bytes)
1313 let price = match getInteger(this, "item_A_coupon_price") {
1414 case t: Int =>
1515 t
1616 case _ =>
1717 0
1818 }
1919 if ((payment.amount > price))
2020 then throw(("payment cant be higher than price" + toString(price)))
2121 else if ((price > payment.amount))
2222 then throw(("payment cant be less than price: " + toString(price)))
2323 else [StringEntry(("status:purchase_item_A_customer_" + customerAddr), "confirmed"), IntegerEntry(("price:purchase_item_A_customer_" + customerAddr), price)]
2424 }
2525 }
2626
2727
2828
2929 @Callable(i)
3030 func setPrices () = if ((i.callerPublicKey == accountPubKey))
3131 then [IntegerEntry("item_A_coupon_price", 30000000)]
3232 else throw("Only owner can set prices")
3333
3434
3535
3636 @Callable(i)
3737 func deleteEntry (key) = if ((i.callerPublicKey == accountPubKey))
3838 then [DeleteEntry(key)]
3939 else throw("Only owner can delete entries")
4040
4141
4242 @Verifier(tx)
4343 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
4444

github/deemru/w8io/169f3d6 
39.24 ms