View Source Signet.Erc20.CallData (Signet v1.3.8)

Module to encode calldata for given adaptor operations.

Summary

Functions

Encodes the call data for a balanceOf operation.

Encodes the call data for a transfer operation.

Functions

@spec balance_of(Signet.address()) :: binary()

Encodes the call data for a balanceOf operation.

Examples

iex> Signet.Erc20.CallData.balance_of(<<0xDD>>) |> Signet.Util.encode_hex()
"0x"
Link to this function

transfer(destination, amount_wei)

View Source
@spec transfer(Signet.address(), non_neg_integer()) :: binary()

Encodes the call data for a transfer operation.

Examples

iex> Signet.Erc20.CallData.transfer(<<0xDD>>, 100_000)
...> |> Signet.Util.encode_hex()
"0x8035F0CE"