Discover more of Etherscan's tools and services in one place.
Sponsored
Contract Source Code:
File 1 of 1 : POOLL.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract POOLL { string public name; string public symbol; uint256 public totalSupply; address public admin; mapping(address => uint256) public balanceOf; event Transfer(address indexed from, address indexed to, uint256 value); event Mint(address indexed to, uint256 value); event Burn(address indexed from, uint256 value); modifier onlyAdmin() { require(msg.sender == admin, "Only admin can perform this action"); _; } constructor() { name = "POOLL"; symbol = "PL"; totalSupply = 25020; admin = msg.sender; balanceOf[admin] = totalSupply; } function transfer(address _to, uint256 _amount) public { require(balanceOf[msg.sender] >= _amount, "Insufficient balance"); require(msg.sender != _to, "Invalid transfer"); balanceOf[msg.sender] -= _amount; balanceOf[_to] += _amount; emit Transfer(msg.sender, _to, _amount); } function mint(address _to, uint256 _amount) public onlyAdmin { require(_to != address(0), "Invalid address"); balanceOf[_to] += _amount; totalSupply += _amount; emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); } function burn(uint256 _amount) public { require(balanceOf[msg.sender] >= _amount, "Insufficient balance"); balanceOf[msg.sender] -= _amount; totalSupply -= _amount; emit Burn(msg.sender, _amount); emit Transfer(msg.sender, address(0), _amount); } }
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.