Chapter 17 : Transactions

You can transfer tez to an account, or to a function of another smart contract. For this, use :

let op : operation = Tezos.transaction (<parameter>, <mutez>, <contract>);

where :

  • parameter is the entrypoint of another contract, or use unit if you are transferring to a wallet address,
  • mutez is the amount to transfer,
  • contract is the contract interface of the targeted contract. It can be retrieved from address of the other contract or the wallet.

⚠️ Notice the Tezos.transaction function returns op of type operation .

Your mission

1- Create a transaction that transfers the purchase_price to the vendor_contract. The resulting operation must be used to initialize a constant op of type operation. In our case we need to transfer directly to a wallet address (not another smart contract).