tx · Gn7frxoYTVgijfn9n2MkD4HmnzA5R5exDpwvXttFE3sP

3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK:  -0.01000000 Waves

2022.05.23 19:07 [2064552] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves

{ "type": 13, "id": "Gn7frxoYTVgijfn9n2MkD4HmnzA5R5exDpwvXttFE3sP", "fee": 1000000, "feeAssetId": null, "timestamp": 1653322059143, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "41tE3334t2ScnfvDVUjAGK48yK2Kx5eqv9c8eg2Nqr18MgpFkHGNcHBFNVaBCRoUBFXZpjuHwaYosg53G6rwS19N" ], "script": "base64:AAIFAAAAAAAAABUIAhIFCgMICAgSAwoBARIFCgMICAEAAAALAAAAAARCVXNkAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAEVVNEVAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABFVTREMBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAANCVEMBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAANFVEgBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAANCTkIBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARVU0ROAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAESEFTSAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABEtVU0QBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAH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AAAAAAAAAnEAUAAAAEQlVzZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAZhbW91bnQAAAAAAAAAAGQFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAACUNGT7", "height": 2064552, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HwW2NWCQKXQyZQ5C7ULZVk4SBW1932oc9D6q8cxKLCAU Next: 4tfLFbsqNkyVAgsSk87tXWFZi2hHypWGuhycbsaEuHqy Diff:
OldNewDifferences
2828 let pmt = if ((size(i.payments) == 1))
2929 then i.payments[0]
3030 else throw("Attached payment is required")
31- if (if (if (if (if (if (if (if (if ((pmt.assetId != BUsd))
31+ if (if (if (if (if (if (if (if (if (if ((pmt.assetId != BUsd))
3232 then (pmt.assetId != USDT)
3333 else false)
3434 then (pmt.assetId != USDC)
4545 else false)
4646 then (pmt.assetId != KUSD)
4747 else false)
48- then if (if (if ((ScopeDesc == ""))
48+ then isDefined(pmt.assetId)
49+ else false)
50+ then throw("Can only deposit accepted tokens")
51+ else if (if (if ((ScopeDesc == ""))
4952 then true
5053 else (Deliverables == ""))
5154 then true
5255 else (FreelancerAddress == ""))
5356 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
5457 else [StringEntry((toBase58String(i.caller.bytes) + "_Scope"), ScopeDesc), StringEntry((toBase58String(i.caller.bytes) + "_Deliv"), Deliverables), StringEntry((toBase58String(i.caller.bytes) + "_Freelancer"), FreelancerAddress), IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), pmt.amount)]
55- else throw("Can only deposit accepted tokens")
5658 }
5759
5860
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 DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
2828 let pmt = if ((size(i.payments) == 1))
2929 then i.payments[0]
3030 else throw("Attached payment is required")
31- if (if (if (if (if (if (if (if (if ((pmt.assetId != BUsd))
31+ if (if (if (if (if (if (if (if (if (if ((pmt.assetId != BUsd))
3232 then (pmt.assetId != USDT)
3333 else false)
3434 then (pmt.assetId != USDC)
3535 else false)
3636 then (pmt.assetId != BTC)
3737 else false)
3838 then (pmt.assetId != ETH)
3939 else false)
4040 then (pmt.assetId != BNB)
4141 else false)
4242 then (pmt.assetId != USDN)
4343 else false)
4444 then (pmt.assetId != HASH)
4545 else false)
4646 then (pmt.assetId != KUSD)
4747 else false)
48- then if (if (if ((ScopeDesc == ""))
48+ then isDefined(pmt.assetId)
49+ else false)
50+ then throw("Can only deposit accepted tokens")
51+ else if (if (if ((ScopeDesc == ""))
4952 then true
5053 else (Deliverables == ""))
5154 then true
5255 else (FreelancerAddress == ""))
5356 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
5457 else [StringEntry((toBase58String(i.caller.bytes) + "_Scope"), ScopeDesc), StringEntry((toBase58String(i.caller.bytes) + "_Deliv"), Deliverables), StringEntry((toBase58String(i.caller.bytes) + "_Freelancer"), FreelancerAddress), IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), pmt.amount)]
55- else throw("Can only deposit accepted tokens")
5658 }
5759
5860
5961
6062 @Callable(i)
6163 func PayFreelancer (PayFreelancer) = {
6264 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
6365 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
6466 let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx")
6567 let amount = match getInteger(this, FreeLancerPayment) {
6668 case a: Int =>
6769 a
6870 case _ =>
6971 0
7072 }
7173 let PaidtrxValue = match getInteger(this, Paidtrx) {
7274 case a: Int =>
7375 a
7476 case _ =>
7577 0
7678 }
7779 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
7880 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
7981 let dAppFrees = Address(dAppFees)
8082 if ((0 >= (amount - PayFreelancer)))
8183 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000))))
8284 else if ((PaidtrxValue > 12))
8385 then throw("You have already done 12 payments, you cannot make more payments")
8486 else {
8587 let Payment2Freelance = if ((PaidtrxValue == 11))
8688 then amount
8789 else (amount - PayFreelancer)
8890 $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), Payment2Freelance), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), (PaidtrxValue + 1)), ScriptTransfer(AddressFreeLancer, ((95 * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
8991 }
9092 }
9193
9294
9395
9496 @Callable(i)
9597 func AdminTransfer (User,Freelancer,ToFreelancer) = if ((i.caller.bytes != AdmindApp))
9698 then throw("Only Admin can do this")
9799 else {
98100 let FreeLancerPayment = (User + "_Payment")
99101 let FreelancerAddress = (User + "_Freelancer")
100102 let amount = match getInteger(this, FreeLancerPayment) {
101103 case a: Int =>
102104 a
103105 case _ =>
104106 0
105107 }
106108 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
107109 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
108110 let dAppFrees = Address(dAppFees)
109111 let AddressUser = addressFromStringValue(User)
110112 if ((amount == 0))
111113 then throw("User's balance is 0 BUsdc cannot realize any payment")
112114 else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * (95 * amount)) / 10000), BUsd), ScriptTransfer(AddressUser, (((100 - ToFreelancer) * (95 * amount)) / 10000), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
113115 }
114116
115117

github/deemru/w8io/026f985 
94.00 ms