tx · 2w8iJnTuhU5C8iwpPVLCaxofMDUiDqZKYV9Fx67Gp5hV

3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn:  -0.01000000 Waves

2022.11.02 09:13 [2299107] smart account 3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn > SELF 0.00000000 Waves

{ "type": 13, "id": "2w8iJnTuhU5C8iwpPVLCaxofMDUiDqZKYV9Fx67Gp5hV", "fee": 1000000, "feeAssetId": null, "timestamp": 1667369671641, "version": 2, "chainId": 84, "sender": "3N2D6tJAXzcTDgUiTWmcdCHd6ctYwNENuBn", "senderPublicKey": "Cq4RbcVcQJpCWyHiACDqUf2PbU8PaX949Dun9wRSeDzE", "proofs": [ "fdD5X6MMYuLZs7UDNwJ5dRAysbgvmqE2BqH5hVxFvSs97EVeeuaPaTMFkfqgxKp4iuri5KCN6VDvGyvd8Z5Eksb" ], "script": "base64:AAIDAAAAAAAAAAsIARIHCgUIAQEIAQAAAAAAAAABAAAAAWkBAAAAB3NlbGxhcnQAAAAFAAAABWFydElkAAAABVByaWNlAAAAB21heE1pbnQAAAAHYXNzZXRJZAAAAAhCbG9ja0VuZAQAAAAFbmZ0SWQJAAJYAAAAAQgFAAAAAWkAAAANdHJhbnNhY3Rpb25JZAQAAAAJZW5kSGVpZ2h0CAUAAAAJbGFzdEJsb2NrAAAABmhlaWdodAQAAAADcG10CQEAAAAHZXh0cmFjdAAAAAEIBQAAAAFpAAAAB3BheW1lbnQJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABW5mdElkBQAAAAllbmRIZWlnaHQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFbmZ0SWQCAAAACl9vcmdhbml6ZXIJAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVuZnRJZAIAAAAMX2xvdF9hc3NldElkAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAANwbXQAAAAHYXNzZXRJZAkAAlgAAAABCQEAAAAFdmFsdWUAAAABCAUAAAADcG10AAAAB2Fzc2V0SWQCAAAABVdBVkVTCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACCQABLAAAAAIFAAAABW5mdElkAgAAAAtfbG90X2Ftb3VudAgFAAAAA3BtdAAAAAZhbW91bnQJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIJAAEsAAAAAgUAAAAFbmZ0SWQCAAAAC19zdGFydFByaWNlBQAAAAVQcmljZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACBQAAAAVuZnRJZAIAAAANX3ByaWNlQXNzZXRJZAUAAAAHYXNzZXRJZAUAAAADbmlsAAAAAJDaQJE=", "height": 2299107, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: AwmD1VSDeLiiGkanKpCSH7z8Dk2tXBaFhA2VvYEUj9ed Next: CDZRCw1VCKPaAQJVRVQbwctsfmBJ9U5vKNH5L2H5MnL4 Full:
OldNewDifferences
1-{-# STDLIB_VERSION 5 #-}
1+{-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let nftAssetId = base58''
5-
6-let incubatorAddress = base58''
7-
8-let userAddress = base58''
9-
10-let collectiveMasterAddress = base58''
11-
12-let ref20 = [""]
13-
14-func tryGetInteger (key) = match getInteger(this, key) {
15- case b: Int =>
16- b
17- case _ =>
18- 0
19-}
20-
21-
22-func masterTryGetBoolean (key) = match getBoolean(Address(collectiveMasterAddress), key) {
23- case b: Boolean =>
24- b
25- case _ =>
26- false
27-}
28-
29-
30-func isValidAddress (address) = match addressFromString(address) {
31- case a: Address =>
32- true
33- case _ =>
34- false
35-}
36-
37-
38-func tryGetString (key) = match getString(this, key) {
39- case a: String =>
40- a
41- case _ =>
42- ""
43-}
44-
45-
46-func getRefMultiplier (gatewayAddress) = if ((indexOf(ref20, gatewayAddress) != unit))
47- then 4
48- else 1
494
505
516 @Callable(i)
52-func addgatewayKey (gatewayAddress,gatewayKey) = if ((i.caller != this))
53- then throw("admin only")
54- else {
55- let refStateKey = (("key_" + gatewayKey) + "_refererAddress")
56- if ((tryGetString(refStateKey) == ""))
57- then [StringEntry(refStateKey, gatewayAddress), StringEntry(((("address_" + gatewayAddress) + "_refererKey_") + gatewayKey), gatewayKey)]
58- else throw((("The ref key \"" + gatewayKey) + "\" is already registered"))
59- }
60-
61-
62-
63-@Callable(i)
64-func gatewayreward (refererKey) = {
65- let referalAddress = toString(i.originCaller)
66- if (if ((i.caller.bytes != incubatorAddress))
67- then (i.caller.bytes != userAddress)
68- else false)
69- then throw("This method can be called only by farming and incubator dApps")
70- else if (if ((refererKey == ""))
71- then (tryGetString((("address_" + referalAddress) + "_referedBy")) == "")
72- else false)
73- then nil
74- else if (masterTryGetBoolean(("gateway_" + referalAddress)))
75- then nil
76- else {
77- let givenReferer = match getString(this, (("key_" + refererKey) + "_refererAddress")) {
78- case x: String =>
79- x
80- case _ =>
81- refererKey
82- }
83- let refererAddress = match getString(this, (("address_" + referalAddress) + "_referedBy")) {
84- case x: String =>
85- x
86- case _ =>
87- givenReferer
88- }
89- let refAmount = (i.payments[0].amount * getRefMultiplier(refererAddress))
90- if ((addressFromString(refererAddress) == unit))
91- then nil
92- else {
93- let refererAddressValue = addressFromStringValue(refererAddress)
94- let referalAddressValue = addressFromStringValue(referalAddress)
95- let paymentForReferer = refAmount
96- let refererEarnedReward = (("address_" + refererAddress) + "_earnedReward")
97- let referalDeliveredReward = (((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_deliveredReward")
98- if ((refererAddress == referalAddress))
99- then nil
100- else [StringEntry((("address_" + referalAddress) + "_referedBy"), refererAddress), IntegerEntry(refererEarnedReward, (tryGetInteger(refererEarnedReward) + paymentForReferer)), IntegerEntry(referalDeliveredReward, (tryGetInteger(referalDeliveredReward) + paymentForReferer)), IntegerEntry((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount"), (tryGetInteger((((("referer_" + refererAddress) + "_referal_") + referalAddress) + "_amount")) + 1)), ScriptTransfer(refererAddressValue, paymentForReferer, userAddress)]
101- }
102- }
7+func sellart (artId,Price,maxMint,assetId,BlockEnd) = {
8+ let nftId = toBase58String(i.transactionId)
9+ let endHeight = lastBlock.height
10+ let pmt = extract(i.payment)
11+ WriteSet([DataEntry(nftId, endHeight), DataEntry((nftId + "_organizer"), toBase58String(i.caller.bytes)), DataEntry((nftId + "_lot_assetId"), if (isDefined(pmt.assetId))
12+ then toBase58String(value(pmt.assetId))
13+ else "WAVES"), DataEntry((nftId + "_lot_amount"), pmt.amount), DataEntry((nftId + "_startPrice"), Price), DataEntry((nftId + "_priceAssetId"), assetId)])
10314 }
10415
105-
106-@Verifier(tx)
107-func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
10816

github/deemru/w8io/026f985 
30.98 ms