View Source Signet.Erc20.Call (Signet v0.1.7)

Module to call operations and receive return value, without sending a transaction.

Link to this section Summary

Functions

Calls the balanceOf operation, returning the result of the Ethereum function call.

Calls the transfer operation, returning the result of the Ethereum function call.

Link to this section Functions

Link to this function

balance_of(token, address, call_opts \\ [])

View Source
@spec balance_of(Signet.contract(), Signet.address(), [Signet.Erc20.call_opts()]) ::
  {:ok, number()} | {:error, term()}

Calls the balanceOf operation, returning the result of the Ethereum function call.

examples

Examples

iex> Signet.Erc20.Call.balance_of(<<0xCC>>, <<0xDD>>)
{:ok, <<>>}
Link to this function

transfer(token, destination, amount_wei, call_opts \\ [])

View Source

Calls the transfer operation, returning the result of the Ethereum function call.

examples

Examples

iex> Signet.Erc20.Call.transfer(<<0xCC>>, <<0xDD>>, 100_000)
{:ok, <<>>}