tx · DjR6GxTsN1sWxnpFzBg4ns7bZTzAzedXWgQdxAuRjTtG

3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK:  -0.01000000 Waves

2022.05.24 21:49 [2066150] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves

{ "type": 13, "id": "DjR6GxTsN1sWxnpFzBg4ns7bZTzAzedXWgQdxAuRjTtG", "fee": 1000000, "feeAssetId": null, "timestamp": 1653418157029, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "4MXg5DK3c9ZzpYbwrY9RZiS515Lhe2pduvQDQ8PPSac8sUYzJEsSRMGNz9tmU1QEvuX1m9wvLGBKZybDv1VAnBVw" ], "script": "base64:AAIFAAAAAAAAABcIAhIAEgUKAwgICBIDCgEBEgUKAwgIAQAAAAsAAAAABEJVc2QBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARVU0RUAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAEVVNEQwEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0JUQwEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0VUSAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0JOQgEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABFVTRE4BAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARIQVNIAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAES1VTRAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/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AAAABmFtb3VudAAAAAAAAAAnEAUAAAAJQXNzZXRVc2VkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAACWRBcHBGcmVlcwkAAGkAAAACCQAAaAAAAAIAAAAAAAAAAAUFAAAABmFtb3VudAAAAAAAAAAAZAUAAAAJQXNzZXRVc2VkBQAAAANuaWwFAAAACUFzc2V0VXNlZAAAAACHPmJY", "height": 2066150, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: F6xxpowR3N1B1kdumxuLJazgTXWggcUmoEQBfZbmpmhu Next: BDAQ6YPipKd5NqK7orBhz4A3rHAEB4nKY5eYTPyb1fRm Diff:
OldNewDifferences
103103 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
104104 let dAppFrees = Address(dAppFees)
105105 let AssetUsed = if ((PaymentAssetId == "Waves"))
106- then throw("Waves")
107- else throw(PaymentAssetId)
106+ then unit
107+ else fromBase58String(PaymentAssetId)
108108 if ((0 >= (((95 * amount) / 100) - (PayFreelancer * 100000000))))
109109 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000))))
110110 else if (if ((PaidtrxLast >= 12))
124124 let PaidtrxValue = if ((PaidtrxLast == 11))
125125 then 0
126126 else (PaidtrxLast + 1)
127- $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, FeePaid, fromBase58String(PaymentAssetId))], fromBase58String(PaymentAssetId))
127+ $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed)
128128 }
129129 }
130130
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 let USDT = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
77
88 let USDC = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
99
1010 let BTC = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1111
1212 let ETH = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1313
1414 let BNB = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1515
1616 let USDN = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1717
1818 let HASH = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1919
2020 let KUSD = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
2121
2222 let dAppFees = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo'
2323
2424 let AdmindApp = base58'3Mx3pn4yMcBccM59UrDGjbbAkVsRYBw38tB'
2525
2626 @Callable(i)
2727 func Reset () = [IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), 0)]
2828
2929
3030
3131 @Callable(i)
3232 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
3333 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
3434 let amount = match getInteger(this, FreeLancerPayment) {
3535 case a: Int =>
3636 a
3737 case _ =>
3838 0
3939 }
4040 if ((amount != 0))
4141 then throw("You have already deposited funds, deposits can only be done once")
4242 else {
4343 let pmt = if ((size(i.payments) == 1))
4444 then i.payments[0]
4545 else throw("Attached payment is required")
4646 if (if (if (if (if (if (if (if (if (if ((pmt.assetId != BUsd))
4747 then (pmt.assetId != USDT)
4848 else false)
4949 then (pmt.assetId != USDC)
5050 else false)
5151 then (pmt.assetId != BTC)
5252 else false)
5353 then (pmt.assetId != ETH)
5454 else false)
5555 then (pmt.assetId != BNB)
5656 else false)
5757 then (pmt.assetId != USDN)
5858 else false)
5959 then (pmt.assetId != HASH)
6060 else false)
6161 then (pmt.assetId != KUSD)
6262 else false)
6363 then isDefined(pmt.assetId)
6464 else false)
6565 then throw("Can only deposit accepted tokens")
6666 else if (if (if ((ScopeDesc == ""))
6767 then true
6868 else (Deliverables == ""))
6969 then true
7070 else (FreelancerAddress == ""))
7171 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
7272 else {
7373 let AssetUsed = if (isDefined(pmt.assetId))
7474 then toBase58String(value(pmt.assetId))
7575 else "Waves"
7676 [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)]
7777 }
7878 }
7979 }
8080
8181
8282
8383 @Callable(i)
8484 func PayFreelancer (PayFreelancer) = {
8585 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
8686 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
8787 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
8888 let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx")
8989 let amount = match getInteger(this, FreeLancerPayment) {
9090 case a: Int =>
9191 a
9292 case _ =>
9393 0
9494 }
9595 let PaidtrxLast = match getInteger(this, Paidtrx) {
9696 case a: Int =>
9797 a
9898 case _ =>
9999 0
100100 }
101101 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
102102 let PaymentAssetId = getStringValue(this, PaymentAsset)
103103 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
104104 let dAppFrees = Address(dAppFees)
105105 let AssetUsed = if ((PaymentAssetId == "Waves"))
106- then throw("Waves")
107- else throw(PaymentAssetId)
106+ then unit
107+ else fromBase58String(PaymentAssetId)
108108 if ((0 >= (((95 * amount) / 100) - (PayFreelancer * 100000000))))
109109 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000))))
110110 else if (if ((PaidtrxLast >= 12))
111111 then (amount > 0)
112112 else false)
113113 then throw("You have already done 12 payments, you cannot make more payments")
114114 else {
115115 let UserAccount = if ((PaidtrxLast == 11))
116116 then 0
117117 else (amount - (PayFreelancer * 100000000))
118118 let Payment2Freelance = if ((PaidtrxLast == 11))
119119 then ((95 * amount) / 100)
120120 else ((95 * PayFreelancer) * 1000000)
121121 let FeePaid = if ((PaidtrxLast == 11))
122122 then ((5 * amount) / 100)
123123 else ((5 * PayFreelancer) * 1000000)
124124 let PaidtrxValue = if ((PaidtrxLast == 11))
125125 then 0
126126 else (PaidtrxLast + 1)
127- $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, FeePaid, fromBase58String(PaymentAssetId))], fromBase58String(PaymentAssetId))
127+ $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), PaidtrxValue), ScriptTransfer(AddressFreeLancer, Payment2Freelance, AssetUsed), ScriptTransfer(dAppFrees, FeePaid, AssetUsed)], AssetUsed)
128128 }
129129 }
130130
131131
132132
133133 @Callable(i)
134134 func AdminTransfer (User,Freelancer,ToFreelancer) = if ((i.caller.bytes != AdmindApp))
135135 then throw("Only Admin can do this")
136136 else {
137137 let FreeLancerPayment = (User + "_Payment")
138138 let FreelancerAddress = (User + "_Freelancer")
139139 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
140140 let amount = match getInteger(this, FreeLancerPayment) {
141141 case a: Int =>
142142 a
143143 case _ =>
144144 0
145145 }
146146 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
147147 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
148148 let PaymentAssetId = getStringValue(this, PaymentAsset)
149149 let dAppFrees = Address(dAppFees)
150150 let AddressUser = addressFromStringValue(User)
151151 let AssetUsed = if ((PaymentAssetId == "Waves"))
152152 then unit
153153 else fromBase58String(PaymentAssetId)
154154 if ((amount == 0))
155155 then throw("User's balance is 0 BUsdc cannot realize any payment")
156156 else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * (95 * amount)) / 10000), AssetUsed), ScriptTransfer(AddressUser, (((100 - ToFreelancer) * (95 * amount)) / 10000), AssetUsed), ScriptTransfer(dAppFrees, ((5 * amount) / 100), AssetUsed)], AssetUsed)
157157 }
158158
159159

github/deemru/w8io/026f985 
57.05 ms