-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
In current state helpers exposed in agreements-typechain uses hardhat-ethers factories:
const AgreementERC20Factory = (await ethers.getContractFactory(
'AgreementERC20',
)) as unknown as AgreementERC20__factory;this apporach requires consumer to have artifacts generated for every factory used, so first sol files need to be compiled. This can be avoided by using pure typechain packages that are also included in the package.
so refactor would look roughly like this:
// Before
const AgreementERC20Factory = (await ethers.getContractFactory(
'AgreementERC20',
)) as unknown as AgreementERC20__factory;
// After
const [deployer] = await ethers.getSigners();
const AgreementERC20Factory = new AgreementERC20__factory(deployer);Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels