Contract
0x5c48d3ca6d1f454a8832e24a02e361453aa9432f
1
Contract Overview
My Name Tag:
Not Available, login to update
[ Download CSV Export ]
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x7C93b5Afc0Dad5Df7057346B38Aa38Ab7317cC28
Contract Name:
MimasStakingProxy
Compiler Version
v0.5.17+commit.d19bba13
Contract Source Code (Solidity)
/** *Submitted for verification at cronoscan.com on 2022-03-09 */ // Sources flattened with hardhat v2.7.0 https://hardhat.org // File contracts/Staking/ReentrancyGuard.sol pragma solidity 0.5.17; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() public { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } } // File contracts/Staking/MimasStakingProxyStorage.sol pragma solidity 0.5.17; contract MimasStakingProxyStorage { // Current contract admin address address public admin; // Requested new admin for the contract address public pendingAdmin; // Current contract implementation address address public implementation; // Requested new contract implementation address address public pendingImplementation; } // File contracts/Staking/MimasStakingProxy.sol pragma solidity 0.5.17; contract MimasStakingProxy is ReentrancyGuard, MimasStakingProxyStorage { constructor() public { admin = msg.sender; } /** * Request a new admin to be set for the contract. * * @param newAdmin New admin address */ function setPendingAdmin(address newAdmin) public adminOnly { pendingAdmin = newAdmin; } /** * Accept admin transfer from the current admin to the new. */ function acceptPendingAdmin() public { require(msg.sender == pendingAdmin && pendingAdmin != address(0), "Caller must be the pending admin"); admin = pendingAdmin; pendingAdmin = address(0); } /** * Request a new implementation to be set for the contract. * * @param newImplementation New contract implementation contract address */ function setPendingImplementation(address newImplementation) public adminOnly { pendingImplementation = newImplementation; } /** * Accept pending implementation change */ function acceptPendingImplementation() public { require(msg.sender == pendingImplementation && pendingImplementation != address(0), "Only the pending implementation contract can call this"); implementation = pendingImplementation; pendingImplementation = address(0); } function () payable external { (bool success, ) = implementation.delegatecall(msg.data); assembly { let free_mem_ptr := mload(0x40) returndatacopy(free_mem_ptr, 0, returndatasize) switch success case 0 { revert(free_mem_ptr, returndatasize) } default { return(free_mem_ptr, returndatasize) } } } /******************************************************** * * * MODIFIERS * * * ********************************************************/ modifier adminOnly { require(msg.sender == admin, "admin only"); _; } }
[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":false,"inputs":[],"name":"acceptPendingAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"acceptPendingImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setPendingAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"setPendingImplementation","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506001600081905580546001600160a01b031916331790556104a5806100376000396000f3fe60806040526004361061007b5760003560e01c80634dd18bf51161004e5780634dd18bf51461018e5780635c60da1b146101c1578063709920c1146101d6578063f851a440146101eb5761007b565b806309ed43c9146100fe57806316ec205c146101335780632678224714610148578063396f7b2314610179575b6003546040516000916001600160a01b031690829036908083838082843760405192019450600093509091505080830381855af49150503d80600081146100de576040519150601f19603f3d011682016040523d82523d6000602084013e6100e3565b606091505b505090506040513d6000823e8180156100fa573d82f35b3d82fd5b34801561010a57600080fd5b506101316004803603602081101561012157600080fd5b50356001600160a01b0316610200565b005b34801561013f57600080fd5b5061013161026e565b34801561015457600080fd5b5061015d6102f4565b604080516001600160a01b039092168252519081900360200190f35b34801561018557600080fd5b5061015d610303565b34801561019a57600080fd5b50610131600480360360208110156101b157600080fd5b50356001600160a01b0316610312565b3480156101cd57600080fd5b5061015d610380565b3480156101e257600080fd5b5061013161038f565b3480156101f757600080fd5b5061015d61042b565b6001546001600160a01b0316331461024c576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b600480546001600160a01b0319166001600160a01b0392909216919091179055565b6004546001600160a01b03163314801561029257506004546001600160a01b031615155b6102cd5760405162461bcd60e51b815260040180806020018281038252603681526020018061043b6036913960400191505060405180910390fd5b60048054600380546001600160a01b03199081166001600160a01b03841617909155169055565b6002546001600160a01b031681565b6004546001600160a01b031681565b6001546001600160a01b0316331461035e576040805162461bcd60e51b815260206004820152600a60248201526961646d696e206f6e6c7960b01b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b6003546001600160a01b031681565b6002546001600160a01b0316331480156103b357506002546001600160a01b031615155b610404576040805162461bcd60e51b815260206004820181905260248201527f43616c6c6572206d757374206265207468652070656e64696e672061646d696e604482015290519081900360640190fd5b60028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6001546001600160a01b03168156fe4f6e6c79207468652070656e64696e6720696d706c656d656e746174696f6e20636f6e74726163742063616e2063616c6c2074686973a265627a7a723158206ae16051a0faccf075178a33fd6f902da9958897f634dc5a12369bfdcf9c2cb164736f6c63430005110032
Deployed ByteCode Sourcemap
3279:2201:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4722:14;;:37;;4704:12;;-1:-1:-1;;;;;4722:14:0;;4704:12;;4750:8;;4722:37;4704:12;4750:8;;4704:12;4722:37;1:33:-1;4722:37:0;;45:16:-1;;;-1:-1;4722:37:0;;-1:-1:-1;4722:37:0;;-1:-1:-1;;4722:37:0;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;4703:56:0;;;4822:4;4816:11;4873:14;4870:1;4856:12;4841:47;4911:7;4932:47;;;;5024:14;5010:12;5003:36;4932:47;4962:14;4948:12;4941:36;4144:138;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4144:138:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;4144:138:0;-1:-1:-1;;;;;4144:138:0;;:::i;:::-;;4353:302;;8:9:-1;5:2;;;30:1;27;20:12;5:2;4353:302:0;;;:::i;2977:27::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2977:27:0;;;:::i;:::-;;;;-1:-1:-1;;;;;2977:27:0;;;;;;;;;;;;;;3153:36;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3153:36:0;;;:::i;3548:102::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3548:102:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3548:102:0;-1:-1:-1;;;;;3548:102:0;;:::i;3061:29::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3061:29:0;;;:::i;3741:226::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;3741:226:0;;;:::i;2903:20::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2903:20:0;;;:::i;4144:138::-;5437:5;;-1:-1:-1;;;;;5437:5:0;5423:10;:19;5415:42;;;;;-1:-1:-1;;;5415:42:0;;;;;;;;;;;;-1:-1:-1;;;5415:42:0;;;;;;;;;;;;;;;4233:21;:41;;-1:-1:-1;;;;;;4233:41:0;-1:-1:-1;;;;;4233:41:0;;;;;;;;;;4144:138::o;4353:302::-;4432:21;;-1:-1:-1;;;;;4432:21:0;4418:10;:35;:74;;;;-1:-1:-1;4457:21:0;;-1:-1:-1;;;;;4457:21:0;:35;;4418:74;4410:141;;;;-1:-1:-1;;;4410:141:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4581:21;;;4564:14;:38;;-1:-1:-1;;;;;;4564:38:0;;;-1:-1:-1;;;;;4581:21:0;;4564:38;;;;4613:34;;;4353:302::o;2977:27::-;;;-1:-1:-1;;;;;2977:27:0;;:::o;3153:36::-;;;-1:-1:-1;;;;;3153:36:0;;:::o;3548:102::-;5437:5;;-1:-1:-1;;;;;5437:5:0;5423:10;:19;5415:42;;;;;-1:-1:-1;;;5415:42:0;;;;;;;;;;;;-1:-1:-1;;;5415:42:0;;;;;;;;;;;;;;;3619:12;:23;;-1:-1:-1;;;;;;3619:23:0;-1:-1:-1;;;;;3619:23:0;;;;;;;;;;3548:102::o;3061:29::-;;;-1:-1:-1;;;;;3061:29:0;;:::o;3741:226::-;3811:12;;-1:-1:-1;;;;;3811:12:0;3797:10;:26;:56;;;;-1:-1:-1;3827:12:0;;-1:-1:-1;;;;;3827:12:0;:26;;3797:56;3789:101;;;;;-1:-1:-1;;;3789:101:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3911:12;;;;3903:20;;-1:-1:-1;;;;;;3903:20:0;;;-1:-1:-1;;;;;3911:12:0;;3903:20;;;;3934:25;;;3741:226::o;2903:20::-;;;-1:-1:-1;;;;;2903:20:0;;:::o
Swarm Source
bzzr://6ae16051a0faccf075178a33fd6f902da9958897f634dc5a12369bfdcf9c2cb1
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.