tx · 7srB7U6HqSQxfWUntRRfSByRCBj2YzuH5o989GiTq4ib

3MyLnBsVm9pw43K9eba5UExxb3efeai91KP:  -0.01000000 Waves

2022.12.23 09:50 [2372595] smart account 3MyLnBsVm9pw43K9eba5UExxb3efeai91KP > SELF 0.00000000 Waves

{ "type": 13, "id": "7srB7U6HqSQxfWUntRRfSByRCBj2YzuH5o989GiTq4ib", "fee": 1000000, "feeAssetId": null, "timestamp": 1671778224780, "version": 2, "chainId": 84, "sender": "3MyLnBsVm9pw43K9eba5UExxb3efeai91KP", "senderPublicKey": "E5xdZLn3yHKAn29pTyubhr9R1mkRGg9WKAcpPrCYFYHx", "proofs": [ "3xemRrACz2FpnA9dS4kdt9NcPa7Nr9zT7q6gJGjgVcSR5q4DJNeFPsJhAngSBLePin63S2peARDDjc9TtFfZtxzo" ], "script": "base64:AAIFAAAAAAAAACQIAhIDCgEEEgASCQoHCAgIAQEIARIDCgEBEgASABIAEgMKAQgAAAASAAAAAAZhZG1QdWIBAAAAIMJtJ5gIVkg6lviv0tZrwvjTaMOLo5/FAXzqAhbYtmZzAAAAAAxwYXltZW50QXNzZXQBAAAAICE5ROkpfF/Pivgzkjj1JL6vC/b6udUDj0UtxqhSv/q5AAAAAAZuZnRLZXkCAAAABV9uZnRfAAAAAAtzaHV0RG93bktleQIAAAAKX3NodXREb3duXwAAAAAIZXZlbnRLZXkCAAAAB19ldmVudF8AAAAACnBheW1lbnRLZXkCAAAACV9wYXltZW50XwAAAAAQZ2xvYmFsRXZlbnRJZEtleQIAAAAJX2V2ZW50SWRfAAAAAA1zdGFydEJsb2NrS2V5AgAAAAxfc3RhcnRCbG9ja18AAAAAC2VuZEJsb2NrS2V5AgAAAApfZW5kQmxvY2tfAAAAAAhpbWFnZUtleQIAAAAHX2ltYWdlXwAAAAAIb3duZXJLZXkCAAAAB19vd25lcl8AAAAABnVybEtleQIAAAAFX3VybF8AAAAACmhhcmRDYXBLZXkCAAAACV9oYXJkQ2FwXwAAAAAIdGl0b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oZSBuZnQAAAABaQEAAAAGcmVmdW5kAAAAAAkAAAIAAAABAgAAACJpZiBub3Qgc3VjY2VzcyBwYXllcnMgZ29ubmEgcmVmdW5kAAAAAWkBAAAABmRlbGV0ZQAAAAEAAAADa2V5AwkAAAAAAAACCAUAAAABaQAAAA9jYWxsZXJQdWJsaWNLZXkFAAAABmFkbVB1YgkABEwAAAACCQEAAAALRGVsZXRlRW50cnkAAAABBQAAAANrZXkFAAAAA25pbAkAAAIAAAABAgAAAB95b3UgYXJlIG5vdCBhbGxvd2VkIHRvIGRvIHRoaXMhAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXkWVCY9", "height": 2372595, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 4cKoVWcMsDZDPCmD7MwkfxAhihTAMXLdNCoow1p7JCvP Next: HFf3tcx8Ast8hnqN3DyBcCygiqQwqrR2pMkZdMktkcXv Diff:
OldNewDifferences
113113
114114
115115 @Callable(i)
116-func claimShare () = throw("event owner will claim the money")
116+func claimShare () = throw("userwill claim the nft")
117117
118118
119119
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 nftKey = "_nft_"
99
1010 let shutDownKey = "_shutDown_"
1111
1212 let eventKey = "_event_"
1313
1414 let paymentKey = "_payment_"
1515
1616 let globalEventIdKey = "_eventId_"
1717
1818 let startBlockKey = "_startBlock_"
1919
2020 let endBlockKey = "_endBlock_"
2121
2222 let imageKey = "_image_"
2323
2424 let ownerKey = "_owner_"
2525
2626 let urlKey = "_url_"
2727
2828 let hardCapKey = "_hardCap_"
2929
3030 let titleKey = "_title_"
3131
3232 let shareHolderCountKey = "_shareHolderCount_"
3333
3434 let totalPaymentKey = "_totalPayment_"
3535
3636 let walletPaymentKey = "_walletPayment_"
3737
3838 func isPaymentOk (i) = {
3939 let acceptableAssetId = paymentAsset
4040 if ((size(i.payments) == 0))
4141 then throw("Payment not attached")
4242 else {
4343 let p = i.payments[0]
4444 match p.assetId {
4545 case assetId: ByteVector =>
4646 if ((assetId == acceptableAssetId))
4747 then (p.amount > 0)
4848 else false
4949 case _ =>
5050 throw("Wrong payment asset")
5151 }
5252 }
5353 }
5454
5555
5656 @Callable(i)
5757 func shutdown (isOpen) = if ((i.callerPublicKey == admPub))
5858 then [BooleanEntry(shutDownKey, isOpen)]
5959 else throw("you are not allow to do this!")
6060
6161
6262
6363 @Callable(i)
6464 func settings () = throw("settings")
6565
6666
6767
6868 @Callable(i)
6969 func create (title,image,owner,startBlock,endBlock,url,hardCap) = {
7070 let eventId = valueOrElse(getInteger(this, (eventKey + globalEventIdKey)), 0)
7171 let increaseEventId = (eventId + 1)
7272 if ((i.callerPublicKey == admPub))
7373 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)]
7474 else throw("you are not allowed")
7575 }
7676
7777
7878
7979 @Callable(i)
8080 func funding (eventId) = {
8181 let startBlock = valueOrErrorMessage(getInteger(this, ((eventKey + startBlockKey) + toString(eventId))), "can not find event 1")
8282 let endBlock = valueOrErrorMessage(getInteger(this, ((eventKey + endBlockKey) + toString(eventId))), "can not find event 2")
8383 let hardCap = valueOrErrorMessage(getInteger(this, ((eventKey + hardCapKey) + toString(eventId))), "can not find event 3")
8484 let currentKey = toBase58String(i.caller.bytes)
8585 let totalPayment = valueOrElse(getInteger(this, ((paymentKey + totalPaymentKey) + toString(eventId))), 0)
8686 let walletPayment = valueOrElse(getInteger(this, (((paymentKey + walletPaymentKey) + currentKey) + toString(eventId))), 0)
8787 let shareHolderCount = valueOrElse(getInteger(this, ((paymentKey + shareHolderCountKey) + toString(eventId))), 0)
8888 if ((height > startBlock))
8989 then throw("crowdfunding not started")
9090 else if ((endBlock >= height))
9191 then throw("crowdfunding is over")
9292 else if ((totalPayment >= hardCap))
9393 then throw("crowdfunding is reached to hard cap. thank you for participating!")
9494 else if (!(isPaymentOk(i)))
9595 then throw("you have to attach payment greater than zero")
9696 else {
9797 let shutDown = valueOrElse(getBoolean(this, shutDownKey), true)
9898 if (!(shutDown))
9999 then throw("emergency shutdown")
100100 else {
101101 let p = i.payments[0]
102102 let paymentAmount = p.amount
103103 [IntegerEntry(((paymentKey + shareHolderCountKey) + toString(eventId)), (shareHolderCount + 1)), IntegerEntry(((paymentKey + totalPaymentKey) + toString(eventId)), (totalPayment + paymentAmount)), IntegerEntry(((((paymentKey + walletPaymentKey) + currentKey) + "_") + toString(eventId)), (walletPayment + paymentAmount))]
104104 }
105105 }
106106 }
107107
108108
109109
110110 @Callable(i)
111111 func claim () = throw("event owner will claim the money")
112112
113113
114114
115115 @Callable(i)
116-func claimShare () = throw("event owner will claim the money")
116+func claimShare () = throw("userwill claim the nft")
117117
118118
119119
120120 @Callable(i)
121121 func refund () = throw("if not success payers gonna refund")
122122
123123
124124
125125 @Callable(i)
126126 func delete (key) = if ((i.callerPublicKey == admPub))
127127 then [DeleteEntry(key)]
128128 else throw("you are not allowed to do this!")
129129
130130
131131 @Verifier(tx)
132132 func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
133133

github/deemru/w8io/169f3d6 
112.29 ms