|
|
|
@ -55,7 +55,7 @@ import {Mailbomb} from "./Mailbomb.sol";
|
|
|
|
|
|
|
|
|
|
contract Main is Owned {
|
|
|
|
|
|
|
|
|
|
uint256 public boomerPrice = 0.01 ether;
|
|
|
|
|
uint256 public unaboomerPrice = 0.01 ether;
|
|
|
|
|
uint256 public bombPrice = 0.01 ether;
|
|
|
|
|
Unaboomer public unaboomer;
|
|
|
|
|
Mailbomb public mailbomb;
|
|
|
|
@ -79,7 +79,7 @@ contract Main is Owned {
|
|
|
|
|
|
|
|
|
|
/// Set price for 1 BOOMR
|
|
|
|
|
function setBoomerPrice(uint256 _price) external onlyOwner {
|
|
|
|
|
boomerPrice = _price;
|
|
|
|
|
unaboomerPrice = _price;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Set contract address for Unaboomer tokens
|
|
|
|
@ -109,27 +109,27 @@ contract Main is Owned {
|
|
|
|
|
// =========================================================================
|
|
|
|
|
|
|
|
|
|
/// Get BOOMR token balance of wallet
|
|
|
|
|
function boomerBalance(address _address) public view returns (uint256) {
|
|
|
|
|
function unaboomerBalance(address _address) public view returns (uint256) {
|
|
|
|
|
return unaboomer.balanceOf(_address);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Get BOOMR token total supply
|
|
|
|
|
function boomerSupply() public view returns (uint256) {
|
|
|
|
|
function unaboomerSupply() public view returns (uint256) {
|
|
|
|
|
return unaboomer.totalSupply();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Get BOOMR kill count (unaboomers killed)
|
|
|
|
|
function boomerKillCount() public view returns (uint256) {
|
|
|
|
|
function unaboomersKilled() public view returns (uint256) {
|
|
|
|
|
return unaboomer.killCount();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Get BOOMR token max supply
|
|
|
|
|
function boomerMaxSupply() public view returns (uint256) {
|
|
|
|
|
function unaboomerMaxSupply() public view returns (uint256) {
|
|
|
|
|
return unaboomer.MAX_SUPPLY();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// Get BOOMR token survivor count
|
|
|
|
|
function boomerSurvivorCount() public view returns (uint256) {
|
|
|
|
|
function unaboomerSurvivorCount() public view returns (uint256) {
|
|
|
|
|
return unaboomer.SURVIVOR_COUNT();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -154,7 +154,7 @@ contract Main is Owned {
|
|
|
|
|
|
|
|
|
|
/// Radicalize a boomer to become a Unaboomer - start with 2 bombs
|
|
|
|
|
function radicalizeBoomers(uint256 _amount) external payable missionNotCompleted {
|
|
|
|
|
require(msg.value >= _amount * boomerPrice, "not enough ether");
|
|
|
|
|
require(msg.value >= _amount * unaboomerPrice, "not enough ether");
|
|
|
|
|
unaboomer.radicalize(msg.sender, _amount);
|
|
|
|
|
mailbomb.create(msg.sender, _amount * 2);
|
|
|
|
|
}
|
|
|
|
|