hardhat-gasless-deployer
Version:
Hardhat Plugin for deploying contracts using GSN
31 lines (28 loc) • 701 B
text/typescript
import { JsonRpcProvider } from "ethers";
import { ConfigExtender } from "hardhat/types";
export const hHGaslessDeployerConfigExtender: ConfigExtender = (
config,
userConfig,
) => {
const defaultConfig = {
contract: undefined,
initArgsPath: undefined,
salt: undefined,
value: 0,
signer: undefined,
network: undefined,
rpcUrl: undefined,
paymaster: undefined,
relayerHub: undefined,
forwarder: undefined,
};
if (userConfig.hHGaslessDeployer) {
const customConfig = userConfig.hHGaslessDeployer;
config.hHGaslessDeployer = {
...defaultConfig,
...customConfig,
};
} else {
config.hHGaslessDeployer = defaultConfig;
}
};