View Source Signet.Erc20.Call (Signet v1.3.8)
Module to call operations and receive return value, without sending a transaction.
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.
Functions
@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
iex> Signet.Erc20.Call.balance_of(<<0xCC>>, <<0xDD>>)
{:ok, <<>>}
@spec transfer(Signet.contract(), Signet.address(), non_neg_integer(), [ Signet.Erc20.call_opts() ]) :: binary()
Calls the transfer
operation, returning the result of the Ethereum function call.
Examples
iex> Signet.Erc20.Call.transfer(<<0xCC>>, <<0xDD>>, 100_000)
{:ok, <<>>}