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.
val get_contract_manager :
Protocol_client_context.full ->
Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash
Mavryk_base.TzPervasives.tzresult
Lwt.t
Retrieve the manager key in a contract storage. The storage has to be of type `pair key_hash 'a`.
val build_delegate_operation :
Protocol_client_context.full ->
chain:Mavryk_shell_services.Chain_services.chain ->
block:Mavryk_shell_services.Block_services.block ->
?fee:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash option ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.transaction
Annotated_manager_operation.t
Mavryk_base.TzPervasives.tzresult
Lwt.t
Builds a delegation operation ready for injection
val set_delegate :
Protocol_client_context.full ->
chain:Mavryk_shell_services.Chain_services.chain ->
block:Mavryk_shell_services.Block_services.block ->
?confirmations:int ->
?dry_run:bool ->
?verbose_signing:bool ->
?simulation:bool ->
?branch:int ->
fee_parameter:Injection.fee_parameter ->
?fee:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
source:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash ->
src_pk:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key ->
src_sk:Mavryk_client_base.Client_keys.sk_uri ->
Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash option ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.transaction
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.manager
Injection.result
Mavryk_base.TzPervasives.tzresult
Lwt.t
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.
val build_transaction_operation :
Protocol_client_context.full ->
chain:Mavryk_shell_services.Chain_services.chain ->
block:Mavryk_shell_services.Block_services.block ->
contract:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t ->
destination:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t ->
?entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
?arg:string ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
?fee:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
?gas_limit:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral ->
?storage_limit:Z.t ->
unit ->
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.transaction
Annotated_manager_operation.t
Mavryk_base.TzPervasives.tzresult
Lwt.t
Builds a transaction operation ready for injection
val transfer :
Protocol_client_context.full ->
chain:Mavryk_shell_services.Chain_services.chain ->
block:Mavryk_shell_services.Block_services.block ->
?confirmations:int ->
?dry_run:bool ->
?verbose_signing:bool ->
?simulation:bool ->
?force:bool ->
?branch:int ->
source:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash ->
src_pk:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key ->
src_sk:Mavryk_client_base.Client_keys.sk_uri ->
contract:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t ->
destination:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Contract.t ->
?entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
?arg:string ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
?fee:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
?gas_limit:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral ->
?safety_guard:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Gas.Arith.integral ->
?storage_limit:Z.t ->
?counter:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Manager_counter.t ->
fee_parameter:Injection.fee_parameter ->
unit ->
(Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.transaction
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Kind.manager
Injection.result
* Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t list)
Mavryk_base.TzPervasives.tzresult
Lwt.t
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
val build_lambda_for_transfer_to_implicit :
destination:
Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.public_key_hash ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
string
val build_lambda_for_transfer_to_originated :
destination:Mavryk_protocol_001_PtAtLas.Protocol.Contract_hash.t ->
entrypoint:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Entrypoint.t ->
amount:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Tez.t ->
parameter_type:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
parameter:Mavryk_protocol_001_PtAtLas.Protocol.Alpha_context.Script.expr ->
string