Note: This module/namespace exists inside the Test module/namespace, to use functions from this module prefix it with Test. e.g.
Helper functions for working with tickets in the LIGO Testing framework.
type proxy_address<T> = typed_address<[[T, nat], address], unit>
Typed address of the proxy contract.
let init_transfer : <T, P>(mk_param: (t: ticket<T>) => P) => proxy_address<T>
Takes a function that given a ticket creates the parameter for calling/transferring
to a contract (param creator) and returns a typed address (
proxy_address) of the proxy contract.
This function originates a proxy contract, the actual transfer of the ticket needs to
go through this proxy contract (done via the
transfer function below).
let transfer : <T>(p: proxy_address<T>, ti: [[T, nat], address]) => test_exec_result
proxy_address (typed address of the proxy contract), and the ticket
information along with the destination address (The contract to which the ticket needs to be transferred).
This function makes the actual transfer of the ticket to the destination contract/address.
let originate : <T, P, S>(ti: [T, nat], mk_storage: (t: ticket<T>) => S, c: (p: P, s: S) => [list<operation>, S]) => address
Takes ticket information along with a function that when takes a ticket and returns the storage of the contract to be originated and the actual contract to be originated and returns the address of the originated contract.
This function internally originated the contract via a proxy contract.
let originate_uncurried : <T, P, S>(ti: [T, nat], mk_storage: (t: ticket<T>) => S, c: (ps: [P, S]) => [list<operation>, S]) => address
originate described above, but works with un-curried contracts.