ETH Price: $2,869.54 (-2.44%)

Contract

0x2eAF44EdB2bA47D21f5CBD1b6a8746d866940Dab

Overview

ETH Balance

0 ETH

ETH Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Block
From
To
Set Admin2115203922024-05-15 12:58:22620 days ago1715777902IN
0x2eAF44Ed...866940Dab
0 ETH0.000002380.071803
Set Whitelisted ...2097475232024-05-10 8:19:50625 days ago1715329190IN
0x2eAF44Ed...866940Dab
0 ETH0.00000220.01
Set Whitelisted ...2097475182024-05-10 8:19:49625 days ago1715329189IN
0x2eAF44Ed...866940Dab
0 ETH0.000001430.01
Set Fees2097475132024-05-10 8:19:48625 days ago1715329188IN
0x2eAF44Ed...866940Dab
0 ETH0.000001980.01
Set Whitelisted ...1999020842024-04-11 12:16:19654 days ago1712837779IN
0x2eAF44Ed...866940Dab
0 ETH0.000001870.01
Set Whitelisted ...1999020532024-04-11 12:16:11654 days ago1712837771IN
0x2eAF44Ed...866940Dab
0 ETH0.000001870.01
Set Fees1999020482024-04-11 12:16:10654 days ago1712837770IN
0x2eAF44Ed...866940Dab
0 ETH0.000003230.01
Set Whitelisted ...1988173282024-04-08 8:31:38657 days ago1712565098IN
0x2eAF44Ed...866940Dab
0 ETH0.000006210.097921
Set Whitelisted ...1974994802024-04-04 12:38:41661 days ago1712234321IN
0x2eAF44Ed...866940Dab
0 ETH0.000002820.01
Set Whitelisted ...1974994752024-04-04 12:38:40661 days ago1712234320IN
0x2eAF44Ed...866940Dab
0 ETH0.000002070.01
Set Fees1974994702024-04-04 12:38:39661 days ago1712234319IN
0x2eAF44Ed...866940Dab
0 ETH0.000003550.01

Parent Transaction Hash Block From To
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SickleRegistry

Compiler Version
v0.8.19+commit.7dd6d404

Optimization Enabled:
Yes with 200 runs

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

import "./base/Admin.sol";

library SickleRegistryEvents {
    event CollectorChanged(address newCollector);
    event FeesUpdated(bytes32[] feeHashes, uint256[] feesInBP);
    event ReferralCodeCreated(bytes32 indexed code, address indexed referrer);

    // Multicall caller and target whitelist status changes
    event CallerStatusChanged(address caller, bool isWhitelisted);
    event TargetStatusChanged(address target, bool isWhitelisted);
}

/// @title SickleRegistry contract
/// @author vfat.tools
/// @notice Manages the whitelisted contracts and the collector address
contract SickleRegistry is Admin {
    /// ERRORS ///

    error ArrayLengthMismatch(); // 0xa24a13a6
    error FeeAboveMaxLimit(); // 0xd6cf7b5e
    error InvalidReferralCode(); // 0xe55b4629

    /// STORAGE ///

    /// @notice Address of the fee collector
    address public collector;

    /// @notice Tracks the contracts that can be called through Sickle multicall
    /// @return True if the contract is a whitelisted target
    mapping(address => bool) public isWhitelistedTarget;

    /// @notice Tracks the contracts that can call Sickle multicall
    /// @return True if the contract is a whitelisted caller
    mapping(address => bool) public isWhitelistedCaller;

    /// @notice Keeps track of the referrers and their associated code
    mapping(bytes32 => address) public referralCodes;

    /// @notice Mapping for fee hashes (hash of the strategy contract addresses
    /// and the function selectors) and their associated fees
    /// @return The fee in basis points to apply to the transaction amount
    mapping(bytes32 => uint256) public feeRegistry;

    /// WRITE FUNCTIONS ///

    /// @param admin_ Address of the admin
    /// @param collector_ Address of the collector
    constructor(address admin_, address collector_) Admin(admin_) {
        collector = collector_;
    }

    /// @notice Updates the whitelist status for multiple multicall targets
    /// @param targets Addresses of the contracts to update
    /// @param isApproved New status for the contracts
    function setWhitelistedTargets(
        address[] calldata targets,
        bool isApproved
    ) external onlyAdmin {
        for (uint256 i; i < targets.length;) {
            isWhitelistedTarget[targets[i]] = isApproved;
            emit SickleRegistryEvents.TargetStatusChanged(
                targets[i], isApproved
            );

            unchecked {
                ++i;
            }
        }
    }

    /// @notice Updates the fee collector address
    /// @param newCollector Address of the new fee collector
    function updateCollector(address newCollector) external onlyAdmin {
        collector = newCollector;
        emit SickleRegistryEvents.CollectorChanged(newCollector);
    }

    /// @notice Update the whitelist status for multiple multicall callers
    /// @param callers Addresses of the callers
    /// @param isApproved New status for the caller
    function setWhitelistedCallers(
        address[] calldata callers,
        bool isApproved
    ) external onlyAdmin {
        for (uint256 i; i < callers.length;) {
            isWhitelistedCaller[callers[i]] = isApproved;
            emit SickleRegistryEvents.CallerStatusChanged(
                callers[i], isApproved
            );

            unchecked {
                ++i;
            }
        }
    }

    /// @notice Associates a referral code to the address of the caller
    function setReferralCode(bytes32 referralCode) external {
        if (referralCodes[referralCode] != address(0)) {
            revert InvalidReferralCode();
        }

        referralCodes[referralCode] = msg.sender;
        emit SickleRegistryEvents.ReferralCodeCreated(referralCode, msg.sender);
    }

    /// @notice Update the fees for multiple strategy functions
    /// @param feeHashes Array of fee hashes
    /// @param feesArray Array of fees to apply (in basis points)
    function setFees(
        bytes32[] calldata feeHashes,
        uint256[] calldata feesArray
    ) external onlyAdmin {
        if (feeHashes.length != feesArray.length) {
            revert ArrayLengthMismatch();
        }

        for (uint256 i = 0; i < feeHashes.length;) {
            if (feesArray[i] <= 500) {
                // maximum fee of 5%
                feeRegistry[feeHashes[i]] = feesArray[i];
            } else {
                revert FeeAboveMaxLimit();
            }
            unchecked {
                ++i;
            }
        }

        emit SickleRegistryEvents.FeesUpdated(feeHashes, feesArray);
    }
}

