tx · 8bxSoE3BFHW5yhmBk4UFG2f92VBKrdstuk8FjpoFSsM4 3MsSWdwKubqp6ZRX3X6dJLzPRXpQmuR227w: -0.01000000 Waves 2019.10.29 15:16 [741423] smart account 3MsSWdwKubqp6ZRX3X6dJLzPRXpQmuR227w > SELF 0.00000000 Waves
{ "type": 13, "id": "8bxSoE3BFHW5yhmBk4UFG2f92VBKrdstuk8FjpoFSsM4", "fee": 1000000, "feeAssetId": null, "timestamp": 1572351446635, "version": 1, "sender": "3MsSWdwKubqp6ZRX3X6dJLzPRXpQmuR227w", "senderPublicKey": "FgEmVdj87k3XnYaw6nyJLajVyLrKWSsrEKu6ByX2vNeB", "proofs": [ "3iPjjewPTbHX5FrzrhgtKnw6nUyXc7t5z9LWeP2DEbHWkC3Az5XyNCoqYa2j5q4FuF6Ha2apbAY6byA1idmaYDc7" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAnAAAAAA1pc3N1ZXJBc3NldElkAQAAACCAjX9LGyif79Z270EpZUfqoTXwVkeY+K1j1LBMDa83qwAAAAARaW52ZXN0bWVudEFzc2V0SWQBAAAAIK85SEfvrxIJ4Do+tFOddCar+T1vBUuIXRUPqSc1Z4RYAAAAABhpbnZlc3RtZW50QXNzZXRJZElzV2F2ZXMHAAAAAA5vd25lclB1YmxpY0tleQEAAAAgBO49G50Cs/VmWMrUtFgYeltEqWJHx6h7uinFz04ZGTsAAAAADG93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAOb3duZXJQdWJsaWNLZXkAAAAAEm93bmVyQWRkcmVzc1N0cmluZwIAAAAjM04xdWRCTEJ1bWZYcXNCRFF0eXRRQnF6Yjg5REFxRk5kd1YAAAAAE2Fzc2V0RGVjaW1hbHNPZmZzZXQAAAAAAAAAAAEAAAAAEHN1bUFjY291bnRBc3NldHMAAAAAAAAAAGQAAAAADGlzc3VlckFzc2V0cwAAAAAAAAAAAAAAAAAKc3RhcnRCbG9jawA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S2V5MVNpZ25lZAUAAAALcEtleTJTaWduZWQFAAAAC3BLZXkzU2lnbmVkBQAAAAtwS2V5NFNpZ25lZAUAAAALcEtleTVTaWduZWQAAAAAAAAAAAMHac1A7g==", "chainId": 84, "height": 741423, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let issuerAssetId = base58'9epKvJWLMuAoW44j5eXPKgxEET8wmJvNJffvtKE2Wa2N' | |
5 | + | ||
6 | + | let investmentAssetId = base58'Co11Tbj83TeZCnuXrZQwv6Bs4XG2sm1vGQiQ4FLDjJWs' | |
7 | + | ||
8 | + | let investmentAssetIdIsWaves = false | |
9 | + | ||
10 | + | let ownerPublicKey = base58'LFLA9vjGZ2W7qKCMzLgZyKr8awo3akH6TTQ5F9QveDQ' | |
11 | + | ||
12 | + | let ownerAddress = addressFromPublicKey(ownerPublicKey) | |
13 | + | ||
14 | + | let ownerAddressString = "3N1udBLBumfXqsBDQtytQBqzb89DAqFNdwV" | |
15 | + | ||
16 | + | let assetDecimalsOffset = 1 | |
17 | + | ||
18 | + | let sumAccountAssets = 100 | |
19 | + | ||
20 | + | let issuerAssets = 0 | |
21 | + | ||
22 | + | let startBlock = 741422 | |
23 | + | ||
24 | + | let increasePriceBlock = 754382 | |
25 | + | ||
26 | + | let endBlock = 754382 | |
27 | + | ||
28 | + | let price = 1000000 | |
29 | + | ||
30 | + | let priceSecond = 1000000 | |
31 | + | ||
32 | + | let softCapAmount = 100000000 | |
33 | + | ||
34 | + | let hardCapAmount = 100000000 | |
35 | + | ||
36 | + | let minPayment = 1000000 | |
37 | + | ||
38 | + | let keySumAmountPrefix = "sumAmount " | |
39 | + | ||
40 | + | let keySumPaidAmountPrefix = "paidAmount " | |
41 | + | ||
42 | + | let keySumAssetsPrefix = "sumAssets " | |
43 | + | ||
44 | + | let keyAllowAccountPrefix = "allow " | |
45 | + | ||
46 | + | let keyDistAssets = "assets" | |
47 | + | ||
48 | + | let keyCollectedAmount = "amount" | |
49 | + | ||
50 | + | let keyIssuer = "issuer" | |
51 | + | ||
52 | + | let whitelistAddress = Address(base58'3N6DwWxT82nGJUwBwd7L514r2u71gr7WhwJ') | |
53 | + | ||
54 | + | let dAppWhitelistAddress = Address(base58'3N1SPvLZgv6FMfe5WNUtnPzt3okYxcJhYnR') | |
55 | + | ||
56 | + | let pAddress1 = addressFromString("3NCVDaT1ASbRd42hBSw4EG6ojGVRGtvMiz1") | |
57 | + | ||
58 | + | let pAddress2 = addressFromString("3Ms2kTAxdrcXDxwedfbNjSi6ewGCUqt3heZ") | |
59 | + | ||
60 | + | let pAddress3 = addressFromString("3N6ognm7xnQSFiownS1Df1LacJUQXvfDFLe") | |
61 | + | ||
62 | + | let pAddress4 = addressFromString("3MtVCmN9MZbWf9qxiMFoEPBrdc2fLp3SvuC") | |
63 | + | ||
64 | + | let pAddress5 = addressFromString("3MuWG8gsTK4RQBsm97sMCuUXW99JvRxwYSg") | |
65 | + | ||
66 | + | let ver = "2.0.1-testnet" | |
67 | + | ||
68 | + | let validState = 1000 | |
69 | + | ||
70 | + | func getInvestmentAssetIdForTransfer (isWaves,assetId) = if ((isWaves == false)) | |
71 | + | then assetId | |
72 | + | else unit | |
73 | + | ||
74 | + | ||
75 | + | func getCurrentPrice () = if ((increasePriceBlock > height)) | |
76 | + | then price | |
77 | + | else priceSecond | |
78 | + | ||
79 | + | ||
80 | + | func getAmount (key) = match getInteger(this, key) { | |
81 | + | case a: Int => | |
82 | + | a | |
83 | + | case _ => | |
84 | + | 0 | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | func hasStarted () = (startBlock > height) | |
89 | + | ||
90 | + | ||
91 | + | func hasEnded (sumAmount) = if ((height > endBlock)) | |
92 | + | then true | |
93 | + | else (sumAmount >= hardCapAmount) | |
94 | + | ||
95 | + | ||
96 | + | func getPayment (i) = match i.payment { | |
97 | + | case p: AttachedPayment => | |
98 | + | let isPaymentOk = match p.assetId { | |
99 | + | case assetId: ByteVector => | |
100 | + | if (!(investmentAssetIdIsWaves)) | |
101 | + | then (assetId == investmentAssetId) | |
102 | + | else false | |
103 | + | case _ => | |
104 | + | (investmentAssetIdIsWaves == true) | |
105 | + | } | |
106 | + | if (isPaymentOk) | |
107 | + | then if ((assetDecimalsOffset == 1)) | |
108 | + | then if (((p.amount % price) == 0)) | |
109 | + | then p.amount | |
110 | + | else throw("payment amount must be a multiple of token price") | |
111 | + | else p.amount | |
112 | + | else throw("Invalid asset ID of investment") | |
113 | + | case _ => | |
114 | + | throw("Payment must be attached") | |
115 | + | } | |
116 | + | ||
117 | + | ||
118 | + | @Callable(i) | |
119 | + | func deposit () = { | |
120 | + | let currentPrice = getCurrentPrice() | |
121 | + | let accountAmount = getAmount(keyCollectedAmount) | |
122 | + | if (hasStarted()) | |
123 | + | then throw(((("The Tokensale works between " + toString(startBlock)) + " and ") + toString(endBlock))) | |
124 | + | else if (hasEnded(accountAmount)) | |
125 | + | then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.") | |
126 | + | else { | |
127 | + | let payment = getPayment(i) | |
128 | + | let currentKey = toBase58String(i.caller.bytes) | |
129 | + | let isAccountAllow = match getInteger(whitelistAddress, currentKey) { | |
130 | + | case a: Int => | |
131 | + | a | |
132 | + | case _ => | |
133 | + | -255 | |
134 | + | } | |
135 | + | if ((validState > isAccountAllow)) | |
136 | + | then throw("Your account has no right to send funds.") | |
137 | + | else { | |
138 | + | let accountAssets = match getInteger(this, keyDistAssets) { | |
139 | + | case a: Int => | |
140 | + | a | |
141 | + | case _ => | |
142 | + | sumAccountAssets | |
143 | + | } | |
144 | + | let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice) | |
145 | + | let minPaymentInAssets = ((minPayment * assetDecimalsOffset) / currentPrice) | |
146 | + | if (if (if ((0 > (accountAssets - tokensCalc))) | |
147 | + | then true | |
148 | + | else (minPaymentInAssets > tokensCalc)) | |
149 | + | then true | |
150 | + | else if ((tokensCalc != accountAssets)) | |
151 | + | then (tokensCalc > (accountAssets - minPaymentInAssets)) | |
152 | + | else false) | |
153 | + | then throw("Incorrect payment amount.") | |
154 | + | else { | |
155 | + | let newInvestorAmount = (getAmount((keySumAmountPrefix + currentKey)) + payment) | |
156 | + | let newInvestorAssets = (getAmount((keySumAssetsPrefix + currentKey)) + tokensCalc) | |
157 | + | let newAccountAssets = (accountAssets - tokensCalc) | |
158 | + | let newAccountAmount = (accountAmount + payment) | |
159 | + | WriteSet([DataEntry((keySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((keySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(keyDistAssets, newAccountAssets), DataEntry(keyCollectedAmount, newAccountAmount)]) | |
160 | + | } | |
161 | + | } | |
162 | + | } | |
163 | + | } | |
164 | + | ||
165 | + | ||
166 | + | ||
167 | + | @Callable(i) | |
168 | + | func withdrawal () = { | |
169 | + | let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) { | |
170 | + | case a: Int => | |
171 | + | a | |
172 | + | case _ => | |
173 | + | 0 | |
174 | + | } | |
175 | + | if ((dAppStatus == 0)) | |
176 | + | then throw("The issuer is not allowed to withdraw funds until they pass verification") | |
177 | + | else { | |
178 | + | let currentKey = toBase58String(i.caller.bytes) | |
179 | + | let currentInvestorAssets = getAmount((keySumAssetsPrefix + currentKey)) | |
180 | + | let currentInvestorAmount = getAmount((keySumAmountPrefix + currentKey)) | |
181 | + | let accountAmount = getAmount(keyCollectedAmount) | |
182 | + | let accountAssets = getAmount(keyDistAssets) | |
183 | + | let investmentAssetIdForTransfer = getInvestmentAssetIdForTransfer(investmentAssetIdIsWaves, investmentAssetId) | |
184 | + | if (!(hasEnded(accountAmount))) | |
185 | + | then throw(("The Tokensale end on block " + toString(endBlock))) | |
186 | + | else if (if (if ((currentKey == ownerAddressString)) | |
187 | + | then (accountAmount >= softCapAmount) | |
188 | + | else false) | |
189 | + | then (dAppStatus == 1) | |
190 | + | else false) | |
191 | + | then { | |
192 | + | let currentIssuerPaidAssets = getAmount(keyIssuer) | |
193 | + | if ((currentIssuerPaidAssets == 0)) | |
194 | + | then ScriptResult(WriteSet([DataEntry(keyIssuer, (accountAssets + issuerAssets))]), TransferSet([ScriptTransfer(ownerAddress, (accountAssets + issuerAssets), issuerAssetId), ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)])) | |
195 | + | else throw("The issuer has already taken its share!") | |
196 | + | } | |
197 | + | else if ((currentInvestorAmount == 0)) | |
198 | + | then throw("Don't have money") | |
199 | + | else if (if ((accountAmount >= softCapAmount)) | |
200 | + | then (dAppStatus == 1) | |
201 | + | else false) | |
202 | + | then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId)])) | |
203 | + | else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer)])) | |
204 | + | } | |
205 | + | } | |
206 | + | ||
207 | + | ||
208 | + | @Verifier(tx) | |
209 | + | func verify () = match tx { | |
210 | + | case tx: SetAssetScriptTransaction|SetScriptTransaction => | |
211 | + | let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id)))) | |
212 | + | then 1 | |
213 | + | else 0 | |
214 | + | let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id)))) | |
215 | + | then 1 | |
216 | + | else 0 | |
217 | + | let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id)))) | |
218 | + | then 1 | |
219 | + | else 0 | |
220 | + | let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id)))) | |
221 | + | then 1 | |
222 | + | else 0 | |
223 | + | let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id)))) | |
224 | + | then 1 | |
225 | + | else 0 | |
226 | + | (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3) | |
227 | + | case _ => | |
228 | + | false | |
229 | + | } | |
230 | + |
github/deemru/w8io/169f3d6 27.91 ms ◑