Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
- Contract name:
- LayerswapV8
- Optimization enabled
- true
- Compiler version
- v0.8.23+commit.f704f362
- Optimization runs
- 200
- EVM Version
- paris
- Verified at
- 2024-10-07T12:30:07.518812Z
contracts/HashedTimeLockEther.sol
/* _ __ _____ | | __ _ _ _ ___ _ __ _____ ____ _ _ __ \ \ / ( _ ) | | / _` | | | |/ _ \ '__/ __\ \ /\ / / _` | '_ \ \ \ / // _ \ | |__| (_| | |_| | __/ | \__ \\ V V / (_| | |_) | \ V /| (_) | |_____\__,_|\__, |\___|_| |___/ \_/\_/ \__,_| .__/ \_/ \___/ |___/ |_| */ // SPDX-License-Identifier: MIT pragma solidity 0.8.23; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import '@openzeppelin/contracts/utils/Address.sol'; // Domain separator ensures signatures are unique to this contract and chain, preventing replay attacks. struct EIP712Domain { string name; string version; uint256 chainId; address verifyingContract; bytes32 salt; } contract LayerswapV8 { using ECDSA for bytes32; using Address for address; bytes32 private DOMAIN_SEPARATOR; bytes32 private constant SALT = keccak256(abi.encodePacked('Layerswap V8')); constructor() { DOMAIN_SEPARATOR = hashDomain( EIP712Domain({ name: 'LayerswapV8', version: '1', chainId: block.chainid, verifyingContract: address(this), salt: SALT }) ); } error FundsNotSent(); error NotFutureTimelock(); error NotPassedTimelock(); error LockAlreadyExists(); error HTLCAlreadyExists(); error HTLCNotExists(); error HashlockNotMatch(); error AlreadyRedeemed(); error AlreadyRefunded(); error AlreadyLocked(); error NoAllowance(); error InvalidSigniture(); error HashlockAlreadySet(); // Structure for storing swap-related data struct HTLC { string dstAddress; string dstChain; string dstAsset; string srcAsset; address payable sender; address payable srcReceiver; bytes32 hashlock; uint256 timelock; uint256 amount; uint256 secret; bool redeemed; bool refunded; } struct addLockMsg { bytes32 Id; bytes32 hashlock; uint256 timelock; } event TokenCommitted( bytes32 indexed Id, string[] hopChains, string[] hopAssets, string[] hopAddresses, string dstChain, string dstAddress, string dstAsset, address indexed sender, address indexed srcReceiver, string srcAsset, uint256 amount, uint256 timelock ); event TokenLocked( bytes32 indexed Id, bytes32 hashlock, string dstChain, string dstAddress, string dstAsset, address indexed sender, address indexed srcReceiver, string srcAsset, uint256 amount, uint256 timelock ); event TokenLockAdded(bytes32 indexed Id, bytes32 hashlock, uint256 timelock); event TokenRefunded(bytes32 indexed Id); event TokenRedeemed(bytes32 indexed Id, address redeemAddress); event LowLevelErrorOccurred(bytes lowLevelData); modifier _exists(bytes32 Id) { if (!hasHTLC(Id)) revert HTLCNotExists(); _; } mapping(bytes32 => HTLC) contracts; bytes32[] contractIds; uint256 blockHashAsUint = uint256(blockhash(block.number - 1)); uint256 contractNonce = 0; function commit( string[] memory hopChains, string[] memory hopAssets, string[] memory hopAddresses, string memory dstChain, string memory dstAsset, string memory dstAddress, string memory srcAsset, address srcReceiver, uint256 timelock ) external payable returns (bytes32 Id) { if (msg.value == 0) { revert FundsNotSent(); } if (timelock <= block.timestamp) { revert NotFutureTimelock(); } contractNonce += 1; Id = bytes32(blockHashAsUint ^ contractNonce); //Remove this check; the ID is guaranteed to be unique. if (hasHTLC(Id)) { revert HTLCAlreadyExists(); } contractIds.push(Id); contracts[Id] = HTLC( dstAddress, dstChain, dstAsset, srcAsset, payable(msg.sender), payable(srcReceiver), bytes32(0), timelock, msg.value, uint256(0), false, false ); emit TokenCommitted( Id, hopChains, hopAssets, hopAddresses, dstChain, dstAddress, dstAsset, msg.sender, srcReceiver, srcAsset, msg.value, timelock ); } function refund(bytes32 Id) external _exists(Id) returns (bool) { HTLC storage htlc = contracts[Id]; if (htlc.refunded) revert AlreadyRefunded(); if (htlc.redeemed) revert AlreadyRedeemed(); if (htlc.timelock > block.timestamp) revert NotPassedTimelock(); htlc.refunded = true; (bool success, ) = htlc.sender.call{ value: htlc.amount }(''); require(success, 'Transfer failed'); emit TokenRefunded(Id); return true; } function addLock(bytes32 Id, bytes32 hashlock, uint256 timelock) external _exists(Id) returns (bytes32) { HTLC storage htlc = contracts[Id]; if (htlc.refunded == true) { revert AlreadyRefunded(); } if (timelock <= block.timestamp) { revert NotFutureTimelock(); } if (msg.sender == htlc.sender || msg.sender == address(this)) { if (htlc.hashlock == 0) { htlc.hashlock = hashlock; htlc.timelock = timelock; } else { revert HashlockAlreadySet(); } emit TokenLockAdded(Id, hashlock, timelock); return Id; } else { revert NoAllowance(); } } function addLockSig(addLockMsg memory message, uint8 v, bytes32 r, bytes32 s) external returns (bytes32) { if (verifyMessage(message, v, r, s)) { return this.addLock(message.Id, message.hashlock, message.timelock); } else { revert InvalidSigniture(); } } function lock( bytes32 Id, bytes32 hashlock, uint256 timelock, address payable srcReceiver, string memory srcAsset, string memory dstChain, string memory dstAddress, string memory dstAsset ) external payable returns (bytes32) { if (msg.value == 0) { revert FundsNotSent(); } if (timelock <= block.timestamp) { revert NotFutureTimelock(); } if (hasHTLC(Id)) { revert HTLCAlreadyExists(); } contracts[Id] = HTLC( dstAddress, dstChain, dstAsset, srcAsset, payable(msg.sender), srcReceiver, hashlock, timelock, msg.value, uint256(0), false, false ); contractIds.push(Id); emit TokenLocked( Id, hashlock, dstChain, dstAddress, dstAsset, msg.sender, srcReceiver, srcAsset, msg.value, timelock ); return Id; } function redeem(bytes32 Id, uint256 secret) external _exists(Id) returns (bool) { HTLC storage htlc = contracts[Id]; if (htlc.hashlock != sha256(abi.encodePacked(secret))) revert HashlockNotMatch(); if (htlc.refunded) revert AlreadyRefunded(); if (htlc.redeemed) revert AlreadyRedeemed(); htlc.secret = secret; htlc.redeemed = true; (bool success, ) = htlc.srcReceiver.call{ value: htlc.amount }(''); require(success, 'Transfer failed'); emit TokenRedeemed(Id, msg.sender); return true; } function getDetails(bytes32 Id) public view returns (HTLC memory) { return contracts[Id]; } function getContracts(address senderAddr) public view returns (bytes32[] memory) { uint256 count = 0; for (uint256 i = 0; i < contractIds.length; i++) { HTLC memory htlc = contracts[contractIds[i]]; if (htlc.sender == senderAddr) { count++; } } bytes32[] memory result = new bytes32[](count); uint256 j = 0; for (uint256 i = 0; i < contractIds.length; i++) { if (contracts[contractIds[i]].sender == senderAddr) { result[j] = contractIds[i]; j++; } } return result; } function hashDomain(EIP712Domain memory domain) private pure returns (bytes32) { return keccak256( abi.encode( keccak256('EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)'), keccak256(bytes(domain.name)), keccak256(bytes(domain.version)), domain.chainId, domain.verifyingContract, domain.salt ) ); } // Hashes an EIP712 message struct function hashMessage(addLockMsg memory message) private pure returns (bytes32) { return keccak256( abi.encode( keccak256('addLockMsg(bytes32 Id,bytes32 hashlock,uint256 timelock)'), message.Id, message.hashlock, message.timelock ) ); } // Verifies an EIP712 message signature function verifyMessage(addLockMsg memory message, uint8 v, bytes32 r, bytes32 s) private view returns (bool) { bytes32 digest = keccak256(abi.encodePacked('\x19\x01', DOMAIN_SEPARATOR, hashMessage(message))); address recoveredAddress = ecrecover(digest, v, r, s); return (recoveredAddress == contracts[message.Id].sender); } function hasHTLC(bytes32 Id) internal view returns (bool exists) { exists = (contracts[Id].sender != address(0)); } }
@openzeppelin/contracts/utils/Address.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } }
@openzeppelin/contracts/utils/cryptography/ECDSA.sol
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.20; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } }
Compiler Settings
{"viaIR":true,"outputSelection":{"*":{"*":["abi","evm.bytecode","evm.deployedBytecode","evm.methodIdentifiers","metadata"],"":["ast"]}},"optimizer":{"runs":200,"enabled":true},"libraries":{},"evmVersion":"paris"}
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AlreadyLocked","inputs":[]},{"type":"error","name":"AlreadyRedeemed","inputs":[]},{"type":"error","name":"AlreadyRefunded","inputs":[]},{"type":"error","name":"FundsNotSent","inputs":[]},{"type":"error","name":"HTLCAlreadyExists","inputs":[]},{"type":"error","name":"HTLCNotExists","inputs":[]},{"type":"error","name":"HashlockAlreadySet","inputs":[]},{"type":"error","name":"HashlockNotMatch","inputs":[]},{"type":"error","name":"InvalidSigniture","inputs":[]},{"type":"error","name":"LockAlreadyExists","inputs":[]},{"type":"error","name":"NoAllowance","inputs":[]},{"type":"error","name":"NotFutureTimelock","inputs":[]},{"type":"error","name":"NotPassedTimelock","inputs":[]},{"type":"event","name":"LowLevelErrorOccurred","inputs":[{"type":"bytes","name":"lowLevelData","internalType":"bytes","indexed":false}],"anonymous":false},{"type":"event","name":"TokenCommitted","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32","indexed":true},{"type":"string[]","name":"hopChains","internalType":"string[]","indexed":false},{"type":"string[]","name":"hopAssets","internalType":"string[]","indexed":false},{"type":"string[]","name":"hopAddresses","internalType":"string[]","indexed":false},{"type":"string","name":"dstChain","internalType":"string","indexed":false},{"type":"string","name":"dstAddress","internalType":"string","indexed":false},{"type":"string","name":"dstAsset","internalType":"string","indexed":false},{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"srcReceiver","internalType":"address","indexed":true},{"type":"string","name":"srcAsset","internalType":"string","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"timelock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenLockAdded","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"hashlock","internalType":"bytes32","indexed":false},{"type":"uint256","name":"timelock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenLocked","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32","indexed":true},{"type":"bytes32","name":"hashlock","internalType":"bytes32","indexed":false},{"type":"string","name":"dstChain","internalType":"string","indexed":false},{"type":"string","name":"dstAddress","internalType":"string","indexed":false},{"type":"string","name":"dstAsset","internalType":"string","indexed":false},{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"address","name":"srcReceiver","internalType":"address","indexed":true},{"type":"string","name":"srcAsset","internalType":"string","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false},{"type":"uint256","name":"timelock","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"TokenRedeemed","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32","indexed":true},{"type":"address","name":"redeemAddress","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"TokenRefunded","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32","indexed":true}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"addLock","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"},{"type":"bytes32","name":"hashlock","internalType":"bytes32"},{"type":"uint256","name":"timelock","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"addLockSig","inputs":[{"type":"tuple","name":"message","internalType":"struct LayerswapV8.addLockMsg","components":[{"type":"bytes32","name":"Id","internalType":"bytes32"},{"type":"bytes32","name":"hashlock","internalType":"bytes32"},{"type":"uint256","name":"timelock","internalType":"uint256"}]},{"type":"uint8","name":"v","internalType":"uint8"},{"type":"bytes32","name":"r","internalType":"bytes32"},{"type":"bytes32","name":"s","internalType":"bytes32"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"}],"name":"commit","inputs":[{"type":"string[]","name":"hopChains","internalType":"string[]"},{"type":"string[]","name":"hopAssets","internalType":"string[]"},{"type":"string[]","name":"hopAddresses","internalType":"string[]"},{"type":"string","name":"dstChain","internalType":"string"},{"type":"string","name":"dstAsset","internalType":"string"},{"type":"string","name":"dstAddress","internalType":"string"},{"type":"string","name":"srcAsset","internalType":"string"},{"type":"address","name":"srcReceiver","internalType":"address"},{"type":"uint256","name":"timelock","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32[]","name":"","internalType":"bytes32[]"}],"name":"getContracts","inputs":[{"type":"address","name":"senderAddr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct LayerswapV8.HTLC","components":[{"type":"string","name":"dstAddress","internalType":"string"},{"type":"string","name":"dstChain","internalType":"string"},{"type":"string","name":"dstAsset","internalType":"string"},{"type":"string","name":"srcAsset","internalType":"string"},{"type":"address","name":"sender","internalType":"address payable"},{"type":"address","name":"srcReceiver","internalType":"address payable"},{"type":"bytes32","name":"hashlock","internalType":"bytes32"},{"type":"uint256","name":"timelock","internalType":"uint256"},{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"secret","internalType":"uint256"},{"type":"bool","name":"redeemed","internalType":"bool"},{"type":"bool","name":"refunded","internalType":"bool"}]}],"name":"getDetails","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"lock","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"},{"type":"bytes32","name":"hashlock","internalType":"bytes32"},{"type":"uint256","name":"timelock","internalType":"uint256"},{"type":"address","name":"srcReceiver","internalType":"address payable"},{"type":"string","name":"srcAsset","internalType":"string"},{"type":"string","name":"dstChain","internalType":"string"},{"type":"string","name":"dstAddress","internalType":"string"},{"type":"string","name":"dstAsset","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"redeem","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"},{"type":"uint256","name":"secret","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"refund","inputs":[{"type":"bytes32","name":"Id","internalType":"bytes32"}]}]
Contract Creation Code
0x608060409080825234620001835760001943014381116200016d57406003556000908160045560208101906b098c2f2cae4e6eec2e040ac760a31b8252600c81526200004b8162000188565b51902082516001600160401b039390919060a083018581118482101762000159578082526200007a8162000188565b600b81526a098c2f2cae4e6eec2e0ac760ab1b60c08501528352805192620000a28462000188565b600184526020840190603160f81b825284602082015246838201523060608201528360808201525160208151910120935190209181519260208401947fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac5647286528385015260608401524660808401523060a084015260c083015260c0825260e08201948286109086111762000145578490525190209055611de89081620001bb8239f35b634e487b7160e01b84526041600452602484fd5b634e487b7160e01b85526041600452602485fd5b634e487b7160e01b600052601160045260246000fd5b600080fd5b604081019081106001600160401b03821117620001a457604052565b634e487b7160e01b600052604160045260246000fdfe60a0604052600436101561001257600080fd5b60003560e01c8063213fe2b71461154f578063673da1541461140c5780637249fbb6146112ff57806375ad1881146112a5578063984bc7001461109b5780639ced67bb14610887578063beeaa615146108135763d701abd81461007457600080fd5b61010036600319011261080e576064356001600160a01b038116810361080e576084356001600160401b03811161080e576100b3903690600401611828565b60a4356001600160401b03811161080e576100d2903690600401611828565b9060c4356001600160401b03811161080e576100f2903690600401611828565b60e4356001600160401b03811161080e57610111903690600401611828565b9034156107fc574260443511156107ea5760048035600090815260016020526040902001546001600160a01b03166107d85760405161014f816117b9565b81815284602082015282604082015283606082015233608082015260018060a01b03861660a082015260243560c082015260443560e0820152346101008201526000610120820152600061014082015260006101608201526004356000526001602052604060002081518051906001600160401b03821161055b5781906101d68454611925565b601f8111610788575b50602090601f831160011461071c57600092610711575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161055b5781906102306001850154611925565b601f81116106be575b50602090601f831160011461064c57600092610641575b50508160011b916000199060031b1c19161760018201555b60408201518051906001600160401b03821161055b57819061028d6002850154611925565b601f81116105ee575b50602090601f831160011461057c57600092610571575b50508160011b916000199060031b1c19161760028201555b60608201518051906001600160401b03821161055b576102e86003840154611925565b601f8111610510575b50602090601f831160011461048a5793610160600a610414958561042299966103de966104309d9c9a60009261047f575b50508160011b916000199060031b1c19161760038201555b6004810160018060a01b03608086015116906bffffffffffffffffffffffff60a01b9182825416179055600582019060018060a01b0360a0870151169082541617905560c0840151600682015560e084015160078201556101008401516008820155610120840151600982015501916103c66101408201511515849060ff801983541691151516179055565b0151815461ff00191690151560081b61ff0016179055565b6103e9600435611b5d565b61040660405197602435895260e060208a015260e0890190611794565b908782036040890152611794565b908582036060870152611794565b908382036080850152611794565b913460a083015260443560c083015260018060a01b0316917f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4339280600435930390a460206040516004358152f35b015190503880610322565b906003840160005260206000209160005b601f19851681106104f85750600a610414956001866103de966104309d9c9a96610160966104229d9a601f198116106104df575b505050811b01600382015561033a565b015160001960f88460031b161c191690553880806104cf565b9192602060018192868501518155019401920161049b565b600384016000526020600020601f840160051c81019160208510610551575b601f0160051c01905b81811061054557506102f1565b60008155600101610538565b909150819061052f565b634e487b7160e01b600052604160045260246000fd5b0151905038806102ad565b9250600284016000526020600020906000935b601f19841685106105d3576001945083601f198116106105ba575b505050811b0160028201556102c5565b015160001960f88460031b161c191690553880806105aa565b8181015183556020948501946001909301929091019061058f565b909150600284016000526020600020601f840160051c81016020851061063a575b90849392915b601f830160051c8201811061062b575050610296565b60008155859450600101610615565b508061060f565b015190503880610250565b9250600184016000526020600020906000935b601f19841685106106a3576001945083601f1981161061068a575b505050811b016001820155610268565b015160001960f88460031b161c1916905538808061067a565b8181015183556020948501946001909301929091019061065f565b909150600184016000526020600020601f840160051c81016020851061070a575b90849392915b601f830160051c820181106106fb575050610239565b600081558594506001016106e5565b50806106df565b0151905038806101f6565b9250836000526020600020906000935b601f198416851061076d576001945083601f19811610610754575b505050811b01815561020b565b015160001960f88460031b161c19169055388080610747565b8181015183556020948501946001909301929091019061072c565b909150836000526020600020601f840160051c8101602085106107d1575b90849392915b601f830160051c820181106107c25750506101df565b600081558594506001016107ac565b50806107a6565b604051630ed8e66b60e21b8152600490fd5b604051633dd8280960e21b8152600490fd5b604051636f8ab38d60e11b8152600490fd5b600080fd5b3461080e57366003190160c0811261080e5760601361080e57604051606081018181106001600160401b0382111761055b576040526004358152602435602082015260443560408201526064359060ff8216820361080e5760209161087f9160a4359160843591611bf6565b604051908152f35b61012036600319011261080e576004356001600160401b03811161080e576108b390369060040161186f565b6024356001600160401b03811161080e576108d290369060040161186f565b906044356001600160401b03811161080e576108f290369060040161186f565b906064356001600160401b03811161080e57610912903690600401611828565b6084356001600160401b03811161080e57610931903690600401611828565b60a4356001600160401b03811161080e57610950903690600401611828565b9060c4356001600160401b03811161080e57610970903690600401611828565b60e435939092906001600160a01b038516850361080e5734156107fc57426101043511156107ea5760045460018101809111611085578060045560035418966109d188600052600160205260018060a01b0360046040600020015416151590565b6107d8576109de88611b5d565b604051986109eb8a6117b9565b838a528260208b01528460408b01528560608b01523360808b015260018060a01b03871660a08b0152600060c08b01526101043560e08b0152346101008b015260006101208b015260006101408b015260006101608b0152886000526001602052604060002060805289518051906001600160401b03821161055b578190610a7560805154611925565b601f8111611033575b50602090601f8311600114610fc357600092610fb8575b50508160011b916000199060031b1c191617608051555b60208a01518051906001600160401b03821161055b578190610ad360016080510154611925565b601f8111610f63575b50602090601f8311600114610eed57600092610ee2575b50508160011b916000199060031b1c191617600160805101555b60408a01518051906001600160401b03821161055b578190610b3460026080510154611925565b601f8111610e8d575b50602090601f8311600114610e1757600092610e0c575b50508160011b916000199060031b1c191617600260805101555b60608a0151998a516001600160401b03811161055b57610b9360036080510154611925565b601f8111610dc3575b506020601f8211600114610d4b5781908c9d60009d9b9c9d92610d40575b50508160011b916000199060031b1c191617600360805101555b60808051908201516004820180546001600160a01b039283166001600160a01b03199182161790915560a084015160058401805491909316911617905560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a909101805460ff191691151560ff16919091178155906101600151815461ff00191690151560081b61ff0016179055604051986101208a526101208a01610c8991611b99565b89810360208b0152610c9a91611b99565b88810360408a0152610cab91611b99565b8781036060890152610cbc91611794565b8681036080880152610ccd91611794565b85810360a0870152610cde91611794565b84810360c0860152610cef91611794565b3460e0850152610104356101008501526001600160a01b039092169233927f621d7904b7d4541d82c45ea65d90a26e91610e91bd1be090fc57b06d1725d9d7919081900390a4604051908152602090f35b015190508d80610bba565b60036080510160005260206000209c60005b601f1984168110610dab57509c82918d9e6001949d9e9c9d601f19811610610d92575b505050811b0160036080510155610bd4565b015160001960f88460031b161c191690558d8080610d80565b828201518f556001909e019d60209283019201610d5d565b6003608051016000526020600020601f830160051c810160208410610e05575b601f830160051c82018110610df9575050610b9c565b60008155600101610de3565b5080610de3565b015190508c80610b54565b92506002608051016000526020600020906000935b601f1984168510610e72576001945083601f19811610610e59575b505050811b0160026080510155610b6e565b015160001960f88460031b161c191690558c8080610e47565b81810151835560209485019460019093019290910190610e2c565b9091506002608051016000526020600020601f840160051c810160208510610edb575b90849392915b601f830160051c82018110610ecc575050610b3d565b60008155859450600101610eb6565b5080610eb0565b015190508c80610af3565b92506001608051016000526020600020906000935b601f1984168510610f48576001945083601f19811610610f2f575b505050811b0160016080510155610b0d565b015160001960f88460031b161c191690558c8080610f1d565b81810151835560209485019460019093019290910190610f02565b9091506001608051016000526020600020601f840160051c810160208510610fb1575b90849392915b601f830160051c82018110610fa2575050610adc565b60008155859450600101610f8c565b5080610f86565b015190508c80610a95565b92506080516000526020600020906000935b601f1984168510611018576001945083601f19811610610fff575b505050811b0160805155610aac565b015160001960f88460031b161c191690558c8080610ff0565b81810151835560209485019460019093019290910190610fd5565b9091506080516000526020600020601f840160051c81016020851061107e575b90849392915b601f830160051c8201811061106f575050610a7e565b60008155859450600101611059565b5080611053565b634e487b7160e01b600052601160045260246000fd5b3461080e57602036600319011261080e5760006101606040516110bd816117b9565b6060815260606020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015201526004356000526001602052604060002060ff600a60405192611125846117b9565b61112e8161195f565b845261113c6001820161195f565b602085015261114d6002820161195f565b604085015261115e6003820161195f565b606085015260018060a01b03600482015416608085015260018060a01b0360058201541660a0850152600681015460c0850152600781015460e0850152600881015461010085015260098101546101208501520154818116151561014084015260081c1615156101608201526040518091602082526101606112396111f1835161018060208701526101a0860190611794565b611224611210602086015192601f1993848983030160408a0152611794565b604086015183888303016060890152611794565b90606085015190868303016080870152611794565b9160018060a01b0360808201511660a085015260018060a01b0360a08201511660c085015260c081015160e085015260e0810151610100850152610100810151610120850152610120810151610140850152610140810151151582850152015115156101808301520390f35b3461080e57606036600319011261080e57600480356000818152600160205260409020909101546001600160a01b0316156112ed5761087f6020916044359060243590611a81565b6040516368cadcd560e01b8152600490fd5b3461080e57602036600319011261080e57600480356000818152600160205260409020909101546001600160a01b0316156112ed57806000526001602052604060002090600a8201805460ff8160081c166113fa5760ff81166113e857600784015442106113d65761ff00191661010017905560048201546008909201546020926113a791600091829182918291906001600160a01b03165af16113a1611a13565b50611a43565b604051907f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b60405163b3f711f760e01b8152600490fd5b6040516306d3830f60e21b8152600490fd5b60405163542f378d60e11b8152600490fd5b3461080e57604036600319011261080e576004803560008181526001602052604090209091015460243591906001600160a01b0316156112ed57806000526020916001835260406000206006810154604051858101848152868252604082018281106001600160401b0382111761055b57879281611494600094826040528351928391611771565b8101039060025afa15611543576000510361153157600a810180549260ff8460081c166113fa5760ff84166113e857600983015560ff1990921660011790915560058101546008909101546114ff916000918291829182916001600160a01b03165af16113a1611a13565b7f0f7c50d316885e5d3719752f760bbbbf7d56363501e721eea4d913e255b632e482604051338152a260405160018152f35b60405163e73bcb3560e01b8152600490fd5b6040513d6000823e3d90fd5b3461080e5760208060031936011261080e576001600160a01b036004358181169081900361080e5760009060009060028054925b8381106116885750506115ae611598846117f6565b936115a660405195866117d5565b8085526117f6565b8386019490601f190136863760009160005b84811061160a57878688604051928392818401908285525180915260408401929160005b8281106115f357505050500390f35b8351855286955093810193928101926001016115e4565b611613816118ee565b9054600391821b1c600052600189528284600460406000200154161461163d575b506001016115c0565b6116488295926118ee565b9054911b1c8651821015611672578161166b918a60019460051b8a010152611a04565b9390611634565b634e487b7160e01b600052603260045260246000fd5b82611692826118ee565b9054600391821b1c6000526001808a526116e86040600020926116cd604051936116bb856117b9565b6116c48661195f565b8552850161195f565b8c8401526116dc87850161195f565b6040840152830161195f565b606082015261016089600484015416928360808401528a60058201541660a0840152600681015460c0840152600781015460e0840152600a600891828101546101008601526009810154610120860152015460ff9182821615156101408601521c1615159101521461175d575b600101611583565b93611769600191611a04565b949050611755565b60005b8381106117845750506000910152565b8181015183820152602001611774565b906020916117ad81518092818552858086019101611771565b601f01601f1916010190565b61018081019081106001600160401b0382111761055b57604052565b90601f801991011681019081106001600160401b0382111761055b57604052565b6001600160401b03811161055b5760051b60200190565b6001600160401b03811161055b57601f01601f191660200190565b81601f8201121561080e5780359061183f8261180d565b9261184d60405194856117d5565b8284526020838301011161080e57816000926020809301838601378301015290565b81601f8201121561080e57803591602091611889846117f6565b9361189760405195866117d5565b808552838086019160051b8301019280841161080e57848301915b8483106118c25750505050505090565b82356001600160401b03811161080e5786916118e384848094890101611828565b8152019201916118b2565b6002548110156116725760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b90600182811c92168015611955575b602083101461193f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611934565b9060405191826000825461197281611925565b908184526020946001916001811690816000146119e257506001146119a3575b5050506119a1925003836117d5565b565b600090815285812095935091905b8183106119ca5750506119a19350820101388080611992565b855488840185015294850194879450918301916119b1565b925050506119a194925060ff191682840152151560051b820101388080611992565b60001981146110855760010190565b3d15611a3e573d90611a248261180d565b91611a3260405193846117d5565b82523d6000602084013e565b606090565b15611a4a57565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b919082600052600160205260409182600020600160ff600a83015460081c16151514611b4c5742821115611b3b5760048101546001600160a01b031633148015611b32575b15611b2157600681018054611b10578390556007018190558251918252602082015282917f2484bb4e28b26f5b0123b3e538fb43d9b515711c5ef54f8ca02cb993e3cd05e091a290565b8451636e6870d560e01b8152600490fd5b8351631d7eb35960e31b8152600490fd5b50303314611ac6565b8351633dd8280960e21b8152600490fd5b835163542f378d60e11b8152600490fd5b6002546801000000000000000081101561055b57806001611b8192016002556118ee565b819291549060031b91821b91600019901b1916179055565b90808251908181526020809101926020808460051b8301019501936000915b848310611bc85750505050505090565b9091929394958480611be6600193601f198682030187528a51611794565b9801930193019194939290611bb8565b919092600091825493805194602093848301968751946040998a94858701978851908751958b8701987f45906d7e53feffed68a8db947e0f8839b1ee252166e8eead8c6ab3951a09c7b68a52870152606086015260808501526080845260a084016001600160401b039685821088831117611d9e57818e528551902060c086019261190160f01b845260c287015260e28601526042815261012085019681881090881117611d8a57868d52519020855260ff1661014083015261016082015261018001528480528390859060809060015afa15611d805783518151855260018452868520600401546001600160a01b03918216911603611d6f575193519051908551946375ad188160e01b8652600486015260248501526044840152808360648185305af1938415611d6457508193611d30575b50505090565b9091809350813d8311611d5d575b611d4881836117d5565b81010312611d5a575051388080611d2a565b80fd5b503d611d3e565b51913d9150823e3d90fd5b855163553470cf60e01b8152600490fd5b85513d85823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b634e487b7160e01b8c52604160045260248cfdfea2646970667358221220cd3abe8231a8a7537f3b434ab394f8c19b09d50360b97ad2933740a95520db5664736f6c63430008170033
Deployed ByteCode
0x60a0604052600436101561001257600080fd5b60003560e01c8063213fe2b71461154f578063673da1541461140c5780637249fbb6146112ff57806375ad1881146112a5578063984bc7001461109b5780639ced67bb14610887578063beeaa615146108135763d701abd81461007457600080fd5b61010036600319011261080e576064356001600160a01b038116810361080e576084356001600160401b03811161080e576100b3903690600401611828565b60a4356001600160401b03811161080e576100d2903690600401611828565b9060c4356001600160401b03811161080e576100f2903690600401611828565b60e4356001600160401b03811161080e57610111903690600401611828565b9034156107fc574260443511156107ea5760048035600090815260016020526040902001546001600160a01b03166107d85760405161014f816117b9565b81815284602082015282604082015283606082015233608082015260018060a01b03861660a082015260243560c082015260443560e0820152346101008201526000610120820152600061014082015260006101608201526004356000526001602052604060002081518051906001600160401b03821161055b5781906101d68454611925565b601f8111610788575b50602090601f831160011461071c57600092610711575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161055b5781906102306001850154611925565b601f81116106be575b50602090601f831160011461064c57600092610641575b50508160011b916000199060031b1c19161760018201555b60408201518051906001600160401b03821161055b57819061028d6002850154611925565b601f81116105ee575b50602090601f831160011461057c57600092610571575b50508160011b916000199060031b1c19161760028201555b60608201518051906001600160401b03821161055b576102e86003840154611925565b601f8111610510575b50602090601f831160011461048a5793610160600a610414958561042299966103de966104309d9c9a60009261047f575b50508160011b916000199060031b1c19161760038201555b6004810160018060a01b03608086015116906bffffffffffffffffffffffff60a01b9182825416179055600582019060018060a01b0360a0870151169082541617905560c0840151600682015560e084015160078201556101008401516008820155610120840151600982015501916103c66101408201511515849060ff801983541691151516179055565b0151815461ff00191690151560081b61ff0016179055565b6103e9600435611b5d565b61040660405197602435895260e060208a015260e0890190611794565b908782036040890152611794565b908582036060870152611794565b908382036080850152611794565b913460a083015260443560c083015260018060a01b0316917f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4339280600435930390a460206040516004358152f35b015190503880610322565b906003840160005260206000209160005b601f19851681106104f85750600a610414956001866103de966104309d9c9a96610160966104229d9a601f198116106104df575b505050811b01600382015561033a565b015160001960f88460031b161c191690553880806104cf565b9192602060018192868501518155019401920161049b565b600384016000526020600020601f840160051c81019160208510610551575b601f0160051c01905b81811061054557506102f1565b60008155600101610538565b909150819061052f565b634e487b7160e01b600052604160045260246000fd5b0151905038806102ad565b9250600284016000526020600020906000935b601f19841685106105d3576001945083601f198116106105ba575b505050811b0160028201556102c5565b015160001960f88460031b161c191690553880806105aa565b8181015183556020948501946001909301929091019061058f565b909150600284016000526020600020601f840160051c81016020851061063a575b90849392915b601f830160051c8201811061062b575050610296565b60008155859450600101610615565b508061060f565b015190503880610250565b9250600184016000526020600020906000935b601f19841685106106a3576001945083601f1981161061068a575b505050811b016001820155610268565b015160001960f88460031b161c1916905538808061067a565b8181015183556020948501946001909301929091019061065f565b909150600184016000526020600020601f840160051c81016020851061070a575b90849392915b601f830160051c820181106106fb575050610239565b600081558594506001016106e5565b50806106df565b0151905038806101f6565b9250836000526020600020906000935b601f198416851061076d576001945083601f19811610610754575b505050811b01815561020b565b015160001960f88460031b161c19169055388080610747565b8181015183556020948501946001909301929091019061072c565b909150836000526020600020601f840160051c8101602085106107d1575b90849392915b601f830160051c820181106107c25750506101df565b600081558594506001016107ac565b50806107a6565b604051630ed8e66b60e21b8152600490fd5b604051633dd8280960e21b8152600490fd5b604051636f8ab38d60e11b8152600490fd5b600080fd5b3461080e57366003190160c0811261080e5760601361080e57604051606081018181106001600160401b0382111761055b576040526004358152602435602082015260443560408201526064359060ff8216820361080e5760209161087f9160a4359160843591611bf6565b604051908152f35b61012036600319011261080e576004356001600160401b03811161080e576108b390369060040161186f565b6024356001600160401b03811161080e576108d290369060040161186f565b906044356001600160401b03811161080e576108f290369060040161186f565b906064356001600160401b03811161080e57610912903690600401611828565b6084356001600160401b03811161080e57610931903690600401611828565b60a4356001600160401b03811161080e57610950903690600401611828565b9060c4356001600160401b03811161080e57610970903690600401611828565b60e435939092906001600160a01b038516850361080e5734156107fc57426101043511156107ea5760045460018101809111611085578060045560035418966109d188600052600160205260018060a01b0360046040600020015416151590565b6107d8576109de88611b5d565b604051986109eb8a6117b9565b838a528260208b01528460408b01528560608b01523360808b015260018060a01b03871660a08b0152600060c08b01526101043560e08b0152346101008b015260006101208b015260006101408b015260006101608b0152886000526001602052604060002060805289518051906001600160401b03821161055b578190610a7560805154611925565b601f8111611033575b50602090601f8311600114610fc357600092610fb8575b50508160011b916000199060031b1c191617608051555b60208a01518051906001600160401b03821161055b578190610ad360016080510154611925565b601f8111610f63575b50602090601f8311600114610eed57600092610ee2575b50508160011b916000199060031b1c191617600160805101555b60408a01518051906001600160401b03821161055b578190610b3460026080510154611925565b601f8111610e8d575b50602090601f8311600114610e1757600092610e0c575b50508160011b916000199060031b1c191617600260805101555b60608a0151998a516001600160401b03811161055b57610b9360036080510154611925565b601f8111610dc3575b506020601f8211600114610d4b5781908c9d60009d9b9c9d92610d40575b50508160011b916000199060031b1c191617600360805101555b60808051908201516004820180546001600160a01b039283166001600160a01b03199182161790915560a084015160058401805491909316911617905560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a909101805460ff191691151560ff16919091178155906101600151815461ff00191690151560081b61ff0016179055604051986101208a526101208a01610c8991611b99565b89810360208b0152610c9a91611b99565b88810360408a0152610cab91611b99565b8781036060890152610cbc91611794565b8681036080880152610ccd91611794565b85810360a0870152610cde91611794565b84810360c0860152610cef91611794565b3460e0850152610104356101008501526001600160a01b039092169233927f621d7904b7d4541d82c45ea65d90a26e91610e91bd1be090fc57b06d1725d9d7919081900390a4604051908152602090f35b015190508d80610bba565b60036080510160005260206000209c60005b601f1984168110610dab57509c82918d9e6001949d9e9c9d601f19811610610d92575b505050811b0160036080510155610bd4565b015160001960f88460031b161c191690558d8080610d80565b828201518f556001909e019d60209283019201610d5d565b6003608051016000526020600020601f830160051c810160208410610e05575b601f830160051c82018110610df9575050610b9c565b60008155600101610de3565b5080610de3565b015190508c80610b54565b92506002608051016000526020600020906000935b601f1984168510610e72576001945083601f19811610610e59575b505050811b0160026080510155610b6e565b015160001960f88460031b161c191690558c8080610e47565b81810151835560209485019460019093019290910190610e2c565b9091506002608051016000526020600020601f840160051c810160208510610edb575b90849392915b601f830160051c82018110610ecc575050610b3d565b60008155859450600101610eb6565b5080610eb0565b015190508c80610af3565b92506001608051016000526020600020906000935b601f1984168510610f48576001945083601f19811610610f2f575b505050811b0160016080510155610b0d565b015160001960f88460031b161c191690558c8080610f1d565b81810151835560209485019460019093019290910190610f02565b9091506001608051016000526020600020601f840160051c810160208510610fb1575b90849392915b601f830160051c82018110610fa2575050610adc565b60008155859450600101610f8c565b5080610f86565b015190508c80610a95565b92506080516000526020600020906000935b601f1984168510611018576001945083601f19811610610fff575b505050811b0160805155610aac565b015160001960f88460031b161c191690558c8080610ff0565b81810151835560209485019460019093019290910190610fd5565b9091506080516000526020600020601f840160051c81016020851061107e575b90849392915b601f830160051c8201811061106f575050610a7e565b60008155859450600101611059565b5080611053565b634e487b7160e01b600052601160045260246000fd5b3461080e57602036600319011261080e5760006101606040516110bd816117b9565b6060815260606020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015201526004356000526001602052604060002060ff600a60405192611125846117b9565b61112e8161195f565b845261113c6001820161195f565b602085015261114d6002820161195f565b604085015261115e6003820161195f565b606085015260018060a01b03600482015416608085015260018060a01b0360058201541660a0850152600681015460c0850152600781015460e0850152600881015461010085015260098101546101208501520154818116151561014084015260081c1615156101608201526040518091602082526101606112396111f1835161018060208701526101a0860190611794565b611224611210602086015192601f1993848983030160408a0152611794565b604086015183888303016060890152611794565b90606085015190868303016080870152611794565b9160018060a01b0360808201511660a085015260018060a01b0360a08201511660c085015260c081015160e085015260e0810151610100850152610100810151610120850152610120810151610140850152610140810151151582850152015115156101808301520390f35b3461080e57606036600319011261080e57600480356000818152600160205260409020909101546001600160a01b0316156112ed5761087f6020916044359060243590611a81565b6040516368cadcd560e01b8152600490fd5b3461080e57602036600319011261080e57600480356000818152600160205260409020909101546001600160a01b0316156112ed57806000526001602052604060002090600a8201805460ff8160081c166113fa5760ff81166113e857600784015442106113d65761ff00191661010017905560048201546008909201546020926113a791600091829182918291906001600160a01b03165af16113a1611a13565b50611a43565b604051907f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b60405163b3f711f760e01b8152600490fd5b6040516306d3830f60e21b8152600490fd5b60405163542f378d60e11b8152600490fd5b3461080e57604036600319011261080e576004803560008181526001602052604090209091015460243591906001600160a01b0316156112ed57806000526020916001835260406000206006810154604051858101848152868252604082018281106001600160401b0382111761055b57879281611494600094826040528351928391611771565b8101039060025afa15611543576000510361153157600a810180549260ff8460081c166113fa5760ff84166113e857600983015560ff1990921660011790915560058101546008909101546114ff916000918291829182916001600160a01b03165af16113a1611a13565b7f0f7c50d316885e5d3719752f760bbbbf7d56363501e721eea4d913e255b632e482604051338152a260405160018152f35b60405163e73bcb3560e01b8152600490fd5b6040513d6000823e3d90fd5b3461080e5760208060031936011261080e576001600160a01b036004358181169081900361080e5760009060009060028054925b8381106116885750506115ae611598846117f6565b936115a660405195866117d5565b8085526117f6565b8386019490601f190136863760009160005b84811061160a57878688604051928392818401908285525180915260408401929160005b8281106115f357505050500390f35b8351855286955093810193928101926001016115e4565b611613816118ee565b9054600391821b1c600052600189528284600460406000200154161461163d575b506001016115c0565b6116488295926118ee565b9054911b1c8651821015611672578161166b918a60019460051b8a010152611a04565b9390611634565b634e487b7160e01b600052603260045260246000fd5b82611692826118ee565b9054600391821b1c6000526001808a526116e86040600020926116cd604051936116bb856117b9565b6116c48661195f565b8552850161195f565b8c8401526116dc87850161195f565b6040840152830161195f565b606082015261016089600484015416928360808401528a60058201541660a0840152600681015460c0840152600781015460e0840152600a600891828101546101008601526009810154610120860152015460ff9182821615156101408601521c1615159101521461175d575b600101611583565b93611769600191611a04565b949050611755565b60005b8381106117845750506000910152565b8181015183820152602001611774565b906020916117ad81518092818552858086019101611771565b601f01601f1916010190565b61018081019081106001600160401b0382111761055b57604052565b90601f801991011681019081106001600160401b0382111761055b57604052565b6001600160401b03811161055b5760051b60200190565b6001600160401b03811161055b57601f01601f191660200190565b81601f8201121561080e5780359061183f8261180d565b9261184d60405194856117d5565b8284526020838301011161080e57816000926020809301838601378301015290565b81601f8201121561080e57803591602091611889846117f6565b9361189760405195866117d5565b808552838086019160051b8301019280841161080e57848301915b8483106118c25750505050505090565b82356001600160401b03811161080e5786916118e384848094890101611828565b8152019201916118b2565b6002548110156116725760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b90600182811c92168015611955575b602083101461193f57565b634e487b7160e01b600052602260045260246000fd5b91607f1691611934565b9060405191826000825461197281611925565b908184526020946001916001811690816000146119e257506001146119a3575b5050506119a1925003836117d5565b565b600090815285812095935091905b8183106119ca5750506119a19350820101388080611992565b855488840185015294850194879450918301916119b1565b925050506119a194925060ff191682840152151560051b820101388080611992565b60001981146110855760010190565b3d15611a3e573d90611a248261180d565b91611a3260405193846117d5565b82523d6000602084013e565b606090565b15611a4a57565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b919082600052600160205260409182600020600160ff600a83015460081c16151514611b4c5742821115611b3b5760048101546001600160a01b031633148015611b32575b15611b2157600681018054611b10578390556007018190558251918252602082015282917f2484bb4e28b26f5b0123b3e538fb43d9b515711c5ef54f8ca02cb993e3cd05e091a290565b8451636e6870d560e01b8152600490fd5b8351631d7eb35960e31b8152600490fd5b50303314611ac6565b8351633dd8280960e21b8152600490fd5b835163542f378d60e11b8152600490fd5b6002546801000000000000000081101561055b57806001611b8192016002556118ee565b819291549060031b91821b91600019901b1916179055565b90808251908181526020809101926020808460051b8301019501936000915b848310611bc85750505050505090565b9091929394958480611be6600193601f198682030187528a51611794565b9801930193019194939290611bb8565b919092600091825493805194602093848301968751946040998a94858701978851908751958b8701987f45906d7e53feffed68a8db947e0f8839b1ee252166e8eead8c6ab3951a09c7b68a52870152606086015260808501526080845260a084016001600160401b039685821088831117611d9e57818e528551902060c086019261190160f01b845260c287015260e28601526042815261012085019681881090881117611d8a57868d52519020855260ff1661014083015261016082015261018001528480528390859060809060015afa15611d805783518151855260018452868520600401546001600160a01b03918216911603611d6f575193519051908551946375ad188160e01b8652600486015260248501526044840152808360648185305af1938415611d6457508193611d30575b50505090565b9091809350813d8311611d5d575b611d4881836117d5565b81010312611d5a575051388080611d2a565b80fd5b503d611d3e565b51913d9150823e3d90fd5b855163553470cf60e01b8152600490fd5b85513d85823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b634e487b7160e01b8c52604160045260248cfdfea2646970667358221220cd3abe8231a8a7537f3b434ab394f8c19b09d50360b97ad2933740a95520db5664736f6c63430008170033