tx · 2WZBfb41jsPbbKdpJhgDyXTgeDg6ScsNUfhgxhBH7mi2 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP: -0.01300000 Waves 2022.12.23 11:06 [2372666] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves
{ "type": 13, "id": "2WZBfb41jsPbbKdpJhgDyXTgeDg6ScsNUfhgxhBH7mi2", "fee": 1300000, "feeAssetId": null, "timestamp": 1671782800296, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "2bd9iafQ6FKyLDx5zYExcJjm6EAkokFzqVAChZprZoR4ZFAL5J7kjX2CgQgtqVV8cq7A2MdLNy5XMKh7GS8kKihD" ], "script": "base64:AAIFAAAAAAAAACYIAhIDCgEEEgkKBwgICAEBCAESAwoBARIDCgEBEgMKAQESAwoBAQAAABgAAAAACGRBcHBOYW1lAgAAABtDUk9XREZVTkRJTkdfT05fV0FWRVNfU0hBUkUAAAAABmFkbVB1YgEAAAAgwm0nmAhWSDqW+K/S1mvC+NNow4ujn8UBfOoCFti2ZnMAAAAABGJhbmsJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVSmfND+3V/r5U39jSnmcibSNaQF0ZS9OSgAAAAADHBheW1lbnRBc3NldAEAAAAgITlE6Sl8X8+K+DOSOPUkvq8L9vq51QOPRS3GqFK/+rkAAAAACGNsYWltS2V5AgAAAAdfY2xhaW1fAAAAAAZuZnRLZXkCAAAABV9uZnRfAAAAAAtzaHV0RG93bktleQIAAAAKX3NodXREb3duXwAAAAAIZXZlbnRLZXkCAAAAB19ldmVudF8AAAAACnBheW1lbnRLZXkCAAAACV9wYXltZW50XwAAAAAQZ2xvYmFsRXZlbnRJZEtleQIAAAAJX2V2ZW50SWRfAAAAAA1zdGFydEJsb2NrS2V5AgAAAAxfc3RhcnRCbG9ja18AAAAA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sAAAAAgUAAAAJcmVmdW5kS2V5BQAAAApjdXJyZW50S2V5AgAAAAFfCQABpAAAAAEFAAAAB2V2ZW50SWQFAAAADXdhbGxldFBheW1lbnQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAA13YWxsZXRQYXltZW50BQAAAAxwYXltZW50QXNzZXQFAAAAA25pbAkAAAIAAAABAgAAACBjYW4gbm90IHJlZnVuZC4gY2FtcGFpZ24gc3VjY2VzcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5G9vPcw==", "height": 2372666, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: GpHyuXyv86UWfJ2nLRbh26oJdt7CKwwP7Cq1jNLuzM8i Next: FQM6ga19EjDLZ6JUHPTMuctR9BC4mGzi41ASNDByawHS Diff:
Old | New | Differences | |
---|---|---|---|
12 | 12 | let claimKey = "_claim_" | |
13 | 13 | ||
14 | 14 | let nftKey = "_nft_" | |
15 | - | ||
16 | - | let nftIdKey = "_nftId_" | |
17 | 15 | ||
18 | 16 | let shutDownKey = "_shutDown_" | |
19 | 17 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let dAppName = "CROWDFUNDING_ON_WAVES_SHARE" | |
5 | 5 | ||
6 | 6 | let admPub = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx' | |
7 | 7 | ||
8 | 8 | let bank = Address(base58'3N56PUABa6tqTXc4cv6QvntyMPb1KHnzC79') | |
9 | 9 | ||
10 | 10 | let paymentAsset = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk' | |
11 | 11 | ||
12 | 12 | let claimKey = "_claim_" | |
13 | 13 | ||
14 | 14 | let nftKey = "_nft_" | |
15 | - | ||
16 | - | let nftIdKey = "_nftId_" | |
17 | 15 | ||
18 | 16 | let shutDownKey = "_shutDown_" | |
19 | 17 | ||
20 | 18 | let eventKey = "_event_" | |
21 | 19 | ||
22 | 20 | let paymentKey = "_payment_" | |
23 | 21 | ||
24 | 22 | let globalEventIdKey = "_eventId_" | |
25 | 23 | ||
26 | 24 | let startBlockKey = "_startBlock_" | |
27 | 25 | ||
28 | 26 | let endBlockKey = "_endBlock_" | |
29 | 27 | ||
30 | 28 | let imageKey = "_image_" | |
31 | 29 | ||
32 | 30 | let ownerKey = "_owner_" | |
33 | 31 | ||
34 | 32 | let urlKey = "_url_" | |
35 | 33 | ||
36 | 34 | let hardCapKey = "_hardCap_" | |
37 | 35 | ||
38 | 36 | let titleKey = "_title_" | |
39 | 37 | ||
40 | 38 | let shareHolderCountKey = "_shareHolderCount_" | |
41 | 39 | ||
42 | 40 | let totalPaymentKey = "_totalPayment_" | |
43 | 41 | ||
44 | 42 | let walletPaymentKey = "_walletPayment_" | |
45 | 43 | ||
46 | 44 | let refundKey = "_refund_" | |
47 | 45 | ||
48 | 46 | let commissionFee = 500000000 | |
49 | 47 | ||
50 | 48 | let scale8 = 100000000 | |
51 | 49 | ||
52 | 50 | func isPaymentOk (i) = { | |
53 | 51 | let acceptableAssetId = paymentAsset | |
54 | 52 | if ((size(i.payments) == 0)) | |
55 | 53 | then throw("Payment not attached") | |
56 | 54 | else { | |
57 | 55 | let p = i.payments[0] | |
58 | 56 | match p.assetId { | |
59 | 57 | case assetId: ByteVector => | |
60 | 58 | if ((assetId == acceptableAssetId)) | |
61 | 59 | then (p.amount > 0) | |
62 | 60 | else false | |
63 | 61 | case _ => | |
64 | 62 | throw("Wrong payment asset") | |
65 | 63 | } | |
66 | 64 | } | |
67 | 65 | } | |
68 | 66 | ||
69 | 67 | ||
70 | 68 | @Callable(i) | |
71 | 69 | func shutdown (isOpen) = if ((i.callerPublicKey == admPub)) | |
72 | 70 | then [BooleanEntry(shutDownKey, isOpen)] | |
73 | 71 | else throw("you are not allow to do this!") | |
74 | 72 | ||
75 | 73 | ||
76 | 74 | ||
77 | 75 | @Callable(i) | |
78 | 76 | func create (title,image,owner,startBlock,endBlock,url,hardCap) = { | |
79 | 77 | let eventId = valueOrElse(getInteger(this, (eventKey + globalEventIdKey)), 0) | |
80 | 78 | let increaseEventId = (eventId + 1) | |
81 | 79 | if ((i.callerPublicKey == admPub)) | |
82 | 80 | then [StringEntry(((eventKey + imageKey) + toString(increaseEventId)), image), StringEntry(((eventKey + ownerKey) + toString(increaseEventId)), owner), StringEntry(((eventKey + titleKey) + toString(increaseEventId)), title), IntegerEntry(((eventKey + startBlockKey) + toString(increaseEventId)), startBlock), IntegerEntry(((eventKey + endBlockKey) + toString(increaseEventId)), endBlock), StringEntry(((eventKey + urlKey) + toString(increaseEventId)), url), IntegerEntry(((eventKey + hardCapKey) + toString(increaseEventId)), hardCap), IntegerEntry((eventKey + globalEventIdKey), increaseEventId)] | |
83 | 81 | else throw("you are not allowed") | |
84 | 82 | } | |
85 | 83 | ||
86 | 84 | ||
87 | 85 | ||
88 | 86 | @Callable(i) | |
89 | 87 | func funding (eventId) = { | |
90 | 88 | let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1") | |
91 | 89 | let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2") | |
92 | 90 | let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3") | |
93 | 91 | let currentKey = toBase58String(i.caller.bytes) | |
94 | 92 | let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0) | |
95 | 93 | let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0) | |
96 | 94 | let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0) | |
97 | 95 | if ((startBlock > height)) | |
98 | 96 | then throw("crowdfunding not started") | |
99 | 97 | else if ((height >= endBlock)) | |
100 | 98 | then throw("crowdfunding is over") | |
101 | 99 | else if ((totalPayment >= hardCap)) | |
102 | 100 | then throw("crowdfunding is reached to hard cap. thank you for participating!") | |
103 | 101 | else if (!(isPaymentOk(i))) | |
104 | 102 | then throw("you have to attach payment greater than zero") | |
105 | 103 | else { | |
106 | 104 | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
107 | 105 | if (!(shutDown)) | |
108 | 106 | then throw("emergency shutdown") | |
109 | 107 | else { | |
110 | 108 | let p = i.payments[0] | |
111 | 109 | let paymentAmount = p.amount | |
112 | 110 | let calcFee = fraction(paymentAmount, commissionFee, scale8) | |
113 | 111 | let realAmount = (paymentAmount - calcFee) | |
114 | 112 | [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + realAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + realAmount)), ScriptTransfer(bank, calcFee, paymentAsset)] | |
115 | 113 | } | |
116 | 114 | } | |
117 | 115 | } | |
118 | 116 | ||
119 | 117 | ||
120 | 118 | ||
121 | 119 | @Callable(i) | |
122 | 120 | func claim (eventId) = { | |
123 | 121 | let owner = valueOrErrorMessage(getString(this, ((eventKey + ownerKey) + toString(eventId))), "can not find the owner") | |
124 | 122 | let currentKey = toBase58String(i.caller.bytes) | |
125 | 123 | let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1") | |
126 | 124 | let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2") | |
127 | 125 | let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3") | |
128 | 126 | let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0) | |
129 | 127 | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
130 | 128 | if ((toBytes(owner) == i.caller.bytes)) | |
131 | 129 | then throw("you are not able to claim") | |
132 | 130 | else if (if (if ((height > endBlock)) | |
133 | 131 | then (totalPayment >= hardCap) | |
134 | 132 | else false) | |
135 | 133 | then shutDown | |
136 | 134 | else false) | |
137 | 135 | then [ScriptTransfer(i.caller, totalPayment, paymentAsset), IntegerEntry((((claimKey + currentKey) + "_") + toString(eventId)), totalPayment)] | |
138 | 136 | else throw("not allowed") | |
139 | 137 | } | |
140 | 138 | ||
141 | 139 | ||
142 | 140 | ||
143 | 141 | @Callable(i) | |
144 | 142 | func claimShare (eventId) = { | |
145 | 143 | let currentKey = toBase58String(i.caller.bytes) | |
146 | 144 | let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1") | |
147 | 145 | let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2") | |
148 | 146 | let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3") | |
149 | 147 | let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0) | |
150 | 148 | let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0) | |
151 | 149 | let calcFee = fraction(walletPayment, scale8, totalPayment) | |
152 | 150 | let desc = ((toString(calcFee) + "_") + toString(eventId)) | |
153 | 151 | let issueNft = Issue(((dAppName + "_") + toString(eventId)), desc, 1, 0, false) | |
154 | 152 | let nftId = calculateAssetId(issueNft) | |
155 | 153 | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
156 | 154 | if (if (if (if ((height > endBlock)) | |
157 | 155 | then (hardCap >= totalPayment) | |
158 | 156 | else false) | |
159 | 157 | then (walletPayment > 0) | |
160 | 158 | else false) | |
161 | 159 | then shutDown | |
162 | 160 | else false) | |
163 | 161 | then [issueNft, StringEntry((nftKey + toString(eventId)), toBase58String(nftId)), ScriptTransfer(i.caller, 1, nftId)] | |
164 | 162 | else throw("you are not able to claim NFT") | |
165 | 163 | } | |
166 | 164 | ||
167 | 165 | ||
168 | 166 | ||
169 | 167 | @Callable(i) | |
170 | 168 | func refund (eventId) = { | |
171 | 169 | let currentKey = toBase58String(i.caller.bytes) | |
172 | 170 | let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1") | |
173 | 171 | let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2") | |
174 | 172 | let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3") | |
175 | 173 | let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0) | |
176 | 174 | let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0) | |
177 | 175 | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
178 | 176 | if (if (if (if ((endBlock > height)) | |
179 | 177 | then (totalPayment > hardCap) | |
180 | 178 | else false) | |
181 | 179 | then (walletPayment > 0) | |
182 | 180 | else false) | |
183 | 181 | then shutDown | |
184 | 182 | else false) | |
185 | 183 | then [IntegerEntry((((refundKey + currentKey) + "_") + toString(eventId)), walletPayment), ScriptTransfer(i.caller, walletPayment, paymentAsset)] | |
186 | 184 | else throw("can not refund. campaign success") | |
187 | 185 | } | |
188 | 186 | ||
189 | 187 | ||
190 | 188 | @Verifier(tx) | |
191 | 189 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
192 | 190 |
github/deemru/w8io/026f985 51.92 ms ◑