tx · DUS8esYww56meQx4Q2Y8EpHccxFCp8AeQntJBUSH2PkF 3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq: -0.01000000 Waves 2019.06.21 23:06 [552237] smart account 3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq > SELF 0.00000000 Waves
{ "type": 13, "id": "DUS8esYww56meQx4Q2Y8EpHccxFCp8AeQntJBUSH2PkF", "fee": 1000000, "feeAssetId": null, "timestamp": 1561147687131, "version": 1, "sender": "3MxN6Cszfki941gTcEwXc8ngmbWPTsHoJFq", "senderPublicKey": "4fygXNNAjU52sT9N6uq4o9Ck8G75e94ukktN3pd4VxVo", "proofs": [ "N91ebF7j5hNkhybNvPKH7CedwgeQpLo8dD1e6wTR1UeNGZbUs4YVmjSxJZX8bkUd3DqJvKr2ED3oWj3SAbU9mZm" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAAEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAABpDYW4gb25seSB1c2UgV2F2ZXMgZm9yIG5vdwQAAAAKY3VzdG9tZXJhZAkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAAAxpdGVtX0FfcHJpY2UDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYQUAAAAHJG1hdGNoMAUAAAABYQAAAAAAAAAAAAMJAABmAAAAAgUAAAAFcHJpY2UIBQAAAANwbXQAAAAGYW1vdW50CQAAAgAAAAECAAAAGVBsZWFzZSBzZW5kIGNvcnJlY3QgcHJpY2UDCQAAZgAAAAIIBQAAAANwbXQAAAAGYW1vdW50BQAAAAVwcmljZQkAAAIAAAABAgAAACNBbW91bnQgY2Fubm90IGJlIGdyZWF0ZXIgdGhhbiBwcmljZQkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACAgAAACBzdGF0dXM6cHVyY2hhc2VfaXRlbV9BX2N1c3RvbWVyXwUAAAAKY3VzdG9tZXJhZAIAAAAJY29uZmlybWVkCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAICAAAAH3ByaWNlOnB1cmNoYXNlX2l0ZW1fQV9jdXN0b21lcl8FAAAACmN1c3RvbWVyYWQFAAAABXByaWNlBQAAAANuaWwAAAAA8KRHjg==", "chainId": 84, "height": 552237, "spentComplexity": 0 } View: original | compacted Prev: none Next: 5tyDB3oFn79ERehJrFu1mADau2PB3TM2vPy1v7kiphtU Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func purchase () = { | |
8 | + | let pmt = extract(i.payment) | |
9 | + | if (isDefined(pmt.assetId)) | |
10 | + | then throw("Can only use Waves for now") | |
11 | + | else { | |
12 | + | let customerad = toBase58String(i.caller.bytes) | |
13 | + | let price = match getInteger(this, "item_A_price") { | |
14 | + | case a: Int => | |
15 | + | a | |
16 | + | case _ => | |
17 | + | 0 | |
18 | + | } | |
19 | + | if ((price > pmt.amount)) | |
20 | + | then throw("Please send correct price") | |
21 | + | else if ((pmt.amount > price)) | |
22 | + | then throw("Amount cannot be greater than price") | |
23 | + | else WriteSet([DataEntry(("status:purchase_item_A_customer_" + customerad), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + customerad), price)]) | |
24 | + | } | |
25 | + | } | |
26 | + | ||
27 | + |
github/deemru/w8io/169f3d6 24.31 ms ◑