tx · Edf3zztHwQbf29tdqpPKTnhCgKeWrVcWfMNUN9PuV62c

3MyLnBsVm9pw43K9eba5UExxb3efeai91KP:  -0.01000000 Waves

2022.12.22 15:48 [2371523] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves

{ "type": 13, "id": "Edf3zztHwQbf29tdqpPKTnhCgKeWrVcWfMNUN9PuV62c", "fee": 1000000, "feeAssetId": null, "timestamp": 1671713376667, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "5EBoSMVuqexC9fFXqDM6ZnXEgdXERKxm8jf36oFxwRSNgCc98wvNUSjmXouuYXCme3YRggAXaHKQeBNRHWmhctfC" ], "script": "base64:AAIFAAAAAAAAACIIAhIDCgEEEgASCQoHCAgIAQEIARIDCgEBEgASABIDCgEIAAAAEQAAAAAGYWRtUHViAQAAACDCbSeYCFZIOpb4r9LWa8L402jDi6OfxQF86gIW2LZmcwAAAAAMcGF5bWVudEFzc2V0AQAAACAhOUTpKXxfz4r4M5I49SS+rwv2+rnVA49FLcaoUr/6uQAAAAALc2h1dERvd25LZXkCAAAACl9zaHV0RG93bl8AAAAACGV2ZW50S2V5AgAAAAdfZXZlbnRfAAAAAApwYXltZW50S2V5AgAAAAlfcGF5bWVudF8AAAAAEGdsb2JhbEV2ZW50SWRLZXkCAAAACV9ldmVudElkXwAAAAANc3RhcnRCbG9ja0tleQIAAAAMX3N0YXJ0QmxvY2tfAAAAAAtlbmRCbG9ja0tleQIAAAAKX2VuZEJsb2NrXwAAAAAIaW1hZ2VLZXkCAAAAB19pbWFnZV8AAAAACG93bmVyS2V5AgAAAAdfb3duZXJfAAAAAAZ1cmxLZXkCAAAABV91cmxfAAAAAApoYXJkQ2FwS2V5AgAAAAlfaGFyZENhcF8AAAAACHRpdGxlS2V5AgAAAAdfdGl0bGVfAAAAAB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AAANrZXkFAAAAA25pbAkAAAIAAAABAgAAAB95b3UgYXJlIG5vdCBhbGxvd2VkIHRvIGRvIHRoaXMhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXnJTbe0", "height": 2371523, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CZ8itX1YtgkepHrXNdaTiwCLztwv3ZPYbUueQ84sVijD Next: 95HvVB9KLkoutT82D6T4CXpRX7Pi788mQZxZcgc5JC8E Diff:
OldNewDifferences
5252
5353
5454 @Callable(i)
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- }
55+func shutdown (isOpen) = if ((i.callerPublicKey == admPub))
56+ then [BooleanEntry(shutDownKey, isOpen)]
57+ else throw("you are not allow to do this!")
6158
6259
6360
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 5 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let admPub = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx'
55
66 let paymentAsset = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
77
88 let shutDownKey = "_shutDown_"
99
1010 let eventKey = "_event_"
1111
1212 let paymentKey = "_payment_"
1313
1414 let globalEventIdKey = "_eventId_"
1515
1616 let startBlockKey = "_startBlock_"
1717
1818 let endBlockKey = "_endBlock_"
1919
2020 let imageKey = "_image_"
2121
2222 let ownerKey = "_owner_"
2323
2424 let urlKey = "_url_"
2525
2626 let hardCapKey = "_hardCap_"
2727
2828 let titleKey = "_title_"
2929
3030 let shareHolderCountKey = "_shareHolderCount_"
3131
3232 let totalPaymentKey = "_totalPayment_"
3333
3434 let walletPaymentKey = "_walletPayment_"
3535
3636 func isPaymentOk (i) = {
3737 let acceptableAssetId = paymentAsset
3838 if ((size(i.payments) == 0))
3939 then throw("Payment not attached")
4040 else {
4141 let p = i.payments[0]
4242 match p.assetId {
4343 case assetId: ByteVector =>
4444 if ((assetId == acceptableAssetId))
4545 then (p.amount > 0)
4646 else false
4747 case _ =>
4848 throw("Wrong payment asset")
4949 }
5050 }
5151 }
5252
5353
5454 @Callable(i)
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- }
55+func shutdown (isOpen) = if ((i.callerPublicKey == admPub))
56+ then [BooleanEntry(shutDownKey, isOpen)]
57+ else throw("you are not allow to do this!")
6158
6259
6360
6461 @Callable(i)
6562 func settings () = throw("settings")
6663
6764
6865
6966 @Callable(i)
7067 func create (title,image,owner,startBlock,endBlock,url,hardCap) = {
7168 let eventId = valueOrElse(getInteger(this, globalEventIdKey), 0)
7269 let increaseEventId = (eventId + 1)
7370 if ((i.callerPublicKey == admPub))
7471 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)]
7572 else throw("you are not allowed")
7673 }
7774
7875
7976
8077 @Callable(i)
8178 func funding (eventId) = {
8279 let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "err")
8380 let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "err")
8481 let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "err")
8582 let currentKey = toBase58String(i.caller.bytes)
8683 let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0)
8784 let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0)
8885 let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0)
8986 if ((startBlock > height))
9087 then throw("crowdfunding not started")
9188 else if ((height >= endBlock))
9289 then throw("crowdfunding is over")
9390 else if ((totalPayment >= hardCap))
9491 then throw("crowdfunding is reached to hard cap. thank you for participating!")
9592 else if (!(isPaymentOk(i)))
9693 then throw("you have to attach payment greater than zero")
9794 else {
9895 let shutDown = valueOrElse(getBoolean(this, shutDownKey), true)
9996 if (shutDown)
10097 then throw("emergency shutdown")
10198 else {
10299 let p = i.payments[0]
103100 let paymentAmount = p.amount
104101 [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + paymentAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + paymentAmount))]
105102 }
106103 }
107104 }
108105
109106
110107
111108 @Callable(i)
112109 func claim () = throw("event owner will claim the money")
113110
114111
115112
116113 @Callable(i)
117114 func refund () = throw("if not success payers gonna refund")
118115
119116
120117
121118 @Callable(i)
122119 func delete (key) = if ((i.callerPublicKey == admPub))
123120 then [DeleteEntry(key)]
124121 else throw("you are not allowed to do this!")
125122
126123
127124 @Verifier(tx)
128125 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
129126

github/deemru/w8io/026f985 
29.21 ms