Using Arka

When estimating a transaction with the SDK on testnets we support we can pass in the testnet api key value as ‘etherspot_public_key’ and set the mode of the transaction to be sponsored like so:

try {
const CHAIN_ID = 11155111;
const API_KEY = 'etherspot_public_key'; // replace this with your api key
const op = await primeSdk.estimate({ 
    url: `https://rpc.etherspot.io/paymaster?apiKey=${API_KEY}&chainId=${CHAIN_ID}&useVp=true`,
    context: { mode: 'sponsor' } 
    });
} catch(err) {
    console.log(err);
}

Supported testnets

  • Sepolia
  • Base Sepolia
  • Scroll Sepolia
  • Fuse Sparknet
  • Ancient8 Testnet
  • Flare Coston2
  • Rootstock testnet

This will use testnet funds and a paymaster we have specifically setup for devs to test out before trying sponsored transactions on mainnet.