> For the complete documentation index, see [llms.txt](https://champlify-labs-llc.gitbook.io/ssow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://champlify-labs-llc.gitbook.io/ssow/whale-shadows/how-to-obtain/block-explorer/shadows-contract.md).

# Shadows Contract

You can sync your Whale Shadows by directly interacting with the Shadow NFT contract on each supported chain using the `read()` function.

> **Contract Addresses**: For the specific Shadow NFT and Beacon contract addresses on each chain, see [Via Block Explorer](/ssow/whale-shadows/how-to-obtain/block-explorer.md).

## Overview

The `read()` function on the Shadow contract is a helper that in turn calls the `read()` function on the Beacon contract. It triggers an ownership update for specific token IDs by querying the LayerZero network to verify the current owner on Ethereum.

## Step-by-Step Instructions

### Step 1: Get a LayerZero Fee Quote (Optional but Recommended)

Before calling the `read()` function, you should get a quote for the LayerZero fees:

1. Go to the **Beacon contract** on your target chain (see [contract addresses](/ssow/whale-shadows/how-to-obtain/block-explorer.md))
2. Open the contract in the appropriate **block explorer** (see [block explorer links](/ssow/whale-shadows/how-to-obtain/block-explorer.md))
   * search for the Beacon contract address in the search bar
   * Select the **"Contract"** tab
3. Navigate to the **"Read"** tab
4. Use the `quoteRead` function with these parameters:
   * **baseCollectionAddress**: `0x88091012eedf8dba59d08e27ed7b22008f5d6fe5` (SSoW contract)
   * **tokenIds**: Array of your whale token IDs (e.g., `[1234,5678]`) (separate the token IDs with commas, no spaces between the IDs)
   * **eids**: Array with Ethereum's EID `[30101]`
   * **supplementalGasLimit**: `0` (unless you know you need more)
5. The output will be a quote **in wei**. You'll need to convert this to **native currency** (denoted as ether in the contracts, but may vary by chain) for the next step.

**Converting Wei to Native Currency:**

* The quote output is in wei (e.g., `396743845460449060`)
* To convert to the native currency: divide by 10^18 (i.e. move the decimal point 18 places to the left) or use an online converter
* Examples:
  * `396743845460449060` wei = `0.396743845460449060` in $APE
  * `95782692294585` wei = `0.000095782692294585` in $ETH
* **ApeChain**: Native currency is ApeCoin (APE)
* **Abstract**: Native currency is Ether (ETH)
* Most block explorers show both values when you click the result

### Step 2: Call the Read Function

1. Go to the **Shadow NFT contract** on your target chain (see [contract addresses](/ssow/whale-shadows/how-to-obtain/block-explorer.md))
2. Open the contract in the appropriate **block explorer** (see [block explorer links](/ssow/whale-shadows/how-to-obtain/block-explorer.md))
   * search for the Shadow contract address in the search bar
   * Select the **"Contract"** tab
3. Navigate to the **"Write"** tab
4. Connect your wallet (`Connect to Web3`)
5. Use the `read` function with these parameters:
   * **tokenIds**: Array of your whale token IDs (e.g., `[1234, 5678]`)
   * **eids**: Array with Ethereum's EID `[30101]`
   * **payableAmount**: The quote from Step 1 **converted to native currency units** (e.g., `0.311741542926477626`)
     * If you skipped the optional Step 1, you can put in around $1-2 USD worth of the chain's native currency. You will be refunded any extra you send.
6. Click **"Write"** and confirm the transaction in your wallet

> **Important**: The `payableAmount` field expects the value in **native currency units** (APE on ApeChain, ETH on Abstract), not wei. Make sure to convert the quote from Step 1 before entering it.

### Step 3: Track Progress

1. Copy your transaction hash
2. Go to [LayerZero Scan](https://layerzeroscan.com)
3. Paste your transaction hash to track the cross-chain verification progress
4. The process typically takes about 1 minute to complete
5. Check shadow token transfers using the tokens page in the respective block explorer
   * https\://\<block explorer>/token/\<shadow token address> (e.g., `https://apescan.io/token/0x3C3E92B627a817832DEd520Da5640246c9AAAF65`)

## Important Notes

* **Overpaying is Safe**: If you overpay the LayerZero fee, you'll automatically be refunded the difference
* **Estimation**: You can estimate the fee (\~25-30 cents USD) instead of getting an exact quote
* **Multiple Tokens**: You can update multiple token IDs in a single transaction.
* **Chain-Specific**: You need to call this function on each chain where you want to sync your Shadows

## Troubleshooting

If your Shadow doesn't update as expected:

1. Verify your token ownership on Ethereum
2. Check if you have any active delegations using the ExclusiveDelegateResolver
3. Ensure you're using the correct LayerZero EID (30101 for Ethereum)
4. Wait a few minutes and check LayerZero Scan for completion status
