tx · DfgSc9PKS9zuT5gQVTaM5MZjkt1tTeSi52jpb3C1gRm6

3MwrbksXinhUhJ9ewTxuxiPfKVsTx9GCbYC:  -0.01400000 Waves

2022.02.16 15:53 [1926202] smart account 3MwrbksXinhUhJ9ewTxuxiPfKVsTx9GCbYC > SELF 0.00000000 Waves

{ "type": 13, "id": "DfgSc9PKS9zuT5gQVTaM5MZjkt1tTeSi52jpb3C1gRm6", "fee": 1400000, "feeAssetId": null, "timestamp": 1645016085652, "version": 2, "chainId": 84, "sender": "3MwrbksXinhUhJ9ewTxuxiPfKVsTx9GCbYC", "senderPublicKey": "2Yr3nmcvFCJn3eLnhcLTwY36srATJViCmv9AMCiuuNMd", "proofs": [ "NWTQWV2Qc9JhhMN6RCM7tX6eotS6dEHqpKmrU8XXphgLEiPFRp1rkfpNoPQBtb2fyzHJBaygXiSTpaQ13WHqhKx" ], "script": "base64:AAIDAAAAAAAAAAwIARIDCgEBEgMKAQEAAAAAAAAAAgAAAAFpAQAAAAxjdXN0b21lckJ1eUEAAAABAAAABmFtb3VudAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQDCQEAAAAJaXNEZWZpbmVkAAAAAQgFAAAAA3BtdAAAAAdhc3NldElkCQAAAgAAAAECAAAAIENhbiB1c2UgV2F2ZXMgb25seSBhdCB0aGUgbW9tZW50BAAAAA9jdXN0b21lckFkZHJlc3MJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwQAAAAFcHJpY2UEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwIAAAATaXRlbV9BX2NvdXBvbl9wcmljZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQUAAAAGYW1vdW50CQAAAgAAAAECAAAALlB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgbG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gAAAAECAAAAMFB1cmNoYXNlIGFtb3VudCBjYW5ub3QgYmUgaGlnaGVyIHRoYW4gaXRlbSBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAACBzdGF0dXM6cHVyY2hhc2VfaXRlbV9CX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzAgAAAAljb25maXJtZWQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgIAAAAfcHJpY2U6cHVyY2hhc2VfaXRlbV9CX2N1c3RvbWVyXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAADi0q3c=", "height": 1926202, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: fBgUq79RwpNsiP2cjJUeaCjXfLFDNkA2sitkvUAw6YC Next: Ep9U93YV2a9fT1RgEzz2BzJe56c1udwLtc4E9qJo17Vk Diff:
OldNewDifferences
2727
2828
2929 @Callable(i)
30-func customerBuyB (amount,item) = {
30+func customerBuyB (amount) = {
3131 let pmt = extract(i.payment)
3232 if (isDefined(pmt.assetId))
3333 then throw("Can use Waves only at the moment")
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func customerBuyA (amount) = {
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 > amount))
2020 then throw("Purchase amount cannot be less than item price")
2121 else if ((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
2828
2929 @Callable(i)
30-func customerBuyB (amount,item) = {
30+func customerBuyB (amount) = {
3131 let pmt = extract(i.payment)
3232 if (isDefined(pmt.assetId))
3333 then throw("Can use Waves only at the moment")
3434 else {
3535 let customerAddress = toBase58String(i.caller.bytes)
3636 let price = match getInteger(this, "item_B_coupon_price") {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
4242 if ((price > amount))
4343 then throw("Purchase amount cannot be less than item price")
4444 else if ((amount > price))
4545 then throw("Purchase amount cannot be higher than item price")
4646 else WriteSet([DataEntry(("status:purchase_item_B_customer_" + customerAddress), "confirmed"), DataEntry(("price:purchase_item_B_customer_" + customerAddress), price)])
4747 }
4848 }
4949
5050

github/deemru/w8io/026f985 
30.15 ms