Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
PlatformAdminPanel
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 4000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "./Iplatform_admin_panel/IPlatformAdminPanel.sol"; /** * @title Platform admins holder contract * @notice Used to check accessibility of senders to admin functions in platform contracts */ contract PlatformAdminPanel is IPlatformAdminPanel { /** * @notice Emit during root admin set and reset */ event SetRootAdmin(address indexed wallet); event InsertAdminList(address[] adminList); event RemoveAdminList(address[] adminList); mapping(address => bool) private _adminMap; address private _rootAdmin; modifier onlyRootAdmin() { require(_rootAdmin == msg.sender, "sender is not root admin"); _; } /** * @notice Specify the root admin, only he has the rights to add and remove admins */ constructor(address rootAdminWallet) { _setRootAdmin(rootAdminWallet); } /** * @notice Needed to determine if the user has admin rights for platform contracts */ function isAdmin(address wallet) external view virtual override returns (bool) { return wallet == _rootAdmin || _adminMap[wallet]; } function rootAdmin() external view returns (address) { return _rootAdmin; } /** * @notice Only root admin can call */ function insertAdminList(address[] calldata adminList) external onlyRootAdmin { require(0 < adminList.length, "empty admin list"); require(20 >= adminList.length, "list too large"); uint256 index = adminList.length; while (0 < index) { --index; _adminMap[adminList[index]] = true; } emit InsertAdminList(adminList); } /** * @notice Only root admin can call */ function removeAdminList(address[] calldata adminList) external onlyRootAdmin { require(0 < adminList.length, "empty admin list"); require(20 >= adminList.length, "list too large"); uint256 index = adminList.length; while (0 < index) { --index; _adminMap[adminList[index]] = false; } emit RemoveAdminList(adminList); } /** * @notice Only root admin can call */ function setRootAdmin(address rootAdminWallet) external onlyRootAdmin { _setRootAdmin(rootAdminWallet); } function _setRootAdmin(address wallet) private { require(wallet != address(0), "wallet is zero address"); _rootAdmin = wallet; emit SetRootAdmin(wallet); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; interface IPlatformAdminPanel { function isAdmin(address wallet) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 4000 }, "viaIR": true, "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":"rootAdminWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"adminList","type":"address[]"}],"name":"InsertAdminList","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"adminList","type":"address[]"}],"name":"RemoveAdminList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"wallet","type":"address"}],"name":"SetRootAdmin","type":"event"},{"inputs":[{"internalType":"address[]","name":"adminList","type":"address[]"}],"name":"insertAdminList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"adminList","type":"address[]"}],"name":"removeAdminList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rootAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"rootAdminWallet","type":"address"}],"name":"setRootAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080346100e357601f61079638819003918201601f19168301916001600160401b038311848410176100e8578084926020946040528339810103126100e357516001600160a01b038116908190036100e357801561009e57600180546001600160a01b03191682179055604051907faa0f136f518a258bb132715650046b298023478e2343ab5c671c58f9b3e56721600080a261069790816100ff8239f35b60405162461bcd60e51b815260206004820152601660248201527f77616c6c6574206973207a65726f2061646472657373000000000000000000006044820152606490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe604060808152600436101561001357600080fd5b6000803560e01c806306edbc25146102ac57806324d7806c1461024657806358d642e81461020d5780636e6ac56a146101355763ca0d95641461005557600080fd5b3461013257610063366103ca565b9073ffffffffffffffffffffffffffffffffffffffff61008881600154163314610417565b61009383151561047c565b6100a083601410156104e1565b82805b6100df5750506100d97f85e774f20ee0926d70b439b0b16e8b7205d685dd7483db6f0aa3d07c98ad40d193945192839283610600565b0390a180f35b6100e890610546565b816100fc6100f78387876105a0565b6105df565b16855284602052808686207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690556100a3565b80fd5b503461013257610144366103ca565b9073ffffffffffffffffffffffffffffffffffffffff60019061016b818354163314610417565b61017684151561047c565b61018384601410156104e1565b83805b6101bd575050506100d97fdb90f7cbfb0c460a567d81d19295becb7f35cca1ff724ab21a6f74742b426d5093945192839283610600565b6101c690610546565b816101d56100f78388886105a0565b1686528560205280878720847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055610186565b50903461024257816003193601126102425760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b5080fd5b50903461024257602060031936011261024257906020916102656103a2565b9173ffffffffffffffffffffffffffffffffffffffff80600154169316928314928315610297575b5050519015158152f35b81528084528190205460ff169150388061028d565b509034610242576020600319360112610242576102c76103a2565b6001549073ffffffffffffffffffffffffffffffffffffffff906102ee3383851614610417565b1691821561034557507fffffffffffffffffffffffff00000000000000000000000000000000000000001681176001557faa0f136f518a258bb132715650046b298023478e2343ab5c671c58f9b3e567218280a280f35b606490517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f77616c6c6574206973207a65726f2061646472657373000000000000000000006044820152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036103c557565b600080fd5b9060206003198301126103c55760043567ffffffffffffffff928382116103c557806023830112156103c55781600401359384116103c55760248460051b830101116103c5576024019190565b1561041e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f73656e646572206973206e6f7420726f6f742061646d696e00000000000000006044820152fd5b1561048357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f656d7074792061646d696e206c697374000000000000000000000000000000006044820152fd5b156104e857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6c69737420746f6f206c617267650000000000000000000000000000000000006044820152fd5b8015610571577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908110156105b05760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036103c55790565b9091604060209282848201858352520192916000805b83821061062557505050505090565b9091929394853573ffffffffffffffffffffffffffffffffffffffff811680910361065d578152830194830193929160010190610616565b8280fdfea26469706673582212204ffae16d641ebb34b3a4406ea47a69c34ea2dd7880f9928482305eb57919afd864736f6c63430008130033000000000000000000000000de76f058649325ee399477f0251512356ee79e68
Deployed Bytecode
0x604060808152600436101561001357600080fd5b6000803560e01c806306edbc25146102ac57806324d7806c1461024657806358d642e81461020d5780636e6ac56a146101355763ca0d95641461005557600080fd5b3461013257610063366103ca565b9073ffffffffffffffffffffffffffffffffffffffff61008881600154163314610417565b61009383151561047c565b6100a083601410156104e1565b82805b6100df5750506100d97f85e774f20ee0926d70b439b0b16e8b7205d685dd7483db6f0aa3d07c98ad40d193945192839283610600565b0390a180f35b6100e890610546565b816100fc6100f78387876105a0565b6105df565b16855284602052808686207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690556100a3565b80fd5b503461013257610144366103ca565b9073ffffffffffffffffffffffffffffffffffffffff60019061016b818354163314610417565b61017684151561047c565b61018384601410156104e1565b83805b6101bd575050506100d97fdb90f7cbfb0c460a567d81d19295becb7f35cca1ff724ab21a6f74742b426d5093945192839283610600565b6101c690610546565b816101d56100f78388886105a0565b1686528560205280878720847fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055610186565b50903461024257816003193601126102425760209073ffffffffffffffffffffffffffffffffffffffff600154169051908152f35b5080fd5b50903461024257602060031936011261024257906020916102656103a2565b9173ffffffffffffffffffffffffffffffffffffffff80600154169316928314928315610297575b5050519015158152f35b81528084528190205460ff169150388061028d565b509034610242576020600319360112610242576102c76103a2565b6001549073ffffffffffffffffffffffffffffffffffffffff906102ee3383851614610417565b1691821561034557507fffffffffffffffffffffffff00000000000000000000000000000000000000001681176001557faa0f136f518a258bb132715650046b298023478e2343ab5c671c58f9b3e567218280a280f35b606490517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f77616c6c6574206973207a65726f2061646472657373000000000000000000006044820152fd5b6004359073ffffffffffffffffffffffffffffffffffffffff821682036103c557565b600080fd5b9060206003198301126103c55760043567ffffffffffffffff928382116103c557806023830112156103c55781600401359384116103c55760248460051b830101116103c5576024019190565b1561041e57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f73656e646572206973206e6f7420726f6f742061646d696e00000000000000006044820152fd5b1561048357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f656d7074792061646d696e206c697374000000000000000000000000000000006044820152fd5b156104e857565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6c69737420746f6f206c617267650000000000000000000000000000000000006044820152fd5b8015610571577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b91908110156105b05760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b3573ffffffffffffffffffffffffffffffffffffffff811681036103c55790565b9091604060209282848201858352520192916000805b83821061062557505050505090565b9091929394853573ffffffffffffffffffffffffffffffffffffffff811680910361065d578152830194830193929160010190610616565b8280fdfea26469706673582212204ffae16d641ebb34b3a4406ea47a69c34ea2dd7880f9928482305eb57919afd864736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000de76f058649325ee399477f0251512356ee79e68
-----Decoded View---------------
Arg [0] : rootAdminWallet (address): 0xDe76F058649325ee399477f0251512356Ee79E68
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000de76f058649325ee399477f0251512356ee79e68
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.