### Install Hardhat (npm) Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Installs the Hardhat development environment using npm. Ensure you have npm version 7 or higher. ```bash npm install --save-dev hardhat ``` -------------------------------- ### Contract Verification Example Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin An example of a successful contract verification command and its output, showing the contract address and verification status. ```bash PS D:\\verify-contract> npx hardhat verify --network sei_arctic_1 0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E "0xc99259dE8f9ec4cd443C0CF5D45D547c513E03be" Successfully submitted source code for contract contracts/VuNFT721.sol:VuSEI721 at 0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E for verification on the block explorer. Waiting for verification result... Successfully verified contract VuSEI721 on the block explorer. https://seitrace.com/address/0xaa338AbfB92e7476596D4cCb98b29700BDcA2a6E#code ``` -------------------------------- ### Environment File Setup Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Sets up environment variables for private key and Seitrace API key. The SEITRACE_KEY can be any arbitrary string. ```dotenv PRIVATE_KEY="4c1a9ffd2dce9ed5b5f464c6b6a38efceb051855d123c9e6aeec751c35762d91" SEITRACE_KEY="can-be-any-string" ``` -------------------------------- ### Install Hardhat (yarn) Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Installs the Hardhat development environment using yarn. Ensure you have npm version 7 or higher. ```bash yarn add --dev hardhat ``` -------------------------------- ### Example Provider Information Submission Source: https://docs.seitrace.com/earning/listing-new-earnings This JSON object demonstrates a complete submission of provider information. Ensure all fields match the `ProviderInfo` type definition. ```json { "provider_name": "Pit Finance", "provider_home_url": "", "provider_base_url": "", "provider_datasource_endpoint": "", "provider_logo": "", "provider_description": null, "how_to_stake": "Connect your wallet\nSelect a vault\nEnter the deposit amount\nApprove the transaction\nConfirm the deposit\nMonitor your position", "how_to_unstake": "Connect your wallet\nNavigate to your vault position\nSelect the amount to unstake\nConfirm the withdrawal\nReceive your assets" } ``` -------------------------------- ### Install Hardhat Etherscan Plugin (npm) Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Installs the Hardhat Etherscan plugin, which is required for contract verification. Ensure you are using version 3.0.0 or higher. ```bash npm install --save-dev @nomiclabs/hardhat-etherscan ``` -------------------------------- ### Install Hardhat Etherscan Plugin (yarn) Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Installs the Hardhat Etherscan plugin using yarn. This plugin is necessary for contract verification and requires version 3.0.0 or higher. ```bash yarn add --dev @nomiclabs/hardhat-etherscan ``` -------------------------------- ### Example Earning Listing Response Source: https://docs.seitrace.com/earning/listing-new-earnings This JSON object represents a typical response from the Seitrace API for listing available earnings. It includes details about yield aggregators, vault information, APR/APY, and deposit token specifics. ```json { "data": [ { "pool_type": "YIELD_AGGREGATOR", "pool_name": "WETH Vault", "pool_url": "", "pool_address": "0x0AEfC6F2E9a866ddB4813Cb1E897a2E9e26a1E53", "pool_image": "", "total_apr": 6.268655367391925, "total_apy": null, "is_auto_compound": false, "fee": 5, "tvl": 1579.50, "lock_period": null, "deposit_tokens": [ { "address": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8", "deposited_amount": 12064.4126408933883, "name": "Wrapped Ether", "symbol": "WETH", "icon_url": "", "decimals": 18, "coingecko_id": "wrapped-ether", "min_deposit": 0.01, "max_deposit": null } ], "aprs": [ { "type": "base", "apr": 6.0, "apy": null, "reward_token": { "address": "0x160345fC359604fC6e70E3c5fAcbdE5F7A9342d8", "name": "Wrapped Ether", "symbol": "WETH", "icon_url": "", "decimals": 18, "coingecko_id": "wrapped-ether" } }, { "type": "incentive", "apr": 0.268655367391925, "apy": null, "reward_token": { "address": "0xE30feDd158A2e3b13e9badaeABaFc5516e95e8C7", "name": "Wrapped SEI", "symbol": "WSEI", "icon_url": "", "decimals": 18, "coingecko_id": "wrapped-sei" } } ] } ] } ``` -------------------------------- ### Deploy Contract Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Command to run a deployment script for a contract on the sei_arctic_1 network. ```bash npx hardhat run .\scripts\\deploy.multicall.ts --network sei_arctic_1 ``` -------------------------------- ### Hardhat Configuration with Seitrace Network Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Configures Hardhat to support the Sokol test network (sei_arctic_1) and includes Seitrace API key and custom chain details for verification. ```typescript import dotenv from "dotenv"; import { HardhatUserConfig } from "hardhat/config"; import "@nomicfoundation/hardhat-toolbox"; import "tsconfig-paths/register"; import "@openzeppelin/hardhat-upgrades"; /** * Config dotenv first */ dotenv.config(); /** * Default hardhat configs */ const config: HardhatUserConfig = { solidity: { compilers: [ { version: "0.8.20", settings: { optimizer: { enabled: true, runs: 200, }, }, }, ], }, }; /** * Extract env vars */ const privateKey = process.env.PRIVATE_KEY || ""; /** * If private key is available, attach network configs */ if (privateKey) { config.networks = { sei_arctic_1: { url: "https://evm-rpc.arctic-1.seinetwork.io/", chainId: 713715, accounts: [privateKey], gas: "auto", gasPrice: "auto", }, }; } /** * Load etherscan key */ const seitraceKey = process.env.SEITRACE_KEY || ""; if (seitraceKey) { config.etherscan = { apiKey: { sei_arctic_1: seitraceKey, }, customChains: [ { network: "sei_arctic_1", chainId: 713715, urls: { apiURL: "https://seitrace.com/arctic-1/api", browserURL: "https://seitrace.com" } }, ], }; } export default config; ``` -------------------------------- ### Verify Contract Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Command to verify a deployed contract on the sei_arctic_1 network, including constructor arguments. ```bash npx hardhat verify --network sei_arctic_1 "Constructor argument" ``` -------------------------------- ### Add Plugin Reference to hardhat.config.js Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Adds the Hardhat Etherscan plugin reference to your JavaScript configuration file. ```javascript require("@nomiclabs/hardhat-etherscan"); ``` -------------------------------- ### Provider Information Type Definition Source: https://docs.seitrace.com/earning/listing-new-earnings This TypeScript type defines the structure for static provider information required by Seitrace. Use this to format the data you submit during onboarding. ```typescript type ProviderInfo = { provider_name: string; // Your official brand name (e.g., "Pit Finance"). provider_home_url: string; // URL of your project's main homepage (e.g., ""). provider_base_url: string; // Base URL used to construct individual pool links if needed (e.g., ""). Often the `pool_url` provided in the API is sufficient. provider_datasource_endpoint: string; // The functional API endpoint URL you created based on this documentation. provider_logo: string; // URL to your project's official logo (preferably SVG or high-res PNG). provider_description: string | null; // A brief description of your platform/service. how_to_stake: string | null; // Simple, newline-separated (\n) steps on how users typically stake/deposit on your platform. how_to_unstake: string | null; // Simple, newline-separated (\n) steps on how users typically unstake/withdraw on your platform. } ``` -------------------------------- ### IPoolInfo Structure for Yield Opportunities Source: https://docs.seitrace.com/earning/listing-new-earnings Defines the structure for individual yield opportunities, including details like pool type, name, URL, contract address, APR/APY, deposit tokens, fees, TVL, and lock period. Use this to represent each available pool. ```typescript type IPoolInfo = { pool_type: PoolType; // Specify pool type pool_name: string; // Clear, human-readable name of the pool/vault/strategy (e.g., "SEI/USDC", "wSEI"). pool_url: string; // Direct deep-link URL to the specific pool/vault page on the Provider's website. pool_address: string | null; // Contract address of the pool/vault on the Sei blockchain. Provide `null` if not applicable (e.g., for delegated staking). pool_image: string | null; // URL to an image/icon representing the pool (e.g., pair icons). `null` if not available. total_apr: number; // The overall total Annual Percentage Rate (APR) for the pool, calculated by summing all base and incentive APRs. **Represent as a percentage value (e.g., 15.5 for 15.5%).** total_apy: number | null; // The overall total Annual Percentage Yield (APY) if compounding is involved (auto-compounding or manual). **Represent as a percentage value (e.g., 16.7 for 16.7%).** Provide `null` if APY is not applicable or cannot be calculated. deposit_tokens: IDepositToken[]; // An array detailing the token(s) users need to deposit into this pool. See section 2.3. is_auto_compound: boolean | null; // Set to `true` if the rewards are automatically compounded back into the principal. Set to `false` if compounding is manual or not applicable. Provide `null` if unsure or not applicable. aprs: IAPR[]; // An array detailing the breakdown of different APR sources (base vs incentives). See section 2.4. fee: number | null; // Any performance fee, withdrawal fee, or deposit fee associated with the pool. **Represent as a percentage value (e.g., 5 for 5%).** Provide `null` if no fees apply. Clarify fee type with Seitrace team if ambiguous. tvl: number; // Total Value Locked in the pool, denominated in **USD**. lock_period: number | null; // If applicable, the lock-up period for staking/deposits in SECONDS (e.g., 86400 for a 1-day lock). Leave `null` if not applicable. } ``` -------------------------------- ### Dynamic Pool Data API Source: https://docs.seitrace.com/earning/listing-new-earnings This endpoint allows Seitrace to retrieve up-to-date information on your platform's yield pools and opportunities. It should return a JSON object containing an array of pool information. ```APIDOC ## GET /seitrace/pools ### Description Retrieves a list of available yield pools and opportunities offered by the provider. ### Method GET ### Endpoint `https://api.yourdomain.com/seitrace/pools` (This URL is an example and must be provided by the Provider during onboarding.) ### Parameters None ### Request Example None ### Response #### Success Response (200 OK) - **data** (array) - An array of `IPoolInfo` objects, each detailing a yield opportunity. #### Response Example ```json { "data": [ { "pool_type": "liquidity_pool", "pool_name": "SEI/USDC LP", "pool_url": "https://yourdomain.com/pools/sei-usdc", "pool_address": "sei1...", "pool_image": "https://yourdomain.com/images/sei-usdc.png", "total_apr": 15.5, "total_apy": 16.7, "deposit_tokens": [ { "token_symbol": "SEI", "token_address": "sei1...", "token_image": "https://yourdomain.com/images/sei.png" }, { "token_symbol": "USDC", "token_address": "sei1...", "token_image": "https://yourdomain.com/images/usdc.png" } ], "is_auto_compound": true, "aprs": [ { "type": "base", "value": 10.0 }, { "type": "incentive", "value": 5.5 } ], "fee": 2.0, "tvl": 1000000.0, "lock_period": null } ] } ``` ### Data Structures #### `IPoolInfo` - **pool_type** (string) - Required - Specify pool type (e.g., "liquidity_pool", "staking_pool", "vault"). - **pool_name** (string) - Required - Clear, human-readable name of the pool/vault/strategy. - **pool_url** (string) - Required - Direct deep-link URL to the specific pool/vault page on the Provider's website. - **pool_address** (string | null) - Optional - Contract address of the pool/vault on the Sei blockchain. Provide `null` if not applicable. - **pool_image** (string | null) - Optional - URL to an image/icon representing the pool. `null` if not available. - **total_apr** (number) - Required - The overall total Annual Percentage Rate (APR) for the pool, as a percentage value (e.g., 15.5 for 15.5%). - **total_apy** (number | null) - Optional - The overall total Annual Percentage Yield (APY) if compounding is involved. Represent as a percentage value (e.g., 16.7 for 16.7%). Provide `null` if not applicable. - **deposit_tokens** (array) - Required - An array detailing the token(s) users need to deposit into this pool. See `IDepositToken` structure. - **is_auto_compound** (boolean | null) - Optional - `true` if rewards are auto-compounded, `false` if manual. `null` if unsure or not applicable. - **aprs** (array) - Required - An array detailing the breakdown of different APR sources. See `IAPR` structure. - **fee** (number | null) - Optional - Any performance fee, withdrawal fee, or deposit fee associated with the pool. Represent as a percentage value (e.g., 5 for 5%). Provide `null` if no fees apply. - **tvl** (number) - Required - Total Value Locked in the pool, denominated in USD. - **lock_period** (number | null) - Optional - If applicable, the lock-up period for staking/deposits in SECONDS. Leave `null` if not applicable. #### `IDepositToken` - **token_symbol** (string) - Required - Symbol of the deposit token (e.g., "SEI"). - **token_address** (string) - Required - Contract address of the deposit token on the Sei blockchain. - **token_image** (string) - Required - URL to an image/icon representing the token. #### `IAPR` - **type** (string) - Required - Type of APR (e.g., "base", "incentive"). - **value** (number) - Required - The APR value as a percentage (e.g., 10.0 for 10.0%). ``` -------------------------------- ### Add Plugin Reference to hardhat.config.ts Source: https://docs.seitrace.com/verify-contract/hardhat-verification-plugin Adds the Hardhat Etherscan plugin reference to your TypeScript configuration file. ```typescript import "@nomiclabs/hardhat-etherscan"; ``` -------------------------------- ### Deposit Token Information Type Source: https://docs.seitrace.com/earning/listing-new-earnings Defines the structure for information about tokens accepted for deposit into a pool. Includes details like contract address, deposited amount, name, symbol, icon, decimals, CoinGecko ID, and deposit limits. ```typescript type IDepositToken = { address: string; // Contract address of the deposit token on Sei. deposited_amount: number | null; // Total amount of THIS token currently deposited in the pool across all users. (e.g., 12064.41). Provide `null` if not available. name: string | null; // Human-readable name (e.g., "Wrapped Ether"). Provide `null` if not readily available*. symbol: string | null; // Ticker symbol (e.g., "WETH"). Provide `null` if not readily available*. icon_url: string | null; // URL to the token's icon. Provide `null` if not available*. decimals: number | null; // The token's decimal precision (e.g., 18). Crucial for correct value interpretation. Provide `null` if not readily available*. coingecko_id: string | null; // The CoinGecko identifier for the token (e.g., "wrapped-ether"). Helps Seitrace fetch market data. Provide `null` if not available*. min_deposit: number | null; // Minimum amount of this token required for a single deposit transaction. Provide `null` if no minimum. max_deposit: number | null; // Maximum amount of this token allowed for a single deposit transaction. Provide `null` if no maximum. }; ``` -------------------------------- ### Response Structure for Pool Data Source: https://docs.seitrace.com/earning/listing-new-earnings The top-level JSON response must contain a 'data' key holding an array of IPoolInfo objects. This structure is used to return details for each yield opportunity. ```typescript export type Response = { data: IPoolInfo[]; // Array containing details for each pool/vault/opportunity } ``` -------------------------------- ### Reward Token Information Type Source: https://docs.seitrace.com/earning/listing-new-earnings Defines the structure for details about the token distributed as rewards. Includes contract address, name, symbol, icon URL, decimals, and CoinGecko ID. ```typescript type IRewardToken = { address: string; // Contract address of the reward token on Sei. name: string | null; // Human-readable name (e.g., "Wrapped SEI"). Provide `null` if not readily available*. symbol: string | null; // Ticker symbol (e.g., "WSEI"). Provide `null` if not readily available*. icon_url: string | null; // URL to the token's icon. Provide `null` if not available*. decimals: number | null; // The token's decimal precision. Provide `null` if not readily available*. coingecko_id: string | null; // The CoinGecko identifier. Provide `null` if not available*. }; ``` -------------------------------- ### Reward Breakdown Type and Enum Source: https://docs.seitrace.com/earning/listing-new-earnings Defines the structure for individual reward components contributing to a pool's APR, specifying the reward token, type (base or incentive), and its associated APR/APY. Use this to detail how rewards are composed. ```typescript enum RewardType { BASE = 'base', // Yield generated directly from the pool's core activity (e.g., trading fees for LPs, protocal reward, yield bearing tokens). INCENTIVE = 'incentive', // Additional rewards provided, often in a different token, to incentivize participation. } type IRewardData = { reward_token: IRewardToken; // Details of the token being paid out as reward for this specific APR component. See section 2.5. type: RewardType; // Must be either 'base' or 'incentive'. apr: number | null; // The APR for this specific component. **Represent as a percentage value (e.g., 10.2 for 10.2%).** Provide `null` only if absolutely unavailable. apy: number | null; // The APY for this specific component, *if applicable and calculable separately*. Often `null` as total APY is usually calculated at the pool level. **Represent as a percentage value.** }; ``` -------------------------------- ### Pool Type Enum Source: https://docs.seitrace.com/earning/listing-new-earnings Defines the possible classifications for different types of investment pools available on the platform. Use this enum to categorize pools by their primary function. ```typescript export enum PoolType { LP = 'LP', // Liquidity Pool Provision DELEGATED = 'DELEGATED', // Native Staking Delegation LIQUID = 'LIQUID', // Liquid Staking Tokens YIELD_AGGREGATOR = 'YIELD_AGGREGATOR', // Vaults, Auto-compounders LENDING = 'LENDING', // Money Markets } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.