Verified contractExactMIT
StakingManager
Address0x7776c65e112475cebd4a2fc72e685f35641db3da
- Balance
0 ETH
- Transactions
363
- Compiler
solc 0.8.7
- Same code
Only this contract
Details
- Compiler
- solc 0.8.7+commit.e28d00a7
- Language
- solidity
- Optimization
- Yes, 22,000 runs
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 13,794,137
- Creation transaction
- 0x61b8ce0b32…eaa2547c1b
Read18
- DEFAULT_ADMIN_ROLE() → (bytes32)
- GOV_ROLE() → (bytes32)
- MAX_POOL_COUNT() → (uint256)
- REWARD_DISTRIBUTOR_ROLE() → (bytes32)
- TOKEN_SAVER_ROLE() → (bytes32)
- getPools() → (tuple[])
- getRoleAdmin(bytes32) → (bytes32)
- getRoleMember(bytes32,uint256) → (address)
- getRoleMemberCount(bytes32) → (uint256)
- hasRole(bytes32,address) → (bool)
- lastDistribution() → (uint256)
- poolAdded(address) → (bool)
- pools(uint256) → (address,uint256)
- reward() → (address)
- rewardPerSecond() → (uint256)
- rewardSource() → (address)
- supportsInterface(bytes4) → (bool)
- totalWeight() → (uint256)
Write9
- addPool(address,uint256)
- adjustWeight(uint256,uint256)
- distributeRewards()
- grantRole(bytes32,address)
- removePool(uint256)
- renounceRole(bytes32,address)
- revokeRole(bytes32,address)
- saveToken(address,address,uint256)
- setRewardPerSecond(uint256)
Events9
- PoolAdded(address,uint256)
- PoolRemoved(uint256,address)
- RewardsDistributed(address,uint256)
- RewardsPerSecondSet(uint256)
- RoleAdminChanged(bytes32,bytes32,bytes32)
- RoleGranted(bytes32,address,address)
- RoleRevoked(bytes32,address,address)
- TokenSaved(address,address,address,uint256)
- WeightAdjusted(uint256,address,uint256)
ABI as JSON
[
{
"type": "constructor",
"inputs": [
{
"name": "_reward",
"type": "address",
"internalType": "address"
},
{
"name": "_rewardSource",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "nonpayable"
},
{
"name": "PoolAdded",
"type": "event",
"inputs": [
{
"name": "pool",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "weight",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "PoolRemoved",
"type": "event",
"inputs": [
{
"name": "poolId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "pool",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "RewardsDistributed",
"type": "event",
"inputs": [
{
"name": "_from",
"type": "address",
"indexed": false,
"internalType": "address"
},
{
"name": "_amount",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "RewardsPerSecondSet",
"type": "event",
"inputs": [
{
"name": "rewardsPerSecond",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "RoleAdminChanged",
"type": "event",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "previousAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "newAdminRole",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
}
],
"anonymous": false
},
{
"name": "RoleGranted",
"type": "event",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "RoleRevoked",
"type": "event",
"inputs": [
{
"name": "role",
"type": "bytes32",
"indexed": true,
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "sender",
"type": "address",
"indexed": true,
"internalType": "address"
}
],
"anonymous": false
},
{
"name": "TokenSaved",
"type": "event",
"inputs": [
{
"name": "by",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "receiver",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "token",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "amount",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "WeightAdjusted",
"type": "event",
"inputs": [
{
"name": "poolId",
"type": "uint256",
"indexed": true,
"internalType": "uint256"
},
{
"name": "pool",
"type": "address",
"indexed": true,
"internalType": "address"
},
{
"name": "newWeight",
"type": "uint256",
"indexed": false,
"internalType": "uint256"
}
],
"anonymous": false
},
{
"name": "DEFAULT_ADMIN_ROLE",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "GOV_ROLE",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "MAX_POOL_COUNT",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "REWARD_DISTRIBUTOR_ROLE",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "TOKEN_SAVER_ROLE",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "addPool",
"type": "function",
"inputs": [
{
"name": "_poolContract",
"type": "address",
"internalType": "address"
},
{
"name": "_weight",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "adjustWeight",
"type": "function",
"inputs": [
{
"name": "_poolId",
"type": "uint256",
"internalType": "uint256"
},
{
"name": "_newWeight",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "distributeRewards",
"type": "function",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "getPools",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "result",
"type": "tuple[]",
"components": [
{
"name": "poolContract",
"type": "address",
"internalType": "contract IBasePool"
},
{
"name": "weight",
"type": "uint256",
"internalType": "uint256"
}
],
"internalType": "struct StakingManager.Pool[]"
}
],
"stateMutability": "view"
},
{
"name": "getRoleAdmin",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "bytes32",
"internalType": "bytes32"
}
],
"stateMutability": "view"
},
{
"name": "getRoleMember",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "index",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "getRoleMemberCount",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
}
],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "grantRole",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "hasRole",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "lastDistribution",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "poolAdded",
"type": "function",
"inputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "pools",
"type": "function",
"inputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [
{
"name": "poolContract",
"type": "address",
"internalType": "contract IBasePool"
},
{
"name": "weight",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "removePool",
"type": "function",
"inputs": [
{
"name": "_poolId",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "renounceRole",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "revokeRole",
"type": "function",
"inputs": [
{
"name": "role",
"type": "bytes32",
"internalType": "bytes32"
},
{
"name": "account",
"type": "address",
"internalType": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "reward",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "contract IERC20"
}
],
"stateMutability": "view"
},
{
"name": "rewardPerSecond",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
},
{
"name": "rewardSource",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address",
"internalType": "address"
}
],
"stateMutability": "view"
},
{
"name": "saveToken",
"type": "function",
"inputs": [
{
"name": "_token",
"type": "address",
"internalType": "address"
},
{
"name": "_receiver",
"type": "address",
"internalType": "address"
},
{
"name": "_amount",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "setRewardPerSecond",
"type": "function",
"inputs": [
{
"name": "_rewardPerSecond",
"type": "uint256",
"internalType": "uint256"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"name": "supportsInterface",
"type": "function",
"inputs": [
{
"name": "interfaceId",
"type": "bytes4",
"internalType": "bytes4"
}
],
"outputs": [
{
"name": "",
"type": "bool",
"internalType": "bool"
}
],
"stateMutability": "view"
},
{
"name": "totalWeight",
"type": "function",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256",
"internalType": "uint256"
}
],
"stateMutability": "view"
}
]Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.