tx · CZ8itX1YtgkepHrXNdaTiwCLztwv3ZPYbUueQ84sVijD 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP: -0.01000000 Waves 2022.12.22 15:47 [2371521] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves
{ "type": 13, "id": "CZ8itX1YtgkepHrXNdaTiwCLztwv3ZPYbUueQ84sVijD", "fee": 1000000, "feeAssetId": null, "timestamp": 1671713266383, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "31morfdVKZFFFTGQ3Lp7fz1tXXogvmmyEBebLGmD7vLD7LqWhXCHsuyChrgHG3uGoAv4AZ8Z3MDYVUTcwbtrQZXv" ], "script": "base64:AAIFAAAAAAAAACIIAhIDCgEEEgASCQoHCAgIAQEIARIDCgEBEgASABIDCgEIAAAAEQAAAAAGYWRtUHViAQAAACDCbSeYCFZIOpb4r9LWa8L402jDi6OfxQF86gIW2LZmcwAAAAAMcGF5bWVudEFzc2V0AQAAACAhOUTpKXxfz4r4M5I49SS+rwv2+rnVA49FLcaoUr/6uQAAAAALc2h1dERvd25LZXkCAAAACl9zaHV0RG93bl8AAAAACGV2ZW50S2V5AgAAAAdfZXZlbnRfAAAAAApwYXltZW50S2V5AgAAAAlfcGF5bWVudF8AAAAAEGdsb2JhbEV2ZW50SWRLZXkCAAAACV9ldmVudElkXwAAAAANc3RhcnRCbG9ja0tleQIAAAAMX3N0YXJ0QmxvY2tfAAAAAAtlbmRCbG9ja0tleQIAAAAKX2VuZEJsb2NrXwAAAAAIaW1hZ2VLZXkCAAAAB19pbWFnZV8AAAAACG93bmVyS2V5AgAAAAdfb3duZXJfAAAAAAZ1cmxLZXkCAAAABV91cmxfAAAAAApoYXJkQ2FwS2V5AgAAAAlfaGFyZENhcF8AAAAACHRpdGxlS2V5AgAAAAdfdGl0bGVfA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AAAAAAAggFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAZhZG1QdWIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwJAAACAAAAAQIAAAAfeW91IGFyZSBub3QgYWxsb3dlZCB0byBkbyB0aGlzIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5o1CYDg==", "height": 2371521, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8Wcznytk6JB1VENMz98LymQHRiWrcVxJqA3ACvKTC81F Next: Edf3zztHwQbf29tdqpPKTnhCgKeWrVcWfMNUN9PuV62c Diff:
Old | New | Differences | |
---|---|---|---|
4 | 4 | let admPub = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx' | |
5 | 5 | ||
6 | 6 | let paymentAsset = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk' | |
7 | + | ||
8 | + | let shutDownKey = "_shutDown_" | |
7 | 9 | ||
8 | 10 | let eventKey = "_event_" | |
9 | 11 | ||
50 | 52 | ||
51 | 53 | ||
52 | 54 | @Callable(i) | |
53 | - | func shutdown () = throw("shutdown") | |
55 | + | func shutdown (isOpen) = { | |
56 | + | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
57 | + | if ((i.callerPublicKey == admPub)) | |
58 | + | then [BooleanEntry(shutDownKey, shutDown)] | |
59 | + | else throw("you are not allow to do this!") | |
60 | + | } | |
54 | 61 | ||
55 | 62 | ||
56 | 63 | ||
88 | 95 | else if (!(isPaymentOk(i))) | |
89 | 96 | then throw("you have to attach payment greater than zero") | |
90 | 97 | else { | |
91 | - | let p = i.payments[0] | |
92 | - | let paymentAmount = p.amount | |
98 | + | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
99 | + | if (shutDown) | |
100 | + | then throw("emergency shutdown") | |
101 | + | else { | |
102 | + | let p = i.payments[0] | |
103 | + | let paymentAmount = p.amount | |
93 | 104 | [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + paymentAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + paymentAmount))] | |
105 | + | } | |
94 | 106 | } | |
95 | 107 | } | |
96 | 108 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let admPub = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx' | |
5 | 5 | ||
6 | 6 | let paymentAsset = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk' | |
7 | + | ||
8 | + | let shutDownKey = "_shutDown_" | |
7 | 9 | ||
8 | 10 | let eventKey = "_event_" | |
9 | 11 | ||
10 | 12 | let paymentKey = "_payment_" | |
11 | 13 | ||
12 | 14 | let globalEventIdKey = "_eventId_" | |
13 | 15 | ||
14 | 16 | let startBlockKey = "_startBlock_" | |
15 | 17 | ||
16 | 18 | let endBlockKey = "_endBlock_" | |
17 | 19 | ||
18 | 20 | let imageKey = "_image_" | |
19 | 21 | ||
20 | 22 | let ownerKey = "_owner_" | |
21 | 23 | ||
22 | 24 | let urlKey = "_url_" | |
23 | 25 | ||
24 | 26 | let hardCapKey = "_hardCap_" | |
25 | 27 | ||
26 | 28 | let titleKey = "_title_" | |
27 | 29 | ||
28 | 30 | let shareHolderCountKey = "_shareHolderCount_" | |
29 | 31 | ||
30 | 32 | let totalPaymentKey = "_totalPayment_" | |
31 | 33 | ||
32 | 34 | let walletPaymentKey = "_walletPayment_" | |
33 | 35 | ||
34 | 36 | func isPaymentOk (i) = { | |
35 | 37 | let acceptableAssetId = paymentAsset | |
36 | 38 | if ((size(i.payments) == 0)) | |
37 | 39 | then throw("Payment not attached") | |
38 | 40 | else { | |
39 | 41 | let p = i.payments[0] | |
40 | 42 | match p.assetId { | |
41 | 43 | case assetId: ByteVector => | |
42 | 44 | if ((assetId == acceptableAssetId)) | |
43 | 45 | then (p.amount > 0) | |
44 | 46 | else false | |
45 | 47 | case _ => | |
46 | 48 | throw("Wrong payment asset") | |
47 | 49 | } | |
48 | 50 | } | |
49 | 51 | } | |
50 | 52 | ||
51 | 53 | ||
52 | 54 | @Callable(i) | |
53 | - | func shutdown () = throw("shutdown") | |
55 | + | func shutdown (isOpen) = { | |
56 | + | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
57 | + | if ((i.callerPublicKey == admPub)) | |
58 | + | then [BooleanEntry(shutDownKey, shutDown)] | |
59 | + | else throw("you are not allow to do this!") | |
60 | + | } | |
54 | 61 | ||
55 | 62 | ||
56 | 63 | ||
57 | 64 | @Callable(i) | |
58 | 65 | func settings () = throw("settings") | |
59 | 66 | ||
60 | 67 | ||
61 | 68 | ||
62 | 69 | @Callable(i) | |
63 | 70 | func create (title,image,owner,startBlock,endBlock,url,hardCap) = { | |
64 | 71 | let eventId = valueOrElse(getInteger(this, globalEventIdKey), 0) | |
65 | 72 | let increaseEventId = (eventId + 1) | |
66 | 73 | if ((i.callerPublicKey == admPub)) | |
67 | 74 | 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)] | |
68 | 75 | else throw("you are not allowed") | |
69 | 76 | } | |
70 | 77 | ||
71 | 78 | ||
72 | 79 | ||
73 | 80 | @Callable(i) | |
74 | 81 | func funding (eventId) = { | |
75 | 82 | let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "err") | |
76 | 83 | let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "err") | |
77 | 84 | let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "err") | |
78 | 85 | let currentKey = toBase58String(i.caller.bytes) | |
79 | 86 | let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0) | |
80 | 87 | let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0) | |
81 | 88 | let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0) | |
82 | 89 | if ((startBlock > height)) | |
83 | 90 | then throw("crowdfunding not started") | |
84 | 91 | else if ((height >= endBlock)) | |
85 | 92 | then throw("crowdfunding is over") | |
86 | 93 | else if ((totalPayment >= hardCap)) | |
87 | 94 | then throw("crowdfunding is reached to hard cap. thank you for participating!") | |
88 | 95 | else if (!(isPaymentOk(i))) | |
89 | 96 | then throw("you have to attach payment greater than zero") | |
90 | 97 | else { | |
91 | - | let p = i.payments[0] | |
92 | - | let paymentAmount = p.amount | |
98 | + | let shutDown = valueOrElse(getBoolean(this, shutDownKey), true) | |
99 | + | if (shutDown) | |
100 | + | then throw("emergency shutdown") | |
101 | + | else { | |
102 | + | let p = i.payments[0] | |
103 | + | let paymentAmount = p.amount | |
93 | 104 | [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + paymentAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + paymentAmount))] | |
105 | + | } | |
94 | 106 | } | |
95 | 107 | } | |
96 | 108 | ||
97 | 109 | ||
98 | 110 | ||
99 | 111 | @Callable(i) | |
100 | 112 | func claim () = throw("event owner will claim the money") | |
101 | 113 | ||
102 | 114 | ||
103 | 115 | ||
104 | 116 | @Callable(i) | |
105 | 117 | func refund () = throw("if not success payers gonna refund") | |
106 | 118 | ||
107 | 119 | ||
108 | 120 | ||
109 | 121 | @Callable(i) | |
110 | 122 | func delete (key) = if ((i.callerPublicKey == admPub)) | |
111 | 123 | then [DeleteEntry(key)] | |
112 | 124 | else throw("you are not allowed to do this!") | |
113 | 125 | ||
114 | 126 | ||
115 | 127 | @Verifier(tx) | |
116 | 128 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
117 | 129 |
github/deemru/w8io/026f985 28.81 ms ◑