Testing Integration
Use sandbox environments to test your SDK integration
Service providers generally have a sandbox environment to test purchases and token swaps in a non-production environment. However, one service we use, LI.FI does not have a testnet environment available. Instead we create a "cheap" (around $0.25) transaction that swaps tokens from USDT to the chosen token on the chain specified.
To use the sandbox environment, setup your sdk configuration with the dev
flag set to true.
import { createOnRampConfig } from 'zksync-easy-onramp';
createOnRampConfig({
integrator: "ZKsync Easy OnRamp Demo",
dev: true
},);
Service sandboxes
Each service may require additional configurations like mock KYC verification. Refer to their documents for completing sandbox environment setup.