tx · BAGnj6tmuFk7V2GezpzPk5gudk6mfu5WitAtwC1cC6x1 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua: -0.01400000 Waves 2021.03.22 18:50 [1449154] smart account 3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua > SELF 0.00000000 Waves
{ "type": 13, "id": "BAGnj6tmuFk7V2GezpzPk5gudk6mfu5WitAtwC1cC6x1", "fee": 1400000, "feeAssetId": null, "timestamp": 1616428239780, "version": 2, "chainId": 84, "sender": "3Mz29fiz3zgY9JDbiHKANvHsFgQutdfu4Ua", "senderPublicKey": "CTyHhnVTxf16Z4CmGGneAK8WB5g2QyT4MB8kUn8vPPcu", "proofs": [ "4jDZ5RDPL7d79S4RefWv2May64MfV2KW9Af1Sn6acEFXWDKUEDzTLR78uRVMjJYsCkVNWnCqTqp3x98ZnPq1pFw3" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAYAAAAABR2ZXJzaW9uU3Rha2VDb250cmFjdAAAAAAAAAAAAQAAAAALaGNTZXBhcmF0b3ICAAAAA19fXwAAAAAHaGNXYXZlcwIAAAAFV0FWRVMAAAAACmtleWRBcHBVUkwCAAAACERBUFBfVVJMAAAAAAtrZXlkQXBwTmFtZQIAAAAJREFQUF9OQU1FAAAAABNrZXlTdGFraW5nV2hpdGVsaXN0AgAAABFTVEFLSU5HX1dISVRFTElTVAAAAAAIa2V5Tm9uY2UCAAAABU5PTkNFAAAAABRrZXlTdGFrZUNvbnRyYWN0TmFtZQIAAAAQU3Rha2VDb250cmFjdE5GVAAAAAATa2V5U3Rha2VSZWNlaXB0TmFtZQIAAAAPU3Rha2VSZWNlaXB0TkZUAAAAAA9rZXlMb2NrZWRBbW91bnQCAAAADkxPQ0tFRF9BTU9VTlRfAAAAABtrZXlUb2tlbkNpcmN1bGF0aW5nU3VwcGxpZXMCAAAAGlRPS0VOX0NJUkNVTEFUSU5HX1NVUFBMSUVTAAAAABtrZXlUb2tlblRvdGFsSXNzdWV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udHJhY3RzBQAAABduZXdUb3RhbEJ1cm5lZENvbnRyYWN0cwkABEwAAAACBQAAAAxyZWNlaXB0SXNzdWUJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyCAUAAAAMcmVjZWlwdElzc3VlAAAACHF1YW50aXR5BQAAAAlyZWNlaXB0SWQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABNjb250cmFjdEFzc2V0QW1vdW50CAUAAAANY29udHJhY3RBc3NldAAAAAJpZAkABEwAAAACCQEAAAAHUmVpc3N1ZQAAAAMFAAAAB3Rva2VuSWQFAAAAGHVzZXJUb2tlbkFtb3VudFRvUmVjZWl2ZQYJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAABh1c2VyVG9rZW5BbW91bnRUb1JlY2VpdmUFAAAAB3Rva2VuSWQFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5RC1Rag==", "height": 1449154, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8YwTxoUN3NHoT9WWRWe5zHb141dJa7FwQYtMsjGU3PQH Next: 6Tzz65bbwxtk3z2pDqNogbiC4CRubyok3eFHDo5ZaBkN Diff:
Old | New | Differences | |
---|---|---|---|
164 | 164 | case _ => | |
165 | 165 | throw("Token not existing bro") | |
166 | 166 | } | |
167 | - | let receiptDesc = ((((((((((contractStakerId + " has locked ") + toString(contractAssetAmount)) + " ") + contractAsset.name) + " during ") + toString(blocksAway)) + " blocks and received ") + toString(userTokenAmountToReceive)) + " ") + tokenInfo.name) | |
167 | + | let receiptDesc = ((((((((((contractStakerId + " has locked ") + toString(contractAssetAmount)) + " | |
168 | + | ") + contractAsset.name) + " during ") + toString(blocksAway)) + " blocks and received ") + toString(userTokenAmountToReceive)) + " ") + tokenInfo.name) | |
168 | 169 | let receiptIssue = Issue(keyStakeReceiptName, receiptDesc, 1, 0, false, unit, nonce[0]) | |
169 | 170 | let receiptId = calculateAssetId(receiptIssue) | |
170 | 171 | let newLockedAmount = (getIntegerValue(this, (keyLockedAmount + contractDescArray[3])) - contractAssetAmount) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 4 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let versionStakeContract = 1 | |
5 | 5 | ||
6 | 6 | let hcSeparator = "___" | |
7 | 7 | ||
8 | 8 | let hcWaves = "WAVES" | |
9 | 9 | ||
10 | 10 | let keydAppURL = "DAPP_URL" | |
11 | 11 | ||
12 | 12 | let keydAppName = "DAPP_NAME" | |
13 | 13 | ||
14 | 14 | let keyStakingWhitelist = "STAKING_WHITELIST" | |
15 | 15 | ||
16 | 16 | let keyNonce = "NONCE" | |
17 | 17 | ||
18 | 18 | let keyStakeContractName = "StakeContractNFT" | |
19 | 19 | ||
20 | 20 | let keyStakeReceiptName = "StakeReceiptNFT" | |
21 | 21 | ||
22 | 22 | let keyLockedAmount = "LOCKED_AMOUNT_" | |
23 | 23 | ||
24 | 24 | let keyTokenCirculatingSupplies = "TOKEN_CIRCULATING_SUPPLIES" | |
25 | 25 | ||
26 | 26 | let keyTokenTotalIssuedSupplies = "TOKEN_TOTAL_ISSUED_SUPPLIES" | |
27 | 27 | ||
28 | 28 | let keyTokenTotalBurnedSupplies = "TOKEN_TOTAL_BURNED_SUPPLIES" | |
29 | 29 | ||
30 | 30 | let keyAssetOngoingContracts = "ASSET_ONGOING_CONTRACTS_" | |
31 | 31 | ||
32 | 32 | let keyAssetIssuedContracts = "ASSET_ISSUED_CONTRACTS_" | |
33 | 33 | ||
34 | 34 | let keyAssetBurnedContracts = "ASSET_BURNED_CONTRACTS_" | |
35 | 35 | ||
36 | 36 | let keyTotalOngoingContracts = "TOTAL_ONGOING_CONTRACTS" | |
37 | 37 | ||
38 | 38 | let keyTotalIssuedContracts = "TOTAL_ISSUED_CONTRACTS" | |
39 | 39 | ||
40 | 40 | let keyTotalBurnedContracts = "TOTAL_BURNED_CONTRACTS" | |
41 | 41 | ||
42 | 42 | let tokenId = base58'7J7kaZgCXKkWFxjths5ZuMGsrkpxoawPBUGaFvzpHe7V' | |
43 | 43 | ||
44 | 44 | let tokenEligibilityPerBlock = (10 * 100000000) | |
45 | 45 | ||
46 | 46 | func getStringOrEmpty (key) = match getString(this, key) { | |
47 | 47 | case dataFound: String => | |
48 | 48 | dataFound | |
49 | 49 | case _ => | |
50 | 50 | "" | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getIntegerOrZero (key) = match getInteger(this, key) { | |
55 | 55 | case isAnInteger: Int => | |
56 | 56 | isAnInteger | |
57 | 57 | case _ => | |
58 | 58 | 0 | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getNewNonce () = { | |
63 | 63 | let incrNonce = (getIntegerOrZero(keyNonce) + 1) | |
64 | 64 | [parseIntValue((toString(incrNonce) + toString(height))), incrNonce] | |
65 | 65 | } | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | @Callable(i) | |
69 | 69 | func depositToStake () = if ((this == i.caller)) | |
70 | 70 | then throw("dApp can't interact with self") | |
71 | 71 | else if ((size(i.payments) != 1)) | |
72 | 72 | then throw("Not a valid amount of payments (require 1)") | |
73 | 73 | else if ((1 > i.payments[0].amount)) | |
74 | 74 | then throw("Can't stake negatif or zero") | |
75 | 75 | else { | |
76 | 76 | let assetId = match i.payments[0].assetId { | |
77 | 77 | case isAnAsset: ByteVector => | |
78 | 78 | toBase58String(isAnAsset) | |
79 | 79 | case _ => | |
80 | 80 | hcWaves | |
81 | 81 | } | |
82 | 82 | if ((contains(getStringOrEmpty(keyStakingWhitelist), assetId) != true)) | |
83 | 83 | then throw("Asset not on staking whitelist") | |
84 | 84 | else { | |
85 | 85 | let nonce = getNewNonce() | |
86 | 86 | let contractDesc = ((((((((toString(versionStakeContract) + hcSeparator) + toString(height)) + hcSeparator) + toBase58String(i.caller.bytes)) + hcSeparator) + assetId) + hcSeparator) + toString(i.payments[0].amount)) | |
87 | 87 | let contractIssue = Issue(keyStakeContractName, contractDesc, 1, 0, false, unit, nonce[0]) | |
88 | 88 | let contractId = calculateAssetId(contractIssue) | |
89 | 89 | let newLockedAmount = (getIntegerOrZero((keyLockedAmount + assetId)) + i.payments[0].amount) | |
90 | 90 | let newAssetOngoingContracts = (getIntegerOrZero((keyAssetOngoingContracts + assetId)) + 1) | |
91 | 91 | let newAssetIssuedContracts = (getIntegerOrZero((keyAssetIssuedContracts + assetId)) + 1) | |
92 | 92 | let newTotalOngoingContracts = (getIntegerOrZero(keyTotalOngoingContracts) + 1) | |
93 | 93 | let newTotalIssuedContracts = (getIntegerOrZero(keyTotalIssuedContracts) + 1) | |
94 | 94 | [IntegerEntry(keyNonce, nonce[1]), IntegerEntry((keyLockedAmount + assetId), newLockedAmount), IntegerEntry((keyAssetOngoingContracts + assetId), newAssetOngoingContracts), IntegerEntry((keyAssetIssuedContracts + assetId), newAssetIssuedContracts), IntegerEntry(keyTotalOngoingContracts, newTotalOngoingContracts), IntegerEntry(keyTotalIssuedContracts, newTotalIssuedContracts), contractIssue, ScriptTransfer(i.caller, contractIssue.quantity, contractId)] | |
95 | 95 | } | |
96 | 96 | } | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | ||
100 | 100 | @Callable(i) | |
101 | 101 | func withdrawStake () = if ((this == i.caller)) | |
102 | 102 | then throw("dApp can't interact with self") | |
103 | 103 | else if ((size(i.payments) != 1)) | |
104 | 104 | then throw("Not a valid amount of payments (require 1)") | |
105 | 105 | else if ((1 > i.payments[0].amount)) | |
106 | 106 | then throw("Can't stake negatif or zero") | |
107 | 107 | else { | |
108 | 108 | let assetId = match i.payments[0].assetId { | |
109 | 109 | case isByteVector: ByteVector => | |
110 | 110 | isByteVector | |
111 | 111 | case _ => | |
112 | 112 | throw("Not an Asset") | |
113 | 113 | } | |
114 | 114 | let contractInfo = match assetInfo(assetId) { | |
115 | 115 | case isAnAsset: Asset => | |
116 | 116 | isAnAsset | |
117 | 117 | case _ => | |
118 | 118 | throw("Couldn't find Asset") | |
119 | 119 | } | |
120 | 120 | if (if (if (if (if ((contractInfo.issuer != this)) | |
121 | 121 | then true | |
122 | 122 | else (contractInfo.decimals != 0)) | |
123 | 123 | then true | |
124 | 124 | else (contractInfo.quantity != 1)) | |
125 | 125 | then true | |
126 | 126 | else (contractInfo.reissuable != false)) | |
127 | 127 | then true | |
128 | 128 | else (contractInfo.name != keyStakeContractName)) | |
129 | 129 | then throw("Not a Contract") | |
130 | 130 | else { | |
131 | 131 | let contractDescArray = split(contractInfo.description, hcSeparator) | |
132 | 132 | let contractVersion = parseIntValue(contractDescArray[0]) | |
133 | 133 | let contractStartingHeight = parseIntValue(contractDescArray[1]) | |
134 | 134 | let contractStakerId = contractDescArray[2] | |
135 | 135 | let contractAsset = match assetInfo(fromBase58String(contractDescArray[3])) { | |
136 | 136 | case isAnAsset: Asset => | |
137 | 137 | isAnAsset | |
138 | 138 | case _ => | |
139 | 139 | throw("Contract error: asset") | |
140 | 140 | } | |
141 | 141 | let contractAssetAmount = parseIntValue(contractDescArray[4]) | |
142 | 142 | if ((size(contractDescArray) != 5)) | |
143 | 143 | then throw("Contract error: corrupted") | |
144 | 144 | else if ((contractVersion > versionStakeContract)) | |
145 | 145 | then throw("Contract error: version") | |
146 | 146 | else if ((contractStartingHeight >= height)) | |
147 | 147 | then throw("Contract error: starting height") | |
148 | 148 | else if (if ((1 > contractAssetAmount)) | |
149 | 149 | then true | |
150 | 150 | else (contractAssetAmount > contractAsset.quantity)) | |
151 | 151 | then throw("Contract error: quantity") | |
152 | 152 | else if ((contractAssetAmount > assetBalance(this, contractAsset.id))) | |
153 | 153 | then throw("Contract error: dApp balance") | |
154 | 154 | else { | |
155 | 155 | let assetIdString = toBase58String(contractAsset.id) | |
156 | 156 | let blocksAway = (height - contractStartingHeight) | |
157 | 157 | let userTokenEligibility = (blocksAway * tokenEligibilityPerBlock) | |
158 | 158 | let currentAssetLockedAmount = getIntegerValue(this, (keyLockedAmount + contractDescArray[3])) | |
159 | 159 | let userTokenAmountToReceive = fraction(userTokenEligibility, contractAssetAmount, currentAssetLockedAmount) | |
160 | 160 | let nonce = getNewNonce() | |
161 | 161 | let tokenInfo = match assetInfo(tokenId) { | |
162 | 162 | case isAnAsset: Asset => | |
163 | 163 | isAnAsset | |
164 | 164 | case _ => | |
165 | 165 | throw("Token not existing bro") | |
166 | 166 | } | |
167 | - | let receiptDesc = ((((((((((contractStakerId + " has locked ") + toString(contractAssetAmount)) + " ") + contractAsset.name) + " during ") + toString(blocksAway)) + " blocks and received ") + toString(userTokenAmountToReceive)) + " ") + tokenInfo.name) | |
167 | + | let receiptDesc = ((((((((((contractStakerId + " has locked ") + toString(contractAssetAmount)) + " | |
168 | + | ") + contractAsset.name) + " during ") + toString(blocksAway)) + " blocks and received ") + toString(userTokenAmountToReceive)) + " ") + tokenInfo.name) | |
168 | 169 | let receiptIssue = Issue(keyStakeReceiptName, receiptDesc, 1, 0, false, unit, nonce[0]) | |
169 | 170 | let receiptId = calculateAssetId(receiptIssue) | |
170 | 171 | let newLockedAmount = (getIntegerValue(this, (keyLockedAmount + contractDescArray[3])) - contractAssetAmount) | |
171 | 172 | let newCirculatingSupplies = (getIntegerOrZero(keyTokenCirculatingSupplies) + userTokenAmountToReceive) | |
172 | 173 | let newTotalIssuedSupplies = (getIntegerOrZero(keyTokenTotalIssuedSupplies) + userTokenAmountToReceive) | |
173 | 174 | let newAssetOngoingContracts = (getIntegerOrZero((keyAssetOngoingContracts + assetIdString)) - 1) | |
174 | 175 | let newAssetBurnedContracts = (getIntegerOrZero((keyAssetBurnedContracts + assetIdString)) + 1) | |
175 | 176 | let newTotalOngoingContracts = (getIntegerOrZero(keyTotalOngoingContracts) - 1) | |
176 | 177 | let newTotalBurnedContracts = (getIntegerOrZero(keyTotalBurnedContracts) + 1) | |
177 | 178 | [Burn(assetId, 1), IntegerEntry((keyLockedAmount + contractDescArray[3]), newLockedAmount), IntegerEntry(keyTokenCirculatingSupplies, newCirculatingSupplies), IntegerEntry(keyTokenTotalIssuedSupplies, newTotalIssuedSupplies), IntegerEntry((keyAssetOngoingContracts + assetIdString), newAssetOngoingContracts), IntegerEntry((keyAssetBurnedContracts + assetIdString), newAssetBurnedContracts), IntegerEntry(keyTotalOngoingContracts, newTotalOngoingContracts), IntegerEntry(keyTotalBurnedContracts, newTotalBurnedContracts), receiptIssue, ScriptTransfer(i.caller, receiptIssue.quantity, receiptId), ScriptTransfer(i.caller, contractAssetAmount, contractAsset.id), Reissue(tokenId, userTokenAmountToReceive, true), ScriptTransfer(i.caller, userTokenAmountToReceive, tokenId)] | |
178 | 179 | } | |
179 | 180 | } | |
180 | 181 | } | |
181 | 182 | ||
182 | 183 | ||
183 | 184 | @Verifier(tx) | |
184 | 185 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
185 | 186 |
github/deemru/w8io/169f3d6 44.97 ms ◑