Skip to main content

How to Configure Smart Contract Settings

This guide provides step-by-step instructions for administrators on how to configure smart contract settings, manage blockchain networks, and set up fee structures on the WhiteLabel Community Deals Platform.

Table of Contents

  1. Overview
  2. Prerequisites
  3. Accessing Smart Contract Settings
  4. Configuring Blockchain Networks
  5. Managing Service Contract Details
  6. Setting Commission Rates
  7. Configuring Fee Recipients
  8. Advanced Tenant Settings
  9. Submitting Blockchain Transactions
  10. Best Practices
  11. Troubleshooting

Overview

Smart contracts are the backbone of the WhiteLabel Community Deals Platform, enabling secure and transparent token sales, transfers, and other blockchain operations. This guide covers:

  1. Configuring blockchain network settings
  2. Managing service contract details
  3. Setting up commission rates for different transaction types
  4. Configuring fee recipient addresses
  5. Adjusting advanced tenant settings
  6. Submitting blockchain transactions

Properly configured smart contract settings ensure that your platform operates efficiently and securely on the blockchain.

Prerequisites

Before you begin, ensure you have:

  • Admin access to the WhiteLabel Community Deals Platform
  • Basic understanding of blockchain technology and smart contracts
  • Access to wallet addresses for fee recipients
  • Knowledge of the blockchain networks you want to support
  • Understanding of commission rate structures

Accessing Smart Contract Settings

  1. Log in to your admin account and navigate to the Admin Dashboard.

  2. Access Platform Settings by clicking on "Platform Settings" in the left sidebar navigation menu.

  3. Locate the Smart Contract Settings section at the top of the Platform Settings page.

  4. Click the "Configure Contracts" button to access the smart contract configuration interface.

Configuring Blockchain Networks

The first step in configuring smart contracts is to set up the blockchain networks your platform will support:

  1. View Blockchain ID:

    • The system displays the current blockchain ID from system settings
    • This ID is used for tenant identification on the blockchain
    • Example: 0x6d6172736261736500000000000000000000
  2. Select Blockchain Networks:

    • Choose which blockchain networks to enable for your platform
    • Common options include:
      • Polygon
      • Ethereum
      • Other EVM-compatible networks
    • Click on a network to select it as the active network

Managing Service Contract Details

The Service Contract Details section shows information about the smart contracts deployed on the selected network:

  1. View Contract Address:

    • The system displays the current service contract address
    • This is the main contract that handles platform operations
    • Example: 0x12ce4E5b5d3ae7f47c7730C2CeDeF578f6ba54
  2. Copy Contract Address:

    • Click the copy icon to copy the contract address to clipboard
    • This address can be used to view the contract on a blockchain explorer
  3. Switch Networks:

    • Select a different network to view contract details for that network
    • Each network has its own deployed contracts

Setting Commission Rates

The Commission Rates section allows you to configure fees for different transaction types:

  1. Understand Rate Format:

    • Rates are specified in basis points (e.g., 100 = 1%)
    • Enter whole numbers only (no decimal points)
  2. Configure Transaction Type Rates:

    • P2P Rate: Commission percentage for peer-to-peer transfers
    • Token Sale Rate: Commission percentage for primary token sales
    • Staking Rate: Commission percentage for staking operations
    • Vesting Rate: Commission percentage for vesting releases
    • DAO Voting Rate: Commission percentage for DAO voting operations
  3. Save Changes:

    • After setting rates, scroll to the bottom and click "Save Changes"
    • The system will update the rates in the platform configuration

Configuring Fee Recipients

The Fee Recipients section allows you to specify wallet addresses that will receive commission fees:

  1. Platform Recipient:

    • Enter the wallet address that will receive platform fees
    • This is typically a treasury or operations wallet
    • Example: 0x0000000000000000000000000000000000000000
  2. Issuer Recipient:

    • Enter the wallet address that will receive issuer fees
    • This can be a default address that is overridden per issuer
    • Example: 0x0000000000000000000000000000000000000000
  3. Team Recipient:

    • Enter the wallet address that will receive team or developer fees
    • This is typically used for platform development funding
    • Example: 0x0000000000000000000000000000000000000000

Advanced Tenant Settings

The Advanced Settings section allows you to configure additional tenant-specific parameters:

  1. Tenant Metadata (JSON):

    • Enter tenant metadata in JSON format
    • This includes information like name, website, logo URL, etc.
    • This metadata is stored on the blockchain for reference
  2. Whitelist Requirements:

    • Toggle whether transactions for this tenant require whitelisting
    • When enabled, only whitelisted addresses can interact with contracts
    • This adds an additional security layer to your platform
  3. Investment Limits:

    • Configure minimum and maximum investment amounts for different transaction types:
      • P2P: Set limits for peer-to-peer transfers
      • Token Sale: Set limits for primary token sales
      • Staking: Set limits for staking operations
    • For each transaction type, configure:
      • Min Investment: Minimum amount allowed
      • Max Investment: Maximum amount allowed (0 for no limit)
      • Fee Threshold: Minimum amount for fee application

Submitting Blockchain Transactions

After configuring smart contract settings, you may need to submit these changes to the blockchain:

  1. Review All Settings:

    • Double-check all configuration parameters before submission
    • Ensure fee recipient addresses are correct
    • Verify commission rates are as intended
  2. Submit Transaction:

    • Click the "Submit Blockchain Transaction" button
    • The system will prepare a transaction to update contract settings
    • You may need to confirm the transaction in your wallet
  3. Monitor Transaction Status:

    • The system will display the transaction status
    • Wait for confirmation on the blockchain
    • Once confirmed, the new settings will take effect

Best Practices

To ensure optimal smart contract configuration:

  1. Start with low commission rates:

    • Begin with competitive rates to attract users
    • Adjust rates based on platform volume and market conditions
    • Consider different rates for different transaction types
  2. Use dedicated wallets for fee recipients:

    • Create separate wallets for different fee categories
    • Implement proper security measures for these wallets
    • Consider using multisig wallets for added security
  3. Test configuration changes:

    • Test any configuration changes in a staging environment first
    • Verify that fees are calculated and distributed correctly
    • Confirm that investment limits are enforced as expected
  4. Document your configuration:

    • Maintain records of all smart contract settings
    • Document the reasoning behind configuration choices
    • Create a change log for future reference
  5. Regular audits:

    • Periodically review smart contract settings
    • Verify that fee distributions are working correctly
    • Check that all blockchain transactions are processing as expected

Troubleshooting

Common Smart Contract Configuration Issues

IssueSolution
Transaction fails to submitCheck wallet connection, gas settings, and network status
Fees not being collectedVerify commission rates are set correctly and fee thresholds are appropriate
Investment limits not enforcingEnsure limits are configured correctly and the contract is updated
Contract address showing as invalidVerify network selection and contract deployment status
Whitelist not workingCheck whitelist configuration and ensure addresses are properly formatted

Technical Support

If you encounter persistent issues with smart contract configuration:

  1. Consult with your blockchain development team
  2. Review transaction logs on the blockchain explorer
  3. Check for contract upgrade requirements
  4. Consider engaging a smart contract audit service

By following this guide, you'll be able to effectively configure smart contract settings on the WhiteLabel Community Deals Platform, ensuring secure and efficient blockchain operations.