ETH Price: $2,869.23 (-2.71%)

Contract

0x8b14984de0ddD2e080d8679fEbE2f5c94B975aF8

Overview

ETH Balance

0.089602240468056366 ETH

ETH Value

$257.09 (@ $2,869.23/ETH)

Token Holdings

More Info

Private Name Tags

Transaction Hash
Block
From
To
Claim Fee2095619942024-05-09 19:22:38626 days ago1715282558IN
0x8b14984d...94B975aF8
0 ETH0.0000010.01
Claim Fee2095619712024-05-09 19:22:32626 days ago1715282552IN
0x8b14984d...94B975aF8
0 ETH0.000000860.01
Claim Fee2095619652024-05-09 19:22:30626 days ago1715282550IN
0x8b14984d...94B975aF8
0 ETH0.000000950.01
Claim Fee1897607802024-03-12 22:37:15684 days ago1710283035IN
0x8b14984d...94B975aF8
0 ETH0.000109370.1
Call Registry1608677052023-12-17 7:51:38770 days ago1702799498IN
0x8b14984d...94B975aF8
0.0005 ETH0.000126970.1
Call Registry1600829562023-12-14 16:28:32773 days ago1702571312IN
0x8b14984d...94B975aF8
0.005 ETH0.000175040.1
Call Registry1598409332023-12-13 22:19:21774 days ago1702505961IN
0x8b14984d...94B975aF8
0 ETH0.000369850.1
Call Registry1581868482023-12-08 20:33:00779 days ago1702067580IN
0x8b14984d...94B975aF8
0.085014 ETH0.000238950.1
Call Registry1578462302023-12-07 19:29:04780 days ago1701977344IN
0x8b14984d...94B975aF8
0 ETH0.000631620.1
Call Registry1578460942023-12-07 19:28:28780 days ago1701977308IN
0x8b14984d...94B975aF8
1.6 ETH0.000332930.1
Call Registry1578446722023-12-07 19:22:13780 days ago1701976933IN
0x8b14984d...94B975aF8
0.15 ETH0.000315270.1
Call Registry1420697932023-10-19 17:39:48829 days ago1697737188IN
0x8b14984d...94B975aF8
0 ETH0.000086250.1
Call Registry1416876822023-10-18 11:51:44830 days ago1697629904IN
0x8b14984d...94B975aF8
0 ETH0.00014980.1
Call Registry1397288602023-10-11 17:08:57837 days ago1697044137IN
0x8b14984d...94B975aF8
0.017942 ETH0.000104210.1
Call Registry1332119982023-09-21 14:28:43857 days ago1695306523IN
0x8b14984d...94B975aF8
0.202 ETH0.000104510.1
Call Registry1332092652023-09-21 14:17:25857 days ago1695305845IN
0x8b14984d...94B975aF8
0 ETH0.000205440.1
Call Registry1332076402023-09-21 14:10:42857 days ago1695305442IN
0x8b14984d...94B975aF8
0 ETH0.000089960.1
Call Registry1331680922023-09-21 11:26:56857 days ago1695295616IN
0x8b14984d...94B975aF8
0.0075 ETH0.000136010.1
Call Registry1331556212023-09-21 10:34:35857 days ago1695292475IN
0x8b14984d...94B975aF8
0 ETH0.000833760.1
Call Registry1331449512023-09-21 9:47:48857 days ago1695289668IN
0x8b14984d...94B975aF8
0.0023 ETH0.000086810.1
Call Registry1331253142023-09-21 8:26:10857 days ago1695284770IN
0x8b14984d...94B975aF8
0.2025 ETH0.000058310.1
Call Registry1331237522023-09-21 8:19:40857 days ago1695284380IN
0x8b14984d...94B975aF8
0 ETH0.000153690.1
Call Registry1330621432023-09-21 3:57:56857 days ago1695268676IN
0x8b14984d...94B975aF8
1.9 ETH0.000091910.1
Call Registry1330556042023-09-21 3:29:36857 days ago1695266976IN
0x8b14984d...94B975aF8
0.002 ETH0.000049760.1
Call Registry1330545542023-09-21 3:25:04857 days ago1695266704IN
0x8b14984d...94B975aF8
0.009 ETH0.000053640.1
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
1897607802024-03-12 22:37:15684 days ago1710283035
0x8b14984d...94B975aF8
0.00114455 ETH
1897607802024-03-12 22:37:15684 days ago1710283035
0x8b14984d...94B975aF8
0.02174648 ETH
1608677052023-12-17 7:51:38770 days ago1702799498
0x8b14984d...94B975aF8
0.00049875 ETH
1600829562023-12-14 16:28:32773 days ago1702571312
0x8b14984d...94B975aF8
0.0049875 ETH
1581868482023-12-08 20:33:00779 days ago1702067580
0x8b14984d...94B975aF8
0.08480146 ETH
1578460942023-12-07 19:28:28780 days ago1701977308
0x8b14984d...94B975aF8
1.596 ETH
1578446722023-12-07 19:22:13780 days ago1701976933
0x8b14984d...94B975aF8
0.149625 ETH
1397288602023-10-11 17:08:57837 days ago1697044137
0x8b14984d...94B975aF8
0.01789714 ETH
1332119982023-09-21 14:28:43857 days ago1695306523
0x8b14984d...94B975aF8
0.20099 ETH
1331680922023-09-21 11:26:56857 days ago1695295616
0x8b14984d...94B975aF8
0.0074625 ETH
1331449512023-09-21 9:47:48857 days ago1695289668
0x8b14984d...94B975aF8
0.0022885 ETH
1331253142023-09-21 8:26:10857 days ago1695284770
0x8b14984d...94B975aF8
0.2014875 ETH
1330621432023-09-21 3:57:56857 days ago1695268676
0x8b14984d...94B975aF8
1.8905 ETH
1330556042023-09-21 3:29:36857 days ago1695266976
0x8b14984d...94B975aF8
0.00199 ETH
1330545542023-09-21 3:25:04857 days ago1695266704
0x8b14984d...94B975aF8
0.008955 ETH
1329664162023-09-20 20:53:08858 days ago1695243188
0x8b14984d...94B975aF8
0.165767 ETH
1329587792023-09-20 20:21:09858 days ago1695241269
0x8b14984d...94B975aF8
0.002985 ETH
1329258732023-09-20 17:57:00858 days ago1695232620
0x8b14984d...94B975aF8
0.0044775 ETH
1324703982023-09-19 8:28:43859 days ago1695112123
0x8b14984d...94B975aF8
0.06154873 ETH
1324703982023-09-19 8:28:43859 days ago1695112123
0x8b14984d...94B975aF8
0.34877617 ETH
1260046542023-08-29 7:28:15880 days ago1693294095
0x8b14984d...94B975aF8
0.00065835 ETH
1252232532023-08-26 17:26:18883 days ago1693070778
0x8b14984d...94B975aF8
0.02651554 ETH
1248806852023-08-25 16:28:40884 days ago1692980920
0x8b14984d...94B975aF8
0.18135154 ETH
1248748272023-08-25 16:04:10884 days ago1692979450
0x8b14984d...94B975aF8
0.077404 ETH
1214219822023-08-14 20:42:22895 days ago1692045742
0x8b14984d...94B975aF8
0.43306488 ETH
View All Internal Transactions

Cross-Chain Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeRouter

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
pragma solidity ^0.8.4;

