tx · 32ShshiQwYL2F5Q8XLqoZoB618835GR8a5dRHrf4LR2u

3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK:  -0.01000000 Waves

2022.05.22 18:15 [2063048] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves

{ "type": 13, "id": "32ShshiQwYL2F5Q8XLqoZoB618835GR8a5dRHrf4LR2u", "fee": 1000000, "feeAssetId": null, "timestamp": 1653232544696, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "K3ZPEcHydjjeJk1JogEEj2hRKrL1Rx9m5LNGpm8nvNfuGP5frvMJrvmH575RGmLDSagfrt34UwfNcxrbHpjVshE" ], "script": "base64:AAIFAAAAAAAAABMIAhIFCgMICAgSABIGCgQICAEBAAAAAwAAAAAEQlVzZAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAACGRBcHBGZWVzAQAAABoBVNUQ7h1eLZZYGV9rZWfEtki60lL+DdITGgAAAAAJQWRtaW5kQXBwAQAAABoBVFk30JKJxN2GegCDo4iqgw94whBiH+SxRAAAAAMAAAABaQEAAAAMRGVwb3NpdEZ1bmRzAAAAAwAAAAlTY29wZURlc2MAAAAMRGVsaXZlcmFibGVzAAAAEUZyZWVsYW5jZXJBZGRyZXNzBAAAAANwbXQDCQAAAAAAAAIJAAGQAAAAAQgFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAEJAAGRAAAAAggFAAAAAWkAAAAIcGF5bWVudHMAAAAAAAAAAAAJAAACAAAAAQIAAAAcQXR0YWNoZWQgcGF5bWVudCBpcyByZXF1aXJlZAMJAABmAAAAAgkAAGgAAAACAAAAAAAAAAAyAAAAAAAF9eEACQAD8AAAAAIIBQAAAAFpAAAABmNhbGxlcgUAAAAEQlVzZAkAAAIAA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6ZSBhbnkgcGF5bWVudAkABRQAAAACCQAETAAAAAIJAQAAAAxJbnRlZ2VyRW50cnkAAAACCQABLAAAAAIFAAAABFVzZXICAAAACF9QYXltZW50AAAAAAAAAAAACQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAEUFkZHJlc3NGcmVlTGFuY2VyCQAAaQAAAAIJAABoAAAAAgUAAAAMVG9GcmVlbGFuY2VyCQAAaAAAAAIAAAAAAAAAAF8FAAAABmFtb3VudAAAAAAAAAAnEAUAAAAEQlVzZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAtBZGRyZXNzVXNlcgkAAGkAAAACCQAAaAAAAAIFAAAABlRvVXNlcgkAAGgAAAACAAAAAAAAAABfBQAAAAZhbW91bnQAAAAAAAAAJxAFAAAABEJVc2QJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAJZEFwcEZyZWVzCQAAaQAAAAIJAABoAAAAAgAAAAAAAAAABQUAAAAGYW1vdW50AAAAAAAAAABkBQAAAARCVXNkBQAAAANuaWwFAAAABEJVc2QAAAAAdCYjFQ==", "height": 2063048, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8UTKXV7P45C2gj3jNy4wHG4hgXxfsgRvN5mJ2eqJmrEC Next: E6DYAv1HPQEWyLdE85Z16MFUF5M1QoaPt7xTgMVvysNY Diff:
OldNewDifferences
55
66 let dAppFees = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo'
77
8-let AdmindApp = base58'3Mt4pmCGGRuWGuNy3pyyRij45rySapd44Mw'
8+let AdmindApp = base58'3Mx3pn4yMcBccM59UrDGjbbAkVsRYBw38tB'
99
1010 @Callable(i)
1111 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
3939 }
4040 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
4141 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
42+ let dAppFrees = Address(dAppFees)
4243 if ((amount == 0))
4344 then throw("Your balance is 0 BUsdc cannot realize any payment")
44- else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, amount, BUsd)], BUsd)
45+ else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
4546 }
4647
4748
6465 let AddressUser = addressFromStringValue(User)
6566 if ((amount == 0))
6667 then throw("User's balance is 0 BUsdc cannot realize any payment")
67- else {
68- let UserReturned = if ((0 > (ToUser - 5)))
69- then 0
70- else (ToUser - 5)
71- $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * amount) / 100), BUsd), ScriptTransfer(AddressUser, ((UserReturned * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
72- }
68+ else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * (95 * amount)) / 10000), BUsd), ScriptTransfer(AddressUser, ((ToUser * (95 * amount)) / 10000), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
7369 }
7470
7571
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 let dAppFees = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo'
77
8-let AdmindApp = base58'3Mt4pmCGGRuWGuNy3pyyRij45rySapd44Mw'
8+let AdmindApp = base58'3Mx3pn4yMcBccM59UrDGjbbAkVsRYBw38tB'
99
1010 @Callable(i)
1111 func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = {
1212 let pmt = if ((size(i.payments) == 1))
1313 then i.payments[0]
1414 else throw("Attached payment is required")
1515 if (((50 * 100000000) > assetBalance(i.caller, BUsd)))
1616 then throw("You must have 50 BUsd at least to deposit")
1717 else if (((50 * 100000000) > pmt.amount))
1818 then throw("Cannot deposit less than 50 Busd")
1919 else if (if (if ((ScopeDesc == ""))
2020 then true
2121 else (Deliverables == ""))
2222 then true
2323 else (FreelancerAddress == ""))
2424 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
2525 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)]
2626 }
2727
2828
2929
3030 @Callable(i)
3131 func PayFreelancer () = {
3232 let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment")
3333 let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer")
3434 let amount = match getInteger(this, FreeLancerPayment) {
3535 case a: Int =>
3636 a
3737 case _ =>
3838 0
3939 }
4040 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
4141 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
42+ let dAppFrees = Address(dAppFees)
4243 if ((amount == 0))
4344 then throw("Your balance is 0 BUsdc cannot realize any payment")
44- else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, amount, BUsd)], BUsd)
45+ else $Tuple2([IntegerEntry((toBase58String(i.caller.bytes) + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((95 * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
4546 }
4647
4748
4849
4950 @Callable(i)
5051 func AdminTransfer (User,Freelancer,ToUser,ToFreelancer) = if ((i.caller.bytes != AdmindApp))
5152 then throw("Only Admin can do this")
5253 else {
5354 let FreeLancerPayment = (User + "_Payment")
5455 let FreelancerAddress = (User + "_Freelancer")
5556 let amount = match getInteger(this, FreeLancerPayment) {
5657 case a: Int =>
5758 a
5859 case _ =>
5960 0
6061 }
6162 let FreelancerAddressStr = getStringValue(this, FreelancerAddress)
6263 let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr)
6364 let dAppFrees = Address(dAppFees)
6465 let AddressUser = addressFromStringValue(User)
6566 if ((amount == 0))
6667 then throw("User's balance is 0 BUsdc cannot realize any payment")
67- else {
68- let UserReturned = if ((0 > (ToUser - 5)))
69- then 0
70- else (ToUser - 5)
71- $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * amount) / 100), BUsd), ScriptTransfer(AddressUser, ((UserReturned * amount) / 100), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
72- }
68+ else $Tuple2([IntegerEntry((User + "_Payment"), 0), ScriptTransfer(AddressFreeLancer, ((ToFreelancer * (95 * amount)) / 10000), BUsd), ScriptTransfer(AddressUser, ((ToUser * (95 * amount)) / 10000), BUsd), ScriptTransfer(dAppFrees, ((5 * amount) / 100), BUsd)], BUsd)
7369 }
7470
7571

github/deemru/w8io/169f3d6 
62.62 ms