tx · 6zpEzMcg5bfMqJscYWANaV1rTDPEa2qTBuFyEmnBzwoV 3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc: -0.01400000 Waves 2019.09.27 17:49 [694957] smart account 3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc > SELF 0.00000000 Waves
{ "type": 13, "id": "6zpEzMcg5bfMqJscYWANaV1rTDPEa2qTBuFyEmnBzwoV", "fee": 1400000, "feeAssetId": null, "timestamp": 1569595785388, "version": 1, "sender": "3MtkCfhJSAZ6P2bsBM2DdpurZ7S1vepUvrc", "senderPublicKey": "5M8TjFdQ2hPL23uw5RrCvaES2qU4NpCtn68zqTyiYm2E", "proofs": [ "3qxpX3tc7cpFcs6koy4HbWQFmRHTMsNqqy8eJJfs8fwEMtU2GqxHixhb1mSSXGxboavxPaxSTpzcJNmvquugSbDo" ], "script": "base64:AAIDAAAAAAAAAAAAAAAEAAAAAAdXQVZFTEVUCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAAZAAAAAAAAAAD6AAAAAAAAAAD6AAAAAAKQ09NTUlTU0lPTgkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAAB1dBVkVMRVQAAAAAAAAAA+gAAAAAB3Rva2VuSUQCAAAALDR5c1plVXZ0QnJTVmdKOXYzTWZoM2JXRDJXTlBkNWtRODI3cGlvZ3dwTXg0AAAAAA1wbGF5ZXJTdG9yYWdlAgAAACMzTXhaYVdKbWR5cGp2OE1NdjhSUFR0RHE0R05NUGRDaXNKUAAAAAEAAAABaQEAAAADYnV5AAAAAgAAAAhwbGF5ZXJJRAAAAAtwYWNrYWdlTmFtZQQAAAAEdHhJZAkAAlgAAAABCAUAAAABaQAAAA10cmFuc2FjdGlvbklkBAAAAANwbXQJAQAAAAdleHRyYWN0AAAAAQgFAAAAAWkAAAAHcGF5bWVudAQAAAAKcGF5bWVudEFtdAgFAAAAA3BtdAAAAAZhbW91bnQEAAAACnBheW1lbnRTdW0JAABpAAAAAgkAAGU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leQAAAAEJAAJZAAAAAQUAAAAOcGxheWVyUHViS2V5NTgDBQAAAA1iZXROb3RJbldhdmVzCQAAAgAAAAECAAAAG0JldCBhbW91bnQgbXVzdCBiZSBpbiBXYXZlcwMFAAAADWZlZU5vdEluV2F2ZXMJAAACAAAAAQIAAAAiVHJhbnNhY3Rpb24ncyBmZWUgbXVzdCBiZSBpbiBXYXZlcwQAAAAQcGxheWVyQWRkcmVzc1N0cgkABCUAAAABBQAAAA1wbGF5ZXJBZGRyZXNzBAAAAA1wYXltZW50U3VtU3RyCQABpAAAAAEFAAAACnBheW1lbnRTdW0EAAAADWdhbWVXYWxsZXRTdHICAAAAIzNNdlB3dk1RUGNTRXVHTW9DSm82WDl6aThycjRhRWlXV3BGBAAAABFnYW1lV2FsbGV0QWRkcmVzcwkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABBQAAAA1nYW1lV2FsbGV0U3RyBAAAAA50b2tlbnNUcmFuc2ZlcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAABFnYW1lV2FsbGV0QWRkcmVzcwUAAAAMdG9rZW5zQW1vdW50CQABmwAAAAEFAAAAB3Rva2VuSUQFAAAAA25pbAkBAAAAC1RyYW5zZmVyU2V0AAAAAQUAAAAOdG9rZW5zVHJhbnNmZXIAAAAAg+Di7A==", "chainId": 84, "height": 694957, "spentComplexity": 0 } View: original | compacted Prev: 8shKPk51a3hSL8gFEWf2hYdUxZmxYr3L5ma7joBq4Ea3 Next: 5AzQH2knM5vHoUpJZ8JFNcNQoS21o7rpUTGqRquSBmvK Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let h = toBase58String(e.transactionId) | |
15 | 15 | let i = extract(e.payment) | |
16 | 16 | let j = i.amount | |
17 | - | let k = ((j - b) / | |
17 | + | let k = ((j - b) / a) | |
18 | 18 | let l = isDefined(getStringValue(this, g)) | |
19 | 19 | if (!(l)) | |
20 | 20 | then throw("This package doesn't exist anymore") |
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 | 10 | let d = "3MxZaWJmdypjv8MMv8RPTtDq4GNMPdCisJP" | |
11 | 11 | ||
12 | 12 | @Callable(e) | |
13 | 13 | func buy (f,g) = { | |
14 | 14 | let h = toBase58String(e.transactionId) | |
15 | 15 | let i = extract(e.payment) | |
16 | 16 | let j = i.amount | |
17 | - | let k = ((j - b) / | |
17 | + | let k = ((j - b) / a) | |
18 | 18 | let l = isDefined(getStringValue(this, g)) | |
19 | 19 | if (!(l)) | |
20 | 20 | then throw("This package doesn't exist anymore") | |
21 | 21 | else { | |
22 | 22 | let m = split(g, "_") | |
23 | 23 | let n = parseIntValue(m[0]) | |
24 | 24 | let o = parseIntValue(getStringValue(this, g)) | |
25 | 25 | if ((k != o)) | |
26 | 26 | then throw(((("Donation amount should be " + toString(o)) + " Waves, but we got ") + toString(k))) | |
27 | 27 | else { | |
28 | 28 | let p = isDefined(i.assetId) | |
29 | 29 | let q = isDefined(i.assetId) | |
30 | 30 | let r = toBase58String(e.callerPublicKey) | |
31 | 31 | let s = addressFromPublicKey(fromBase58String(r)) | |
32 | 32 | if (p) | |
33 | 33 | then throw("Bet amount must be in Waves") | |
34 | 34 | else if (q) | |
35 | 35 | then throw("Transaction's fee must be in Waves") | |
36 | 36 | else { | |
37 | 37 | let t = toString(s) | |
38 | 38 | let u = toString(k) | |
39 | 39 | let v = "3MvPwvMQPcSEuGMoCJo6X9zi8rr4aEiWWpF" | |
40 | 40 | let w = addressFromStringValue(v) | |
41 | 41 | let x = [ScriptTransfer(w, n, toBytes(c))] | |
42 | 42 | TransferSet(x) | |
43 | 43 | } | |
44 | 44 | } | |
45 | 45 | } | |
46 | 46 | } | |
47 | 47 | ||
48 | 48 |
github/deemru/w8io/026f985 20.87 ms ◑