ethers#ContractFactory JavaScript Examples

The following examples show how to use ethers#ContractFactory. 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: using-ethers.test.js    From sdk with MIT License 6 votes vote down vote up
async function deploy(signer, supply) {
  const factory = new ContractFactory(ERC20_ABI, ERC20_BYTECODE, signer);

  const contract = await factory.deploy(supply, {
    value: 0,
    gasPrice: parseInt(MinGasPrice, 10),
    gasLimit: parseInt(MaxGas, 10),
  });

  console.log(`Contract deployed at ${contract.address}`);
  return contract.address;
}