Send Transactions (Gasless)

Send transactions from your user's wallet without having gas fees.

Paper will airdrop the required tokens into their wallet and execute the transaction in one action.

Use cases

  • Transfer the native coin or ERC-20 token to another wallet or contract.
  • List an NFT on a marketplace.
  • Transfer an NFT to another wallet.
  • Update metadata on an NFT.

Prerequisites

Example

// Get signer for an authenticated user.
const { user } = await sdk.auth.loginWithPaperModal();
const signer = await user.wallet.getEthersJsSigner();

const params = {
  contractAddress: "0xb2369209b4eb1e76a43fAd914B1d29f6508c8aae",
  methodInterface:  "function claimTo(address _to, uint256 _tokenId, uint256 _quantity) external",
  methodArgs: [initializedUser.walletAddress, 1, 1],
};
const { transactionHash } = await initializedUser.wallet.gasless.callContract(params);

Reference: gasless.callContract