Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- TransmitManager
- Optimization enabled
- true
- Compiler version
- v0.8.19+commit.7dd6d404
- Optimization runs
- 999999
- EVM Version
- default
- Verified at
- 2024-10-23T11:04:26.135304Z
Constructor Arguments
0x00000000000000000000000044a44837894b5edc2bde64567fc62599b3b88f4c0000000000000000000000000000000000000000000000000000000000028c610000000000000000000000005c4186d343eef952c9ed886e45f8243edf0a503f000000000000000000000000ef1ae2f8b4e18afdddf1ca92037772891100a39f
Arg [0] (address) : 0x44a44837894b5edc2bde64567fc62599b3b88f4c
Arg [1] (uint32) : 167009
Arg [2] (address) : 0x5c4186d343eef952c9ed886e45f8243edf0a503f
Arg [3] (address) : 0xef1ae2f8b4e18afdddf1ca92037772891100a39f
contracts/TransmitManager.sol
// SPDX-License-Identifier: GPL-3.0-only // Sources flattened with hardhat v2.12.2 https://hardhat.org // File contracts/interfaces/ITransmitManager.sol pragma solidity 0.8.19; /** * @title ITransmitManager * @dev The interface for a transmit manager contract */ interface ITransmitManager { /** * @notice Checks if a given transmitter is authorized to send transactions to the destination chain. * @param siblingSlug The unique identifier for the sibling chain. * @param digest The digest of the message being signed. * @param signature The signature of the message being signed. * @return The address of the transmitter and a boolean indicating whether the transmitter is authorized or not. */ function checkTransmitter( uint32 siblingSlug, bytes32 digest, bytes calldata signature ) external view returns (address, bool); /** * @notice sets the transmission fee needed to transmit message to given `siblingSlug_` * @dev recovered address should add have feeUpdater role for `siblingSlug_` * @param nonce_ The incremental nonce to prevent signature replay * @param siblingSlug_ sibling id for which fee updater is registered * @param transmissionFees_ digest which is signed by transmitter * @param signature_ signature */ function setTransmissionFees( uint256 nonce_, uint32 siblingSlug_, uint128 transmissionFees_, bytes calldata signature_ ) external; /** * @notice receives fees from Execution manager * @dev this function can be used to keep track of fees received for each slug * @param siblingSlug_ sibling id for which fee updater is registered */ function receiveFees(uint32 siblingSlug_) external payable; } // File contracts/interfaces/IExecutionManager.sol pragma solidity 0.8.19; /** * @title Execution Manager Interface * @dev This interface defines the functions for managing and executing transactions on external chains * @dev It is also responsible for collecting all the socket fees, which can then be pulled by others */ interface IExecutionManager { struct ExecutionFeesParam { // for calculating perGasCost * gasLimit uint80 perGasCost; // for calculating cost for executing payload (needed for rollups) uint80 perByteCost; // additional cost (differs based on chain) uint80 overhead; } /** * @notice Returns the executor of the packed message and whether the executor is authorized * @param packedMessage The message packed with payload, fees and config * @param sig The signature of the message * @return The address of the executor and a boolean indicating if the executor is authorized */ function isExecutor( bytes32 packedMessage, bytes memory sig ) external view returns (address, bool); /** * @notice Pays the fees for executing a transaction on the external chain * @dev This function is payable and assumes the socket is going to send correct amount of fees. * @param minMsgGasLimit_ The minimum gas limit for the transaction * @param payloadSize_ The payload size in bytes * @param executionParams_ Extra params for execution * @param transmissionParams_ Extra params for transmission * @param siblingChainSlug_ Sibling chain identifier * @param switchboardFees_ fee charged by switchboard for processing transaction * @param verificationOverheadFees_ fee charged for verifying transaction * @param transmitManager_ The transmitManager address * @param switchboard_ The switchboard address * @param maxPacketLength_ The maxPacketLength for the capacitor */ function payAndCheckFees( uint256 minMsgGasLimit_, uint256 payloadSize_, bytes32 executionParams_, bytes32 transmissionParams_, uint32 siblingChainSlug_, uint128 switchboardFees_, uint128 verificationOverheadFees_, address transmitManager_, address switchboard_, uint256 maxPacketLength_ ) external payable returns (uint128, uint128); /** * @notice Returns the minimum fees required for executing a transaction on the external chain * @param minMsgGasLimit_ minMsgGasLimit_ * @param siblingChainSlug_ The destination slug * @return The minimum fees required for executing the transaction */ function getMinFees( uint256 minMsgGasLimit_, uint256 payloadSize_, bytes32 executionParams_, uint32 siblingChainSlug_ ) external view returns (uint128); /** * @notice function for getting the minimum fees required for executing and transmitting a cross-chain transaction * @dev this function is called at source to calculate the execution cost. * @param payloadSize_ byte length of payload. Currently only used to check max length, later on will be used for fees calculation. * @param executionParams_ Can be used for providing extra information. Currently used for msgValue * @param siblingChainSlug_ Sibling chain identifier * @return minExecutionFee : Minimum fees required for executing the transaction */ function getExecutionTransmissionMinFees( uint256 minMsgGasLimit_, uint256 payloadSize_, bytes32 executionParams_, bytes32 transmissionParams_, uint32 siblingChainSlug_, address transmitManager_ ) external view returns (uint128, uint128); /** * @notice Updates the execution fees for an executor and message ID * @param executor The executor address * @param executionFees The execution fees to update * @param msgId The ID of the message */ function updateExecutionFees( address executor, uint128 executionFees, bytes32 msgId ) external; /** * @notice updates the transmission fee * @param remoteChainSlug_ sibling chain identifier * @param transmitMinFees_ transmission fees collected */ function setTransmissionMinFees( uint32 remoteChainSlug_, uint128 transmitMinFees_ ) external; /** * @notice sets the minimum execution fees required for executing at `siblingChainSlug_` * @dev this function currently sets the price for a constant msg gas limit and payload size * @param nonce_ incremental id to prevent signature replay * @param siblingChainSlug_ sibling chain identifier * @param executionFees_ total fees where price in destination native token is converted to source native tokens * @param signature_ signature of fee updater */ function setExecutionFees( uint256 nonce_, uint32 siblingChainSlug_, ExecutionFeesParam calldata executionFees_, bytes calldata signature_ ) external; /** * @notice sets the min limit for msg value for `siblingChainSlug_` * @param nonce_ incremental id to prevent signature replay * @param siblingChainSlug_ sibling chain identifier * @param msgValueMinThreshold_ min msg value * @param signature_ signature of fee updater */ function setMsgValueMinThreshold( uint256 nonce_, uint32 siblingChainSlug_, uint256 msgValueMinThreshold_, bytes calldata signature_ ) external; /** * @notice sets the max limit for msg value for `siblingChainSlug_` * @param nonce_ incremental id to prevent signature replay * @param siblingChainSlug_ sibling chain identifier * @param msgValueMaxThreshold_ max msg value * @param signature_ signature of fee updater */ function setMsgValueMaxThreshold( uint256 nonce_, uint32 siblingChainSlug_, uint256 msgValueMaxThreshold_, bytes calldata signature_ ) external; /** * @notice sets the relative token price for `siblingChainSlug_` * @dev this function is expected to be called frequently to match the original prices * @param nonce_ incremental id to prevent signature replay * @param siblingChainSlug_ sibling chain identifier * @param relativeNativeTokenPrice_ relative price * @param signature_ signature of fee updater */ function setRelativeNativeTokenPrice( uint256 nonce_, uint32 siblingChainSlug_, uint256 relativeNativeTokenPrice_, bytes calldata signature_ ) external; /** * @notice called by socket while executing message to validate if the msg value provided is enough * @param executionParams_ a bytes32 string where first byte gives param type (if value is 0 or not) * and remaining bytes give the msg value needed * @param msgValue_ msg.value to be sent with inbound */ function verifyParams( bytes32 executionParams_, uint256 msgValue_ ) external view; /** * @notice withdraws switchboard fees from contract * @param siblingChainSlug_ withdraw fees corresponding to this slug * @param amount_ withdraw amount */ function withdrawSwitchboardFees( uint32 siblingChainSlug_, address switchboard_, uint128 amount_ ) external; /** * @dev this function gets the transmitManager address from the socket contract. If it is ever upgraded in socket, * @dev remove the fees from executionManager first, and then upgrade address at socket. * @notice withdraws transmission fees from contract * @param siblingChainSlug_ withdraw fees corresponding to this slug * @param amount_ withdraw amount */ function withdrawTransmissionFees( uint32 siblingChainSlug_, uint128 amount_ ) external; } // File contracts/interfaces/ISocket.sol pragma solidity 0.8.19; /** * @title ISocket * @notice An interface for a cross-chain communication contract * @dev This interface provides methods for transmitting and executing messages between chains, * connecting a plug to a remote chain and setting up switchboards for the message transmission * This interface also emits events for important operations such as message transmission, execution status, * and plug connection */ interface ISocket { /** * @notice A struct containing fees required for message transmission and execution * @param transmissionFees fees needed for transmission * @param switchboardFees fees needed by switchboard * @param executionFee fees needed for execution */ struct Fees { uint128 transmissionFees; uint128 executionFee; uint128 switchboardFees; } /** * @title MessageDetails * @dev This struct defines the details of a message to be executed in a Decapacitor contract. */ struct MessageDetails { // A unique identifier for the message. bytes32 msgId; // The fee to be paid for executing the message. uint256 executionFee; // The min amount of gas that can be used to execute the message. uint256 minMsgGasLimit; // The extra params which might provide msg value and additional info needed for message exec bytes32 executionParams; // The payload data to be executed in the message. bytes payload; } /** * @title ExecutionDetails * @dev This struct defines the execution details */ struct ExecutionDetails { // packet id bytes32 packetId; // proposal count uint256 proposalCount; // gas limit needed to execute inbound uint256 executionGasLimit; // proof data required by the Decapacitor contract to verify the message's authenticity bytes decapacitorProof; // signature of executor bytes signature; } /** * @notice emits the status of message after inbound call * @param msgId msg id which is executed */ event ExecutionSuccess(bytes32 msgId); /** * @notice emits the config set by a plug for a remoteChainSlug * @param plug address of plug on current chain * @param siblingChainSlug sibling chain slug * @param siblingPlug address of plug on sibling chain * @param inboundSwitchboard inbound switchboard (select from registered options) * @param outboundSwitchboard outbound switchboard (select from registered options) * @param capacitor capacitor selected based on outbound switchboard * @param decapacitor decapacitor selected based on inbound switchboard */ event PlugConnected( address plug, uint32 siblingChainSlug, address siblingPlug, address inboundSwitchboard, address outboundSwitchboard, address capacitor, address decapacitor ); /** * @notice registers a message * @dev Packs the message and includes it in a packet with capacitor * @param remoteChainSlug_ the remote chain slug * @param minMsgGasLimit_ the gas limit needed to execute the payload on remote * @param payload_ the data which is needed by plug at inbound call on remote */ function outbound( uint32 remoteChainSlug_, uint256 minMsgGasLimit_, bytes32 executionParams_, bytes32 transmissionParams_, bytes calldata payload_ ) external payable returns (bytes32 msgId); /** * @notice executes a message * @param executionDetails_ the packet details, proof and signature needed for message execution * @param messageDetails_ the message details */ function execute( ISocket.ExecutionDetails calldata executionDetails_, ISocket.MessageDetails calldata messageDetails_ ) external payable; /** * @notice seals data in capacitor for specific batchSize * @param batchSize_ size of batch to be sealed * @param capacitorAddress_ address of capacitor * @param signature_ signed Data needed for verification */ function seal( uint256 batchSize_, address capacitorAddress_, bytes calldata signature_ ) external payable; /** * @notice proposes a packet * @param packetId_ packet id * @param root_ root data * @param switchboard_ The address of switchboard for which this packet is proposed * @param signature_ signed Data needed for verification */ function proposeForSwitchboard( bytes32 packetId_, bytes32 root_, address switchboard_, bytes calldata signature_ ) external payable; /** * @notice sets the config specific to the plug * @param siblingChainSlug_ the sibling chain slug * @param siblingPlug_ address of plug present at sibling chain to call inbound * @param inboundSwitchboard_ the address of switchboard to use for receiving messages * @param outboundSwitchboard_ the address of switchboard to use for sending messages */ function connect( uint32 siblingChainSlug_, address siblingPlug_, address inboundSwitchboard_, address outboundSwitchboard_ ) external; /** * @notice deploy capacitor and decapacitor for a switchboard with a specified max packet length, sibling chain slug, and capacitor type. * @param siblingChainSlug_ The slug of the sibling chain that the switchboard is registered with. * @param maxPacketLength_ The maximum length of a packet allowed by the switchboard. * @param capacitorType_ The type of capacitor that the switchboard uses. * @param siblingSwitchboard_ The switchboard address deployed on `siblingChainSlug_` */ function registerSwitchboardForSibling( uint32 siblingChainSlug_, uint256 maxPacketLength_, uint256 capacitorType_, address siblingSwitchboard_ ) external returns (address capacitor, address decapacitor); /** * @notice Emits the sibling switchboard for given `siblingChainSlug_`. * @dev This function is expected to be only called by switchboard. * @dev the event emitted is tracked by transmitters to decide which switchboard a packet should be proposed on * @param siblingChainSlug_ The slug of the sibling chain * @param siblingSwitchboard_ The switchboard address deployed on `siblingChainSlug_` */ function useSiblingSwitchboard( uint32 siblingChainSlug_, address siblingSwitchboard_ ) external; /** * @notice Retrieves the packet id roots for a specified packet id. * @param packetId_ The packet id for which to retrieve the root. * @param proposalCount_ The proposal id for packetId_ for which to retrieve the root. * @param switchboard_ The address of switchboard for which this packet is proposed * @return The packet id roots for the specified packet id. */ function packetIdRoots( bytes32 packetId_, uint256 proposalCount_, address switchboard_ ) external view returns (bytes32); /** * @notice Retrieves the latest proposalCount for a packet id. * @return The proposal count for the specified packet id. */ function proposalCount(bytes32 packetId_) external view returns (uint256); /** * @notice Retrieves the minimum fees required for a message with a specified gas limit and destination chain. * @param minMsgGasLimit_ The gas limit of the message. * @param remoteChainSlug_ The slug of the destination chain for the message. * @param plug_ The address of the plug through which the message is sent. * @return totalFees The minimum fees required for the specified message. */ function getMinFees( uint256 minMsgGasLimit_, uint256 payloadSize_, bytes32 executionParams_, bytes32 transmissionParams_, uint32 remoteChainSlug_, address plug_ ) external view returns (uint256 totalFees); /// return instance of transmit manager function transmitManager__() external view returns (ITransmitManager); /// return instance of execution manager function executionManager__() external view returns (IExecutionManager); } // File lib/solmate/src/tokens/ERC20.sol pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } } // File lib/solmate/src/utils/SafeTransferLib.sol pragma solidity >=0.8.0; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } } // File contracts/libraries/RescueFundsLib.sol pragma solidity 0.8.19; error ZeroAddress(); /** * @title RescueFundsLib * @dev A library that provides a function to rescue funds from a contract. */ library RescueFundsLib { /** * @dev The address used to identify ETH. */ address public constant ETH_ADDRESS = address(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE); /** * @dev thrown when the given token address don't have any code */ error InvalidTokenAddress(); /** * @dev Rescues funds from a contract. * @param token_ The address of the token contract. * @param rescueTo_ The address of the user. * @param amount_ The amount of tokens to be rescued. */ function rescueFunds( address token_, address rescueTo_, uint256 amount_ ) internal { if (rescueTo_ == address(0)) revert ZeroAddress(); if (token_ == ETH_ADDRESS) { SafeTransferLib.safeTransferETH(rescueTo_, amount_); } else { if (token_.code.length == 0) revert InvalidTokenAddress(); SafeTransferLib.safeTransfer(ERC20(token_), rescueTo_, amount_); } } } // File contracts/utils/Ownable.sol pragma solidity 0.8.19; /** * @title Ownable * @dev The Ownable contract provides a simple way to manage ownership of a contract * and allows for ownership to be transferred to a nominated address. */ abstract contract Ownable { address private _owner; address private _nominee; event OwnerNominated(address indexed nominee); event OwnerClaimed(address indexed claimer); error OnlyOwner(); error OnlyNominee(); /** * @dev Sets the contract's owner to the address that is passed to the constructor. */ constructor(address owner_) { _claimOwner(owner_); } /** * @dev Modifier that restricts access to only the contract's owner. * Throws an error if the caller is not the owner. */ modifier onlyOwner() { if (msg.sender != _owner) revert OnlyOwner(); _; } /** * @dev Returns the current owner of the contract. */ function owner() external view returns (address) { return _owner; } /** * @dev Returns the current nominee for ownership of the contract. */ function nominee() external view returns (address) { return _nominee; } /** * @dev Allows the current owner to nominate a new owner for the contract. * Throws an error if the caller is not the owner. * Emits an `OwnerNominated` event with the address of the nominee. */ function nominateOwner(address nominee_) external { if (msg.sender != _owner) revert OnlyOwner(); _nominee = nominee_; emit OwnerNominated(_nominee); } /** * @dev Allows the nominated owner to claim ownership of the contract. * Throws an error if the caller is not the nominee. * Sets the nominated owner as the new owner of the contract. * Emits an `OwnerClaimed` event with the address of the new owner. */ function claimOwner() external { if (msg.sender != _nominee) revert OnlyNominee(); _claimOwner(msg.sender); } /** * @dev Internal function that sets the owner of the contract to the specified address * and sets the nominee to address(0). */ function _claimOwner(address claimer_) internal { _owner = claimer_; _nominee = address(0); emit OwnerClaimed(claimer_); } } // File contracts/utils/AccessControl.sol pragma solidity 0.8.19; /** * @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_ ) external view returns (bool) { return _hasRole(role_, address_); } function _hasRole( bytes32 role_, address address_ ) internal view returns (bool) { return _permits[role_][address_]; } } // File contracts/utils/AccessControlExtended.sol pragma solidity 0.8.19; /** * @title AccessControlExtended * @dev This contract extends the functionality of the AccessControl contract by adding * the ability to grant and revoke roles based on a combination of role name and a chain slug. * It also provides batch operations for granting and revoking roles. */ contract AccessControlExtended is AccessControl { /** * @dev Constructor that sets the owner of the contract. */ constructor(address owner_) AccessControl(owner_) {} /** * @dev thrown when array lengths are not equal */ error UnequalArrayLengths(); /** * @dev Checks if an address has the role. * @param roleName_ The name of the role. * @param chainSlug_ The chain slug associated with the role. * @param address_ The address to be granted the role. */ function _checkRoleWithSlug( bytes32 roleName_, uint256 chainSlug_, address address_ ) internal virtual { bytes32 roleHash = keccak256(abi.encode(roleName_, chainSlug_)); if (!_hasRole(roleHash, address_)) revert NoPermit(roleHash); } /** * @dev Grants a role to an address based on the role name and chain slug. * @param roleName_ The name of the role. * @param chainSlug_ The chain slug associated with the role. * @param grantee_ The address to be granted the role. */ function grantRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address grantee_ ) external virtual onlyOwner { _grantRoleWithSlug(roleName_, chainSlug_, grantee_); } /** * @dev Grants multiple roles to multiple addresses in batch. * @param roleNames_ The names of the roles to grant. * @param slugs_ The slugs for chain specific roles. For roles which are not chain-specific, we can use slug = 0 * @param grantees_ The addresses to be granted the roles. */ function grantBatchRole( bytes32[] calldata roleNames_, uint32[] calldata slugs_, address[] calldata grantees_ ) external virtual onlyOwner { if ( roleNames_.length != grantees_.length || roleNames_.length != slugs_.length ) revert UnequalArrayLengths(); uint256 totalRoles = roleNames_.length; for (uint256 index = 0; index < totalRoles; ) { if (slugs_[index] > 0) _grantRoleWithSlug( roleNames_[index], slugs_[index], grantees_[index] ); else _grantRole(roleNames_[index], grantees_[index]); // inputs are controlled by owner unchecked { ++index; } } } /** * @dev Revokes multiple roles from multiple addresses in batch. * @param roleNames_ The names of the roles to revoke. * @param slugs_ The slugs for chain specific roles. For roles which are not chain-specific, we can use slug = 0 * @param grantees_ The addresses to be revoked the roles. */ function revokeBatchRole( bytes32[] calldata roleNames_, uint32[] calldata slugs_, address[] calldata grantees_ ) external virtual onlyOwner { if ( roleNames_.length != grantees_.length || roleNames_.length != slugs_.length ) revert UnequalArrayLengths(); uint256 totalRoles = roleNames_.length; for (uint256 index = 0; index < totalRoles; ) { if (slugs_[index] > 0) _revokeRoleWithSlug( roleNames_[index], slugs_[index], grantees_[index] ); else _revokeRole(roleNames_[index], grantees_[index]); // inputs are controlled by owner unchecked { ++index; } } } function _grantRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address grantee_ ) internal { _grantRole(keccak256(abi.encode(roleName_, chainSlug_)), grantee_); } /** * @dev Checks if an address has a role based on the role name and chain slug. * @param roleName_ The name of the role. * @param chainSlug_ The chain slug associated with the role. * @param address_ The address to check for the role. * @return A boolean indicating whether the address has the specified role. */ function hasRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address address_ ) external view returns (bool) { return _hasRoleWithSlug(roleName_, chainSlug_, address_); } function _hasRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address address_ ) internal view returns (bool) { return _hasRole(keccak256(abi.encode(roleName_, chainSlug_)), address_); } /** * @dev Revokes roles from an address * @param roleName_ The names of the roles to revoke. * @param chainSlug_ The chain slug associated with the role. * @param grantee_ The addresses to be revoked the roles. */ function revokeRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address grantee_ ) external virtual onlyOwner { _revokeRoleWithSlug(roleName_, chainSlug_, grantee_); } function _revokeRoleWithSlug( bytes32 roleName_, uint32 chainSlug_, address revokee_ ) internal { _revokeRole(keccak256(abi.encode(roleName_, chainSlug_)), revokee_); } } // File contracts/interfaces/ISignatureVerifier.sol pragma solidity 0.8.19; /** * @title Signature Verifier * @notice Verifies the signatures and returns the address of signer recovered from the input signature or digest. */ interface ISignatureVerifier { /** * @notice returns the address of signer recovered from input signature and digest */ function recoverSigner( bytes32 digest_, bytes memory signature_ ) external pure returns (address signer); } // File contracts/utils/SigIdentifiers.sol pragma solidity 0.8.19; // contains unique identifiers which are hashes of strings, they help in making signature digest unique // hence preventing signature replay attacks // default switchboards bytes32 constant TRIP_PATH_SIG_IDENTIFIER = keccak256("TRIP_PATH"); bytes32 constant TRIP_PROPOSAL_SIG_IDENTIFIER = keccak256("TRIP_PROPOSAL"); bytes32 constant TRIP_GLOBAL_SIG_IDENTIFIER = keccak256("TRIP_GLOBAL"); bytes32 constant UN_TRIP_PATH_SIG_IDENTIFIER = keccak256("UN_TRIP_PATH"); bytes32 constant UN_TRIP_GLOBAL_SIG_IDENTIFIER = keccak256("UN_TRIP_GLOBAL"); // native switchboards bytes32 constant TRIP_NATIVE_SIG_IDENTIFIER = keccak256("TRIP_NATIVE"); bytes32 constant UN_TRIP_NATIVE_SIG_IDENTIFIER = keccak256("UN_TRIP_NATIVE"); // value threshold, price and fee updaters bytes32 constant FEES_UPDATE_SIG_IDENTIFIER = keccak256("FEES_UPDATE"); bytes32 constant RELATIVE_NATIVE_TOKEN_PRICE_UPDATE_SIG_IDENTIFIER = keccak256( "RELATIVE_NATIVE_TOKEN_PRICE_UPDATE" ); bytes32 constant MSG_VALUE_MIN_THRESHOLD_SIG_IDENTIFIER = keccak256( "MSG_VALUE_MIN_THRESHOLD_UPDATE" ); bytes32 constant MSG_VALUE_MAX_THRESHOLD_SIG_IDENTIFIER = keccak256( "MSG_VALUE_MAX_THRESHOLD_UPDATE" ); // File contracts/utils/AccessRoles.sol pragma solidity 0.8.19; // contains role hashes used in socket dl for various different operations // used to rescue funds bytes32 constant RESCUE_ROLE = keccak256("RESCUE_ROLE"); // used to withdraw fees bytes32 constant WITHDRAW_ROLE = keccak256("WITHDRAW_ROLE"); // used to trip switchboards bytes32 constant TRIP_ROLE = keccak256("TRIP_ROLE"); // used to un trip switchboards bytes32 constant UN_TRIP_ROLE = keccak256("UN_TRIP_ROLE"); // used by governance bytes32 constant GOVERNANCE_ROLE = keccak256("GOVERNANCE_ROLE"); //used by executors which executes message at destination bytes32 constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE"); // used by transmitters who seal and propose packets in socket bytes32 constant TRANSMITTER_ROLE = keccak256("TRANSMITTER_ROLE"); // used by switchboard watchers who work against transmitters bytes32 constant WATCHER_ROLE = keccak256("WATCHER_ROLE"); // used by fee updaters responsible for updating fees at switchboards, transmit manager and execution manager bytes32 constant FEES_UPDATER_ROLE = keccak256("FEES_UPDATER_ROLE"); // File contracts/TransmitManager.sol pragma solidity 0.8.19; /** * @title TransmitManager * @notice The TransmitManager contract managers transmitter which facilitates communication between chains * @dev This contract is responsible access control of transmitters and their fees * @dev This contract inherits AccessControlExtended which extends access control * @dev The transmission fees is collected in execution manager which can be pulled from it when needed */ contract TransmitManager is ITransmitManager, AccessControlExtended { // chain slug of the current chain uint32 public immutable chainSlug; // socket contract ISocket public immutable socket__; // signature verifier contract ISignatureVerifier public signatureVerifier__; // nonce used in fee update signatures // feeUpdater => nextNonce mapping(address => uint256) public nextNonce; // triggered when nonce is not as expected for feeUpdater recovered from sig error InvalidNonce(); // triggered when fees received from non execution manager. // remember to collect fees beforehand if execution manager is updated on socket. error OnlyExecutionManager(); /** * @notice Emitted when a new signature verifier contract is set * @param signatureVerifier The address of the new signature verifier contract */ event SignatureVerifierSet(address signatureVerifier); /** * @notice Emitted when the transmissionFees is updated * @param dstChainSlug The destination chain slug for which the transmissionFees is updated * @param transmissionFees The new transmissionFees per packet */ event TransmissionFeesSet(uint256 dstChainSlug, uint256 transmissionFees); /** * @notice Initializes the TransmitManager contract * @param signatureVerifier_ The address of the signature verifier contract * @param socket_ The address of socket contract * @param owner_ The owner of the contract with GOVERNANCE_ROLE * @param chainSlug_ The chain slug of the current chain */ constructor( address owner_, uint32 chainSlug_, ISocket socket_, ISignatureVerifier signatureVerifier_ ) AccessControlExtended(owner_) { chainSlug = chainSlug_; signatureVerifier__ = signatureVerifier_; socket__ = socket_; } /** * @notice verifies if the given signatures recovers a valid transmitter * @dev signature sent to this function is validated against digest * @dev recovered transmitter should add have transmitter role for `siblingSlug_` * @dev This function is called by socket which creates the digest which is used to recover sig * @param siblingSlug_ sibling id for which transmitter is registered * @param digest_ digest which is signed by transmitter * @param signature_ signature */ function checkTransmitter( uint32 siblingSlug_, bytes32 digest_, bytes calldata signature_ ) external view override returns (address, bool) { address transmitter = signatureVerifier__.recoverSigner( digest_, signature_ ); return ( transmitter, _hasRoleWithSlug(TRANSMITTER_ROLE, siblingSlug_, transmitter) ); } /// @inheritdoc ITransmitManager function setTransmissionFees( uint256 nonce_, uint32 dstChainSlug_, uint128 transmissionFees_, bytes calldata signature_ ) external override { address feesUpdater = signatureVerifier__.recoverSigner( keccak256( abi.encode( FEES_UPDATE_SIG_IDENTIFIER, address(this), chainSlug, dstChainSlug_, nonce_, transmissionFees_ ) ), signature_ ); _checkRoleWithSlug(FEES_UPDATER_ROLE, dstChainSlug_, feesUpdater); // nonce is used by gated roles and we don't expect nonce to reach the max value of uint256 unchecked { if (nonce_ != nextNonce[feesUpdater]++) revert InvalidNonce(); } socket__.executionManager__().setTransmissionMinFees( dstChainSlug_, transmissionFees_ ); emit TransmissionFeesSet(dstChainSlug_, transmissionFees_); } /// @inheritdoc ITransmitManager function receiveFees(uint32) external payable override { if (msg.sender != address(socket__.executionManager__())) revert OnlyExecutionManager(); } /** * @notice withdraws fees from contract * @dev caller needs withdraw role * @param withdrawTo_ withdraw fees to */ function withdrawFees( address withdrawTo_ ) external onlyRole(WITHDRAW_ROLE) { if (withdrawTo_ == address(0)) revert ZeroAddress(); SafeTransferLib.safeTransferETH(withdrawTo_, address(this).balance); } /** * @notice updates signatureVerifier_ * @dev caller needs governance role * @param signatureVerifier_ address of Signature Verifier */ function setSignatureVerifier( address signatureVerifier_ ) external onlyRole(GOVERNANCE_ROLE) { signatureVerifier__ = ISignatureVerifier(signatureVerifier_); emit SignatureVerifierSet(signatureVerifier_); } /** * @notice Rescues funds from the contract if they are locked by mistake. * @param token_ The address of the token contract. * @param rescueTo_ The address where rescued tokens need to be sent. * @param amount_ The amount of tokens to be rescued. */ function rescueFunds( address token_, address rescueTo_, uint256 amount_ ) external onlyRole(RESCUE_ROLE) { RescueFundsLib.rescueFunds(token_, rescueTo_, amount_); } }
Compiler Settings
{"outputSelection":{"*":{"*":["*"]}},"optimizer":{"runs":999999,"enabled":true},"libraries":{}}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"owner_","internalType":"address"},{"type":"uint32","name":"chainSlug_","internalType":"uint32"},{"type":"address","name":"socket_","internalType":"contract ISocket"},{"type":"address","name":"signatureVerifier_","internalType":"contract ISignatureVerifier"}]},{"type":"error","name":"InvalidNonce","inputs":[]},{"type":"error","name":"InvalidTokenAddress","inputs":[]},{"type":"error","name":"NoPermit","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"error","name":"OnlyExecutionManager","inputs":[]},{"type":"error","name":"OnlyNominee","inputs":[]},{"type":"error","name":"OnlyOwner","inputs":[]},{"type":"error","name":"UnequalArrayLengths","inputs":[]},{"type":"error","name":"ZeroAddress","inputs":[]},{"type":"event","name":"OwnerClaimed","inputs":[{"type":"address","name":"claimer","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"OwnerNominated","inputs":[{"type":"address","name":"nominee","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleGranted","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"grantee","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RoleRevoked","inputs":[{"type":"bytes32","name":"role","internalType":"bytes32","indexed":true},{"type":"address","name":"revokee","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"SignatureVerifierSet","inputs":[{"type":"address","name":"signatureVerifier","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TransmissionFeesSet","inputs":[{"type":"uint256","name":"dstChainSlug","internalType":"uint256","indexed":false},{"type":"uint256","name":"transmissionFees","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"chainSlug","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"},{"type":"bool","name":"","internalType":"bool"}],"name":"checkTransmitter","inputs":[{"type":"uint32","name":"siblingSlug_","internalType":"uint32"},{"type":"bytes32","name":"digest_","internalType":"bytes32"},{"type":"bytes","name":"signature_","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claimOwner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantBatchRole","inputs":[{"type":"bytes32[]","name":"roleNames_","internalType":"bytes32[]"},{"type":"uint32[]","name":"slugs_","internalType":"uint32[]"},{"type":"address[]","name":"grantees_","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRole","inputs":[{"type":"bytes32","name":"role_","internalType":"bytes32"},{"type":"address","name":"grantee_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"grantRoleWithSlug","inputs":[{"type":"bytes32","name":"roleName_","internalType":"bytes32"},{"type":"uint32","name":"chainSlug_","internalType":"uint32"},{"type":"address","name":"grantee_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRole","inputs":[{"type":"bytes32","name":"role_","internalType":"bytes32"},{"type":"address","name":"address_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"hasRoleWithSlug","inputs":[{"type":"bytes32","name":"roleName_","internalType":"bytes32"},{"type":"uint32","name":"chainSlug_","internalType":"uint32"},{"type":"address","name":"address_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"nextNonce","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"nominateOwner","inputs":[{"type":"address","name":"nominee_","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"nominee","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"receiveFees","inputs":[{"type":"uint32","name":"","internalType":"uint32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"rescueFunds","inputs":[{"type":"address","name":"token_","internalType":"address"},{"type":"address","name":"rescueTo_","internalType":"address"},{"type":"uint256","name":"amount_","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeBatchRole","inputs":[{"type":"bytes32[]","name":"roleNames_","internalType":"bytes32[]"},{"type":"uint32[]","name":"slugs_","internalType":"uint32[]"},{"type":"address[]","name":"grantees_","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRole","inputs":[{"type":"bytes32","name":"role_","internalType":"bytes32"},{"type":"address","name":"revokee_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"revokeRoleWithSlug","inputs":[{"type":"bytes32","name":"roleName_","internalType":"bytes32"},{"type":"uint32","name":"chainSlug_","internalType":"uint32"},{"type":"address","name":"grantee_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSignatureVerifier","inputs":[{"type":"address","name":"signatureVerifier_","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTransmissionFees","inputs":[{"type":"uint256","name":"nonce_","internalType":"uint256"},{"type":"uint32","name":"dstChainSlug_","internalType":"uint32"},{"type":"uint128","name":"transmissionFees_","internalType":"uint128"},{"type":"bytes","name":"signature_","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISignatureVerifier"}],"name":"signatureVerifier__","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISocket"}],"name":"socket__","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawFees","inputs":[{"type":"address","name":"withdrawTo_","internalType":"address"}]}]
Contract Creation Code
0x60c06040523480156200001157600080fd5b5060405162001da738038062001da78339810160408190526200003491620000e4565b838080620000428162000078565b50505063ffffffff92909216608052600380546001600160a01b0319166001600160a01b039384161790551660a0525062000154565b600080546001600160a01b0383166001600160a01b0319918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b6001600160a01b0381168114620000e157600080fd5b50565b60008060008060808587031215620000fb57600080fd5b84516200010881620000cb565b602086015190945063ffffffff811681146200012357600080fd5b60408601519093506200013681620000cb565b60608601519092506200014981620000cb565b939692955090935050565b60805160a051611c186200018f6000396000818161045201528181610dbf0152610f800152600081816103bd0152610c3e0152611c186000f3fe6080604052600436106101755760003560e01c80637348746b116100cb578063b7ee4eb91161007f578063d5b8da7311610059578063d5b8da7314610494578063e08a6605146104c1578063ecb97484146104e157600080fd5b8063b7ee4eb9146103f4578063c6a261d214610440578063d547741f1461047457600080fd5b806391d14854116100b057806391d1485414610368578063a9a541b214610398578063b349ba65146103ab57600080fd5b80637348746b1461031d5780638da5cb5b1461033d57600080fd5b80632e7eb2581161012d57806343fa97ca1161010757806343fa97ca146102bd5780635b94db27146102dd5780636ccae054146102fd57600080fd5b80632e7eb258146102685780632f2ff15d146102885780633bd1adec146102a857600080fd5b80631ba8e4841161015e5780631ba8e484146101dc5780631e867311146101fc57806320f99c0a1461021c57600080fd5b80630cd55abf1461017a578063164e68de146101ba575b600080fd5b34801561018657600080fd5b506101a7610195366004611838565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b506101da6101d5366004611838565b610501565b005b3480156101e857600080fd5b506101da6101f736600461186e565b6105ee565b34801561020857600080fd5b506101da6102173660046118fa565b61064f565b34801561022857600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b34801561027457600080fd5b506101da61028336600461186e565b6107f5565b34801561029457600080fd5b506101da6102a3366004611994565b610851565b3480156102b457600080fd5b506101da6108ac565b3480156102c957600080fd5b506101da6102d83660046118fa565b610908565b3480156102e957600080fd5b506101da6102f8366004611838565b610aa4565b34801561030957600080fd5b506101da6103183660046119c4565b610b64565b34801561032957600080fd5b506101da610338366004611a47565b610c02565b34801561034957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610243565b34801561037457600080fd5b50610388610383366004611994565b610f43565b60405190151581526020016101b1565b6101da6103a6366004611acd565b610f7e565b3480156103b757600080fd5b506103df7f000000000000000000000000000000000000000000000000000000000000000081565b60405163ffffffff90911681526020016101b1565b34801561040057600080fd5b5061041461040f366004611ae8565b611073565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683529015156020830152016101b1565b34801561044c57600080fd5b506102437f000000000000000000000000000000000000000000000000000000000000000081565b34801561048057600080fd5b506101da61048f366004611994565b61114f565b3480156104a057600080fd5b506003546102439073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104cd57600080fd5b506101da6104dc366004611838565b6111aa565b3480156104ed57600080fd5b506103886104fc36600461186e565b6112b1565b3360009081527f9b7ec560033b826bc253a5f1a8b5e6a61c8d2a6e8731a9872b68296f6024c5ac60205260409020547f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec9060ff16610593576040517f962f6333000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166105e0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea82476112c6565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461063f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a83838361133b565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106a0576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84811415806106af5750848314155b156106e6576040517f11e86f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460005b818110156107eb57600086868381811061070657610706611b42565b905060200201602081019061071b9190611acd565b63ffffffff16111561079b5761079688888381811061073c5761073c611b42565b9050602002013587878481811061075557610755611b42565b905060200201602081019061076a9190611acd565b86868581811061077c5761077c611b42565b90506020020160208101906107919190611838565b61133b565b6107e3565b6107e38888838181106107b0576107b0611b42565b905060200201358585848181106107c9576107c9611b42565b90506020020160208101906107de9190611838565b611378565b6001016106ea565b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610846576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a8383836113fb565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a2576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea8282611438565b60015473ffffffffffffffffffffffffffffffffffffffff1633146108fd576040517f7c91ccdd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610906336114be565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610959576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84811415806109685750848314155b1561099f576040517f11e86f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460005b818110156107eb5760008686838181106109bf576109bf611b42565b90506020020160208101906109d49190611acd565b63ffffffff161115610a5457610a4f8888838181106109f5576109f5611b42565b90506020020135878784818110610a0e57610a0e611b42565b9050602002016020810190610a239190611acd565b868685818110610a3557610a35611b42565b9050602002016020810190610a4a9190611838565b6113fb565b610a9c565b610a9c888883818110610a6957610a69611b42565b90506020020135858584818110610a8257610a82611b42565b9050602002016020810190610a979190611838565b611438565b6001016109a3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610af5576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b3360009081527f4933f7bec34ee32db93e9f5cd7e0519781b395282211f4f6857489046ea38f7660205260409020547fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f292539060ff16610bf1576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b610bfc848484611536565b50505050565b600354604080517ff2deac1744cfd52ddfce21c5ff26abf413f6418dc4a35916e26daefd87e04ab66020820152309181019190915263ffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660608301528616608082015260a081018790526fffffffffffffffffffffffffffffffff851660c082015260009173ffffffffffffffffffffffffffffffffffffffff16906397aba7f99060e0016040516020818303038152906040528051906020012085856040518463ffffffff1660e01b8152600401610ce393929190611b71565b602060405180830381865afa158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d249190611bc5565b9050610d577f429672025b2dcb8754ca4b57943f34ac66900598787cb1f1e857291dedbf34d38663ffffffff1683611626565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090208054600181019091558614610dbd576040517f756688fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16626186f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190611bc5565b6040517f3b13d3f100000000000000000000000000000000000000000000000000000000815263ffffffff871660048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff9190911690633b13d3f190604401600060405180830381600087803b158015610ed257600080fd5b505af1158015610ee6573d6000803e3d6000fd5b50506040805163ffffffff891681526fffffffffffffffffffffffffffffffff881660208201527f0c554cd460714597ac16fee554411cb5345edd9c8e3a07d8e6fbcb513bbe9bae935001905060405180910390a1505050505050565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff165b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16626186f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fe8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100c9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611070576040517f03c377c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6003546040517f97aba7f90000000000000000000000000000000000000000000000000000000081526000918291829173ffffffffffffffffffffffffffffffffffffffff16906397aba7f9906110d290899089908990600401611b71565b602060405180830381865afa1580156110ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111139190611bc5565b9050806111417fd6a0f92c822ccba0fa91b30f08f085e68bc8eb3bb140aa16f8dc33ea47eb6cf289846116b9565b925092505094509492505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111a0576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea8282611378565b3360009081527f0f4a237b7f9e071a612ddea08a06576f25cc7dffe13a46307ee64fe2318b3c3e60205260409020547f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb19060ff16611237576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040519081527fcb341def955dbf73920141be056568edde30b1dbc56a29396945e5596a03c68c9060200160405180910390a15050565b60006112be8484846116b9565b949350505050565b600080600080600085875af190508061064a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015260640161058a565b61064a838360405160200161136092919091825263ffffffff16602082015260400190565b60405160208183030381529060405280519060200120825b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b61064a838360405160200161142092919091825263ffffffff16602082015260400190565b60405160208183030381529060405280519060200120825b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b73ffffffffffffffffffffffffffffffffffffffff8216611583576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8416016115ca5761064a82826112c6565b8273ffffffffffffffffffffffffffffffffffffffff163b60000361161b576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a838383611747565b6040805160208082018690528183018590528251808303840181526060909201835281519181019190912060008181526002835283812073ffffffffffffffffffffffffffffffffffffffff861682529092529190205460ff16610bfc576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b60006112be84846040516020016116e092919091825263ffffffff16602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009081526002835281812073ffffffffffffffffffffffffffffffffffffffff8716825290925290205460ff1690565b60006040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152826024820152602060006044836000895af13d15601f3d1160016000511416171691505080610bfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015260640161058a565b73ffffffffffffffffffffffffffffffffffffffff8116811461107057600080fd5b60006020828403121561184a57600080fd5b8135610f7781611816565b803563ffffffff8116811461186957600080fd5b919050565b60008060006060848603121561188357600080fd5b8335925061189360208501611855565b915060408401356118a381611816565b809150509250925092565b60008083601f8401126118c057600080fd5b50813567ffffffffffffffff8111156118d857600080fd5b6020830191508360208260051b85010111156118f357600080fd5b9250929050565b6000806000806000806060878903121561191357600080fd5b863567ffffffffffffffff8082111561192b57600080fd5b6119378a838b016118ae565b9098509650602089013591508082111561195057600080fd5b61195c8a838b016118ae565b9096509450604089013591508082111561197557600080fd5b5061198289828a016118ae565b979a9699509497509295939492505050565b600080604083850312156119a757600080fd5b8235915060208301356119b981611816565b809150509250929050565b6000806000606084860312156119d957600080fd5b83356119e481611816565b925060208401356119f481611816565b929592945050506040919091013590565b60008083601f840112611a1757600080fd5b50813567ffffffffffffffff811115611a2f57600080fd5b6020830191508360208285010111156118f357600080fd5b600080600080600060808688031215611a5f57600080fd5b85359450611a6f60208701611855565b935060408601356fffffffffffffffffffffffffffffffff81168114611a9457600080fd5b9250606086013567ffffffffffffffff811115611ab057600080fd5b611abc88828901611a05565b969995985093965092949392505050565b600060208284031215611adf57600080fd5b610f7782611855565b60008060008060608587031215611afe57600080fd5b611b0785611855565b935060208501359250604085013567ffffffffffffffff811115611b2a57600080fd5b611b3687828801611a05565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b83815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b600060208284031215611bd757600080fd5b8151610f778161181656fea264697066735822122034ad4a76099e241756bf14846c6f4a52bf22640169d3d8ca8e3458ff6d9b0dda64736f6c6343000813003300000000000000000000000044a44837894b5edc2bde64567fc62599b3b88f4c0000000000000000000000000000000000000000000000000000000000028c610000000000000000000000005c4186d343eef952c9ed886e45f8243edf0a503f000000000000000000000000ef1ae2f8b4e18afdddf1ca92037772891100a39f
Deployed ByteCode
0x6080604052600436106101755760003560e01c80637348746b116100cb578063b7ee4eb91161007f578063d5b8da7311610059578063d5b8da7314610494578063e08a6605146104c1578063ecb97484146104e157600080fd5b8063b7ee4eb9146103f4578063c6a261d214610440578063d547741f1461047457600080fd5b806391d14854116100b057806391d1485414610368578063a9a541b214610398578063b349ba65146103ab57600080fd5b80637348746b1461031d5780638da5cb5b1461033d57600080fd5b80632e7eb2581161012d57806343fa97ca1161010757806343fa97ca146102bd5780635b94db27146102dd5780636ccae054146102fd57600080fd5b80632e7eb258146102685780632f2ff15d146102885780633bd1adec146102a857600080fd5b80631ba8e4841161015e5780631ba8e484146101dc5780631e867311146101fc57806320f99c0a1461021c57600080fd5b80630cd55abf1461017a578063164e68de146101ba575b600080fd5b34801561018657600080fd5b506101a7610195366004611838565b60046020526000908152604090205481565b6040519081526020015b60405180910390f35b3480156101c657600080fd5b506101da6101d5366004611838565b610501565b005b3480156101e857600080fd5b506101da6101f736600461186e565b6105ee565b34801561020857600080fd5b506101da6102173660046118fa565b61064f565b34801561022857600080fd5b5060015473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016101b1565b34801561027457600080fd5b506101da61028336600461186e565b6107f5565b34801561029457600080fd5b506101da6102a3366004611994565b610851565b3480156102b457600080fd5b506101da6108ac565b3480156102c957600080fd5b506101da6102d83660046118fa565b610908565b3480156102e957600080fd5b506101da6102f8366004611838565b610aa4565b34801561030957600080fd5b506101da6103183660046119c4565b610b64565b34801561032957600080fd5b506101da610338366004611a47565b610c02565b34801561034957600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610243565b34801561037457600080fd5b50610388610383366004611994565b610f43565b60405190151581526020016101b1565b6101da6103a6366004611acd565b610f7e565b3480156103b757600080fd5b506103df7f0000000000000000000000000000000000000000000000000000000000028c6181565b60405163ffffffff90911681526020016101b1565b34801561040057600080fd5b5061041461040f366004611ae8565b611073565b6040805173ffffffffffffffffffffffffffffffffffffffff90931683529015156020830152016101b1565b34801561044c57600080fd5b506102437f0000000000000000000000005c4186d343eef952c9ed886e45f8243edf0a503f81565b34801561048057600080fd5b506101da61048f366004611994565b61114f565b3480156104a057600080fd5b506003546102439073ffffffffffffffffffffffffffffffffffffffff1681565b3480156104cd57600080fd5b506101da6104dc366004611838565b6111aa565b3480156104ed57600080fd5b506103886104fc36600461186e565b6112b1565b3360009081527f9b7ec560033b826bc253a5f1a8b5e6a61c8d2a6e8731a9872b68296f6024c5ac60205260409020547f5d8e12c39142ff96d79d04d15d1ba1269e4fe57bb9d26f43523628b34ba108ec9060ff16610593576040517f962f6333000000000000000000000000000000000000000000000000000000008152600481018290526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff82166105e0576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea82476112c6565b5050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461063f576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a83838361133b565b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106a0576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84811415806106af5750848314155b156106e6576040517f11e86f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460005b818110156107eb57600086868381811061070657610706611b42565b905060200201602081019061071b9190611acd565b63ffffffff16111561079b5761079688888381811061073c5761073c611b42565b9050602002013587878481811061075557610755611b42565b905060200201602081019061076a9190611acd565b86868581811061077c5761077c611b42565b90506020020160208101906107919190611838565b61133b565b6107e3565b6107e38888838181106107b0576107b0611b42565b905060200201358585848181106107c9576107c9611b42565b90506020020160208101906107de9190611838565b611378565b6001016106ea565b5050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610846576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a8383836113fb565b60005473ffffffffffffffffffffffffffffffffffffffff1633146108a2576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea8282611438565b60015473ffffffffffffffffffffffffffffffffffffffff1633146108fd576040517f7c91ccdd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610906336114be565b565b60005473ffffffffffffffffffffffffffffffffffffffff163314610959576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84811415806109685750848314155b1561099f576040517f11e86f7300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8460005b818110156107eb5760008686838181106109bf576109bf611b42565b90506020020160208101906109d49190611acd565b63ffffffff161115610a5457610a4f8888838181106109f5576109f5611b42565b90506020020135878784818110610a0e57610a0e611b42565b9050602002016020810190610a239190611acd565b868685818110610a3557610a35611b42565b9050602002016020810190610a4a9190611838565b6113fb565b610a9c565b610a9c888883818110610a6957610a69611b42565b90506020020135858584818110610a8257610a82611b42565b9050602002016020810190610a979190611838565b611438565b6001016109a3565b60005473ffffffffffffffffffffffffffffffffffffffff163314610af5576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081179091556040517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce2290600090a250565b3360009081527f4933f7bec34ee32db93e9f5cd7e0519781b395282211f4f6857489046ea38f7660205260409020547fc4c453d647953c0fd35db5a34ee76e60fb4abc3a8fb891a25936b70b38f292539060ff16610bf1576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b610bfc848484611536565b50505050565b600354604080517ff2deac1744cfd52ddfce21c5ff26abf413f6418dc4a35916e26daefd87e04ab66020820152309181019190915263ffffffff7f0000000000000000000000000000000000000000000000000000000000028c61811660608301528616608082015260a081018790526fffffffffffffffffffffffffffffffff851660c082015260009173ffffffffffffffffffffffffffffffffffffffff16906397aba7f99060e0016040516020818303038152906040528051906020012085856040518463ffffffff1660e01b8152600401610ce393929190611b71565b602060405180830381865afa158015610d00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d249190611bc5565b9050610d577f429672025b2dcb8754ca4b57943f34ac66900598787cb1f1e857291dedbf34d38663ffffffff1683611626565b73ffffffffffffffffffffffffffffffffffffffff811660009081526004602052604090208054600181019091558614610dbd576040517f756688fe00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f0000000000000000000000005c4186d343eef952c9ed886e45f8243edf0a503f73ffffffffffffffffffffffffffffffffffffffff16626186f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4b9190611bc5565b6040517f3b13d3f100000000000000000000000000000000000000000000000000000000815263ffffffff871660048201526fffffffffffffffffffffffffffffffff8616602482015273ffffffffffffffffffffffffffffffffffffffff9190911690633b13d3f190604401600060405180830381600087803b158015610ed257600080fd5b505af1158015610ee6573d6000803e3d6000fd5b50506040805163ffffffff891681526fffffffffffffffffffffffffffffffff881660208201527f0c554cd460714597ac16fee554411cb5345edd9c8e3a07d8e6fbcb513bbe9bae935001905060405180910390a1505050505050565b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516845290915281205460ff165b9392505050565b7f0000000000000000000000005c4186d343eef952c9ed886e45f8243edf0a503f73ffffffffffffffffffffffffffffffffffffffff16626186f76040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fe8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100c9190611bc5565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611070576040517f03c377c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50565b6003546040517f97aba7f90000000000000000000000000000000000000000000000000000000081526000918291829173ffffffffffffffffffffffffffffffffffffffff16906397aba7f9906110d290899089908990600401611b71565b602060405180830381865afa1580156110ef573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111139190611bc5565b9050806111417fd6a0f92c822ccba0fa91b30f08f085e68bc8eb3bb140aa16f8dc33ea47eb6cf289846116b9565b925092505094509492505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146111a0576040517f5fc483c500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105ea8282611378565b3360009081527f0f4a237b7f9e071a612ddea08a06576f25cc7dffe13a46307ee64fe2318b3c3e60205260409020547f71840dc4906352362b0cdaf79870196c8e42acafade72d5d5a6d59291253ceb19060ff16611237576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b600380547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff84169081179091556040519081527fcb341def955dbf73920141be056568edde30b1dbc56a29396945e5596a03c68c9060200160405180910390a15050565b60006112be8484846116b9565b949350505050565b600080600080600085875af190508061064a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f4554485f5452414e534645525f4641494c454400000000000000000000000000604482015260640161058a565b61064a838360405160200161136092919091825263ffffffff16602082015260400190565b60405160208183030381529060405280519060200120825b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905551909184917f155aaafb6329a2098580462df33ec4b7441b19729b9601c5fc17ae1cf99a8a529190a35050565b61064a838360405160200161142092919091825263ffffffff16602082015260400190565b60405160208183030381529060405280519060200120825b600082815260026020908152604080832073ffffffffffffffffffffffffffffffffffffffff8516808552925280832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905551909184917f2ae6a113c0ed5b78a53413ffbb7679881f11145ccfba4fb92e863dfcd5a1d2f39190a35050565b6000805473ffffffffffffffffffffffffffffffffffffffff83167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216811783556001805490921690915560405190917ffbe19c9b601f5ee90b44c7390f3fa2319eba01762d34ee372aeafd59b25c7f8791a250565b73ffffffffffffffffffffffffffffffffffffffff8216611583576040517fd92e233d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8416016115ca5761064a82826112c6565b8273ffffffffffffffffffffffffffffffffffffffff163b60000361161b576040517f1eb00b0600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61064a838383611747565b6040805160208082018690528183018590528251808303840181526060909201835281519181019190912060008181526002835283812073ffffffffffffffffffffffffffffffffffffffff861682529092529190205460ff16610bfc576040517f962f63330000000000000000000000000000000000000000000000000000000081526004810182905260240161058a565b60006112be84846040516020016116e092919091825263ffffffff16602082015260400190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0818403018152918152815160209283012060009081526002835281812073ffffffffffffffffffffffffffffffffffffffff8716825290925290205460ff1690565b60006040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152826024820152602060006044836000895af13d15601f3d1160016000511416171691505080610bfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f5452414e534645525f4641494c45440000000000000000000000000000000000604482015260640161058a565b73ffffffffffffffffffffffffffffffffffffffff8116811461107057600080fd5b60006020828403121561184a57600080fd5b8135610f7781611816565b803563ffffffff8116811461186957600080fd5b919050565b60008060006060848603121561188357600080fd5b8335925061189360208501611855565b915060408401356118a381611816565b809150509250925092565b60008083601f8401126118c057600080fd5b50813567ffffffffffffffff8111156118d857600080fd5b6020830191508360208260051b85010111156118f357600080fd5b9250929050565b6000806000806000806060878903121561191357600080fd5b863567ffffffffffffffff8082111561192b57600080fd5b6119378a838b016118ae565b9098509650602089013591508082111561195057600080fd5b61195c8a838b016118ae565b9096509450604089013591508082111561197557600080fd5b5061198289828a016118ae565b979a9699509497509295939492505050565b600080604083850312156119a757600080fd5b8235915060208301356119b981611816565b809150509250929050565b6000806000606084860312156119d957600080fd5b83356119e481611816565b925060208401356119f481611816565b929592945050506040919091013590565b60008083601f840112611a1757600080fd5b50813567ffffffffffffffff811115611a2f57600080fd5b6020830191508360208285010111156118f357600080fd5b600080600080600060808688031215611a5f57600080fd5b85359450611a6f60208701611855565b935060408601356fffffffffffffffffffffffffffffffff81168114611a9457600080fd5b9250606086013567ffffffffffffffff811115611ab057600080fd5b611abc88828901611a05565b969995985093965092949392505050565b600060208284031215611adf57600080fd5b610f7782611855565b60008060008060608587031215611afe57600080fd5b611b0785611855565b935060208501359250604085013567ffffffffffffffff811115611b2a57600080fd5b611b3687828801611a05565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b83815260406020820152816040820152818360608301376000818301606090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016010192915050565b600060208284031215611bd757600080fd5b8151610f778161181656fea264697066735822122034ad4a76099e241756bf14846c6f4a52bf22640169d3d8ca8e3458ff6d9b0dda64736f6c63430008130033