diff --git a/src/Main.sol b/src/Main.sol index 85d5938..c5a1425 100644 --- a/src/Main.sol +++ b/src/Main.sol @@ -69,6 +69,16 @@ contract Main is Owned { // Tokens // ========================================================================= + /// Get balance of BOOMR tokens + function unaboomerBalance(address _address) public view returns (uint256) { + return unaboomer.balanceOf(_address); + } + + /// Get balance of BOMB tokens + function bombBalance(address _address) public view returns (uint256) { + return mailbomb.balanceOf(_address, 1); + } + /// 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"); @@ -90,7 +100,7 @@ contract Main is Owned { bool[] memory results, uint256[] memory tokensKilled ) { - require(_amount <= mailbomb.balanceOf(msg.sender, 1), "not enough bombs"); + require(_amount <= bombBalance(msg.sender), "not enough bombs"); require(_amount <= unaboomer.totalSupply(), "not enough supply"); bool[] memory res = new bool[](_amount); uint256[] memory killed = new uint256[](_amount);