package octez-protocol-007-PsDELPH1-libs
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=ddfb5076eeb0b32ac21c1eed44e8fc86a6743ef18ab23fff02d36e365bb73d61
sha512=d22a827df5146e0aa274df48bc2150b098177ff7e5eab52c6109e867eb0a1f0ec63e6bfbb0e3645a6c2112de3877c91a17df32ccbff301891ce4ba630c997a65
doc/octez-protocol-007-PsDELPH1-libs.client/Tezos_client_007_PsDELPH1/Client_proto_fa12/index.html
Module Tezos_client_007_PsDELPH1.Client_proto_fa12
Source
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_007_PsDELPH1.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.
type action =
| Transfer of Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * Z.t
| Approve of Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * Z.t
| Get_allowance of Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * callback_contract
| Get_balance of Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Contract.t * callback_contract
| Get_total_supply of callback_contract
val action_of_expr :
entrypoint:string ->
Tezos_protocol_007_PsDELPH1.Protocol.Alpha_context.Script.node ->
action Tezos_base.TzPervasives.tzresult
val 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_007_PsDELPH1.Protocol.Alpha_context.Contract.t ->
Tezos_protocol_007_PsDELPH1.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.
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_007_PsDELPH1.Protocol.Alpha_context.Contract.t ->
unit ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
Check whether a contract has an FA1.2 interface.