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/2VZzUcAvYZgRj9nQYJsrFu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AAADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACBQAAAAhBZG1pbkZlZQUAAAAGYW1vdW50AAAAAAAAAABkBQAAAAlBc3NldFVzZWQFAAAAA25pbAUAAAAJQXNzZXRVc2VkAAAAAO/0v+8=", "height": 2079161, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 87psEoK9aFUcNB9WXzJLHztZTxa2qDcHnXr5nwPyG66Q Next: 9TzpGq4Ye3SCt2VNQ86FNLydPnotxpPcRCuKMosybJxH Diff:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let BUsd = base58'8DLiYZjo3UUaRBTHU7Ayoqg4ihwb6YH1AfXrrhdjQ7K1'
4+let BUsd = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
55
6-let USDT = base58'34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ'
6+let USDT = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
77
8-let USDC = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ'
8+let USDC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
99
10-let BTC = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS'
10+let BTC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1111
12-let ETH = base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu'
12+let ETH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1313
14-let BNB = base58'5UYBPpq4WoU5n4MwpFkgJnW3Fq4B1u3ukpK33ik4QerR'
14+let BNB = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1515
16-let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
16+let USDN = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1717
18-let HASH = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv'
18+let HASH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1919
20-let KUSD = base58'FXvNWA5Gfy8yLPHGScm6Gmn4DSZX9brFZ9qmEkPxAhGk'
20+let KUSD = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
2121
2222 let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj'
2323
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'
3025
3126 @Callable(i)
3227 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
133128
134129
135130 @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)
192131 func AdminTransfer (User,Freelancer,ToFreelancer,ToUser,AdminFee) = if ((i.caller.bytes != AdmindApp))
193132 then throw("Only Admin can do this")
194133 else if ((((ToUser + ToFreelancer) + AdminFee) != 100))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
4-let BUsd = base58'8DLiYZjo3UUaRBTHU7Ayoqg4ihwb6YH1AfXrrhdjQ7K1'
4+let BUsd = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
55
6-let USDT = base58'34N9YcEETLWn93qYQ64EsP1x89tSruJU44RrEMSXXEPJ'
6+let USDT = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
77
8-let USDC = base58'6XtHjpXbs9RRJP2Sr9GUyVqzACcby9TkThHXnjVC5CDJ'
8+let USDC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
99
10-let BTC = base58'8LQW8f7P5d5PZM7GtZEBgaqRPGSzS3DfPuiXrURJ4AJS'
10+let BTC = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1111
12-let ETH = base58'474jTeYx2r2Va35794tCScAXWJG9hU2HcgxzMowaZUnu'
12+let ETH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1313
14-let BNB = base58'5UYBPpq4WoU5n4MwpFkgJnW3Fq4B1u3ukpK33ik4QerR'
14+let BNB = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1515
16-let USDN = base58'DG2xFkPdDwKUoBkzGAhQtLpSGzfXLiCYPEzeKH2Ad24p'
16+let USDN = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1717
18-let HASH = base58'7RgM3A5AVCUZFbL3EwBicv1eHFCVsaY8z71yda77zrAv'
18+let HASH = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
1919
20-let KUSD = base58'FXvNWA5Gfy8yLPHGScm6Gmn4DSZX9brFZ9qmEkPxAhGk'
20+let KUSD = base58'HFLaeLdjg9cASsYhvwM9PV3NcCxa3UeVa5KvfYUPQYgJ'
2121
2222 let dAppFees = base58'3N59qn7Ndw24WrGFkNFk7PGTBCzdMETyKqj'
2323
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'
3025
3126 @Callable(i)
3227 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
3328 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
3429 let amount = match getInteger(this, FreeLancerPayment) {
3530 case a: Int =>
3631 a
3732 case _ =>
3833 0
3934 }
4035 if ((amount != 0))
4136 then throw("You have already deposited funds, deposits can only be done once")
4237 else {
4338 let pmt = if ((size(i.payments) == 1))
4439 then i.payments[0]
4540 else throw("Attached payment is required")
4641 if (if (if (if (if (if (if (if (if (if (if ((0 >= pmt.amount))
4742 then (pmt.assetId != BUsd)
4843 else false)
4944 then (pmt.assetId != USDT)
5045 else false)
5146 then (pmt.assetId != USDC)
5247 else false)
5348 then (pmt.assetId != BTC)
5449 else false)
5550 then (pmt.assetId != ETH)
5651 else false)
5752 then (pmt.assetId != BNB)
5853 else false)
5954 then (pmt.assetId != USDN)
6055 else false)
6156 then (pmt.assetId != HASH)
6257 else false)
6358 then (pmt.assetId != KUSD)
6459 else false)
6560 then isDefined(pmt.assetId)
6661 else false)
6762 then throw("Can only deposit accepted tokens, and amount should be positive")
6863 else if (if (if ((ScopeDesc == ""))
6964 then true
7065 else (Deliverables == ""))
7166 then true
7267 else (FreelancerAddress == ""))
7368 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
7469 else {
7570 let AssetUsed = if (isDefined(pmt.assetId))
7671 then toBase58String(value(pmt.assetId))
7772 else "Waves"
7873 [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)]
7974 }
8075 }
8176 }
8277
8378
8479
8580 @Callable(i)
8681 func PayFreelancer (PayFreelancer) = {
8782 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
8883 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
8984 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
9085 let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx")
9186 let amount = match getInteger(this, FreeLancerPayment) {
9287 case a: Int =>
9388 a
9489 case _ =>
9590 0
9691 }
9792 let PaidtrxLast = match getInteger(this, Paidtrx) {
9893 case a: Int =>
9994 a
10095 case _ =>
10196 0
10297 }
10398 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
10499 let PaymentAssetId = getStringValue(this, PaymentAsset)
105100 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
106101 let dAppFrees = Address(dAppFees)
107102 let AssetUsed = if ((PaymentAssetId == "Waves"))
108103 then unit
109104 else fromBase58String(PaymentAssetId)
110105 if ((0 >= (((95 * amount) / 100) - (PayFreelancer * 100000000))))
111106 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000))))
112107 else if (if ((PaidtrxLast >= 12))
113108 then (amount > 0)
114109 else false)
115110 then throw("You have already done 12 payments, you cannot make more payments")
116111 else {
117112 let UserAccount = if ((PaidtrxLast == 11))
118113 then 0
119114 else (amount - (PayFreelancer * 100000000))
120115 let Payment2Freelance = if ((PaidtrxLast == 11))
121116 then ((95 * amount) / 100)
122117 else ((95 * PayFreelancer) * 1000000)
123118 let FeePaid = if ((PaidtrxLast == 11))
124119 then ((5 * amount) / 100)
125120 else ((5 * PayFreelancer) * 1000000)
126121 let PaidtrxValue = if ((PaidtrxLast == 11))
127122 then 0
128123 else (PaidtrxLast + 1)
129124 $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed)
130125 }
131126 }
132127
133128
134129
135130 @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)
192131 func AdminTransfer (User,Freelancer,ToFreelancer,ToUser,AdminFee) = if ((i.caller.bytes != AdmindApp))
193132 then throw("Only Admin can do this")
194133 else if ((((ToUser + ToFreelancer) + AdminFee) != 100))
195134 then throw("Total of Percentages cannot be different from 100%")
196135 else {
197136 let FreeLancerPayment = (User + "_Payment")
198137 let FreelancerAddress = (User + "_Freelancer")
199138 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
200139 let amount = match getInteger(this, FreeLancerPayment) {
201140 case a: Int =>
202141 a
203142 case _ =>
204143 0
205144 }
206145 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
207146 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
208147 let PaymentAssetId = getStringValue(this, PaymentAsset)
209148 let dAppFrees = Address(dAppFees)
210149 let AddressUser = addressFromStringValue(User)
211150 let AssetUsed = if ((PaymentAssetId == "Waves"))
212151 then unit
213152 else fromBase58String(PaymentAssetId)
214153 if ((amount == 0))
215154 then throw("User's balance is 0 BUsdc cannot realize any payment")
216155 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)
217156 }
218157
219158

github/deemru/w8io/026f985 
38.81 ms