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