tx · BDAQ6YPipKd5NqK7orBhz4A3rHAEB4nKY5eYTPyb1fRm

3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK:  -0.01000000 Waves

2022.05.25 18:03 [2067355] smart account 3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK > SELF 0.00000000 Waves

{ "type": 13, "id": "BDAQ6YPipKd5NqK7orBhz4A3rHAEB4nKY5eYTPyb1fRm", "fee": 1000000, "feeAssetId": null, "timestamp": 1653491018745, "version": 2, "chainId": 84, "sender": "3NCLRHPm5VYMStKzvP2kkc5mxGSH9wtWAtK", "senderPublicKey": "2bV4VobJC5a6L6e7or9PFXQhQ1KtkZW1UYzjAvMzs6A8", "proofs": [ "4EyGCjdXmyHA7CspchvSJBcLRptrEEkN9MrzMXhQhT77eFLDPfqTHdqTUWrkpbzXPxcMTRKGFRXBKm3nHNdzuvWS" ], "script": "base64:AAIFAAAAAAAAABkIAhIAEgUKAwgICBIDCgEBEgcKBQgIAQEBAAAACwAAAAAEQlVzZAEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABFVTRFQBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARVU0RDAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAADQlRDAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAADRVRIAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAADQk5CAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js0XAB7Z3/CJRHkIAQAAAAAEVVNETgEAAAAgl0pBq34KfUugAqFVxnXIAChne47NFwAe2d/wiUR5CAEAAAAABEhBU0gBAAAAIJdKQat+Cn1LoAKhVcZ1yAAoZ3uOzRcAHtnf8IlEeQgBAAAAAARLVVNEAQAAACCXSkGrfgp9S6ACoVXGdcgAKGd7js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AAAAAAAAAZAUAAAAJQXNzZXRVc2VkCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMFAAAAC0FkZHJlc3NVc2VyCQAAaQAAAAIJAABoAAAAAgUAAAAGVG9Vc2VyBQAAAAZhbW91bnQAAAAAAAAAAGQFAAAACUFzc2V0VXNlZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAlkQXBwRnJlZXMJAABpAAAAAgkAAGgAAAACBQAAAAhBZG1pbkZlZQUAAAAGYW1vdW50AAAAAAAAAABkBQAAAAlBc3NldFVzZWQFAAAAA25pbAUAAAAJQXNzZXRVc2VkAAAAAFbMPX8=", "height": 2067355, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DjR6GxTsN1sWxnpFzBg4ns7bZTzAzedXWgQdxAuRjTtG Next: 6xL2s9q3MjmTvErTFRHvR3sx3bCi13BtoXgGu7Y8fxZW Diff:
OldNewDifferences
140140
141141
142142 @Callable(l)
143-func AdminTransfer (H,I,J) = if ((l.caller.bytes != k))
143+func AdminTransfer (H,I,J,K,L) = if ((l.caller.bytes != k))
144144 then throw("Only Admin can do this")
145- else {
146- let p = (H + "_Payment")
147- let o = (H + "_Freelancer")
148- let w = (toBase58String(l.caller.bytes) + "_Asset")
149- let q = {
150- let r = getInteger(this, p)
151- if ($isInstanceOf(r, "Int"))
152- then {
153- let s = r
154- s
155- }
156- else 0
145+ else if ((((K + J) + L) != 100))
146+ then throw("Total of Percentages cannot be different from 100%")
147+ else {
148+ let p = (H + "_Payment")
149+ let o = (H + "_Freelancer")
150+ let w = (toBase58String(l.caller.bytes) + "_Asset")
151+ let q = {
152+ let r = getInteger(this, p)
153+ if ($isInstanceOf(r, "Int"))
154+ then {
155+ let s = r
156+ s
157+ }
158+ else 0
159+ }
160+ let z = getStringValue(this, o)
161+ let B = addressFromStringValue(z)
162+ let A = getStringValue(this, w)
163+ let C = Address(j)
164+ let M = addressFromStringValue(H)
165+ let u = if ((A == "Waves"))
166+ then unit
167+ else fromBase58String(A)
168+ if ((q == 0))
169+ then throw("User's balance is 0 BUsdc cannot realize any payment")
170+ else $Tuple2([IntegerEntry((H + "_Payment"), 0), ScriptTransfer(B, ((J * q) / 100), u), ScriptTransfer(M, ((K * q) / 100), u), ScriptTransfer(C, ((L * q) / 100), u)], u)
157171 }
158- let z = getStringValue(this, o)
159- let B = addressFromStringValue(z)
160- let A = getStringValue(this, w)
161- let C = Address(j)
162- let K = addressFromStringValue(H)
163- let u = if ((A == "Waves"))
164- then unit
165- else fromBase58String(A)
166- if ((q == 0))
167- then throw("User's balance is 0 BUsdc cannot realize any payment")
168- else $Tuple2([IntegerEntry((H + "_Payment"), 0), ScriptTransfer(B, ((J * (95 * q)) / 10000), u), ScriptTransfer(K, (((100 - J) * (95 * q)) / 10000), u), ScriptTransfer(C, ((5 * q) / 100), u)], u)
169- }
170172
171173
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let a = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
55
66 let b = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
77
88 let c = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
99
1010 let d = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1111
1212 let e = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1313
1414 let f = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1515
1616 let g = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1717
1818 let h = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
1919
2020 let i = base58'BBaEeEmuA6qPNowGcB8BXozC2PmAAG48G5zzSWw8qt2k'
2121
2222 let j = base58'3N9Lfz79kZAEUupwESSboYFyygo1nQguVXo'
2323
2424 let k = base58'3Mx3pn4yMcBccM59UrDGjbbAkVsRYBw38tB'
2525
2626 @Callable(l)
2727 func Reset () = [IntegerEntry((toBase58String(l.caller.bytes) + "_Payment"), 0), IntegerEntry((toBase58String(l.caller.bytes) + "_Paidtrx"), 0)]
2828
2929
3030
3131 @Callable(l)
3232 func DepositFunds (m,n,o) = {
3333 let p = (toBase58String(l.caller.bytes) + "_Payment")
3434 let q = {
3535 let r = getInteger(this, p)
3636 if ($isInstanceOf(r, "Int"))
3737 then {
3838 let s = r
3939 s
4040 }
4141 else 0
4242 }
4343 if ((q != 0))
4444 then throw("You have already deposited funds, deposits can only be done once")
4545 else {
4646 let t = if ((size(l.payments) == 1))
4747 then l.payments[0]
4848 else throw("Attached payment is required")
4949 if (if (if (if (if (if (if (if (if (if ((t.assetId != a))
5050 then (t.assetId != b)
5151 else false)
5252 then (t.assetId != c)
5353 else false)
5454 then (t.assetId != d)
5555 else false)
5656 then (t.assetId != e)
5757 else false)
5858 then (t.assetId != f)
5959 else false)
6060 then (t.assetId != g)
6161 else false)
6262 then (t.assetId != h)
6363 else false)
6464 then (t.assetId != i)
6565 else false)
6666 then isDefined(t.assetId)
6767 else false)
6868 then throw("Can only deposit accepted tokens")
6969 else if (if (if ((m == ""))
7070 then true
7171 else (n == ""))
7272 then true
7373 else (o == ""))
7474 then throw("Job Scope, Deliverables desc and Freelancer Wallet Address cannot be empty")
7575 else {
7676 let u = if (isDefined(t.assetId))
7777 then toBase58String(value(t.assetId))
7878 else "Waves"
7979 [StringEntry((toBase58String(l.caller.bytes) + "_Scope"), m), StringEntry((toBase58String(l.caller.bytes) + "_Deliv"), n), StringEntry((toBase58String(l.caller.bytes) + "_Asset"), u), StringEntry((toBase58String(l.caller.bytes) + "_Freelancer"), o), IntegerEntry((toBase58String(l.caller.bytes) + "_Payment"), t.amount)]
8080 }
8181 }
8282 }
8383
8484
8585
8686 @Callable(l)
8787 func PayFreelancer (v) = {
8888 let p = (toBase58String(l.caller.bytes) + "_Payment")
8989 let o = (toBase58String(l.caller.bytes) + "_Freelancer")
9090 let w = (toBase58String(l.caller.bytes) + "_Asset")
9191 let x = (toBase58String(l.caller.bytes) + "_Paidtrx")
9292 let q = {
9393 let r = getInteger(this, p)
9494 if ($isInstanceOf(r, "Int"))
9595 then {
9696 let s = r
9797 s
9898 }
9999 else 0
100100 }
101101 let y = {
102102 let r = getInteger(this, x)
103103 if ($isInstanceOf(r, "Int"))
104104 then {
105105 let s = r
106106 s
107107 }
108108 else 0
109109 }
110110 let z = getStringValue(this, o)
111111 let A = getStringValue(this, w)
112112 let B = addressFromStringValue(z)
113113 let C = Address(j)
114114 let u = if ((A == "Waves"))
115115 then unit
116116 else fromBase58String(A)
117117 if ((0 >= (((95 * q) / 100) - (v * 100000000))))
118118 then throw(("You do not have enough funds to make payment, your available funds are: " + toString((q / 100000000))))
119119 else if (if ((y >= 12))
120120 then (q > 0)
121121 else false)
122122 then throw("You have already done 12 payments, you cannot make more payments")
123123 else {
124124 let D = if ((y == 11))
125125 then 0
126126 else (q - (v * 100000000))
127127 let E = if ((y == 11))
128128 then ((95 * q) / 100)
129129 else ((95 * v) * 1000000)
130130 let F = if ((y == 11))
131131 then ((5 * q) / 100)
132132 else ((5 * v) * 1000000)
133133 let G = if ((y == 11))
134134 then 0
135135 else (y + 1)
136136 $Tuple2([IntegerEntry((toBase58String(l.caller.bytes) + "_Payment"), D), IntegerEntry((toBase58String(l.caller.bytes) + "_Paidtrx"), G), ScriptTransfer(B, E, u), ScriptTransfer(C, F, u)], u)
137137 }
138138 }
139139
140140
141141
142142 @Callable(l)
143-func AdminTransfer (H,I,J) = if ((l.caller.bytes != k))
143+func AdminTransfer (H,I,J,K,L) = if ((l.caller.bytes != k))
144144 then throw("Only Admin can do this")
145- else {
146- let p = (H + "_Payment")
147- let o = (H + "_Freelancer")
148- let w = (toBase58String(l.caller.bytes) + "_Asset")
149- let q = {
150- let r = getInteger(this, p)
151- if ($isInstanceOf(r, "Int"))
152- then {
153- let s = r
154- s
155- }
156- else 0
145+ else if ((((K + J) + L) != 100))
146+ then throw("Total of Percentages cannot be different from 100%")
147+ else {
148+ let p = (H + "_Payment")
149+ let o = (H + "_Freelancer")
150+ let w = (toBase58String(l.caller.bytes) + "_Asset")
151+ let q = {
152+ let r = getInteger(this, p)
153+ if ($isInstanceOf(r, "Int"))
154+ then {
155+ let s = r
156+ s
157+ }
158+ else 0
159+ }
160+ let z = getStringValue(this, o)
161+ let B = addressFromStringValue(z)
162+ let A = getStringValue(this, w)
163+ let C = Address(j)
164+ let M = addressFromStringValue(H)
165+ let u = if ((A == "Waves"))
166+ then unit
167+ else fromBase58String(A)
168+ if ((q == 0))
169+ then throw("User's balance is 0 BUsdc cannot realize any payment")
170+ else $Tuple2([IntegerEntry((H + "_Payment"), 0), ScriptTransfer(B, ((J * q) / 100), u), ScriptTransfer(M, ((K * q) / 100), u), ScriptTransfer(C, ((L * q) / 100), u)], u)
157171 }
158- let z = getStringValue(this, o)
159- let B = addressFromStringValue(z)
160- let A = getStringValue(this, w)
161- let C = Address(j)
162- let K = addressFromStringValue(H)
163- let u = if ((A == "Waves"))
164- then unit
165- else fromBase58String(A)
166- if ((q == 0))
167- then throw("User's balance is 0 BUsdc cannot realize any payment")
168- else $Tuple2([IntegerEntry((H + "_Payment"), 0), ScriptTransfer(B, ((J * (95 * q)) / 10000), u), ScriptTransfer(K, (((100 - J) * (95 * q)) / 10000), u), ScriptTransfer(C, ((5 * q) / 100), u)], u)
169- }
170172
171173

github/deemru/w8io/026f985 
29.61 ms