Skip to content

[Feature Request] Add ERC-20 Token Balance Support (USDT/USDC) in Flutter AppKit #160

@amitvrin

Description

@amitvrin

Is your feature request related to a problem? Please describe.
Yes. I’m integrating USDT and USDC wallets using the Reown Flutter AppKit in my app. However, there’s currently no method exposed in the Flutter SDK to fetch the ERC-20 token balance of a connected wallet address.

This is important for any dApp that wants to display a user’s USDT or USDC balance before performing operations like approve, investInCampaign, or any custom smart contract interaction.

Describe the solution you’d like
I’d like Reown AppKit to expose a method like:

Future<BigInt> getERC20TokenBalance({
  required String contractAddress,
  required String walletAddress,
});

Or alternatively:

Future<String> getTokenBalance({
  required String contractAddress,
  required int decimals,
});

Which can return the balance of any ERC-20 token (like USDT or USDC) for the currently connected wallet.

This would work similar to how web3dart or Ethers.js handles token balances via:

function balanceOf(address) view returns (uint256)

Describe alternatives you’ve considered
• I’ve tried using web3dart separately, but it requires setting up an RPC node (Infura or Alchemy), which I’m trying to avoid to reduce 3rd-party dependencies.
• I also reviewed the current Flutter AppKit core methods, but none seem to expose a method to fetch ERC-20 balances.
• I attempted using custom contract calls manually with AppKit.executeContractCall(...), but it’s not ideal without a utility method or helper to simplify the ABI encoding and response decoding.

Additional context
• Many blockchain apps need to show token balances before allowing interactions.
• Without this, users cannot confirm whether they have enough tokens to proceed with investments or transactions.
• Please consider exposing a utility method in the AppKit Flutter SDK similar to getTokenBalance().

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions