Skip to content

Commit

Permalink
feat(utils): rename IPaymasterFlow to PAYMASTER_FLOW_ABI
Browse files Browse the repository at this point in the history
BREAKABLE CHANGE: Rename `utils.IPaymasterFlow` to `utils.PAYMASTER_FLOW_ABI`
  • Loading branch information
danijelTxFusion committed Jan 23, 2024
1 parent 477548d commit 746a333
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/paymaster-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@ import {
PaymasterParams,
} from "./types";

export const IPaymasterFlow = new ethers.utils.Interface(require("../abi/IPaymasterFlow.json"));
export const PAYMASTER_FLOW_ABI = new ethers.utils.Interface(require("../abi/IPaymasterFlow.json"));

export function getApprovalBasedPaymasterInput(paymasterInput: ApprovalBasedPaymasterInput): BytesLike {
return IPaymasterFlow.encodeFunctionData("approvalBased", [
return PAYMASTER_FLOW_ABI.encodeFunctionData("approvalBased", [
paymasterInput.token,
paymasterInput.minimalAllowance,
paymasterInput.innerInput,
]);
}

export function getGeneralPaymasterInput(paymasterInput: GeneralPaymasterInput): BytesLike {
return IPaymasterFlow.encodeFunctionData("general", [paymasterInput.innerInput]);
return PAYMASTER_FLOW_ABI.encodeFunctionData("general", [paymasterInput.innerInput]);
}

export function getPaymasterParams(
Expand Down
1 change: 0 additions & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export const IERC1271 = new utils.Interface(require("../abi/IERC1271.json"));
export const L1_BRIDGE_ABI = new utils.Interface(require("../abi/IL1Bridge.json"));
export const L2_BRIDGE_ABI = new utils.Interface(require("../abi/IL2Bridge.json"));
export const NONCE_HOLDER_ABI = new utils.Interface(require("../abi/INonceHolder.json"));
export const PAYMASTER_FLOW_ABI = new utils.Interface(require("../abi/IPaymasterFlow.json"));

export const ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
export const BOOTLOADER_FORMAL_ADDRESS = "0x0000000000000000000000000000000000008001";
Expand Down

0 comments on commit 746a333

Please sign in to comment.