Skip to main content
Send ETH and ERC-20 token transfers securely using Para’s wallet infrastructure.

Prerequisites

You need Web3 libraries configured with Para authentication.

Setup Web3 Libraries

Send ETH

import { ethers } from "ethers";
import { ParaEthersSigner } from "@getpara/ethers-v6-integration";

async function sendETH(
  signer: ParaEthersSigner,
  toAddress: string,
  amountInEther: string
) {
  const tx = await signer.sendTransaction({
    to: toAddress,
    value: ethers.parseEther(amountInEther)
  });

  const receipt = await tx.wait();

  return {
    hash: tx.hash,
    blockNumber: receipt.blockNumber,
    gasUsed: receipt.gasUsed.toString()
  };
}

Send ERC-20 Tokens

import { ethers } from "ethers";

const ERC20_ABI = [
  "function transfer(address to, uint256 amount) returns (bool)"
];

async function sendToken(
  signer: any,
  tokenAddress: string,
  toAddress: string,
  amount: string,
  decimals: number
) {
  const contract = new ethers.Contract(tokenAddress, ERC20_ABI, signer);
  const parsedAmount = ethers.parseUnits(amount, decimals);

  const tx = await contract.transfer(toAddress, parsedAmount);
  const receipt = await tx.wait();

  return {
    hash: tx.hash,
    blockNumber: receipt.blockNumber,
    gasUsed: receipt.gasUsed.toString()
  };
}

Next Steps