1

and cant figure out what Endpoint do (why are they in the code) and most important of all how should I code them. What are the best practices?

1 Answer 1

2

In Plutus apps, the mechanism for requesting inputs is called "endpoints".

All endpoints that an app wants to use must be declared as part of the type of the app. The set of all endpoints of an app is called the schema of the app. The schema is defined as a Haskell type. You can build a schema using the Endpoint type family to construct individual endpoint types, and the .\/ operator to combine them.

I suggest you design your Plutus app based on the idea that endpoints are the only possible way to interact with the smart contract from a user perspective.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.