Skip to main content

Fund your Wallet

Now that you have a wallet, the next step is to get test tokens for it. You can fund your wallet using portal.receiveTestnetAsset. If you are looking for a greater variety of test tokens, we recommend exploring our faucets page.
The chainId will need to be a CAIP-2 compliant Chain ID. For more info on Chain ID formatting, see this doc.

Sending Tokens from your Wallet

Portal provides two ways to send transactions:
  1. portal.sendAsset() - A simple method for sending tokens from your Portal wallet.
  2. portal.provider.request() - Direct access to the underlying web3 provider for custom transactions. (You can learn more about this method here.)
For most use cases, we recommend using portal.sendAsset() as shown in the examples below.

Submitting an EVM Transaction

The optional signatureApprovalMemo in SendAssetParams is shown to the user during the signing approval flow. The same memo is supported on portal.request(...) (via RequestOptions(signatureApprovalMemo = ...)) and portal.rawSign(...). See Sign a transaction.
Account Abstraction clients: txHash is a UserOperation hash, not an on-chain transaction hash — it will not resolve on a block explorer such as Etherscan or Monadscan. The on-chain transaction hash is only assigned once the bundler includes the UserOperation on-chain. Look up the UserOperation hash on a UserOp explorer such as JiffyScan to find the resulting transaction hash. See Account abstraction.

Submitting a Solana Transaction

You will need SOL to submit a Solana transaction, which is not currently supported by portal.receiveTestnetAsset. You can find a faucet to get test SOL tokens here.
You just sent your first token from your Portal wallet, that’s awesome! 🎉

Advanced: Retrying Sends Safely

To make a send safe to retry after a timeout, pass an idempotencyKey in SendAssetParams on EVM and Solana chains. Portal broadcasts a key at most once while it remembers the key (at least 24 hours), so a retry with the same key within that time cannot send the tokens twice.
See Idempotency keys for how retries behave, especially on Solana, and how to handle a rejected retry. You may have a more advanced use case than simply sending tokens from your Portal wallet. Next, we will dive into how to build your own transaction and also how to sign it (without submitting it).