tx · 6jC6PRhKzTfdz4HnJZwQRHAj9Q8tm1YUUpUvGBx77iPW

3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo:  -0.01400000 Waves

2022.05.15 18:31 [2052973] smart account 3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo > SELF 0.00000000 Waves

{ "type": 13, "id": "6jC6PRhKzTfdz4HnJZwQRHAj9Q8tm1YUUpUvGBx77iPW", "fee": 1400000, "feeAssetId": null, "timestamp": 1652628702862, "version": 2, "chainId": 84, "sender": "3MvGbCQfRKnagRd5JmZTvgupznuJD7MyKfo", "senderPublicKey": "8Gc2RCQPWrzPyyDuKYbKYRCrEHXZSYqCAdiiRQAooSZ6", "proofs": [ "5ogLjTxFxmnuHHXfqhZucNi87YxWYrkqMA34WC4qiRVX6Zd5HcQE8vbuwVTvLW7qpw7c5PMXYKuF6j14P1443Ch6" ], "script": "base64:AAIFAAAAAAAAACkIAhIDCgEIEgkKBwgICAgBAQESCQoHCAgICAEBARIECgIICBIECgIICAAAAAgAAAAACW9yYWNsZUtleQIAAAAJb3JhY2xlS2V5AQAAAAZnZXRTdHIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABB0AAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAABlN0cmluZwQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgIAAAAAAQAAAAZnZXRJbnQAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAAAAAAGb3JhY2xlCQEAAAAGZ2V0U3RyAAAAAQUAAAAJb3JhY2xlS2V5AAAAAAlvcmFjbGVGZWUJAQAAAAV2YWx1ZQAAAAEJAAQmAAAAAQUAAAAGb3JhY2xlAAAAAApzY29uZXhEYXBwCQAEJgAAAAEJAQAAABN2YWx1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VzczFUZWFtUmV3YXJkBQAAABJhZGRyZXNzMlRlYW1SZXdhcmQFAAAAEmFkZHJlc3MzVGVhbVJld2FyZAQAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIDCQAAAAAAAAIFAAAABnNlbGxlcgIAAAAABQAAAANuaWwJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwkBAAAAEUBleHRyTmF0aXZlKDEwNjIpAAAAAQUAAAAGc2VsbGVyBQAAAAxzZWxsZXJSZXdhcmQICQABkQAAAAIIBQAAAAFpAAAACHBheW1lbnRzAAAAAAAAAAAAAAAAB2Fzc2V0SWQFAAAAA25pbAkABE4AAAACCQAETgAAAAIJAAROAAAAAgkABE4AAAACCQAETgAAAAIJAAROAAAAAgUAAAAac2NyaXB0VHJhbnNmZXJBZGRyZXNzVGVhbTEFAAAAGnNjcmlwdFRyYW5zZmVyQWRkcmVzc1RlYW0yBQAAABpzY3JpcHRUcmFuc2ZlckFkZHJlc3NUZWFtMwUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMQUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMgUAAAAWc2NyaXB0VHJhbnNmZXJBZGRyZXNzMwUAAAAUc2NyaXB0VHJhbnNmZXJTZWxsZXIAAAAA5zd+YQ==", "height": 2052973, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: NtQDmivhWU6gPqe75XuFuufdipDzoXeuwHfGVDaXEH5 Next: BLWsZWtpea4nCN2ce8NVcXRB9qDwCEPQ6ygxZLzCVCQD Diff:
OldNewDifferences
105105
106106
107107 @Callable(i)
108-func payFeeResell (txId,seller) = {
109- let sconexFeePercentage = 3
110- let amount = value(i.payments[0].amount)
111- let assetId = value(i.payments[0].assetId)
112- let address1ShareCreator = getInt((txId + "_creator_share1"))
113- let address2ShareCreator = getInt((txId + "_creator_share2"))
114- let address3ShareCreator = getInt((txId + "_creator_share3"))
115- let address1Creator = getStr((txId + "_creator_address1"))
116- let address2Creator = getStr((txId + "_creator_address2"))
117- let address3Creator = getStr((txId + "_creator_address3"))
118- let address1CreatorReward = if ((address1Creator == ""))
119- then 0
120- else fraction(amount, address1ShareCreator, 100)
121- let address2CreatorReward = if ((address2Creator == ""))
122- then 0
123- else fraction(amount, address2ShareCreator, 100)
124- let address3CreatorReward = if ((address3Creator == ""))
125- then 0
126- else fraction(amount, address3ShareCreator, 100)
127- let sconexFeeReward = fraction(amount, sconexFeePercentage, 100)
128- let sellerReward = ((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - sconexFeeReward)
129- let scriptTransferFeeReceiver = [ScriptTransfer(addressFromStringValue(feeReceiver), sconexFeeReward, i.payments[0].assetId)]
130- let scriptTransferAddress1 = if ((address1Creator == ""))
131- then nil
132- else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
133- let scriptTransferAddress2 = if ((address2Creator == ""))
134- then nil
135- else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
136- let scriptTransferAddress3 = if ((address3Creator == ""))
137- then nil
138- else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
139- let scriptTransferSeller = if ((seller == ""))
140- then nil
141- else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
142- ((((scriptTransferAddress1 ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferFeeReceiver) ++ scriptTransferSeller)
143- }
108+func payFeeResell (txId,seller) = if (!(containsElement(allowedDapps, i.caller)))
109+ then throw("Not allowed")
110+ else {
111+ let sconexFeePercentage = 3
112+ let amount = value(i.payments[0].amount)
113+ let assetId = value(i.payments[0].assetId)
114+ let address1ShareCreator = getInt((txId + "_creator_share1"))
115+ let address2ShareCreator = getInt((txId + "_creator_share2"))
116+ let address3ShareCreator = getInt((txId + "_creator_share3"))
117+ let address1Creator = getStr((txId + "_creator_address1"))
118+ let address2Creator = getStr((txId + "_creator_address2"))
119+ let address3Creator = getStr((txId + "_creator_address3"))
120+ let address1CreatorReward = if ((address1Creator == ""))
121+ then 0
122+ else fraction(amount, address1ShareCreator, 100)
123+ let address2CreatorReward = if ((address2Creator == ""))
124+ then 0
125+ else fraction(amount, address2ShareCreator, 100)
126+ let address3CreatorReward = if ((address3Creator == ""))
127+ then 0
128+ else fraction(amount, address3ShareCreator, 100)
129+ let sconexFeeReward = fraction(amount, sconexFeePercentage, 100)
130+ let sellerReward = ((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - sconexFeeReward)
131+ let scriptTransferFeeReceiver = [ScriptTransfer(addressFromStringValue(feeReceiver), sconexFeeReward, i.payments[0].assetId)]
132+ let scriptTransferAddress1 = if ((address1Creator == ""))
133+ then nil
134+ else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
135+ let scriptTransferAddress2 = if ((address2Creator == ""))
136+ then nil
137+ else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
138+ let scriptTransferAddress3 = if ((address3Creator == ""))
139+ then nil
140+ else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
141+ let scriptTransferSeller = if ((seller == ""))
142+ then nil
143+ else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
144+ ((((scriptTransferAddress1 ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferFeeReceiver) ++ scriptTransferSeller)
145+ }
144146
145147
146148
147149 @Callable(i)
148-func payFee (txId,seller) = {
149- let amount = value(i.payments[0].amount)
150- let assetId = value(i.payments[0].assetId)
151- let address1ShareTeam = getInt((txId + "_team_share1"))
152- let address2ShareTeam = getInt((txId + "_team_share2"))
153- let address3ShareTeam = getInt((txId + "_team_share3"))
154- let address1Team = getStr((txId + "_team_address1"))
155- let address2Team = getStr((txId + "_team_address2"))
156- let address3Team = getStr((txId + "_team_address3"))
157- let address1ShareCreator = getInt((txId + "_creator_address1"))
158- let address2ShareCreator = getInt((txId + "_creator_address2"))
159- let address3ShareCreator = getInt((txId + "_creator_address3"))
160- let address1Creator = getStr((txId + "_creator_address1"))
161- let address2Creator = getStr((txId + "_creator_address2"))
162- let address3Creator = getStr((txId + "_creator_address3"))
163- let address1TeamReward = if ((address1Team == ""))
164- then 0
165- else fraction(amount, address1ShareTeam, 100)
166- let address2TeamReward = if ((address2Team == ""))
167- then 0
168- else fraction(amount, address2ShareTeam, 100)
169- let address3TeamReward = if ((address3Team == ""))
170- then 0
171- else fraction(amount, address3ShareTeam, 100)
172- let address1CreatorReward = if ((address1Creator == ""))
173- then 0
174- else fraction(amount, address1ShareCreator, 100)
175- let address2CreatorReward = if ((address2Creator == ""))
176- then 0
177- else fraction(amount, address2ShareCreator, 100)
178- let address3CreatorReward = if ((address3Creator == ""))
179- then 0
180- else fraction(amount, address3ShareCreator, 100)
181- let scriptTransferAddressTeam1 = if ((address1Team == ""))
182- then nil
183- else [ScriptTransfer(addressFromStringValue(address1Team), address1TeamReward, i.payments[0].assetId)]
184- let scriptTransferAddressTeam2 = if ((address2Team == ""))
185- then nil
186- else [ScriptTransfer(addressFromStringValue(address2Team), address2TeamReward, i.payments[0].assetId)]
187- let scriptTransferAddressTeam3 = if ((address3Team == ""))
188- then nil
189- else [ScriptTransfer(addressFromStringValue(address3Team), address3TeamReward, i.payments[0].assetId)]
190- let scriptTransferAddress1 = if ((address1Creator == ""))
191- then nil
192- else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
193- let scriptTransferAddress2 = if ((address2Creator == ""))
194- then nil
195- else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
196- let scriptTransferAddress3 = if ((address3Creator == ""))
197- then nil
198- else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
199- let sellerReward = ((((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - address1TeamReward) - address2TeamReward) - address3TeamReward)
200- let scriptTransferSeller = if ((seller == ""))
201- then nil
202- else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
203- ((((((scriptTransferAddressTeam1 ++ scriptTransferAddressTeam2) ++ scriptTransferAddressTeam3) ++ scriptTransferAddress1) ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferSeller)
204- }
150+func payFee (txId,seller) = if (!(containsElement(allowedDapps, i.caller)))
151+ then throw("Not allowed")
152+ else {
153+ let amount = value(i.payments[0].amount)
154+ let assetId = value(i.payments[0].assetId)
155+ let address1ShareTeam = getInt((txId + "_team_share1"))
156+ let address2ShareTeam = getInt((txId + "_team_share2"))
157+ let address3ShareTeam = getInt((txId + "_team_share3"))
158+ let address1Team = getStr((txId + "_team_address1"))
159+ let address2Team = getStr((txId + "_team_address2"))
160+ let address3Team = getStr((txId + "_team_address3"))
161+ let address1ShareCreator = getInt((txId + "_creator_address1"))
162+ let address2ShareCreator = getInt((txId + "_creator_address2"))
163+ let address3ShareCreator = getInt((txId + "_creator_address3"))
164+ let address1Creator = getStr((txId + "_creator_address1"))
165+ let address2Creator = getStr((txId + "_creator_address2"))
166+ let address3Creator = getStr((txId + "_creator_address3"))
167+ let address1TeamReward = if ((address1Team == ""))
168+ then 0
169+ else fraction(amount, address1ShareTeam, 100)
170+ let address2TeamReward = if ((address2Team == ""))
171+ then 0
172+ else fraction(amount, address2ShareTeam, 100)
173+ let address3TeamReward = if ((address3Team == ""))
174+ then 0
175+ else fraction(amount, address3ShareTeam, 100)
176+ let address1CreatorReward = if ((address1Creator == ""))
177+ then 0
178+ else fraction(amount, address1ShareCreator, 100)
179+ let address2CreatorReward = if ((address2Creator == ""))
180+ then 0
181+ else fraction(amount, address2ShareCreator, 100)
182+ let address3CreatorReward = if ((address3Creator == ""))
183+ then 0
184+ else fraction(amount, address3ShareCreator, 100)
185+ let scriptTransferAddressTeam1 = if ((address1Team == ""))
186+ then nil
187+ else [ScriptTransfer(addressFromStringValue(address1Team), address1TeamReward, i.payments[0].assetId)]
188+ let scriptTransferAddressTeam2 = if ((address2Team == ""))
189+ then nil
190+ else [ScriptTransfer(addressFromStringValue(address2Team), address2TeamReward, i.payments[0].assetId)]
191+ let scriptTransferAddressTeam3 = if ((address3Team == ""))
192+ then nil
193+ else [ScriptTransfer(addressFromStringValue(address3Team), address3TeamReward, i.payments[0].assetId)]
194+ let scriptTransferAddress1 = if ((address1Creator == ""))
195+ then nil
196+ else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
197+ let scriptTransferAddress2 = if ((address2Creator == ""))
198+ then nil
199+ else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
200+ let scriptTransferAddress3 = if ((address3Creator == ""))
201+ then nil
202+ else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
203+ let sellerReward = ((((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - address1TeamReward) - address2TeamReward) - address3TeamReward)
204+ let scriptTransferSeller = if ((seller == ""))
205+ then nil
206+ else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
207+ ((((((scriptTransferAddressTeam1 ++ scriptTransferAddressTeam2) ++ scriptTransferAddressTeam3) ++ scriptTransferAddress1) ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferSeller)
208+ }
205209
206210
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let oracleKey = "oracleKey"
55
66 func getStr (key) = match getString(this, key) {
77 case b: String =>
88 b
99 case _ =>
1010 ""
1111 }
1212
1313
1414 func getInt (key) = match getInteger(this, key) {
1515 case b: Int =>
1616 b
1717 case _ =>
1818 0
1919 }
2020
2121
2222 let oracle = getStr(oracleKey)
2323
2424 let oracleFee = value(addressFromString(oracle))
2525
2626 let sconexDapp = addressFromString(valueOrErrorMessage(getString(oracleFee, "sconexDapp"), "sconexDapp not found"))
2727
2828 let feeReceiver = valueOrErrorMessage(getString(oracleFee, "feeReceiver"), "feeReceiver not found")
2929
3030 let allowedDapps = [sconexDapp]
3131
3232 @Callable(i)
3333 func initDapp (dappKey) = if ((i.caller != this))
3434 then throw("You cannot do this action")
3535 else if ((oracle != ""))
3636 then throw("oracle already set, you can't override!")
3737 else [StringEntry(oracleKey, dappKey)]
3838
3939
4040
4141 @Callable(i)
4242 func teamSplitFee (artId,address1,address2,address3,address1Share,address2Share,address3Share) = if (!(containsElement(allowedDapps, i.caller)))
4343 then throw("Not allowed")
4444 else if ((0 > address1Share))
4545 then throw("Share 1 can't be negative")
4646 else if (if (if ((address1Share != 0))
4747 then true
4848 else (address1 != ""))
4949 then !(isDefined(addressFromString(address1)))
5050 else false)
5151 then throw("Address 1 is invalid")
5252 else if ((0 > address2Share))
5353 then throw("Share 2 can't be negative")
5454 else if (if (if ((address2Share != 0))
5555 then true
5656 else (address2 != ""))
5757 then !(isDefined(addressFromString(address2)))
5858 else false)
5959 then throw("Address 2 is invalid")
6060 else if ((0 > address3Share))
6161 then throw("Share 3 can't be negative")
6262 else if (if (if ((address3Share != 0))
6363 then true
6464 else (address3 != ""))
6565 then !(isDefined(addressFromString(address3)))
6666 else false)
6767 then throw("Address 3 is invalid")
6868 else if ((((address1Share + address2Share) + address3Share) != 15))
6969 then throw("Sum of shares should be equal to 15")
7070 else [StringEntry((artId + "_team_address1"), address1), StringEntry((artId + "_team_address2"), address2), StringEntry((artId + "_team_address3"), address3), IntegerEntry((artId + "_team_share1"), address1Share), IntegerEntry((artId + "_team_share2"), address2Share), IntegerEntry((artId + "_team_share3"), address3Share)]
7171
7272
7373
7474 @Callable(i)
7575 func creatorSplitFee (artId,address1,address2,address3,address1Share,address2Share,address3Share) = if (!(containsElement(allowedDapps, i.caller)))
7676 then throw("Not allowed")
7777 else if ((0 > address1Share))
7878 then throw("Share 1 can't be negative")
7979 else if (if (if ((address1Share != 0))
8080 then true
8181 else (address1 != ""))
8282 then !(isDefined(addressFromString(address1)))
8383 else false)
8484 then throw("Address 1 is invalid")
8585 else if ((0 > address2Share))
8686 then throw("Share 2 can't be negative")
8787 else if (if (if ((address2Share != 0))
8888 then true
8989 else (address2 != ""))
9090 then !(isDefined(addressFromString(address2)))
9191 else false)
9292 then throw("Address 2 is invalid")
9393 else if ((0 > address3Share))
9494 then throw("Share 3 can't be negative")
9595 else if (if (if ((address3Share != 0))
9696 then true
9797 else (address3 != ""))
9898 then !(isDefined(addressFromString(address3)))
9999 else false)
100100 then throw("Address 3 is invalid")
101101 else if ((((address1Share + address2Share) + address3Share) > 85))
102102 then throw("Sum of shares should be smaller or equal then 85")
103103 else [StringEntry((artId + "_creator_address1"), address1), StringEntry((artId + "_creator_address2"), address2), StringEntry((artId + "_creator_address3"), address3), IntegerEntry((artId + "_creator_share1"), address1Share), IntegerEntry((artId + "_creator_share2"), address2Share), IntegerEntry((artId + "_creator_share3"), address3Share)]
104104
105105
106106
107107 @Callable(i)
108-func payFeeResell (txId,seller) = {
109- let sconexFeePercentage = 3
110- let amount = value(i.payments[0].amount)
111- let assetId = value(i.payments[0].assetId)
112- let address1ShareCreator = getInt((txId + "_creator_share1"))
113- let address2ShareCreator = getInt((txId + "_creator_share2"))
114- let address3ShareCreator = getInt((txId + "_creator_share3"))
115- let address1Creator = getStr((txId + "_creator_address1"))
116- let address2Creator = getStr((txId + "_creator_address2"))
117- let address3Creator = getStr((txId + "_creator_address3"))
118- let address1CreatorReward = if ((address1Creator == ""))
119- then 0
120- else fraction(amount, address1ShareCreator, 100)
121- let address2CreatorReward = if ((address2Creator == ""))
122- then 0
123- else fraction(amount, address2ShareCreator, 100)
124- let address3CreatorReward = if ((address3Creator == ""))
125- then 0
126- else fraction(amount, address3ShareCreator, 100)
127- let sconexFeeReward = fraction(amount, sconexFeePercentage, 100)
128- let sellerReward = ((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - sconexFeeReward)
129- let scriptTransferFeeReceiver = [ScriptTransfer(addressFromStringValue(feeReceiver), sconexFeeReward, i.payments[0].assetId)]
130- let scriptTransferAddress1 = if ((address1Creator == ""))
131- then nil
132- else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
133- let scriptTransferAddress2 = if ((address2Creator == ""))
134- then nil
135- else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
136- let scriptTransferAddress3 = if ((address3Creator == ""))
137- then nil
138- else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
139- let scriptTransferSeller = if ((seller == ""))
140- then nil
141- else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
142- ((((scriptTransferAddress1 ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferFeeReceiver) ++ scriptTransferSeller)
143- }
108+func payFeeResell (txId,seller) = if (!(containsElement(allowedDapps, i.caller)))
109+ then throw("Not allowed")
110+ else {
111+ let sconexFeePercentage = 3
112+ let amount = value(i.payments[0].amount)
113+ let assetId = value(i.payments[0].assetId)
114+ let address1ShareCreator = getInt((txId + "_creator_share1"))
115+ let address2ShareCreator = getInt((txId + "_creator_share2"))
116+ let address3ShareCreator = getInt((txId + "_creator_share3"))
117+ let address1Creator = getStr((txId + "_creator_address1"))
118+ let address2Creator = getStr((txId + "_creator_address2"))
119+ let address3Creator = getStr((txId + "_creator_address3"))
120+ let address1CreatorReward = if ((address1Creator == ""))
121+ then 0
122+ else fraction(amount, address1ShareCreator, 100)
123+ let address2CreatorReward = if ((address2Creator == ""))
124+ then 0
125+ else fraction(amount, address2ShareCreator, 100)
126+ let address3CreatorReward = if ((address3Creator == ""))
127+ then 0
128+ else fraction(amount, address3ShareCreator, 100)
129+ let sconexFeeReward = fraction(amount, sconexFeePercentage, 100)
130+ let sellerReward = ((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - sconexFeeReward)
131+ let scriptTransferFeeReceiver = [ScriptTransfer(addressFromStringValue(feeReceiver), sconexFeeReward, i.payments[0].assetId)]
132+ let scriptTransferAddress1 = if ((address1Creator == ""))
133+ then nil
134+ else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
135+ let scriptTransferAddress2 = if ((address2Creator == ""))
136+ then nil
137+ else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
138+ let scriptTransferAddress3 = if ((address3Creator == ""))
139+ then nil
140+ else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
141+ let scriptTransferSeller = if ((seller == ""))
142+ then nil
143+ else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
144+ ((((scriptTransferAddress1 ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferFeeReceiver) ++ scriptTransferSeller)
145+ }
144146
145147
146148
147149 @Callable(i)
148-func payFee (txId,seller) = {
149- let amount = value(i.payments[0].amount)
150- let assetId = value(i.payments[0].assetId)
151- let address1ShareTeam = getInt((txId + "_team_share1"))
152- let address2ShareTeam = getInt((txId + "_team_share2"))
153- let address3ShareTeam = getInt((txId + "_team_share3"))
154- let address1Team = getStr((txId + "_team_address1"))
155- let address2Team = getStr((txId + "_team_address2"))
156- let address3Team = getStr((txId + "_team_address3"))
157- let address1ShareCreator = getInt((txId + "_creator_address1"))
158- let address2ShareCreator = getInt((txId + "_creator_address2"))
159- let address3ShareCreator = getInt((txId + "_creator_address3"))
160- let address1Creator = getStr((txId + "_creator_address1"))
161- let address2Creator = getStr((txId + "_creator_address2"))
162- let address3Creator = getStr((txId + "_creator_address3"))
163- let address1TeamReward = if ((address1Team == ""))
164- then 0
165- else fraction(amount, address1ShareTeam, 100)
166- let address2TeamReward = if ((address2Team == ""))
167- then 0
168- else fraction(amount, address2ShareTeam, 100)
169- let address3TeamReward = if ((address3Team == ""))
170- then 0
171- else fraction(amount, address3ShareTeam, 100)
172- let address1CreatorReward = if ((address1Creator == ""))
173- then 0
174- else fraction(amount, address1ShareCreator, 100)
175- let address2CreatorReward = if ((address2Creator == ""))
176- then 0
177- else fraction(amount, address2ShareCreator, 100)
178- let address3CreatorReward = if ((address3Creator == ""))
179- then 0
180- else fraction(amount, address3ShareCreator, 100)
181- let scriptTransferAddressTeam1 = if ((address1Team == ""))
182- then nil
183- else [ScriptTransfer(addressFromStringValue(address1Team), address1TeamReward, i.payments[0].assetId)]
184- let scriptTransferAddressTeam2 = if ((address2Team == ""))
185- then nil
186- else [ScriptTransfer(addressFromStringValue(address2Team), address2TeamReward, i.payments[0].assetId)]
187- let scriptTransferAddressTeam3 = if ((address3Team == ""))
188- then nil
189- else [ScriptTransfer(addressFromStringValue(address3Team), address3TeamReward, i.payments[0].assetId)]
190- let scriptTransferAddress1 = if ((address1Creator == ""))
191- then nil
192- else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
193- let scriptTransferAddress2 = if ((address2Creator == ""))
194- then nil
195- else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
196- let scriptTransferAddress3 = if ((address3Creator == ""))
197- then nil
198- else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
199- let sellerReward = ((((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - address1TeamReward) - address2TeamReward) - address3TeamReward)
200- let scriptTransferSeller = if ((seller == ""))
201- then nil
202- else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
203- ((((((scriptTransferAddressTeam1 ++ scriptTransferAddressTeam2) ++ scriptTransferAddressTeam3) ++ scriptTransferAddress1) ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferSeller)
204- }
150+func payFee (txId,seller) = if (!(containsElement(allowedDapps, i.caller)))
151+ then throw("Not allowed")
152+ else {
153+ let amount = value(i.payments[0].amount)
154+ let assetId = value(i.payments[0].assetId)
155+ let address1ShareTeam = getInt((txId + "_team_share1"))
156+ let address2ShareTeam = getInt((txId + "_team_share2"))
157+ let address3ShareTeam = getInt((txId + "_team_share3"))
158+ let address1Team = getStr((txId + "_team_address1"))
159+ let address2Team = getStr((txId + "_team_address2"))
160+ let address3Team = getStr((txId + "_team_address3"))
161+ let address1ShareCreator = getInt((txId + "_creator_address1"))
162+ let address2ShareCreator = getInt((txId + "_creator_address2"))
163+ let address3ShareCreator = getInt((txId + "_creator_address3"))
164+ let address1Creator = getStr((txId + "_creator_address1"))
165+ let address2Creator = getStr((txId + "_creator_address2"))
166+ let address3Creator = getStr((txId + "_creator_address3"))
167+ let address1TeamReward = if ((address1Team == ""))
168+ then 0
169+ else fraction(amount, address1ShareTeam, 100)
170+ let address2TeamReward = if ((address2Team == ""))
171+ then 0
172+ else fraction(amount, address2ShareTeam, 100)
173+ let address3TeamReward = if ((address3Team == ""))
174+ then 0
175+ else fraction(amount, address3ShareTeam, 100)
176+ let address1CreatorReward = if ((address1Creator == ""))
177+ then 0
178+ else fraction(amount, address1ShareCreator, 100)
179+ let address2CreatorReward = if ((address2Creator == ""))
180+ then 0
181+ else fraction(amount, address2ShareCreator, 100)
182+ let address3CreatorReward = if ((address3Creator == ""))
183+ then 0
184+ else fraction(amount, address3ShareCreator, 100)
185+ let scriptTransferAddressTeam1 = if ((address1Team == ""))
186+ then nil
187+ else [ScriptTransfer(addressFromStringValue(address1Team), address1TeamReward, i.payments[0].assetId)]
188+ let scriptTransferAddressTeam2 = if ((address2Team == ""))
189+ then nil
190+ else [ScriptTransfer(addressFromStringValue(address2Team), address2TeamReward, i.payments[0].assetId)]
191+ let scriptTransferAddressTeam3 = if ((address3Team == ""))
192+ then nil
193+ else [ScriptTransfer(addressFromStringValue(address3Team), address3TeamReward, i.payments[0].assetId)]
194+ let scriptTransferAddress1 = if ((address1Creator == ""))
195+ then nil
196+ else [ScriptTransfer(addressFromStringValue(address1Creator), address1CreatorReward, i.payments[0].assetId)]
197+ let scriptTransferAddress2 = if ((address2Creator == ""))
198+ then nil
199+ else [ScriptTransfer(addressFromStringValue(address2Creator), address2CreatorReward, i.payments[0].assetId)]
200+ let scriptTransferAddress3 = if ((address3Creator == ""))
201+ then nil
202+ else [ScriptTransfer(addressFromStringValue(address3Creator), address3CreatorReward, i.payments[0].assetId)]
203+ let sellerReward = ((((((amount - address1CreatorReward) - address2CreatorReward) - address3CreatorReward) - address1TeamReward) - address2TeamReward) - address3TeamReward)
204+ let scriptTransferSeller = if ((seller == ""))
205+ then nil
206+ else [ScriptTransfer(addressFromStringValue(seller), sellerReward, i.payments[0].assetId)]
207+ ((((((scriptTransferAddressTeam1 ++ scriptTransferAddressTeam2) ++ scriptTransferAddressTeam3) ++ scriptTransferAddress1) ++ scriptTransferAddress2) ++ scriptTransferAddress3) ++ scriptTransferSeller)
208+ }
205209
206210

github/deemru/w8io/026f985 
38.30 ms