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.
const chainId = 'eip155:10143'; // Monad Testnet
const params = {
amount: '0.01', // You will receive 0.01 MON
token: 'NATIVE', // Token, use "NATIVE" for the chain's native token
};
// Fund your Portal wallet
const response = await portal.receiveTestnetAsset(chainId, params);
console.log(`✅ Transaction hash: ${response.data.txHash}`);
Sending Tokens from your Wallet
Portal provides two ways to send transactions:
portal.sendAsset() - A simple method for sending tokens from your Portal wallet.
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
const chainId = 'eip155:10143'; // Monad Testnet
const params = {
amount: '0.0001', // Sends 0.0001 MON
to: '0xDestinationAddress', // The recipient address
token: 'NATIVE', // Token, use "NATIVE" for the chain's native token
signatureApprovalMemo: 'Send MON from web', // optional: shown during approval
};
// Send the tokens
const txHash = await portal.sendAsset(chainId, params);
console.log(`✅ Transaction hash: ${txHash}`);
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.
const chainId = 'solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1'; // Solana Devnet
const params = {
amount: '0.0001', // Sends 0.0001 SOL
to: '0xDestinationAddress', // The recipient address
token: 'NATIVE', // Token, use "NATIVE" for the chain's native token
};
// Send the tokens
const txHash = await portal.sendAsset(chainId, params);
console.log(`✅ Transaction hash: ${txHash}`);
Submitting a TRON Transaction
const chainId = 'tron:nile'; // TRON Nile testnet (use 'tron:mainnet' for production)
const params = {
amount: '1', // Sends 1 TRX
to: 'TRecipientAddress', // The recipient TRON address
token: 'NATIVE', // Token, use "NATIVE" for TRX (the chain's native token)
signatureApprovalMemo: 'Send TRX', // optional: shown during approval
};
// Send the tokens — returns the TRON transaction ID
const txId = await portal.sendAsset(chainId, params);
console.log(`✅ Transaction ID: ${txId}`);
You just sent your first token from your Portal wallet, that’s awesome! 🎉
If your client is using Account Abstraction, you can control whether Portal sponsors the gas fees for each transaction using the sponsorGas parameter in SendAssetParams. You can also pass an optional signatureApprovalMemo in SendAssetParams; it is displayed to the user during the signature approval flow.
Example: User Pays Gas
const chainId = 'eip155:11155111'; // Ethereum sepolia
const recipientAddress = '0x...';
const amount = '0.000001';
const token = 'NATIVE';
const params1 = {
to: recipientAddress,
amount,
token,
sponsorGas: false, // Portal client pays transaction fees
};
// Send the tokens
const txHash = await portal.sendAsset(chainId, params1);
By setting sponsorGas: false, the Portal client will pay for the transaction fees instead of having them sponsored. This is useful for testing or when you want users to pay for specific operations.
Omitting sponsorGas or setting it to true produces the same behavior - both will sponsor gas if your
environment is configured for AA on that chain. Only sponsorGas: false changes the default behavior to
disable sponsorship.
Learn more about gas sponsorship control in the Account Abstraction guide.
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).