tx · 4cKoVWcMsDZDPCmD7MwkfxAhihTAMXLdNCoow1p7JCvP

3MyLnBsVm9pw43K9eba5UExxb3efeai91KP:  -0.01000000 Waves

2022.12.22 16:26 [2371559] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves

{ "type": 13, "id": "4cKoVWcMsDZDPCmD7MwkfxAhihTAMXLdNCoow1p7JCvP", "fee": 1000000, "feeAssetId": null, "timestamp": 1671715597056, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "5y6kT1ZU2p15yANVM8wCuJV7fdNMiHBApebKjBKih7qJvxmFEzj4RRXdGeKu3Po2vZ9L5g6RP4F4sGxchySDVamj" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEEEgASCQoHCAgIAQEIARIDCgEBEgASABIAEgMKAQgAAAASAAAAAAZhZG1QdWIBAAAAIMJtJ5gIVkg6lviv0tZrwvjTaMOLo5/FAXzqAhbYtmZzAAAAAAxwYXltZW50QXNzZXQBAAAAICE5ROkpfF/Pivgzkjj1JL6vC/b6udUDj0UtxqhSv/q5AAAAAAZuZnRLZXkCAAAABV9uZnRfAAAAAAtzaHV0RG93bktleQIAAAAKX3NodXREb3duXwAAAAAIZXZlbnRLZXkCAAAAB19ldmVudF8AAAAACnBheW1lbnRLZXkCAAAACV9wYXltZW50XwAAAAAQZ2xvYmFsRXZlbnRJZEtleQIAAAAJX2V2ZW50SWRfAAAAAA1zdGFydEJsb2NrS2V5AgAAAAxfc3RhcnRCbG9ja18AAAAAC2VuZEJsb2NrS2V5AgAAAApfZW5kQmxvY2tfAAAAAAhpbWFnZUtleQIAAAAHX2ltYWdlXwAAAAAIb3duZXJLZXkCAAAAB19vd25lcl8AAAAABnVybEtleQIAAAAFX3VybF8AAAAACmhhcmRDYXBLZXkCAAAACV9oYXJkQ2FwXwAAAA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HdpbGwgY2xhaW0gdGhlIG1vbmV5AAAAAWkBAAAABnJlZnVuZAAAAAAJAAACAAAAAQIAAAAiaWYgbm90IHN1Y2Nlc3MgcGF5ZXJzIGdvbm5hIHJlZnVuZAAAAAFpAQAAAAZkZWxldGUAAAABAAAAA2tleQMJAAAAAAAAAggFAAAAAWkAAAAPY2FsbGVyUHVibGljS2V5BQAAAAZhZG1QdWIJAARMAAAAAgkBAAAAC0RlbGV0ZUVudHJ5AAAAAQUAAAADa2V5BQAAAANuaWwJAAACAAAAAQIAAAAfeW91IGFyZSBub3QgYWxsb3dlZCB0byBkbyB0aGlzIQAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5XBFc0w==", "height": 2371559, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: HkYqV7giqQR33vrsPFC7f8DJGCSZAF6K8e2JAcGgYSt6 Next: 7srB7U6HqSQxfWUntRRfSByRCBj2YzuH5o989GiTq4ib Diff:
OldNewDifferences
44 let admPub = base58'E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx'
55
66 let paymentAsset = base58'3Eh6z6z6ouFpWxGKrPaPnZwmDnDjgYHV6tqCmZf2G7tk'
7+
8+let nftKey = "_nft_"
79
810 let shutDownKey = "_shutDown_"
911
8385 let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0)
8486 let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0)
8587 let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0)
86- if ((startBlock > height))
88+ if ((height > startBlock))
8789 then throw("crowdfunding not started")
88- else if ((height >= endBlock))
90+ else if ((endBlock >= height))
8991 then throw("crowdfunding is over")
9092 else if ((totalPayment >= hardCap))
9193 then throw("crowdfunding is reached to hard cap. thank you for participating!")
111113
112114
113115 @Callable(i)
116+func claimShare () = throw("event owner will claim the money")
117+
118+
119+
120+@Callable(i)
114121 func refund () = throw("if not success payers gonna refund")
115122
116123
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'
7+
8+let nftKey = "_nft_"
79
810 let shutDownKey = "_shutDown_"
911
1012 let eventKey = "_event_"
1113
1214 let paymentKey = "_payment_"
1315
1416 let globalEventIdKey = "_eventId_"
1517
1618 let startBlockKey = "_startBlock_"
1719
1820 let endBlockKey = "_endBlock_"
1921
2022 let imageKey = "_image_"
2123
2224 let ownerKey = "_owner_"
2325
2426 let urlKey = "_url_"
2527
2628 let hardCapKey = "_hardCap_"
2729
2830 let titleKey = "_title_"
2931
3032 let shareHolderCountKey = "_shareHolderCount_"
3133
3234 let totalPaymentKey = "_totalPayment_"
3335
3436 let walletPaymentKey = "_walletPayment_"
3537
3638 func isPaymentOk (i) = {
3739 let acceptableAssetId = paymentAsset
3840 if ((size(i.payments) == 0))
3941 then throw("Payment not attached")
4042 else {
4143 let p = i.payments[0]
4244 match p.assetId {
4345 case assetId: ByteVector =>
4446 if ((assetId == acceptableAssetId))
4547 then (p.amount > 0)
4648 else false
4749 case _ =>
4850 throw("Wrong payment asset")
4951 }
5052 }
5153 }
5254
5355
5456 @Callable(i)
5557 func shutdown (isOpen) = if ((i.callerPublicKey == admPub))
5658 then [BooleanEntry(shutDownKey, isOpen)]
5759 else throw("you are not allow to do this!")
5860
5961
6062
6163 @Callable(i)
6264 func settings () = throw("settings")
6365
6466
6567
6668 @Callable(i)
6769 func create (title,image,owner,startBlock,endBlock,url,hardCap) = {
6870 let eventId = valueOrElse(getInteger(this, (eventKey + globalEventIdKey)), 0)
6971 let increaseEventId = (eventId + 1)
7072 if ((i.callerPublicKey == admPub))
7173 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)]
7274 else throw("you are not allowed")
7375 }
7476
7577
7678
7779 @Callable(i)
7880 func funding (eventId) = {
7981 let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1")
8082 let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2")
8183 let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3")
8284 let currentKey = toBase58String(i.caller.bytes)
8385 let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0)
8486 let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0)
8587 let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0)
86- if ((startBlock > height))
88+ if ((height > startBlock))
8789 then throw("crowdfunding not started")
88- else if ((height >= endBlock))
90+ else if ((endBlock >= height))
8991 then throw("crowdfunding is over")
9092 else if ((totalPayment >= hardCap))
9193 then throw("crowdfunding is reached to hard cap. thank you for participating!")
9294 else if (!(isPaymentOk(i)))
9395 then throw("you have to attach payment greater than zero")
9496 else {
9597 let shutDown = valueOrElse(getBoolean(this, shutDownKey), true)
9698 if (!(shutDown))
9799 then throw("emergency shutdown")
98100 else {
99101 let p = i.payments[0]
100102 let paymentAmount = p.amount
101103 [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + paymentAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + paymentAmount))]
102104 }
103105 }
104106 }
105107
106108
107109
108110 @Callable(i)
109111 func claim () = throw("event owner will claim the money")
110112
111113
112114
113115 @Callable(i)
116+func claimShare () = throw("event owner will claim the money")
117+
118+
119+
120+@Callable(i)
114121 func refund () = throw("if not success payers gonna refund")
115122
116123
117124
118125 @Callable(i)
119126 func delete (key) = if ((i.callerPublicKey == admPub))
120127 then [DeleteEntry(key)]
121128 else throw("you are not allowed to do this!")
122129
123130
124131 @Verifier(tx)
125132 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
126133

github/deemru/w8io/169f3d6 
64.06 ms