Use hardhat-exposed to reduce the need for mocks (#3666)
Co-authored-by: Francisco <fg@frang.io>
This commit is contained in:
@ -281,7 +281,7 @@ function shouldBehaveLikeERC777InternalMint (recipient, operator, amount, data,
|
||||
|
||||
it('reverts when minting tokens for the zero address', async function () {
|
||||
await expectRevert.unspecified(
|
||||
this.token.mintInternal(ZERO_ADDRESS, amount, data, operatorData, { from: operator }),
|
||||
this.token.$_mint(ZERO_ADDRESS, amount, data, operatorData, true, { from: operator }),
|
||||
);
|
||||
});
|
||||
}
|
||||
@ -291,7 +291,7 @@ function shouldInternalMintTokens (operator, to, amount, data, operatorData) {
|
||||
const initialTotalSupply = await this.token.totalSupply();
|
||||
const initialToBalance = await this.token.balanceOf(to);
|
||||
|
||||
const receipt = await this.token.mintInternal(to, amount, data, operatorData, { from: operator });
|
||||
const receipt = await this.token.$_mint(to, amount, data, operatorData, true, { from: operator });
|
||||
|
||||
expectEvent(receipt, 'Minted', {
|
||||
operator,
|
||||
@ -333,7 +333,7 @@ function shouldBehaveLikeERC777SendBurnMintInternalWithReceiveHook (operator, am
|
||||
|
||||
it('mint (internal) reverts', async function () {
|
||||
await expectRevert.unspecified(
|
||||
this.token.mintInternal(this.recipient, amount, data, operatorData, { from: operator }),
|
||||
this.token.$_mint(this.recipient, amount, data, operatorData, true, { from: operator }),
|
||||
);
|
||||
});
|
||||
});
|
||||
@ -387,9 +387,7 @@ function shouldBehaveLikeERC777SendBurnMintInternalWithReceiveHook (operator, am
|
||||
});
|
||||
|
||||
it('TokensRecipient receives mint (internal) data and is called after state mutation', async function () {
|
||||
const { tx } = await this.token.mintInternal(
|
||||
this.recipient, amount, data, operatorData, { from: operator },
|
||||
);
|
||||
const { tx } = await this.token.$_mint(this.recipient, amount, data, operatorData, true, { from: operator });
|
||||
|
||||
const postRecipientBalance = await this.token.balanceOf(this.recipient);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user