tx · 8NCvqyjmtQstQ75WrkrNXTxFduHQxDRAYpJfvVeotNXD

3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z:  -0.01400000 Waves

2019.10.17 01:12 [723138] smart account 3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z > SELF 0.00000000 Waves

{ "type": 13, "id": "8NCvqyjmtQstQ75WrkrNXTxFduHQxDRAYpJfvVeotNXD", "fee": 1400000, "feeAssetId": null, "timestamp": 1571263997917, "version": 1, "sender": "3N9nVNxRXkYG1LxBamitnLpZzXcjGDZ2Q6z", "senderPublicKey": "EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1", "proofs": [ "3KpUnAaR5YG5vvmN3oRodcPo9xhLhP2vxCzUYgUQSt4gZD3MXiKbPVHugWxynNVVZWcP62N6KCe6L5C2MKwXMAmK" ], "script": "base64:AAIDAAAAAAAAAAsIARIAEgASAwoBAQAAAAEAAAAABW93bmVyAQAAACDEjmw5zzkX3oDIwQ5BL5mutxduNY61q+A7lXL1UaMULAAAAAMAAAABaQEAAAAIcHVyY2hhcmUAAAAABAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAMJAQAAAAlpc0RlZmluZWQAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAkeW91IGNhbiB1c2UgV0FWRVMgb25seSBhdCB0aGUgbW9tZW50BAAAAA5jdXN0b21lckFkZHJlcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAFAAAAAWEAAAAAAAAAAAADCQAAZgAAAAIFAAAABXByaWNlCAUAAAADcG10AAAABmFtb3VudAkAAAIAAAABAgAAAC5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R4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24EAAAAAWEFAAAAByRtYXRjaDAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAABQAAAAVvd25lcgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBAAAAAFiBQAAAAckbWF0Y2gwBgeRWOaH", "chainId": 84, "height": 723138, "spentComplexity": 0 } View: original | compacted Prev: 2RZV2V7Zt7uuBL5AMmoqSNqfbhy8Bdqjc8EN2iRsRxfb Next: 5R3UgoPr5yrLBYn9tkS1vbxHtVXno8g8tkVtKs8Y4mKB Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let owner = base58'EEGsMXJbL3i6pER7gfBpcw87Km3h2gz6qiqhqPXbdob1'
55
66 @Callable(i)
77 func purchare () = {
88 let pmt = extract(i.payment)
99 if (isDefined(pmt.assetId))
1010 then throw("you can use WAVES only at the moment")
1111 else {
1212 let customerAddres = 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("purchare amount cannot be less that item price")
2121 else if ((pmt.amount > price))
2222 then throw("purchare amount cannot be higher that item price")
2323 else WriteSet([DataEntry(("status:purchare_item_A_customer_" + customerAddres), "confirmed"), DataEntry(("price:purchare_item_A_customer" + customerAddres), price)])
2424 }
2525 }
2626
2727
2828
2929 @Callable(i)
3030 func deposit () = {
3131 let pmt = extract(i.payment)
3232 if (isDefined(pmt.assetId))
3333 then throw("you can use WAVES only at the moment")
3434 else {
3535 let currentKey = toBase58String(i.caller.bytes)
3636 let currentAmount = match getInteger(this, ("wl_sts" + currentKey)) {
3737 case a: Int =>
3838 a
3939 case _ =>
4040 0
4141 }
4242 let wlStsCurr = match getString(this, ("wls_sts" + currentKey)) {
4343 case a: String =>
4444 a
4545 case _ =>
4646 throw("user has not waitlisted")
4747 }
4848 let newAmount = (currentAmount + pmt.amount)
4949 WriteSet([DataEntry(currentKey, newAmount)])
5050 }
5151 }
5252
5353
5454
5555 @Callable(i)
5656 func withdraw (amount) = {
5757 let currentKey = toBase58String(i.caller.bytes)
5858 let currentAmount = match getInteger(this, currentKey) {
5959 case a: Int =>
6060 a
6161 case _ =>
6262 0
6363 }
6464 let newAmount = (currentAmount - amount)
6565 if ((0 > amount))
6666 then throw("can't withdraw negative amount")
6767 else if ((0 > newAmount))
6868 then throw("not enough balance")
6969 else ScriptResult(WriteSet([DataEntry(currentKey, newAmount)]), TransferSet([ScriptTransfer(i.caller, amount, unit)]))
7070 }
7171
7272
7373 @Verifier(tx)
7474 func verify () = match tx {
7575 case a: SetScriptTransaction =>
7676 sigVerify(tx.bodyBytes, tx.proofs[0], owner)
7777 case b: DataTransaction =>
7878 true
7979 case _ =>
8080 false
8181 }
8282

github/deemru/w8io/169f3d6 
31.01 ms