I’m using an erc-20 factory contract from consensys for a project. Just wondering if there are any factory implementations which create OZ’s erc-20
I’m trying to understand factories more but I havent seen anything from OZ about them as far as I can tell.
Thanks!
1 Like
Hi @jschiarizzi ,
I am not aware of any ERC20 factory contracts that have been audited. (Doesn’t mean that there aren’t any)
Is there a reason why you want to use a factory? Are you deploying multiple ERC20’s?
You could use the ERC20PresetMinterPauser
contract that you could create from Truffle or OpenZeppelin CLI or Remix.
If you want low cost deployment, then you could deploy a minimal proxy to the predeployed logic contract using the CLI.
Thanks for this.
Do you have any more resources on this:
minimal proxy to the predeployed logic contract
That would still require deploying a logic contract for each instance though right? Could you explain this more please?
1 Like
Hi @jschiarizzi ,
To learn more about Minimal Proxies I suggest reading the following blog post:
In this deep dive into low-level EVM code, you will learn how to code a Minimal Proxy (EIP 1167) from scratch, no Solidity involved. Finally, we see how to easily deploy the proxy using OpenZeppeli…
You deploy your logic contract once and then deploy minimal proxies as you need.
If you use the ERC20 or ERC721 Preset contracts from OpenZeppelin Contracts Ethereum Package then the logic contract is already deployed.
Let me know if you need more information. I can put together an example if you need.