> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Enhance your wallets' security with Blockaid

> Learn how to integrate real-time transaction, address, token, and URL security scanning using Portal's React Native SDK with Blockaid.

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)
* **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](../../../integrations/Security/blockaid))

## 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.

```typescript theme={null}
async function scanEvmTransaction(portal: Portal) {
  const response = await portal.security.blockaid.scanEVMTx({
    from: '0x7C01728004d3F2370C1BBC36a4Ad680fE6FE8729',
    to: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
    chain: 'eip155:1',
    data: '0x095ea7b3...',
    value: '0x0',
    gas: '0x2dc6c0',
    gasPrice: '0x2dc6c0',
    nonce: '0x924',
  })

  console.log('Blockaid EVM scan response:', response)
}
```

***

## 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.

```typescript theme={null}
async function scanSolanaTransaction(portal: Portal) {
  const response = await portal.security.blockaid.scanSolanaTx({
    rawTransaction:
      'AQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAQADCQkVR3SiiKbW0l4c3NBsEn6+zn1o0YsyypPwN0GUhg4K5HK0Tb5GckDLYW+MsovQASt5EZ3bSH3nluRJAE69H61w0BRUDTrpYQcXosUun6/z2BROkRoH/1bL7KLU9s4lCav6k3ZZgV6qeZFwu4pu89WoIGaqUxG4C93XwVmmDy81v8qBaCSP4/UZfdo3q1bud/W+ixymkH8IMe0laQZYrSx4Uhyxec67hYm1VqLV7JTSSYaC/fm7KvWtZOSRzEFT2gMGRm/lIRcy/+ytunLDm+e8jOW7xfcSayxDmzpAAAAAT4tlY/P4mFG1wDJl0ektVggHiZf73lTlHBVJ3fK0nDoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANG5fPtlMEOI/eXV7aPDlpcdLUKm8L3VoW6k/oJlCNLaBQYABQLARQQABgAJAwYAAAAAAAAABzwACQoLCwgyMzQMNQ0ONjcPEDg5EgETFBUWOhEXGBkaGxwdHh8gISI7IyQlJicCKCkqKywtAwQuLzAxPBFVCg8JAQcHBgYBAAAAAwHwCgYBExUbBgICAAAPAwIAAAYBISMoEQQBGQAPAwIAAAYBLjA2DwMCAAAGAgIAAAAIBgYICAADAQkGCQUFBgACBQAEBwEAAAgCAAUMAgAAADwaAAAAAAAABgAFBGDMBQAEPPm21Wu6wrmHu23/ZFNIumpp+ADooZjd4JQgvjnBxkUJAgEDBqWqCgmmCAUIBwu1tp+gcP/+Ri3C1tRXUbPdgqo6rVsj/qnqC959wTdC/mRARysLz9HS09TW19jZ2tsC1QYsNrdxMcm5Nq5FXZrM0IXpEA+ApFa+pz/JvkLz0+2vnwuztLW2t7i5uru8vgAPvBv8VUeRwDy9yD1NHIH5Ji6ZA+zrmpHejKOz4MP8SwrKy8zNzs/S09TVAdY=',
  })

  console.log('Blockaid Solana scan response:', response)
}
```

***

## 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

```typescript theme={null}
async function scanEvmAddress(portal: Portal) {
  const response = await portal.security.blockaid.scanAddress({
    chain: 'eip155:1',
    address: '0x31c05d73f2333b5a176cfdbb7c5ef96ec7bb04ac',
  })

  console.log('Blockaid EVM address scan response:', response)
}
```

Solana Address Scan

```typescript theme={null}
async function scanSolanaAddress(portal: Portal) {
  const response = await portal.security.blockaid.scanAddress({
    chain: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp',
    address: 'BBQUMqaFELxTFh8r1xSttYMHX6ZKzLWhsmGod2vuxgEc',
  })

  console.log('Blockaid Solana address scan response:', response)
}
```

***

## 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.

```typescript theme={null}
async function scanTokens(portal: Portal) {
  const response = await portal.security.blockaid.scanTokens({
    chain: 'eip155:1',
    tokens: [
      '0x66587563e933bbf3974b89156b47bb82b921eb35',
      '0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d',
    ],
  })

  console.log('Blockaid token scan response:', response)
}
```

***

## 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.

```typescript theme={null}
async function scanURL(portal: Portal) {
  const response = await portal.security.blockaid.scanURL({
    url: 'https://ethlen.com',
  })

  console.log('Blockaid URL scan response:', response)
}
```

***

## Next Steps

* Learn about [signing transactions](./sign-a-transaction)
* Explore [transaction evaluation](./evaluate-a-transaction)
* Review [Portal API methods](./portal-api-methods)
* Check out the [Blockaid Integration setup](../../../integrations/Security/blockaid)
