Contract Actions

Contracts have a variety of different actions used at different times.

namefunction
guardCreate a clause using miniscript with access to the contract's values and context.
compile_ifDetermine if a then or finish should be compiled based on the contract's values and context
thenCreate a path or paths that are guaranteed using CTV for a contract to be spent, with optional guards and compile_ifs.
continuationCreate a suggested path or paths for a contract to be spent that are not guaranteed via CTV with mandatory guards and compile_ifs. Also accepts an update argument for generating transactions based on future data.
decl_*!For any of the above, declare the existence of a method, for e.g. a trait definition, without defining the function.

This section will teach you then ins and outs of each.