tx · 91wxnR2j1udT2P2tpetEHp3VB6YsvaTB5HqZdKicDx2h 3NBc28Y88HAw8eWb8dzfBwRMexm2SSXMAdt: -0.01000000 Waves 2019.11.27 13:37 [783566] smart account 3NBc28Y88HAw8eWb8dzfBwRMexm2SSXMAdt > SELF 0.00000000 Waves
{ "type": 13, "id": "91wxnR2j1udT2P2tpetEHp3VB6YsvaTB5HqZdKicDx2h", "fee": 1000000, "feeAssetId": null, "timestamp": 1574851131746, "version": 1, "sender": "3NBc28Y88HAw8eWb8dzfBwRMexm2SSXMAdt", "senderPublicKey": "2hJsY6pPLaBLuupYCsbxTGhKHPPPFPyHwt3UsGG6BVvm", "proofs": [ "7Tjmq4ww3DzSEPVsyc1RcAK3G23CKKAxwahnoVpBgTZ2jgybqVsxxuSxW1Mn6QbzCoqAq3368hVhEcx5dwhJNWQ" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAoAAAAAA1pc3N1ZXJBc3NldElkAQAAACBYrwj3jy6zHTxlU/E7XDlaf0lvMifn8D+xyg3J/Fmz4gAAAAARaW52ZXN0bWVudEFzc2V0SWQBAAAAIMyghA9N/H6PKJXRf4vv09OPc6rJgvZXIaRGMYd/LPwxAAAAABhpbnZlc3RtZW50QXNzZXRJZElzV2F2ZXMHAAAAAA5vd25lclB1YmxpY0tleQEAAAAgb3Tt2jXQRzlhhPz4FAwfa4BuG31G2PxTXaI1aW/NCS4AAAAADG93bmVyQWRkcmVzcwkBAAAAFGFkZHJlc3NGcm9tUHVibGljS2V5AAAAAQUAAAAOb3duZXJQdWJsaWNLZXkAAAAAEm93bmVyQWRkcmVzc1N0cmluZwIAAAAjM011ekRLWkV6Zmhad01raGVnR2JlVlV4c3c0cm5RWGRoZzgAAAAAE2Fzc2V0RGVjaW1hbHNPZmZzZXQAAAAAAAAAAAEAAAAAEHN1bUFjY291bnRBc3NldHMAAAAAAAAAAGQAAAAADGlzc3VlckFzc2V0cwAAAAAAAAAAZAAAAAAJc3RhcnRUaW1lAA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kAAAAAQkABBoAAAACCQEAAAAHZXh0cmFjdAAAAAEFAAAACXBBZGRyZXNzNQkAAlgAAAABCAUAAAACdHgAAAACaWQAAAAAAAAAAAEAAAAAAAAAAAAJAABnAAAAAgkAAGQAAAACCQAAZAAAAAIJAABkAAAAAgkAAGQAAAACBQAAAAtwS2V5MVNpZ25lZAUAAAALcEtleTJTaWduZWQFAAAAC3BLZXkzU2lnbmVkBQAAAAtwS2V5NFNpZ25lZAUAAAALcEtleTVTaWduZWQAAAAAAAAAAAMHd3m+TQ==", "chainId": 84, "height": 783566, "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'6yBgQ4THXxa2s9Lgwj44uJ2EXiqyZAQ8MBDG1hDMTrUH' | |
5 | + | ||
6 | + | let investmentAssetId = base58'Emn8cyGDFgnLCKLTXqVWhKJARhtR2muBUuZaSmqNzDfn' | |
7 | + | ||
8 | + | let investmentAssetIdIsWaves = false | |
9 | + | ||
10 | + | let ownerPublicKey = base58'8W5fhHxKofd9GVFyGYvVgNfndz2qxNwaAKzCTnpo4rUu' | |
11 | + | ||
12 | + | let ownerAddress = addressFromPublicKey(ownerPublicKey) | |
13 | + | ||
14 | + | let ownerAddressString = "3MuzDKZEzfhZwMkhegGbeVUxsw4rnQXdhg8" | |
15 | + | ||
16 | + | let assetDecimalsOffset = 1 | |
17 | + | ||
18 | + | let sumAccountAssets = 100 | |
19 | + | ||
20 | + | let issuerAssets = 100 | |
21 | + | ||
22 | + | let startTime = 1574850960 | |
23 | + | ||
24 | + | let increasePriceTime = 1575633600 | |
25 | + | ||
26 | + | let endTime = 1575633600 | |
27 | + | ||
28 | + | let price = 100000 | |
29 | + | ||
30 | + | let priceSecond = 100000 | |
31 | + | ||
32 | + | let softCapAmount = 10000000 | |
33 | + | ||
34 | + | let hardCapAmount = 10000000 | |
35 | + | ||
36 | + | let minPayment = 100000 | |
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 = "3.0.0-testnet" | |
67 | + | ||
68 | + | let validState = 1000 | |
69 | + | ||
70 | + | func getCurrentTime () = { | |
71 | + | let blockInfo = value(blockInfoByHeight(height)) | |
72 | + | (blockInfo.timestamp / 1000) | |
73 | + | } | |
74 | + | ||
75 | + | ||
76 | + | func getInvestmentAssetIdForTransfer (isWaves,assetId) = if ((isWaves == false)) | |
77 | + | then assetId | |
78 | + | else unit | |
79 | + | ||
80 | + | ||
81 | + | func getCurrentPrice () = if ((increasePriceTime > getCurrentTime())) | |
82 | + | then price | |
83 | + | else priceSecond | |
84 | + | ||
85 | + | ||
86 | + | func getAmount (key) = match getInteger(this, key) { | |
87 | + | case a: Int => | |
88 | + | a | |
89 | + | case _ => | |
90 | + | 0 | |
91 | + | } | |
92 | + | ||
93 | + | ||
94 | + | func hasStarted () = (startTime > getCurrentTime()) | |
95 | + | ||
96 | + | ||
97 | + | func hasEnded (sumAmount) = if ((getCurrentTime() > endTime)) | |
98 | + | then true | |
99 | + | else (sumAmount >= hardCapAmount) | |
100 | + | ||
101 | + | ||
102 | + | func getPayment (i) = match i.payment { | |
103 | + | case p: AttachedPayment => | |
104 | + | let isPaymentOk = match p.assetId { | |
105 | + | case assetId: ByteVector => | |
106 | + | if (!(investmentAssetIdIsWaves)) | |
107 | + | then (assetId == investmentAssetId) | |
108 | + | else false | |
109 | + | case _ => | |
110 | + | (investmentAssetIdIsWaves == true) | |
111 | + | } | |
112 | + | if (isPaymentOk) | |
113 | + | then if ((assetDecimalsOffset == 1)) | |
114 | + | then if (((p.amount % price) == 0)) | |
115 | + | then p.amount | |
116 | + | else throw("payment amount must be a multiple of token price") | |
117 | + | else p.amount | |
118 | + | else throw("Invalid asset ID of investment") | |
119 | + | case _ => | |
120 | + | throw("Payment must be attached") | |
121 | + | } | |
122 | + | ||
123 | + | ||
124 | + | @Callable(i) | |
125 | + | func deposit () = { | |
126 | + | let currentPrice = getCurrentPrice() | |
127 | + | let accountAmount = getAmount(keyCollectedAmount) | |
128 | + | if (hasStarted()) | |
129 | + | then throw(((("The Tokensale works between " + toString(startTime)) + " and ") + toString(endTime))) | |
130 | + | else if (hasEnded(accountAmount)) | |
131 | + | then throw("The required amount has already been accumulated. If you are an investor, you can withdraw your funds.") | |
132 | + | else { | |
133 | + | let payment = getPayment(i) | |
134 | + | let currentKey = toBase58String(i.caller.bytes) | |
135 | + | let isAccountAllow = match getInteger(whitelistAddress, currentKey) { | |
136 | + | case a: Int => | |
137 | + | a | |
138 | + | case _ => | |
139 | + | -255 | |
140 | + | } | |
141 | + | if ((validState > isAccountAllow)) | |
142 | + | then throw("Your account has no right to send funds.") | |
143 | + | else { | |
144 | + | let accountAssets = match getInteger(this, keyDistAssets) { | |
145 | + | case a: Int => | |
146 | + | a | |
147 | + | case _ => | |
148 | + | sumAccountAssets | |
149 | + | } | |
150 | + | let tokensCalc = ((payment * assetDecimalsOffset) / currentPrice) | |
151 | + | let minPaymentInAssets = ((minPayment * assetDecimalsOffset) / currentPrice) | |
152 | + | if (if (if ((0 > (accountAssets - tokensCalc))) | |
153 | + | then true | |
154 | + | else (minPaymentInAssets > tokensCalc)) | |
155 | + | then true | |
156 | + | else if ((tokensCalc != accountAssets)) | |
157 | + | then (tokensCalc > (accountAssets - minPaymentInAssets)) | |
158 | + | else false) | |
159 | + | then throw("Incorrect payment amount.") | |
160 | + | else { | |
161 | + | let newInvestorAmount = (getAmount((keySumAmountPrefix + currentKey)) + payment) | |
162 | + | let newInvestorAssets = (getAmount((keySumAssetsPrefix + currentKey)) + tokensCalc) | |
163 | + | let newAccountAssets = (accountAssets - tokensCalc) | |
164 | + | let newAccountAmount = (accountAmount + payment) | |
165 | + | WriteSet([DataEntry((keySumAmountPrefix + currentKey), newInvestorAmount), DataEntry((keySumAssetsPrefix + currentKey), newInvestorAssets), DataEntry(keyDistAssets, newAccountAssets), DataEntry(keyCollectedAmount, newAccountAmount)]) | |
166 | + | } | |
167 | + | } | |
168 | + | } | |
169 | + | } | |
170 | + | ||
171 | + | ||
172 | + | ||
173 | + | @Callable(i) | |
174 | + | func withdrawal () = { | |
175 | + | let dAppStatus = match getInteger(dAppWhitelistAddress, toString(this)) { | |
176 | + | case a: Int => | |
177 | + | a | |
178 | + | case _ => | |
179 | + | 0 | |
180 | + | } | |
181 | + | if ((dAppStatus == 0)) | |
182 | + | then throw("Withdrawals are not available until the issuer passes verification") | |
183 | + | else { | |
184 | + | let currentKey = toBase58String(i.caller.bytes) | |
185 | + | let currentInvestorAssets = getAmount((keySumAssetsPrefix + currentKey)) | |
186 | + | let currentInvestorAmount = getAmount((keySumAmountPrefix + currentKey)) | |
187 | + | let accountAmount = getAmount(keyCollectedAmount) | |
188 | + | let accountAssets = getAmount(keyDistAssets) | |
189 | + | let investmentAssetIdForTransfer = getInvestmentAssetIdForTransfer(investmentAssetIdIsWaves, investmentAssetId) | |
190 | + | if (!(hasEnded(accountAmount))) | |
191 | + | then throw(("The Tokensale ends " + toString(endTime))) | |
192 | + | else if (if (if ((currentKey == ownerAddressString)) | |
193 | + | then (accountAmount >= softCapAmount) | |
194 | + | else false) | |
195 | + | then (dAppStatus == 1) | |
196 | + | else false) | |
197 | + | then { | |
198 | + | let currentIssuerPaidAssets = getAmount(keyIssuer) | |
199 | + | if ((currentIssuerPaidAssets == 0)) | |
200 | + | then ScriptResult(WriteSet([DataEntry(keyIssuer, (accountAssets + issuerAssets))]), TransferSet([ScriptTransfer(ownerAddress, (accountAssets + issuerAssets), issuerAssetId), ScriptTransfer(ownerAddress, accountAmount, investmentAssetIdForTransfer)])) | |
201 | + | else throw("The issuer has already taken its share!") | |
202 | + | } | |
203 | + | else if ((currentInvestorAmount == 0)) | |
204 | + | then throw("Don't have money") | |
205 | + | else if (if ((accountAmount >= softCapAmount)) | |
206 | + | then (dAppStatus == 1) | |
207 | + | else false) | |
208 | + | then ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAssets, issuerAssetId)])) | |
209 | + | else ScriptResult(WriteSet([DataEntry((keySumAmountPrefix + currentKey), 0), DataEntry((keySumAssetsPrefix + currentKey), 0)]), TransferSet([ScriptTransfer(i.caller, currentInvestorAmount, investmentAssetIdForTransfer)])) | |
210 | + | } | |
211 | + | } | |
212 | + | ||
213 | + | ||
214 | + | @Verifier(tx) | |
215 | + | func verify () = match tx { | |
216 | + | case tx: SetAssetScriptTransaction|SetScriptTransaction => | |
217 | + | let pKey1Signed = if (isDefined(getInteger(extract(pAddress1), toBase58String(tx.id)))) | |
218 | + | then 1 | |
219 | + | else 0 | |
220 | + | let pKey2Signed = if (isDefined(getInteger(extract(pAddress2), toBase58String(tx.id)))) | |
221 | + | then 1 | |
222 | + | else 0 | |
223 | + | let pKey3Signed = if (isDefined(getInteger(extract(pAddress3), toBase58String(tx.id)))) | |
224 | + | then 1 | |
225 | + | else 0 | |
226 | + | let pKey4Signed = if (isDefined(getInteger(extract(pAddress4), toBase58String(tx.id)))) | |
227 | + | then 1 | |
228 | + | else 0 | |
229 | + | let pKey5Signed = if (isDefined(getInteger(extract(pAddress5), toBase58String(tx.id)))) | |
230 | + | then 1 | |
231 | + | else 0 | |
232 | + | (((((pKey1Signed + pKey2Signed) + pKey3Signed) + pKey4Signed) + pKey5Signed) >= 3) | |
233 | + | case _ => | |
234 | + | false | |
235 | + | } | |
236 | + |
github/deemru/w8io/169f3d6 23.94 ms ◑