File 2 of 2 : Admin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

/// @title Admin contract
/// @author vfat.tools
/// @notice Provides an administration mechanism allowing restricted functions
abstract contract Admin {
    /// ERRORS ///

    /// @notice Thrown when the caller is not the admin
    error NotAdminError(); //0xb5c42b3b

    /// EVENTS ///

    /// @notice Emitted when a new admin is set
    /// @param oldAdmin Address of the old admin
    /// @param newAdmin Address of the new admin
    event AdminSet(address oldAdmin, address newAdmin);

    /// STORAGE ///

    /// @notice Address of the current admin
    address public admin;

    /// MODIFIERS ///

    /// @dev Restricts a function to the admin
    modifier onlyAdmin() {
        if (msg.sender != admin) revert NotAdminError();
        _;
    }

    /// WRITE FUNCTIONS ///

    /// @param admin_ Address of the admin
    constructor(address admin_) {
        emit AdminSet(admin, admin_);
        admin = admin_;
    }

    /// @notice Sets a new admin
    /// @dev Can only be called by the current admin
    /// @param newAdmin Address of the new admin
    function setAdmin(address newAdmin) external onlyAdmin {
        emit AdminSet(admin, newAdmin);
        admin = newAdmin;
    }
}

Settings
{
  "remappings": [
    "solmate/=lib/solmate/src/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "@uniswap/v3-core/=lib/v3-core/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"admin_","type":"address"},{"internalType":"address","name":"collector_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ArrayLengthMismatch","type":"error"},{"inputs":[],"name":"FeeAboveMaxLimit","type":"error"},{"inputs":[],"name":"InvalidReferralCode","type":"error"},{"inputs":[],"name":"NotAdminError","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminSet","type":"event"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"feeRegistry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelistedCaller","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelistedTarget","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"referralCodes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"feeHashes","type":"bytes32[]"},{"internalType":"uint256[]","name":"feesArray","type":"uint256[]"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"referralCode","type":"bytes32"}],"name":"setReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"callers","type":"address[]"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"setWhitelistedCallers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"bool","name":"isApproved","type":"bool"}],"name":"setWhitelistedTargets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCollector","type":"address"}],"name":"updateCollector","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b506040516109f43803806109f483398101604081905261002f916100c9565b600054604080516001600160a01b039283168152918416602083015283917fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b039283166001600160a01b03199182161790915560018054939092169216919091179055506100fc565b80516001600160a01b03811681146100c457600080fd5b919050565b600080604083850312156100dc57600080fd5b6100e5836100ad565b91506100f3602084016100ad565b90509250929050565b6108e98061010b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063907caa0011610071578063907caa001461017b578063913e77ad146101ae5780639e69bee9146101c1578063c316c98b146101d4578063cabfa284146101e7578063f851a4401461020a57600080fd5b80631bb8c61d146100b957806323f4986e146100ce5780632d5aa3ad146100e1578063704b6c02146100f45780637e644547146101075780638d98f2701461014d575b600080fd5b6100cc6100c7366004610728565b61021d565b005b6100cc6100dc366004610728565b61031f565b6100cc6100ef366004610784565b61041b565b6100cc61010236600461079d565b6104a0565b610130610115366004610784565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61016d61015b366004610784565b60056020526000908152604090205481565b604051908152602001610144565b61019e61018936600461079d565b60026020526000908152604090205460ff1681565b6040519015158152602001610144565b600154610130906001600160a01b031681565b6100cc6101cf3660046107cd565b610534565b6100cc6101e236600461079d565b61065d565b61019e6101f536600461079d565b60036020526000908152604090205460ff1681565b600054610130906001600160a01b031681565b6000546001600160a01b031633146102485760405163b5c42b3b60e01b815260040160405180910390fd5b60005b8281101561031957816003600086868581811061026a5761026a610839565b905060200201602081019061027f919061079d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557fb861c203756aa4c71197a24cadfd62a5844613070b3b2b305e14b7d76d29f2f08484838181106102da576102da610839565b90506020020160208101906102ef919061079d565b604080516001600160a01b03909216825284151560208301520160405180910390a160010161024b565b50505050565b6000546001600160a01b0316331461034a5760405163b5c42b3b60e01b815260040160405180910390fd5b60005b8281101561031957816002600086868581811061036c5761036c610839565b9050602002016020810190610381919061079d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f3272521181c29632730d3de95425a9f8bb1c931b2aa64605f3ddb2623eae61c38484838181106103dc576103dc610839565b90506020020160208101906103f1919061079d565b604080516001600160a01b03909216825284151560208301520160405180910390a160010161034d565b6000818152600460205260409020546001600160a01b0316156104515760405163e55b462960e01b815260040160405180910390fd5b60008181526004602052604080822080546001600160a01b031916339081179091559051909183917f9313774a9a29c402f5880b9b8ef66b0df0bc4431f3ea75eb4b4ddcc93be6344b9190a350565b6000546001600160a01b031633146104cb5760405163b5c42b3b60e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461055f5760405163b5c42b3b60e01b815260040160405180910390fd5b82811461057f5760405163512509d360e11b815260040160405180910390fd5b60005b83811015610619576101f483838381811061059f5761059f610839565b90506020020135116105f8578282828181106105bd576105bd610839565b90506020020135600560008787858181106105da576105da610839565b90506020020135815260200190815260200160002081905550610611565b604051636b67bdaf60e11b815260040160405180910390fd5b600101610582565b507f9b698a028154cece5db8fa7b1c9b38bdb56dbcacccc30033ca01a37f7c6aa5068484848460405161064f9493929190610881565b60405180910390a150505050565b6000546001600160a01b031633146106885760405163b5c42b3b60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fa9bb408327f52d68e1e7f2aae4e85ba051f898a2d53d9e17df2f037244567bdf9060200160405180910390a150565b60008083601f8401126106ee57600080fd5b50813567ffffffffffffffff81111561070657600080fd5b6020830191508360208260051b850101111561072157600080fd5b9250929050565b60008060006040848603121561073d57600080fd5b833567ffffffffffffffff81111561075457600080fd5b610760868287016106dc565b9094509250506020840135801515811461077957600080fd5b809150509250925092565b60006020828403121561079657600080fd5b5035919050565b6000602082840312156107af57600080fd5b81356001600160a01b03811681146107c657600080fd5b9392505050565b600080600080604085870312156107e357600080fd5b843567ffffffffffffffff808211156107fb57600080fd5b610807888389016106dc565b9096509450602087013591508082111561082057600080fd5b5061082d878288016106dc565b95989497509550505050565b634e487b7160e01b600052603260045260246000fd5b81835260006001600160fb1b0383111561086857600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061089560408301868861084f565b82810360208401526108a881858761084f565b97965050505050505056fea2646970667358221220feb36e8d578ca37fde35a3677485c859d9635c9de905089d7934e258ac02773864736f6c63430008130033000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100b45760003560e01c8063907caa0011610071578063907caa001461017b578063913e77ad146101ae5780639e69bee9146101c1578063c316c98b146101d4578063cabfa284146101e7578063f851a4401461020a57600080fd5b80631bb8c61d146100b957806323f4986e146100ce5780632d5aa3ad146100e1578063704b6c02146100f45780637e644547146101075780638d98f2701461014d575b600080fd5b6100cc6100c7366004610728565b61021d565b005b6100cc6100dc366004610728565b61031f565b6100cc6100ef366004610784565b61041b565b6100cc61010236600461079d565b6104a0565b610130610115366004610784565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61016d61015b366004610784565b60056020526000908152604090205481565b604051908152602001610144565b61019e61018936600461079d565b60026020526000908152604090205460ff1681565b6040519015158152602001610144565b600154610130906001600160a01b031681565b6100cc6101cf3660046107cd565b610534565b6100cc6101e236600461079d565b61065d565b61019e6101f536600461079d565b60036020526000908152604090205460ff1681565b600054610130906001600160a01b031681565b6000546001600160a01b031633146102485760405163b5c42b3b60e01b815260040160405180910390fd5b60005b8281101561031957816003600086868581811061026a5761026a610839565b905060200201602081019061027f919061079d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557fb861c203756aa4c71197a24cadfd62a5844613070b3b2b305e14b7d76d29f2f08484838181106102da576102da610839565b90506020020160208101906102ef919061079d565b604080516001600160a01b03909216825284151560208301520160405180910390a160010161024b565b50505050565b6000546001600160a01b0316331461034a5760405163b5c42b3b60e01b815260040160405180910390fd5b60005b8281101561031957816002600086868581811061036c5761036c610839565b9050602002016020810190610381919061079d565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790557f3272521181c29632730d3de95425a9f8bb1c931b2aa64605f3ddb2623eae61c38484838181106103dc576103dc610839565b90506020020160208101906103f1919061079d565b604080516001600160a01b03909216825284151560208301520160405180910390a160010161034d565b6000818152600460205260409020546001600160a01b0316156104515760405163e55b462960e01b815260040160405180910390fd5b60008181526004602052604080822080546001600160a01b031916339081179091559051909183917f9313774a9a29c402f5880b9b8ef66b0df0bc4431f3ea75eb4b4ddcc93be6344b9190a350565b6000546001600160a01b031633146104cb5760405163b5c42b3b60e01b815260040160405180910390fd5b600054604080516001600160a01b03928316815291831660208301527fbf265e8326285a2747e33e54d5945f7111f2b5edb826eb8c08d4677779b3ff97910160405180910390a1600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461055f5760405163b5c42b3b60e01b815260040160405180910390fd5b82811461057f5760405163512509d360e11b815260040160405180910390fd5b60005b83811015610619576101f483838381811061059f5761059f610839565b90506020020135116105f8578282828181106105bd576105bd610839565b90506020020135600560008787858181106105da576105da610839565b90506020020135815260200190815260200160002081905550610611565b604051636b67bdaf60e11b815260040160405180910390fd5b600101610582565b507f9b698a028154cece5db8fa7b1c9b38bdb56dbcacccc30033ca01a37f7c6aa5068484848460405161064f9493929190610881565b60405180910390a150505050565b6000546001600160a01b031633146106885760405163b5c42b3b60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040519081527fa9bb408327f52d68e1e7f2aae4e85ba051f898a2d53d9e17df2f037244567bdf9060200160405180910390a150565b60008083601f8401126106ee57600080fd5b50813567ffffffffffffffff81111561070657600080fd5b6020830191508360208260051b850101111561072157600080fd5b9250929050565b60008060006040848603121561073d57600080fd5b833567ffffffffffffffff81111561075457600080fd5b610760868287016106dc565b9094509250506020840135801515811461077957600080fd5b809150509250925092565b60006020828403121561079657600080fd5b5035919050565b6000602082840312156107af57600080fd5b81356001600160a01b03811681146107c657600080fd5b9392505050565b600080600080604085870312156107e357600080fd5b843567ffffffffffffffff808211156107fb57600080fd5b610807888389016106dc565b9096509450602087013591508082111561082057600080fd5b5061082d878288016106dc565b95989497509550505050565b634e487b7160e01b600052603260045260246000fd5b81835260006001600160fb1b0383111561086857600080fd5b8260051b80836020870137939093016020019392505050565b60408152600061089560408301868861084f565b82810360208401526108a881858761084f565b97965050505050505056fea2646970667358221220feb36e8d578ca37fde35a3677485c859d9635c9de905089d7934e258ac02773864736f6c63430008130033

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

000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d

-----Decoded View---------------
Arg [0] : admin_ (address): 0xd4627eCb405B64448EE6B07dcf860BF55590c83D
Arg [1] : collector_ (address): 0xd4627eCb405B64448EE6B07dcf860BF55590c83D

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d
Arg [1] : 000000000000000000000000d4627ecb405b64448ee6b07dcf860bf55590c83d


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.