package octez-protocol-014-PtKathma-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=55ea1fb8bb3273a7fc270ca8f650d45c56449665619482aad9bc12f3ea736b7e
sha512=fec850fc2d17d7490bbabd5147d62aad13b3aaed8774270f8a38ab419670ed03e0fd30cf8642a97984eca5c2446726fe590ad99c015f7ec50919dc7652f25053
doc/octez-protocol-014-PtKathma-libs.client/Tezos_client_014_PtKathma/Client_proto_fa12/index.html
Module Tezos_client_014_PtKathma.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.
type callback_contract =
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * string optionA callback contract is represented by an address and a possible entrypoint on which the transaction is done.
type action = | Transfer of Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * Z.t| Approve of Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * Z.t| Get_allowance of Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * callback_contract| Get_balance of Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t * callback_contract| Get_total_supply of callback_contract
val action_of_expr :
entrypoint:string ->
(_, Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Script.prim)
Tezos_micheline.Micheline.node ->
action Tezos_base.TzPervasives.tzresultval 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_014_PtKathma.Protocol.Contract_hash.t ->
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Script.node ->
action Tezos_base.TzPervasives.tzresult Lwt.tconvert_wrapped_parameter_into_action cctxt ~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.
val 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_014_PtKathma.Protocol.Contract_hash.t ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.tCheck whether a contract has an FA1.2 interface.
val 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_014_PtKathma.Protocol.Alpha_context.public_key_hash ->
src_pk:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.public_key ->
src_sk:Tezos_client_base.Client_keys_v0.sk_uri ->
contract:Tezos_protocol_014_PtKathma.Protocol.Contract_hash.t ->
action:action ->
tez_amount:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Tez.t ->
?fee:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Tez.t ->
?gas_limit:
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Gas.Arith.integral ->
?storage_limit:Z.t ->
?counter:Z.t ->
fee_parameter:Injection.fee_parameter ->
unit ->
(Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Kind.transaction
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Kind.manager
Injection.result
* Tezos_protocol_014_PtKathma.Protocol.Contract_hash.t list)
Tezos_base.TzPervasives.tzresult
Lwt.ttype token_transfer = {token_contract : string;destination : string;amount : Z.t;tez_amount : string option;fee : string option;gas_limit : Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Gas.Arith.integral option;storage_limit : Z.t option;
}Single transfer operation.
val 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_014_PtKathma.Protocol.Alpha_context.Contract.t ->
source:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.public_key_hash ->
src_pk:Tezos_protocol_014_PtKathma.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_014_PtKathma.Protocol.Alpha_context.counter ->
?default_fee:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Tez.t ->
?default_gas_limit:
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Gas.Arith.integral ->
?default_storage_limit:
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.counter ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.tInject a batch of token transfers.
val run_view_action :
Protocol_client_context.full ->
chain:Tezos_shell_services.Shell_services.chain ->
block:Tezos_shell_services.Shell_services.block ->
?source:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t ->
contract:Tezos_protocol_014_PtKathma.Protocol.Contract_hash.t ->
action:action ->
?payer:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Contract.t ->
?gas:Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Gas.Arith.integral ->
unparsing_mode:
Tezos_protocol_014_PtKathma.Protocol.Script_ir_translator.unparsing_mode ->
unit ->
Tezos_protocol_014_PtKathma.Protocol.Alpha_context.Script.expr
Tezos_base.TzPervasives.tzresult
Lwt.tRun the action without injecting it. Only for views.