diff --git a/src/Mailbomb.sol b/src/Mailbomb.sol index e2c4f71..a6dd2d3 100644 --- a/src/Mailbomb.sol +++ b/src/Mailbomb.sol @@ -13,14 +13,14 @@ chaos ensues until 1000 survivors - the game stops import {ERC1155} from "solmate/tokens/ERC1155.sol"; import {Owned} from "solmate/auth/Owned.sol"; import {LibString} from "solmate/utils/LibString.sol"; -import {UnaboomerCommon} from "./UnaboomerCommon.sol"; +import {Main} from "./Main.sol"; contract Mailbomb is ERC1155, Owned { using LibString for uint256; uint256 public bombsAssembled; string public baseURI; - UnaboomerCommon public main; + Main public main; constructor() ERC1155() Owned(msg.sender) {} @@ -41,7 +41,7 @@ contract Mailbomb is ERC1155, Owned { /// Set main contract address for executing functions function setMainContract(address _address) external onlyOwner { - main = UnaboomerCommon(_address); + main = Main(_address); } // ========================================================================= diff --git a/src/UnaboomerCommon.sol b/src/Main.sol similarity index 99% rename from src/UnaboomerCommon.sol rename to src/Main.sol index ad40595..bcf7507 100644 --- a/src/UnaboomerCommon.sol +++ b/src/Main.sol @@ -14,7 +14,7 @@ import {Owned} from "solmate/auth/Owned.sol"; import {Unaboomer} from "./Unaboomer.sol"; import {Mailbomb} from "./Mailbomb.sol"; -contract UnaboomerCommon is Owned { +contract Main is Owned { uint256 public boomerPrice = 0.01 ether; uint256 public bombPrice = 0.01 ether; diff --git a/src/Unaboomer.sol b/src/Unaboomer.sol index b29f89b..d139d2c 100644 --- a/src/Unaboomer.sol +++ b/src/Unaboomer.sol @@ -13,7 +13,7 @@ chaos ensues until 1000 survivors - the game stops import {ERC721} from "solmate/tokens/ERC721.sol"; import {Owned} from "solmate/auth/Owned.sol"; import {LibString} from "solmate/utils/LibString.sol"; -import {UnaboomerCommon} from "./UnaboomerCommon.sol"; +import {Main} from "./Main.sol"; contract Unaboomer is ERC721, Owned { using LibString for uint256; @@ -26,7 +26,7 @@ contract Unaboomer is ERC721, Owned { uint256 public minted; string public aliveURI; string public deadURI; - UnaboomerCommon public main; + Main public main; constructor() ERC721("Unaboomer", "BOOMR") Owned(msg.sender) {} @@ -52,7 +52,7 @@ contract Unaboomer is ERC721, Owned { /// Set main contract address for executing functions function setMainContract(address _address) external onlyOwner { - main = UnaboomerCommon(_address); + main = Main(_address); } // ========================================================================= diff --git a/test/Unaboomer.t.sol b/test/Unaboomer.t.sol index eb32de8..2d82aac 100644 --- a/test/Unaboomer.t.sol +++ b/test/Unaboomer.t.sol @@ -2,17 +2,17 @@ pragma solidity ^0.8.13; import "forge-std/Test.sol"; -import {UnaboomerCommon} from "../src/UnaboomerCommon.sol"; +import {Main} from "../src/Main.sol"; import {Unaboomer} from "../src/Unaboomer.sol"; import {Mailbomb} from "../src/Mailbomb.sol"; contract UnaboomerTest is Test { - UnaboomerCommon public main; + Main public main; Unaboomer public boomr; Mailbomb public bomb; function setUp() public { - main = new UnaboomerCommon(); + main = new Main(); boomr = new Unaboomer(); bomb = new Mailbomb(); boomr.setMainContract(address(main)); @@ -46,10 +46,10 @@ contract UnaboomerTest is Test { // sending bombs should change supplies hoax(t1); (bool[] memory res, uint256[] memory killed) = main.sendBombs(60); - for (uint256 i; i < res.length; i++) { - console.log(res[i]); - console.log(killed[i]); - } + // for (uint256 i; i < res.length; i++) { + // console.log(res[i]); + // console.log(killed[i]); + // } } // function testX() public {}