import "./interfaces/ISocketRegistry.sol";
import "./utils/Ownable.sol";
import "lib/openzeppelin-contracts/contracts/security/ReentrancyGuard.sol";
import "lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol";

contract FeeRouter is Ownable,ReentrancyGuard {
    using SafeERC20 for IERC20;

    /**
     * @notice Address used to identify if it is a native token transfer or not
     */
    address private constant NATIVE_TOKEN_ADDRESS =
        0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    /**
     * @notice variable for our registry contract, registry contract is responsible for redirecting to different bridges
     */
    ISocketRegistry public immutable socket;

    // Errors
    error IntegratorIdAlreadyRegistered();
    error TotalFeeAndPartsMismatch();
    error IntegratorIdNotRegistered();
    error FeeMisMatch();
    error NativeTransferFailed();
    error MsgValueMismatch();

    // MAX value of totalFeeInBps.
    uint32 immutable PRECISION = 1000000;

    constructor(address _socketRegistry, address owner_) Ownable(owner_) {
        socket = ISocketRegistry(_socketRegistry);
    }

    // Function to receive Ether. msg.data must be empty
    receive() external payable {}

    // Events ------------------------------------------------------------------------------------------------------->

    /**
     * @notice Event emitted when an integrator registers their fee config
     */
    event RegisterFee(
        uint16 integratorId,
        uint16 totalFeeInBps,
        uint16 part1,
        uint16 part2,
        uint16 part3,
        address feeTaker1,
        address feeTaker2,
        address feeTaker3
    );

    /**
     * @notice Event emitted when integrator fee config is updated
     */
    event UpdateFee(
        uint16 integratorId,
        uint16 totalFeeInBps,
        uint16 part1,
        uint16 part2,
        uint16 part3,
        address feeTaker1,
        address feeTaker2,
        address feeTaker3
    );

    /**
     * @notice Event emitted when fee in tokens are claimed
     */
    event ClaimFee(
        uint16 integratorId,
        address tokenAddress,
        uint256 amount,
        address feeTaker
    );

    /**
     * @notice Event emitted when call registry is successful
     */
    event BridgeSocket(
        uint16 integratorId,
        uint256 amount,
        address inputTokenAddress,
        uint256 toChainId,
        uint256 middlewareId,
        uint256 bridgeId,
        uint256 totalFee
    );

    /**
     * @notice Container for Fee Request
     * @member integratorId Id of the integrator registered in the fee config
     * @member inputAmount amount sent to the fee router.
     * @member UserRequest request that is passed on to the registry
     */
    struct FeeRequest {
        uint16 integratorId;
        uint256 inputAmount;
        ISocketRegistry.UserRequest userRequest;
    }

    /**
     * @notice Container for Fee Splits
     * @member feeTaker address of the entity who will claim the fee
     * @member partOfTotalFeesInBps part of total fees that the feeTaker can claim
     */
    struct FeeSplits {
        address feeTaker;
        uint16 partOfTotalFeesInBps;
    }

    /**
     * @notice Mapping of valid integrators
     */
    mapping(uint16 => bool) validIntegrators;

    /**
     * @notice Mapping of integrator Ids and the total fee that can be cut from the input amount
     */
    mapping(uint16 => uint16) totalFeeMap;
    /**
     * @notice Mapping of integrator Ids and FeeSplits. FeeSplits is an array with the max size of 3
     * The total fee can be at max split into 3 parts
     */
    mapping(uint16 => FeeSplits[3]) feeSplitMap;

    /**
     * @notice Mapping of integratorId and the earned fee per token
     */
    mapping(uint16 => mapping(address => uint256)) earnedTokenFeeMap;

    // CORE FUNCTIONS ------------------------------------------------------------------------------------------------------>

    /**
     * @notice Owner can register a fee config against an integratorId
     * @dev totalFeeInBps and the sum of feesplits should be exactly equal, feeSplits can have a max size of 3
     * @param integratorId id of the integrator
     * @param totalFeeInBps totalFeeInBps, the max value can be 10000
     * @param feeSplits array of FeeSplits
     */
    function registerFeeConfig(
        uint16 integratorId,
        uint16 totalFeeInBps,
        FeeSplits[3] calldata feeSplits
    ) external onlyOwner {
        // Not checking for total fee in bps to be 0 as the total fee can be set to 0.
        if (validIntegrators[integratorId]) {
            revert IntegratorIdAlreadyRegistered();
        }

        uint16 x = feeSplits[0].partOfTotalFeesInBps +
            feeSplits[1].partOfTotalFeesInBps +
            feeSplits[2].partOfTotalFeesInBps;

        if (x != totalFeeInBps) {
            revert TotalFeeAndPartsMismatch();
        }

        totalFeeMap[integratorId] = totalFeeInBps;
        feeSplitMap[integratorId][0] = feeSplits[0];
        feeSplitMap[integratorId][1] = feeSplits[1];
        feeSplitMap[integratorId][2] = feeSplits[2];
        validIntegrators[integratorId] = true;
        _emitRegisterFee(integratorId, totalFeeInBps, feeSplits);
    }

    /**
     * @notice Owner can update the fee config against an integratorId
     * @dev totalFeeInBps and the sum of feesplits should be exactly equal, feeSplits can have a max size of 3
     * @param integratorId id of the integrator
     * @param totalFeeInBps totalFeeInBps, the max value can be 10000
     * @param feeSplits array of FeeSplits
     */
    function updateFeeConfig(
        uint16 integratorId,
        uint16 totalFeeInBps,
        FeeSplits[3] calldata feeSplits
    ) external onlyOwner {
        if (!validIntegrators[integratorId]) {
            revert IntegratorIdNotRegistered();
        }

        uint16 x = feeSplits[0].partOfTotalFeesInBps +
            feeSplits[1].partOfTotalFeesInBps +
            feeSplits[2].partOfTotalFeesInBps;

        if (x != totalFeeInBps) {
            revert TotalFeeAndPartsMismatch();
        }

        totalFeeMap[integratorId] = totalFeeInBps;
        feeSplitMap[integratorId][0] = feeSplits[0];
        feeSplitMap[integratorId][1] = feeSplits[1];
        feeSplitMap[integratorId][2] = feeSplits[2];
        _emitUpdateFee(integratorId, totalFeeInBps, feeSplits);
    }

    /**
     * @notice Function that sends the claimed fee to the corresponding integrator config addresses
     * @dev native token address to be used to claim native token fee, if earned fee is 0, it will return
     * @param integratorId id of the integrator
     * @param tokenAddress address of the token to claim fee against
     */
    function claimFee(uint16 integratorId, address tokenAddress) external nonReentrant {
        uint256 earnedFee = earnedTokenFeeMap[integratorId][tokenAddress];
        FeeSplits[3] memory integratorFeeSplits = feeSplitMap[integratorId];
        earnedTokenFeeMap[integratorId][tokenAddress] = 0;

        if (earnedFee == 0) {
            return;
        }
        for (uint8 i = 0; i < 3; i++) {
            _calculateAndClaimFee(
                integratorId,
                earnedFee,
                integratorFeeSplits[i].partOfTotalFeesInBps,
                totalFeeMap[integratorId],
                integratorFeeSplits[i].feeTaker,
                tokenAddress
            );
        }
    }

    /**
     * @notice Function that calls the registry after verifying if the fee is correct
     * @dev userRequest amount should match the aount after deducting the fee from the input amount
     * @param _feeRequest feeRequest contains the integratorId, the input amount and the user request that is passed to socket registry
     */
    function callRegistry(FeeRequest calldata _feeRequest) external payable nonReentrant {
        if (!validIntegrators[_feeRequest.integratorId]) {
            revert IntegratorIdNotRegistered();
        }

        // Get approval and token addresses.
        (
            address approvalAddress,
            address inputTokenAddress
        ) = _getApprovalAndInputTokenAddress(_feeRequest.userRequest);

        // Calculate Amount to Send to Registry.
        uint256 amountToBridge = _getAmountForRegistry(
            _feeRequest.integratorId,
            _feeRequest.inputAmount
        );

        if (_feeRequest.userRequest.amount != amountToBridge) {
            revert FeeMisMatch();
        }

        // Call Registry
        if (inputTokenAddress == NATIVE_TOKEN_ADDRESS) {
            if (msg.value != _feeRequest.inputAmount) revert MsgValueMismatch();
            socket.outboundTransferTo{
                value: msg.value - (_feeRequest.inputAmount - amountToBridge)
            }(_feeRequest.userRequest);
        } else {
            _getUserFundsToFeeRouter(
                msg.sender,
                _feeRequest.inputAmount,
                inputTokenAddress
            );
            IERC20(inputTokenAddress).safeApprove(
                approvalAddress,
                amountToBridge
            );
            socket.outboundTransferTo{value: msg.value}(
                _feeRequest.userRequest
            );
        }

        // Update the earned fee for the token and integrator.
        _updateEarnedFee(
            _feeRequest.integratorId,
            inputTokenAddress,
            _feeRequest.inputAmount,
            amountToBridge
        );

        // Emit Bridge Event
        _emitBridgeSocket(_feeRequest, inputTokenAddress, amountToBridge);
    }

    // INTERNAL UTILITY FUNCTION ------------------------------------------------------------------------------------------------------>

    /**
     * @notice function that sends the earned fee depending on the inputs
     * @dev tokens will not be transferred to zero addresses, earned fee against an integrator id is divided into the splits configured
     * @param integratorId id of the integrator
     * @param earnedFee amount of tokens earned as fee
     * @param part part of the amount that needs to be claimed in bps
     * @param total totalfee in bps
     * @param feeTaker address that the earned fee will be sent to after calculation
     * @param tokenAddress address of the token for claiming fee
     */
    function _calculateAndClaimFee(
        uint16 integratorId,
        uint256 earnedFee,
        uint16 part,
        uint16 total,
        address feeTaker,
        address tokenAddress
    ) internal {
        if (feeTaker != address(0)) {
            uint256 amountToBeSent = (earnedFee * part) / total;
            emit ClaimFee(integratorId, tokenAddress, amountToBeSent, feeTaker);
            if (tokenAddress == NATIVE_TOKEN_ADDRESS) {
                (bool success, ) = payable(feeTaker).call{
                    value: amountToBeSent
                }("");
                if (!success) revert NativeTransferFailed();
                return;
            }
            IERC20(tokenAddress).safeTransfer(feeTaker, amountToBeSent);
        }
    }

    /**
     * @notice function that returns the approval address and the input token address
     * @dev approval address is needed to approve the bridge or middleware implementaton before calling socket registry
     * @dev input token address is needed to identify the token in which the fee is being deducted
     * @param userRequest socket registry's user request
     * @return (address, address) returns the approval address and the inputTokenAddress
     */
    function _getApprovalAndInputTokenAddress(
        ISocketRegistry.UserRequest calldata userRequest
    ) internal view returns (address, address) {
        if (userRequest.middlewareRequest.id == 0) {
            (address routeAddress, , ) = socket.routes(
                userRequest.bridgeRequest.id
            );
            return (routeAddress, userRequest.bridgeRequest.inputToken);
        } else {
            (address routeAddress, , ) = socket.routes(
                userRequest.middlewareRequest.id
            );
            return (routeAddress, userRequest.middlewareRequest.inputToken);
        }
    }

    /**
     * @notice function that transfers amount from the user to this contract.
     * @param user address of the user who holds the tokens
     * @param amount amount of tokens to transfer
     * @param tokenAddress address of the token being bridged
     */
    function _getUserFundsToFeeRouter(
        address user,
        uint256 amount,
        address tokenAddress
    ) internal {
        IERC20(tokenAddress).safeTransferFrom(user, address(this), amount);
    }

    /**
     * @notice function that returns an amount after deducting the fee
     * @param integratorId id of the integrator
     * @param amount input amount to this contract when calling the function callRegistry
     * @return uint256 returns the amount after deduciting the fee
     */
    function _getAmountForRegistry(uint16 integratorId, uint256 amount)
        internal
        view
        returns (uint256)
    {
        return amount - ((amount * totalFeeMap[integratorId]) / PRECISION);
    }

    /**
     * @notice function that updated the earned fee against the integrator Id
     * @param integratorId id of the integrator
     * @param inputTokenAddress address of the token being bridged
     * @param amount input amount to this contract when calling the function callRegistry
     * @param registryAmount amount in user request that is passed on to registry
     */
    function _updateEarnedFee(
        uint16 integratorId,
        address inputTokenAddress,
        uint256 amount,
        uint256 registryAmount
    ) internal {
        earnedTokenFeeMap[integratorId][inputTokenAddress] =
            earnedTokenFeeMap[integratorId][inputTokenAddress] +
            amount -
            registryAmount;
    }

    /**
     * @notice function that emits the event BridgeSocket
     */
    function _emitBridgeSocket(
        FeeRequest calldata _feeRequest,
        address tokenAddress,
        uint256 registryAmount
    ) internal {
        emit BridgeSocket(
            _feeRequest.integratorId,
            _feeRequest.inputAmount,
            tokenAddress,
            _feeRequest.userRequest.toChainId,
            _feeRequest.userRequest.middlewareRequest.id,
            _feeRequest.userRequest.bridgeRequest.id,
            _feeRequest.inputAmount - registryAmount
        );
    }

    /**
     * @notice function that emits the event UpdateFee
     */
    function _emitUpdateFee(
        uint16 integratorId,
        uint16 totalFeeInBps,
        FeeSplits[3] calldata feeSplits
    ) internal {
        emit UpdateFee(
            integratorId,
            totalFeeInBps,
            feeSplits[0].partOfTotalFeesInBps,
            feeSplits[1].partOfTotalFeesInBps,
            feeSplits[2].partOfTotalFeesInBps,
            feeSplits[0].feeTaker,
            feeSplits[1].feeTaker,
            feeSplits[2].feeTaker
        );
    }

    /**
     * @notice function that emits the event RegisterFee
     */
    function _emitRegisterFee(
        uint16 integratorId,
        uint16 totalFeeInBps,
        FeeSplits[3] calldata feeSplits
    ) internal {
        emit RegisterFee(
            integratorId,
            totalFeeInBps,
            feeSplits[0].partOfTotalFeesInBps,
            feeSplits[1].partOfTotalFeesInBps,
            feeSplits[2].partOfTotalFeesInBps,
            feeSplits[0].feeTaker,
            feeSplits[1].feeTaker,
            feeSplits[2].feeTaker
        );
    }

    // VIEW FUNCTIONS --------------------------------------------------------------------------------------------------------->

    /**
     * @notice function that returns the amount in earned fee
     * @param integratorId id of the integrator
     * @param tokenAddress address of the token
     * @return uin256
     */
    function getEarnedFee(uint16 integratorId, address tokenAddress)
        public
        view
        returns (uint256)
    {
        return earnedTokenFeeMap[integratorId][tokenAddress];
    }

    /**
     * @notice function that returns if the integrator id is valid or not
     * @param integratorId id of the integrator
     * @return bool
     */
    function getValidIntegrator(uint16 integratorId)
        public
        view
        returns (bool)
    {
        return validIntegrators[integratorId];
    }

    /**
     * @notice function that returns the total fee in bps registered against the integrator id
     * @param integratorId id of the integrator
     * @return uint16
     */
    function getTotalFeeInBps(uint16 integratorId)
        public
        view
        returns (uint16)
    {
        return totalFeeMap[integratorId];
    }

    /**
     * @notice function that returns the FeeSplit array registered agains the integrator id
     * @param integratorId id of the integrator
     * @return feeSplits FeeSplits[3] - array of FeeSplits of size 3
     */
    function getFeeSplits(uint16 integratorId)
        public
        view
        returns (FeeSplits[3] memory feeSplits)
    {
        return feeSplitMap[integratorId];
    }

    // RESCUE FUNCTIONS ------------------------------------------------------------------------------------------------------>

    /**
     * @notice rescue function for emeregencies
     * @dev can only be called by the owner, should only be called during emergencies only
     * @param userAddress address of the user receiving funds
     * @param token address of the token being rescued
     * @param amount amount to be sent to the user
     */
    function rescueFunds(
        address token,
        address userAddress,
        uint256 amount
    ) external onlyOwner {
        IERC20(token).safeTransfer(userAddress, amount);
    }

    /**
     * @notice rescue function for emeregencies
     * @dev can only be called by the owner, should only be called during emergencies only
     * @param userAddress address of the user receiving funds
     * @param amount amount to be sent to the user
     */
    function rescueNative(address payable userAddress, uint256 amount)
        external
        onlyOwner
    {
        userAddress.transfer(amount);
    }
}

File 2 of 8 : ISocketRegistry.sol
pragma solidity ^0.8.4;

abstract contract ISocketRegistry {
    /**
     * @notice Container for Bridge Request
     * @member id denotes the underlying bridge to be used
     * @member optionalNativeAmount native token amount if not to be included in the value.
     * @member inputToken token being bridged
     * @member data this can be decoded to get extra data needed for different bridges
     */
    struct BridgeRequest {
        uint256 id;
        uint256 optionalNativeAmount;
        address inputToken;
        bytes data;
    }


    /**
     * @notice Container for Middleware Request
     * @member id denotes the underlying middleware to be used
     * @member optionalNativeAmount native token amount if not to be included in the value.
     * @member inputToken token being sent to middleware, for example swaps
     * @member data this can be decoded to get extra data needed for different middlewares
     */
    struct MiddlewareRequest {
        uint256 id;
        uint256 optionalNativeAmount;
        address inputToken;
        bytes data;
    }


    /**
     * @notice Container for User Request
     * @member receiverAddress address of the user receiving the bridged amount
     * @member toChainId id of the chain being bridged to
     * @member amount amount being bridged through registry
     * @member middlewareRequest 
     * @member bridgeRequest 
     */
    struct UserRequest {
        address receiverAddress;
        uint256 toChainId;
        uint256 amount;
        MiddlewareRequest middlewareRequest;
        BridgeRequest bridgeRequest;
    }

    /**
     * @notice Container for Route Data
     * @dev middlwares and bridges are both added into the same routes
     * @member route address of the implementation contract fo a bride or middleware
     * @member isEnabled bool variable that denotes if the particular route is enabled or disabled
     * @member isMiddleware bool variable that denotes if the particular route is a middleware or not
     */
    struct RouteData {
        address route;
        bool isEnabled;
        bool isMiddleware;
    }

    /**
     * @notice Resgistered Routes on the socket registry
     * @dev middlwares and bridges are both added into the same routes
     */
    RouteData[] public routes;

    /**
     * @notice Function called in the socket registry for bridging
     */
    function outboundTransferTo(UserRequest calldata _userRequest)
        external
        payable
        virtual;
}

