rename to main

master
lza_menace 2 years ago
parent ec9962bb85
commit a1b12dcd6b

@ -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);
}
// =========================================================================

@ -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;

@ -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);
}
// =========================================================================

@ -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 {}

Loading…
Cancel
Save