hardhat/types#EIP1193Provider TypeScript Examples
The following examples show how to use
hardhat/types#EIP1193Provider.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.ts From hardhat-kms-signer with MIT License | 6 votes |
extendEnvironment((hre) => {
if (hre.network.config.kmsKeyId) {
const httpNetConfig = hre.network.config as HttpNetworkUserConfig;
const eip1193Provider = new HttpProvider(
httpNetConfig.url!,
hre.network.name,
httpNetConfig.httpHeaders,
httpNetConfig.timeout
);
let wrappedProvider: EIP1193Provider;
wrappedProvider = new KMSSigner(
eip1193Provider,
hre.network.config.kmsKeyId
);
wrappedProvider = new AutomaticGasProvider(
wrappedProvider,
hre.network.config.gasMultiplier
);
wrappedProvider = new AutomaticGasPriceProvider(wrappedProvider);
hre.network.provider = new BackwardsCompatibilityProviderAdapter(
wrappedProvider
);
}
});
Example #2
Source File: provider.ts From hardhat-kms-signer with MIT License | 5 votes |
constructor(provider: EIP1193Provider, kmsKeyId: string) {
super(provider);
this.kmsKeyId = kmsKeyId;
}