OPI

OctopiCoin price
OPI

This is a preview page.
For more details on listing tiers, refer to Listings Review Criteria Section B - (3).
Total supply
1000T OPI
Max. supply
1P OPI
Self-reported circulating supply
1000T OPI
99.9999999999865%


OctopiCoin community

skeleton-white
 
 
 
 
 
 

OctopiCoin News

  • Top
    Top
  • Latest
    Latest
CMC Daily Analysis

About OctopiCoin

Project Description:

The code provided represents a Solidity smart contract for a token called "OctopiCoin" (OPI). The contract implements functionalities such as token transfers, approvals, allowances, and a transaction tax mechanism. Below is a detailed description of the project based on the code:

  1. Token Details:

    • Name: "OctopiCoin"
    • Symbol: "OPI"
    • Decimals: 18
    • Total Supply: The initial supply is set to 1,000,000,000,000,000 (1 quadrillion) tokens, defined in the constructor.

  2. Token Balances and Allowances:

    • The contract maintains a mapping called _balances, which maps addresses to their corresponding token balances.
    • The _balances mapping is private, meaning it can only be accessed from within the contract.
    • The contract also maintains a mapping called _allowances, which allows token holders to approve other addresses to spend tokens on their behalf.

  3. Transaction Taxes and Buyback Fee:

    • The contract implements a transaction tax mechanism, where a percentage of tokens is deducted from each transaction.
    • The transaction tax percentage is defined by the _transactionTax variable, initially set to 4%.
    • Additionally, a buyback fee is applied to the transaction tax amount, defined by the _buybackFee variable, initially set to 1%.
    • The deducted tax amount is sent to a predefined tax receive address (_taxReceiveAddress), which is set to 0x47F2c317d989108553c43b901433Ab196eC571d7.

  4. Burn Percentage:

    • The contract implements a burning mechanism, where a percentage of tokens is burned (destroyed) in each transaction.
    • The burn percentage is defined by the _burnPercentage variable, initially set to 10%.
    • The burned tokens are permanently removed from the total supply.
    • The total amount of burned tokens is tracked by the _totalBurned variable.

  5. Sell Restriction Time:

    • The contract includes a sell restriction mechanism, which prevents token holders from selling their tokens for a specified period.
    • The sell restriction time is defined by the _sellRestrictionTime variable, initially set to 1 week (604,800 seconds).
    • The canSellTokens() internal function checks if a token holder can sell their tokens based on the time elapsed since their last purchase.
    • If the sell restriction time has passed, the token holder is allowed to transfer tokens.

  6. Ownership and Function Modifiers:

    • The contract includes an owner address, _owner, which is set to the deployer of the contract.
    • The onlyOwner modifier ensures that certain functions can only be called by the contract owner.
    • The modifier requires the message sender (caller) to be the same as the contract owner.

  7. Contract Initialization:

    • The constructor function is called upon contract deployment.
    • It sets the initial supply of tokens to the contract owner's address and adds the owner to the _holders array.

  8. Token Transfer Functions:

    • The contract provides functions for transferring tokens between addresses (transfer() and transferFrom()).
    • These functions enforce the sell restriction time using the canSellTokens() modifier before allowing token transfers.
    • The _transfer() internal function handles the actual transfer of tokens and applies the transaction taxes, buyback fees, and burning.

  9. Approval and Allowance Functions:

    • The contract provides functions for approving and checking token allowances (approve() and allowance()).
    • These functions allow token holders to approve other addresses to spend tokens on their behalf.

  10. Getter Functions

: - The contract provides various getter functions to retrieve token-related information, including total supply (totalSupply()), token balances (balanceOf()), purchase timestamps (purchaseTimestamp()), and the sell restriction time (sellRestrictionTime()).

  1. Setter Functions:

    • The contract includes setter functions (setTransactionTax(), setBuybackFee(), and setSellRestrictionTime()) that allow the contract owner to update the transaction tax percentage, buyback fee, and sell restriction time, respectively.

  2. Purchase Tokens Function:

    • The purchaseTokens() function allows users to mark their address with a purchase timestamp, indicating the time when they acquired tokens.
    • If the user has a balance of zero tokens, their address is added to the _holders array.

  3. Events:

    • The contract emits two events, Transfer() and Approval(), whenever token transfers and approvals occur, respectively.

Overall, the OctopiCoin contract provides a basic implementation of an ERC20-compatible token with additional features such as transaction taxes, burning, sell restrictions, and ownership control.