You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be good to have a viem utils package that provides things like an auto-populated defineChain object based on your Paima .env file (todo: do we need anything else?)
Since Viem has its own wallet type and provider type, probably this should go in @paima/providers. I'm not sure if we want this to be separate from the EthersProvider, or if we want a separate "PrivateKey" type that can be turned into an EthersProvider or a Viem provider (but such an option may be difficult to compose with things like the Thirdweb SDK)
In other words, we need 3 things:
A wrapper for defineChain that gets the Paima env variables and falls back to the viem built-in definition if one exists for the chain id
A wrapper for createPublicClient
A wrapper for createWalletClient
Since wagmi uses Viem under the hood, we can use these Viem definitions for a wagmi lib as well (see #292 for more)
constconfig=createConfig({chains: [paimaChain],// use Viem chain definition as-isclient(){returnpaimaPublicClient;// use Viem public client definition},})
The text was updated successfully, but these errors were encountered:
It might be good to have a viem utils package that provides things like an auto-populated
defineChain
object based on your Paima .env file (todo: do we need anything else?)Since Viem has its own wallet type and provider type, probably this should go in
@paima/providers
. I'm not sure if we want this to be separate from the EthersProvider, or if we want a separate "PrivateKey" type that can be turned into an EthersProvider or a Viem provider (but such an option may be difficult to compose with things like the Thirdweb SDK)In other words, we need 3 things:
defineChain
that gets the Paima env variables and falls back to the viem built-in definition if one exists for the chain idcreatePublicClient
createWalletClient
Since wagmi uses Viem under the hood, we can use these Viem definitions for a wagmi lib as well (see #292 for more)
The text was updated successfully, but these errors were encountered: