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(a) | |
7 | + | func purchase () = { | |
8 | + | let b = extract(a.payment) | |
9 | + | if (isDefined(b.assetId)) | |
10 | + | then throw("Can only use Waves for now") | |
11 | + | else { | |
12 | + | let c = toBase58String(a.caller.bytes) | |
13 | + | let d = { | |
14 | + | let e = getInteger(this, "item_A_price") | |
15 | + | if ($isInstanceOf(e, "Int")) | |
16 | + | then { | |
17 | + | let f = e | |
18 | + | f | |
19 | + | } | |
20 | + | else 0 | |
21 | + | } | |
22 | + | if ((d > b.amount)) | |
23 | + | then throw("Please send correct price") | |
24 | + | else if ((b.amount > d)) | |
25 | + | then throw("Amount cannot be greater than price") | |
26 | + | else WriteSet([DataEntry(("status:purchase_item_A_customer_" + c), "confirmed"), DataEntry(("price:purchase_item_A_customer_" + c), d)]) | |
27 | + | } | |
28 | + | } | |
29 | + | ||
30 | + |
github/deemru/w8io/169f3d6 23.49 ms ◑