Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hardhat-viem full support #420

Open
CedarMist opened this issue Sep 28, 2024 · 0 comments
Open

hardhat-viem full support #420

CedarMist opened this issue Sep 28, 2024 · 0 comments

Comments

@CedarMist
Copy link
Member

From readme in sapphire-viem-v2:

import hre from "hardhat";
import { sapphireLocalnet, sapphireHttpTransport } from '@oasisprotocol/sapphire-viem-v2';

const transport = sapphireHttpTransport();
const chain = sapphireLocalnet;
const publicClient = await hre.viem.getPublicClient({chain, transport});

However, need a full set of tests for hardhat-viem, as it contains many utility methods like hre.viem.deployContract, but also had a bunch of problems the last time I tested it that made it problematic to use in practice if you wanted transaction encryption.

More code example:

 const walletClient = await wrapWalletClient(createWalletClient({
      account, chain, transport
  }));
  keyedClient = {
      public: publicClient,
      wallet: walletClient
  }
  example = await hre.viem.deployContract('Example', [], {client:keyedClient});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant