pragma solidity ^0.4.25;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
event OwnerUpdate(address _prevOwner, address _newOwner);
modifier onlyOwner {
assert(msg.sender == owner);
_;
}
function transferOwnership(address _newOwner) public onlyOwner {
require(_newOwner != owner, "Cannot transfer to yourself");
owner = _newOwner;
}
}
interface BurnableERC20 {
function burn(uint256 amount) external;
function balanceOf(address target) external returns (uint256);
}
interface Marketplace {
function transferOwnership(address) external;
function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) external;
function pause() external;
function unpause() external;
}
contract MANABurner is Ownable {
Marketplace public marketplace;
BurnableERC20 public mana;
constructor(address manaAddress, address marketAddress) public {
mana = BurnableERC20(manaAddress);
marketplace = Marketplace(marketAddress);
}
function burn() public {
mana.burn(mana.balanceOf(this));
}
function transferMarketplaceOwnership(address target) public onlyOwner {
marketplace.transferOwnership(target);
}
function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner {
marketplace.setOwnerCutPerMillion(_ownerCutPerMillion);
}
function pause() public onlyOwner {
marketplace.pause();
}
function unpause() public onlyOwner {
marketplace.unpause();
}
}
{
"compilationTarget": {
"MANABurner.sol": "MANABurner"
},
"evmVersion": "byzantium",
"libraries": {},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"constant":false,"inputs":[{"name":"target","type":"address"}],"name":"transferMarketplaceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_ownerCutPerMillion","type":"uint256"}],"name":"setOwnerCutPerMillion","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"unpause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"burn","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"pause","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"marketplace","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"mana","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[{"name":"manaAddress","type":"address"},{"name":"marketAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_prevOwner","type":"address"},{"indexed":false,"name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"}]