tx · 8tjyoJidoE5Zqvu5ZJyde1dbvcD5UieDan6jiub34s6b 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL: -0.01400000 Waves 2019.09.04 06:00 [660667] smart account 3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL > SELF 0.00000000 Waves
{ "type": 13, "id": "8tjyoJidoE5Zqvu5ZJyde1dbvcD5UieDan6jiub34s6b", "fee": 1400000, "feeAssetId": null, "timestamp": 1567566043919, "version": 1, "sender": "3MrYoV4W5mu5ZP8rPspCXveMXusGstSPTjL", "senderPublicKey": "f1NbgbpkRpbigsrHaDkWZAkPgcqd8GM5G5eNmqnTD6z", "proofs": [ "5dphjwDCmAY7ECXQvJt9b4xLcjUaxdzYEBF3LigUbuWfp3oBLa3ZSjmcsz4DL2ugDbvqRvenxJLRNFhxPyiJGGNW" ], "script": "base64:AAIDAAAAAAAAAAAAAAADAAAAAA1hY2NlcHRlZFRva2VuAQAAACDopWq8yndC8nBhMjVKT0WDubke5ZlnF8Nx6tkLoQSt6wAAAAAMY3VycmVudFByaWNlAAAAAAAAAAnEAAAAAARiYW5rAgAAACMzTXpZTGtRNnFDd3RieGFZUTJ5azFrZFV1ZHpiTmc0SmlURwAAAAEAAAAHaW52b2ljZQEAAAAJYWdyZWVtZW50AAAAAQAAAApjb3Vwb25Db2RlBAAAAAdwYXltZW50CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAdpbnZvaWNlAAAAB3BheW1lbnQEAAAABmFtb3VudAkBAAAAB2V4dHJhY3QAAAABCAUAAAAHcGF5bWVudAAAAAZhbW91bnQEAAAADnBheW1lbnRBc3NldElkCQEAAAAHZXh0cmFjdAAAAAEIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQDCQEAAAACIT0AAAACBQAAAA5wYXltZW50QXNzZXRJZAUAAAANYWNjZXB0ZWRUb2tlbgkAAAIAAAABAgAAAC9Pbmx5IHBheW1lbnRzIGluIFNJR04gYXJlIGFsbG93ZWQgYXQgdGhlIG1vbWVudAMJAQAAAAIhPQAAAAIFAAAABmFtb3VudAUAAAAMY3VycmVudFByaWNlCQAAAgAAAAECAAAAElRoZSBwcmljZSBpcyB3cm9uZwkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCQEAAAAcQGV4dHJVc2VyKGFkZHJlc3NGcm9tU3RyaW5nKQAAAAEFAAAABGJhbmsFAAAABmFtb3VudAUAAAANYWNjZXB0ZWRUb2tlbgUAAAADbmlsAAAAAP01D1A=", "chainId": 84, "height": 660667, "spentComplexity": 0 } View: original | compacted Prev: none Next: EUyyzvZ1VZSv4hrtHcKDzyy1nSZaqfV86SQee6cF8kAE Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let acceptedToken = base58'Gf9t8FA4H3ssoZPCwrg3KwUFCci8zuUFP9ssRsUY3s6a' | |
5 | + | ||
6 | + | let currentPrice = 2500 | |
7 | + | ||
8 | + | let bank = "3MzYLkQ6qCwtbxaYQ2yk1kdUudzbNg4JiTG" | |
9 | + | ||
10 | + | @Callable(invoice) | |
11 | + | func agreement (couponCode) = { | |
12 | + | let payment = extract(invoice.payment) | |
13 | + | let amount = extract(payment.amount) | |
14 | + | let paymentAssetId = extract(payment.assetId) | |
15 | + | if ((paymentAssetId != acceptedToken)) | |
16 | + | then throw("Only payments in SIGN are allowed at the moment") | |
17 | + | else if ((amount != currentPrice)) | |
18 | + | then throw("The price is wrong") | |
19 | + | else TransferSet([ScriptTransfer(addressFromStringValue(bank), amount, acceptedToken)]) | |
20 | + | } | |
21 | + | ||
22 | + |
github/deemru/w8io/169f3d6 28.40 ms ◑