Skip to content
This repository has been archived by the owner on Dec 18, 2024. It is now read-only.

Commit

Permalink
fix paymaster deploy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
coffeexcoin committed Oct 30, 2024
1 parent f5e8821 commit 25d669c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 4 additions & 1 deletion test/paymasters/gaslesspaymaster.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ describe('Clave Contracts - Gasless Paymaster tests', () => {
await erc20.mint(accountAddress, parseEther('100000'));

gaslessPaymaster = await deployer.paymaster(PAYMASTERS.GASLESS, {
gasless: [await registry.getAddress(), 3],
gasless: {
registryAddress: await registry.getAddress(),
limit: 3
},
});

await deployer.fund(50, await gaslessPaymaster.getAddress());
Expand Down
12 changes: 9 additions & 3 deletions test/utils/deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,8 +198,11 @@ export class ClaveDeployer {

public async paymaster(
name: PAYMASTERS,
config: {
gasless?: [registryAddress: string, limit: number];
config: {
gasless?: {
registryAddress: string,
limit: number
};
erc20?: Array<{
tokenAddress: string;
decimals: number;
Expand All @@ -218,7 +221,10 @@ export class ClaveDeployer {
return await deployContract(
this.hre,
name,
name == PAYMASTERS.GASLESS ? config.gasless : [config.erc20],
[
...Object.values(name == PAYMASTERS.GASLESS ? config.gasless! : [config.erc20!]),
this.deployerWallet.address,
],
{
wallet: this.deployerWallet,
silent: true,
Expand Down

0 comments on commit 25d669c

Please sign in to comment.