ETH Price: $2,238.04 (-1.62%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Add Whitelisted ...236018362025-10-18 3:25:23109 days ago1760757923IN
0x4CD22e39...25ecE0423
0 ETH0.000004930.10431407

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
PermissionsManager

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 10000 runs

Other Settings:
paris EvmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

/// @title PermissionsManager
/// @notice Manages admin and whitelisted caller permissions for the lending system
contract PermissionsManager {
    /*//////////////////////////////////////////////////////////////
                                STORAGE
    //////////////////////////////////////////////////////////////*/

    /// @notice The admin address who can manage permissions
    address public admin;

    /// @notice Mapping of whitelisted callers
    mapping(address => bool) public whitelistedCallers;

    /*//////////////////////////////////////////////////////////////
                                EVENTS
    //////////////////////////////////////////////////////////////*/

    event AdminUpdated(address indexed oldAdmin, address indexed newAdmin);
    event CallerWhitelisted(address indexed caller);
    event CallerRemovedFromWhitelist(address indexed caller);

    /*//////////////////////////////////////////////////////////////
                                ERRORS
    //////////////////////////////////////////////////////////////*/

    error OnlyAdmin();
    error UnauthorizedCaller();
    error AdminZeroAddress();
    error CallerAlreadyWhitelisted();
    error CallerNotWhitelisted();

    /*//////////////////////////////////////////////////////////////
                               MODIFIERS
    //////////////////////////////////////////////////////////////*/

    /// @notice Restricts function access to admin only
    modifier onlyAdmin() {
        if (msg.sender != admin) revert OnlyAdmin();
        _;
    }

    /// @notice Restricts function access to whitelisted callers only
    modifier onlyAuthorized() {
        if (!whitelistedCallers[msg.sender]) revert UnauthorizedCaller();
        _;
    }

    /*//////////////////////////////////////////////////////////////
                              CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    /// @notice Constructor sets the initial admin
    /// @param _admin The initial admin address
    constructor(address _admin) {
        if (_admin == address(0)) revert AdminZeroAddress();
        admin = _admin;

        // Admin is automatically whitelisted
        whitelistedCallers[_admin] = true;

        emit AdminUpdated(address(0), _admin);
        emit CallerWhitelisted(_admin);
    }

    /*//////////////////////////////////////////////////////////////
                           ADMIN FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /// @notice Updates the admin address
    /// @param newAdmin The new admin address
    function updateAdmin(address newAdmin) external onlyAdmin {
        if (newAdmin == address(0)) revert AdminZeroAddress();

        address oldAdmin = admin;
        admin = newAdmin;

        // Automatically whitelist new admin
        whitelistedCallers[newAdmin] = true;

        emit AdminUpdated(oldAdmin, newAdmin);
        emit CallerWhitelisted(newAdmin);
    }

    /// @notice Adds a caller to the whitelist
    /// @param caller The address to whitelist
    function addWhitelistedCaller(address caller) external onlyAdmin {
        if (whitelistedCallers[caller]) revert CallerAlreadyWhitelisted();

        whitelistedCallers[caller] = true;
        emit CallerWhitelisted(caller);
    }

    /// @notice Removes a caller from the whitelist
    /// @param caller The address to remove from whitelist
    function removeWhitelistedCaller(address caller) external onlyAdmin {
        if (!whitelistedCallers[caller]) revert CallerNotWhitelisted();
        if (caller == admin) revert OnlyAdmin(); // Cannot remove admin from whitelist

        whitelistedCallers[caller] = false;
        emit CallerRemovedFromWhitelist(caller);
    }

    /*//////////////////////////////////////////////////////////////
                            VIEW FUNCTIONS
    //////////////////////////////////////////////////////////////*/

    /// @notice Checks if a caller is authorized (whitelisted)
    /// @param caller The address to check
    /// @return True if the caller is whitelisted
    function isAuthorized(address caller) external view returns (bool) {
        return whitelistedCallers[caller];
    }

    /// @notice Gets the current admin address
    /// @return The admin address
    function getAdmin() external view returns (address) {
        return admin;
    }
}

Settings
{
  "remappings": [
    "@pendle/core-v2/=lib/pendle-core-v2-public/",
    "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "aave-v3-core/=lib/aave-v3-core/",
    "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
    "morpho-blue/=lib/morpho-blue/",
    "pendle-core-v2-public/=lib/pendle-core-v2-public/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_admin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdminZeroAddress","type":"error"},{"inputs":[],"name":"CallerAlreadyWhitelisted","type":"error"},{"inputs":[],"name":"CallerNotWhitelisted","type":"error"},{"inputs":[],"name":"OnlyAdmin","type":"error"},{"inputs":[],"name":"UnauthorizedCaller","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"CallerRemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"}],"name":"CallerWhitelisted","type":"event"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"addWhitelistedCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"removeWhitelistedCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"updateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistedCallers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

6080346100ef57601f6105a238819003918201601f19168301916001600160401b038311848410176100f4578084926020946040528339810103126100ef57516001600160a01b038116908190036100ef5780156100dd57600080546001600160a01b03191682178155818152600160208190526040808320805460ff19169092179091555191907ff3ffadc9e9649124b255960f6392f1df28383cd27442f172a2888e4c73f8cde39082817f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b8180a380a2610497908161010b8239f35b60405163016b8ae160e11b8152600490fd5b600080fd5b634e487b7160e01b600052604160045260246000fdfe6080604081815260048036101561001557600080fd5b600092833560e01c9081632f233dd214610359575080636e9960c3146101075780637159552014610282578063e2f273bd1461013e578063f851a44014610107578063fe9fbb80146100bd5763ffc97ce91461007057600080fd5b346100b95760206003193601126100b9573573ffffffffffffffffffffffffffffffffffffffff81168091036100b957818360ff92602095526001855220541690519015158152f35b8280fd5b50346100b95760206003193601126100b9573573ffffffffffffffffffffffffffffffffffffffff81168091036100b957818360ff92602095526001855220541690519015158152f35b50503461013a578160031936011261013a5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b5080fd5b5082903461013a57602060031936011261013a5780359073ffffffffffffffffffffffffffffffffffffffff9384831680930361027e578354948516918233036102575783156102305750827fffffffffffffffffffffffff0000000000000000000000000000000000000000819596161785558285526001602052842060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b8480a37ff3ffadc9e9649124b255960f6392f1df28383cd27442f172a2888e4c73f8cde38280a280f35b90517f02d715c2000000000000000000000000000000000000000000000000000000008152fd5b90517f47556579000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b5090346100b95760206003193601126100b95781359173ffffffffffffffffffffffffffffffffffffffff80841680940361035557845416330361025757828452600160205260ff828520541661032e57508183526001602052822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557ff3ffadc9e9649124b255960f6392f1df28383cd27442f172a2888e4c73f8cde38280a280f35b90517f5ecbb801000000000000000000000000000000000000000000000000000000008152fd5b8480fd5b929190503461027e57602060031936011261027e5780359273ffffffffffffffffffffffffffffffffffffffff80851680950361045d57855416908133036104365750838552600160205260ff83862054161561040e5783146102575750818352600160205282207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557fdef729f161d46119e1fe65923b8598af026c100847a180220c30a30d2cddd5808280a280f35b5090517f8c6e5d71000000000000000000000000000000000000000000000000000000008152fd5b90507f47556579000000000000000000000000000000000000000000000000000000008152fd5b8580fdfea2646970667358221220d0c79e5d0317bd0c863e9383bc0fd2dcf6cdfe9596a4cba172e5b4c2cf90077d64736f6c634300081300330000000000000000000000007460339c10cf19df91f2fb9138f4be69fff85155

Deployed Bytecode

0x6080604081815260048036101561001557600080fd5b600092833560e01c9081632f233dd214610359575080636e9960c3146101075780637159552014610282578063e2f273bd1461013e578063f851a44014610107578063fe9fbb80146100bd5763ffc97ce91461007057600080fd5b346100b95760206003193601126100b9573573ffffffffffffffffffffffffffffffffffffffff81168091036100b957818360ff92602095526001855220541690519015158152f35b8280fd5b50346100b95760206003193601126100b9573573ffffffffffffffffffffffffffffffffffffffff81168091036100b957818360ff92602095526001855220541690519015158152f35b50503461013a578160031936011261013a5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b5080fd5b5082903461013a57602060031936011261013a5780359073ffffffffffffffffffffffffffffffffffffffff9384831680930361027e578354948516918233036102575783156102305750827fffffffffffffffffffffffff0000000000000000000000000000000000000000819596161785558285526001602052842060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557f101b8081ff3b56bbf45deb824d86a3b0fd38b7e3dd42421105cf8abe9106db0b8480a37ff3ffadc9e9649124b255960f6392f1df28383cd27442f172a2888e4c73f8cde38280a280f35b90517f02d715c2000000000000000000000000000000000000000000000000000000008152fd5b90517f47556579000000000000000000000000000000000000000000000000000000008152fd5b8380fd5b5090346100b95760206003193601126100b95781359173ffffffffffffffffffffffffffffffffffffffff80841680940361035557845416330361025757828452600160205260ff828520541661032e57508183526001602052822060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008254161790557ff3ffadc9e9649124b255960f6392f1df28383cd27442f172a2888e4c73f8cde38280a280f35b90517f5ecbb801000000000000000000000000000000000000000000000000000000008152fd5b8480fd5b929190503461027e57602060031936011261027e5780359273ffffffffffffffffffffffffffffffffffffffff80851680950361045d57855416908133036104365750838552600160205260ff83862054161561040e5783146102575750818352600160205282207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557fdef729f161d46119e1fe65923b8598af026c100847a180220c30a30d2cddd5808280a280f35b5090517f8c6e5d71000000000000000000000000000000000000000000000000000000008152fd5b90507f47556579000000000000000000000000000000000000000000000000000000008152fd5b8580fdfea2646970667358221220d0c79e5d0317bd0c863e9383bc0fd2dcf6cdfe9596a4cba172e5b4c2cf90077d64736f6c63430008130033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000007460339c10cf19df91f2fb9138f4be69fff85155

-----Decoded View---------------
Arg [0] : _admin (address): 0x7460339c10cF19Df91f2Fb9138F4be69fFf85155

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000007460339c10cf19df91f2fb9138f4be69fff85155


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.