iCoordinates.xyz
  • iCoordinates
    • Introduction
    • Getting Started
  • Features
    • Purchase Coordinates
    • Return Coordinates
    • Sell Coordinates
    • Auction Coordinates
    • Offer System
    • Lucky Draw
  • Operations
    • Owners of Coordinates
      • Customize Your Coordinates
      • Transfer Ownership of Your Coordinates
      • Return Your Coordinates
      • Putting Coordinates on Sale
      • Change Coordinates Price
      • Retract Coordinates from Sale
      • Put Coordinates on Auction
      • Cancel Auction for Your Coordinates
      • Confirm Auction as Owner
      • Accept Offer
      • Claim Lucky Draw Reward
    • Non-Owners of Coordinates
      • Purchase Coordinates
      • Buy Coordinates on Sale
      • Bid on Coordinates
      • Confirming an Auction
      • Making an Offer for Coordinates
      • Canceling an Offer
  • Protocol Accounts
    • Matrix Information
    • Coordinates
  • Developer
    • Smart Contract
      • Accounts
      • Error Code
      • Instructions
    • Integration with the Protocol
  • Terms and Policies
    • Terms and Conditions
    • Privacy Policy
Powered by GitBook
On this page
  1. Developer
  2. Smart Contract

Accounts

The iCoordinates protocol leverages distinct Solana account structures to operate seamlessly within the blockchain ecosystem, providing crucial functionalities and interactions for users. Below is a detailed description of the key account structures along with their corresponding code snippets:

  1. MatrixInfo:

    • Contains essential details related to the coordinate matrix, such as range limits, base mint, and protocol fee information.

    #[account]
    pub struct MatrixInfo {
        pub authority: Pubkey,
        pub x_range_min: i64,
        pub x_range_max: i64,
        pub y_range_min: i64,
        pub y_range_max: i64,
        pub base_mint: Pubkey,
        pub sold_number: u64,
        pub current_product: f64,
        pub last_transaction_timestamp: i64,
        pub protocol_fee_withdrawal: u64,
        pub protocol_min_portion: f32,
        pub protocol_max_portion: f32,
        pub protocol_portion: f32,
        pub luckydraw_portion: f32,
        pub luckydraw_withdrawal: u64,
    }
  2. LuckyDrawInfo:

    • Holds information about lucky draw events, including coordinates, timestamps, and reward details.

    #[account]
    pub struct LuckyDrawInfo {
        pub x: i64,
        pub y: i64,
        pub timestamp: i64,
        pub total_amount: u64,
        pub milestone: u64,
        pub lucky_draw_reward_taken: [bool; 9],
    }
  3. Coordinates:

    • Represents essential information for a coordinate, including owner details, contact information, and state.

    #[account]
    pub struct Coordinates {
        pub owner: Pubkey,
        pub x: i64,
        pub y: i64,
        pub color: [u8; 4],
        pub email: String,
        pub website: String,
        pub slogan: String,
        pub init_timestamp: i64,
        pub state: CoordinatesState,
        pub country: Country,
    }
  4. CoordinatesOnSale:

    • Contains details of coordinates available for sale, including coordinates and sale price.

    #[account]
    pub struct CoordinatesOnSale {
        pub x: i64,
        pub y: i64,
        pub price: u64,
    }
  5. OfferForCoordinates:

    • Captures data related to offers made on coordinates by users, such as coordinates, offered price, and offerer information.

    #[account]
    pub struct OfferForCoordinates {
        pub x: i64,
        pub y: i64,
        pub price: u64,
        pub offerer: Pubkey,
    }
  6. CoordinatesOnAuction:

    • Contains auction-related information for coordinates, including starting price, auction end time, last bid details, and bid count.

    #[account]
    pub struct CoordinatesOnAuction {
        pub x: i64,
        pub y: i64,
        pub starting_price: u64,
        pub auction_endtime: i64,
        pub last_price: u64,
        pub last_bidder: Pubkey,
        pub bid_times: u64,
    }

These well-defined account structures serve as the backbone of the iCoordinates protocol, enabling smooth operation and interaction within the Solana blockchain ecosystem.

PreviousSmart ContractNextError Code

Last updated 1 year ago