API Key management

Both API's are linked to the two paymaster contracts, the ERC20 paymaster and the Sponsored Paymaster.

ERC20 Paymaster

As a Dapp, when you send the required data to the erc20_paymaster endpoint, you do not need to manage an API key.

As a Dapp, if you want to send the required data to the erc20_sponsored_paymaster endpoint, you will need to manage API Key provided by Zyfi team.

This API Key can be used for both Mainnet and Testnet. Just specify the isTesnet:True function in the API call if you want to use the Testnet vault. More details in API documentation here.

To sponsor gas fees for your users, you must deposit ETH into a vault contract to sponsor gas. In order to deposit ETH into the vault contract, you have two options:

IMPORTANT: Never send ERC20 tokens to the vault; only send Native Token(ETH).

  1. Send ETH directly into the vault contract on ZKsync or another supported network from your wallet. Note: the API Key will be linked to this wallet address. Here are the vault addresses on ZKsync chains and here for all other chains: ZKsync Mainnet : 0x32faBA244AB815A5cb3E09D55c941464DBe31496 ZKsync Sepolia : 0xbA72A10ce8496DC9C13b9eE8c35fcCD3809d3C81

  2. Fund the account from another address:

    • Connect your wallet

    • Click "Write" and "depositToAccount"

    • Enter the payable amount (e.g., 0.1 for 0.1 ETH)

    • Enter the account you want to deposit for (e.g., your wallet depositor address in above point)

    • Click "Write" and send ETH

API Key Details

The API Key is always linked to one vault depositor address and can be used on both Testnet and Mainnet.

Example:

If you deposit 1 ETH into the mainnet vault at 0x32faBA244AB815A5cb3E09D55c941464DBe31496

or another 1 ETH into the testnet vault at 0xbA72A10ce8496DC9C13b9eE8c35fcCD3809d3C81

With the wallet address: 0x454cfaa623a629XXXXXXXXaeb85d54c42e91479d

The API Key: b854XXXX-XXXX-XXXX-XXXX-XXXXXXXXea10 will be linked to the funds of this wallet address in the vault.

You can always withdraw your vault balance from your vault depositor address.

Last updated