tx · 47tKTeY7HZEtJ98hBVs7fsFn1JKL8MzmttU7v8x7EEXx
3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9: -0.01400000 Waves
2019.08.01 12:28 [611547] smart account 3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9 > SELF 0.00000000 Waves
{
"type": 13,
"id": "47tKTeY7HZEtJ98hBVs7fsFn1JKL8MzmttU7v8x7EEXx",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1564651802895,
"version": 1,
"sender": "3Mze7XxHJtXw48uyWhjTJgMLcEzNBmi9tS9",
"senderPublicKey": "BZri78A6CXpGPmAHZNwqQXoNfWamwRZiuaBas3VdDKZp",
"proofs": [
"4mu4EBmfSohkuVrcjhWUxits6EvADBdmyu8s3eU26Z9LbkFcSxFepRojyReHMpcZQunww5behJWYVAUAdCq7MuVf"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAQAAAAFpAQAAAAhwdXJjaGFzZQAAAAEAAAALUHJvZHVjdG5hbWUEAAAAA3BtdAkBAAAAB2V4dHJhY3QAAAABCAUAAAABaQAAAAdwYXltZW50AwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAAIAAAABAgAAACFDYW4gdXNlIG9ubHkgV0FWRVMgYXQgdGhlIG1vbWVudC4EAAAAD2N1c3RvbWVyQWRkcmVzcwkAAlwAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVwcmljZQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAAtQcm9kdWN0bmFtZQMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAADSW50BAAAAAFhBQAAAAckbWF0Y2gwBQAAAAFhAAAAAAAAAAAAAwkAAGYAAAACBQAAAAVwcmljZQgFAAAAA3BtdAAAAAZhbW91bnQJAAACAAAAAQkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAA9QW1vdW50IGNhbm5vdCBiZSBsZXNzIHRoYW4gaXRlbSBwcmljZS4gWW91IHNwZWNpZmllZCBhbW91bnQ6IAkAAaQAAAABCAUAAAADcG10AAAABmFtb3VudAIAAAANYnV0IHByaWNlIGlzIAkAAaQAAAABBQAAAAVwcmljZQMJAABmAAAAAggFAAAAA3BtdAAAAAZhbW91bnQFAAAABXByaWNlCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAQEFtb3VudCBjYW5ub3QgYmUgZ3JlYXRlciB0aGFuIGl0ZW0gcHJpY2UuIFlvdSBzcGVjaWZpZWQgYW1vdW50OiAJAAGkAAAAAQgFAAAAA3BtdAAAAAZhbW91bnQCAAAADWJ1dCBwcmljZSBpcyAJAAGkAAAAAQUAAAAFcHJpY2UJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgkAASwAAAACCQABLAAAAAICAAAAB3N0YXR1czoFAAAAC1Byb2R1Y3RuYW1lAgAAAAFfBQAAAA9jdXN0b21lckFkZHJlc3MCAAAACWNvbmZpcm1lZAkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAIJAAEsAAAAAgIAAAAGcHJpY2U6BQAAAAtQcm9kdWN0bmFtZQIAAAABXwUAAAAPY3VzdG9tZXJBZGRyZXNzBQAAAAVwcmljZQUAAAADbmlsAAAAACIUyRs=",
"chainId": 84,
"height": 611547,
"spentComplexity": 0
}
View: original | compacted
Prev: GA39hHqLgsuD9wr4Pg8E9ks3mxuZDQiwzMcfGAjHsgzp
Next: 6JgPejDBLt29a9m1EqTxTqQ1uXwFvRaGBp48z49u293G
Diff:
Old | New | | Differences |
---|
10 | 10 | | then throw("Can use only WAVES at the moment.") |
---|
11 | 11 | | else { |
---|
12 | 12 | | let d = toBase16String(a.caller.bytes) |
---|
13 | | - | let e = toBase58String(a.caller.bytes) |
---|
14 | | - | let f = { |
---|
15 | | - | let g = getInteger(this, e) |
---|
16 | | - | if ($isInstanceOf(g, "Int")) |
---|
| 13 | + | let e = { |
---|
| 14 | + | let f = getInteger(this, b) |
---|
| 15 | + | if ($isInstanceOf(f, "Int")) |
---|
17 | 16 | | then { |
---|
18 | | - | let h = g |
---|
19 | | - | h |
---|
| 17 | + | let g = f |
---|
| 18 | + | g |
---|
20 | 19 | | } |
---|
21 | 20 | | else 0 |
---|
22 | 21 | | } |
---|
23 | | - | if ((f > c.amount)) |
---|
24 | | - | then throw(((("Amount cannot be less than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(f))) |
---|
25 | | - | else if ((c.amount > f)) |
---|
26 | | - | then throw(((("Amount cannot be greater than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(f))) |
---|
27 | | - | else WriteSet([DataEntry(((("status:" + e) + "_") + d), "confirmed"), DataEntry(((("price:" + e) + "_") + d), f)]) |
---|
| 22 | + | if ((e > c.amount)) |
---|
| 23 | + | then throw(((("Amount cannot be less than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(e))) |
---|
| 24 | + | else if ((c.amount > e)) |
---|
| 25 | + | then throw(((("Amount cannot be greater than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(e))) |
---|
| 26 | + | else WriteSet([DataEntry(((("status:" + b) + "_") + d), "confirmed"), DataEntry(((("price:" + b) + "_") + d), e)]) |
---|
28 | 27 | | } |
---|
29 | 28 | | } |
---|
30 | 29 | | |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | |
---|
5 | 5 | | |
---|
6 | 6 | | @Callable(a) |
---|
7 | 7 | | func purchase (b) = { |
---|
8 | 8 | | let c = extract(a.payment) |
---|
9 | 9 | | if (isDefined(c.assetId)) |
---|
10 | 10 | | then throw("Can use only WAVES at the moment.") |
---|
11 | 11 | | else { |
---|
12 | 12 | | let d = toBase16String(a.caller.bytes) |
---|
13 | | - | let e = toBase58String(a.caller.bytes) |
---|
14 | | - | let f = { |
---|
15 | | - | let g = getInteger(this, e) |
---|
16 | | - | if ($isInstanceOf(g, "Int")) |
---|
| 13 | + | let e = { |
---|
| 14 | + | let f = getInteger(this, b) |
---|
| 15 | + | if ($isInstanceOf(f, "Int")) |
---|
17 | 16 | | then { |
---|
18 | | - | let h = g |
---|
19 | | - | h |
---|
| 17 | + | let g = f |
---|
| 18 | + | g |
---|
20 | 19 | | } |
---|
21 | 20 | | else 0 |
---|
22 | 21 | | } |
---|
23 | | - | if ((f > c.amount)) |
---|
24 | | - | then throw(((("Amount cannot be less than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(f))) |
---|
25 | | - | else if ((c.amount > f)) |
---|
26 | | - | then throw(((("Amount cannot be greater than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(f))) |
---|
27 | | - | else WriteSet([DataEntry(((("status:" + e) + "_") + d), "confirmed"), DataEntry(((("price:" + e) + "_") + d), f)]) |
---|
| 22 | + | if ((e > c.amount)) |
---|
| 23 | + | then throw(((("Amount cannot be less than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(e))) |
---|
| 24 | + | else if ((c.amount > e)) |
---|
| 25 | + | then throw(((("Amount cannot be greater than item price. You specified amount: " + toString(c.amount)) + "but price is ") + toString(e))) |
---|
| 26 | + | else WriteSet([DataEntry(((("status:" + b) + "_") + d), "confirmed"), DataEntry(((("price:" + b) + "_") + d), e)]) |
---|
28 | 27 | | } |
---|
29 | 28 | | } |
---|
30 | 29 | | |
---|
31 | 30 | | |
---|