opstack-kit-chains
Version:
Support your OP-Stack network with 'opstack-kit'
17 lines • 885 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getApprovalBasedPaymasterInput = void 0;
const encodeFunctionData_js_1 = require("../../../utils/abi/encodeFunctionData.js");
const toHex_js_1 = require("../../../utils/encoding/toHex.js");
const abis_js_1 = require("../../constants/abis.js");
function getApprovalBasedPaymasterInput(parameters) {
const { innerInput, minAllowance, token } = parameters;
const innerInputHex = typeof innerInput === 'string' ? innerInput : (0, toHex_js_1.bytesToHex)(innerInput);
return (0, encodeFunctionData_js_1.encodeFunctionData)({
abi: abis_js_1.paymasterAbi,
functionName: 'approvalBased',
args: [token, minAllowance, innerInputHex],
});
}
exports.getApprovalBasedPaymasterInput = getApprovalBasedPaymasterInput;
//# sourceMappingURL=getApprovalBasedPaymasterInput.js.map
;