Plutus Tools SDK User Guide Logo

Explore Plutus

  • Explanations
    • Plutus tools in development
      • Logical components
        • 1. Marconi
        • 2. Plutus use case examples
        • 3. PAB (Plutus application backend)
        • 4. Contract monad emulator
        • 5. Plutus contract model testing
        • 6. Plutus contract state machine
        • 7. Contract API (also known as Contract monad)
        • 8. Plutus chain index
        • 9. Plutus Tx constraints
        • 10. Plutus ledger
        • 11. Plutus script utils
    • What is a rollback?
      • What does this mean for dapps?
    • What is the PAB?
      • Client interface
      • Other components
        • Chain index
        • Alonzo node
        • Wallet
      • Deployment Scenarios
        • Hosted
        • In-browser
    • What is the order book pattern?
      • Example: Distributed exchange
        • Orders and Plutus scripts
        • Decentralisation
      • Generalising the pattern
        • Off-chain oracles
        • On-chain oracles
        • State machines
      • Conclusion
  • Tutorials
    • Writing a basic Plutus app in an emulated environment
      • Defining the types
        • Instances for data types
      • Defining the validator script
      • Asking for input
      • Locking the funds
      • Unlocking the funds
      • Running the app on the Plutus apps emulator
      • Exercise
    • Extending the basic Plutus app with the constraints API
    • Property-based testing of Plutus contracts
      • An overview of the guessing game
        • Emulated wallets
        • Values and tokens
      • Introducing contract models
        • Generating actions
        • Modelling expectations
        • Restricting test cases with preconditions
        • Performing actions
        • Shrinking Actions
      • Debugging the model
        • Adding delays to test cases
        • Rerunning a failed test
        • Controlling the log-level
        • Refining preconditions
      • Measuring and tuning distributions
        • Custom generators vs preconditions
        • Instrumenting contract models to gather statistics
      • Goal-directed testing with dynamic logic
        • Introducing the dynamic logic monad
        • Quantifiers in dynamic logic
        • Repeating a dynamic logic test
        • Something good is always possible
        • Monitoring and tuning dynamic logic tests
        • More dynamic logic
      • Limitations
        • Testing only via contract endpoints
        • Test assumptions on timing
        • Testing for information leaks
      • Further Examples
    • Testing Plutus Contracts with Contract Models
      • Introduction
      • Basic Contract Models
        • Example: A Simple Escrow Contract
        • The Contract Model Type
        • What contracts shall we test?
        • What actions should tests perform?
        • Generating Actions
        • Running tests and debugging the model
        • Analysing the distribution of tests
        • Exercises
      • Parameterising Models and Dynamic Contract Instances
        • Adding an initial action, and test case phases
        • Dynamic contract instances
        • Running our extended tests; another design issue
        • Exercises
      • Testing “No Locked Funds” with Dynamic Logic
        • Writing and testing properties using Dynamic Logic
        • Digression: revisiting a design decision
        • Fair’s fair: Unilateral strategies
        • Fixing the contract: refunds
        • Exercises
      • Taking Time into Account
        • Slots and POSIXTime
        • Initialising the deadline
        • Modelling the passage of time
        • Monitoring and the distribution of tests
        • No locked funds?
        • Digression: testing the model alone for speed
        • Exercises
      • Measuring coverage of on-chain code
        • Adding a coverage index
        • Measuring coverage
        • Interpreting the coverage annotations
        • The generated coverage report
      • Crashes, and how to tolerate them
        • Exercises
      • Debugging the Auction contract with model assertions
        • Modelling the Auction contract
        • No locked funds?
        • Model assertions, and unexpected expectations.
        • Crashing the auction
        • Coverage of the Auction contract
        • Exercises
      • Becoming Level 1 Certification Ready
        • Exercises
  • How-to guides
    • How to get started with the Plutus Platform
      • Further reading
    • How to write a scalable Plutus app
      • The building blocks
        • Transaction outputs
        • State of transaction outputs
        • Changing the state of our app
        • Minting Policy Scripts
      • Scalability guidelines
      • Examples
        • Decentralised exchange
        • Marlowe
      • Summary
    • How to handle blockchain events
      • Transaction output lifecycle
        • Transaction states
      • PAB functions for listening to state changes
    • How to analyse the cost and size of Plutus scripts
      • Resource use of Plutus scripts
      • Examples
        • Validator scripts
        • Partial transactions
    • Plutus Scripts
      • What is a Plutus spending script?
        • An example of using a Plutus spending script
  • Troubleshooting
    • Error codes

