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:AAIDAAAAAAAAAA4IARIFCgMICAgSAwoBCAAAAAYAAAAABE5PTkUCAAAABG5vbmUAAAAABm9yYWNsZQkBAAAAHEBleHRyVXNlcihhZGRyZXNzRnJvbVN0cmluZykAAAABAgAAACMzTkFjb2VXZFVUV244Y3NYSlBHNDd2MUZqdGpjZnF4YjV0dQAAAAAFYXNrSUQCAAAABVdBVkVTAAAAAAViaWRJRAIAAAAFVVNELU4AAAAABm1pblBpcAAAAAAAAA9CQAEAAAAIZ2VuS2V5SUQAAAABAAAABGFkZHIJAAJYAAAAAQkAAfcAAAABCQABmwAAAAEJAAEsAAAAAgUAAAAEYWRkcgkABCUAAAABBQAAAAR0aGlzAAAAAgAAAAFpAQAAAA1jcmVhdGVTY2FscGVyAAAAAwAAAAV0aXRsZQAAAAR0eXBlAAAABGFkZHIEAAAABnNlbmRlcgkAAlgAAAABCAgFAAAAAWkAAAAGY2FsbGVyAAAABWJ5dGVzBAAAAAVrZXlJRAkBAAAACGdlbktleUlEAAAAAQUAAAAEYWRkcgkBAAAACFdyaXRlU2V0AAAAAQkABEwAAAACCQEAAAAJRGF0YUVudH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50AAAAAAAF9eEACQAAAgAAAAEJAAEsAAAAAgIAAAAccGF5bWVudCB3aWxsIGhpZ2hlciB0aGFuIDE6IAkAAaQAAAABCAUAAAADcGF5AAAABmFtb3VudAkAAAIAAAABCQABLAAAAAICAAAAFlBheW1lbnQgZGlkIGJvdHRvbiAxOiAJAAGkAAAAAQgFAAAAA3BheQAAAAZhbW91bnQAAAAAiA2O/Q==", "chainId": 84, "height": 778765, "spentComplexity": 0 } View: original | compacted Prev: DwWmdnyWLwJxJqd7fzAzugdcLkz457aiakykgJjiwWwD Next: ezK786AtEukUsTTp8RRB2VVYkxZQW63SUZqJZtboSYZ Diff:
OldNewDifferences
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
5+
6+let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
57
68 let askID = "WAVES"
79
2426 @Callable(i)
2527 func defineScalping (title) = {
2628 let sender = toBase58String(i.caller.bytes)
29+ let pay = extract(i.payment)
2730 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)))
2935 }
3036
3137
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let NONE = "none"
5+
6+let oracle = addressFromStringValue("3NAcoeWdUTWn8csXJPG47v1Fjtjcfqxb5tu")
57
68 let askID = "WAVES"
79
810 let bidID = "USD-N"
911
1012 let minPip = 1000000
1113
1214 func genKeyID (addr) = toBase58String(sha256(toBytes((addr + toString(this)))))
1315
1416
1517 @Callable(i)
1618 func createScalper (title,type,addr) = {
1719 let sender = toBase58String(i.caller.bytes)
1820 let keyID = genKeyID(addr)
1921 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")])
2022 }
2123
2224
2325
2426 @Callable(i)
2527 func defineScalping (title) = {
2628 let sender = toBase58String(i.caller.bytes)
29+ let pay = extract(i.payment)
2730 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)))
2935 }
3036
3137

github/deemru/w8io/026f985 
21.64 ms