I tried to run Ethers.get_logs/2
but I consistently had {:ok, []}
as a result.
iex> filter = MyERC20Token.EventFilters.transfer(nil, my_smart_contract_address)
#Ethers.EventFilter<
event Transfer(
address indexed from any,
address indexed to "0x...",
uint256 value
)
>
iex> Ethers.get_logs(filter)
{:ok, []}
I could make Ethers.get_balance/1
work for the record.
And I finally used Ethers.get_transaction/1
as I really needed to poll the blockchain.
Is there something obvious I missed from Ethers.get_logs/2
usage?
(I tried switching arguments, I tried others filters of the smart contract like MyERC20Token.EventFilters.bought
, but no luck)
P.S. I combined your library with W3WS, as the latest can get subscriptions from the blockchain!