change token to BOOMER

master
lza_menace 2 years ago
parent 12fc5b9242
commit 4021914eef

@ -89,7 +89,7 @@ contract Main is Owned {
/// @param from Sender of the bombs /// @param from Sender of the bombs
/// @param tokenId Unaboomer token which was targeted /// @param tokenId Unaboomer token which was targeted
/// @param hit Whether or not the bomb killed the token or not (was a dud / already killed) /// @param hit Whether or not the bomb killed the token or not (was a dud / already killed)
/// @param owned Whether or not the sender was the owner of the BOOMR token /// @param owned Whether or not the sender was the owner of the BOOMER token
event SentBomb(address indexed from, uint256 indexed tokenId, bool hit, bool owned); event SentBomb(address indexed from, uint256 indexed tokenId, bool hit, bool owned);
constructor() Owned(msg.sender) {} constructor() Owned(msg.sender) {}
@ -105,8 +105,8 @@ contract Main is Owned {
require(success, "failed to withdraw"); require(success, "failed to withdraw");
} }
/// Set price per BOOMR /// Set price per BOOMER
/// @param _price Price in wei to mint BOOMR token /// @param _price Price in wei to mint BOOMER token
function setBoomerPrice(uint256 _price) external onlyOwner { function setBoomerPrice(uint256 _price) external onlyOwner {
unaboomerPrice = _price; unaboomerPrice = _price;
} }
@ -118,7 +118,7 @@ contract Main is Owned {
} }
/// Set contract address for Unaboomer tokens /// Set contract address for Unaboomer tokens
/// @param _address Address of the Unaboomer / BOOMR contract /// @param _address Address of the Unaboomer / BOOMER contract
function setUnaboomerContract(address _address) external onlyOwner { function setUnaboomerContract(address _address) external onlyOwner {
unaboomer = Unaboomer(_address); unaboomer = Unaboomer(_address);
} }
@ -152,46 +152,46 @@ contract Main is Owned {
// Getters // Getters
// ========================================================================= // =========================================================================
/// Get BOOMR token balance of wallet /// Get BOOMER token balance of wallet
/// @param _address Wallet address to query balance of BOOMR token /// @param _address Wallet address to query balance of BOOMER token
/// @return balance Amount of BOOMR tokens owned by _address /// @return balance Amount of BOOMER tokens owned by _address
function unaboomerBalance(address _address) public view returns (uint256) { function unaboomerBalance(address _address) public view returns (uint256) {
return unaboomer.balanceOf(_address); return unaboomer.balanceOf(_address);
} }
/// Get BOOMR amount minted (including ones that have been burned/killed) /// Get BOOMER amount minted (including ones that have been burned/killed)
/// @param _address Wallet address to query the amount of BOOMR token minted /// @param _address Wallet address to query the amount of BOOMER token minted
/// @return balance Amount of BOOMR tokens that have been minted by _address /// @return balance Amount of BOOMER tokens that have been minted by _address
function unaboomersMinted(address _address) public view returns (uint256) { function unaboomersMinted(address _address) public view returns (uint256) {
return unaboomer.tokensMintedByWallet(_address); return unaboomer.tokensMintedByWallet(_address);
} }
/// Get BOOMR token total supply /// Get BOOMER token total supply
/// @return supply Amount of BOOMR tokens minted in total /// @return supply Amount of BOOMER tokens minted in total
function unaboomersRadicalized() public view returns (uint256) { function unaboomersRadicalized() public view returns (uint256) {
return unaboomer.minted(); return unaboomer.minted();
} }
/// Get BOOMR kill count (unaboomers killed) /// Get BOOMER kill count (unaboomers killed)
/// @return killCount Amount of BOOMR tokens "killed" (dead pfp) /// @return killCount Amount of BOOMER tokens "killed" (dead pfp)
function unaboomersKilled() public view returns (uint256) { function unaboomersKilled() public view returns (uint256) {
return unaboomer.burned(); return unaboomer.burned();
} }
/// Get BOOMR token max supply /// Get BOOMER token max supply
/// @return maxSupply Maximum amount of BOOMR tokens that can ever exist /// @return maxSupply Maximum amount of BOOMER tokens that can ever exist
function unaboomerMaxSupply() public view returns (uint256) { function unaboomerMaxSupply() public view returns (uint256) {
return unaboomer.MAX_SUPPLY(); return unaboomer.MAX_SUPPLY();
} }
/// Get BOOMR token survivor count /// Get BOOMER token survivor count
/// @return survivorCount Maximum amount of BOOMR survivor tokens that can ever exist /// @return survivorCount Maximum amount of BOOMER survivor tokens that can ever exist
function unaboomerMaxSurvivorCount() public view returns (uint256) { function unaboomerMaxSurvivorCount() public view returns (uint256) {
return unaboomer.MAX_SURVIVOR_COUNT(); return unaboomer.MAX_SURVIVOR_COUNT();
} }
/// Get BOOMR token max mint amount per wallet /// Get BOOMER token max mint amount per wallet
/// @return mintAmount Maximum amount of BOOMR tokens that can be minted per wallet /// @return mintAmount Maximum amount of BOOMER tokens that can be minted per wallet
function unaboomerMaxMintPerWallet() public view returns (uint256) { function unaboomerMaxMintPerWallet() public view returns (uint256) {
return unaboomer.MAX_MINT_AMOUNT(); return unaboomer.MAX_MINT_AMOUNT();
} }

@ -9,7 +9,7 @@ import {Main} from "./Main.sol";
/** /**
@title Unaboomer @title Unaboomer
@author lzamenace.eth @author lzamenace.eth
@notice This contract contains ERC-721 Unaboomer tokens (BOOMR) which are the profile @notice This contract contains ERC-721 Unaboomer tokens (BOOMER) which are the profile
picture and membership tokens for the Unaboomer NFT project and chain based game. picture and membership tokens for the Unaboomer NFT project and chain based game.
Each Unaboomer is a unique, dynamically generated pixel avatar in the likeness Each Unaboomer is a unique, dynamically generated pixel avatar in the likeness
of the real-life Unabomber, Theodore Kaczynski. Unaboomers can be "killed" by of the real-life Unabomber, Theodore Kaczynski. Unaboomers can be "killed" by
@ -26,7 +26,7 @@ contract Unaboomer is ERC721, Owned {
/// Track mints per wallet to enforce maximum /// Track mints per wallet to enforce maximum
mapping(address => uint256) public tokensMintedByWallet; mapping(address => uint256) public tokensMintedByWallet;
/// Maximum supply of BOOMR tokens /// Maximum supply of BOOMER tokens
uint256 public constant MAX_SUPPLY = 5000; uint256 public constant MAX_SUPPLY = 5000;
/// Maximum amount of survivors remaining to advance to the next round /// Maximum amount of survivors remaining to advance to the next round
uint256 public constant MAX_SURVIVOR_COUNT = 1000; uint256 public constant MAX_SURVIVOR_COUNT = 1000;
@ -41,7 +41,7 @@ contract Unaboomer is ERC721, Owned {
/// Contract address of the deployed Main contract interface to the game /// Contract address of the deployed Main contract interface to the game
Main public main; Main public main;
constructor() ERC721("Unaboomer", "BOOMR") Owned(msg.sender) {} constructor() ERC721("Unaboomer", "BOOMER") Owned(msg.sender) {}
// ========================================================================= // =========================================================================
// Admin // Admin
@ -80,8 +80,8 @@ contract Unaboomer is ERC721, Owned {
} }
/// Mint tokens from main contract /// Mint tokens from main contract
/// @param _to Address to mint BOOMR tokens to /// @param _to Address to mint BOOMER tokens to
/// @param _amount Amount of BOOMR tokens to mint /// @param _amount Amount of BOOMER tokens to mint
function radicalize(address _to, uint256 _amount) external onlyMain { function radicalize(address _to, uint256 _amount) external onlyMain {
require(minted + _amount <= MAX_SUPPLY, "supply reached"); require(minted + _amount <= MAX_SUPPLY, "supply reached");
require(tokensMintedByWallet[_to] + _amount <= MAX_MINT_AMOUNT, "cannot exceed maximum per wallet"); require(tokensMintedByWallet[_to] + _amount <= MAX_MINT_AMOUNT, "cannot exceed maximum per wallet");
@ -93,7 +93,7 @@ contract Unaboomer is ERC721, Owned {
} }
/// Toggle token state from living to dead /// Toggle token state from living to dead
/// @param _tokenId Token ID of BOOMR to toggle living -> dead and increment kill count /// @param _tokenId Token ID of BOOMER to toggle living -> dead and increment kill count
function die(uint256 _tokenId) external onlyMain { function die(uint256 _tokenId) external onlyMain {
require(_tokenId <= minted, "invalid token id"); require(_tokenId <= minted, "invalid token id");
if (ownerOf(_tokenId) != address(0)) { if (ownerOf(_tokenId) != address(0)) {
@ -111,7 +111,7 @@ contract Unaboomer is ERC721, Owned {
} }
// Return URI to retrieve JSON metadata from - points to images and descriptions // Return URI to retrieve JSON metadata from - points to images and descriptions
/// @param _tokenId Token ID of BOOMR to fetch URI for /// @param _tokenId Token ID of BOOMER to fetch URI for
/// @return string IPFS or HTTP URI to retrieve JSON metadata from /// @return string IPFS or HTTP URI to retrieve JSON metadata from
function tokenURI(uint256 _tokenId) public view override returns (string memory) { function tokenURI(uint256 _tokenId) public view override returns (string memory) {
if (ownerOf(_tokenId) == address(0)) { if (ownerOf(_tokenId) == address(0)) {

Loading…
Cancel
Save