Main
  • 🛰️SPACE STATION
    • Exchange Center
    • Space Dock
    • Habitat Areas
    • PvP Arena
    • BlackMarket
  • 🌎PLANETS
    • ⛏️Minerals
    • ☘️Mystical Plants
    • 🏘️Safe Areas
    • 🚪Dungeons
  • ⚙️COMPONENTS
    • 🛢️Resources
      • Charcoal
      • Metal Fragment
      • Sulfur
      • Bronze Alloy
      • Super Alloy
      • Cloth
      • Glass
      • Fertilizer
      • Empty Flask
      • Stardust
      • Carbon Battery
      • Explosives
    • 🏗️Constructions
      • Instant Wooden Shelter
      • Building Plan
      • Alloy Lock
      • Biometric Lock
      • Wooden Door
      • Wooden Double Door
      • Metal Door
      • Metal Double Door
      • Metal Hangar Gate
      • Armored Door
      • Armored Double Door
      • Wooden Window Bars
      • Metal Window Bars
      • Armored Window Bars
      • Stone Barricade
      • Sandbag Barricade
      • Titanium Barricade
      • Reinforced Wooden Wall
      • Reinforced Wooden Gate
      • Reinforced Stone Wall
      • Reinforced Stone Gate
      • Nano Water Collector
      • Quantum Water Collector
      • Basic Water Distiller
      • Wooden Ladder
    • 🗜️Items
      • Primitive Hearth
      • Stone Furnace
      • Plasmic Refiner
      • Micro Energy Reactor
      • Quantum Energy Reactor
      • Small Workbench
      • Medium Workbench
      • Advanced Workbench
      • Repair Table
      • Alchemy Table
      • Bioharvester
      • MiniGrow Pod
      • EcoGrow Pod
      • Cooking Table
      • Plasma Torch
      • Hydro Container
      • Scope
      • Micro Rechargeable Battery
      • Nano Rechargeable Battery
      • Large Rechargeable Battery
    • 🏹Weapons
      • Wooden Spear
      • Titanium Spear
      • Wooden Bow
      • 🧭Small Workbench
        • Hyperlance
        • Magnetic Shield
        • Common Mace
        • Energy Extended Mace
        • Butcher Knife
        • Combat Knife
        • Iron Sword
        • Nanocarbon Bow
        • Electromagnetic Crossbow
        • Rapid-Fire Blaster
        • Micro Explosive
        • Nano Explosive
      • ⏱️Medium Workbench
        • Plasma Shield
        • Long Sword
        • Hybromatic Blaster
        • Micro Rifle
        • Nano Rifle
        • Rapid Lasergun
        • Graviton Rifle
        • Light Scattergun
        • Plasmthrower
        • Nanite Grenade Launcher
        • Optical Flashbang
        • Nano Grenade
      • ⏲️Advanced Workbench
        • Advanced Shield
        • Nano Scattergun
        • Plasma Assault Rifle
        • Long Range Rifle
        • Plasma Rocket Launcher
        • Timed Cyber Explosive
      • Beam Sniper Rifle
      • Automatic Blaster
    • 🧨Ammo
      • Wooden Arrow
      • Alloy Arrow
      • Plasma Cartridges
      • Fusion Cartridges
      • Nano Rounds
      • Burst Rounds
      • Hyper Velocity Rounds
      • Quantum Pulse Cartridge
      • Nano Pellet
      • Plasma Ignition Pellet
      • Nano Grenade Capsule
      • Nebula Capsule
      • Quantum Charge Capsule
      • Plasma Rocket
      • Quantum Missile
    • 🎯Traps
      • Scattergun Sentry
      • Nano Sentry
      • Sentinal Turret
      • Plasma Defense System
      • Carbon Spiker
      • Quantum Snare
      • Nano Mine
      • Photon Mine
      • Nebula Mine
    • ⚒️Tools
      • Sharpen Stone
      • Stone Hatchet
      • Stone Pickaxe
      • Stone Shovel
      • Wooden Fishing Rod
      • Iron Axe
      • Iron Pickaxe
      • Titanium Shovel
      • Hyper-Flex Rod
      • Plasma Cutter
      • Reinforced Pickaxe
    • ⚙️Component Parts
    • 💊Medical
      • Nano Regen Patch
      • Micro Heal Pack
      • Bio-Nano Injector
      • Quantum Recovery Kit
    • 🌮Foods
      • Plants
      • Fishes
    • 👕Equipments
      • Basic Backpack
      • Large Backpack
      • Expert Backpack
      • Traveler Helmet
      • Explorer Jacket
      • Scout Trousers
      • Hunter Gloves
      • Ranger Boots
      • Guardian Helmet
      • Warrior Chestplate
      • Protector Greaves
      • Commander Gauntlets
      • Defender Boots
      • Iron Helmet
      • Iron Chestplate
      • Iron Leggings
      • Iron Gauntlets
      • Iron Boots
      • Titanium Helmet
      • Titanium Torso
      • Titanium Pants
      • Titanium Gloves
      • Titanium Boots
      • Galactic Guardian Helmet
      • Galatic Guardian Torso
      • Galactic Guardian Pants
      • Galactic Guardian Gloves
      • Galactic Guardian Boots
      • Asltral Armor Helmet
      • Astral Armor Torso
      • Astral Armor Pants
      • Astral Armor Gloves
      • Astral Armor Boots
      • Cosmic Shield Helmet
      • Cosmic Shield Torso
      • Cosmic Shield Pants
      • Cosmic Shield Gloves
      • Cosmic Shield Boots
      • Plasma Panzer Helmet
      • Plasma Panzer Torso
      • Plasma Panzer Pants
      • Plasma Panzer Gloves
      • Plasma Panzer Boots
      • Planet Protector Helmet
      • Planet Protector Torso
      • Planet Protector Pants
      • Planet Protector Gloves
      • Planet Protector Boots
      • Space Armor IX Helmet
      • Space Armor IX Torso
      • Space Armor IX Pants
      • Space Armor IX Gloves
      • Space Armor IX Boots
      • Last Bastion Helmet
      • Last Bastion Torso
      • Last Bastion Pants
      • Last Bastion Gloves
      • Last Bastion Boots
      • Gleaming Shield Helmet
      • Gleaming Shield Torso
      • Gleaming Shield Pants
      • Gleaming Shield Gloves
      • Gleamin Shield Boots
      • Star Particle Helmet
      • Star Particle Torso
      • Star Particle Pants
      • Star Particle Gloves
      • Star Particle Boots
    • 🗝️Portal Keys
    • ⚗️Serums
      • Minor Health Regen Potion
      • Major Health Regen Potion
      • Great Health Regen Potion
      • Minor Stamina Regen Potion
      • Major Stamina Regen Potion
      • Great Stamina Regen Potion
      • Minor Health Potion
      • Major Health Potion
      • Great Health Potion
      • Minor Stamina Potion
      • Major Stamina Potion
      • Great Stamina Potion
      • Minor Defence Potion
      • Major Defence Potion
      • Great Defence Potion
      • Minor Attack Potion
      • Major Attack Potion
      • Great Attack Potion
      • Minor Dodge Potion
      • Major Dodge Potion
      • Great Dodge Potion
      • Minor Critical Strike Potion
      • Major Critical Strike Potion
      • Great Critical Strike Potion
      • Minor Cure Potion
      • Major Cure Potion
      • Great Cure Potion
      • Minor Lucky Potion
      • Major Lucky Potion
      • Great Lucky Potion
      • Minor Stun Resist Potion
      • Major Stun Resist Potion
      • Great Stun Resist Potion
      • Minor Breath Potion
      • Major Breath Potion
      • Great Breath Potion
      • Luminescent Potion
    • 💎Decorative & Accessories
  • 🔗BLOCKCHAIN TECHNOLOGY
    • 🔩Mechanism
    • 🪙Tokenomic
    • 🗺️Roadmap
    • ⚖️Disclaimer
    • 📄Contracts
      • VNT Token Contract Docs.
      • PreSale Contract Docs.
  • 🔮SOCIAL LINKS
    • Website
    • Discord
    • X / Twitter
    • Telegram
    • Reddit
    • Youtube
    • Medium
    • LinkedIn
  • 🖥️MEET THE MAIN CREW
