tx · 6DNnaqieHPLeir7g1ceYW4jaDNxATmyNbHe8rs6tmojr

3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK:  -0.01000000 Waves

2022.05.24 00:44 [2064892] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves

{ "type": 13, "id": "6DNnaqieHPLeir7g1ceYW4jaDNxATmyNbHe8rs6tmojr", "fee": 1000000, "feeAssetId": null, "timestamp": 1653342359845, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "5mmArFDYuQN5x2LBfdJHGhMZVvCqTr3GvinAyKXfNuH2DqFNWfuv8UgHHYvgQLpMZrRtz5ozUVfrtx2huaeD1abD" ], "script": "base64:AAIFAAAAAAAAABcIAhIAEgUKAwgICBIDCgEBEgUKAwgIAQAAAAsAAAAABEJVc2QBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARVU0RUAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAEVVNEQwEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0JUQwEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0VUSAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAAA0JOQgEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABFVTRE4BAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARIQVNIAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAES1VTRAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CA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AAAAAAAF8FAAAABmFtb3VudAAAAAAAAAAnEAkAAZsAAAABBQAAAA5QYXltZW50QXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAtBZGRyZXNzVXNlcgkAAGkAAAACCQAAaAAAAAIJAABlAAAAAgAAAAAAAAAAZAUAAAAMVG9GcmVlbGFuY2VyCQAAaAAAAAIAAAAAAAAAAF8FAAAABmFtb3VudAAAAAAAAAAnEAkAAZsAAAABBQAAAA5QYXltZW50QXNzZXRJZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAZhbW91bnQAAAAAAAAAAGQJAAGbAAAAAQUAAAAOUGF5bWVudEFzc2V0SWQFAAAAA25pbAkAAZsAAAABBQAAAA5QYXltZW50QXNzZXRJZAAAAAAeOi3h", "height": 2064892, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: FxeaoQ1Z4iBNpqrb9MvbitGBnSeKkcTHKGEYAVhtDCj5 Next: ExFcLMyDTxBZHKathyygwGih6WKohBVeCmrQGHysueAx Diff:
OldNewDifferences
102102 else if ((PaidtrxValue >= 12))
103103 then throw("You have already done 12 payments, you cannot make more payments")
104104 else {
105- let Payment2Freelance = if ((PaidtrxValue == 11))
106- then ((95 * amount) / 100)
107- else (((95 * amount) / 100) - (PayFreelancer * 100000000))
105+ let Payment2Freelance = ((95 * PayFreelancer) * 1000000)
108106 let UserAccount = if ((PaidtrxValue == 11))
109107 then 0
110- else (((95 * amount) / 100) - (PayFreelancer * 100000000))
111- $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), (PaidtrxValue + 1)), ScriptTransfer(AddressFreeLancer, (PayFreelancer * 100000000), fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, ((5 * amount) / 100), fromBase58String(PaymentAssetId))], BUsd)
108+ else (amount - (PayFreelancer * 100000000))
109+ $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), (PaidtrxValue + 1)), ScriptTransfer(AddressFreeLancer, Payment2Freelance, fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, ((5 * PayFreelancer) * 1000000), fromBase58String(PaymentAssetId))], BUsd)
112110 }
113111 }
114112
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)]
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 [StringEntry((toBase58String(i.caller.bytes) + "_Scope"), ScopeDesc), StringEntry((toBase58String(i.caller.bytes) + "_Deliv"), Deliverables), StringEntry((toBase58String(i.caller.bytes) + "_Asset"), toBase58String(value(pmt.assetId))), StringEntry((toBase58String(i.caller.bytes) + "_Freelancer"), FreelancerAddress), IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), pmt.amount)]
7373 }
7474 }
7575
7676
7777
7878 @Callable(i)
7979 func PayFreelancer (PayFreelancer) = {
8080 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
8181 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
8282 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
8383 let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx")
8484 let amount = match getInteger(this, FreeLancerPayment) {
8585 case a: Int =>
8686 a
8787 case _ =>
8888 0
8989 }
9090 let PaidtrxValue = match getInteger(this, Paidtrx) {
9191 case a: Int =>
9292 a
9393 case _ =>
9494 0
9595 }
9696 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
9797 let PaymentAssetId = getStringValue(this, PaymentAsset)
9898 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
9999 let dAppFrees = Address(dAppFees)
100100 if ((0 >= (((95 * amount) / 100) - (PayFreelancer * 100000000))))
101101 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000))))
102102 else if ((PaidtrxValue >= 12))
103103 then throw("You have already done 12 payments, you cannot make more payments")
104104 else {
105- let Payment2Freelance = if ((PaidtrxValue == 11))
106- then ((95 * amount) / 100)
107- else (((95 * amount) / 100) - (PayFreelancer * 100000000))
105+ let Payment2Freelance = ((95 * PayFreelancer) * 1000000)
108106 let UserAccount = if ((PaidtrxValue == 11))
109107 then 0
110- else (((95 * amount) / 100) - (PayFreelancer * 100000000))
111- $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), (PaidtrxValue + 1)), ScriptTransfer(AddressFreeLancer, (PayFreelancer * 100000000), fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, ((5 * amount) / 100), fromBase58String(PaymentAssetId))], BUsd)
108+ else (amount - (PayFreelancer * 100000000))
109+ $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), UserAccount), IntegerEntry((toBase58String(i.caller.bytes) + "_Paidtrx"), (PaidtrxValue + 1)), ScriptTransfer(AddressFreeLancer, Payment2Freelance, fromBase58String(PaymentAssetId)), ScriptTransfer(dAppFrees, ((5 * PayFreelancer) * 1000000), fromBase58String(PaymentAssetId))], BUsd)
112110 }
113111 }
114112
115113
116114
117115 @Callable(i)
118116 func AdminTransfer (User,Freelancer,ToFreelancer) = if ((i.caller.bytes != AdmindApp))
119117 then throw("Only Admin can do this")
120118 else {
121119 let FreeLancerPayment = (User + "_Payment")
122120 let FreelancerAddress = (User + "_Freelancer")
123121 let PaymentAsset = (toBase58String(i.caller.bytes) + "_Asset")
124122 let amount = match getInteger(this, FreeLancerPayment) {
125123 case a: Int =>
126124 a
127125 case _ =>
128126 0
129127 }
130128 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
131129 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
132130 let PaymentAssetId = getStringValue(this, PaymentAsset)
133131 let dAppFrees = Address(dAppFees)
134132 let AddressUser = addressFromStringValue(User)
135133 if ((amount == 0))
136134 then throw("User's balance is 0 BUsdc cannot realize any payment")
137135 else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * (95 * amount)) / 10000), toBytes(PaymentAssetId)), ScriptTransfer(AddressUser, (((100 - ToFreelancer) * (95 * amount)) / 10000), toBytes(PaymentAssetId)), ScriptTransfer(dAppFrees, ((5 * amount) / 100), toBytes(PaymentAssetId))], toBytes(PaymentAssetId))
138136 }
139137
140138

github/deemru/w8io/169f3d6 
39.53 ms