Creating and sending a contract