I have a contract whose initializer looks like this:
contract example is Initializable, ERC20Permit {
constructor(string memory name, string memory symbol) ERC20Permit(name) ERC20(name, symbol) payable {
_disableInitializers();
}
In my frontend, i use ethers.js. for the provider:
new ethers.providers.JsonRpcProvider(“https://bsc-dataseed.binance.org/”, { name: “bsc”, chainId: 56 })
This is my contract factory:
factory = new ethers.ContractFactory(bscTokenABI, bscTokenBytecode, signer);
const contract = await factory.deploy(tokenName, tokenName, { gasLimit: 5000000, gasPrice: ethers.utils.parseUnits(“5”, ‘gwei’) });
When factory.deploy() gets called, it errors out with this error:
processing response error (body=“{"jsonrpc":"2.0","id":57,"error":{"code":-32000,"message":"unknown account"}}”, error={“code”:-32000}, requestBody=“{"method":"eth_sendTransaction","params":[{"gas":"0x4c4b40","gasPrice":"0x12a05f200","from":"0x164afa16a3f19f1b94028824132d259aa9360e4c","data":"0x61016060405273164afa16a3f19f1b94028824132d259aa9360e4c600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040516…0000"}],"id":57,"jsonrpc":"2.0"}”, requestMethod=“POST”, url=“https://bsc-dataseed.binance.org/”, code=SERVER_ERROR, version=web/5.6.0)
How am I supposed to deploy it?