// SPDX-License-Identifier: GPL-3.0-only
pragma solidity ^0.8.4;

abstract contract Ownable {
    address private _owner;
    address private _nominee;

    event OwnerNominated(address indexed nominee);
    event OwnerClaimed(address indexed claimer);

    error OnlyOwner();
    error OnlyNominee();

    constructor(address owner_) {
        _claimOwner(owner_);
    }

    modifier onlyOwner() {
        if (msg.sender != _owner) {
            revert OnlyOwner();
        }
        _;
    }

    function owner() public view returns (address) {
        return _owner;
    }

    function nominee() public view returns (address) {
        return _nominee;
    }

    function nominateOwner(address nominee_) external {
        if (msg.sender != _owner) {
            revert OnlyOwner();
        }
        _nominee = nominee_;
        emit OwnerNominated(_nominee);
    }

    function claimOwner() external {
        if (msg.sender != _nominee) {
            revert OnlyNominee();
        }
        _claimOwner(msg.sender);
    }

    function _claimOwner(address claimer_) internal {
        _owner = claimer_;
        _nominee = address(0);
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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].
 */
abstract 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() {
        _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 making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // 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;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_socketRegistry","type":"address"},{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"FeeMisMatch","type":"error"},{"inputs":[],"name":"IntegratorIdAlreadyRegistered","type":"error"},{"inputs":[],"name":"IntegratorIdNotRegistered","type":"error"},{"inputs":[],"name":"MsgValueMismatch","type":"error"},{"inputs":[],"name":"NativeTransferFailed","type":"error"},{"inputs":[],"name":"OnlyNominee","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"TotalFeeAndPartsMismatch","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"integratorId","type":"uint16"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"inputTokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"toChainId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"middlewareId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"bridgeId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalFee","type":"uint256"}],"name":"BridgeSocket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"integratorId","type":"uint16"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"address","name":"feeTaker","type":"address"}],"name":"ClaimFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"}],"name":"OwnerClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nominee","type":"address"}],"name":"OwnerNominated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"integratorId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"totalFeeInBps","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part1","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part2","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part3","type":"uint16"},{"indexed":false,"internalType":"address","name":"feeTaker1","type":"address"},{"indexed":false,"internalType":"address","name":"feeTaker2","type":"address"},{"indexed":false,"internalType":"address","name":"feeTaker3","type":"address"}],"name":"RegisterFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"integratorId","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"totalFeeInBps","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part1","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part2","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"part3","type":"uint16"},{"indexed":false,"internalType":"address","name":"feeTaker1","type":"address"},{"indexed":false,"internalType":"address","name":"feeTaker2","type":"address"},{"indexed":false,"internalType":"address","name":"feeTaker3","type":"address"}],"name":"UpdateFee","type":"event"},{"inputs":[{"components":[{"internalType":"uint16","name":"integratorId","type":"uint16"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"components":[{"internalType":"address","name":"receiverAddress","type":"address"},{"internalType":"uint256","name":"toChainId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"optionalNativeAmount","type":"uint256"},{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISocketRegistry.MiddlewareRequest","name":"middlewareRequest","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"optionalNativeAmount","type":"uint256"},{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct ISocketRegistry.BridgeRequest","name":"bridgeRequest","type":"tuple"}],"internalType":"struct ISocketRegistry.UserRequest","name":"userRequest","type":"tuple"}],"internalType":"struct FeeRouter.FeeRequest","name":"_feeRequest","type":"tuple"}],"name":"callRegistry","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"claimFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"},{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"getEarnedFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"}],"name":"getFeeSplits","outputs":[{"components":[{"internalType":"address","name":"feeTaker","type":"address"},{"internalType":"uint16","name":"partOfTotalFeesInBps","type":"uint16"}],"internalType":"struct FeeRouter.FeeSplits[3]","name":"feeSplits","type":"tuple[3]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"}],"name":"getTotalFeeInBps","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"}],"name":"getValidIntegrator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nominee_","type":"address"}],"name":"nominateOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominee","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":"uint16","name":"integratorId","type":"uint16"},{"internalType":"uint16","name":"totalFeeInBps","type":"uint16"},{"components":[{"internalType":"address","name":"feeTaker","type":"address"},{"internalType":"uint16","name":"partOfTotalFeesInBps","type":"uint16"}],"internalType":"struct FeeRouter.FeeSplits[3]","name":"feeSplits","type":"tuple[3]"}],"name":"registerFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"userAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"rescueNative","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"socket","outputs":[{"internalType":"contract ISocketRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"integratorId","type":"uint16"},{"internalType":"uint16","name":"totalFeeInBps","type":"uint16"},{"components":[{"internalType":"address","name":"feeTaker","type":"address"},{"internalType":"uint16","name":"partOfTotalFeesInBps","type":"uint16"}],"internalType":"struct FeeRouter.FeeSplits[3]","name":"feeSplits","type":"tuple[3]"}],"name":"updateFeeConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c0604052613d0960e61b60a0523480156200001a57600080fd5b506040516200250e3803806200250e8339810160408190526200003d916200009d565b600080546001600160a01b03199081166001600160a01b0384161790915560018054909116905550600160025560601b6001600160601b031916608052620000d5565b80516001600160a01b03811681146200009857600080fd5b919050565b60008060408385031215620000b157600080fd5b620000bc8362000080565b9150620000cc6020840162000080565b90509250929050565b60805160601c60a05160e01c6123f16200011d60003960006115590152600081816101c101528181610d9701528181610e7b0152818161136f015261146f01526123f16000f3fe6080604052600436106100ec5760003560e01c80635b94db271161008a5780638da5cb5b116100595780638da5cb5b146102ec578063ad3bd95d14610317578063afe315ee14610337578063c94288a21461039b57600080fd5b80635b94db27146102455780636ccae0541461026557806377001f83146102855780637d6167e8146102a557600080fd5b806322c8f6cd116100c657806322c8f6cd146101af5780632a4f1fbb146101e357806331efdc96146102035780633bd1adec1461023057600080fd5b8063050e56ea146100f85780631291f79d1461014157806320f99c0a1461016357600080fd5b366100f357005b600080fd5b34801561010457600080fd5b5061012c610113366004611da8565b61ffff1660009081526003602052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611ca0565b6103ae565b005b34801561016f57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b3480156101bb57600080fd5b5061018a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156101ef57600080fd5b506101616101fe366004611dc5565b610447565b34801561020f57600080fd5b5061022361021e366004611da8565b6105db565b6040516101389190611f70565b34801561023c57600080fd5b50610161610675565b34801561025157600080fd5b50610161610260366004611c83565b6106fe565b34801561027157600080fd5b50610161610280366004611ccc565b6107be565b34801561029157600080fd5b506101616102a0366004611dfe565b610830565b3480156102b157600080fd5b506102d96102c0366004611da8565b61ffff9081166000908152600460205260409020541690565b60405161ffff9091168152602001610138565b3480156102f857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661018a565b34801561032357600080fd5b50610161610332366004611dfe565b610a4c565b34801561034357600080fd5b5061038d610352366004611dc5565b61ffff8216600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205492915050565b604051908152602001610138565b6101616103a9366004611d6d565b610c26565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103ff576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610442573d6000803e3d6000fd5b505050565b61044f610f34565b61ffff8216600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684528252808320549383526005909152808220815160608101909252600383835b8282101561050057604080518082019091528483015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900461ffff166020808301919091529082526001909201910161049d565b50505061ffff8616600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168452909152812055509050816105475750506105cd565b60005b60038160ff1610156105c9576105b78584848460ff1660038110610570576105706122b4565b6020908102919091015181015161ffff808b16600090815260049093526040909220549091168660ff8716600381106105ab576105ab6122b4565b60200201515189610fab565b806105c181612265565b91505061054a565b5050505b6105d76001600255565b5050565b6105e3611c35565b61ffff82166000908152600560205260408082208151606081019092529091600390835b8282101561066a57604080518082019091528483015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900461ffff1660208083019190915290825260019092019101610607565b505050509050919050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106c6576040517f7c91ccdd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461074f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff16331461080f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61044273ffffffffffffffffffffffffffffffffffffffff8416838361114c565b60005473ffffffffffffffffffffffffffffffffffffffff163314610881576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff831660009081526003602052604090205460ff16156108cf576040517f5771642500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108e160c0830160a08401611da8565b6108f16080840160608501611da8565b6109016040850160208601611da8565b61090b919061216c565b610915919061216c565b90508261ffff168161ffff1614610958576040517f2ea1270e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff848116600090815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001694881694909417909355600590522082906109ae82826122e3565b505061ffff841660009081526005602052604090819020908301906001016109d682826122e3565b505061ffff8416600090815260056020526040902060808301906002016109fd82826122e3565b505061ffff8416600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a46848484611220565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a9d576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff831660009081526003602052604090205460ff16610aea576040517f2849ec2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610afc60c0830160a08401611da8565b610b0c6080840160608501611da8565b610b1c6040850160208601611da8565b610b26919061216c565b610b30919061216c565b90508261ffff168161ffff1614610b73576040517f2ea1270e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff848116600090815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169488169490941790935560059052208290610bc982826122e3565b505061ffff84166000908152600560205260409081902090830190600101610bf182826122e3565b505061ffff841660009081526005602052604090206080830190600201610c1882826122e3565b905050610a46848484611316565b610c2e610f34565b60036000610c3f6020840184611da8565b61ffff16815260208101919091526040016000205460ff16610c8d576040517f2849ec2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610ca5610ca060408501856120fb565b611341565b90925090506000610cc6610cbc6020860186611da8565b856020013561153b565b905080610cd660408601866120fb565b6040013514610d11576040517f3b05b64a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610e345783602001353414610d80576040517fbc6f88c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663a44bbb15610dca836020880135612222565b610dd49034612222565b610de160408801886120fb565b6040518363ffffffff1660e01b8152600401610dfd9190612018565b6000604051808303818588803b158015610e1657600080fd5b505af1158015610e2a573d6000803e3d6000fd5b5050505050610efd565b610e43338560200135846115a0565b610e6473ffffffffffffffffffffffffffffffffffffffff831684836115c2565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663a44bbb1534610eae60408801886120fb565b6040518363ffffffff1660e01b8152600401610eca9190612018565b6000604051808303818588803b158015610ee357600080fd5b505af1158015610ef7573d6000803e3d6000fd5b50505050505b610f19610f0d6020860186611da8565b83866020013584611753565b610f248483836117df565b505050610f316001600255565b50565b600280541415610fa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216156111445760008361ffff168561ffff1687610fde91906121e5565b610fe891906121aa565b6040805161ffff8a16815273ffffffffffffffffffffffffffffffffffffffff808616602083015291810183905290851660608201529091507f2ca7e603774a345d2661009d097610daffb2d91a47e69541066ddfe9221c51e89060800160405180910390a173ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156111215760008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146110da576040519150601f19603f3d011682016040523d82523d6000602084013e6110df565b606091505b505090508061111a576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611144565b61114273ffffffffffffffffffffffffffffffffffffffff8316848361114c565b505b505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526104429084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526118bf565b7f6f8233416969476afceb725c919fe424faf367ed0a76e020fdf53369c4f1da9583838360005b60400201602001602081019061125d9190611da8565b61126d6080860160608701611da8565b61127d60c0870160a08801611da8565b61128a6020880188611c83565b61129a6060890160408a01611c83565b6112aa60a08a0160808b01611c83565b6040805161ffff998a16815297891660208901529588169587019590955292861660608601529416608084015273ffffffffffffffffffffffffffffffffffffffff93841660a0840152831660c08301529190911660e0820152610100015b60405180910390a1505050565b7fe6099dd217e540f806797781b59e4e804f78bc18220943c78d4ea9b68316e27c8383836000611247565b60008061135160608401846120c7565b3561145657600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663726f16d86113a160808701876120c7565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681529035600482015260240160606040518083038186803b1580156113ef57600080fd5b505afa158015611403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114279190611d0d565b5090915081905061143b60808601866120c7565b61144c906060810190604001611c83565b9250925050915091565b600073ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001663726f16d86114a160608701876120c7565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681529035600482015260240160606040518083038186803b1580156114ef57600080fd5b505afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115279190611d0d565b5090915081905061143b60608601866120c7565b61ffff808316600090815260046020526040812054909163ffffffff7f000000000000000000000000000000000000000000000000000000000000000016916115859116846121e5565b61158f91906121aa565b6115999083612222565b9392505050565b61044273ffffffffffffffffffffffffffffffffffffffff82168430856119cb565b80158061167157506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561163757600080fd5b505afa15801561164b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166f9190611e4f565b155b6116fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610f9c565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526104429084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161119e565b61ffff8416600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091529020548190611795908490612192565b61179f9190612222565b61ffff909416600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff909616835294905292909220929092555050565b7f0881410a322342e6e09eb472c7ab91907d7a31436d5816b8f349c30518c9dc9761180d6020850185611da8565b60208501358461182060408801886120fb565b6020013561183160408901896120fb565b61183f9060608101906120c7565b3561184d60408a018a6120fb565b61185b9060808101906120c7565b3561186a8860208c0135612222565b6040805161ffff9098168852602088019690965273ffffffffffffffffffffffffffffffffffffffff909416948601949094526060850191909152608084015260a083019190915260c082015260e001611309565b6000611921826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611a299092919063ffffffff16565b805190915015610442578080602001905181019061193f9190611d52565b610442576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f9c565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610a469085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161119e565b6060611a388484600085611a40565b949350505050565b606082471015611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f9c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611afb9190611f54565b60006040518083038185875af1925050503d8060008114611b38576040519150601f19603f3d011682016040523d82523d6000602084013e611b3d565b606091505b5091509150611b4e87838387611b59565b979650505050505050565b60608315611bec578251611be55773ffffffffffffffffffffffffffffffffffffffff85163b611be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f9c565b5081611a38565b611a388383815115611c015781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9c9190611fc7565b60405180606001604052806003905b6040805180820190915260008082526020820152815260200190600190039081611c445790505090565b80518015158114611c7e57600080fd5b919050565b600060208284031215611c9557600080fd5b813561159981612389565b60008060408385031215611cb357600080fd5b8235611cbe81612389565b946020939093013593505050565b600080600060608486031215611ce157600080fd5b8335611cec81612389565b92506020840135611cfc81612389565b929592945050506040919091013590565b600080600060608486031215611d2257600080fd5b8351611d2d81612389565b9250611d3b60208501611c6e565b9150611d4960408501611c6e565b90509250925092565b600060208284031215611d6457600080fd5b61159982611c6e565b600060208284031215611d7f57600080fd5b813567ffffffffffffffff811115611d9657600080fd5b82016060818503121561159957600080fd5b600060208284031215611dba57600080fd5b8135611599816123ab565b60008060408385031215611dd857600080fd5b8235611de3816123ab565b91506020830135611df381612389565b809150509250929050565b6000806000610100808587031215611e1557600080fd5b8435611e20816123ab565b93506020850135611e30816123ab565b9250848101861015611e4157600080fd5b506040840190509250925092565b600060208284031215611e6157600080fd5b5051919050565b803582526020810135602083015260006040820135611e8681612389565b73ffffffffffffffffffffffffffffffffffffffff1660408401526060820135368390037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611ed757600080fd5b8201803567ffffffffffffffff811115611ef057600080fd5b803603841315611eff57600080fd5b60806060860152806080860152806020830160a0870137600060a0828701015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b60008251611f66818460208701612239565b9190910192915050565b60c08101818360005b6003811015611fbe578151805173ffffffffffffffffffffffffffffffffffffffff16845260209081015161ffff168185015260409093019290910190600101611f79565b50505092915050565b6020815260008251806020840152611fe6816040850160208701612239565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b602081526000823561202981612389565b73ffffffffffffffffffffffffffffffffffffffff81166020840152506020830135604083015260408301356060830152612067606084018461212f565b60a0608084015261207b60c0840182611e68565b905061208a608085018561212f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160a08501526120be8282611e68565b95945050505050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112611f6657600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112611f6657600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261216357600080fd5b90910192915050565b600061ffff80831681851680830382111561218957612189612285565b01949350505050565b600082198211156121a5576121a5612285565b500190565b6000826121e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561221d5761221d612285565b500290565b60008282101561223457612234612285565b500390565b60005b8381101561225457818101518382015260200161223c565b83811115610a465750506000910152565b600060ff821660ff81141561227c5761227c612285565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81356122ee81612389565b73ffffffffffffffffffffffffffffffffffffffff811690508154817fffffffffffffffffffffffff00000000000000000000000000000000000000008216178355602084013561233e816123ab565b75ffff00000000000000000000000000000000000000008160a01b16837fffffffffffffffffffff000000000000000000000000000000000000000000008416171784555050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f3157600080fd5b61ffff81168114610f3157600080fdfea2646970667358221220f1c594b9ac0524a521ada064f96afc4d7ca73225993bbbc98e5191123533c50d64736f6c63430008070033000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b00000000000000000000000005fd7d0d6b91cc4787bcb86ca47e0bd4ea0346d34

Deployed Bytecode

0x6080604052600436106100ec5760003560e01c80635b94db271161008a5780638da5cb5b116100595780638da5cb5b146102ec578063ad3bd95d14610317578063afe315ee14610337578063c94288a21461039b57600080fd5b80635b94db27146102455780636ccae0541461026557806377001f83146102855780637d6167e8146102a557600080fd5b806322c8f6cd116100c657806322c8f6cd146101af5780632a4f1fbb146101e357806331efdc96146102035780633bd1adec1461023057600080fd5b8063050e56ea146100f85780631291f79d1461014157806320f99c0a1461016357600080fd5b366100f357005b600080fd5b34801561010457600080fd5b5061012c610113366004611da8565b61ffff1660009081526003602052604090205460ff1690565b60405190151581526020015b60405180910390f35b34801561014d57600080fd5b5061016161015c366004611ca0565b6103ae565b005b34801561016f57600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610138565b3480156101bb57600080fd5b5061018a7f000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b081565b3480156101ef57600080fd5b506101616101fe366004611dc5565b610447565b34801561020f57600080fd5b5061022361021e366004611da8565b6105db565b6040516101389190611f70565b34801561023c57600080fd5b50610161610675565b34801561025157600080fd5b50610161610260366004611c83565b6106fe565b34801561027157600080fd5b50610161610280366004611ccc565b6107be565b34801561029157600080fd5b506101616102a0366004611dfe565b610830565b3480156102b157600080fd5b506102d96102c0366004611da8565b61ffff9081166000908152600460205260409020541690565b60405161ffff9091168152602001610138565b3480156102f857600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff1661018a565b34801561032357600080fd5b50610161610332366004611dfe565b610a4c565b34801561034357600080fd5b5061038d610352366004611dc5565b61ffff8216600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915290205492915050565b604051908152602001610138565b6101616103a9366004611d6d565b610c26565b60005473ffffffffffffffffffffffffffffffffffffffff1633146103ff576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f19350505050158015610442573d6000803e3d6000fd5b505050565b61044f610f34565b61ffff8216600081815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff861684528252808320549383526005909152808220815160608101909252600383835b8282101561050057604080518082019091528483015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900461ffff166020808301919091529082526001909201910161049d565b50505061ffff8616600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff89168452909152812055509050816105475750506105cd565b60005b60038160ff1610156105c9576105b78584848460ff1660038110610570576105706122b4565b6020908102919091015181015161ffff808b16600090815260049093526040909220549091168660ff8716600381106105ab576105ab6122b4565b60200201515189610fab565b806105c181612265565b91505061054a565b5050505b6105d76001600255565b5050565b6105e3611c35565b61ffff82166000908152600560205260408082208151606081019092529091600390835b8282101561066a57604080518082019091528483015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900461ffff1660208083019190915290825260019092019101610607565b505050509050919050565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106c6576040517f7c91ccdd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081163317909155600180549091169055565b60005473ffffffffffffffffffffffffffffffffffffffff16331461074f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff16331461080f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61044273ffffffffffffffffffffffffffffffffffffffff8416838361114c565b60005473ffffffffffffffffffffffffffffffffffffffff163314610881576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff831660009081526003602052604090205460ff16156108cf576040517f5771642500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006108e160c0830160a08401611da8565b6108f16080840160608501611da8565b6109016040850160208601611da8565b61090b919061216c565b610915919061216c565b90508261ffff168161ffff1614610958576040517f2ea1270e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff848116600090815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001694881694909417909355600590522082906109ae82826122e3565b505061ffff841660009081526005602052604090819020908301906001016109d682826122e3565b505061ffff8416600090815260056020526040902060808301906002016109fd82826122e3565b505061ffff8416600090815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055610a46848484611220565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610a9d576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff831660009081526003602052604090205460ff16610aea576040517f2849ec2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610afc60c0830160a08401611da8565b610b0c6080840160608501611da8565b610b1c6040850160208601611da8565b610b26919061216c565b610b30919061216c565b90508261ffff168161ffff1614610b73576040517f2ea1270e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61ffff848116600090815260046020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000169488169490941790935560059052208290610bc982826122e3565b505061ffff84166000908152600560205260409081902090830190600101610bf182826122e3565b505061ffff841660009081526005602052604090206080830190600201610c1882826122e3565b905050610a46848484611316565b610c2e610f34565b60036000610c3f6020840184611da8565b61ffff16815260208101919091526040016000205460ff16610c8d576040517f2849ec2300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080610ca5610ca060408501856120fb565b611341565b90925090506000610cc6610cbc6020860186611da8565b856020013561153b565b905080610cd660408601866120fb565b6040013514610d11576040517f3b05b64a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1415610e345783602001353414610d80576040517fbc6f88c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b01663a44bbb15610dca836020880135612222565b610dd49034612222565b610de160408801886120fb565b6040518363ffffffff1660e01b8152600401610dfd9190612018565b6000604051808303818588803b158015610e1657600080fd5b505af1158015610e2a573d6000803e3d6000fd5b5050505050610efd565b610e43338560200135846115a0565b610e6473ffffffffffffffffffffffffffffffffffffffff831684836115c2565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b01663a44bbb1534610eae60408801886120fb565b6040518363ffffffff1660e01b8152600401610eca9190612018565b6000604051808303818588803b158015610ee357600080fd5b505af1158015610ef7573d6000803e3d6000fd5b50505050505b610f19610f0d6020860186611da8565b83866020013584611753565b610f248483836117df565b505050610f316001600255565b50565b600280541415610fa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60028055565b73ffffffffffffffffffffffffffffffffffffffff8216156111445760008361ffff168561ffff1687610fde91906121e5565b610fe891906121aa565b6040805161ffff8a16815273ffffffffffffffffffffffffffffffffffffffff808616602083015291810183905290851660608201529091507f2ca7e603774a345d2661009d097610daffb2d91a47e69541066ddfe9221c51e89060800160405180910390a173ffffffffffffffffffffffffffffffffffffffff821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14156111215760008373ffffffffffffffffffffffffffffffffffffffff168260405160006040518083038185875af1925050503d80600081146110da576040519150601f19603f3d011682016040523d82523d6000602084013e6110df565b606091505b505090508061111a576040517ff4b3b1bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050611144565b61114273ffffffffffffffffffffffffffffffffffffffff8316848361114c565b505b505050505050565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526104429084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909316929092179091526118bf565b7f6f8233416969476afceb725c919fe424faf367ed0a76e020fdf53369c4f1da9583838360005b60400201602001602081019061125d9190611da8565b61126d6080860160608701611da8565b61127d60c0870160a08801611da8565b61128a6020880188611c83565b61129a6060890160408a01611c83565b6112aa60a08a0160808b01611c83565b6040805161ffff998a16815297891660208901529588169587019590955292861660608601529416608084015273ffffffffffffffffffffffffffffffffffffffff93841660a0840152831660c08301529190911660e0820152610100015b60405180910390a1505050565b7fe6099dd217e540f806797781b59e4e804f78bc18220943c78d4ea9b68316e27c8383836000611247565b60008061135160608401846120c7565b3561145657600073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b01663726f16d86113a160808701876120c7565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681529035600482015260240160606040518083038186803b1580156113ef57600080fd5b505afa158015611403573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114279190611d0d565b5090915081905061143b60808601866120c7565b61144c906060810190604001611c83565b9250925050915091565b600073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b01663726f16d86114a160608701876120c7565b60405160e083901b7fffffffff000000000000000000000000000000000000000000000000000000001681529035600482015260240160606040518083038186803b1580156114ef57600080fd5b505afa158015611503573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115279190611d0d565b5090915081905061143b60608601866120c7565b61ffff808316600090815260046020526040812054909163ffffffff7f00000000000000000000000000000000000000000000000000000000000f424016916115859116846121e5565b61158f91906121aa565b6115999083612222565b9392505050565b61044273ffffffffffffffffffffffffffffffffffffffff82168430856119cb565b80158061167157506040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815230600482015273ffffffffffffffffffffffffffffffffffffffff838116602483015284169063dd62ed3e9060440160206040518083038186803b15801561163757600080fd5b505afa15801561164b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166f9190611e4f565b155b6116fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000006064820152608401610f9c565b60405173ffffffffffffffffffffffffffffffffffffffff83166024820152604481018290526104429084907f095ea7b3000000000000000000000000000000000000000000000000000000009060640161119e565b61ffff8416600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff871684529091529020548190611795908490612192565b61179f9190612222565b61ffff909416600090815260066020908152604080832073ffffffffffffffffffffffffffffffffffffffff909616835294905292909220929092555050565b7f0881410a322342e6e09eb472c7ab91907d7a31436d5816b8f349c30518c9dc9761180d6020850185611da8565b60208501358461182060408801886120fb565b6020013561183160408901896120fb565b61183f9060608101906120c7565b3561184d60408a018a6120fb565b61185b9060808101906120c7565b3561186a8860208c0135612222565b6040805161ffff9098168852602088019690965273ffffffffffffffffffffffffffffffffffffffff909416948601949094526060850191909152608084015260a083019190915260c082015260e001611309565b6000611921826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611a299092919063ffffffff16565b805190915015610442578080602001905181019061193f9190611d52565b610442576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610f9c565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610a469085907f23b872dd000000000000000000000000000000000000000000000000000000009060840161119e565b6060611a388484600085611a40565b949350505050565b606082471015611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610f9c565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611afb9190611f54565b60006040518083038185875af1925050503d8060008114611b38576040519150601f19603f3d011682016040523d82523d6000602084013e611b3d565b606091505b5091509150611b4e87838387611b59565b979650505050505050565b60608315611bec578251611be55773ffffffffffffffffffffffffffffffffffffffff85163b611be5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610f9c565b5081611a38565b611a388383815115611c015781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9c9190611fc7565b60405180606001604052806003905b6040805180820190915260008082526020820152815260200190600190039081611c445790505090565b80518015158114611c7e57600080fd5b919050565b600060208284031215611c9557600080fd5b813561159981612389565b60008060408385031215611cb357600080fd5b8235611cbe81612389565b946020939093013593505050565b600080600060608486031215611ce157600080fd5b8335611cec81612389565b92506020840135611cfc81612389565b929592945050506040919091013590565b600080600060608486031215611d2257600080fd5b8351611d2d81612389565b9250611d3b60208501611c6e565b9150611d4960408501611c6e565b90509250925092565b600060208284031215611d6457600080fd5b61159982611c6e565b600060208284031215611d7f57600080fd5b813567ffffffffffffffff811115611d9657600080fd5b82016060818503121561159957600080fd5b600060208284031215611dba57600080fd5b8135611599816123ab565b60008060408385031215611dd857600080fd5b8235611de3816123ab565b91506020830135611df381612389565b809150509250929050565b6000806000610100808587031215611e1557600080fd5b8435611e20816123ab565b93506020850135611e30816123ab565b9250848101861015611e4157600080fd5b506040840190509250925092565b600060208284031215611e6157600080fd5b5051919050565b803582526020810135602083015260006040820135611e8681612389565b73ffffffffffffffffffffffffffffffffffffffff1660408401526060820135368390037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1018112611ed757600080fd5b8201803567ffffffffffffffff811115611ef057600080fd5b803603841315611eff57600080fd5b60806060860152806080860152806020830160a0870137600060a0828701015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168601019250505092915050565b60008251611f66818460208701612239565b9190910192915050565b60c08101818360005b6003811015611fbe578151805173ffffffffffffffffffffffffffffffffffffffff16845260209081015161ffff168185015260409093019290910190600101611f79565b50505092915050565b6020815260008251806020840152611fe6816040850160208701612239565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b602081526000823561202981612389565b73ffffffffffffffffffffffffffffffffffffffff81166020840152506020830135604083015260408301356060830152612067606084018461212f565b60a0608084015261207b60c0840182611e68565b905061208a608085018561212f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08483030160a08501526120be8282611e68565b95945050505050565b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81833603018112611f6657600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61833603018112611f6657600080fd5b600082357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8183360301811261216357600080fd5b90910192915050565b600061ffff80831681851680830382111561218957612189612285565b01949350505050565b600082198211156121a5576121a5612285565b500190565b6000826121e0577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561221d5761221d612285565b500290565b60008282101561223457612234612285565b500390565b60005b8381101561225457818101518382015260200161223c565b83811115610a465750506000910152565b600060ff821660ff81141561227c5761227c612285565b60010192915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b81356122ee81612389565b73ffffffffffffffffffffffffffffffffffffffff811690508154817fffffffffffffffffffffffff00000000000000000000000000000000000000008216178355602084013561233e816123ab565b75ffff00000000000000000000000000000000000000008160a01b16837fffffffffffffffffffff000000000000000000000000000000000000000000008416171784555050505050565b73ffffffffffffffffffffffffffffffffffffffff81168114610f3157600080fd5b61ffff81168114610f3157600080fdfea2646970667358221220f1c594b9ac0524a521ada064f96afc4d7ca73225993bbbc98e5191123533c50d64736f6c63430008070033

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

000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b00000000000000000000000005fd7d0d6b91cc4787bcb86ca47e0bd4ea0346d34

-----Decoded View---------------
Arg [0] : _socketRegistry (address): 0xc30141B657f4216252dc59Af2e7CdB9D8792e1B0
Arg [1] : owner_ (address): 0x5fD7D0d6b91CC4787Bcb86ca47e0Bd4ea0346d34

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c30141b657f4216252dc59af2e7cdb9d8792e1b0
Arg [1] : 0000000000000000000000005fd7d0d6b91cc4787bcb86ca47e0bd4ea0346d34


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
0x8b14984de0ddD2e080d8679fEbE2f5c94B975aF8
Net Worth in USD
$1,819.44

Net Worth in ETH
0.634122

Token Allocations
USD₮0 50.24%
USDC 26.63%
ETH 14.13%
Others 8.99%
Chain Token Portfolio % Price Amount Value
ARB50.24%$0.999149914.9403$914.16
ARB26.63%$0.999689484.6987$484.55
ARB
Ether (ETH)
14.13%$2,869.230.0896$257.09
ARB3.71%$0.170763395.7947$67.59
ARB2.12%$2,885.460.0134$38.54
ARB0.47%$3,538.750.00240797$8.52
ARB0.34%$16.225$6.23
ARB0.27%$0.9997844.9739$4.97
ARB0.24%$11.810.3638$4.3
ARB0.18%$3,335.160.001$3.34
ARB0.18%$0.9996893.3153$3.31
ARB0.06%$1.190.8529$1.01
ARB0.05%$7.050.1325$0.9343
ARB0.05%$87,2930.00001046$0.913
ARB0.05%$1.890.4718$0.8917
ARB0.04%$0.4855291.5252$0.7405
ARB0.04%$0.2899062.2904$0.6639
ARB0.04%<$0.0000013,319,113,596.7728$0.6638
ARB0.03%$0.0879817.115$0.6259
ARB0.03%$0.9984120.5979$0.5969
ARB0.01%$0.1636261.5635$0.2558
ARB0.01%$0.0319887.909$0.2529
ARB0.01%$0.000238902.707$0.2144
ARB0.01%$0.000397500$0.1987
ARB<0.01%$2.230.0783$0.1746
ARB<0.01%$0.9932240.1353$0.1343
ARB<0.01%$4.640.0264$0.1222
BSC1.01%$870.940.0212$18.44
POL<0.01%$0.1205180.0492$0.005926
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.