UNPKG

@0xsequence/anypay-sdk

Version:

SDK for Anypay functionality

13 lines (11 loc) 371 B
import { AbiFunction, type Address } from "ox" import type { Hex } from "viem" export function getERC20TransferData(recipient: string, amount: bigint): Hex { const erc20Transfer = AbiFunction.from( "function transfer(address,uint256) returns (bool)", ) return AbiFunction.encodeData(erc20Transfer, [ recipient as Address.Address, amount, ]) as Hex }