Portal’s React Native SDK integrates with Blockaid to provide real-time security scanning for transactions, addresses, tokens, and URLs. This integration helps detect malicious activity, phishing attempts, scam tokens, and suspicious interactions before users sign or submit transactions.
Overview
The Blockaid integration enables you to:
- Scan transactions before signing or submission (EVM, Solana, Tron)
- Scan addresses for known malicious actors or compromised contracts
- Validate tokens to detect scams or security risks
- Verify URLs to prevent phishing attacks
Prerequisites
Before using Blockaid security scanning, ensure you have:
- A properly initialized Portal client
- Blockaid integration enabled in your Portal Dashboard (see Blockaid Integration)
Scanning EVM Transactions
Use scanEVMTx to analyze Ethereum transactions before signing or broadcasting them. This method scans EVM transactions for malicious contract interactions, risky approvals, phishing attempts, and other on-chain security threats.
Scanning Solana Transactions
Use scanSolanaTx to analyze Solana transactions before signing. This method detects malicious program invocations, suspicious token movements, and other Solana-specific risks.
Scanning Tron Transactions
Use scanTronTx to analyze Tron transactions before signing. This method detects malicious smart contract interactions, suspicious token movements, and other Tron-specific security risks.
scanTronTx is only supported on Tron mainnet (tron:mainnet). Passing a testnet chain identifier such as tron:shasta or tron:nile will throw an error.
The request object maps to the following fields:
Handling scan responses
All transaction scan methods return a response with a validation object containing a result_type field. The possible values are:
EVM and Tron
For EVM and Tron, validation is at the top level of the response:
Solana
For Solana, validation is nested under result:
Scanning Addresses
Use scanAddress to analyze a single address for known security risks. This method can be used for both EVM and Solana addresses and detects malicious contracts, compromised wallets, sanctioned addresses, and other flagged entities.
EVM Address Scan
Solana Address Scan
Scanning Tokens
Use scanTokens to analyze multiple tokens in a single request for known security risks. This method detects scam tokens, honeypots, compromised contracts, and other malicious token behavior.
Scanning URLs
Use scanURL to detect phishing sites and malicious domains before users navigate to them. This method helps protect users from social engineering attacks and malicious off-chain activity.
Next Steps