-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
377 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity >=0.8.0; | ||
|
||
import "../Baal.sol"; | ||
|
||
contract MockBaal is CloneFactory { | ||
bool public lootPaused; | ||
ILoot public lootToken; /*Sub ERC20 for loot mgmt*/ | ||
|
||
constructor( | ||
address payable _lootSingleton, | ||
string memory _name, | ||
string memory _symbol | ||
) { | ||
lootToken = ILoot(createClone(_lootSingleton)); /*Clone loot singleton using EIP1167 minimal proxy pattern*/ | ||
lootToken.setUp( | ||
string(abi.encodePacked(_name, " LOOT")), | ||
string(abi.encodePacked(_symbol, "-LOOT")) | ||
); | ||
} | ||
|
||
function setLootPaused(bool paused) external { | ||
lootPaused = paused; | ||
} | ||
|
||
function mintLoot(address _to, uint256 _amount) external { | ||
lootToken.mint(_to, _amount); | ||
} | ||
|
||
function burnLoot(address _from, uint256 _amount) external { | ||
lootToken.burn(_from, _amount); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.