tx · 3i6NAMFjn1pdukWv4zXM2zyecVDQLSUgfgrQ7BGxV9tU
3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc: -0.01400000 Waves
2019.09.27 19:11 [695046] smart account 3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc > SELF 0.00000000 Waves
{
"type": 13,
"id": "3i6NAMFjn1pdukWv4zXM2zyecVDQLSUgfgrQ7BGxV9tU",
"fee": 1400000,
"feeAssetId": null,
"timestamp": 1569600626936,
"version": 1,
"sender": "3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc",
"senderPublicKey": "5M8TjFdQ2hPL23uw5RrCvaES2qU4NpCtn68zqTyiYm2E",
"proofs": [
"4TaHPHKnBakDWXYrTuCrnGXAqtpZabaiuGbSCxhGjsydnqcNjGuKtUXZoVqU77mWNyXs959HxMjZgKT1kYyr49CU"
],
"script": "base64:AAIDAAAAAAAAAAAAAAAGAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAB3Rva2VuSUQCAAAALDR5c1plVXZ0QnJTVmdKOXYzTWZoM2JXRDJXTlBkNWtRODI3cGlvZ3dwTXg0AAAAAAlwcml6ZVBvb2wJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM01ycXpYZlFXVHJocko2R0JhbVN3S0tEejMxZ2RYTGdDYXIAAAAAB3Byb2plY3QJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM041THk0Ymt2ZzV1RmpmOUJwZUFzaWs4THEyc2ZIWWMySFUAAAAADXBsYXllclN0b3JhZ2UJAQAAABxAZXh0clVzZXIoYWRkcmVzc0Zyb21TdHJpbmcpAAAAAQIAAAAjM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GhhbGZPZkRvbmF0ZQUAAAAEdW5pdAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAdwcm9qZWN0BQAAAAxoYWxmT2ZEb25hdGUFAAAABHVuaXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAARZ2FtZVdhbGxldEFkZHJlc3MAAAAAAAABhqAFAAAABHVuaXQFAAAAA25pbAAAAAAdVNai",
"chainId": 84,
"height": 695046,
"spentComplexity": 0
}
View: original | compacted
Prev: G52xitCUHPpR4wDVjxeAJBvMMEMMg4s1KDcjuDRRTpqP
Next: Dzei18m7jUM9ziF6rZoZs1rTbjXWPx3W79C5qHSse9sR
Diff:
Old | New | | Differences |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "4ysZeUvtBrSVgJ9v3Mfh3bWD2WNPd5kQ827piogwpMx4" |
---|
9 | 9 | | |
---|
10 | | - | let d = addressFromStringValue("3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP") |
---|
| 10 | + | let d = addressFromStringValue("3MrqzXfQWTrhrJ6GBamSwKKDz31gdXLgCar") |
---|
11 | 11 | | |
---|
12 | | - | @Callable(e) |
---|
13 | | - | func buy (f,g) = { |
---|
14 | | - | let h = toBase58String(e.transactionId) |
---|
15 | | - | let i = extract(e.payment) |
---|
16 | | - | let j = i.amount |
---|
17 | | - | let k = ((j - b) / a) |
---|
18 | | - | let l = isDefined(getStringValue(this, g)) |
---|
19 | | - | if (!(l)) |
---|
| 12 | + | let e = addressFromStringValue("3N5Ly4bkvg5uFjf9BpeAsik8Lq2sfHYc2HU") |
---|
| 13 | + | |
---|
| 14 | + | let f = addressFromStringValue("3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP") |
---|
| 15 | + | |
---|
| 16 | + | @Callable(g) |
---|
| 17 | + | func buy (h,i) = { |
---|
| 18 | + | let j = toBase58String(g.transactionId) |
---|
| 19 | + | let k = extract(g.payment) |
---|
| 20 | + | let l = k.amount |
---|
| 21 | + | let m = ((l - b) / a) |
---|
| 22 | + | let n = ((m / 2) * a) |
---|
| 23 | + | let o = isDefined(getStringValue(this, i)) |
---|
| 24 | + | if (!(o)) |
---|
20 | 25 | | then throw("This package doesn't exist anymore") |
---|
21 | 26 | | else { |
---|
22 | | - | let m = split(g, "_") |
---|
23 | | - | let n = parseIntValue(m[0]) |
---|
24 | | - | let o = parseIntValue(getStringValue(this, g)) |
---|
25 | | - | if ((k != o)) |
---|
26 | | - | then throw(((("Donation amount should be " + toString(o)) + " Waves, but we got ") + toString(k))) |
---|
| 27 | + | let p = split(i, "_") |
---|
| 28 | + | let q = parseIntValue(p[0]) |
---|
| 29 | + | let r = parseIntValue(getStringValue(this, i)) |
---|
| 30 | + | if ((m != r)) |
---|
| 31 | + | then throw(((("Donation amount should be " + toString(r)) + " Waves, but we got ") + toString(m))) |
---|
27 | 32 | | else { |
---|
28 | | - | let p = isDefined(i.assetId) |
---|
29 | | - | let q = isDefined(i.assetId) |
---|
30 | | - | let r = toBase58String(e.callerPublicKey) |
---|
31 | | - | let s = addressFromPublicKey(fromBase58String(r)) |
---|
32 | | - | if (p) |
---|
| 33 | + | let s = isDefined(k.assetId) |
---|
| 34 | + | let t = isDefined(k.assetId) |
---|
| 35 | + | let u = toBase58String(g.callerPublicKey) |
---|
| 36 | + | let v = addressFromPublicKey(fromBase58String(u)) |
---|
| 37 | + | if (s) |
---|
33 | 38 | | then throw("Bet amount must be in Waves") |
---|
34 | | - | else if (q) |
---|
| 39 | + | else if (t) |
---|
35 | 40 | | then throw("Transaction's fee must be in Waves") |
---|
36 | 41 | | else { |
---|
37 | | - | let t = toString(s) |
---|
38 | | - | let u = toString(k) |
---|
39 | | - | let v = getStringValue(d, (f + "_address")) |
---|
40 | | - | let w = addressFromStringValue(v) |
---|
41 | | - | let x = [ScriptTransfer(w, 5, toBytes(c))] |
---|
42 | | - | TransferSet(x) |
---|
| 42 | + | let w = toString(v) |
---|
| 43 | + | let x = toString(m) |
---|
| 44 | + | let y = getStringValue(f, (h + "_address")) |
---|
| 45 | + | let z = addressFromStringValue(y) |
---|
| 46 | + | TransferSet([ScriptTransfer(d, n, unit), ScriptTransfer(e, n, unit), ScriptTransfer(z, 100000, unit)]) |
---|
43 | 47 | | } |
---|
44 | 48 | | } |
---|
45 | 49 | | } |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# SCRIPT_TYPE ACCOUNT #-} |
---|
3 | 3 | | {-# CONTENT_TYPE DAPP #-} |
---|
4 | 4 | | let a = ((100 * 1000) * 1000) |
---|
5 | 5 | | |
---|
6 | 6 | | let b = ((5 * a) / 1000) |
---|
7 | 7 | | |
---|
8 | 8 | | let c = "4ysZeUvtBrSVgJ9v3Mfh3bWD2WNPd5kQ827piogwpMx4" |
---|
9 | 9 | | |
---|
10 | | - | let d = addressFromStringValue("3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP") |
---|
| 10 | + | let d = addressFromStringValue("3MrqzXfQWTrhrJ6GBamSwKKDz31gdXLgCar") |
---|
11 | 11 | | |
---|
12 | | - | @Callable(e) |
---|
13 | | - | func buy (f,g) = { |
---|
14 | | - | let h = toBase58String(e.transactionId) |
---|
15 | | - | let i = extract(e.payment) |
---|
16 | | - | let j = i.amount |
---|
17 | | - | let k = ((j - b) / a) |
---|
18 | | - | let l = isDefined(getStringValue(this, g)) |
---|
19 | | - | if (!(l)) |
---|
| 12 | + | let e = addressFromStringValue("3N5Ly4bkvg5uFjf9BpeAsik8Lq2sfHYc2HU") |
---|
| 13 | + | |
---|
| 14 | + | let f = addressFromStringValue("3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP") |
---|
| 15 | + | |
---|
| 16 | + | @Callable(g) |
---|
| 17 | + | func buy (h,i) = { |
---|
| 18 | + | let j = toBase58String(g.transactionId) |
---|
| 19 | + | let k = extract(g.payment) |
---|
| 20 | + | let l = k.amount |
---|
| 21 | + | let m = ((l - b) / a) |
---|
| 22 | + | let n = ((m / 2) * a) |
---|
| 23 | + | let o = isDefined(getStringValue(this, i)) |
---|
| 24 | + | if (!(o)) |
---|
20 | 25 | | then throw("This package doesn't exist anymore") |
---|
21 | 26 | | else { |
---|
22 | | - | let m = split(g, "_") |
---|
23 | | - | let n = parseIntValue(m[0]) |
---|
24 | | - | let o = parseIntValue(getStringValue(this, g)) |
---|
25 | | - | if ((k != o)) |
---|
26 | | - | then throw(((("Donation amount should be " + toString(o)) + " Waves, but we got ") + toString(k))) |
---|
| 27 | + | let p = split(i, "_") |
---|
| 28 | + | let q = parseIntValue(p[0]) |
---|
| 29 | + | let r = parseIntValue(getStringValue(this, i)) |
---|
| 30 | + | if ((m != r)) |
---|
| 31 | + | then throw(((("Donation amount should be " + toString(r)) + " Waves, but we got ") + toString(m))) |
---|
27 | 32 | | else { |
---|
28 | | - | let p = isDefined(i.assetId) |
---|
29 | | - | let q = isDefined(i.assetId) |
---|
30 | | - | let r = toBase58String(e.callerPublicKey) |
---|
31 | | - | let s = addressFromPublicKey(fromBase58String(r)) |
---|
32 | | - | if (p) |
---|
| 33 | + | let s = isDefined(k.assetId) |
---|
| 34 | + | let t = isDefined(k.assetId) |
---|
| 35 | + | let u = toBase58String(g.callerPublicKey) |
---|
| 36 | + | let v = addressFromPublicKey(fromBase58String(u)) |
---|
| 37 | + | if (s) |
---|
33 | 38 | | then throw("Bet amount must be in Waves") |
---|
34 | | - | else if (q) |
---|
| 39 | + | else if (t) |
---|
35 | 40 | | then throw("Transaction's fee must be in Waves") |
---|
36 | 41 | | else { |
---|
37 | | - | let t = toString(s) |
---|
38 | | - | let u = toString(k) |
---|
39 | | - | let v = getStringValue(d, (f + "_address")) |
---|
40 | | - | let w = addressFromStringValue(v) |
---|
41 | | - | let x = [ScriptTransfer(w, 5, toBytes(c))] |
---|
42 | | - | TransferSet(x) |
---|
| 42 | + | let w = toString(v) |
---|
| 43 | + | let x = toString(m) |
---|
| 44 | + | let y = getStringValue(f, (h + "_address")) |
---|
| 45 | + | let z = addressFromStringValue(y) |
---|
| 46 | + | TransferSet([ScriptTransfer(d, n, unit), ScriptTransfer(e, n, unit), ScriptTransfer(z, 100000, unit)]) |
---|
43 | 47 | | } |
---|
44 | 48 | | } |
---|
45 | 49 | | } |
---|
46 | 50 | | } |
---|
47 | 51 | | |
---|
48 | 52 | | |
---|