@lastmjs I started looking at possibly creating a wallet demo on Azle, similar to what I did with ic-alloy-basic-wallet for Rust based canisters.
Tried integrating Viem but ran into issues with AbortController is not defined
. That is related to being able to cancel made HTTP/RPC requests I believe.
Also tried using ethers which kind of works. Call returns successfully but prints the following warning.
"Azle Warning: setTimeout may not behave as expected with milliseconds above 0; called with 250 milliseconds" " at <anonymous> (azle_main:31826)\n at perform_fn (azle_main:50468)\n at call (native)\n at getBlockNumber (azle_main:49687)\n at getBlockNumber (azle_main:56013)\n at getUnencodedResult (azle_main:31936)\n at executeAndReplyWithCandidSerde (azle_main:31917)\n at <anonymous> (azle_main:31962)\n"
So, if setTimeout
may not behave as expected, does that mean that those calls are never executed? Or, executed with a timeout of 0?
Sorry for lumping a bunch of questions together here. What is your sense for this? For
ic-alloy
I created a custom implementation using IC timers to do retries and subscriptions. Do you think that would have to be done for ethers/view as well for it to work really well? That is, creating a custom ethers/viem transport for IC.