TODO: Add description
If available in Hex, the package can be installed
by adding call_contract
to your list of dependencies in mix.exs
:
def deps do
[
{:call_contract, "~> 0.1.0"}
]
end
Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/call_contract.
mix new call_contract
mix.exs
{:ethers, "~> 0.1.2"}
mix deps.get
tx_data = Ethers.Contracts.ERC20.balance_of("0xDB0eCbE91f2739a10DAd39e5b53b3174C6C0Eeb2")
a = Ethers.call(tx_data, to: "0x877149B4428A731fF08A301103EBFB7BE7ad4183")
IO.inspect(a,lable: "a is:")
IO.puts "Hello, World!"
mix test
mix test --only erc20_total_supply