Module: ERC20

Defined in:
lib/erc20/erc20.rb

Overview

This module makes manipulations with Etherium ERC20 tokens as simple as they can be, if you have a provider of JSON-RPC and WebSockets Etherium APIs, for example Infura, GetBlock, or Alchemy.

Start like this:

require 'erc20'
w = ERC20::Wallet.new(
  host: 'mainnet.infura.io',
  http_path: '/v3/<your-infura-key>',
  ws_path: '/ws/v3/<your-infura-key>'
)
puts w.balance(address)

This should print the balance of the ERC20 address.

Author

Yegor Bugayenko ([email protected])

Copyright

Copyright © 2025 Yegor Bugayenko

License

MIT

Defined Under Namespace

Classes: FakeWallet, Wallet

Constant Summary collapse

VERSION =

Current version of the gem (changed by the .rultor.yml on every release)

'0.0.0'