github.com/codingfuture/orig-energi3@v0.8.4/energi/contracts/src/IMasternodeRegistry.sol (about) 1 // Copyright 2019 The Energi Core Authors 2 // This file is part of Energi Core. 3 // 4 // Energi Core is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // Energi Core is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with Energi Core. If not, see <http://www.gnu.org/licenses/>. 16 17 // Energi Governance system is the fundamental part of Energi Core. 18 19 // NOTE: It's not allowed to change the compiler due to byte-to-byte 20 // match requirement. 21 pragma solidity 0.5.16; 22 //pragma experimental SMTChecker; 23 24 import { IGovernedProxy } from "./IGovernedProxy.sol"; 25 26 /** 27 * Genesis version of MasternodeRegistry interface. 28 * 29 * Base Consensus interface for masternodes. 30 * 31 * NOTE: it MUST NOT change after blockchain launch! 32 */ 33 interface IMasternodeRegistry { 34 event Announced( 35 address indexed masternode, 36 address indexed owner, 37 uint32 ipv4address, 38 bytes32[2] enode, 39 uint collateral 40 ); 41 event Denounced( 42 address indexed masternode, 43 address indexed owner 44 ); 45 event Invalidation( 46 address indexed masternode, 47 address indexed validator 48 ); 49 event Deactivated( 50 address indexed masternode 51 ); 52 53 function token_proxy() external view returns(IGovernedProxy); 54 function treasury_proxy() external view returns(IGovernedProxy); 55 56 function announce(address masternode, uint32 ipv4address, bytes32[2] calldata enode) external; 57 function denounce(address masternode) external; 58 function heartbeat(uint block_number, bytes32 block_hash, uint sw_features) external; 59 function invalidate(address masternode) external; 60 function validationTarget(address masternode) external view returns(address target); 61 function isActive(address masternode) external view 62 returns(bool); 63 function count() external view 64 returns( 65 uint active, uint total, 66 uint active_collateral, uint total_collateral, 67 uint max_of_all_times); 68 function info(address masternode) external view 69 returns(address owner, uint32 ipv4address, bytes32[2] memory enode, 70 uint collateral, uint announced_block, uint sw_features); 71 function ownerInfo(address owner) external view 72 returns(address masternode, uint32 ipv4address, bytes32[2] memory enode, 73 uint collateral, uint announced_block, uint sw_features); 74 function onCollateralUpdate(address owner) external; 75 function enumerate() external view returns(address[] memory masternodes); 76 function enumerateActive() external view returns(address[] memory masternodes); 77 }