tx · 7JRA5pYAQBSXo2GJqALxTEkQzuvVpXFeRqD9zUfT8wQk 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw: -0.01000000 Waves 2022.06.02 22:46 [2079161] smart account 3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw > SELF 0.00000000 Waves
{ "type": 13, "id": "7JRA5pYAQBSXo2GJqALxTEkQzuvVpXFeRqD9zUfT8wQk", "fee": 1000000, "feeAssetId": null, "timestamp": 1654199302720, "version": 2, "chainId": 84, "sender": "3N7nJwbFGppbebBtXy6bWVcQCGu7m3kXFaw", "senderPublicKey": "GTKqLSK6nuFkRdebB5SmTwTU2DnTeLMvhymCFfT2CxX2", "proofs": [ "3yeYxtcXTL353kRSi5jeAYToK6yKJvg3nyAXdicaqWPEe8Dd89afeq3GUwYSEpYova8LZ1fpAEmF6PsGP2FcAvge" ], "script": "base64:AAIFAAAAAAAAABcIAhIFCgMICAgSAwoBARIHCgUICAEBAQAAAAsAAAAABEJVc2QBAAAAIPFnQusGrf9lWc1HAL2GYEY/Z0GCbKxbjRY4l37PzNLbAAAAAARVU0RUAQAAACDxZ0LrBq3/ZVnNRwC9hmBGP2dBgmysW40WOJd+z8zS2wAAAAAEVVNEQwEAAAAg8WdC6wat/2VZzUcAvYZgRj9nQYJsrFuNFjiXfs/M0tsAAAAAA0JUQwEAAAAg8WdC6wat/2VZzUcAvYZgRj9nQYJsrFuNFjiXfs/M0tsAAAAAA0VUSAEAAAAg8WdC6wat/2VZzUcAvYZgRj9nQYJsrFuNFjiXfs/M0tsAAAAAA0JOQgEAAAAg8WdC6wat/2VZzUcAvYZgRj9nQYJsrFuNFjiXfs/M0tsAAAAABFVTRE4BAAAAIPFnQusGrf9lWc1HAL2GYEY/Z0GCbKxbjRY4l37PzNLbAAAAAARIQVNIAQAAACDxZ0LrBq3/ZVnNRwC9hmBGP2dBgmysW40WOJd+z8zS2wAAAAAES1VTRAEAAAAg8WdC6wat/2VZzUcAvYZgRj9nQYJsrFuN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AADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACBQAAAAhBZG1pbkZlZQUAAAAGYW1vdW50AAAAAAAAAABkBQAAAAlBc3NldFVzZWQFAAAAA25pbAUAAAAJQXNzZXRVc2VkAAAAAO/0v+8=", "height": 2079161, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 87psEoK9aFUcNB9WXzJLHztZTxa2qDcHnXr5nwPyG66Q Next: 9TzpGq4Ye3SCt2VNQ86FNLydPnotxpPcRCuKMosybJxH Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let BUsd = base58' | |
4 | + | let BUsd = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
5 | 5 | ||
6 | - | let USDT = base58' | |
6 | + | let USDT = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
7 | 7 | ||
8 | - | let USDC = base58' | |
8 | + | let USDC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
9 | 9 | ||
10 | - | let BTC = base58' | |
10 | + | let BTC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
11 | 11 | ||
12 | - | let ETH = base58' | |
12 | + | let ETH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
13 | 13 | ||
14 | - | let BNB = base58' | |
14 | + | let BNB = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
15 | 15 | ||
16 | - | let USDN = base58' | |
16 | + | let USDN = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
17 | 17 | ||
18 | - | let HASH = base58' | |
18 | + | let HASH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
19 | 19 | ||
20 | - | let KUSD = base58' | |
20 | + | let KUSD = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
21 | 21 | ||
22 | 22 | let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj' | |
23 | 23 | ||
24 | - | let AdmindApp = base58'3NB5uVMWSmaPW3cqrLMoAUgAPAYdoYHQK6U' | |
25 | - | ||
26 | - | @Callable(i) | |
27 | - | func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_LastPaid"), height)] | |
28 | - | ||
29 | - | ||
24 | + | let AdmindApp = base58'3MzqbY4iHg79pg4DNLK6UXUsbPuDcoJTzLw' | |
30 | 25 | ||
31 | 26 | @Callable(i) | |
32 | 27 | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
133 | 128 | ||
134 | 129 | ||
135 | 130 | @Callable(i) | |
136 | - | func PayFreelancerOnDemand () = { | |
137 | - | let PayFreelancer = 4 | |
138 | - | let Fee = 1 | |
139 | - | let WaitTime = 10 | |
140 | - | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
141 | - | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
142 | - | let LastPaymentBlock = (toBase58String(i.caller.bytes) + "_LastPaid") | |
143 | - | let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset") | |
144 | - | let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx") | |
145 | - | let amount = match getInteger(this, FreeLancerPayment) { | |
146 | - | case a: Int => | |
147 | - | a | |
148 | - | case _ => | |
149 | - | 0 | |
150 | - | } | |
151 | - | let PaidtrxLast = match getInteger(this, Paidtrx) { | |
152 | - | case a: Int => | |
153 | - | a | |
154 | - | case _ => | |
155 | - | 0 | |
156 | - | } | |
157 | - | let LastPaymentBlockValue = match getInteger(this, LastPaymentBlock) { | |
158 | - | case a: Int => | |
159 | - | a | |
160 | - | case _ => | |
161 | - | height | |
162 | - | } | |
163 | - | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
164 | - | let PaymentAssetId = getStringValue(this, PaymentAsset) | |
165 | - | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
166 | - | let dAppFrees = Address(dAppFees) | |
167 | - | let AssetUsed = if ((PaymentAssetId == "Waves")) | |
168 | - | then unit | |
169 | - | else fromBase58String(PaymentAssetId) | |
170 | - | if ((0 >= (amount - (Fee * 100000000)))) | |
171 | - | then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000)))) | |
172 | - | else if (if (((LastPaymentBlockValue + WaitTime) > height)) | |
173 | - | then (PaidtrxLast > 1) | |
174 | - | else false) | |
175 | - | then throw(((("Cannot make Payment before " + toString(LastPaymentBlockValue)) + " min") + toString(WaitTime))) | |
176 | - | else { | |
177 | - | let FeePaid = (Fee * 100000000) | |
178 | - | let PaidtrxValue = if ((PaidtrxLast == 3)) | |
179 | - | then 0 | |
180 | - | else (PaidtrxLast + 1) | |
181 | - | let UserAccount = if ((PaidtrxLast == 3)) | |
182 | - | then 0 | |
183 | - | else ((amount - (Fee * 100000000)) - (((PaidtrxValue * 25) * (amount - (Fee * 100000000))) / 100)) | |
184 | - | let Payment2Freelance = ((25 * amount) / 100) | |
185 | - | $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), IntegerEntry((toBase58String(i.caller.bytes) + "_LastPaid"), height), IntegerEntry("WaitTime", WaitTime), IntegerEntry("LastPaymentBlockValue", LastPaymentBlockValue), IntegerEntry("Check", (LastPaymentBlockValue + WaitTime)), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed) | |
186 | - | } | |
187 | - | } | |
188 | - | ||
189 | - | ||
190 | - | ||
191 | - | @Callable(i) | |
192 | 131 | func AdminTransfer (User,Freelancer,ToFreelancer,ToUser,AdminFee) = if ((i.caller.bytes != AdmindApp)) | |
193 | 132 | then throw("Only Admin can do this") | |
194 | 133 | else if ((((ToUser + ToFreelancer) + AdminFee) != 100)) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let BUsd = base58' | |
4 | + | let BUsd = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
5 | 5 | ||
6 | - | let USDT = base58' | |
6 | + | let USDT = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
7 | 7 | ||
8 | - | let USDC = base58' | |
8 | + | let USDC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
9 | 9 | ||
10 | - | let BTC = base58' | |
10 | + | let BTC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
11 | 11 | ||
12 | - | let ETH = base58' | |
12 | + | let ETH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
13 | 13 | ||
14 | - | let BNB = base58' | |
14 | + | let BNB = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
15 | 15 | ||
16 | - | let USDN = base58' | |
16 | + | let USDN = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
17 | 17 | ||
18 | - | let HASH = base58' | |
18 | + | let HASH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
19 | 19 | ||
20 | - | let KUSD = base58' | |
20 | + | let KUSD = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ' | |
21 | 21 | ||
22 | 22 | let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj' | |
23 | 23 | ||
24 | - | let AdmindApp = base58'3NB5uVMWSmaPW3cqrLMoAUgAPAYdoYHQK6U' | |
25 | - | ||
26 | - | @Callable(i) | |
27 | - | func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_LastPaid"), height)] | |
28 | - | ||
29 | - | ||
24 | + | let AdmindApp = base58'3MzqbY4iHg79pg4DNLK6UXUsbPuDcoJTzLw' | |
30 | 25 | ||
31 | 26 | @Callable(i) | |
32 | 27 | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
33 | 28 | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
34 | 29 | let amount = match getInteger(this, FreeLancerPayment) { | |
35 | 30 | case a: Int => | |
36 | 31 | a | |
37 | 32 | case _ => | |
38 | 33 | 0 | |
39 | 34 | } | |
40 | 35 | if ((amount != 0)) | |
41 | 36 | then throw("You have already deposited funds, deposits can only be done once") | |
42 | 37 | else { | |
43 | 38 | let pmt = if ((size(i.payments) == 1)) | |
44 | 39 | then i.payments[0] | |
45 | 40 | else throw("Attached payment is required") | |
46 | 41 | if (if (if (if (if (if (if (if (if (if (if ((0 >= pmt.amount)) | |
47 | 42 | then (pmt.assetId != BUsd) | |
48 | 43 | else false) | |
49 | 44 | then (pmt.assetId != USDT) | |
50 | 45 | else false) | |
51 | 46 | then (pmt.assetId != USDC) | |
52 | 47 | else false) | |
53 | 48 | then (pmt.assetId != BTC) | |
54 | 49 | else false) | |
55 | 50 | then (pmt.assetId != ETH) | |
56 | 51 | else false) | |
57 | 52 | then (pmt.assetId != BNB) | |
58 | 53 | else false) | |
59 | 54 | then (pmt.assetId != USDN) | |
60 | 55 | else false) | |
61 | 56 | then (pmt.assetId != HASH) | |
62 | 57 | else false) | |
63 | 58 | then (pmt.assetId != KUSD) | |
64 | 59 | else false) | |
65 | 60 | then isDefined(pmt.assetId) | |
66 | 61 | else false) | |
67 | 62 | then throw("Can only deposit accepted tokens, and amount should be positive") | |
68 | 63 | else if (if (if ((ScopeDesc == "")) | |
69 | 64 | then true | |
70 | 65 | else (Deliverables == "")) | |
71 | 66 | then true | |
72 | 67 | else (FreelancerAddress == "")) | |
73 | 68 | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
74 | 69 | else { | |
75 | 70 | let AssetUsed = if (isDefined(pmt.assetId)) | |
76 | 71 | then toBase58String(value(pmt.assetId)) | |
77 | 72 | else "Waves" | |
78 | 73 | [StringEntry((toBase58String(i.caller.bytes) + "_Scope"), ScopeDesc), StringEntry((toBase58String(i.caller.bytes) + "_Deliv"), Deliverables), StringEntry((toBase58String(i.caller.bytes) + "_Asset"), AssetUsed), StringEntry((toBase58String(i.caller.bytes) + "_Freelancer"), FreelancerAddress), IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), pmt.amount)] | |
79 | 74 | } | |
80 | 75 | } | |
81 | 76 | } | |
82 | 77 | ||
83 | 78 | ||
84 | 79 | ||
85 | 80 | @Callable(i) | |
86 | 81 | func PayFreelancer (PayFreelancer) = { | |
87 | 82 | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
88 | 83 | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
89 | 84 | let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset") | |
90 | 85 | let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx") | |
91 | 86 | let amount = match getInteger(this, FreeLancerPayment) { | |
92 | 87 | case a: Int => | |
93 | 88 | a | |
94 | 89 | case _ => | |
95 | 90 | 0 | |
96 | 91 | } | |
97 | 92 | let PaidtrxLast = match getInteger(this, Paidtrx) { | |
98 | 93 | case a: Int => | |
99 | 94 | a | |
100 | 95 | case _ => | |
101 | 96 | 0 | |
102 | 97 | } | |
103 | 98 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
104 | 99 | let PaymentAssetId = getStringValue(this, PaymentAsset) | |
105 | 100 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
106 | 101 | let dAppFrees = Address(dAppFees) | |
107 | 102 | let AssetUsed = if ((PaymentAssetId == "Waves")) | |
108 | 103 | then unit | |
109 | 104 | else fromBase58String(PaymentAssetId) | |
110 | 105 | if ((0 >= (((95 * amount) / 100) - (PayFreelancer * 100000000)))) | |
111 | 106 | then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000)))) | |
112 | 107 | else if (if ((PaidtrxLast >= 12)) | |
113 | 108 | then (amount > 0) | |
114 | 109 | else false) | |
115 | 110 | then throw("You have already done 12 payments, you cannot make more payments") | |
116 | 111 | else { | |
117 | 112 | let UserAccount = if ((PaidtrxLast == 11)) | |
118 | 113 | then 0 | |
119 | 114 | else (amount - (PayFreelancer * 100000000)) | |
120 | 115 | let Payment2Freelance = if ((PaidtrxLast == 11)) | |
121 | 116 | then ((95 * amount) / 100) | |
122 | 117 | else ((95 * PayFreelancer) * 1000000) | |
123 | 118 | let FeePaid = if ((PaidtrxLast == 11)) | |
124 | 119 | then ((5 * amount) / 100) | |
125 | 120 | else ((5 * PayFreelancer) * 1000000) | |
126 | 121 | let PaidtrxValue = if ((PaidtrxLast == 11)) | |
127 | 122 | then 0 | |
128 | 123 | else (PaidtrxLast + 1) | |
129 | 124 | $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed) | |
130 | 125 | } | |
131 | 126 | } | |
132 | 127 | ||
133 | 128 | ||
134 | 129 | ||
135 | 130 | @Callable(i) | |
136 | - | func PayFreelancerOnDemand () = { | |
137 | - | let PayFreelancer = 4 | |
138 | - | let Fee = 1 | |
139 | - | let WaitTime = 10 | |
140 | - | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
141 | - | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
142 | - | let LastPaymentBlock = (toBase58String(i.caller.bytes) + "_LastPaid") | |
143 | - | let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset") | |
144 | - | let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx") | |
145 | - | let amount = match getInteger(this, FreeLancerPayment) { | |
146 | - | case a: Int => | |
147 | - | a | |
148 | - | case _ => | |
149 | - | 0 | |
150 | - | } | |
151 | - | let PaidtrxLast = match getInteger(this, Paidtrx) { | |
152 | - | case a: Int => | |
153 | - | a | |
154 | - | case _ => | |
155 | - | 0 | |
156 | - | } | |
157 | - | let LastPaymentBlockValue = match getInteger(this, LastPaymentBlock) { | |
158 | - | case a: Int => | |
159 | - | a | |
160 | - | case _ => | |
161 | - | height | |
162 | - | } | |
163 | - | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
164 | - | let PaymentAssetId = getStringValue(this, PaymentAsset) | |
165 | - | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
166 | - | let dAppFrees = Address(dAppFees) | |
167 | - | let AssetUsed = if ((PaymentAssetId == "Waves")) | |
168 | - | then unit | |
169 | - | else fromBase58String(PaymentAssetId) | |
170 | - | if ((0 >= (amount - (Fee * 100000000)))) | |
171 | - | then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000)))) | |
172 | - | else if (if (((LastPaymentBlockValue + WaitTime) > height)) | |
173 | - | then (PaidtrxLast > 1) | |
174 | - | else false) | |
175 | - | then throw(((("Cannot make Payment before " + toString(LastPaymentBlockValue)) + " min") + toString(WaitTime))) | |
176 | - | else { | |
177 | - | let FeePaid = (Fee * 100000000) | |
178 | - | let PaidtrxValue = if ((PaidtrxLast == 3)) | |
179 | - | then 0 | |
180 | - | else (PaidtrxLast + 1) | |
181 | - | let UserAccount = if ((PaidtrxLast == 3)) | |
182 | - | then 0 | |
183 | - | else ((amount - (Fee * 100000000)) - (((PaidtrxValue * 25) * (amount - (Fee * 100000000))) / 100)) | |
184 | - | let Payment2Freelance = ((25 * amount) / 100) | |
185 | - | $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), IntegerEntry((toBase58String(i.caller.bytes) + "_LastPaid"), height), IntegerEntry("WaitTime", WaitTime), IntegerEntry("LastPaymentBlockValue", LastPaymentBlockValue), IntegerEntry("Check", (LastPaymentBlockValue + WaitTime)), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed) | |
186 | - | } | |
187 | - | } | |
188 | - | ||
189 | - | ||
190 | - | ||
191 | - | @Callable(i) | |
192 | 131 | func AdminTransfer (User,Freelancer,ToFreelancer,ToUser,AdminFee) = if ((i.caller.bytes != AdmindApp)) | |
193 | 132 | then throw("Only Admin can do this") | |
194 | 133 | else if ((((ToUser + ToFreelancer) + AdminFee) != 100)) | |
195 | 134 | then throw("Total of Percentages cannot be different from 100%") | |
196 | 135 | else { | |
197 | 136 | let FreeLancerPayment = (User + "_Payment") | |
198 | 137 | let FreelancerAddress = (User + "_Freelancer") | |
199 | 138 | let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset") | |
200 | 139 | let amount = match getInteger(this, FreeLancerPayment) { | |
201 | 140 | case a: Int => | |
202 | 141 | a | |
203 | 142 | case _ => | |
204 | 143 | 0 | |
205 | 144 | } | |
206 | 145 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
207 | 146 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
208 | 147 | let PaymentAssetId = getStringValue(this, PaymentAsset) | |
209 | 148 | let dAppFrees = Address(dAppFees) | |
210 | 149 | let AddressUser = addressFromStringValue(User) | |
211 | 150 | let AssetUsed = if ((PaymentAssetId == "Waves")) | |
212 | 151 | then unit | |
213 | 152 | else fromBase58String(PaymentAssetId) | |
214 | 153 | if ((amount == 0)) | |
215 | 154 | then throw("User's balance is 0 BUsdc cannot realize any payment") | |
216 | 155 | else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * amount) / 100), AssetUsed), ScriptTransfer(AddressUser, ((ToUser * amount) / 100), AssetUsed), ScriptTransfer(dAppFrees, ((AdminFee * amount) / 100), AssetUsed)], AssetUsed) | |
217 | 156 | } | |
218 | 157 | ||
219 | 158 |
github/deemru/w8io/026f985 38.81 ms ◑