Architectural decision records

  • Architectural Decision Records
    • ADR 1: Record architectural decisions
      • Authors
      • Status
      • Context
      • Decision
      • Implications
        • ADR template
    • ADR 2: Repository Standardization
      • Authors
      • Status
      • Context
      • Decision
      • Argument
      • Implications
    • ADR 3: Move Marconi into a separate repository
      • Authors
      • Status
      • Context
      • Decision
      • Implications
      • Related Decisions
    • ADR 4: Making a case for Marconi
      • Author(s)
      • Status
      • Context
      • Design principles of Marconi
      • Indexing solution
      • Query and storage
      • Identification of events
      • Event streams
    • ADR 5: PAB and indexing component integration
      • Author(s)
      • Status
      • Context
      • Decisions
      • Alternative solutions
        • Make sure all components are in sync
        • Add indexing specific functions in the Contract API
        • Query functions should interact with a single source of truth
      • Implications
      • Notes
    • ADR 6: Common Contract API
      • Authors
      • Status
      • Context
      • Decision
      • Argument
      • Implications
      • Notes
    • ADR 7: Support reference inputs in constraint library
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Notes
    • ADR 8: Support inline datums in constraint library
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Notes
    • ADR 9: Support reference scripts in constraint library
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Notes
    • ADR 10: Rolling back on-disk data for Marconi indexers
      • Author(s)
      • Status
      • Context
      • Decision
        • Events
        • Queries
        • API Design
        • Implementation
    • ADR 11: Support return and total collateral when building transactions
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Alternatives
      • Notes
    • ADR 12: Commit to data types in cardano-api
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Alternatives
        • Define our own data types for off-chain use
      • Implications
      • Notes
    • ADR 13: Transaction validity time range fix
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Implications
      • Alternatives
        • Add MustValidateInSlotRange constraint
        • Remove mustValidateInTimeRange
        • Alter mustValidateInTimeRange
      • Notes
    • ADR 14: Marconi Query Interface
      • Author(s)
      • Status
      • Context
      • Decision
        • Implications
    • ADR 15: Time conversion semantic change
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Implications
      • Alternatives
        • Changing the representation of SlotConfig to the correct one
        • Directly use EpochInfo in the emulator and Contract API
      • Notes
    • ADR 16: Self-contained cardano-node emulator component
      • Author(s)
      • Status
      • Context
      • Decision
      • Argument
      • Notes
    • ADR 17: End-to-end testing strategy for Plutus, cardano-ledger-api and cardano-node-client
      • Author(s)
      • Status
      • Context
      • Decision
      • Types of Plutus tests for the plutus-e2e-tests Haskell framework
        • Examples
      • Argument
        • Pros of building and maintaining our own test framework
        • Cons of building and maintaining our own test framework
      • Additional Considerations
      • Alternatives
      • Notes
        • Other places spinning up a local testnet

Reference

  • Reference
    • Examples
    • Cost model parameters
    • Glossary
    • Bibliography
    • Elsewhere
Plutus Tools SDK User Guide
  • »
  • How-to guides
  • Edit on GitHub

How-to guides¶

  • How to get started with the Plutus Platform
  • How to write a scalable Plutus app
  • How to handle blockchain events
  • How to analyse the cost and size of Plutus scripts
  • Plutus Scripts
Next Previous

© Copyright 2022, IOHK Revision 7b238771.

Read the Docs v: latest
Versions
latest
stable
Downloads
pdf
epub
On Read the Docs
Project Home
Builds