4. Simulation

Overview
This feature enables users to interact with a validator (smart contract) by uploading a Plutus JSON file compiled from Aiken using the Aiken CLI compiler. Users can specify a Datum, Redeemer, select UTXOs, and lock/unlock assets to seamlessly test and validate the contract’s behavior.
User Story
As a user, I want to interact with a validator (smart contract) by uploading a Plutus JSON file compiled from Aiken, specifying a datum, redeemer, selecting UTXOs, and locking/unlocking assets so that I can test and validate the contract’s behavior before executing transactions mainnet.
User Flow
User navigates to the Simulation page in the extension.
User uploads a Plutus JSON file generated using the Aiken compiler
User selects whether to lock or unlock assets (Spending Validator) based on the contract interaction requirements.
User enters a datum or redeemer as required by the contract
User selects UTXOs for transaction.
User clicks 'Execute transaction' to initiate the transaction process.
The system interacts with the blockchain provider to process the transaction.
User Flow Diagrams

Troubleshooting & Common Issues
Issue
Possible Cause
Solution
Unable to execute transaction
API request failed
Check console logs for errors
"Request Timed Out" error
Network issue or API down
Retry after a few minutes
API Reference
Get Contract (Validator) Address
Get address of contract (validator)
POST
/validator/address
Headers
Content-Type
application/json
Body
compiledCode
string
Response
{
"data": {
"contractAddress": ""
},
"msg": "OK",
"code": 201
}
Execute Transaction
POST
/validator/execute
Execute transaction from validator
Headers
Content-Type
application/json
Body
datumOrRedeemer
{ "dataType": string,
"title": string,
"value: string }
Lock uses datum; unlock uses redeemer
contractAddress
string
seedPhrase
string
To access your wallet
isLock
boolean
For Spending Validator (2 modes: lock and unlock)
validator
{ "type": string,
"script": string }
Format required for Lucid SDK to execute a transaction"
unitsQuantity
{ [key: string]: number | bigint }
Amount of native token (lovelace) or other assets
Response
{
"data": {
"txHash": ""
},
"msg": "OK",
"code": 201
}
Demo
Screenshot

Video
🔹 For any issues, please refer to the Troubleshooting Section or open an Issue on GitHub.
Last updated