tx · 5npGES93QSi956vrTHhw2ztMGc3gE4M2vpbP9QrU3qLW 3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH: -0.05000000 Waves 2019.11.24 06:11 [778765] smart account 3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH > SELF 0.00000000 Waves
{ "type": 13, "id": "5npGES93QSi956vrTHhw2ztMGc3gE4M2vpbP9QrU3qLW", "fee": 5000000, "feeAssetId": null, "timestamp": 1574565040940, "version": 1, "sender": "3MwjJKGp7PLGJh7pzYrnrN9TnMXph6oL4nH", "senderPublicKey": "9Pw6KBYMgEWmrg24tEc8SkHPhMUBwRmHaJoKjWgDkUAK", "proofs": [ "4sEnago2Pi86ddS2iidY6EELtXa3wz4tVYz3g5ebJbRAbtGzEx1CbxqGPiU9Eo6jvYbqNWBMW6dwvpMXZ6MnFciC" ], "script": "base64:AAIDAAAAAAAAAA4IARIFCgMICAgSAwoBCAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAABm9yYWNsZQkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTkFjb2VXZFVUV244Y3NYSlBHNDd2MUZqdGpjZnF4YjV0dQAAAAAFYXNrSUQCAAAABVdBVkVTAAAAAAViaWRJRAIAAAAFVVNELU4AAAAABm1pblBpcAAAAAAAAA9CQAEAAAAIZ2VuS2V5SUQAAAABAAAABGFkZHIJAAJYAAAAAQkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAEYWRkcgkABCUAAAABBQAAAAR0aGlzAAAAAgAAAAFpAQAAAA1jcmVhdGVTY2FscGVyAAAAAwAAAAV0aXRsZQAAAAR0eXBlAAAABGFkZHIEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVrZXlJRAkBAAAACGdlbktleUlEAAAAAQUAAAAEYWRkcgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ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AAAAAAAF9eEACQAAAgAAAAEJAAEsAAAAAgIAAAAccGF5bWVudCB3aWxsIGhpZ2hlciB0aGFuIDE6IAkAAaQAAAABCAUAAAADcGF5AAAABmFtb3VudAkAAAIAAAABCQABLAAAAAICAAAAFlBheW1lbnQgZGlkIGJvdHRvbiAxOiAJAAGkAAAAAQgFAAAAA3BheQAAAAZhbW91bnQAAAAAiA2O/Q==", "chainId": 84, "height": 778765, "spentComplexity": 0 } View: original | compacted Prev: DwWmdnyWLwJxJqd7fzAzugdcLkz457aiakykgJjiwWwD Next: ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ Diff:
Old | New | Differences | |
---|---|---|---|
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | + | ||
6 | + | let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu") | |
5 | 7 | ||
6 | 8 | let askID = "WAVES" | |
7 | 9 | ||
24 | 26 | @Callable(i) | |
25 | 27 | func defineScalping (title) = { | |
26 | 28 | let sender = toBase58String(i.caller.bytes) | |
29 | + | let pay = extract(i.payment) | |
27 | 30 | let keyID = genKeyID(sender) | |
28 | - | WriteSet([DataEntry((keyID + "_priceOpen"), 0)]) | |
31 | + | let usdV = getIntegerValue(oracle, "waves_usd_2") | |
32 | + | if ((pay.amount >= 100000000)) | |
33 | + | then throw(("payment will higher than 1: " + toString(pay.amount))) | |
34 | + | else throw(("Payment did botton 1: " + toString(pay.amount))) | |
29 | 35 | } | |
30 | 36 | ||
31 | 37 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let NONE = "none" | |
5 | + | ||
6 | + | let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu") | |
5 | 7 | ||
6 | 8 | let askID = "WAVES" | |
7 | 9 | ||
8 | 10 | let bidID = "USD-N" | |
9 | 11 | ||
10 | 12 | let minPip = 1000000 | |
11 | 13 | ||
12 | 14 | func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this))))) | |
13 | 15 | ||
14 | 16 | ||
15 | 17 | @Callable(i) | |
16 | 18 | func createScalper (title,type,addr) = { | |
17 | 19 | let sender = toBase58String(i.caller.bytes) | |
18 | 20 | let keyID = genKeyID(addr) | |
19 | 21 | WriteSet([DataEntry((keyID + "_scalperID"), addr), DataEntry((keyID + "_title"), title), DataEntry((keyID + "_type"), type), DataEntry((keyID + "_fundraised"), 0), DataEntry((keyID + "_priceOpen"), 0), DataEntry((keyID + "_priceClose"), 0), DataEntry((keyID + "_upOutGTD"), 0), DataEntry((keyID + "_downOutGTD"), 0), DataEntry((keyID + "_profit"), 0), DataEntry((keyID + "_profitFee"), 0), DataEntry((keyID + "_grid"), 0), DataEntry((keyID + "_steps"), 0), DataEntry((keyID + "_ordering"), "middle"), DataEntry((keyID + "_reOrderOut"), "middle"), DataEntry((keyID + "_gridAsk"), "undefined asks"), DataEntry((keyID + "_gridBid"), "undefined bids"), DataEntry((keyID + "_lifetime"), 0), DataEntry((keyID + "_blockStart"), 0), DataEntry((keyID + "_blockStop"), 0), DataEntry((keyID + "_status"), "created")]) | |
20 | 22 | } | |
21 | 23 | ||
22 | 24 | ||
23 | 25 | ||
24 | 26 | @Callable(i) | |
25 | 27 | func defineScalping (title) = { | |
26 | 28 | let sender = toBase58String(i.caller.bytes) | |
29 | + | let pay = extract(i.payment) | |
27 | 30 | let keyID = genKeyID(sender) | |
28 | - | WriteSet([DataEntry((keyID + "_priceOpen"), 0)]) | |
31 | + | let usdV = getIntegerValue(oracle, "waves_usd_2") | |
32 | + | if ((pay.amount >= 100000000)) | |
33 | + | then throw(("payment will higher than 1: " + toString(pay.amount))) | |
34 | + | else throw(("Payment did botton 1: " + toString(pay.amount))) | |
29 | 35 | } | |
30 | 36 | ||
31 | 37 |
github/deemru/w8io/026f985 21.64 ms ◑