tx · FRQoNFT4ZazKBrfqNZEoa8zF8UVVrAPZ2C6JMwa1oGif

3N4vPEuMkXveuFYFohFsZaPMdbbiP24T1F7:  -0.01400000 Waves

2023.09.06 18:08 [2743675] smart account 3N4vPEuMkXveuFYFohFsZaPMdbbiP24T1F7 > SELF 0.00000000 Waves

{ "type": 13, "id": "FRQoNFT4ZazKBrfqNZEoa8zF8UVVrAPZ2C6JMwa1oGif", "fee": 1400000, "feeAssetId": null, "timestamp": 1694012873824, "version": 2, "chainId": 84, "sender": "3N4vPEuMkXveuFYFohFsZaPMdbbiP24T1F7", "senderPublicKey": "2paZxKSEp48rdM6xb5j15ZN3hHbBLxSQmsuG1HnK5sPp", "proofs": [ "sF8PgyYJbxjy7nQ6egjgGV3U29c4jb2z7TPw2wf6k4cGtzjm61enoLJR9dz1BV9CKaodmbjsnNCaqzBZHoVWFjC" ], "script": "base64:AAIFAAAAAAAAACAIAhIHCgUIAQgYARIDCgEBEgQKAgEBEgMKAQQSAwoBAQAAAA4AAAAAEGN1cnJlbnRMb2NrSWRLZXkCAAAADWN1cnJlbnRMb2NrSWQAAAAAEGFkbWluQ29udHJhY3RLZXkCAAAADWFkbWluQ29udHJhY3QAAAAAE3RyZWFzdXJ5Q29udHJhY3RLZXkCAAAAEHRyZWFzdXJ5Q29udHJhY3QAAAAADGlzRnJlZXplZEtleQIAAAAJaXNGcmVlemVkAAAAABBpc0NvbnN0cnVjdGVkS2V5AgAAAA1pc0NvbnN0cnVjdGVkAAAAAAx2ZXJpZmllcnNLZXkCAAAACXZlcmlmaWVycwAAAAAQdmVyaWZpZXJzRGF0YUtleQIAAAANdmVyaWZpZXJzRGF0YQAAAAARdW5sb2NrRmVlQmFzaXNLZXkCAAAADnVubG9ja0ZlZUJhc2lzAAAAAANTRVACAAAAAl9fAAAAAAZNVUxUMTAAAAAAAlQL5AABAAAACWFzUGF5bWVudAAAAAEAAAABdgQAAAAHJG1hdGNoMAUAAAABdgMJAAABAAAAAgUAAAAHJG1hdGN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AGQAAAACBQAAABR2YWxpZGF0ZWRQcm9vZnNDb3VudAUAAAAKaXNWZXJpZmllZAkAAGQAAAACBQAAABJjdXJyZW50UHJvb2ZzSW5kZXgAAAAAAAAAAAEEAAAADnZhbGlkYXRpb25EYXRhCgAAAAACJGwFAAAACXZlcmlmaWVycwoAAAAAAiRzCQABkAAAAAEFAAAAAiRsCgAAAAAFJGFjYzAJAAUUAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAoBAAAABSRmMF8xAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkBAAAAA3N1bQAAAAIFAAAAAiRhCQABkQAAAAIFAAAAAiRsBQAAAAIkaQoBAAAABSRmMF8yAAAAAgAAAAIkYQAAAAIkaQMJAABnAAAAAgUAAAACJGkFAAAAAiRzBQAAAAIkYQkAAAIAAAABAgAAABNMaXN0IHNpemUgZXhjZWVkcyA4CQEAAAAFJGYwXzIAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACCQEAAAAFJGYwXzEAAAACBQAAAAUkYWNjMAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAgAAAAAAAAAAAwAAAAAAAAAABAAAAAAAAAAABQAAAAAAAAAABgAAAAAAAAAABwAAAAAAAAAACAkAAGcAAAACCAUAAAAOdmFsaWRhdGlvbkRhdGEAAAACXzEFAAAAEXZlcmlmaWVyc1JlcXVpcmVkCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleZdnd84=", "height": 2743675, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5UZpAdzRdnE8NNLnMoucXr3ArD9P112wskTZLCiyabpk Next: 9b5exMFNRUtihgs25cPNsewaJ4BqYGftWnieqVL427qU Diff:
OldNewDifferences
124124 else fromBase58String(storedAssetId)
125125 let amountToTreasury = treasuryAmount(amount)
126126 let amountToUser = (amount - amountToTreasury)
127+ let treasuryContract = getStringValue(treasuryContractKey)
127128 let transactionResult = [StringEntry(key, newData), ScriptTransfer(i.caller, amountToUser, assetIdToTransfer)]
128129 if ((amountToTreasury > 0))
129- then ScriptTransfer(i.caller, amountToTreasury, assetIdToTransfer) :: transactionResult
130+ then ScriptTransfer(Address(fromBase58String(treasuryContract)), amountToTreasury, assetIdToTransfer) :: transactionResult
130131 else transactionResult
131132 }
132133 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let currentLockIdKey = "currentLockId"
55
66 let adminContractKey = "adminContract"
77
88 let treasuryContractKey = "treasuryContract"
99
1010 let isFreezedKey = "isFreezed"
1111
1212 let isConstructedKey = "isConstructed"
1313
1414 let verifiersKey = "verifiers"
1515
1616 let verifiersDataKey = "verifiersData"
1717
1818 let unlockFeeBasisKey = "unlockFeeBasis"
1919
2020 let SEP = "__"
2121
2222 let MULT10 = 10000000000
2323
2424 func asPayment (v) = match v {
2525 case p: AttachedPayment =>
2626 p
2727 case _ =>
2828 throw("fail to cast into AttachedPayment")
2929 }
3030
3131
3232 func asByteVector (v) = match v {
3333 case p: ByteVector =>
3434 p
3535 case _ =>
3636 throw("fail to cast into ByteVector")
3737 }
3838
3939
4040 func maxTakeableAmount (lockHeight,vestingPeriod,amount,takedAmount) = {
4141 let blocksPassed = (height - lockHeight)
4242 if ((blocksPassed >= vestingPeriod))
4343 then (amount - takedAmount)
4444 else {
4545 let perBlockUnlock = fraction(amount, MULT10, vestingPeriod, HALFUP)
4646 let availableUnlock = fraction(perBlockUnlock, blocksPassed, MULT10)
4747 (availableUnlock - takedAmount)
4848 }
4949 }
5050
5151
5252 func treasuryAmount (amount) = {
5353 let feeBasis = getIntegerValue(unlockFeeBasisKey)
5454 if ((feeBasis == 0))
5555 then 0
5656 else fraction(fraction(amount, MULT10, 1000, HALFUP), feeBasis, MULT10, HALFUP)
5757 }
5858
5959
6060 @Callable(i)
6161 func constructor (adminAdress,unlockFeeBasis,treasuryContract,verifiers,requiredVerifiers) = if (isDefined(getBoolean(isConstructedKey)))
6262 then throw("Constructor can be called just once")
6363 else {
6464 let verifiersCount = size(verifiers)
6565 if ((verifiersCount > 8))
6666 then throw("Max verifiers number is 8")
6767 else {
6868 let verifiersPubKeys = makeString(verifiers, SEP)
6969 [StringEntry(adminContractKey, adminAdress), IntegerEntry(currentLockIdKey, 0), BooleanEntry(isFreezedKey, false), BooleanEntry(isConstructedKey, true), IntegerEntry(unlockFeeBasisKey, unlockFeeBasis), StringEntry(treasuryContractKey, treasuryContract), StringEntry(verifiersKey, verifiersPubKeys), StringEntry(verifiersDataKey, ((toString(verifiersCount) + SEP) + toString(requiredVerifiers)))]
7070 }
7171 }
7272
7373
7474
7575 @Callable(i)
7676 func lock (period) = if (getBooleanValue(isFreezedKey))
7777 then throw("Contract operations is suspended")
7878 else {
7979 let payment = asPayment(i.payments[0])
8080 if ((0 >= payment.amount))
8181 then throw("Amount must be positive")
8282 else if ((1440 > period))
8383 then throw("24 hours is minimum vesting period")
8484 else {
8585 let currentLockId = getIntegerValue(currentLockIdKey)
8686 let callerAddressString = toBase58String(i.caller.bytes)
8787 let paymentAssetIdString = if (!(isDefined(payment.assetId)))
8888 then "WAVES"
8989 else toBase58String(asByteVector(payment.assetId))
9090 let key = ((callerAddressString + SEP) + toString(currentLockId))
9191 let data = ((((((((toString(height) + SEP) + toString(payment.amount)) + SEP) + "0") + SEP) + toString(period)) + SEP) + paymentAssetIdString)
9292 [StringEntry(key, data), IntegerEntry(currentLockIdKey, (currentLockId + 1))]
9393 }
9494 }
9595
9696
9797
9898 @Callable(i)
9999 func withdraw (amount,lockId) = if (getBooleanValue(isFreezedKey))
100100 then throw("Contract operations is suspended")
101101 else if (if ((0 >= amount))
102102 then true
103103 else (0 > lockId))
104104 then throw("Amount must be positive or wrong lock id")
105105 else {
106106 let callerAddressString = toBase58String(i.caller.bytes)
107107 let key = ((callerAddressString + SEP) + toString(lockId))
108108 let dataArray = split(getStringValue(key), SEP)
109109 if ((size(dataArray) != 5))
110110 then throw("Internal error")
111111 else {
112112 let storedHeight = dataArray[0]
113113 let storedAmount = dataArray[1]
114114 let storedTakedAmount = dataArray[2]
115115 let storedVestingPeriod = dataArray[3]
116116 let storedAssetId = dataArray[4]
117117 let availableAmount = maxTakeableAmount(parseIntValue(storedHeight), parseIntValue(storedVestingPeriod), parseIntValue(storedAmount), parseIntValue(storedTakedAmount))
118118 if ((amount > availableAmount))
119119 then throw(("Requested amount is two big, max available amount is: " + toString(availableAmount)))
120120 else {
121121 let newData = ((((((((storedHeight + SEP) + storedAmount) + SEP) + toString((parseIntValue(storedTakedAmount) + amount))) + SEP) + storedVestingPeriod) + SEP) + storedAssetId)
122122 let assetIdToTransfer = if ((storedAssetId == "WAVES"))
123123 then unit
124124 else fromBase58String(storedAssetId)
125125 let amountToTreasury = treasuryAmount(amount)
126126 let amountToUser = (amount - amountToTreasury)
127+ let treasuryContract = getStringValue(treasuryContractKey)
127128 let transactionResult = [StringEntry(key, newData), ScriptTransfer(i.caller, amountToUser, assetIdToTransfer)]
128129 if ((amountToTreasury > 0))
129- then ScriptTransfer(i.caller, amountToTreasury, assetIdToTransfer) :: transactionResult
130+ then ScriptTransfer(Address(fromBase58String(treasuryContract)), amountToTreasury, assetIdToTransfer) :: transactionResult
130131 else transactionResult
131132 }
132133 }
133134 }
134135
135136
136137
137138 @Callable(i)
138139 func freezeContract (isUnfreeze) = {
139140 let adminAddress = getStringValue(adminContractKey)
140141 if ((adminAddress != toBase58String(i.caller.bytes)))
141142 then throw("Only admin contract can call this function")
142143 else [BooleanEntry(isFreezedKey, !(isUnfreeze))]
143144 }
144145
145146
146147
147148 @Callable(i)
148149 func changeFeeBasis (newFeeBasis) = {
149150 let adminAddress = getStringValue(adminContractKey)
150151 if ((adminAddress != toBase58String(i.caller.bytes)))
151152 then throw("Only admin contract can call this function")
152153 else if ((0 > newFeeBasis))
153154 then throw("Fee basis can't be negative")
154155 else if ((newFeeBasis > 1000))
155156 then throw("Fee basis can't be bigger than 10 percent")
156157 else [IntegerEntry(unlockFeeBasisKey, newFeeBasis)]
157158 }
158159
159160
160161 @Verifier(tx)
161162 func verify () = match tx {
162163 case _: MassTransferTransaction|TransferTransaction|SetScriptTransaction =>
163164 let verifiers = split(getStringValue(verifiersKey), SEP)
164165 let verifiersData = split(getStringValue(verifiersDataKey), SEP)
165166 let verifiersCount = parseIntValue(verifiersData[0])
166167 let verifiersRequired = parseIntValue(verifiersData[1])
167168 func sum (accum,next) = {
168169 let validatedProofsCount = accum._1
169170 let currentProofsIndex = accum._2
170171 let isVerified = if (sigVerify(tx.bodyBytes, tx.proofs[currentProofsIndex], fromBase58String(next)))
171172 then 1
172173 else 0
173174 $Tuple2((validatedProofsCount + isVerified), (currentProofsIndex + 1))
174175 }
175176
176177 let validationData = {
177178 let $l = verifiers
178179 let $s = size($l)
179180 let $acc0 = $Tuple2(0, 0)
180181 func $f0_1 ($a,$i) = if (($i >= $s))
181182 then $a
182183 else sum($a, $l[$i])
183184
184185 func $f0_2 ($a,$i) = if (($i >= $s))
185186 then $a
186187 else throw("List size exceeds 8")
187188
188189 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8)
189190 }
190191 (validationData._1 >= verifiersRequired)
191192 case _ =>
192193 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
193194 }
194195

github/deemru/w8io/026f985 
33.85 ms