Configuration

Learn how to configure:

  1. AI endpoints (Deepseek, OpenAI, Anthropic, Llama)

    • Set via environment variables:

      DEEPSEEK_API_KEY="your_deepseek_key"
      OPENAI_API_KEY="your_openai_key"
      ANTHROPIC_API_KEY="your_anthropic_key"
      LLAMA_API_KEY="your_llama_key"
  2. Tokens using a List<TokenConfig>, including optional triggerName:

    • Ethereum tokens (ERC20, ERC721, ERC1155)

    • Solana tokens (SPL, Metaplex NFT)

  3. Web3 provider strictly via environment variables:

    • Ethereum: ETH_PROVIDER_URL

    • Solana: SOL_PROVIDER_URL

Creating NAREONSettings.asset

  1. Right-click in your Project windowCreate → NAREON → Settings

  2. Name it something like NAREONSettings.asset

  3. In the Inspector, fill in:

    • gameContract: Multi-chain game contract configuration:

      {
          "ethereum": "0xYourEthereumGameContract",
          "solana": "YourSolanaProgramId"
      }
    • tokens: A list of TokenConfig. Each entry includes:

      • tokenName: e.g. "GoldCoin", "DragonNFT", etc.

      • network: "ethereum" or "solana"

      • For Ethereum tokens:

        • contractAddress: The on-chain address of your ERC20/721/1155 contract

        • tokenType: An enum (ERC20, ERC721, ERC1155)

        • defaultAmount: Typically how many tokens to transfer (for ERC20) or 1 for a single NFT

        • tokenId: For ERC721/1155, the ID to mint or transfer

      • For Solana tokens:

        • mintAddress: The token's mint address or collection address

        • tokenType: An enum (SPL, MetaplexNFT)

        • defaultAmount: Amount to transfer (for SPL) or 1 for NFT

        • metadataFormat: For NFTs, either "standard" or "compressed"

      • triggerName: An optional string (e.g. "OnQuestComplete") if you want to handle token logic based on events

Example configurations:

{
    "tokens": [
        {
            "tokenName": "GoldCoin",
            "network": "ethereum",
            "contractAddress": "0x1234...",
            "tokenType": "ERC20",
            "defaultAmount": 100,
            "triggerName": "OnQuestComplete"
        },
        {
            "tokenName": "GoldCoin",
            "network": "solana",
            "mintAddress": "7xKXtg2...",
            "tokenType": "SPL",
            "defaultAmount": 100,
            "triggerName": "OnQuestComplete"
        },
        {
            "tokenName": "DragonNFT",
            "network": "ethereum",
            "contractAddress": "0xABCD...",
            "tokenType": "ERC721",
            "tokenId": 1,
            "triggerName": "OnDragonCapture"
        },
        {
            "tokenName": "DragonNFT",
            "network": "solana",
            "mintAddress": "AKxZWve...",
            "tokenType": "MetaplexNFT",
            "metadataFormat": "standard",
            "triggerName": "OnDragonCapture"
        }
    ]
}

Important: We do not store the Web3 provider URLs here. Those are set via environment variables:

# Ethereum provider
export ETH_PROVIDER_URL="https://mainnet.infura.io/v3/your-key"

# Solana provider
export SOL_PROVIDER_URL="https://api.mainnet-beta.solana.com"

Additional Notes:

  • Use testnet providers during development

  • Keep API keys and provider URLs secure

  • Test configurations on testnets first

  • Validate token addresses before deployment

Last updated