Filtered by

cardano logo

Executing contracts in Plutus

Once you have compiled your smart contract, you will be able to test and evaluate its behavior using the wallet and transaction panes.

Wallet pane

The wallet pane has two major parts:

  1. List of wallets with funds and controls to trigger contract endpoints (wallet endpoint functions).

  2. List of the current sequence of wallet events that the user wants to submit for execution. The list of wallets contains at least one and at most 10 wallets. It is accompanied by a ‘+’ button to add additional wallets (greyed out once 10 wallets are displayed). Moreover, the wallet pane contains a Evaluate button. This triggers execution of the event sequence, generating transactions in the process.

Each wallet includes the following components:

  • wallet name (#1, #2…up to #10).
  • wallet funds: amount in Ada that can be edited by the user (this is the amount at the start of the emulation); and
  • contract endpoints shown as up to 10 labelled buttons. The labels in all wallets are the same and they are the function names of the contract endpoints defined in the current contract.

Transactions pane

The transactions pane has three main parts:

  1. A visual representation of the transactions in the form of a UTXO graph. The UTXO graph consists of (a) nodes that represent individual (valid) transactions, (b) edges between nodes that represent (valid) input-output connections, and (c) unmatched outgoing edges that represent unspent transaction outputs.
  2. The final assignment of funds to wallets. This may be a subsets of the overall funds, because some funds may be locked by scripts.
  3. A possibly empty list of invalid transactions, each of which indicates the reason for its invalidity.

Next navigation arrow