Overview
Max Total Supply
986,234.964765592332362544 xPREMIA
Holders
337 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
60,821.023284550762058397 xPREMIAValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PremiaStakingProxy
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 // For further clarification please see https://license.premia.legal pragma solidity ^0.8.0; import {ProxyUpgradeableOwnable} from "../ProxyUpgradeableOwnable.sol"; import {ERC20MetadataStorage} from "@solidstate/contracts/token/ERC20/metadata/ERC20MetadataStorage.sol"; import {PremiaStakingStorage} from "./PremiaStakingStorage.sol"; contract PremiaStakingProxy is ProxyUpgradeableOwnable { using ERC20MetadataStorage for ERC20MetadataStorage.Layout; constructor(address implementation) ProxyUpgradeableOwnable(implementation) { ERC20MetadataStorage.Layout storage l = ERC20MetadataStorage.layout(); l.setName("Staked Premia"); l.setSymbol("xPREMIA"); l.setDecimals(18); PremiaStakingStorage.layout().withdrawalDelay = 10 days; } }
// SPDX-License-Identifier: BUSL-1.1 // For further clarification please see https://license.premia.legal pragma solidity ^0.8.0; import {Proxy} from "@solidstate/contracts/proxy/Proxy.sol"; import {SafeOwnable, OwnableStorage} from "@solidstate/contracts/access/SafeOwnable.sol"; import {ProxyUpgradeableOwnableStorage} from "./ProxyUpgradeableOwnableStorage.sol"; contract ProxyUpgradeableOwnable is Proxy, SafeOwnable { using ProxyUpgradeableOwnableStorage for ProxyUpgradeableOwnableStorage.Layout; using OwnableStorage for OwnableStorage.Layout; constructor(address implementation) { OwnableStorage.layout().setOwner(msg.sender); ProxyUpgradeableOwnableStorage.layout().implementation = implementation; } receive() external payable {} /** * @inheritdoc Proxy */ function _getImplementation() internal view override returns (address) { return ProxyUpgradeableOwnableStorage.layout().implementation; } /** * @notice get address of implementation contract * @return implementation address */ function getImplementation() external view returns (address) { return _getImplementation(); } /** * @notice set address of implementation contract * @param implementation address of the new implementation */ function setImplementation(address implementation) external onlyOwner { ProxyUpgradeableOwnableStorage.layout().implementation = implementation; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ERC20MetadataStorage { struct Layout { string name; string symbol; uint8 decimals; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.ERC20Metadata'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setName(Layout storage l, string memory name) internal { l.name = name; } function setSymbol(Layout storage l, string memory symbol) internal { l.symbol = symbol; } function setDecimals(Layout storage l, uint8 decimals) internal { l.decimals = decimals; } }
// SPDX-License-Identifier: BUSL-1.1 // For further clarification please see https://license.premia.legal pragma solidity ^0.8.0; library PremiaStakingStorage { bytes32 internal constant STORAGE_SLOT = keccak256("premia.contracts.staking.PremiaStaking"); struct Withdrawal { uint256 amount; // Premia amount uint256 startDate; // Will unlock at startDate + withdrawalDelay } struct Layout { uint256 pendingWithdrawal; uint256 withdrawalDelay; mapping(address => Withdrawal) withdrawals; } function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { AddressUtils } from '../utils/AddressUtils.sol'; /** * @title Base proxy contract */ abstract contract Proxy { using AddressUtils for address; /** * @notice delegate all calls to implementation contract * @dev reverts if implementation address contains no code, for compatibility with metamorphic contracts * @dev memory location in use by assembly may be unsafe in other contexts */ fallback() external payable virtual { address implementation = _getImplementation(); require( implementation.isContract(), 'Proxy: implementation must be contract' ); 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()) } } } /** * @notice get logic implementation address * @return implementation address */ function _getImplementation() internal virtual returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { Ownable, OwnableStorage } from './Ownable.sol'; import { SafeOwnableInternal } from './SafeOwnableInternal.sol'; import { SafeOwnableStorage } from './SafeOwnableStorage.sol'; /** * @title Ownership access control based on ERC173 with ownership transfer safety check */ abstract contract SafeOwnable is Ownable, SafeOwnableInternal { using OwnableStorage for OwnableStorage.Layout; using SafeOwnableStorage for SafeOwnableStorage.Layout; function nomineeOwner() public view virtual returns (address) { return SafeOwnableStorage.layout().nomineeOwner; } /** * @inheritdoc Ownable * @dev ownership transfer must be accepted by beneficiary before transfer is complete */ function transferOwnership(address account) public virtual override onlyOwner { SafeOwnableStorage.layout().setNomineeOwner(account); } /** * @notice accept transfer of contract ownership */ function acceptOwnership() public virtual onlyNomineeOwner { OwnableStorage.Layout storage l = OwnableStorage.layout(); emit OwnershipTransferred(l.owner, msg.sender); l.setOwner(msg.sender); SafeOwnableStorage.layout().setNomineeOwner(address(0)); } }
// SPDX-License-Identifier: BUSL-1.1 // For further clarification please see https://license.premia.legal pragma solidity ^0.8.0; library ProxyUpgradeableOwnableStorage { bytes32 internal constant STORAGE_SLOT = keccak256("premia.contracts.storage.ProxyUpgradeableOwnable"); struct Layout { address implementation; } function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library AddressUtils { function toString(address account) internal pure returns (string memory) { bytes32 value = bytes32(uint256(uint160(account))); bytes memory alphabet = '0123456789abcdef'; bytes memory chars = new bytes(42); chars[0] = '0'; chars[1] = 'x'; for (uint256 i = 0; i < 20; i++) { chars[2 + i * 2] = alphabet[uint8(value[i + 12] >> 4)]; chars[3 + i * 2] = alphabet[uint8(value[i + 12] & 0x0f)]; } return string(chars); } function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable account, uint256 amount) internal { (bool success, ) = account.call{ value: amount }(''); require(success, 'AddressUtils: failed to send value'); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, 'AddressUtils: failed low-level call'); } function functionCall( address target, bytes memory data, string memory error ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, error); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, 'AddressUtils: failed low-level call with value' ); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) internal returns (bytes memory) { require( address(this).balance >= value, 'AddressUtils: insufficient balance for call' ); return _functionCallWithValue(target, data, value, error); } function _functionCallWithValue( address target, bytes memory data, uint256 value, string memory error ) private returns (bytes memory) { require( isContract(target), 'AddressUtils: function call to non-contract' ); (bool success, bytes memory returnData) = target.call{ value: value }( data ); if (success) { return returnData; } else if (returnData.length > 0) { assembly { let returnData_size := mload(returnData) revert(add(32, returnData), returnData_size) } } else { revert(error); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { IERC173 } from './IERC173.sol'; import { OwnableInternal } from './OwnableInternal.sol'; import { OwnableStorage } from './OwnableStorage.sol'; /** * @title Ownership access control based on ERC173 */ abstract contract Ownable is IERC173, OwnableInternal { using OwnableStorage for OwnableStorage.Layout; /** * @inheritdoc IERC173 */ function owner() public view virtual override returns (address) { return OwnableStorage.layout().owner; } /** * @inheritdoc IERC173 */ function transferOwnership(address account) public virtual override onlyOwner { OwnableStorage.layout().setOwner(account); emit OwnershipTransferred(msg.sender, account); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { SafeOwnableStorage } from './SafeOwnableStorage.sol'; abstract contract SafeOwnableInternal { using SafeOwnableStorage for SafeOwnableStorage.Layout; modifier onlyNomineeOwner() { require( msg.sender == SafeOwnableStorage.layout().nomineeOwner, 'SafeOwnable: sender must be nominee owner' ); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library SafeOwnableStorage { struct Layout { address nomineeOwner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.SafeOwnable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setNomineeOwner(Layout storage l, address nomineeOwner) internal { l.nomineeOwner = nomineeOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Contract ownership standard interface * @dev see https://eips.ethereum.org/EIPS/eip-173 */ interface IERC173 { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @notice get the ERC173 contract owner * @return conract owner */ function owner() external view returns (address); /** * @notice transfer contract ownership to new account * @param account address of new owner */ function transferOwnership(address account) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { OwnableStorage } from './OwnableStorage.sol'; abstract contract OwnableInternal { using OwnableStorage for OwnableStorage.Layout; modifier onlyOwner() { require( msg.sender == OwnableStorage.layout().owner, 'Ownable: sender must be owner' ); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library OwnableStorage { struct Layout { address owner; } bytes32 internal constant STORAGE_SLOT = keccak256('solidstate.contracts.storage.Ownable'); function layout() internal pure returns (Layout storage l) { bytes32 slot = STORAGE_SLOT; assembly { l.slot := slot } } function setOwner(Layout storage l, address owner) internal { l.owner = owner; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nomineeOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"setImplementation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620009b8380380620009b883398101604081905262000034916200030f565b8062000063336200004f6200017360201b620003de1760201c565b6200019760201b620004021790919060201c565b8062000079620001b460201b6200041f1760201c565b60000160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550506000620000b8620001d860201b620004431760201c565b9050620000f96040518060400160405280600d81526020016c5374616b6564205072656d696160981b81525082620001fc60201b620004671790919060201c565b6200013260405180604001604052806007815260200166785052454d494160c81b815250826200021560201b6200047e1790919060201c565b6200014d6012826200022c60201b620004931790919060201c565b620d2f00620001666200024560201b620004ac1760201c565b60010155506200037e9050565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b7fec1bacb76164b9264bf407e47c681dddfa298268d816c359f3290c1efbd02ab290565b7f2967a798b92539a1b9eefe4d8eb931f96b68d27665e276f1bee2d5db7f74304790565b805162000210908390602084019062000269565b505050565b805162000210906001840190602084019062000269565b600291909101805460ff191660ff909216919091179055565b7f93fc9d7292a51a532b02476d8b2b9af907a368e01a95aad9b65afa72ad771d5d90565b828054620002779062000341565b90600052602060002090601f0160209004810192826200029b5760008555620002e6565b82601f10620002b657805160ff1916838001178555620002e6565b82800160010185558215620002e6579182015b82811115620002e6578251825591602001919060010190620002c9565b50620002f4929150620002f8565b5090565b5b80821115620002f45760008155600101620002f9565b6000602082840312156200032257600080fd5b81516001600160a01b03811681146200033a57600080fd5b9392505050565b600181811c908216806200035657607f821691505b602082108114156200037857634e487b7160e01b600052602260045260246000fd5b50919050565b61062a806200038e6000396000f3fe6080604052600436106100595760003560e01c806379ba5097146100fb5780638ab5150a146101125780638da5cb5b14610143578063aaf10f4214610158578063d784d4261461016d578063f2fde38b1461018d57610060565b3661006057005b600061006a6101ad565b90506001600160a01b0381163b6100d75760405162461bcd60e51b815260206004820152602660248201527f50726f78793a20696d706c656d656e746174696f6e206d75737420626520636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8080156100f6573d6000f35b3d6000fd5b34801561010757600080fd5b506101106101c6565b005b34801561011e57600080fd5b506101276102ad565b6040516001600160a01b03909116815260200160405180910390f35b34801561014f57600080fd5b506101276102c3565b34801561016457600080fd5b506101276102cd565b34801561017957600080fd5b50610110610188366004610569565b6102dc565b34801561019957600080fd5b506101106101a8366004610569565b610366565b60006101b761041f565b546001600160a01b0316919050565b6000805160206105d5833981519152546001600160a01b0316331461023f5760405162461bcd60e51b815260206004820152602960248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d696044820152683732b29037bbb732b960b91b60648201526084016100ce565b60006102496103de565b805460405191925033916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a361028f8133610402565b6102aa60006000805160206105d58339815191525b90610402565b50565b60006000805160206105d58339815191526101b7565b60006101b76103de565b60006102d76101ad565b905090565b6102e46103de565b546001600160a01b0316331461033c5760405162461bcd60e51b815260206004820152601d60248201527f4f776e61626c653a2073656e646572206d757374206265206f776e657200000060448201526064016100ce565b8061034561041f565b80546001600160a01b0319166001600160a01b039290921691909117905550565b61036e6103de565b546001600160a01b031633146103c65760405162461bcd60e51b815260206004820152601d60248201527f4f776e61626c653a2073656e646572206d757374206265206f776e657200000060448201526064016100ce565b6102aa816000805160206105d58339815191526102a4565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b7fec1bacb76164b9264bf407e47c681dddfa298268d816c359f3290c1efbd02ab290565b7f2967a798b92539a1b9eefe4d8eb931f96b68d27665e276f1bee2d5db7f74304790565b805161047990839060208401906104d0565b505050565b805161047990600184019060208401906104d0565b600291909101805460ff191660ff909216919091179055565b7f93fc9d7292a51a532b02476d8b2b9af907a368e01a95aad9b65afa72ad771d5d90565b8280546104dc90610599565b90600052602060002090601f0160209004810192826104fe5760008555610544565b82601f1061051757805160ff1916838001178555610544565b82800160010185558215610544579182015b82811115610544578251825591602001919060010190610529565b50610550929150610554565b5090565b5b808211156105505760008155600101610555565b60006020828403121561057b57600080fd5b81356001600160a01b038116811461059257600080fd5b9392505050565b600181811c908216806105ad57607f821691505b602082108114156105ce57634e487b7160e01b600052602260045260246000fd5b5091905056fe24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce6617890a264697066735822122062711c1b80f36e869dfb94bf5ef3f420e04472e122d325477618b1f922a2e38164736f6c634300080900330000000000000000000000005068219091050be4efec7c392ad68f0560c722d9
Deployed Bytecode
0x6080604052600436106100595760003560e01c806379ba5097146100fb5780638ab5150a146101125780638da5cb5b14610143578063aaf10f4214610158578063d784d4261461016d578063f2fde38b1461018d57610060565b3661006057005b600061006a6101ad565b90506001600160a01b0381163b6100d75760405162461bcd60e51b815260206004820152602660248201527f50726f78793a20696d706c656d656e746174696f6e206d75737420626520636f6044820152651b9d1c9858dd60d21b60648201526084015b60405180910390fd5b3660008037600080366000845af43d6000803e8080156100f6573d6000f35b3d6000fd5b34801561010757600080fd5b506101106101c6565b005b34801561011e57600080fd5b506101276102ad565b6040516001600160a01b03909116815260200160405180910390f35b34801561014f57600080fd5b506101276102c3565b34801561016457600080fd5b506101276102cd565b34801561017957600080fd5b50610110610188366004610569565b6102dc565b34801561019957600080fd5b506101106101a8366004610569565b610366565b60006101b761041f565b546001600160a01b0316919050565b6000805160206105d5833981519152546001600160a01b0316331461023f5760405162461bcd60e51b815260206004820152602960248201527f536166654f776e61626c653a2073656e646572206d757374206265206e6f6d696044820152683732b29037bbb732b960b91b60648201526084016100ce565b60006102496103de565b805460405191925033916001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a361028f8133610402565b6102aa60006000805160206105d58339815191525b90610402565b50565b60006000805160206105d58339815191526101b7565b60006101b76103de565b60006102d76101ad565b905090565b6102e46103de565b546001600160a01b0316331461033c5760405162461bcd60e51b815260206004820152601d60248201527f4f776e61626c653a2073656e646572206d757374206265206f776e657200000060448201526064016100ce565b8061034561041f565b80546001600160a01b0319166001600160a01b039290921691909117905550565b61036e6103de565b546001600160a01b031633146103c65760405162461bcd60e51b815260206004820152601d60248201527f4f776e61626c653a2073656e646572206d757374206265206f776e657200000060448201526064016100ce565b6102aa816000805160206105d58339815191526102a4565b7f8a22373512790c48b83a1fe2efdd2888d4a917bcdc24d0adf63e60f67168046090565b81546001600160a01b0319166001600160a01b0391909116179055565b7fec1bacb76164b9264bf407e47c681dddfa298268d816c359f3290c1efbd02ab290565b7f2967a798b92539a1b9eefe4d8eb931f96b68d27665e276f1bee2d5db7f74304790565b805161047990839060208401906104d0565b505050565b805161047990600184019060208401906104d0565b600291909101805460ff191660ff909216919091179055565b7f93fc9d7292a51a532b02476d8b2b9af907a368e01a95aad9b65afa72ad771d5d90565b8280546104dc90610599565b90600052602060002090601f0160209004810192826104fe5760008555610544565b82601f1061051757805160ff1916838001178555610544565b82800160010185558215610544579182015b82811115610544578251825591602001919060010190610529565b50610550929150610554565b5090565b5b808211156105505760008155600101610555565b60006020828403121561057b57600080fd5b81356001600160a01b038116811461059257600080fd5b9392505050565b600181811c908216806105ad57607f821691505b602082108114156105ce57634e487b7160e01b600052602260045260246000fd5b5091905056fe24aa1f7b31fd188a8d3ecfb06bc55c806040e59b03bd4396283442fce6617890a264697066735822122062711c1b80f36e869dfb94bf5ef3f420e04472e122d325477618b1f922a2e38164736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000005068219091050be4efec7c392ad68f0560c722d9
-----Decoded View---------------
Arg [0] : implementation (address): 0x5068219091050bE4EfEc7c392aD68F0560C722D9
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000005068219091050be4efec7c392ad68f0560c722d9
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.