🚧 Under construction 🚧
Not ready for use yet.
This set of smart contracts will manage fees in FISH for the mutant DAO.
| Network | Etherscan |
|---|---|
| Ropsten | https://ropsten.etherscan.io/address/0x7eBDd23E1ED4774508803e842461b3BE9Da5569f#readContract |
App developer can make their apps into a fish burning app by extending the FishDepositor contract like so:
import "MutantDAO/fishsink/src/FishDepositor.sol"
contract MyContract is FishDepositor {
// The FishDepositor constructor will accept a pointer to the fishbank contract
// and the maintainers wallet address which will be allowed to claim fish rewards for this app.
// The wallet address must be separate from the app address.
constructor(address _fishBank) FishDepositor(_fishBank, 0x111111111111111111111111111111111111111111) {}
function takeMyFish(uint256 _amount){
// This interacts with the `_fishBankContract` which causes the `_amount` in fish to be transferred to the contract.
_doFishDeposit(_amount);
}
}
function balanceOf(address _app) public return (uint256)function maintainerOf(address _app) public return (address)To claim your rewards from the fishBank the relavent maintainer address should be connected to etherscan and the withdrawal function called.
function doWithdraw(address _app) publicThis will send your app rewards to your wallet.
Connect the owner wallet to etherscan.
Run the following contract method on the Fishbank contract to block withdrawal for a particular app:
function blockMaintainer(address _app) public onlyOwner;To set a new withdrawal address for an app you can use the setMaintainer function:
function setMaintainer(address _app, address _maintainer) public onlyOwner;This will cause all deposits to fail and lock withdrawals. Funds will be able to be withdrawn by the owner only.
Connect the owner wallet to etherscan.
function toggleEmergency() public onlyOwner;Now you can withdraw the funds and reallocate them as required. This method will not work when it is not an emergency.
function withdrawEmergency(uint256 _amount) public onlyOwner;make
make test