In plutus playground, there is an example called “Vesting”. In the simulation, users can interact with this smart contract by click on “vest fund” or “retrieve funds”.
Now suppose that we compile this into a plutus script (Vesting.plutus) and then use cardano-cli (or other tools) to actually deploy this smart contract to the real blockchain.
How would users interact with this real-world smart contract?
To be more specific, here is the hypothetical steps:
- User A send a transaction to vest funds to the contract.
- User B send another transaction to retrieve funds from the contract.
The two transactions must be different. There must be some kind of parameters to indicate that the transaction is about to vest or retrieve the fund, activating different endpoint specified in the contract.
What is the different between the build of the transaction in step 1 and 2?