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