tx · Cdf882AQtM9hiAdb5A5EaDaXwKAzPvVqfNboYCnyXXGz
3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt: -0.01400000 Waves
2020.11.18 14:22 [1270728] smart account 3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt > SELF 0.00000000 Waves
{
"type": 13,
"id": "Cdf882AQtM9hiAdb5A5EaDaXwKAzPvVqfNboYCnyXXGz",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1605698579162,
"version": 2,
"chainId": 84,
"sender": "3NAj7owPjfmLoE3odgXC6cXfB1QzEhnpBtt",
"senderPublicKey": "iRqJrgq4rS2ndNGFJoZtKcoTfskkxr3zfTesPWqtKzp",
"proofs": [
"4THspLLqCiEAQiCYyqyfpLPnkMgt97MPnzAc5qaGJEefCKSehaipvWjzZfUfmHMvXjvzTKUAU4CD5oeJZ6jj1MPU"
],
"script": "base64:AAIEAAAAAAAAAAQIAhIAAAAAAAAAAAEAAAABaQEAAAAIcHVyY2hhc2UAAAAABAAAAAdwYXltZW50CQEAAAAFdmFsdWUAAAABCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAdwYXltZW50AAAAB2Fzc2V0SWQJAAACAAAAAQIAAAAXT25seSBXYXZlcyBhcmUgYWNjZXB0ZWQEAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzAgAAABNpdGVtX0FfY291cG9uX3ByaWNlAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWEFAAAAByRtYXRjaDAJAABoAAAAAgUAAAABYQAAAAAABfXhAAAAAAAAAAAAAAMJAAAAAAAAAggFAAAAB3BheW1lbnQAAAAGYW1vdW50AAAAAAAAAAAACQAAAgAAAAECAAAAFFB1cmNoYXNlIGFtb3VudCBpcyAwAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAB3BheW1lbnQAAAAGYW1vdW50CQAAAgAAAAECAAAAGlB1cmNoYXNlIGFtb3VudCBpcyB0b28gbG93AwkAAGYAAAACCAUAAAAHcGF5bWVudAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAECAAAAG1B1cmNoYXNlIGFtb3VudCBpcyB0b28gaGlnaAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAAH3N0YXR1czpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXIFAAAAD2N1c3RvbWVyQWRkcmVzcwIAAAAEdHJ1ZQkABEwAAAACCQEAAAAMSW50ZWdlckVudHJ5AAAAAgkAASwAAAACAgAAAB5wcmljZTpwdXJjaGFzZV9pdGVtX0FfY3VzdG9tZXIFAAAAD2N1c3RvbWVyQWRkcmVzcwUAAAAFcHJpY2UFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAGLYM+nQ==",
"height": 1270728,
"applicationStatus": "succeeded",
"spentComplexity": 0
}
View: original | compacted
Prev: Bf7xxNkvNfeqbhkFTMs7wzeHAbMdMxvHM4QWZ5vsGEjM
Next: FwBsK5DWmkqsmVoPF8WnTfm6WcvDYUd7YbCmEBgbbUGH
Diff:
Old | New | | Differences |
---|
15 | 15 | | if ($isInstanceOf(e, "Int")) |
---|
16 | 16 | | then { |
---|
17 | 17 | | let f = e |
---|
18 | | - | f |
---|
| 18 | + | (f * 100000000) |
---|
19 | 19 | | } |
---|
20 | 20 | | else 0 |
---|
21 | 21 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 4 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(a) |
---|
7 | 7 | | func purchase () = { |
---|
8 | 8 | | let b = value(a.payments[0]) |
---|
9 | 9 | | if (isDefined(b.assetId)) |
---|
10 | 10 | | then throw("Only Waves are accepted") |
---|
11 | 11 | | else { |
---|
12 | 12 | | let c = toBase58String(a.caller.bytes) |
---|
13 | 13 | | let d = { |
---|
14 | 14 | | let e = getInteger(this, "item_A_coupon_price") |
---|
15 | 15 | | if ($isInstanceOf(e, "Int")) |
---|
16 | 16 | | then { |
---|
17 | 17 | | let f = e |
---|
18 | | - | f |
---|
| 18 | + | (f * 100000000) |
---|
19 | 19 | | } |
---|
20 | 20 | | else 0 |
---|
21 | 21 | | } |
---|
22 | 22 | | if ((b.amount == 0)) |
---|
23 | 23 | | then throw("Purchase amount is 0") |
---|
24 | 24 | | else if ((d > b.amount)) |
---|
25 | 25 | | then throw("Purchase amount is too low") |
---|
26 | 26 | | else if ((b.amount > d)) |
---|
27 | 27 | | then throw("Purchase amount is too high") |
---|
28 | 28 | | else [StringEntry(("status:purchase_item_A_customer" + c), "true"), IntegerEntry(("price:purchase_item_A_customer" + c), d)] |
---|
29 | 29 | | } |
---|
30 | 30 | | } |
---|
31 | 31 | | |
---|
32 | 32 | | |
---|
33 | 33 | | @Verifier(g) |
---|
34 | 34 | | func h () = true |
---|
35 | 35 | | |
---|