tx · 85uTMkjEYaUxYCrcbwLenaWbwMdY96hmjm5TuGt6vmjE

3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C:  -0.01400000 Waves

2021.05.25 18:15 [1541346] smart account 3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C > SELF 0.00000000 Waves

{ "type": 13, "id": "85uTMkjEYaUxYCrcbwLenaWbwMdY96hmjm5TuGt6vmjE", "fee": 1400000, "feeAssetId": null, "timestamp": 1621955770696, "version": 2, "chainId": 84, "sender": "3MzXqo2rBxc3XEKPVcYHDrsgP7jmE6cGg6C", "senderPublicKey": "DAXE7bVatBuMqt8Me8npUpPhn2XaV13QkCDZCQGV3yDf", "proofs": [ "4RuDi2yW4snPdQbU9PKbfnBSewvM2WHujEQDQ6Z3FH3vtTv8uH8SmQg55YRn98icQNxf8tVSNZp5bhHTcmtH1Q2x" ], "script": "base64:AAIEAAAAAAAAAAcIAhIDCgEIAAAABAAAAAAGbWlkaUlkAQAAACAGLtZERQwp0mc9GkII6TL8MrO9FCVbUZ4Q1IdRUGKaigAAAAAFZGF0dW0IBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAAAAAAZhbU1pZGkAAAAAAAAAAAABAAAAC2lzUGF5bWVudE9rAAAAAQAAAAFpAwkAAAAAAAACCQABkAAAAAEIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAACQAAAgAAAAECAAAAFFBheW1lbnQgbm90IGF0dGFjaGVkBAAAAAFwCQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAABAAAAAckbWF0Y2gwCAUAAAABcAAAAAdhc3NldElkCQAAZwAAAAIAAAAbSOtX4AAIBQAAAAFwAAAABmFtb3VudAAAAAEAAAABaQEAAAAHYnV5bWlkaQAAAAEAAAAJdGhlU3RyaW5nBAAAAARjb2VmAwkAAGYAAAACAAAAAXm6kfwABQAAAAVkYXR1bQAAAAAAAADqYAMJAABmAAAAAgAAAAF5ygUQAAUAAAAFZ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TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAIZWxBbW91bnQFAAAABm1pZGlJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlva0FkZHJlc3MFAAAACXJlZkFtb3VudAUAAAAGbWlkaUlkBQAAAANuaWwJAAACAAAAAQIAAAAdV3JvbmcgcGF5bWVudCBhbW91bnQgb3IgYXNzZXQAAAAA6ny+Cw==", "height": 1541346, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4NPw7Hbf3WD57DoaXJkq5kMw3mhBMtMmUAyj75yQZokk Next: none Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4+let midiId = base58'R8sQUmwwAENBL6B5ejGztDh3RzJ3MbKRqK7GtspFxKT'
5+
6+let datum = lastBlock.timestamp
7+
8+let amMidi = 0
9+
10+func isPaymentOk (i) = if ((size(i.payments) == 0))
11+ then throw("Payment not attached")
12+ else {
13+ let p = i.payments[0]
14+ match p.assetId {
15+ case _ =>
16+ (30000000000000 >= p.amount)
17+ }
18+ }
419
520
621 @Callable(i)
7-func mintme (url,urlkey) = {
8- let counter = match getInteger(this, "counter") {
9- case a: Int =>
10- (a + 1)
11- case _ =>
12- 0
13- }
14- let st = toString(counter)
15- let name = "MIDI-NFT #"
16- let fname = (name + st)
17- let issue = Issue(fname, (("{ url : " + url) + "}"), 1, 0, false)
18- let id = calculateAssetId(issue)
19-[issue, ScriptTransfer(i.caller, issue.quantity, id), IntegerEntry("counter", counter)]
22+func buymidi (theString) = {
23+ let coef = if ((1622332800000 > datum))
24+ then 60000
25+ else if ((1622592000000 > datum))
26+ then 24000
27+ else if ((1622851200000 > datum))
28+ then 21000
29+ else if ((1623110400000 > datum))
30+ then 18000
31+ else if ((1623369600000 > datum))
32+ then 15000
33+ else if ((1623628800000 > datum))
34+ then 12000
35+ else if ((1623888000000 > datum))
36+ then 9000
37+ else if ((1624147200000 > datum))
38+ then 6000
39+ else if ((1624406400000 > datum))
40+ then 3000
41+ else throw("Sorry ICO ended")
42+ if (isPaymentOk(i))
43+ then {
44+ let pp = i.payments[0]
45+ let amnt = pp.amount
46+ let elAmount = ((amnt / 100000000) * (coef * 10000))
47+ let okAddress = addressFromStringValue(theString)
48+ let tstr = toString(i.caller)
49+ let refAmount = if ((theString == "any"))
50+ then 0
51+ else if ((theString == tstr))
52+ then 0
53+ else (elAmount / 10)
54+ if ((theString == "any"))
55+ then [ScriptTransfer(i.caller, elAmount, midiId)]
56+ else [ScriptTransfer(i.caller, elAmount, midiId), ScriptTransfer(okAddress, refAmount, midiId)]
57+ }
58+ else throw("Wrong payment amount or asset")
2059 }
2160
22-
23-@Verifier(tx)
24-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
2561

github/deemru/w8io/026f985 
24.09 ms