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
3030
3131
3232 @Callable(a)
33-func customerBuyB (b,h) = {
33+func customerBuyB (b) = {
3434 let c = extract(a.payment)
3535 if (isDefined(c.assetId))
3636 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(a)
77 func customerBuyA (b) = {
88 let c = extract(a.payment)
99 if (isDefined(c.assetId))
1010 then throw("Can use Waves only at the moment")
1111 else {
1212 let d = toBase58String(a.caller.bytes)
1313 let e = {
1414 let f = getInteger(this, "item_A_coupon_price")
1515 if ($isInstanceOf(f, "Int"))
1616 then {
1717 let g = f
1818 g
1919 }
2020 else 0
2121 }
2222 if ((e > b))
2323 then throw("Purchase amount cannot be less than item price")
2424 else if ((b > e))
2525 then throw("Purchase amount cannot be higher than item price")
2626 else WriteSet([DataEntry(("status:purchase_item_A_customer_" + d), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + d), e)])
2727 }
2828 }
2929
3030
3131
3232 @Callable(a)
33-func customerBuyB (b,h) = {
33+func customerBuyB (b) = {
3434 let c = extract(a.payment)
3535 if (isDefined(c.assetId))
3636 then throw("Can use Waves only at the moment")
3737 else {
3838 let d = toBase58String(a.caller.bytes)
3939 let e = {
4040 let f = getInteger(this, "item_B_coupon_price")
4141 if ($isInstanceOf(f, "Int"))
4242 then {
4343 let g = f
4444 g
4545 }
4646 else 0
4747 }
4848 if ((e > b))
4949 then throw("Purchase amount cannot be less than item price")
5050 else if ((b > e))
5151 then throw("Purchase amount cannot be higher than item price")
5252 else WriteSet([DataEntry(("status:purchase_item_B_customer_" + d), "confirmed"), DataEntry(("price:purchase_item_B_customer_" + d), e)])
5353 }
5454 }
5555
5656

github/deemru/w8io/026f985 
31.88 ms