编译器
0.6.12+commit.27d51765
文件 1 的 18:AccessControl.sol
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
abstract contract AccessControl is Context {
using EnumerableSet for EnumerableSet.AddressSet;
using Address for address;
struct RoleData {
EnumerableSet.AddressSet members;
bytes32 adminRole;
}
mapping (bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
function hasRole(bytes32 role, address account) public view returns (bool) {
return _roles[role].members.contains(account);
}
function getRoleMemberCount(bytes32 role) public view returns (uint256) {
return _roles[role].members.length();
}
function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
return _roles[role].members.at(index);
}
function getRoleAdmin(bytes32 role) public view returns (bytes32) {
return _roles[role].adminRole;
}
function grantRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");
_grantRole(role, account);
}
function revokeRole(bytes32 role, address account) public virtual {
require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");
_revokeRole(role, account);
}
function renounceRole(bytes32 role, address account) public virtual {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
_roles[role].adminRole = adminRole;
}
function _grantRole(bytes32 role, address account) private {
if (_roles[role].members.add(account)) {
emit RoleGranted(role, account, _msgSender());
}
}
function _revokeRole(bytes32 role, address account) private {
if (_roles[role].members.remove(account)) {
emit RoleRevoked(role, account, _msgSender());
}
}
}
文件 2 的 18:Address.sol
pragma solidity >=0.6.2 <0.8.0;
library Address {
function isContract(address account) internal view returns (bool) {
uint256 size;
assembly { size := extcodesize(account) }
return size > 0;
}
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
if (returndata.length > 0) {
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
文件 3 的 18:Affinity.sol
pragma solidity 0.6.12;
import "@openzeppelin/contracts/access/AccessControl.sol";
import "../interfaces/ISRC20.sol";
import "../interfaces/IUSDT.sol";
import "./IAffinity.sol";
contract Affinity is AccessControl, IAffinity {
address internal SAVIOR;
bytes32 public constant ROOT_GROUP = keccak256("ROOT_GROUP");
bytes32 public constant KEEPER_ROLE = keccak256("KEEPER_ROLE");
bytes32 public constant MANAGER_ROLE = keccak256("MANAGER_ROLE");
bytes32 public constant ALLY_ROLE = keccak256("ALLY_ROLE");
modifier isKeeper() {
require(hasRole(KEEPER_ROLE, msg.sender), "Affinity: Caller is not keeper");
_;
}
modifier isManager() {
require(hasRole(MANAGER_ROLE, msg.sender), "Affinity: Caller is not manager");
_;
}
modifier isAlly() {
require(hasRole(ALLY_ROLE, msg.sender), "Affinity: Caller is not ally");
_;
}
modifier onlyEOA() {
require(msg.sender == tx.origin, "Affinity: EOA required");
_;
}
constructor(address _SAVIOR) public {
SAVIOR = _SAVIOR;
_setupRole(ROOT_GROUP, _SAVIOR);
_setRoleAdmin(KEEPER_ROLE, ROOT_GROUP);
_setRoleAdmin(MANAGER_ROLE, ROOT_GROUP);
_setRoleAdmin(ALLY_ROLE, ROOT_GROUP);
}
function allow(
address token,
address spender,
uint256 amount
) external override isKeeper {
ISRC20(token).approve(spender, amount);
}
function allowTetherToken(
address token,
address spender,
uint256 amount
) external override isKeeper {
_allowTetherToken(token, spender, amount);
}
function _allowTetherToken(
address token,
address spender,
uint256 amount
) internal {
IUSDT USDT = IUSDT(token);
uint256 _allowance = USDT.allowance(address(this), spender);
if (_allowance >= amount) {
return;
}
if (_allowance > 0) {
USDT.approve(spender, 0);
}
USDT.approve(spender, amount);
}
}
文件 4 的 18:ChainSchema.sol
pragma solidity 0.6.12;
contract ChainSchema {
bool private _initialized;
string internal _chainShortName;
string internal _chainFullName;
uint256 internal _blocksPerDay;
uint256 internal _secondsPerBlock;
event ChainConfigured(address indexed thisAddr, string shortName, string fullName, uint256 secondsPerBlock);
modifier chainReady() {
require(_initialized, "ChainSchema: Waiting to be configured");
_;
}
function configChain(
string memory shortName,
string memory fullName,
uint256 secondsPerBlock
) public {
require(!_initialized, "ChainSchema: Reconfiguration is not allowed");
require(secondsPerBlock > 0, "ChainSchema: Invalid secondsPerBlock");
_chainShortName = shortName;
_chainFullName = fullName;
_blocksPerDay = uint256(24 * 60 * 60) / secondsPerBlock;
_secondsPerBlock = secondsPerBlock;
_initialized = true;
emit ChainConfigured(address(this), shortName, fullName, secondsPerBlock);
}
function chainShortName() public view returns (string memory) {
return _chainShortName;
}
function chainFullName() public view returns (string memory) {
return _chainFullName;
}
function blocksPerDay() public view returns (uint256) {
return _blocksPerDay;
}
function secondsPerBlock() public view returns (uint256) {
return _secondsPerBlock;
}
function getChainId() public pure returns (uint256) {
uint256 chainId;
assembly {
chainId := chainid()
}
return chainId;
}
}
文件 5 的 18:Context.sol
pragma solidity >=0.6.0 <0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this;
return msg.data;
}
}
文件 6 的 18:EnumerableSet.sol
pragma solidity >=0.6.0 <0.8.0;
library EnumerableSet {
struct Set {
bytes32[] _values;
mapping (bytes32 => uint256) _indexes;
}
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
function _remove(Set storage set, bytes32 value) private returns (bool) {
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) {
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
bytes32 lastvalue = set._values[lastIndex];
set._values[toDeleteIndex] = lastvalue;
set._indexes[lastvalue] = toDeleteIndex + 1;
set._values.pop();
delete set._indexes[value];
return true;
} else {
return false;
}
}
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
struct Bytes32Set {
Set _inner;
}
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
struct AddressSet {
Set _inner;
}
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
struct UintSet {
Set _inner;
}
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}
文件 7 的 18:IAffinity.sol
pragma solidity 0.6.12;
interface IAffinity {
function allow(
address token,
address spender,
uint256 amount
) external;
function allowTetherToken(
address token,
address spender,
uint256 amount
) external;
}
文件 8 的 18:IERC20.sol
pragma solidity >=0.6.0 <0.8.0;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
文件 9 的 18:ISRC20.sol
pragma solidity 0.6.12;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ISRC20 is IERC20 {
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function decimals() external view returns (uint8);
}
文件 10 的 18:IShorterBone.sol
pragma solidity 0.6.12;
interface IShorterBone {
enum IncomeType {
TRADING_FEE,
FUNDING_FEE,
PROPOSAL_FEE,
PRIORITY_FEE,
WITHDRAW_FEE
}
function poolTillIn(
uint256 poolId,
address token,
address user,
uint256 amount
) external;
function poolTillOut(
uint256 poolId,
address token,
address user,
uint256 amount
) external;
function poolRevenue(
uint256 poolId,
address user,
address token,
uint256 amount,
IncomeType _type
) external;
function tillIn(
address tokenAddr,
address user,
bytes32 toAllyId,
uint256 amount
) external;
function tillOut(
address tokenAddr,
bytes32 fromAllyId,
address user,
uint256 amount
) external;
function revenue(
bytes32 sendAllyId,
address tokenAddr,
address from,
uint256 amount,
IncomeType _type
) external;
function getAddress(bytes32 _allyId) external view returns (address);
function mintByAlly(
bytes32 sendAllyId,
address user,
uint256 amount
) external;
function getTokenInfo(address token)
external
view
returns (
bool inWhiteList,
address swapRouter,
uint256 multiplier
);
function TetherToken() external view returns (address);
event ResetAlly(bytes32 indexed allyId, address indexed contractAddr);
event AllyKilled(bytes32 indexed allyId);
event TillIn(bytes32 indexed allyId, address indexed user, address indexed tokenAddr, uint256 amount);
event TillOut(bytes32 indexed allyId, address indexed user, address indexed tokenAddr, uint256 amount);
event Revenue(address indexed tokenAddr, address indexed user, uint256 amount, IncomeType indexed _type);
event PoolTillIn(uint256 indexed poolId, address indexed user, uint256 amount);
event PoolTillOut(uint256 indexed poolId, address indexed user, uint256 amount);
}
文件 11 的 18:IUSDT.sol
pragma solidity 0.6.12;
interface IUSDT {
function approve(address spender, uint256 amount) external;
function transferFrom(
address sender,
address recipient,
uint256 amount
) external;
function allowance(address owner, address spender) external view returns (uint256);
}
文件 12 的 18:IpistrToken.sol
pragma solidity 0.6.12;
import "../proxy/TitanProxy.sol";
import "../storage/TokenStorage.sol";
contract IpistrToken is TitanProxy, TokenStorage {
constructor(address _SAVIOR, address _implementation) public TitanProxy(_SAVIOR, _implementation) {}
}
文件 13 的 18:Pausable.sol
pragma solidity >=0.6.0 <0.8.0;
import "./Context.sol";
abstract contract Pausable is Context {
event Paused(address account);
event Unpaused(address account);
bool private _paused;
constructor () internal {
_paused = false;
}
function paused() public view virtual returns (bool) {
return _paused;
}
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}
文件 14 的 18:Proxy.sol
pragma solidity 0.6.12;
abstract contract Proxy {
fallback() external payable {
_fallback();
}
function _implementation() internal view virtual returns (address);
function _delegate(address implementation) internal {
assembly {
calldatacopy(0, 0, calldatasize())
let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
returndatacopy(0, 0, returndatasize())
switch result
case 0 {
revert(0, returndatasize())
}
default {
return(0, returndatasize())
}
}
}
function _willFallback() internal virtual {}
function _fallback() internal {
_willFallback();
_delegate(_implementation());
}
}
文件 15 的 18:TitanCoreStorage.sol
pragma solidity 0.6.12;
import "../interfaces/IShorterBone.sol";
contract TitanCoreStorage {
IShorterBone internal shorterBone;
}
文件 16 的 18:TitanProxy.sol
pragma solidity 0.6.12;
import "@openzeppelin/contracts/utils/Pausable.sol";
import "../criteria/Affinity.sol";
import "../criteria/ChainSchema.sol";
import "./UpgradeabilityProxy.sol";
contract TitanProxy is Affinity, ChainSchema, Pausable, UpgradeabilityProxy {
constructor(address _SAVIOR, address implementationContract) public Affinity(_SAVIOR) UpgradeabilityProxy(implementationContract) {}
function version() public view returns (uint256) {
return _version();
}
function implementation() external view returns (address) {
return _implementation();
}
function upgradeTo(uint256 newVersion, address newImplementation) public isManager {
_upgradeTo(newVersion, newImplementation);
}
function setPaused() public isManager {
_pause();
}
function setUnPaused() public isManager {
_unpause();
}
function setSecondsPerBlock(uint256 newSecondsPerBlock) public isManager {
_secondsPerBlock = newSecondsPerBlock;
}
receive() external payable {}
}
文件 17 的 18:TokenStorage.sol
pragma solidity 0.6.12;
import "./TitanCoreStorage.sol";
contract TokenStorage is TitanCoreStorage {
mapping(address => uint256) internal _lockedBalances;
}
文件 18 的 18:UpgradeabilityProxy.sol
pragma solidity 0.6.12;
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Proxy} from "./Proxy.sol";
contract UpgradeabilityProxy is Proxy {
event Upgraded(uint256 indexed version, address indexed implementation);
bytes32 internal constant IMPLEMENTATION_SLOT = 0xb4cff3ccade8876c60e81b90f014ea636f99d530646ec67090e1cc8a04636f38;
bytes32 internal constant VERSION_SLOT = 0xf62412ce1bd823aa31864380419f787378380edf34602844461eeadf8416d534;
constructor(address implementationContract) public {
assert(IMPLEMENTATION_SLOT == keccak256("com.ipilabs.proxy.implementation"));
assert(VERSION_SLOT == keccak256("com.ipilabs.proxy.version"));
_upgradeTo(1, implementationContract);
}
function _implementation() internal view override returns (address impl) {
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
impl := sload(slot)
}
}
function _version() internal view returns (uint256 version) {
bytes32 slot = VERSION_SLOT;
assembly {
version := sload(slot)
}
}
function _upgradeTo(uint256 newVersion, address newImplementation) internal {
require(Address.isContract(newImplementation), "Non-contract address");
_setImplementation(newImplementation);
_setVersion(newVersion);
emit Upgraded(newVersion, newImplementation);
}
function _setImplementation(address newImplementation) internal {
require(Address.isContract(newImplementation), "Non-contract address");
bytes32 slot = IMPLEMENTATION_SLOT;
assembly {
sstore(slot, newImplementation)
}
}
function _setVersion(uint256 newVersion) internal {
bytes32 slot = VERSION_SLOT;
assembly {
sstore(slot, newVersion)
}
}
}
{
"compilationTarget": {
"contracts/governance/IpistrToken.sol": "IpistrToken"
},
"evmVersion": "istanbul",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_SAVIOR","type":"address"},{"internalType":"address","name":"_implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"thisAddr","type":"address"},{"indexed":false,"internalType":"string","name":"shortName","type":"string"},{"indexed":false,"internalType":"string","name":"fullName","type":"string"},{"indexed":false,"internalType":"uint256","name":"secondsPerBlock","type":"uint256"}],"name":"ChainConfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"version","type":"uint256"},{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ALLY_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"KEEPER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROOT_GROUP","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allowTetherToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"blocksPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainFullName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"chainShortName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"shortName","type":"string"},{"internalType":"string","name":"fullName","type":"string"},{"internalType":"uint256","name":"secondsPerBlock","type":"uint256"}],"name":"configChain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondsPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSecondsPerBlock","type":"uint256"}],"name":"setSecondsPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setUnPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newVersion","type":"uint256"},{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]