Source Code
Overview
ETH Balance
More Info
ContractCreator
Latest 25 from a total of 486 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 8079523 | 39 days ago | IN | 0 ETH | 0.00001098 | ||||
Add Lock Sig | 8079508 | 39 days ago | IN | 0 ETH | 0.00000956 | ||||
Commit | 8079490 | 39 days ago | IN | 0.00137795 ETH | 0.00000985 | ||||
Commit | 8041567 | 40 days ago | IN | 0.01 ETH | 0.00041262 | ||||
Lock | 8012021 | 40 days ago | IN | 0.00081548 ETH | 0.00000881 | ||||
Lock | 8012020 | 40 days ago | IN | 0.00081416 ETH | 0.00001543 | ||||
Lock | 8012017 | 40 days ago | IN | 0.04467521 ETH | 0.00000747 | ||||
Lock | 8012016 | 40 days ago | IN | 0.04467527 ETH | 0.00000352 | ||||
Lock | 8012016 | 40 days ago | IN | 0.04744159 ETH | 0.0000122 | ||||
Refund | 7985733 | 41 days ago | IN | 0 ETH | 0.00000388 | ||||
Commit | 7985218 | 41 days ago | IN | 0.00100662 ETH | 0.00001098 | ||||
Refund | 7969148 | 41 days ago | IN | 0 ETH | 0.00000432 | ||||
Commit | 7968691 | 41 days ago | IN | 0.00098276 ETH | 0.00001185 | ||||
Commit | 7946982 | 42 days ago | IN | 0.00091395 ETH | 0.00001703 | ||||
Refund | 7864135 | 44 days ago | IN | 0 ETH | 0.00000302 | ||||
Commit | 7863523 | 44 days ago | IN | 0.05 ETH | 0.00000909 | ||||
Refund | 7857420 | 44 days ago | IN | 0 ETH | 0.00000239 | ||||
Commit | 7856911 | 44 days ago | IN | 0.05 ETH | 0.00000784 | ||||
Lock | 7646940 | 49 days ago | IN | 0.00089664 ETH | 0.00000351 | ||||
Lock | 7630426 | 49 days ago | IN | 0.00667309 ETH | 0.00000352 | ||||
Lock | 7612439 | 50 days ago | IN | 0.00087531 ETH | 0.00001007 | ||||
Refund | 7587788 | 50 days ago | IN | 0 ETH | 0.00000531 | ||||
Lock | 7586000 | 50 days ago | IN | 0.0446726 ETH | 0.0000194 | ||||
Refund | 7573103 | 51 days ago | IN | 0 ETH | 0.00000958 | ||||
Lock | 7571250 | 51 days ago | IN | 0.04467315 ETH | 0.00002643 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
8079523 | 39 days ago | 0.00137795 ETH | ||||
8079523 | 39 days ago | 0 ETH | ||||
8079508 | 39 days ago | 0 ETH | ||||
7985733 | 41 days ago | 0.00100662 ETH | ||||
7969148 | 41 days ago | 0.00098276 ETH | ||||
7864135 | 44 days ago | 0.05 ETH | ||||
7857420 | 44 days ago | 0.05 ETH | ||||
7587788 | 50 days ago | 0.0446726 ETH | ||||
7573103 | 51 days ago | 0.04467315 ETH | ||||
7570987 | 51 days ago | 0.00183973 ETH | ||||
7569674 | 51 days ago | 0.00721746 ETH | ||||
7569474 | 51 days ago | 0.0009732 ETH | ||||
7548553 | 51 days ago | 0.00088968 ETH | ||||
7548464 | 51 days ago | 0.00160737 ETH | ||||
7544321 | 51 days ago | 0.00088267 ETH | ||||
7543312 | 51 days ago | 0.00088341 ETH | ||||
7540706 | 51 days ago | 0.00088074 ETH | ||||
7540642 | 51 days ago | 0.00088074 ETH | ||||
7533146 | 52 days ago | 0.04742954 ETH | ||||
7505476 | 52 days ago | 0.00090199 ETH | ||||
7505476 | 52 days ago | 0 ETH | ||||
7505110 | 52 days ago | 0.01 ETH | ||||
7505110 | 52 days ago | 0 ETH | ||||
7505092 | 52 days ago | 0 ETH | ||||
7499332 | 52 days ago | 0.00500487 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
LayerswapV8
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* _ __ _____ | | __ _ _ _ ___ _ __ _____ ____ _ _ __ \ \ / ( _ ) | | / _` | | | |/ _ \ '__/ __\ \ /\ / / _` | '_ \ \ \ / // _ \ | |__| (_| | |_| | __/ | \__ \\ V V / (_| | |_) | \ V /| (_) | |_____\__,_|\__, |\___|_| |___/ \_/\_/ \__,_| .__/ \_/ \___/ |___/ |_| */ // SPDX-License-Identifier: MIT pragma solidity 0.8.23; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /// @title LayerswapV8 Contract /// @notice Implements the Layerswap V8 PreHTLC protocol, enabling secure and atomic cross-chain swaps. /// @dev Manages HTLCs for trustless cross-chain transactions with event-based updates. /// @dev Represents the EIP-712 domain for signature verification. struct EIP712Domain { string name; string version; uint256 chainId; address verifyingContract; bytes32 salt; } contract LayerswapV8 { using ECDSA for bytes32; bytes32 private immutable DOMAIN_SEPARATOR; /// @dev Sets up the EIP-712 domain details used for verifying signed messages. constructor() { DOMAIN_SEPARATOR = hashDomain( EIP712Domain({ name: "LayerswapV8", version: "1", chainId: block.chainid, verifyingContract: address(this), salt: 0x2e4ff7169d640efc0d28f2e302a56f1cf54aff7e127eededda94b3df0946f5c0 }) ); } /// @dev Custom errors to simplify failure handling in the contract. error FundsNotSent(); error NotFutureTimelock(); error NotPassedTimelock(); error HTLCAlreadyExists(); error HTLCNotExists(); error HashlockNotMatch(); error AlreadyClaimed(); error NoAllowance(); error InvalidSigniture(); error HashlockAlreadySet(); error TransferFailed(); /// @dev Represents a hashed time-locked contract (HTLC) used in the Layerswap V8 protocol. struct HTLC { /// @notice The amount of funds locked in the HTLC. uint256 amount; /// @notice The hash of the secret required for redeem. bytes32 hashlock; /// @notice The secret required to redeem. uint256 secret; /// @notice The creator of the HTLC. address payable sender; /// @notice The recipient of the funds if conditions are met. address payable srcReceiver; /// @notice The timestamp after which the funds can be refunded. uint48 timelock; /// @notice Indicates whether the funds were claimed (redeemed(3) or refunded (2)). uint8 claimed; } /// @dev Represents the details required to add a lock, used as part of the `addLockSig` parameters. struct addLockMsg { /// @notice The identifier of the HTLC to which the hashlock should be added and the timelock updated. bytes32 Id; /// @notice The hashlock to be added to the HTLC. bytes32 hashlock; /// @notice The new timelock to be set for the HTLC. uint48 timelock; } /// @dev Emitted when an HTLC is created and funds are committed. /// @param Id The unique identifier of the HTLC. /// @param hopChains The sequence of chains forming the path from the source to the destination chain. /// @param hopAssets The sequence of assets being swapped along the path. /// @param hopAddresses The sequence of addresses involved along the path. /// @param dstChain The destination blockchain. /// @param dstAddress The recipient address on the destination chain. /// @param dstAsset The asset on the destination chain. /// @param sender The creator of the HTLC. /// @param srcReceiver The recipient of the funds if conditions are met. /// @param srcAsset The asset being locked. /// @param amount The amount of funds locked in the HTLC. /// @param timelock The timestamp after which the funds can be refunded. 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, uint48 timelock ); /// @dev Emitted when an HTLC is locked with a hashlock and timelock. event TokenLocked( bytes32 indexed Id, bytes32 hashlock, string dstChain, string dstAddress, string dstAsset, address indexed sender, address indexed srcReceiver, string srcAsset, uint256 amount, uint48 timelock ); /// @dev Emitted when a hashlock and timelock are added to an existing HTLC. event TokenLockAdded(bytes32 indexed Id, bytes32 hashlock, uint48 timelock); /// @dev Emitted when funds are refunded from an HTLC after the timelock expires. event TokenRefunded(bytes32 indexed Id); /// @dev Emitted when funds are redeemed from an HTLC using the correct secret. event TokenRedeemed( bytes32 indexed Id, address redeemAddress, uint256 secret, bytes32 hashlock ); /// @dev Modifier to ensure HTLC exists before proceeding. modifier _exists(bytes32 Id) { if (!hasHTLC(Id)) revert HTLCNotExists(); _; } /// @dev Unique identifier generation using block hash and a nonce. uint256 private immutable blockHashAsUint = uint256(blockhash(block.number - 20)); uint256 private contractNonce = 0; /// @dev Storage for HTLCs mapping(bytes32 => HTLC) private contracts; /// @notice Creates and commits a new hashed time-locked contract (HTLC). /// @dev Locks funds in the contract and emits a `TokenCommitted` event. /// @param hopChains The sequence of chains forming the path from the source to the destination chain. /// @param hopAssets The sequence of assets being swapped along the path. /// @param hopAddresses The sequence of addresses involved along the path. /// @param dstChain The destination blockchain. /// @param dstAsset The asset on the destination chain. /// @param dstAddress The recipient address on the destination chain. /// @param srcAsset The asset being locked. /// @param srcReceiver The recipient of the funds if conditions are met. /// @param timelock The timestamp after which the funds can be refunded. /// @return Id The unique identifier of the created HTLC. function commit( string[] calldata hopChains, string[] calldata hopAssets, string[] calldata hopAddresses, string calldata dstChain, string calldata dstAsset, string calldata dstAddress, string calldata srcAsset, address srcReceiver, uint48 timelock ) external payable returns (bytes32 Id) { if (msg.value == 0) revert FundsNotSent(); // Ensure funds are sent. if (timelock < block.timestamp) revert NotFutureTimelock(); // Ensure timelock is in the future. unchecked { ++contractNonce; // Increment nonce for uniqueness. } Id = bytes32(blockHashAsUint ^ contractNonce); // Store HTLC details. contracts[Id] = HTLC( msg.value, bytes32(bytes1(0x01)), uint256(1), payable(msg.sender), payable(srcReceiver), timelock, uint8(1) ); // Emit the commit event. emit TokenCommitted( Id, hopChains, hopAssets, hopAddresses, dstChain, dstAddress, dstAsset, msg.sender, srcReceiver, srcAsset, msg.value, timelock ); } /// @notice Refunds the locked funds from an HTLC after the timelock expires. /// @dev Can only be called if the HTLC exists and the timelock has passed. Emits a `TokenRefunded` event. /// @param Id The unique identifier of the HTLC to be refunded. /// @return bool Returns `true` if the refund is successful. function refund(bytes32 Id) external _exists(Id) returns (bool) { HTLC storage htlc = contracts[Id]; if (htlc.claimed == 2 || htlc.claimed == 3) revert AlreadyClaimed(); // Prevent refund if already redeemed or refunded. if (htlc.timelock > block.timestamp) revert NotPassedTimelock(); // Ensure timelock has passed. htlc.claimed = 2; (bool success, ) = htlc.sender.call{value: htlc.amount}(""); if (!success) revert TransferFailed(); // Ensure transfer succeeds. emit TokenRefunded(Id); return true; } /// @notice Adds a hashlock and updates the timelock for an existing HTLC. /// @dev Can only be called by the HTLC's creator if the HTLC exists and has not been claimed. Emits a `TokenLockAdded` event. /// @param Id The unique identifier of the HTLC to update. /// @param hashlock The hashlock to be added. /// @param timelock The new timelock to be set. /// @return bytes32 The updated HTLC identifier. function addLock( bytes32 Id, bytes32 hashlock, uint48 timelock ) external _exists(Id) returns (bytes32) { HTLC storage htlc = contracts[Id]; if (htlc.claimed == 2 || htlc.claimed == 3) revert AlreadyClaimed(); if (timelock < block.timestamp) revert NotFutureTimelock(); if (msg.sender == htlc.sender) { if (htlc.hashlock == bytes32(bytes1(0x01))) { htlc.hashlock = hashlock; htlc.timelock = timelock; } else { revert HashlockAlreadySet(); // Prevent overwriting hashlock. } emit TokenLockAdded(Id, hashlock, timelock); return Id; } else { revert NoAllowance(); // Ensure only allowed accounts can add a lock. } } /// @notice Adds a hashlock and updates the timelock for an existing HTLC using a signed message. /// @dev Verifies the provided signature and updates the HTLC if valid. Emits a `TokenLockAdded` event. /// @param message The details of the lock to be added, including the HTLC ID, hashlock, and timelock. /// @param r The `r` value of the ECDSA signature. /// @param s The `s` value of the ECDSA signature. /// @param v The `v` value of the ECDSA signature. /// @return bytes32 The updated HTLC identifier. function addLockSig( addLockMsg calldata message, bytes32 r, bytes32 s, uint8 v ) external _exists(message.Id) returns (bytes32) { if (verifyMessage(message, r, s, v)) { HTLC storage htlc = contracts[message.Id]; if (htlc.claimed == 2 || htlc.claimed == 3) revert AlreadyClaimed(); if (message.timelock < block.timestamp) revert NotFutureTimelock(); if (htlc.hashlock == bytes32(bytes1(0x01))) { htlc.hashlock = message.hashlock; htlc.timelock = message.timelock; } else { revert HashlockAlreadySet(); } emit TokenLockAdded(message.Id, message.hashlock, message.timelock); return message.Id; } else { revert InvalidSigniture(); // Ensure valid signature. } } /// @notice Locks funds in a new hashed time-locked contract (HTLC). /// @dev Creates an HTLC with the specified details and emits a `TokenLocked` event. /// @param Id The unique identifier for the new HTLC. /// @param hashlock The hash of the secret required for redeeming the HTLC. /// @param timelock The timestamp after which the funds can be refunded if not claimed. /// @param srcReceiver The recipient of the funds if the HTLC is successfully redeemed. /// @param srcAsset The asset being locked in the HTLC. /// @param dstChain The destination blockchain for the swap. /// @param dstAddress The recipient address on the destination chain. /// @param dstAsset The asset on the destination chain. /// @return bytes32 The unique identifier of the created HTLC. function lock( bytes32 Id, bytes32 hashlock, uint48 timelock, address payable srcReceiver, string calldata srcAsset, string calldata dstChain, string calldata dstAddress, string calldata 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( msg.value, hashlock, uint256(1), payable(msg.sender), srcReceiver, timelock, uint8(1) ); emit TokenLocked( Id, hashlock, dstChain, dstAddress, dstAsset, msg.sender, srcReceiver, srcAsset, msg.value, timelock ); return Id; } /// @notice Redeems funds from an HTLC using the correct secret. /// @dev Verifies the provided secret against the hashlock and transfers the funds to the recipient. Emits a `TokenRedeemed` event. /// @param Id The unique identifier of the HTLC to be redeemed. /// @param secret The secret value used to unlock the HTLC. /// @return bool Returns `true` if the redemption is successful. 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(); // Ensure secret matches hashlock. if (htlc.claimed == 3 || htlc.claimed == 2) revert AlreadyClaimed(); htlc.claimed = 3; htlc.secret = secret; (bool success, ) = htlc.srcReceiver.call{value: htlc.amount}(""); if (!success) revert TransferFailed(); emit TokenRedeemed(Id, msg.sender, secret, htlc.hashlock); return true; } /// @notice Retrieves the details of a specific HTLC. /// @dev Returns the HTLC structure associated with the given identifier. /// @param Id The unique identifier of the HTLC. /// @return HTLC The details of the specified HTLC. function getDetails(bytes32 Id) public view returns (HTLC memory) { return contracts[Id]; } /// @notice Generates a hash of the EIP-712 domain. /// @dev Encodes and hashes the EIP-712 domain fields according to the specification. /// @param domain The EIP-712 domain structure containing the domain details. /// @return bytes32 The hashed representation of the EIP-712 domain. 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 ) ); } /// @notice Generates a hash of the `addLockMsg` structure. /// @dev Encodes and hashes the `addLockMsg` fields for use in EIP-712 signature verification. /// @param message The `addLockMsg` structure containing the HTLC details to be hashed. /// @return bytes32 The hashed representation of the `addLockMsg` structure. function hashMessage( addLockMsg calldata message ) private pure returns (bytes32) { return keccak256( abi.encode( keccak256( "addLockMsg(bytes32 Id,bytes32 hashlock,uint48 timelock)" ), message.Id, message.hashlock, message.timelock ) ); } /// @notice Verifies that an EIP-712 message signature matches the sender of the specified HTLC. /// @dev Combines the domain separator and the hashed message to create the digest, then verifies the signature. /// @param message The `addLockMsg` structure containing the HTLC details. /// @param r The `r` value of the ECDSA signature. /// @param s The `s` value of the ECDSA signature. /// @param v The `v` value of the ECDSA signature. /// @return bool Returns `true` if the signature is valid and matches the sender of the HTLC. function verifyMessage( addLockMsg calldata message, bytes32 r, bytes32 s, uint8 v ) private view returns (bool) { bytes32 digest = keccak256( abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, hashMessage(message)) ); return (ECDSA.recover(digest, v, r, s) == contracts[message.Id].sender); } /// @notice Checks whether an HTLC with the given Id exists. /// @dev An HTLC exists if the sender address in its details is non-zero. /// @param Id The unique identifier of the HTLC to check. /// @return bool Returns `true` if the HTLC exists, otherwise `false`. function hasHTLC(bytes32 Id) private view returns (bool) { return (contracts[Id].sender != address(0)); } }
// 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); } } }
{ "optimizer": { "enabled": true, "runs": 200 }, "viaIR": true, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"FundsNotSent","type":"error"},{"inputs":[],"name":"HTLCAlreadyExists","type":"error"},{"inputs":[],"name":"HTLCNotExists","type":"error"},{"inputs":[],"name":"HashlockAlreadySet","type":"error"},{"inputs":[],"name":"HashlockNotMatch","type":"error"},{"inputs":[],"name":"InvalidSigniture","type":"error"},{"inputs":[],"name":"NoAllowance","type":"error"},{"inputs":[],"name":"NotFutureTimelock","type":"error"},{"inputs":[],"name":"NotPassedTimelock","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"},{"indexed":false,"internalType":"string[]","name":"hopChains","type":"string[]"},{"indexed":false,"internalType":"string[]","name":"hopAssets","type":"string[]"},{"indexed":false,"internalType":"string[]","name":"hopAddresses","type":"string[]"},{"indexed":false,"internalType":"string","name":"dstChain","type":"string"},{"indexed":false,"internalType":"string","name":"dstAddress","type":"string"},{"indexed":false,"internalType":"string","name":"dstAsset","type":"string"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"srcReceiver","type":"address"},{"indexed":false,"internalType":"string","name":"srcAsset","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint48","name":"timelock","type":"uint48"}],"name":"TokenCommitted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"indexed":false,"internalType":"uint48","name":"timelock","type":"uint48"}],"name":"TokenLockAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"},{"indexed":false,"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"indexed":false,"internalType":"string","name":"dstChain","type":"string"},{"indexed":false,"internalType":"string","name":"dstAddress","type":"string"},{"indexed":false,"internalType":"string","name":"dstAsset","type":"string"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"srcReceiver","type":"address"},{"indexed":false,"internalType":"string","name":"srcAsset","type":"string"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint48","name":"timelock","type":"uint48"}],"name":"TokenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"redeemAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"secret","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"hashlock","type":"bytes32"}],"name":"TokenRedeemed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"}],"name":"TokenRefunded","type":"event"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint48","name":"timelock","type":"uint48"}],"name":"addLock","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bytes32","name":"Id","type":"bytes32"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint48","name":"timelock","type":"uint48"}],"internalType":"struct LayerswapV8.addLockMsg","name":"message","type":"tuple"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"name":"addLockSig","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"hopChains","type":"string[]"},{"internalType":"string[]","name":"hopAssets","type":"string[]"},{"internalType":"string[]","name":"hopAddresses","type":"string[]"},{"internalType":"string","name":"dstChain","type":"string"},{"internalType":"string","name":"dstAsset","type":"string"},{"internalType":"string","name":"dstAddress","type":"string"},{"internalType":"string","name":"srcAsset","type":"string"},{"internalType":"address","name":"srcReceiver","type":"address"},{"internalType":"uint48","name":"timelock","type":"uint48"}],"name":"commit","outputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"}],"name":"getDetails","outputs":[{"components":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint256","name":"secret","type":"uint256"},{"internalType":"address payable","name":"sender","type":"address"},{"internalType":"address payable","name":"srcReceiver","type":"address"},{"internalType":"uint48","name":"timelock","type":"uint48"},{"internalType":"uint8","name":"claimed","type":"uint8"}],"internalType":"struct LayerswapV8.HTLC","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint48","name":"timelock","type":"uint48"},{"internalType":"address payable","name":"srcReceiver","type":"address"},{"internalType":"string","name":"srcAsset","type":"string"},{"internalType":"string","name":"dstChain","type":"string"},{"internalType":"string","name":"dstAddress","type":"string"},{"internalType":"string","name":"dstAsset","type":"string"}],"name":"lock","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"},{"internalType":"uint256","name":"secret","type":"uint256"}],"name":"redeem","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"}],"name":"refund","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c03461018c576013194301438111610176574060a090815260008080556001600160401b039290918101838111828210176101625760409080825261004481610191565b600b81526a098c2f2cae4e6eec2e0ac760ab1b60c0840152825280519261006a84610191565b6001845260208401603160f81b815284602085015246838501523060608501527f2e4ff7169d640efc0d28f2e302a56f1cf54aff7e127eededda94b3df0946f5c0938460808201525160208151910120945190209282519360208501957fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac5647287528486015260608501524660808501523060a085015260c084015260c0835260e08301948386109086111761014e575083905251902060805261110090816101c3823960805181610cac015260a051818181610666015281816107b901526108080152f35b634e487b7160e01b81526041600452602490fd5b634e487b7160e01b83526041600452602483fd5b634e487b7160e01b600052601160045260246000fd5b600080fd5b604081019081106001600160401b038211176101ac57604052565b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c90816328b63ccf14610853575080632eed76fc146104e957806335be7d8b1461048f578063673da154146102f85780637249fbb6146101d5578063984bc700146100da5763a9e0c1a51461006c57600080fd5b346100d55760603660031901126100d557600435610088610adf565b6000828152600160205260409020600301549091906001600160a01b0316156100c3576020916100bb9160243590610e9e565b604051908152f35b6040516368cadcd560e01b8152600490fd5b600080fd5b346100d55760203660031901126100d557600060c06040516100fb81610b53565b8281528260208201528260408201528260608201528260808201528260a08201520152600435600052600160205260e0604060002060ff6040519161013f83610b53565b8054928381526001820154906020810191825260028301546040820190815260018060a01b03908160048160038801541696606086019788520154956080850192828816845265ffffffffffff968960c060a08901988a8c60a01c168a52019960d01c1689526040519a8b525160208b01525160408a01525116606088015251166080860152511660a0840152511660c0820152f35b346100d55760203660031901126100d5576004356000818152600160205260409020600301546001600160a01b0316156100c3578060005260016020526040600020600481019081549160ff8360d01c16600281149081156102ed575b506102db574265ffffffffffff8460a01c16116102c95760ff60d01b19909216600160d11b179091556003810154905482916000918291829182916001600160a01b03165af1610280610e53565b50156102b7576040516020917f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b6040516312171d8360e31b8152600490fd5b60405163b3f711f760e01b8152600490fd5b604051630c8d9eab60e31b8152600490fd5b600391501485610232565b346100d55760403660031901126100d55760043560008181526001602052604090206003015460243591906001600160a01b0316156100c357806000526020916001835260406000206001810190815460405184878201528681526040810181811067ffffffffffffffff8211176104795787918160405280518360005b82811061046557505090600092918101836040820152039060025afa15610459576000510361044757600481019081549060ff8260d01c166003811490811561043c575b506102db5760ff60d01b198216600360d01b17909255600282018490559054600091829182918291906001600160a01b03165af16103f6610e53565b50156102b7577f7cbd5a76f728157ea921886950b9fb8dbf8f7c21b4d81b7ad97dd405e07a77a3916060915460405191338352868301526040820152a260405160018152f35b6002915014886103ba565b60405163e73bcb3560e01b8152600490fd5b6040513d6000823e3d90fd5b808401604083820151910152018490610376565b634e487b7160e01b600052604160045260246000fd5b346100d557366003190160c081126100d5576060136100d55760a43560ff811681036100d5576004356000908152600160205260409020600301546001600160a01b0316156100c3576100bb602091608435606435610c1b565b6101203660031901126100d55767ffffffffffffffff6004358181116100d557610517903690600401610b22565b90916024358181116100d557610531903690600401610b22565b916044358181116100d55761054a903690600401610b22565b90916064358181116100d557610564903690600401610af4565b92906084358381116100d55761057e903690600401610af4565b94909560a4358581116100d557610599903690600401610af4565b94909560c4359081116100d5576105b4903690600401610af4565b909a90999060e4356001600160a01b03811690036100d55765ffffffffffff610104351661010435036100d5573415610841574265ffffffffffff61010435161061082f576000546001019d8e806000556040519061061282610b53565b348252600160f81b602080840191825260016040808601828152336060880190815260e4356001600160a01b0390811660808a0190815265ffffffffffff610104351660a0808c0191825260c08c018881527f0000000000000000000000000000000000000000000000000000000000000000909b186000908152988890529590972099518a5596519489019490945590516002880155516003870180546001600160a01b03191691841691909117905592516004909501805492516001600160d01b03199093169590911694909417911b65ffffffffffff60a01b1617825551815460ff60d01b191660d09190911b60ff60d01b161790556040519d8e6101208152610120019061072392610b90565b908d808303906020015261073692610b90565b908b820360408d015261074892610b90565b9089820360608b015261075a92610b6f565b90878203608089015261076c92610b6f565b9085820360a087015261077e92610b6f565b9083820360c085015261079092610b6f565b3460e083015265ffffffffffff610104351661010083015260e4356001600160a01b03169133917f00000000000000000000000000000000000000000000000000000000000000008518917f48d52ce986069817751aa9893c41f6743eef33f5468ba8d638818a793fec500e9181900390a4604051907f0000000000000000000000000000000000000000000000000000000000000000188152602090f35b604051633dd8280960e21b8152600490fd5b604051636f8ab38d60e11b8152600490fd5b6101003660031901126100d557610868610adf565b906064356001600160a01b03811681036100d55767ffffffffffffffff6084358181116100d55761089d903690600401610af4565b939060a4358381116100d5576108b7903690600401610af4565b60c4969196358581116100d5576108d2903690600401610af4565b94909560e4359081116100d5576108ed903690600401610af4565b90913415610ad057504265ffffffffffff8b161061082f576004356000908152600160205260409020600301546001600160a01b0316610abe57610a5165ffffffffffff97610a6d97610a4360e09c610a5f978f8e60ff8f92610a12610a2c946040519261095a84610b53565b3484526024356020808601918252600160408088018281523360608a019081526001600160a01b039b8c1660808b0190815296881660a0808c0191825260c08c0186815260048035600090815298889052959097209b518c559651948b0194909455905160028a0155516003890180546001600160a01b031916918c16919091179055935196909301805493516001600160d01b031990941696909816959095179190921690911b65ffffffffffff60a01b16178455565b51825460ff60d01b1916911660d01b60ff60d01b16179055565b6040519e8f60243581528160208201520191610b6f565b8c810360408e015291610b6f565b9189830360608b0152610b6f565b918683036080880152610b6f565b3460a0850152931660c08301526001600160a01b0316913391600435917ff66d862b579f39640e227deb0bd8908ee96f92c4f86caaefc329c8ace31c0d96919081900390a460206040516004358152f35b604051630ed8e66b60e21b8152600490fd5b636f8ab38d60e11b8152600490fd5b6044359065ffffffffffff821682036100d557565b9181601f840112156100d55782359167ffffffffffffffff83116100d557602083818601950101116100d557565b9181601f840112156100d55782359167ffffffffffffffff83116100d5576020808501948460051b0101116100d557565b60e0810190811067ffffffffffffffff82111761047957604052565b908060209392818452848401376000828201840152601f01601f1916010190565b908281815260208091019360208360051b82010194846000925b858410610bbb575050505050505090565b90919293949596601f198282030184528735601e19843603018112156100d557830186810191903567ffffffffffffffff81116100d55780360383136100d557610c0a88928392600195610b6f565b990194019401929594939190610baa565b91600490813593602435926044359465ffffffffffff8616928387036100d5576040948551602081017fde6780c140fbc4ab251ad9d48d26e1652301c0f664623a09aeb6c54131b0fe5381528a888301528860608301528660808301526080825260a082019067ffffffffffffffff9083831082841117610e3e57828a528351902061190160f01b60c085019081527f000000000000000000000000000000000000000000000000000000000000000060c286015260e285019190915260428352926101200190811182821017610e295791610d0d9796959391610d0495938a52519020610fb5565b90949194611045565b600087815260016020528481206003015490936001600160a01b03908116911603610e1b5786835260016020528383208181019260ff845460d01c1660028114908115610e10575b50610e00574211610df1576001018054909190600160f81b03610de35750849055805465ffffffffffff60a01b191660a086901b65ffffffffffff60a01b1617905580610de057505190815265ffffffffffff909116602082015281907f4ceab1c2914b95780a2f8f611de30f855494a303ba92b618f434814a617637c79080604081015b0390a290565b80fd5b8451636e6870d560e01b8152fd5b508351633dd8280960e21b8152fd5b8551630c8d9eab60e31b81528390fd5b600391501438610d55565b835163553470cf60e01b8152fd5b604187634e487b7160e01b6000525260246000fd5b604188634e487b7160e01b6000525260246000fd5b3d15610e995767ffffffffffffffff903d8281116104795760405192601f8201601f19908116603f01168401908111848210176104795760405282523d6000602084013e565b606090565b9190826000526001602052604080600020600481019060ff825460d01c1660028114908115610faa575b50610f99574265ffffffffffff861610610f88576003810154336001600160a01b0390911603610f77576001018054600160f81b03610f6657839055805465ffffffffffff60a01b191660a085901b65ffffffffffff60a01b161790555190815265ffffffffffff909116602082015281907f4ceab1c2914b95780a2f8f611de30f855494a303ba92b618f434814a617637c7908060408101610dda565b8251636e6870d560e01b8152600490fd5b8251631d7eb35960e31b8152600490fd5b8251633dd8280960e21b8152600490fd5b8251630c8d9eab60e31b8152600490fd5b600391501438610ec8565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161103957926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa1561102d5780516001600160a01b0381161561102457918190565b50809160019190565b604051903d90823e3d90fd5b50505060009160039190565b60048110156110b45780611057575050565b600181036110715760405163f645eedf60e01b8152600490fd5b600281036110925760405163fce698f760e01b815260048101839052602490fd5b60031461109c5750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220523e3c0e26e1b528c52acd31e86254e5cbfa45608ea19319e333d7241c9575e464736f6c63430008170033
Deployed Bytecode
0x608080604052600436101561001357600080fd5b60003560e01c90816328b63ccf14610853575080632eed76fc146104e957806335be7d8b1461048f578063673da154146102f85780637249fbb6146101d5578063984bc700146100da5763a9e0c1a51461006c57600080fd5b346100d55760603660031901126100d557600435610088610adf565b6000828152600160205260409020600301549091906001600160a01b0316156100c3576020916100bb9160243590610e9e565b604051908152f35b6040516368cadcd560e01b8152600490fd5b600080fd5b346100d55760203660031901126100d557600060c06040516100fb81610b53565b8281528260208201528260408201528260608201528260808201528260a08201520152600435600052600160205260e0604060002060ff6040519161013f83610b53565b8054928381526001820154906020810191825260028301546040820190815260018060a01b03908160048160038801541696606086019788520154956080850192828816845265ffffffffffff968960c060a08901988a8c60a01c168a52019960d01c1689526040519a8b525160208b01525160408a01525116606088015251166080860152511660a0840152511660c0820152f35b346100d55760203660031901126100d5576004356000818152600160205260409020600301546001600160a01b0316156100c3578060005260016020526040600020600481019081549160ff8360d01c16600281149081156102ed575b506102db574265ffffffffffff8460a01c16116102c95760ff60d01b19909216600160d11b179091556003810154905482916000918291829182916001600160a01b03165af1610280610e53565b50156102b7576040516020917f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b6040516312171d8360e31b8152600490fd5b60405163b3f711f760e01b8152600490fd5b604051630c8d9eab60e31b8152600490fd5b600391501485610232565b346100d55760403660031901126100d55760043560008181526001602052604090206003015460243591906001600160a01b0316156100c357806000526020916001835260406000206001810190815460405184878201528681526040810181811067ffffffffffffffff8211176104795787918160405280518360005b82811061046557505090600092918101836040820152039060025afa15610459576000510361044757600481019081549060ff8260d01c166003811490811561043c575b506102db5760ff60d01b198216600360d01b17909255600282018490559054600091829182918291906001600160a01b03165af16103f6610e53565b50156102b7577f7cbd5a76f728157ea921886950b9fb8dbf8f7c21b4d81b7ad97dd405e07a77a3916060915460405191338352868301526040820152a260405160018152f35b6002915014886103ba565b60405163e73bcb3560e01b8152600490fd5b6040513d6000823e3d90fd5b808401604083820151910152018490610376565b634e487b7160e01b600052604160045260246000fd5b346100d557366003190160c081126100d5576060136100d55760a43560ff811681036100d5576004356000908152600160205260409020600301546001600160a01b0316156100c3576100bb602091608435606435610c1b565b6101203660031901126100d55767ffffffffffffffff6004358181116100d557610517903690600401610b22565b90916024358181116100d557610531903690600401610b22565b916044358181116100d55761054a903690600401610b22565b90916064358181116100d557610564903690600401610af4565b92906084358381116100d55761057e903690600401610af4565b94909560a4358581116100d557610599903690600401610af4565b94909560c4359081116100d5576105b4903690600401610af4565b909a90999060e4356001600160a01b03811690036100d55765ffffffffffff610104351661010435036100d5573415610841574265ffffffffffff61010435161061082f576000546001019d8e806000556040519061061282610b53565b348252600160f81b602080840191825260016040808601828152336060880190815260e4356001600160a01b0390811660808a0190815265ffffffffffff610104351660a0808c0191825260c08c018881527fcd4a76ab251e2352ff76ff6116b35841ca24f4a9269721502a50ca468375a049909b186000908152988890529590972099518a5596519489019490945590516002880155516003870180546001600160a01b03191691841691909117905592516004909501805492516001600160d01b03199093169590911694909417911b65ffffffffffff60a01b1617825551815460ff60d01b191660d09190911b60ff60d01b161790556040519d8e6101208152610120019061072392610b90565b908d808303906020015261073692610b90565b908b820360408d015261074892610b90565b9089820360608b015261075a92610b6f565b90878203608089015261076c92610b6f565b9085820360a087015261077e92610b6f565b9083820360c085015261079092610b6f565b3460e083015265ffffffffffff610104351661010083015260e4356001600160a01b03169133917fcd4a76ab251e2352ff76ff6116b35841ca24f4a9269721502a50ca468375a0498518917f48d52ce986069817751aa9893c41f6743eef33f5468ba8d638818a793fec500e9181900390a4604051907fcd4a76ab251e2352ff76ff6116b35841ca24f4a9269721502a50ca468375a049188152602090f35b604051633dd8280960e21b8152600490fd5b604051636f8ab38d60e11b8152600490fd5b6101003660031901126100d557610868610adf565b906064356001600160a01b03811681036100d55767ffffffffffffffff6084358181116100d55761089d903690600401610af4565b939060a4358381116100d5576108b7903690600401610af4565b60c4969196358581116100d5576108d2903690600401610af4565b94909560e4359081116100d5576108ed903690600401610af4565b90913415610ad057504265ffffffffffff8b161061082f576004356000908152600160205260409020600301546001600160a01b0316610abe57610a5165ffffffffffff97610a6d97610a4360e09c610a5f978f8e60ff8f92610a12610a2c946040519261095a84610b53565b3484526024356020808601918252600160408088018281523360608a019081526001600160a01b039b8c1660808b0190815296881660a0808c0191825260c08c0186815260048035600090815298889052959097209b518c559651948b0194909455905160028a0155516003890180546001600160a01b031916918c16919091179055935196909301805493516001600160d01b031990941696909816959095179190921690911b65ffffffffffff60a01b16178455565b51825460ff60d01b1916911660d01b60ff60d01b16179055565b6040519e8f60243581528160208201520191610b6f565b8c810360408e015291610b6f565b9189830360608b0152610b6f565b918683036080880152610b6f565b3460a0850152931660c08301526001600160a01b0316913391600435917ff66d862b579f39640e227deb0bd8908ee96f92c4f86caaefc329c8ace31c0d96919081900390a460206040516004358152f35b604051630ed8e66b60e21b8152600490fd5b636f8ab38d60e11b8152600490fd5b6044359065ffffffffffff821682036100d557565b9181601f840112156100d55782359167ffffffffffffffff83116100d557602083818601950101116100d557565b9181601f840112156100d55782359167ffffffffffffffff83116100d5576020808501948460051b0101116100d557565b60e0810190811067ffffffffffffffff82111761047957604052565b908060209392818452848401376000828201840152601f01601f1916010190565b908281815260208091019360208360051b82010194846000925b858410610bbb575050505050505090565b90919293949596601f198282030184528735601e19843603018112156100d557830186810191903567ffffffffffffffff81116100d55780360383136100d557610c0a88928392600195610b6f565b990194019401929594939190610baa565b91600490813593602435926044359465ffffffffffff8616928387036100d5576040948551602081017fde6780c140fbc4ab251ad9d48d26e1652301c0f664623a09aeb6c54131b0fe5381528a888301528860608301528660808301526080825260a082019067ffffffffffffffff9083831082841117610e3e57828a528351902061190160f01b60c085019081527fdff7daa0773a76ee8119b6fb4dac431b7cd558885fcb657a670c351396e9637060c286015260e285019190915260428352926101200190811182821017610e295791610d0d9796959391610d0495938a52519020610fb5565b90949194611045565b600087815260016020528481206003015490936001600160a01b03908116911603610e1b5786835260016020528383208181019260ff845460d01c1660028114908115610e10575b50610e00574211610df1576001018054909190600160f81b03610de35750849055805465ffffffffffff60a01b191660a086901b65ffffffffffff60a01b1617905580610de057505190815265ffffffffffff909116602082015281907f4ceab1c2914b95780a2f8f611de30f855494a303ba92b618f434814a617637c79080604081015b0390a290565b80fd5b8451636e6870d560e01b8152fd5b508351633dd8280960e21b8152fd5b8551630c8d9eab60e31b81528390fd5b600391501438610d55565b835163553470cf60e01b8152fd5b604187634e487b7160e01b6000525260246000fd5b604188634e487b7160e01b6000525260246000fd5b3d15610e995767ffffffffffffffff903d8281116104795760405192601f8201601f19908116603f01168401908111848210176104795760405282523d6000602084013e565b606090565b9190826000526001602052604080600020600481019060ff825460d01c1660028114908115610faa575b50610f99574265ffffffffffff861610610f88576003810154336001600160a01b0390911603610f77576001018054600160f81b03610f6657839055805465ffffffffffff60a01b191660a085901b65ffffffffffff60a01b161790555190815265ffffffffffff909116602082015281907f4ceab1c2914b95780a2f8f611de30f855494a303ba92b618f434814a617637c7908060408101610dda565b8251636e6870d560e01b8152600490fd5b8251631d7eb35960e31b8152600490fd5b8251633dd8280960e21b8152600490fd5b8251630c8d9eab60e31b8152600490fd5b600391501438610ec8565b91907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841161103957926020929160ff608095604051948552168484015260408301526060820152600092839182805260015afa1561102d5780516001600160a01b0381161561102457918190565b50809160019190565b604051903d90823e3d90fd5b50505060009160039190565b60048110156110b45780611057575050565b600181036110715760405163f645eedf60e01b8152600490fd5b600281036110925760405163fce698f760e01b815260048101839052602490fd5b60031461109c5750565b602490604051906335e2f38360e21b82526004820152fd5b634e487b7160e01b600052602160045260246000fdfea2646970667358221220523e3c0e26e1b528c52acd31e86254e5cbfa45608ea19319e333d7241c9575e464736f6c63430008170033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.