Module Mavryk_client_001_PtAtLas.Managed_contract

val check_smart_contract : Protocol_client_context.full -> 'a option -> ('a -> 'b Lwt.t) -> 'b Lwt.t

check_smart_contract cctxt opt_value f_value returns an error if opt_value is None, and f_value value if opt_value = Some value. It can typically be used when opt_value is None for implicit accounts and Some _ for smart contracts, as the message in the raised error is that a smart contract is expected.

Retrieve the manager key in a contract storage. The storage has to be of type `pair key_hash 'a`.

Builds a delegation operation ready for injection

Set the delegate of a manageable contract. For a contract with a `do`entrypoint, it builds the lambda that set the provided delegate. `~source` has to be the registered manager of the contract.

Builds a transaction operation ready for injection

Perform a transfer on behalf of a managed contract . For a contract with a `do`entrypoint, it builds the lambda that does the requested operation. `~source` has to be the registered manager of the contract.

val build_lambda_for_set_delegate : delegate: Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash option -> string