Skip to main content
Version: 1.6.0

typed_address

let transfer: <p, s>(_: typed_address<p, s>) => (_: p) => (_: tez) => test_exec_result

Bakes a transaction by sending an amount of tez with a parameter from the current source to another account. Returns the amount of gas consumed by the execution of the contract.

let transfer_exn: <p, s>(_: typed_address<p, s>) => (_: p) => (_: tez) => nat

Bakes a transaction by sending an amount of tez with a parameter from the current source to another account. Returns the amount of gas consumed by the execution of the contract. Similar as `Test.transfer`, but fails when anything goes wrong.

let get_storage: <p, s>(_: typed_address<p, s>) => s

Gets the storage of a typed account.

let get_balance: <p, s>(_: typed_address<p, s>) => tez

Gets the balance of an account in tez.

let to_address: <p, s>(_: typed_address<p, s>) => address

let to_contract: <p, s>(_: typed_address<p, s>) => contract<p>

Gets the contract corresponding to the default entrypoint of a typed address: the contract parameter in the result will be the type of the default entrypoint (generally `'param`, but this might differ if `'param` includes a "default" entrypoint).

let get_entrypoint: <p, s, q>(_: string) => (_: typed_address<p, s>) => contract<q>

Gets the contract corresponding to an entrypoint of a typed address: the contract parameter in the result will be the type of the entrypoint, it needs to be annotated, entrypoint string should omit the prefix "%", but if passed a string starting with "%", it will be removed (and a warning emitted).