Powered by GitBook
On this page
  1. BLOCKCHAIN TECHNOLOGY
  2. Contracts

PreSale Contract Docs.

VNTPreSale User Guide

General Information

  • VNT Token Address: The address of the VNT token being sold.

  • VNT Bank Address: The address where VNT tokens are stored and from which they will be released.

  • USDC Token Address: The address of the USDC token used for purchasing VNT.

  • Token Price: The price of one VNT token in USDC (e.g., 0.22 USDC for 1 VNT).

  • Total Sale Amount: The total amount of VNT tokens available for sale.

  • Start Timestamp: The start date of the sale.

  • End Timestamp: The end date of the sale.

  • Lock Period: The lock period (e.g., 4 months) after which the purchased tokens can be claimed.

  • Total Sold: The total amount of VNT tokens sold.

  • Official Address: The official address where the USDC funds are sent.

Actions and Permissions

  1. setStartTimestamp:

    • Description: Sets the start date and time for the token sale.

    • Permission: Can only be called by the contract owner.

    • Function: function setStartTimestamp(uint256 _startTimestamp) external onlyOwner

  2. setEndTimestamp:

    • Description: Sets the end date and time for the token sale.

    • Permission: Can only be called by the contract owner.

    • Function: function setEndTimestamp(uint256 _endTimestamp) external onlyOwner

  3. setTokenPrice:

    • Description: Sets the price of the VNT token in USDC.

    • Permission: Can only be called by the contract owner.

    • Function: function setTokenPrice(uint256 _tokenPrice) external onlyOwner

  4. setLockPeriod:

    • Description: Sets the lock period after which the purchased tokens can be claimed.

    • Permission: Can only be called by the contract owner.

    • Function: function setLockPeriod(uint256 _lockPeriod) external onlyOwner

  5. setVntTokenAddress:

    • Description: Sets the address of the VNT token contract.

    • Permission: Can only be called by the contract owner.

    • Function: function setVntTokenAddress(address _vntAddress) external onlyOwner

    • Requirement: require(_vntAddress != address(0), "Invalid address")

    • Event: event VntTokenUpdated(address indexed previousAddress, address indexed newAddress)

  6. setUSDCAddress:

    • Description: Sets the address of the USDC token contract.

    • Permission: Can only be called by the contract owner.

    • Function: function setUSDCAddress(address _usdcAddress) external onlyOwner

    • Requirement: require(_usdcAddress != address(0), "Invalid address")

    • Event: event UsdcTokenUpdated(address indexed previousAddress, address indexed newAddress)

  7. setVntBank:

    • Description: Sets the address of the VNT bank.

    • Permission: Can only be called by the contract owner.

    • Function: function setVntBank(address _vntBank) external onlyOwner

    • Requirement: require(_vntBank != address(0), "Invalid address")

    • Event: event VntBankUpdated(address indexed previousBank, address indexed newBank)

  8. buyTokens:

    • Description: Allows users to purchase VNT tokens using USDC.

    • Permission: Can be called by anyone during the active sale period.

    • Function: function buyTokens(uint256 vntAmount) external saleActive nonReentrant

    • Requirements:

      • require(totalSold <= totalSaleAmount, "Sale cap reached")

      • require(totalSold + vntAmount <= totalSaleAmount, "Not enough tokens left")

      • require(vntAmount > 0, "VNT amount must be greater than 0")

      • require(temp > 0 , "temp = 0")

      • require(temp >= usdcAmount, "USDC allowance too low")

      • require(IERC20(usdcToken).transferFrom(msg.sender, officialAddress, usdcAmount), "USDC transfer failed")

    • Event: event TokensPurchased(address indexed buyer, uint256 usdcSpent, uint256 tokensBought)

  9. releaseTokens:

    • Description: Allows users to claim their purchased VNT tokens after the lock period has ended.

    • Permission: Can be called by anyone who has purchased tokens.

    • Function: function releaseTokens() external nonReentrant

    • Requirement: require(unreleased > 0, "No tokens are due")

    • Event: event TokensReleased(address indexed beneficiary, uint256 amount)

  10. releasableAmount:

    • Description: Returns the amount of VNT tokens that a user can claim.

    • Permission: Can be called by anyone.

    • Function: function releasableAmount(address beneficiary) public view returns (uint256)

  11. getPurchaseAndPeriods:

    • Description: Returns the purchase details and release periods for a specified buyer.

    • Permission: Can be called by anyone.

    • Function: function getPurchaseAndPeriods(address buyer) external view returns (uint256 usdcSpent, uint256 totalVntBought, uint256 purchaseTime, Period[10] memory releasePeriods)

Additional Information

  • Purchases: mapping(address => Purchase) keeps track of each user's purchase details.

  • Purchase Struct:

    • usdcSpent: Amount of USDC spent by the user.

    • totalVntBought: Total amount of VNT tokens bought by the user.

    • purchaseTime: Timestamp of the purchase.

    • releasePeriods: Array of 10 periods, each containing VNT tokens per period, claimable time, and claimed status.

  • Period Struct:

    • vntPerPeriod: Amount of VNT tokens allocated per period.

    • claimableTime: Time when the tokens can be claimed.

    • claimed: Boolean indicating if the tokens for the period have been claimed.

PreviousVNT Token Contract Docs.NextSOCIAL LINKS

Last updated 9 months ago

🔗
📄