Koi Paymaster Service
Integrate the Mute Paymaster into your dApp
By utilizing zkSync Era account abstraction paymasters, Mute allows for gas to be paid with other tokens instead of ETH.
This is a free to use service.
Integration
You can easily integrate the Mute Paymaster into your dApp - Official documentation Official Paymaster Address
const PAYMASTER_ADDRESS = '0x4ae2Ba9A5C653038C6d2F5D9F80B28011A454597'
...
// approve the token for spending via the paymaster
...
const greeting = "a new greeting";
const tx = await greeter.populateTransaction.setGreeting(greeting);
const gasPrice = await sender.provider.getGasPrice();
const gasLimit = await greeter.estimateGas.setGreeting(greeting);
const paymasterParams = utils.getPaymasterParams(testnetPaymaster, {
type: "ApprovalBased",
TOKEN_ADDRESS,
minimalAllowance: ethers.BigNumber.from(1),,
innerInput: new Uint8Array(),
});
const sentTx = await sender.sendTransaction({
...tx,
maxFeePerGas: gasPrice,
maxPriorityFeePerGas: BigNumber.from(0),
gasLimit,
customData: {
gasPerPubdata: utils.DEFAULT_GAS_PER_PUBDATA_LIMIT,
paymasterParams,
},
});
Supported Tokens
Last updated
Was this helpful?