Skip to main content
Version: 1.5.0

typed_address

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

Bakes a transaction by sending an amount of mav 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) => (_: mav) => nat

Bakes a transaction by sending an amount of mav 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>) => mav

Gets the balance of an account in mav.

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).