账户
0x0f...3b6c
0x0F...3b6C

0x0F...3b6C

$500
此合同的源代码已经过验证!
合同元数据
编译器
0.4.25+commit.59dbf8f1
语言
Solidity
合同源代码
文件 1 的 1:MANABurner.sol
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": []
}
ABI
[{"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"}]