Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 29 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Connect Switchbo... | 11621891 | 5 mins ago | IN | 0 S | 0.01001951 | ||||
Add Bungee Gatew... | 11621716 | 6 mins ago | IN | 0 S | 0.00249638 | ||||
Connect Switchbo... | 11621656 | 6 mins ago | IN | 0 S | 0.00873795 | ||||
Connect Switchbo... | 11621525 | 7 mins ago | IN | 0 S | 0.00873675 | ||||
Add Bungee Gatew... | 11430081 | 21 hrs ago | IN | 0 S | 0.00327768 | ||||
Connect Switchbo... | 11428762 | 21 hrs ago | IN | 0 S | 0.0100822 | ||||
Add Bungee Gatew... | 11398378 | 24 hrs ago | IN | 0 S | 0.0023252 | ||||
Add Bungee Gatew... | 11398157 | 24 hrs ago | IN | 0 S | 0.002324 | ||||
Add Bungee Gatew... | 11396820 | 24 hrs ago | IN | 0 S | 0.0023246 | ||||
Add Bungee Gatew... | 11392594 | 25 hrs ago | IN | 0 S | 0.0023252 | ||||
Connect Switchbo... | 11358950 | 29 hrs ago | IN | 0 S | 0.00901257 | ||||
Connect Switchbo... | 11358341 | 29 hrs ago | IN | 0 S | 0.00873675 | ||||
Add Bungee Gatew... | 11358236 | 29 hrs ago | IN | 0 S | 0.0023252 | ||||
Connect Switchbo... | 11358004 | 29 hrs ago | IN | 0 S | 0.00873735 | ||||
Add Bungee Gatew... | 11357887 | 29 hrs ago | IN | 0 S | 0.00249574 | ||||
Connect Switchbo... | 11357650 | 29 hrs ago | IN | 0 S | 0.01514485 | ||||
Connect Switchbo... | 11357479 | 29 hrs ago | IN | 0 S | 0.00873675 | ||||
Add Bungee Gatew... | 11357201 | 29 hrs ago | IN | 0 S | 0.0023246 | ||||
Add Bungee Gatew... | 11356654 | 29 hrs ago | IN | 0 S | 0.0023252 | ||||
Connect Switchbo... | 11356319 | 29 hrs ago | IN | 0 S | 0.00873735 | ||||
Connect Switchbo... | 11356187 | 29 hrs ago | IN | 0 S | 0.00873735 | ||||
Add Bungee Gatew... | 11355531 | 29 hrs ago | IN | 0 S | 0.0023246 | ||||
Connect Switchbo... | 11353135 | 29 hrs ago | IN | 0 S | 0.00873675 | ||||
Connect Switchbo... | 11352985 | 29 hrs ago | IN | 0 S | 0.00873675 | ||||
Add Bungee Gatew... | 11352213 | 29 hrs ago | IN | 0 S | 0.0023252 |
Loading...
Loading
Contract Name:
SwitchboardRouter
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; import {AccessControl} from "../utils/AccessControl.sol"; import {CONFIG_ROLE, SOCKET_CONFIG_ROLE} from "../common/AccessRoles.sol"; import { CallerNotBungeeGateway, NotSiblingBungeeGateway, NotSwitchboardPlug, SwitchboardPlugZero, IncorrectSwitchboard, InvalidMsg } from "../common/Errors.sol"; import {ISwitchboardPlug} from "../interfaces/ISwitchboardPlug.sol"; import {IBungeeGateway} from "../interfaces/IBungeeGateway.sol"; /// @title SwitchboardRouter /// @notice Routes messages between Bungee Gateway and different SwitchboardPlugs /// @dev Enables Bungee Protocol users to use multiple different Switchboards on Socket simultaneously /// @dev Enables to send messages via different Switchboards without being tied to a single Switchboard & Plug contract SwitchboardRouter is AccessControl { /*////////////////////////////////////////////////////////////////////////// PUBLIC STORAGE //////////////////////////////////////////////////////////////////////////*/ /// @notice Bungee Gateway contract address address public BUNGEE_GATEWAY; /// @notice An ever-increasing switchboardId count /// @dev prevents switchboardId reuse uint32 public switchboardIdCount = 1; /// @notice maps switchboardId to switchboardPlug mapping(uint32 switchboardId => ISwitchboardPlug switchboardPlug) public switchboardPlugs; /// @notice Tracks BungeeGateway contracts on sibling chains mapping(uint32 chainId => address bungeeGateway) public bungeeGateways; constructor(address _owner, address _bungeeGateway) AccessControl(_owner) { _grantRole(CONFIG_ROLE, _owner); _grantRole(SOCKET_CONFIG_ROLE, _owner); BUNGEE_GATEWAY = _bungeeGateway; } /*////////////////////////////////////////////////////////////////////////// EXTERNAL FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ /// @notice Send Settlement Message via outbound message to Socket DL /// @param chainSlug chain slug used in Socket where the requests are to be settled on /// @param switchboardId identifier for settlement message security /// @param msgId identifier for the message type. Used as implementation id from Bungee Gateway /// @param destGasLimit gasLimit required to execute the settlement message on the destination chain /// @param payload settlement message data function sendOutboundMsg( uint32 chainSlug, uint32 switchboardId, uint8 msgId, uint256 destGasLimit, bytes calldata payload ) external payable { // checks if the caller is Bungee Gateway (ISwitchboardPlug switchboardPlug, address siblingBungeeGateway) = _validateOutboundMsg( chainSlug, switchboardId ); // encodes msg.sender (Bungee Gateway) along with the payload // calls outbound with the payload switchboardPlug.outbound{value: msg.value}( chainSlug, destGasLimit, abi.encodePacked(msgId, siblingBungeeGateway, msg.sender, payload) ); } /// @notice Accept inbound message from another chain via Switchboard /// @dev Can only be called by the configured SwitchboardPlug /// @param switchboardId id of the switchboardPlug /// @param siblingChainId id of the sibling chain where the message is coming from /// @param payload msg payload sent. function receiveAndDeliverMsg(uint32 switchboardId, uint32 siblingChainId, bytes calldata payload) external { // checks if the caller is switchboardPlug if (msg.sender != address(switchboardPlugs[switchboardId])) revert NotSwitchboardPlug(); // decodes the receiving bungee Gateway address from the incoming payload uint8 msgId = uint8(bytes1(payload)); address msgReceiver = address(bytes20(payload[1:])); address msgSender = address(bytes20(payload[21:])); // @audit msgReceiver need to part of the message actually. receiver can always be the configured bungee gateway // only problematic case would be when there is message delivered to the wrong bungee gateway, // when there is an out of date configuration. // Is it safe to remove it? if (msgReceiver != BUNGEE_GATEWAY || msgSender != bungeeGateways[siblingChainId]) revert InvalidMsg(); // sends inbound message to Bungee IBungeeGateway(msgReceiver).inboundMsgFromSwitchboard( msgId, switchboardId, abi.encodePacked(switchboardId, payload[41:]) ); } /*////////////////////////////////////////////////////////////////////////// ADMIN FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ /// @notice adds new sibling bungee gateway contract /// Can only be called by CONFIG_ROLE. /// @param _bungeeGateway address of the bungee gateway on sibling chain. /// @param _chainId id of the sibling chain. function addBungeeGateway(address _bungeeGateway, uint32 _chainId) external onlyRole(CONFIG_ROLE) { bungeeGateways[_chainId] = _bungeeGateway; } /// @notice sets the bungee gateway contract. /// Can only be called by CONFIG_ROLE. /// @param _bungeeGateway address of the new bungee gateway. function setBungeeGateway(address _bungeeGateway) external onlyRole(CONFIG_ROLE) { BUNGEE_GATEWAY = _bungeeGateway; } /// @notice adds switchboardPlug to switchboardPlugs mapping /// @dev Can only be called by SOCKET_CONFIG_ROLE /// @param switchboardPlug address of the switchboardPlug mapped to the id function addSwitchboardPlug(address switchboardPlug) external onlyRole(SOCKET_CONFIG_ROLE) { // maps switchboardId to SwitchboardPlug switchboardPlugs[switchboardIdCount] = ISwitchboardPlug(switchboardPlug); // checks if the SWITCHBOARD_ID() on the contract is the same as one being assigned on SwitchboardPlug if (switchboardIdCount != switchboardPlugs[switchboardIdCount].SWITCHBOARD_ID()) revert IncorrectSwitchboard(); // increments switchboard count switchboardIdCount += 1; } /// @notice Disables SwitchboardPlug /// @dev Can only be called by SOCKET_CONFIG_ROLE /// @param switchboardId id of the plug to be disabled function removeSwitchboardPlug(uint32 switchboardId) external onlyRole(SOCKET_CONFIG_ROLE) { delete switchboardPlugs[switchboardId]; } /// @notice Connects SwitchboardPlug to sibling chain /// @dev Can only be called by SOCKET_CONFIG_ROLE function connectSwitchboardPlug( uint32 switchboardId, uint32 siblingChainSlug, address siblingPlug ) external onlyRole(SOCKET_CONFIG_ROLE) { switchboardPlugs[switchboardId].connect(siblingChainSlug, siblingPlug); } /*////////////////////////////////////////////////////////////////////////// INTERNAL FUNCTIONS //////////////////////////////////////////////////////////////////////////*/ /// @notice validates the outbound message /// @dev checks if the caller is Bungee Gateway and if the sibling bungee gateway exists function _validateOutboundMsg( uint32 toChainId, uint32 switchboardId ) internal view returns (ISwitchboardPlug switchboardPlug, address siblingBungeeGateway) { // revert if caller is not bungee gateway if (msg.sender != BUNGEE_GATEWAY) revert CallerNotBungeeGateway(); // revert if the bungee gateway address does not exist on the sibling chain siblingBungeeGateway = bungeeGateways[toChainId]; if (bungeeGateways[toChainId] == address(0)) revert NotSiblingBungeeGateway(); // finds the switchboardPlug to route the message through switchboardPlug = switchboardPlugs[switchboardId]; // checks if switchboardPlug is not initialised for the switchboardId if (address(switchboardPlug) == address(0)) revert SwitchboardPlugZero(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface IEIP712 { function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import {IEIP712} from "./IEIP712.sol"; /// @title SignatureTransfer /// @notice Handles ERC20 token transfers through signature based actions /// @dev Requires user's token approval on the Permit2 contract interface ISignatureTransfer is IEIP712 { /// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount /// @param maxAmount The maximum amount a spender can request to transfer error InvalidAmount(uint256 maxAmount); /// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred /// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred error LengthMismatch(); /// @notice Emits an event when the owner successfully invalidates an unordered nonce. event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask); /// @notice The token and amount details for a transfer signed in the permit transfer signature struct TokenPermissions { // ERC20 token address address token; // the maximum amount that can be spent uint256 amount; } /// @notice The signed permit message for a single token transfer struct PermitTransferFrom { TokenPermissions permitted; // a unique value for every token owner's signature to prevent signature replays uint256 nonce; // deadline on the permit signature uint256 deadline; } /// @notice Specifies the recipient address and amount for batched transfers. /// @dev Recipients and amounts correspond to the index of the signed token permissions array. /// @dev Reverts if the requested amount is greater than the permitted signed amount. struct SignatureTransferDetails { // recipient address address to; // spender requested amount uint256 requestedAmount; } /// @notice Used to reconstruct the signed permit message for multiple token transfers /// @dev Do not need to pass in spender address as it is required that it is msg.sender /// @dev Note that a user still signs over a spender address struct PermitBatchTransferFrom { // the tokens and corresponding amounts permitted for a transfer TokenPermissions[] permitted; // a unique value for every token owner's signature to prevent signature replays uint256 nonce; // deadline on the permit signature uint256 deadline; } /// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection /// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order /// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce /// @dev It returns a uint256 bitmap /// @dev The index, or wordPosition is capped at type(uint248).max function nonceBitmap(address, uint256) external view returns (uint256); /// @notice Transfers a token using a signed permit message /// @dev Reverts if the requested amount is greater than the permitted signed amount /// @param permit The permit data signed over by the owner /// @param owner The owner of the tokens to transfer /// @param transferDetails The spender's requested transfer details for the permitted token /// @param signature The signature to verify function permitTransferFrom( PermitTransferFrom memory permit, SignatureTransferDetails calldata transferDetails, address owner, bytes calldata signature ) external; /// @notice Transfers a token using a signed permit message /// @notice Includes extra data provided by the caller to verify signature over /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition /// @dev Reverts if the requested amount is greater than the permitted signed amount /// @param permit The permit data signed over by the owner /// @param owner The owner of the tokens to transfer /// @param transferDetails The spender's requested transfer details for the permitted token /// @param witness Extra data to include when checking the user signature /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash /// @param signature The signature to verify function permitWitnessTransferFrom( PermitTransferFrom memory permit, SignatureTransferDetails calldata transferDetails, address owner, bytes32 witness, string calldata witnessTypeString, bytes calldata signature ) external; /// @notice Transfers multiple tokens using a signed permit message /// @param permit The permit data signed over by the owner /// @param owner The owner of the tokens to transfer /// @param transferDetails Specifies the recipient and requested amount for the token transfer /// @param signature The signature to verify function permitTransferFrom( PermitBatchTransferFrom memory permit, SignatureTransferDetails[] calldata transferDetails, address owner, bytes calldata signature ) external; /// @notice Transfers multiple tokens using a signed permit message /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition /// @notice Includes extra data provided by the caller to verify signature over /// @param permit The permit data signed over by the owner /// @param owner The owner of the tokens to transfer /// @param transferDetails Specifies the recipient and requested amount for the token transfer /// @param witness Extra data to include when checking the user signature /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash /// @param signature The signature to verify function permitWitnessTransferFrom( PermitBatchTransferFrom memory permit, SignatureTransferDetails[] calldata transferDetails, address owner, bytes32 witness, string calldata witnessTypeString, bytes calldata signature ) external; /// @notice Invalidates the bits specified in mask for the bitmap at the word position /// @dev The wordPos is maxed at type(uint248).max /// @param wordPos A number to index the nonceBitmap at /// @param mask A bitmap masked against msg.sender's current bitmap at the word position function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; /// @dev used to rescue funds bytes32 constant RESCUE_ROLE = keccak256("RESCUE_ROLE"); /// @dev used to update configs on protocol contracts bytes32 constant CONFIG_ROLE = keccak256("CONFIG_ROLE"); /// @dev used to update Socket DL configs bytes32 constant SOCKET_CONFIG_ROLE = keccak256("SOCKET_CONFIG_ROLE"); /// @dev used to allow cancellation of requests bytes32 constant CANCEL_ROLE = keccak256("CANCEL_ROLE");
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /*////////////////////////////////////////////////////////////// BUNGEE ERRORS //////////////////////////////////////////////////////////////*/ error MofaSignatureInvalid(); error InsufficientNativeAmount(); error UnsupportedRequest(); error RouterNotRegistered(); error CallerNotBungeeGateway(); error CallerNotEntrypoint(); error SwapOutputInsufficient(); error MinOutputNotMet(); error InvalidRequest(); error FulfilmentDeadlineNotMet(); error CallerNotDelegate(); error InvalidMsg(); error RequestProcessed(); error RequestNotProcessed(); error InvalidSwitchboard(); error PromisedAmountNotMet(); error MsgReceiveFailed(); error RouterAlreadyRegistered(); error InvalidFulfil(); error NotImplemented(); error OnlyOwner(); error OnlyNominee(); error InvalidReceiver(); error ImplAlreadyRegistered(); error InvalidAddress(); /*////////////////////////////////////////////////////////////// SWITCHBOARD ERRORS //////////////////////////////////////////////////////////////*/ error NotSiblingBungeeGateway(); error NotSocket(); error NotSwitchboardRouter(); error NotSwitchboardPlug(); error SwitchboardPlugZero(); error ConnectionAlreadyInitialised(); error IncorrectSwitchboard();
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; import {ISignatureTransfer} from "permit2/src/interfaces/ISignatureTransfer.sol"; import {IEntrypoint} from "../interfaces/IEntrypoint.sol"; import {AccessControl} from "../utils/AccessControl.sol"; import {ISwapExecutor} from "../interfaces/ISwapExecutor.sol"; import {ICalldataExecutor} from "../interfaces/ICalldataExecutor.sol"; import {ISwitchboardRouter} from "../interfaces/ISwitchboardRouter.sol"; import {IFeeCollector} from "../interfaces/IFeeCollector.sol"; /** * @notice WithdrawnRequest struct * @dev This struct is used to store info about withdrawn requests on the origin chain */ struct WithdrawnRequest { address token; uint256 amount; address receiver; } abstract contract BungeeGatewayStorage is AccessControl { /// @dev address used to identify native token address public constant NATIVE_TOKEN_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); /// @notice address of the permit 2 contract ISignatureTransfer public immutable PERMIT2; /// @notice address of the Entrypoint /// @dev Entrypoint for Bungee, all extraction requests are sent to this contract. IEntrypoint public ENTRYPOINT; /// @notice address of the SwitchboardRouter /// @dev BungeeGateway uses this contract to handle cross-chain messages via Socket ISwitchboardRouter public SWITCHBOARD_ROUTER; /// @notice address of the SwapExecutor /// @dev BungeeGateway delegates swap executions to this contract. ISwapExecutor public SWAP_EXECUTOR; /// @notice address of the CalldataExecutor /// @dev BungeeGateway delegates calldata execution at destination chain to this contract. ICalldataExecutor public CALLDATA_EXECUTOR; /// @notice address of the FeeCollector /// @dev BungeeGateway collects affiliate fees from the users and transfers them to this contract. IFeeCollector public FEE_COLLECTOR; /// @notice this mapping holds all implementation contract addresses against their implId mapping(uint8 implId => address impl) internal _impls; /// @notice this mapping tracks whether an implId has been used & removed /// @dev used to prevent reusing an implId mapping(uint8 implId => bool removed) internal _removedImpls; /// @notice this mapping holds all the receiver contracts, these contracts will receive funds on the destination chain. /// @dev bridged funds would reach receiver contracts first and then transmitter uses these funds to fulfil order. mapping(address router => mapping(uint256 toChainId => address whitelistedReceiver)) internal whitelistedReceivers; /// @notice this mapping holds all the addresses that are routers. /// @dev bungee sends funds from the users to these routers. /// @dev bungee calls these when fulfilment happens on the destination. mapping(address routers => bool supported) internal bungeeRouters; /// @notice this mapping stores orders that have been withdrawn on the originChain /// @dev Requests are deleted from the extractedRequests mapping when withdrawn on the origin chain /// @dev Can be used by external contracts to track & use withdrawal info about requests mapping(bytes32 requestHash => WithdrawnRequest request) internal _withdrawnRequests; /// @notice this mapping stores the settlement amounts collected for the beneficiaries /// @dev not all routers would have settlement, so these amounts may not be cleared for some routers mapping(address beneficiary => mapping(address router => mapping(address token => uint256 amount))) public beneficiarySettlements; /** * @notice Constructor. * @dev Defines all immutable variables & owner * @param _owner owner of the contract. * @param _permit2 address of the permit 2 contract. */ constructor(address _owner, address _permit2) AccessControl(_owner) { PERMIT2 = ISignatureTransfer(_permit2); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; import {WithdrawnRequest} from "../core/BungeeGatewayStorage.sol"; interface IBungeeGateway { function setWhitelistedReceiver(address receiver, uint256 destinationChainId, address router) external; function getWhitelistedReceiver(address router, uint256 destinationChainId) external view returns (address); function inboundMsgFromSwitchboard(uint8 msgId, uint32 switchboardId, bytes calldata payload) external; function isBungeeRouter(address router) external view returns (bool); function withdrawnRequests(bytes32 requestHash) external view returns (WithdrawnRequest memory); function executeImpl(uint8 implId, bytes calldata data) external payable returns (bytes memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface ICalldataExecutor { function executeCalldata(address to, bytes memory encodedData, uint256 msgGasLimit) external returns (bool); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface IEntrypoint { function executeSOR(bytes calldata data, bytes calldata mofaSignature) external payable returns (bytes memory); function executeSR(bytes calldata data, bytes calldata mofaSignature) external payable returns (bytes memory); }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface IFeeCollector { function registerFee(address feeTaker, uint256 feeAmount, address feeToken) external; function registerLockedFee(address feeTaker, uint256 feeAmount, address feeToken, bytes32 requestHash) external; function settleFee(bytes32 requestHash) external; function refundFee(bytes32 requestHash, address to) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.19; /** * @title IPlug * @notice Interface for a plug contract that executes the message received from a source chain. */ interface IPlug { /** * @dev this should be only executable by socket * @notice executes the message received from source chain * @notice It is expected to have original sender checks in the destination plugs using payload * @param srcChainSlug_ chain slug of source * @param payload_ the data which is needed by plug at inbound call on remote */ function inbound(uint32 srcChainSlug_, bytes calldata payload_) external payable; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface ISwapExecutor { function executeSwap(address token, uint256 amount, address swapRouter, bytes memory swapPayload) external payable; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; import {IPlug} from "./IPlug.sol"; interface ISwitchboardPlug is IPlug { function SWITCHBOARD_ID() external view returns (uint32); function connect(uint32 siblingChainSlug, address siblingPlug) external; function outbound(uint32 siblingChainSlug, uint256 msgGasLimit, bytes calldata payload) external payable; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; interface ISwitchboardRouter { function sendOutboundMsg( uint32 originChainId, uint32 switchboardId, uint8 msgId, uint256 destGasLimit, bytes calldata payload ) external payable; function receiveAndDeliverMsg(uint32 switchboardId, uint32 siblingChainId, bytes calldata payload) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.19; import {Ownable} from "./Ownable.sol"; /** * @title AccessControl * @dev This abstract contract implements access control mechanism based on roles. * Each role can have one or more addresses associated with it, which are granted * permission to execute functions with the onlyRole modifier. */ abstract contract AccessControl is Ownable { /** * @dev A mapping of roles to a mapping of addresses to boolean values indicating whether or not they have the role. */ mapping(bytes32 => mapping(address => bool)) private _permits; /** * @dev Emitted when a role is granted to an address. */ event RoleGranted(bytes32 indexed role, address indexed grantee); /** * @dev Emitted when a role is revoked from an address. */ event RoleRevoked(bytes32 indexed role, address indexed revokee); /** * @dev Error message thrown when an address does not have permission to execute a function with onlyRole modifier. */ error NoPermit(bytes32 role); /** * @dev Constructor that sets the owner of the contract. */ constructor(address owner_) Ownable(owner_) {} /** * @dev Modifier that restricts access to addresses having roles * Throws an error if the caller do not have permit */ modifier onlyRole(bytes32 role) { if (!_permits[role][msg.sender]) revert NoPermit(role); _; } /** * @dev Checks and reverts if an address do not have a specific role. * @param role_ The role to check. * @param address_ The address to check. */ function _checkRole(bytes32 role_, address address_) internal virtual { if (!_hasRole(role_, address_)) revert NoPermit(role_); } /** * @dev Grants a role to a given address. * @param role_ The role to grant. * @param grantee_ The address to grant the role to. * Emits a RoleGranted event. * Can only be called by the owner of the contract. */ function grantRole(bytes32 role_, address grantee_) external virtual onlyOwner { _grantRole(role_, grantee_); } /** * @dev Revokes a role from a given address. * @param role_ The role to revoke. * @param revokee_ The address to revoke the role from. * Emits a RoleRevoked event. * Can only be called by the owner of the contract. */ function revokeRole(bytes32 role_, address revokee_) external virtual onlyOwner { _revokeRole(role_, revokee_); } /** * @dev Internal function to grant a role to a given address. * @param role_ The role to grant. * @param grantee_ The address to grant the role to. * Emits a RoleGranted event. */ function _grantRole(bytes32 role_, address grantee_) internal { _permits[role_][grantee_] = true; emit RoleGranted(role_, grantee_); } /** * @dev Internal function to revoke a role from a given address. * @param role_ The role to revoke. * @param revokee_ The address to revoke the role from. * Emits a RoleRevoked event. */ function _revokeRole(bytes32 role_, address revokee_) internal { _permits[role_][revokee_] = false; emit RoleRevoked(role_, revokee_); } /** * @dev Checks whether an address has a specific role. * @param role_ The role to check. * @param address_ The address to check. * @return A boolean value indicating whether or not the address has the role. */ function hasRole(bytes32 role_, address address_) public view returns (bool) { return _hasRole(role_, address_); } function _hasRole(bytes32 role_, address address_) internal view returns (bool) { return _permits[role_][address_]; } }
// SPDX-License-Identifier: GPL-3.0-only pragma solidity ^0.8.19; import {OnlyOwner, OnlyNominee} from "../common/Errors.sol"; // @audit Audited before by Zellic: https://github.com/SocketDotTech/audits/blob/main/Socket-DL/07-2023%20-%20Data%20Layer%20-%20Zellic.pdf abstract contract Ownable { address private _owner; address private _nominee; event OwnerNominated(address indexed nominee); event OwnerClaimed(address indexed claimer); 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); emit OwnerClaimed(claimer_); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_bungeeGateway","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerNotBungeeGateway","type":"error"},{"inputs":[],"name":"IncorrectSwitchboard","type":"error"},{"inputs":[],"name":"InvalidMsg","type":"error"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"NoPermit","type":"error"},{"inputs":[],"name":"NotSiblingBungeeGateway","type":"error"},{"inputs":[],"name":"NotSwitchboardPlug","type":"error"},{"inputs":[],"name":"OnlyNominee","type":"error"},{"inputs":[],"name":"OnlyOwner","type":"error"},{"inputs":[],"name":"SwitchboardPlugZero","type":"error"},{"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":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"grantee","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"revokee","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"BUNGEE_GATEWAY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_bungeeGateway","type":"address"},{"internalType":"uint32","name":"_chainId","type":"uint32"}],"name":"addBungeeGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"switchboardPlug","type":"address"}],"name":"addSwitchboardPlug","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"chainId","type":"uint32"}],"name":"bungeeGateways","outputs":[{"internalType":"address","name":"bungeeGateway","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"switchboardId","type":"uint32"},{"internalType":"uint32","name":"siblingChainSlug","type":"uint32"},{"internalType":"address","name":"siblingPlug","type":"address"}],"name":"connectSwitchboardPlug","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role_","type":"bytes32"},{"internalType":"address","name":"grantee_","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role_","type":"bytes32"},{"internalType":"address","name":"address_","type":"address"}],"name":"hasRole","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":"uint32","name":"switchboardId","type":"uint32"},{"internalType":"uint32","name":"siblingChainId","type":"uint32"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"receiveAndDeliverMsg","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"switchboardId","type":"uint32"}],"name":"removeSwitchboardPlug","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role_","type":"bytes32"},{"internalType":"address","name":"revokee_","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"chainSlug","type":"uint32"},{"internalType":"uint32","name":"switchboardId","type":"uint32"},{"internalType":"uint8","name":"msgId","type":"uint8"},{"internalType":"uint256","name":"destGasLimit","type":"uint256"},{"internalType":"bytes","name":"payload","type":"bytes"}],"name":"sendOutboundMsg","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_bungeeGateway","type":"address"}],"name":"setBungeeGateway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"switchboardIdCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"switchboardId","type":"uint32"}],"name":"switchboardPlugs","outputs":[{"internalType":"contract ISwitchboardPlug","name":"switchboardPlug","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526003805463ffffffff60a01b1916600160a01b1790553480156200002757600080fd5b506040516200138b3803806200138b8339810160408190526200004a91620001a4565b81806200005781620000d9565b506200008690507f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f5836200012c565b620000b27f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a60836200012c565b600380546001600160a01b0319166001600160a01b039290921691909117905550620001dc565b600080546001600160a01b0383166001600160a01b0319918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b60008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b80516001600160a01b03811681146200019f57600080fd5b919050565b60008060408385031215620001b857600080fd5b620001c38362000187565b9150620001d36020840162000187565b90509250929050565b61119f80620001ec6000396000f3fe6080604052600436106101095760003560e01c8063757fb06c11610095578063a317055e11610064578063a317055e146102d6578063b25499a2146102f6578063b8898c081461032c578063bc455d2c14610362578063d547741f1461038257600080fd5b8063757fb06c146102485780638da5cb5b1461026857806391d14854146102865780639a78cbc5146102b657600080fd5b806340788883116100dc57806340788883146101b55780635813c9c5146101d55780635b94db27146101e857806367872a5d1461020857806370372d851461022857600080fd5b806320f99c0a1461010e5780632f2ff15d146101455780633123053d146101675780633bd1adec146101a0575b600080fd5b34801561011a57600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015157600080fd5b50610165610160366004610d50565b6103a2565b005b34801561017357600080fd5b5060035461018b90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161013c565b3480156101ac57600080fd5b506101656103db565b3480156101c157600080fd5b506101656101d0366004610dd3565b610411565b6101656101e3366004610e38565b610592565b3480156101f457600080fd5b50610165610203366004610ec3565b610637565b34801561021457600080fd5b50610165610223366004610ede565b6106ac565b34801561023457600080fd5b50600354610128906001600160a01b031681565b34801561025457600080fd5b50610165610263366004610f15565b61075a565b34801561027457600080fd5b506000546001600160a01b0316610128565b34801561029257600080fd5b506102a66102a1366004610d50565b61084f565b604051901515815260200161013c565b3480156102c257600080fd5b506101656102d1366004610ec3565b61087d565b3480156102e257600080fd5b506101656102f1366004610f5c565b610914565b34801561030257600080fd5b50610128610311366004610f5c565b6005602052600090815260409020546001600160a01b031681565b34801561033857600080fd5b50610128610347366004610f5c565b6004602052600090815260409020546001600160a01b031681565b34801561036e57600080fd5b5061016561037d366004610ec3565b6109ad565b34801561038e57600080fd5b5061016561039d366004610d50565b610b45565b6000546001600160a01b031633146103cd57604051635fc483c560e01b815260040160405180910390fd5b6103d78282610b7a565b5050565b6001546001600160a01b0316331461040657604051637c91ccdd60e01b815260040160405180910390fd5b61040f33610bd5565b565b63ffffffff84166000908152600460205260409020546001600160a01b0316331461044f5760405163fb60bbf960e01b815260040160405180910390fd5b600061045b8284610f79565b60f81c9050600061046f8360018187610fa9565b61047891610fd3565b60601c9050600061048c8460158188610fa9565b61049591610fd3565b60035460609190911c91506001600160a01b0383811691161415806104db575063ffffffff86166000908152600560205260409020546001600160a01b03828116911614155b156104f957604051631bd147a760e01b815260040160405180910390fd5b6001600160a01b03821663c66eaeb6848980610518896029818d610fa9565b60405160200161052a93929190611006565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161055793929190611074565b600060405180830381600087803b15801561057157600080fd5b505af1158015610585573d6000803e3d6000fd5b5050505050505050505050565b60008061059f8888610c28565b91509150816001600160a01b0316630293f697348a888a86338b8b6040516020016105ce9594939291906110a5565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016105fb939291906110f5565b6000604051808303818588803b15801561061457600080fd5b505af1158015610628573d6000803e3d6000fd5b50505050505050505050505050565b6000546001600160a01b0316331461066257604051635fc483c560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b3360009081527f01e90903605908818f4785c46825db30465c70bc0545136a320d85d90661836160205260409020547f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f59060ff166107255760405163962f633360e01b8152600481018290526024015b60405180910390fd5b5063ffffffff16600090815260056020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff166107ce5760405163962f633360e01b81526004810182905260240161071c565b63ffffffff848116600090815260046020819052604091829020549151638ec4a6e760e01b8152928616908301526001600160a01b0384811660248401521690638ec4a6e790604401600060405180830381600087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b5050505050505050565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff165b9392505050565b3360009081527f01e90903605908818f4785c46825db30465c70bc0545136a320d85d90661836160205260409020547f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f59060ff166108f15760405163962f633360e01b81526004810182905260240161071c565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff166109885760405163962f633360e01b81526004810182905260240161071c565b5063ffffffff16600090815260046020526040902080546001600160a01b0319169055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff16610a215760405163962f633360e01b81526004810182905260240161071c565b60038054600160a01b9081900463ffffffff908116600090815260046020818152604080842080546001600160a01b0319166001600160a01b038b81169190911790915596549590950490931682529083902054835163441edf0160e11b8152935194169363883dbe02938083019392908290030181865afa158015610aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acf919061111a565b600354600160a01b900463ffffffff908116911614610b01576040516339bf270760e01b815260040160405180910390fd5b6001600360148282829054906101000a900463ffffffff16610b239190611137565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050565b6000546001600160a01b03163314610b7057604051635fc483c560e01b815260040160405180910390fd5b6103d78282610cdc565b60008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b600080546001600160a01b0383166001600160a01b0319918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b60035460009081906001600160a01b03163314610c5857604051634556123760e01b815260040160405180910390fd5b5063ffffffff83166000908152600560205260409020546001600160a01b031680610c9657604051634271b76f60e01b815260040160405180910390fd5b63ffffffff83166000908152600460205260409020546001600160a01b0316915081610cd5576040516381c5e9a160e01b815260040160405180910390fd5b9250929050565b60008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b80356001600160a01b0381168114610d4b57600080fd5b919050565b60008060408385031215610d6357600080fd5b82359150610d7360208401610d34565b90509250929050565b63ffffffff81168114610d8e57600080fd5b50565b60008083601f840112610da357600080fd5b50813567ffffffffffffffff811115610dbb57600080fd5b602083019150836020828501011115610cd557600080fd5b60008060008060608587031215610de957600080fd5b8435610df481610d7c565b93506020850135610e0481610d7c565b9250604085013567ffffffffffffffff811115610e2057600080fd5b610e2c87828801610d91565b95989497509550505050565b60008060008060008060a08789031215610e5157600080fd5b8635610e5c81610d7c565b95506020870135610e6c81610d7c565b9450604087013560ff81168114610e8257600080fd5b935060608701359250608087013567ffffffffffffffff811115610ea557600080fd5b610eb189828a01610d91565b979a9699509497509295939492505050565b600060208284031215610ed557600080fd5b61087682610d34565b60008060408385031215610ef157600080fd5b610efa83610d34565b91506020830135610f0a81610d7c565b809150509250929050565b600080600060608486031215610f2a57600080fd5b8335610f3581610d7c565b92506020840135610f4581610d7c565b9150610f5360408501610d34565b90509250925092565b600060208284031215610f6e57600080fd5b813561087681610d7c565b6001600160f81b03198135818116916001851015610fa15780818660010360031b1b83161692505b505092915050565b60008085851115610fb957600080fd5b83861115610fc657600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015610fa15760149490940360031b84901b1690921692915050565b60e084901b6001600160e01b0319168152818360048301376000910160040190815292915050565b6000815180845260005b8181101561105457602081850181015186830182015201611038565b506000602082860101526020601f19601f83011685010191505092915050565b60ff8416815263ffffffff8316602082015260606040820152600061109c606083018461102e565b95945050505050565b6001600160f81b031960f887901b1681526bffffffffffffffffffffffff19606086811b8216600184015285901b1660158201526000828460298401375060009101602901908152949350505050565b63ffffffff8416815282602082015260606040820152600061109c606083018461102e565b60006020828403121561112c57600080fd5b815161087681610d7c565b63ffffffff81811683821601908082111561116257634e487b7160e01b600052601160045260246000fd5b509291505056fea2646970667358221220132569d79efd52fbf92132c5b9de6066d20ee376040693bbb14e873b4c44028d64736f6c63430008130033000000000000000000000000daee4d2156de6fe6f7d50ca047136d758f96a6f00000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101095760003560e01c8063757fb06c11610095578063a317055e11610064578063a317055e146102d6578063b25499a2146102f6578063b8898c081461032c578063bc455d2c14610362578063d547741f1461038257600080fd5b8063757fb06c146102485780638da5cb5b1461026857806391d14854146102865780639a78cbc5146102b657600080fd5b806340788883116100dc57806340788883146101b55780635813c9c5146101d55780635b94db27146101e857806367872a5d1461020857806370372d851461022857600080fd5b806320f99c0a1461010e5780632f2ff15d146101455780633123053d146101675780633bd1adec146101a0575b600080fd5b34801561011a57600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b34801561015157600080fd5b50610165610160366004610d50565b6103a2565b005b34801561017357600080fd5b5060035461018b90600160a01b900463ffffffff1681565b60405163ffffffff909116815260200161013c565b3480156101ac57600080fd5b506101656103db565b3480156101c157600080fd5b506101656101d0366004610dd3565b610411565b6101656101e3366004610e38565b610592565b3480156101f457600080fd5b50610165610203366004610ec3565b610637565b34801561021457600080fd5b50610165610223366004610ede565b6106ac565b34801561023457600080fd5b50600354610128906001600160a01b031681565b34801561025457600080fd5b50610165610263366004610f15565b61075a565b34801561027457600080fd5b506000546001600160a01b0316610128565b34801561029257600080fd5b506102a66102a1366004610d50565b61084f565b604051901515815260200161013c565b3480156102c257600080fd5b506101656102d1366004610ec3565b61087d565b3480156102e257600080fd5b506101656102f1366004610f5c565b610914565b34801561030257600080fd5b50610128610311366004610f5c565b6005602052600090815260409020546001600160a01b031681565b34801561033857600080fd5b50610128610347366004610f5c565b6004602052600090815260409020546001600160a01b031681565b34801561036e57600080fd5b5061016561037d366004610ec3565b6109ad565b34801561038e57600080fd5b5061016561039d366004610d50565b610b45565b6000546001600160a01b031633146103cd57604051635fc483c560e01b815260040160405180910390fd5b6103d78282610b7a565b5050565b6001546001600160a01b0316331461040657604051637c91ccdd60e01b815260040160405180910390fd5b61040f33610bd5565b565b63ffffffff84166000908152600460205260409020546001600160a01b0316331461044f5760405163fb60bbf960e01b815260040160405180910390fd5b600061045b8284610f79565b60f81c9050600061046f8360018187610fa9565b61047891610fd3565b60601c9050600061048c8460158188610fa9565b61049591610fd3565b60035460609190911c91506001600160a01b0383811691161415806104db575063ffffffff86166000908152600560205260409020546001600160a01b03828116911614155b156104f957604051631bd147a760e01b815260040160405180910390fd5b6001600160a01b03821663c66eaeb6848980610518896029818d610fa9565b60405160200161052a93929190611006565b6040516020818303038152906040526040518463ffffffff1660e01b815260040161055793929190611074565b600060405180830381600087803b15801561057157600080fd5b505af1158015610585573d6000803e3d6000fd5b5050505050505050505050565b60008061059f8888610c28565b91509150816001600160a01b0316630293f697348a888a86338b8b6040516020016105ce9594939291906110a5565b6040516020818303038152906040526040518563ffffffff1660e01b81526004016105fb939291906110f5565b6000604051808303818588803b15801561061457600080fd5b505af1158015610628573d6000803e3d6000fd5b50505050505050505050505050565b6000546001600160a01b0316331461066257604051635fc483c560e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b0383169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b3360009081527f01e90903605908818f4785c46825db30465c70bc0545136a320d85d90661836160205260409020547f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f59060ff166107255760405163962f633360e01b8152600481018290526024015b60405180910390fd5b5063ffffffff16600090815260056020526040902080546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff166107ce5760405163962f633360e01b81526004810182905260240161071c565b63ffffffff848116600090815260046020819052604091829020549151638ec4a6e760e01b8152928616908301526001600160a01b0384811660248401521690638ec4a6e790604401600060405180830381600087803b15801561083157600080fd5b505af1158015610845573d6000803e3d6000fd5b5050505050505050565b60008281526002602090815260408083206001600160a01b038516845290915281205460ff165b9392505050565b3360009081527f01e90903605908818f4785c46825db30465c70bc0545136a320d85d90661836160205260409020547f82db594318110a04b6349ce48645aa69f0892751bc893d15e61d9e2b9c4630f59060ff166108f15760405163962f633360e01b81526004810182905260240161071c565b50600380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff166109885760405163962f633360e01b81526004810182905260240161071c565b5063ffffffff16600090815260046020526040902080546001600160a01b0319169055565b3360009081527f92525f56396379a60aa6906b073be7d5401202f84f3e9ead4475959f623ac01160205260409020547f6955dcfccb267c210753a24170c32eb247318344170168007811a84c16c37a609060ff16610a215760405163962f633360e01b81526004810182905260240161071c565b60038054600160a01b9081900463ffffffff908116600090815260046020818152604080842080546001600160a01b0319166001600160a01b038b81169190911790915596549590950490931682529083902054835163441edf0160e11b8152935194169363883dbe02938083019392908290030181865afa158015610aab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610acf919061111a565b600354600160a01b900463ffffffff908116911614610b01576040516339bf270760e01b815260040160405180910390fd5b6001600360148282829054906101000a900463ffffffff16610b239190611137565b92506101000a81548163ffffffff021916908363ffffffff1602179055505050565b6000546001600160a01b03163314610b7057604051635fc483c560e01b815260040160405180910390fd5b6103d78282610cdc565b60008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b600080546001600160a01b0383166001600160a01b0319918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b60035460009081906001600160a01b03163314610c5857604051634556123760e01b815260040160405180910390fd5b5063ffffffff83166000908152600560205260409020546001600160a01b031680610c9657604051634271b76f60e01b815260040160405180910390fd5b63ffffffff83166000908152600460205260409020546001600160a01b0316915081610cd5576040516381c5e9a160e01b815260040160405180910390fd5b9250929050565b60008281526002602090815260408083206001600160a01b0385168085529252808320805460ff1916905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b80356001600160a01b0381168114610d4b57600080fd5b919050565b60008060408385031215610d6357600080fd5b82359150610d7360208401610d34565b90509250929050565b63ffffffff81168114610d8e57600080fd5b50565b60008083601f840112610da357600080fd5b50813567ffffffffffffffff811115610dbb57600080fd5b602083019150836020828501011115610cd557600080fd5b60008060008060608587031215610de957600080fd5b8435610df481610d7c565b93506020850135610e0481610d7c565b9250604085013567ffffffffffffffff811115610e2057600080fd5b610e2c87828801610d91565b95989497509550505050565b60008060008060008060a08789031215610e5157600080fd5b8635610e5c81610d7c565b95506020870135610e6c81610d7c565b9450604087013560ff81168114610e8257600080fd5b935060608701359250608087013567ffffffffffffffff811115610ea557600080fd5b610eb189828a01610d91565b979a9699509497509295939492505050565b600060208284031215610ed557600080fd5b61087682610d34565b60008060408385031215610ef157600080fd5b610efa83610d34565b91506020830135610f0a81610d7c565b809150509250929050565b600080600060608486031215610f2a57600080fd5b8335610f3581610d7c565b92506020840135610f4581610d7c565b9150610f5360408501610d34565b90509250925092565b600060208284031215610f6e57600080fd5b813561087681610d7c565b6001600160f81b03198135818116916001851015610fa15780818660010360031b1b83161692505b505092915050565b60008085851115610fb957600080fd5b83861115610fc657600080fd5b5050820193919092039150565b6bffffffffffffffffffffffff198135818116916014851015610fa15760149490940360031b84901b1690921692915050565b60e084901b6001600160e01b0319168152818360048301376000910160040190815292915050565b6000815180845260005b8181101561105457602081850181015186830182015201611038565b506000602082860101526020601f19601f83011685010191505092915050565b60ff8416815263ffffffff8316602082015260606040820152600061109c606083018461102e565b95945050505050565b6001600160f81b031960f887901b1681526bffffffffffffffffffffffff19606086811b8216600184015285901b1660158201526000828460298401375060009101602901908152949350505050565b63ffffffff8416815282602082015260606040820152600061109c606083018461102e565b60006020828403121561112c57600080fd5b815161087681610d7c565b63ffffffff81811683821601908082111561116257634e487b7160e01b600052601160045260246000fd5b509291505056fea2646970667358221220132569d79efd52fbf92132c5b9de6066d20ee376040693bbb14e873b4c44028d64736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000daee4d2156de6fe6f7d50ca047136d758f96a6f00000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _owner (address): 0xDaeE4D2156DE6fe6f7D50cA047136D758f96A6f0
Arg [1] : _bungeeGateway (address): 0x0000000000000000000000000000000000000000
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000daee4d2156de6fe6f7d50ca047136d758f96a6f0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.