package octez-protocol-010-PtGRANAD-libs

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Tezos_client_010_PtGRANAD.Client_proto_fa12Source

Client_proto_fa12 implements built-in support for the FA1.2 standard. This module features functions to check whether a contract implements the standard interface and to interact with such contracts using high-level actions that model the entrypoint calls.

This module also provides functions to unwrap Micheline values into actions, which can be useful for indexers or applications using this module to interpret transactions on FA1.2 contracts as FA1.2 operations.

Sourcetype callback_contract = Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * string option

A callback contract is represented by an address and a possible entrypoint on which the transaction is done.

Sourcetype action =
  1. | Transfer of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * Z.t
  2. | Approve of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * Z.t
  3. | Get_allowance of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * callback_contract
  4. | Get_balance of Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t * callback_contract
  5. | Get_total_supply of callback_contract
Sourceval print_action : Format.formatter -> action -> unit
Sourceval action_encoding : action Tezos_base.TzPervasives.Data_encoding.encoding
Sourceval action_to_expr : ?loc:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Script.location -> action -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Script.node
Sourceval action_of_expr : entrypoint:string -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Script.node -> action Tezos_base.TzPervasives.tzresult
Sourceval convert_wrapped_parameter_into_action : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Script.node -> action Tezos_base.TzPervasives.tzresult Lwt.t

convert_wrapped_parameter_into_action ccctx ~chain ~block ~contract parameter converts a wrapped FA1.2 contract parameter into the corresponding FA1.2 action.

That is, it takes a contract parameter on the form C_1 .. (C_n ... <entrypoint argument> )) where C_1 ... C_n is a sequence of Left/Right constructors. It finds the entrypoint corresponding to that path in contract's interface. The result of the function is the <entrypoint arguments> applied to the action corresponding to that entrypoint.

Sourceval contract_has_fa12_interface : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> contract:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Check whether a contract has an FA1.2 interface.

Sourceval call_contract : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?confirmations:int -> ?dry_run:bool -> ?verbose_signing:bool -> ?branch:int -> source:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key_hash -> src_pk:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key -> src_sk:Tezos_client_base.Client_keys_v0.sk_uri -> contract:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> action:action -> tez_amount:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t -> ?fee:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t -> ?gas_limit: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Gas.Arith.integral -> ?storage_limit:Z.t -> ?counter:Z.t -> fee_parameter:Injection.fee_parameter -> unit -> (Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Kind.transaction Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Kind.manager Injection.result * Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t list) Tezos_base.TzPervasives.tzresult Lwt.t
Sourcetype token_transfer = {
  1. token_contract : string;
  2. destination : string;
  3. amount : Z.t;
  4. tez_amount : string option;
  5. fee : string option;
  6. gas_limit : Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Gas.Arith.integral option;
  7. storage_limit : Z.t option;
}

Single transfer operation.

Sourceval token_transfer_encoding : token_transfer Tezos_base.TzPervasives.Data_encoding.t
Sourceval inject_token_transfer_batch : Protocol_client_context.full -> chain:Tezos_shell_services.Chain_services.chain -> block:Tezos_shell_services.Block_services.block -> ?confirmations:int -> ?dry_run:bool -> ?verbose_signing:bool -> sender:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> source:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key_hash -> src_pk:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.public_key -> src_sk:Tezos_client_base.Client_keys_v0.sk_uri -> token_transfers:token_transfer list -> fee_parameter:Injection.fee_parameter -> ?counter:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.counter -> ?default_fee:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Tez.t -> ?default_gas_limit: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Gas.Arith.integral -> ?default_storage_limit: Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.counter -> unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t

Inject a batch of token transfers.

Sourceval run_view_action : Protocol_client_context.full -> chain:Tezos_shell_services.Shell_services.chain -> block:Tezos_shell_services.Shell_services.block -> ?source:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> contract:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> action:action -> ?payer:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Contract.t -> ?gas:Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Gas.Arith.integral -> unparsing_mode: Tezos_protocol_010_PtGRANAD.Protocol.Script_ir_translator.unparsing_mode -> unit -> Tezos_protocol_010_PtGRANAD.Protocol.Alpha_context.Script.expr Tezos_base.TzPervasives.tzresult Lwt.t

Run the action without injecting it. Only for views.

OCaml

Innovation. Community. Security.