Discover more of SonicScan Block Explorer's tools and services in one place.
Contract Source Code:
File 1 of 1 : PicklesToken
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract PicklesToken { string public name = "Pickles"; string public symbol = "PICKLES"; uint8 public decimals = 18; uint256 public totalSupply = 500_000_000 * 10**18; address public owner; // Token information string public website = "http://picklespad.io"; string public whitepaper = "https://picklespad.io/whitepaper"; string public twitter = "https://x.com/PicklesPad"; // Distribution uint256 public teamSupply = (totalSupply * 20) / 100; // 20% for team uint256 public unlockedTeamSupply = 0; // Initially locked uint256 public remainingSupply = totalSupply - teamSupply; // Remaining supply // Team token release uint256 public unlock90Days; uint256 public unlock180Days; uint256 public unlock270Days; uint256 public unlock365Days; mapping(uint256 => bool) public teamStageReleased; // Token holders mapping(address => uint256) public balanceOf; // Events event Transfer(address indexed from, address indexed to, uint256 value); event TeamTokensReleased(uint256 stage, uint256 amount); constructor() { owner = msg.sender; // Allocate team tokens (locked initially) remainingSupply -= teamSupply; // Set team unlock times unlock90Days = block.timestamp + 90 days; unlock180Days = block.timestamp + 180 days; unlock270Days = block.timestamp + 270 days; unlock365Days = block.timestamp + 365 days; // Allocate remaining supply to the owner balanceOf[owner] = remainingSupply; emit Transfer(address(0), owner, remainingSupply); } modifier onlyOwner() { require(msg.sender == owner, "Not the contract owner"); _; } // Transfer tokens function transfer(address to, uint256 value) external returns (bool) { require(to != address(0), "Cannot transfer to zero address"); require(balanceOf[msg.sender] >= value, "Insufficient balance"); balanceOf[msg.sender] -= value; balanceOf[to] += value; emit Transfer(msg.sender, to, value); return true; } // Release team tokens in stages function releaseTeamTokens(uint256 stage) external onlyOwner { require(stage >= 1 && stage <= 4, "Invalid stage"); require(!teamStageReleased[stage], "Stage already released"); uint256 amount = teamSupply / 4; // 5% of total supply in each stage if (stage == 1) { require(block.timestamp >= unlock90Days, "90 days not passed"); } else if (stage == 2) { require(block.timestamp >= unlock180Days, "180 days not passed"); } else if (stage == 3) { require(block.timestamp >= unlock270Days, "270 days not passed"); } else if (stage == 4) { require(block.timestamp >= unlock365Days, "365 days not passed"); } teamStageReleased[stage] = true; unlockedTeamSupply += amount; balanceOf[owner] += amount; emit TeamTokensReleased(stage, amount); emit Transfer(address(0), owner, amount); } // Update website URL function updateWebsite(string memory _website) external onlyOwner { website = _website; } // Update whitepaper URL function updateWhitepaper(string memory _whitepaper) external onlyOwner { whitepaper = _whitepaper; } // Update Twitter URL function updateTwitter(string memory _twitter) external onlyOwner { twitter = _twitter; } }
Please enter a contract address above to load the contract details and source code.
Please DO NOT store any passwords or private keys here. A private note (up to 100 characters) can be saved and is useful for transaction tracking.
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.