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+Cn1LoAKhVcZ1yAAoZ3uOzRcAHt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AAAAAAAAnEAUAAAAEQlVzZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACAAAAAAAAAAAFBQAAAAZhbW91bnQAAAAAAAAAAGQFAAAABEJVc2QFAAAAA25pbAUAAAAEQlVzZAAAAACUNGT7", "height": 2064552, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HwW2NWCQKXQyZQ5C7ULZVk4SBW1932oc9D6q8cxKLCAU Next: 4tfLFbsqNkyVAgsSk87tXWFZi2hHypWGuhycbsaEuHqy Diff:
Old | New | Differences | |
---|---|---|---|
28 | 28 | let pmt = if ((size(i.payments) == 1)) | |
29 | 29 | then i.payments[0] | |
30 | 30 | 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)) | |
32 | 32 | then (pmt.assetId != USDT) | |
33 | 33 | else false) | |
34 | 34 | then (pmt.assetId != USDC) | |
45 | 45 | else false) | |
46 | 46 | then (pmt.assetId != KUSD) | |
47 | 47 | 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 == "")) | |
49 | 52 | then true | |
50 | 53 | else (Deliverables == "")) | |
51 | 54 | then true | |
52 | 55 | else (FreelancerAddress == "")) | |
53 | 56 | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
54 | 57 | 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") | |
56 | 58 | } | |
57 | 59 | ||
58 | 60 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let BUsd = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
5 | 5 | ||
6 | 6 | let USDT = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
7 | 7 | ||
8 | 8 | let USDC = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
9 | 9 | ||
10 | 10 | let BTC = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
11 | 11 | ||
12 | 12 | let ETH = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
13 | 13 | ||
14 | 14 | let BNB = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
15 | 15 | ||
16 | 16 | let USDN = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
17 | 17 | ||
18 | 18 | let HASH = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
19 | 19 | ||
20 | 20 | let KUSD = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k' | |
21 | 21 | ||
22 | 22 | let dAppFees = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo' | |
23 | 23 | ||
24 | 24 | let AdmindApp = base58'3Mx3pn4yMcBccM59UrDGjbbAkVsRYBw38tB' | |
25 | 25 | ||
26 | 26 | @Callable(i) | |
27 | 27 | func DepositFunds (ScopeDesc,Deliverables,FreelancerAddress) = { | |
28 | 28 | let pmt = if ((size(i.payments) == 1)) | |
29 | 29 | then i.payments[0] | |
30 | 30 | 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)) | |
32 | 32 | then (pmt.assetId != USDT) | |
33 | 33 | else false) | |
34 | 34 | then (pmt.assetId != USDC) | |
35 | 35 | else false) | |
36 | 36 | then (pmt.assetId != BTC) | |
37 | 37 | else false) | |
38 | 38 | then (pmt.assetId != ETH) | |
39 | 39 | else false) | |
40 | 40 | then (pmt.assetId != BNB) | |
41 | 41 | else false) | |
42 | 42 | then (pmt.assetId != USDN) | |
43 | 43 | else false) | |
44 | 44 | then (pmt.assetId != HASH) | |
45 | 45 | else false) | |
46 | 46 | then (pmt.assetId != KUSD) | |
47 | 47 | 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 == "")) | |
49 | 52 | then true | |
50 | 53 | else (Deliverables == "")) | |
51 | 54 | then true | |
52 | 55 | else (FreelancerAddress == "")) | |
53 | 56 | then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty") | |
54 | 57 | 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") | |
56 | 58 | } | |
57 | 59 | ||
58 | 60 | ||
59 | 61 | ||
60 | 62 | @Callable(i) | |
61 | 63 | func PayFreelancer (PayFreelancer) = { | |
62 | 64 | let FreeLancerPayment = (toBase58String(i.caller.bytes) + "_Payment") | |
63 | 65 | let FreelancerAddress = (toBase58String(i.caller.bytes) + "_Freelancer") | |
64 | 66 | let Paidtrx = (toBase58String(i.caller.bytes) + "_Paidtrx") | |
65 | 67 | let amount = match getInteger(this, FreeLancerPayment) { | |
66 | 68 | case a: Int => | |
67 | 69 | a | |
68 | 70 | case _ => | |
69 | 71 | 0 | |
70 | 72 | } | |
71 | 73 | let PaidtrxValue = match getInteger(this, Paidtrx) { | |
72 | 74 | case a: Int => | |
73 | 75 | a | |
74 | 76 | case _ => | |
75 | 77 | 0 | |
76 | 78 | } | |
77 | 79 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
78 | 80 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
79 | 81 | let dAppFrees = Address(dAppFees) | |
80 | 82 | if ((0 >= (amount - PayFreelancer))) | |
81 | 83 | then throw(("You do not have enough funds to make payment, your available funds are: " + toString((amount / 100000000)))) | |
82 | 84 | else if ((PaidtrxValue > 12)) | |
83 | 85 | then throw("You have already done 12 payments, you cannot make more payments") | |
84 | 86 | else { | |
85 | 87 | let Payment2Freelance = if ((PaidtrxValue == 11)) | |
86 | 88 | then amount | |
87 | 89 | else (amount - PayFreelancer) | |
88 | 90 | $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) | |
89 | 91 | } | |
90 | 92 | } | |
91 | 93 | ||
92 | 94 | ||
93 | 95 | ||
94 | 96 | @Callable(i) | |
95 | 97 | func AdminTransfer (User,Freelancer,ToFreelancer) = if ((i.caller.bytes != AdmindApp)) | |
96 | 98 | then throw("Only Admin can do this") | |
97 | 99 | else { | |
98 | 100 | let FreeLancerPayment = (User + "_Payment") | |
99 | 101 | let FreelancerAddress = (User + "_Freelancer") | |
100 | 102 | let amount = match getInteger(this, FreeLancerPayment) { | |
101 | 103 | case a: Int => | |
102 | 104 | a | |
103 | 105 | case _ => | |
104 | 106 | 0 | |
105 | 107 | } | |
106 | 108 | let FreelancerAddressStr = getStringValue(this, FreelancerAddress) | |
107 | 109 | let AddressFreeLancer = addressFromStringValue(FreelancerAddressStr) | |
108 | 110 | let dAppFrees = Address(dAppFees) | |
109 | 111 | let AddressUser = addressFromStringValue(User) | |
110 | 112 | if ((amount == 0)) | |
111 | 113 | then throw("User's balance is 0 BUsdc cannot realize any payment") | |
112 | 114 | 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) | |
113 | 115 | } | |
114 | 116 | ||
115 | 117 |
github/deemru/w8io/026f985 94.00 ms ◑