Testing on Göerli

Testing on Ethereum's Göerli testnet allows developers to test on a live chain & see a FunWallet's Transactions displayed on a block explorer.

In order to test on Göerli, a FunWallet must first cover gas by either having Göerli ETH or having authorization to use a Paymaster deployed on Göerli. To obtain Goerli eth, you can contact us or request funds from a faucet.

Additionally, to test on Göerli, the Environment Config's chain variable must be set to "ethereum-goerli".

The chainID of the Göerli testnet is 5.

Full Example

The following example flow showcases how to create a new FunWallet on Göerli & perform a swap between ETH & DAI:

const { FunWallet, configureEnvironment } = require("fun-wallet")
const { Eoa } = require("fun-wallet/auth")
const { fundWallet } = require("fun-wallet/utils")
const PRIVATE_KEY = "0x98e9cfb323863bc4bfc094482703f3d4ac0cd407e3af2351c00dde1a6732756a"
const API_KEY = "MYny3w7xJh6PRlRgkJ9604sHouY2MTke6lCPpSHq"
const swap = async () => {
await configureEnvironment({
apiKey: API_KEY,
chain: "ethereum-goerli"
const auth = new Eoa({ privateKey: PRIVATE_KEY })
const uniqueId = await auth.getUniqueId()
const wallet = new FunWallet({ uniqueId })
await fundWallet(auth, wallet, 1)
const receipt = await wallet.swap(auth, {
in: "eth",
amount: .001,
out: "dai",