Source Code
Overview
ETH Balance
0.38986704 ETH
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 2,926 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Lock | 20554241 | 382 days ago | IN | 0.00947212 ETH | 0.000000347347 | ||||
| Redeem | 20554241 | 382 days ago | IN | 0 ETH | 0.000000127491 | ||||
| Lock | 20554189 | 382 days ago | IN | 0.00947212 ETH | 0.000000347587 | ||||
| Redeem | 20554110 | 382 days ago | IN | 0 ETH | 0.000000128359 | ||||
| Lock | 20554074 | 382 days ago | IN | 0.00947212 ETH | 0.000000352521 | ||||
| Redeem | 20553868 | 382 days ago | IN | 0 ETH | 0.000000135992 | ||||
| Lock | 20553841 | 382 days ago | IN | 0.00282207 ETH | 0.000000358265 | ||||
| Redeem | 20552093 | 382 days ago | IN | 0 ETH | 0.000000124193 | ||||
| Lock | 20552071 | 382 days ago | IN | 0.00083241 ETH | 0.000000409914 | ||||
| Refund | 20551038 | 382 days ago | IN | 0 ETH | 0.000000120889 | ||||
| Lock | 20549109 | 382 days ago | IN | 0.00083366 ETH | 0.00000042823 | ||||
| Redeem | 20546022 | 382 days ago | IN | 0 ETH | 0.00000017997 | ||||
| Lock | 20546009 | 382 days ago | IN | 0.00494717 ETH | 0.000000523743 | ||||
| Redeem | 20542110 | 382 days ago | IN | 0 ETH | 0.000000308122 | ||||
| Lock | 20542100 | 382 days ago | IN | 0.00092223 ETH | 0.00000080622 | ||||
| Redeem | 20538240 | 382 days ago | IN | 0 ETH | 0.000008942948 | ||||
| Lock | 20538208 | 382 days ago | IN | 0.00083462 ETH | 0.000021836194 | ||||
| Redeem | 20536015 | 382 days ago | IN | 0 ETH | 0.000012177229 | ||||
| Lock | 20536001 | 382 days ago | IN | 0.00083518 ETH | 0.000027392356 | ||||
| Redeem | 20534920 | 382 days ago | IN | 0 ETH | 0.000013604732 | ||||
| Add Lock | 20534908 | 382 days ago | IN | 0 ETH | 0.000016919439 | ||||
| Commit | 20534873 | 382 days ago | IN | 0.00090978 ETH | 0.000038195571 | ||||
| Redeem | 20532805 | 382 days ago | IN | 0 ETH | 0.000000112026 | ||||
| Lock | 20532792 | 382 days ago | IN | 0.0008408 ETH | 0.00000037249 | ||||
| Redeem | 20532656 | 382 days ago | IN | 0 ETH | 0.00000011642 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | Amount | ||
|---|---|---|---|---|---|---|
| 20554241 | 382 days ago | 0.00947212 ETH | ||||
| 20554110 | 382 days ago | 0.00947212 ETH | ||||
| 20553868 | 382 days ago | 0.00282207 ETH | ||||
| 20552093 | 382 days ago | 0.00083241 ETH | ||||
| 20551038 | 382 days ago | 0.00083366 ETH | ||||
| 20546022 | 382 days ago | 0.00494717 ETH | ||||
| 20542110 | 382 days ago | 0.00092223 ETH | ||||
| 20538240 | 382 days ago | 0.00083462 ETH | ||||
| 20536015 | 382 days ago | 0.00083518 ETH | ||||
| 20534920 | 382 days ago | 0.00090978 ETH | ||||
| 20532805 | 382 days ago | 0.0008408 ETH | ||||
| 20532656 | 382 days ago | 0.00084328 ETH | ||||
| 20521431 | 382 days ago | 0.00091057 ETH | ||||
| 20520370 | 382 days ago | 0.00083912 ETH | ||||
| 20514130 | 382 days ago | 0.00092194 ETH | ||||
| 20504664 | 383 days ago | 0.00084234 ETH | ||||
| 20504314 | 383 days ago | 0.00084074 ETH | ||||
| 20502407 | 383 days ago | 0.00091144 ETH | ||||
| 20497553 | 383 days ago | 0.00091283 ETH | ||||
| 20496491 | 383 days ago | 0.00947242 ETH | ||||
| 20495168 | 383 days ago | 0.00083291 ETH | ||||
| 20493095 | 383 days ago | 0.00082831 ETH | ||||
| 20492772 | 383 days ago | 0.00089868 ETH | ||||
| 20490301 | 383 days ago | 0.00084872 ETH | ||||
| 20483575 | 383 days ago | 0.0008275 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';
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
})
);
}
// 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 TokenRefunded(bytes32 indexed Id);
event TokenRedeemed(bytes32 indexed Id, address redeemAddress);
event LowLevelErrorOccurred(bytes lowLevelData);
modifier _exists(bytes32 Id) {
require(hasHTLC(Id),"HTLC Not Exists");
_;
}
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) {
require(msg.value > 0,"Funds Not Sent");
require(timelock > block.timestamp,"Not Future Timelock");
contractNonce += 1;
Id = bytes32(blockHashAsUint ^ contractNonce);
//Remove this check; the ID is guaranteed to be unique.
require(!hasHTLC(Id),"HTLC Already Exists");
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];
require(!htlc.refunded,"Already Refunded");
require(!htlc.redeemed,"Already Redeemed");
require(htlc.timelock <= block.timestamp,"Not Passed Timelock");
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];
require(!htlc.refunded,"Already Refunded");
require(timelock > block.timestamp,"Not Future Timelock");
if (msg.sender == htlc.sender || msg.sender == address(this)) {
if (htlc.hashlock == 0) {
htlc.hashlock = hashlock;
htlc.timelock = timelock;
} else {
require(false,"Hashlock Already Set");
}
emit TokenLocked(
Id,
hashlock,
htlc.dstChain,
htlc.dstAddress,
htlc.dstAsset,
htlc.sender,
htlc.srcReceiver,
htlc.srcAsset,
htlc.amount,
timelock
);
return Id;
} else {
require(false,"No Allowance");
}
}
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 {
require(false,"Invalid Signiture");
}
}
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) {
require(msg.value > 0, "Funds Not Sent");
require(timelock > block.timestamp,"Not Future Timelock");
require(!hasHTLC(Id),"HTLC Already Exists");
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];
require(htlc.hashlock == sha256(abi.encodePacked(secret)),"Hashlock Not Match");
require(!htlc.refunded,"Already Refunded");
require(!htlc.redeemed,"Already Redeemed");
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));
}
}// 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();
}
}
}// 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": {}
}Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"lowLevelData","type":"bytes"}],"name":"LowLevelErrorOccurred","type":"event"},{"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":"uint256","name":"timelock","type":"uint256"}],"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":"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":"uint256","name":"timelock","type":"uint256"}],"name":"TokenLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"Id","type":"bytes32"},{"indexed":false,"internalType":"address","name":"redeemAddress","type":"address"}],"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":"uint256","name":"timelock","type":"uint256"}],"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":"uint256","name":"timelock","type":"uint256"}],"internalType":"struct LayerswapV8.addLockMsg","name":"message","type":"tuple"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"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":"uint256","name":"timelock","type":"uint256"}],"name":"commit","outputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"senderAddr","type":"address"}],"name":"getContracts","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"Id","type":"bytes32"}],"name":"getDetails","outputs":[{"components":[{"internalType":"string","name":"dstAddress","type":"string"},{"internalType":"string","name":"dstChain","type":"string"},{"internalType":"string","name":"dstAsset","type":"string"},{"internalType":"string","name":"srcAsset","type":"string"},{"internalType":"address payable","name":"sender","type":"address"},{"internalType":"address payable","name":"srcReceiver","type":"address"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint256","name":"timelock","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"secret","type":"uint256"},{"internalType":"bool","name":"redeemed","type":"bool"},{"internalType":"bool","name":"refunded","type":"bool"}],"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":"uint256","name":"timelock","type":"uint256"},{"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
608060409080825234620001835760001943014381116200016d57406003556000908160045560208101906b098c2f2cae4e6eec2e040ac760a31b8252600c81526200004b8162000188565b51902082516001600160401b039390919060a083018581118482101762000159578082526200007a8162000188565b600b81526a098c2f2cae4e6eec2e0ac760ab1b60c08501528352805192620000a28462000188565b600184526020840190603160f81b825284602082015246838201523060608201528360808201525160208151910120935190209181519260208401947fd87cd6ef79d4e2b95e15ce8abf732db51ec771f1ca2edccf22a46c729ac5647286528385015260608401524660808401523060a084015260c083015260c0825260e0820194828610908611176200014557849052519020905561208e9081620001bb8239f35b634e487b7160e01b84526041600452602484fd5b634e487b7160e01b85526041600452602485fd5b634e487b7160e01b600052601160045260246000fd5b600080fd5b604081019081106001600160401b03821117620001a457604052565b634e487b7160e01b600052604160045260246000fdfe60a0604052600436101561001257600080fd5b60003560e01c8063213fe2b71461159a578063673da154146114255780637249fbb61461130357806375ad1881146112b3578063984bc700146110825780639ced67bb14610862578063beeaa615146107ee5763d701abd81461007457600080fd5b6101003660031901126107e9576064356001600160a01b03811681036107e9576084356001600160401b0381116107e9576100b3903690600401611897565b60a4356001600160401b0381116107e9576100d2903690600401611897565b9060c4356001600160401b0381116107e9576100f2903690600401611897565b60e4356001600160401b0381116107e957610111903690600401611897565b9061011d341515611d5d565b61012a4260443511611b9d565b6004803560009081526001602052604090200154610154906001600160a01b031615155b15611d9a565b60405161016081611828565b81815284602082015282604082015283606082015233608082015260018060a01b03861660a082015260243560c082015260443560e0820152346101008201526000610120820152600061014082015260006101608201526004356000526001602052604060002081518051906001600160401b03821161056c5781906101e78454611994565b601f8111610799575b50602090601f831160011461072d57600092610722575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161056c5781906102416001850154611994565b601f81116106cf575b50602090601f831160011461065d57600092610652575b50508160011b916000199060031b1c19161760018201555b60408201518051906001600160401b03821161056c57819061029e6002850154611994565b601f81116105ff575b50602090601f831160011461058d57600092610582575b50508160011b916000199060031b1c19161760028201555b60608201518051906001600160401b03821161056c576102f96003840154611994565b601f8111610521575b50602090601f831160011461049b5793610160600a610425958561043399966103ef966104419d9c9a600092610490575b50508160011b916000199060031b1c19161760038201555b6004810160018060a01b03608086015116906bffffffffffffffffffffffff60a01b9182825416179055600582019060018060a01b0360a0870151169082541617905560c0840151600682015560e084015160078201556101008401516008820155610120840151600982015501916103d76101408201511515849060ff801983541691151516179055565b0151815461ff00191690151560081b61ff0016179055565b6103fa600435611ddc565b61041760405197602435895260e060208a015260e0890190611803565b908782036040890152611803565b908582036060870152611803565b908382036080850152611803565b913460a083015260443560c083015260018060a01b0316917f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4339280600435930390a460206040516004358152f35b015190503880610333565b906003840160005260206000209160005b601f19851681106105095750600a610425956001866103ef966104419d9c9a96610160966104339d9a601f198116106104f0575b505050811b01600382015561034b565b015160001960f88460031b161c191690553880806104e0565b919260206001819286850151815501940192016104ac565b600384016000526020600020601f840160051c81019160208510610562575b601f0160051c01905b8181106105565750610302565b60008155600101610549565b9091508190610540565b634e487b7160e01b600052604160045260246000fd5b0151905038806102be565b9250600284016000526020600020906000935b601f19841685106105e4576001945083601f198116106105cb575b505050811b0160028201556102d6565b015160001960f88460031b161c191690553880806105bb565b818101518355602094850194600190930192909101906105a0565b909150600284016000526020600020601f840160051c81016020851061064b575b90849392915b601f830160051c8201811061063c5750506102a7565b60008155859450600101610626565b5080610620565b015190503880610261565b9250600184016000526020600020906000935b601f19841685106106b4576001945083601f1981161061069b575b505050811b016001820155610279565b015160001960f88460031b161c1916905538808061068b565b81810151835560209485019460019093019290910190610670565b909150600184016000526020600020601f840160051c81016020851061071b575b90849392915b601f830160051c8201811061070c57505061024a565b600081558594506001016106f6565b50806106f0565b015190503880610207565b9250836000526020600020906000935b601f198416851061077e576001945083601f19811610610765575b505050811b01815561021c565b015160001960f88460031b161c19169055388080610758565b8181015183556020948501946001909301929091019061073d565b909150836000526020600020601f840160051c8101602085106107e2575b90849392915b601f830160051c820181106107d35750506101f0565b600081558594506001016107bd565b50806107b7565b600080fd5b346107e957366003190160c081126107e9576060136107e957604051606081018181106001600160401b0382111761056c576040526004358152602435602082015260443560408201526064359060ff821682036107e95760209161085a9160a4359160843591611e75565b604051908152f35b6101203660031901126107e9576004356001600160401b0381116107e95761088e9036906004016118de565b6024356001600160401b0381116107e9576108ad9036906004016118de565b906044356001600160401b0381116107e9576108cd9036906004016118de565b906064356001600160401b0381116107e9576108ed903690600401611897565b6084356001600160401b0381116107e95761090c903690600401611897565b60a4356001600160401b0381116107e95761092b903690600401611897565b9060c4356001600160401b0381116107e95761094b903690600401611897565b60e435939092906001600160a01b03851685036107e95761096d341515611d5d565b61097b426101043511611b9d565b60045460018101811161106c578060018092016004550160035418966109bc61014e89600052600160205260018060a01b0360046040600020015416151590565b6109c588611ddc565b604051986109d28a611828565b838a528260208b01528460408b01528560608b01523360808b015260018060a01b03871660a08b0152600060c08b01526101043560e08b0152346101008b015260006101208b015260006101408b015260006101608b0152886000526001602052604060002060805289518051906001600160401b03821161056c578190610a5c60805154611994565b601f811161101a575b50602090601f8311600114610faa57600092610f9f575b50508160011b916000199060031b1c191617608051555b60208a01518051906001600160401b03821161056c578190610aba60016080510154611994565b601f8111610f4a575b50602090601f8311600114610ed457600092610ec9575b50508160011b916000199060031b1c191617600160805101555b60408a01518051906001600160401b03821161056c578190610b1b60026080510154611994565b601f8111610e74575b50602090601f8311600114610dfe57600092610df3575b50508160011b916000199060031b1c191617600260805101555b60608a0151998a516001600160401b03811161056c57610b7a60036080510154611994565b601f8111610daa575b506020601f8211600114610d325781908c9d60009d9b9c9d92610d27575b50508160011b916000199060031b1c191617600360805101555b60808051908201516004820180546001600160a01b039283166001600160a01b03199182161790915560a084015160058401805491909316911617905560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a909101805460ff191691151560ff16919091178155906101600151815461ff00191690151560081b61ff0016179055604051986101208a526101208a01610c7091611e18565b89810360208b0152610c8191611e18565b88810360408a0152610c9291611e18565b8781036060890152610ca391611803565b8681036080880152610cb491611803565b85810360a0870152610cc591611803565b84810360c0860152610cd691611803565b3460e0850152610104356101008501526001600160a01b039092169233927f621d7904b7d4541d82c45ea65d90a26e91610e91bd1be090fc57b06d1725d9d7919081900390a4604051908152602090f35b015190508d80610ba1565b60036080510160005260206000209c60005b601f1984168110610d9257509c82918d9e6001949d9e9c9d601f19811610610d79575b505050811b0160036080510155610bbb565b015160001960f88460031b161c191690558d8080610d67565b828201518f556001909e019d60209283019201610d44565b6003608051016000526020600020601f830160051c810160208410610dec575b601f830160051c82018110610de0575050610b83565b60008155600101610dca565b5080610dca565b015190508c80610b3b565b92506002608051016000526020600020906000935b601f1984168510610e59576001945083601f19811610610e40575b505050811b0160026080510155610b55565b015160001960f88460031b161c191690558c8080610e2e565b81810151835560209485019460019093019290910190610e13565b9091506002608051016000526020600020601f840160051c810160208510610ec2575b90849392915b601f830160051c82018110610eb3575050610b24565b60008155859450600101610e9d565b5080610e97565b015190508c80610ada565b92506001608051016000526020600020906000935b601f1984168510610f2f576001945083601f19811610610f16575b505050811b0160016080510155610af4565b015160001960f88460031b161c191690558c8080610f04565b81810151835560209485019460019093019290910190610ee9565b9091506001608051016000526020600020601f840160051c810160208510610f98575b90849392915b601f830160051c82018110610f89575050610ac3565b60008155859450600101610f73565b5080610f6d565b015190508c80610a7c565b92506080516000526020600020906000935b601f1984168510610fff576001945083601f19811610610fe6575b505050811b0160805155610a93565b015160001960f88460031b161c191690558c8080610fd7565b81810151835560209485019460019093019290910190610fbc565b9091506080516000526020600020601f840160051c810160208510611065575b90849392915b601f830160051c82018110611056575050610a65565b60008155859450600101611040565b508061103a565b634e487b7160e01b600052601160045260246000fd5b346107e95760203660031901126107e95760006101606040516110a481611828565b6060815260606020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015201526004356000526001602052604060002060ff600a6040519261110c84611828565b6040516111248161111d81856119ce565b0382611844565b845260405161113a8161111d81600186016119ce565b60208501526040516111538161111d81600286016119ce565b604085015260405161116c8161111d81600386016119ce565b606085015260018060a01b03600482015416608085015260018060a01b0360058201541660a0850152600681015460c0850152600781015460e0850152600881015461010085015260098101546101208501520154818116151561014084015260081c1615156101608201526040518091602082526101606112476111ff835161018060208701526101a0860190611803565b61123261121e602086015192601f1993848983030160408a0152611803565b604086015183888303016060890152611803565b90606085015190868303016080870152611803565b9160018060a01b0360808201511660a085015260018060a01b0360a08201511660c085015260c081015160e085015260e0810151610100850152610100810151610120850152610120810151610140850152610140810151151582850152015115156101808301520390f35b346107e95760603660031901126107e957602061085a6004356112f66112f182600052600160205260018060a01b0360046040600020015416151590565b611a73565b6044359060243590611bdf565b346107e95760203660031901126107e9576004803560008181526001602052604090209091015461133e906001600160a01b03161515611a73565b806000526001602052604060002090600a8201805461136360ff8260081c1615611ab1565b61137060ff821615611af0565b600784015442106113ea5761ff00191661010017905560048201546008909201546020926113bb91600091829182918291906001600160a01b03165af16113b5611b2f565b50611b5f565b604051907f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b60405162461bcd60e51b81526020600482015260136024820152724e6f74205061737365642054696d656c6f636b60681b6044820152606490fd5b346107e95760403660031901126107e957600435602435906114626112f182600052600160205260018060a01b0360046040600020015416151590565b80600052602091600183526040600020906006820154604051858101838152868252604082018281106001600160401b0382111761056c578792816114b16000948260405283519283916117e0565b8101039060025afa1561158e576000510361155457600080808481946001600a6115229801918254906114ea60ff8360081c1615611ab1565b6114f760ff831615611af0565b600985015560ff19161790556005810154600890910154906001600160a01b03165af16113b5611b2f565b7f0f7c50d316885e5d3719752f760bbbbf7d56363501e721eea4d913e255b632e482604051338152a260405160018152f35b60405162461bcd60e51b8152600481018590526012602482015271090c2e6d0d8dec6d6409cdee8409ac2e8c6d60731b6044820152606490fd5b6040513d6000823e3d90fd5b346107e9576020806003193601126107e9576001600160a01b03600435818116908190036107e95760009060009060028054925b8381106116d35750506115f96115e384611865565b936115f16040519586611844565b808552611865565b8386019490601f190136863760009160005b84811061165557878688604051928392818401908285525180915260408401929160005b82811061163e57505050500390f35b83518552869550938101939281019260010161162f565b61165e8161195d565b9054600391821b1c6000526001895282846004604060002001541614611688575b5060010161160b565b61169382959261195d565b9054911b1c86518210156116bd57816116b6918a60019460051b8a010152611a64565b939061167f565b634e487b7160e01b600052603260045260246000fd5b826116dd8261195d565b9054600391821b1c6000526001808a5261111d61175760406000209361111d61172d6040519561170c87611828565b60405161171d8161111d818c6119ce565b8752604051928380928a016119ce565b8d8501526040516117448161111d818c8a016119ce565b60408501526040519283809287016119ce565b606082015261016089600484015416928360808401528a60058201541660a0840152600681015460c0840152600781015460e0840152600a600891828101546101008601526009810154610120860152015460ff9182821615156101408601521c161515910152146117cc575b6001016115ce565b936117d8600191611a64565b9490506117c4565b60005b8381106117f35750506000910152565b81810151838201526020016117e3565b9060209161181c815180928185528580860191016117e0565b601f01601f1916010190565b61018081019081106001600160401b0382111761056c57604052565b90601f801991011681019081106001600160401b0382111761056c57604052565b6001600160401b03811161056c5760051b60200190565b6001600160401b03811161056c57601f01601f191660200190565b81601f820112156107e9578035906118ae8261187c565b926118bc6040519485611844565b828452602083830101116107e957816000926020809301838601378301015290565b81601f820112156107e9578035916020916118f884611865565b936119066040519586611844565b808552838086019160051b830101928084116107e957848301915b8483106119315750505050505090565b82356001600160401b0381116107e957869161195284848094890101611897565b815201920191611921565b6002548110156116bd5760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b90600182811c921680156119c4575b60208310146119ae57565b634e487b7160e01b600052602260045260246000fd5b91607f16916119a3565b8054600093926119dd82611994565b91828252602093600191600181169081600014611a455750600114611a04575b5050505050565b90939495506000929192528360002092846000945b838610611a31575050505001019038808080806119fd565b805485870183015294019385908201611a19565b60ff19168685015250505090151560051b0101915038808080806119fd565b600019811461106c5760010190565b15611a7a57565b60405162461bcd60e51b815260206004820152600f60248201526e48544c43204e6f742045786973747360881b6044820152606490fd5b15611ab857565b60405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481499599d5b99195960821b6044820152606490fd5b15611af757565b60405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e4814995919595b595960821b6044820152606490fd5b3d15611b5a573d90611b408261187c565b91611b4e6040519384611844565b82523d6000602084013e565b606090565b15611b6657565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b15611ba457565b60405162461bcd60e51b81526020600482015260136024820152724e6f74204675747572652054696d656c6f636b60681b6044820152606490fd5b9190826000526001602052604060002090611c0460ff600a84015460081c1615611ab1565b611c0f428411611b9d565b6004820180546001600160a01b039390841633148015611d54575b15611d20576006810192835415600014611ce457847f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4938289965587600785015554169460058301541695600883015490611cd3604051948594855260e060208601526003611cc4611cb3611ca560e08901600186016119ce565b88810360408a0152846119ce565b8781036060890152600284016119ce565b918683036080880152016119ce565b9160a084015260c08301520390a490565b60405162461bcd60e51b815260206004820152601460248201527312185cda1b1bd8dac8105b1c9958591e4814d95d60621b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b4e6f20416c6c6f77616e636560a01b6044820152606490fd5b50303314611c2a565b15611d6457565b60405162461bcd60e51b815260206004820152600e60248201526d119d5b991cc8139bdd0814d95b9d60921b6044820152606490fd5b15611da157565b60405162461bcd60e51b815260206004820152601360248201527248544c4320416c72656164792045786973747360681b6044820152606490fd5b6002546801000000000000000081101561056c57806001611e00920160025561195d565b819291549060031b91821b91600019901b1916179055565b90808251908181526020809101926020808460051b8301019501936000915b848310611e475750505050505090565b9091929394958480611e65600193601f198682030187528a51611803565b9801930193019194939290611e37565b919092600091825493805194602093848301968751946040998a94858701978851908751958b8701987f45906d7e53feffed68a8db947e0f8839b1ee252166e8eead8c6ab3951a09c7b68a52870152606086015260808501526080845260a084016001600160401b03968582108883111761204457818e528551902060c086019261190160f01b845260c287015260e2860152604281526101208501968188109088111761203057868d52519020855260ff1661014083015261016082015261018001528480528390859060809060015afa156120265783518151855260018452868520600401546001600160a01b03918216911603611fee575193519051908551946375ad188160e01b8652600486015260248501526044840152808360648185305af1938415611fe357508193611faf575b50505090565b9091809350813d8311611fdc575b611fc78183611844565b81010312611fd9575051388080611fa9565b80fd5b503d611fbd565b51913d9150823e3d90fd5b855162461bcd60e51b8152600481018490526011602482015270496e76616c6964205369676e697475726560781b6044820152606490fd5b85513d85823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b634e487b7160e01b8c52604160045260248cfdfea2646970667358221220fc8e61a17986082c6323b10f12f7c547d0ed95cae2609a6d570e10993de6fd3e64736f6c63430008170033
Deployed Bytecode
0x60a0604052600436101561001257600080fd5b60003560e01c8063213fe2b71461159a578063673da154146114255780637249fbb61461130357806375ad1881146112b3578063984bc700146110825780639ced67bb14610862578063beeaa615146107ee5763d701abd81461007457600080fd5b6101003660031901126107e9576064356001600160a01b03811681036107e9576084356001600160401b0381116107e9576100b3903690600401611897565b60a4356001600160401b0381116107e9576100d2903690600401611897565b9060c4356001600160401b0381116107e9576100f2903690600401611897565b60e4356001600160401b0381116107e957610111903690600401611897565b9061011d341515611d5d565b61012a4260443511611b9d565b6004803560009081526001602052604090200154610154906001600160a01b031615155b15611d9a565b60405161016081611828565b81815284602082015282604082015283606082015233608082015260018060a01b03861660a082015260243560c082015260443560e0820152346101008201526000610120820152600061014082015260006101608201526004356000526001602052604060002081518051906001600160401b03821161056c5781906101e78454611994565b601f8111610799575b50602090601f831160011461072d57600092610722575b50508160011b916000199060031b1c19161781555b60208201518051906001600160401b03821161056c5781906102416001850154611994565b601f81116106cf575b50602090601f831160011461065d57600092610652575b50508160011b916000199060031b1c19161760018201555b60408201518051906001600160401b03821161056c57819061029e6002850154611994565b601f81116105ff575b50602090601f831160011461058d57600092610582575b50508160011b916000199060031b1c19161760028201555b60608201518051906001600160401b03821161056c576102f96003840154611994565b601f8111610521575b50602090601f831160011461049b5793610160600a610425958561043399966103ef966104419d9c9a600092610490575b50508160011b916000199060031b1c19161760038201555b6004810160018060a01b03608086015116906bffffffffffffffffffffffff60a01b9182825416179055600582019060018060a01b0360a0870151169082541617905560c0840151600682015560e084015160078201556101008401516008820155610120840151600982015501916103d76101408201511515849060ff801983541691151516179055565b0151815461ff00191690151560081b61ff0016179055565b6103fa600435611ddc565b61041760405197602435895260e060208a015260e0890190611803565b908782036040890152611803565b908582036060870152611803565b908382036080850152611803565b913460a083015260443560c083015260018060a01b0316917f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4339280600435930390a460206040516004358152f35b015190503880610333565b906003840160005260206000209160005b601f19851681106105095750600a610425956001866103ef966104419d9c9a96610160966104339d9a601f198116106104f0575b505050811b01600382015561034b565b015160001960f88460031b161c191690553880806104e0565b919260206001819286850151815501940192016104ac565b600384016000526020600020601f840160051c81019160208510610562575b601f0160051c01905b8181106105565750610302565b60008155600101610549565b9091508190610540565b634e487b7160e01b600052604160045260246000fd5b0151905038806102be565b9250600284016000526020600020906000935b601f19841685106105e4576001945083601f198116106105cb575b505050811b0160028201556102d6565b015160001960f88460031b161c191690553880806105bb565b818101518355602094850194600190930192909101906105a0565b909150600284016000526020600020601f840160051c81016020851061064b575b90849392915b601f830160051c8201811061063c5750506102a7565b60008155859450600101610626565b5080610620565b015190503880610261565b9250600184016000526020600020906000935b601f19841685106106b4576001945083601f1981161061069b575b505050811b016001820155610279565b015160001960f88460031b161c1916905538808061068b565b81810151835560209485019460019093019290910190610670565b909150600184016000526020600020601f840160051c81016020851061071b575b90849392915b601f830160051c8201811061070c57505061024a565b600081558594506001016106f6565b50806106f0565b015190503880610207565b9250836000526020600020906000935b601f198416851061077e576001945083601f19811610610765575b505050811b01815561021c565b015160001960f88460031b161c19169055388080610758565b8181015183556020948501946001909301929091019061073d565b909150836000526020600020601f840160051c8101602085106107e2575b90849392915b601f830160051c820181106107d35750506101f0565b600081558594506001016107bd565b50806107b7565b600080fd5b346107e957366003190160c081126107e9576060136107e957604051606081018181106001600160401b0382111761056c576040526004358152602435602082015260443560408201526064359060ff821682036107e95760209161085a9160a4359160843591611e75565b604051908152f35b6101203660031901126107e9576004356001600160401b0381116107e95761088e9036906004016118de565b6024356001600160401b0381116107e9576108ad9036906004016118de565b906044356001600160401b0381116107e9576108cd9036906004016118de565b906064356001600160401b0381116107e9576108ed903690600401611897565b6084356001600160401b0381116107e95761090c903690600401611897565b60a4356001600160401b0381116107e95761092b903690600401611897565b9060c4356001600160401b0381116107e95761094b903690600401611897565b60e435939092906001600160a01b03851685036107e95761096d341515611d5d565b61097b426101043511611b9d565b60045460018101811161106c578060018092016004550160035418966109bc61014e89600052600160205260018060a01b0360046040600020015416151590565b6109c588611ddc565b604051986109d28a611828565b838a528260208b01528460408b01528560608b01523360808b015260018060a01b03871660a08b0152600060c08b01526101043560e08b0152346101008b015260006101208b015260006101408b015260006101608b0152886000526001602052604060002060805289518051906001600160401b03821161056c578190610a5c60805154611994565b601f811161101a575b50602090601f8311600114610faa57600092610f9f575b50508160011b916000199060031b1c191617608051555b60208a01518051906001600160401b03821161056c578190610aba60016080510154611994565b601f8111610f4a575b50602090601f8311600114610ed457600092610ec9575b50508160011b916000199060031b1c191617600160805101555b60408a01518051906001600160401b03821161056c578190610b1b60026080510154611994565b601f8111610e74575b50602090601f8311600114610dfe57600092610df3575b50508160011b916000199060031b1c191617600260805101555b60608a0151998a516001600160401b03811161056c57610b7a60036080510154611994565b601f8111610daa575b506020601f8211600114610d325781908c9d60009d9b9c9d92610d27575b50508160011b916000199060031b1c191617600360805101555b60808051908201516004820180546001600160a01b039283166001600160a01b03199182161790915560a084015160058401805491909316911617905560c0820151600682015560e0820151600782015561010082015160088201556101208201516009820155610140820151600a909101805460ff191691151560ff16919091178155906101600151815461ff00191690151560081b61ff0016179055604051986101208a526101208a01610c7091611e18565b89810360208b0152610c8191611e18565b88810360408a0152610c9291611e18565b8781036060890152610ca391611803565b8681036080880152610cb491611803565b85810360a0870152610cc591611803565b84810360c0860152610cd691611803565b3460e0850152610104356101008501526001600160a01b039092169233927f621d7904b7d4541d82c45ea65d90a26e91610e91bd1be090fc57b06d1725d9d7919081900390a4604051908152602090f35b015190508d80610ba1565b60036080510160005260206000209c60005b601f1984168110610d9257509c82918d9e6001949d9e9c9d601f19811610610d79575b505050811b0160036080510155610bbb565b015160001960f88460031b161c191690558d8080610d67565b828201518f556001909e019d60209283019201610d44565b6003608051016000526020600020601f830160051c810160208410610dec575b601f830160051c82018110610de0575050610b83565b60008155600101610dca565b5080610dca565b015190508c80610b3b565b92506002608051016000526020600020906000935b601f1984168510610e59576001945083601f19811610610e40575b505050811b0160026080510155610b55565b015160001960f88460031b161c191690558c8080610e2e565b81810151835560209485019460019093019290910190610e13565b9091506002608051016000526020600020601f840160051c810160208510610ec2575b90849392915b601f830160051c82018110610eb3575050610b24565b60008155859450600101610e9d565b5080610e97565b015190508c80610ada565b92506001608051016000526020600020906000935b601f1984168510610f2f576001945083601f19811610610f16575b505050811b0160016080510155610af4565b015160001960f88460031b161c191690558c8080610f04565b81810151835560209485019460019093019290910190610ee9565b9091506001608051016000526020600020601f840160051c810160208510610f98575b90849392915b601f830160051c82018110610f89575050610ac3565b60008155859450600101610f73565b5080610f6d565b015190508c80610a7c565b92506080516000526020600020906000935b601f1984168510610fff576001945083601f19811610610fe6575b505050811b0160805155610a93565b015160001960f88460031b161c191690558c8080610fd7565b81810151835560209485019460019093019290910190610fbc565b9091506080516000526020600020601f840160051c810160208510611065575b90849392915b601f830160051c82018110611056575050610a65565b60008155859450600101611040565b508061103a565b634e487b7160e01b600052601160045260246000fd5b346107e95760203660031901126107e95760006101606040516110a481611828565b6060815260606020820152606060408201526060808201528260808201528260a08201528260c08201528260e082015282610100820152826101208201528261014082015201526004356000526001602052604060002060ff600a6040519261110c84611828565b6040516111248161111d81856119ce565b0382611844565b845260405161113a8161111d81600186016119ce565b60208501526040516111538161111d81600286016119ce565b604085015260405161116c8161111d81600386016119ce565b606085015260018060a01b03600482015416608085015260018060a01b0360058201541660a0850152600681015460c0850152600781015460e0850152600881015461010085015260098101546101208501520154818116151561014084015260081c1615156101608201526040518091602082526101606112476111ff835161018060208701526101a0860190611803565b61123261121e602086015192601f1993848983030160408a0152611803565b604086015183888303016060890152611803565b90606085015190868303016080870152611803565b9160018060a01b0360808201511660a085015260018060a01b0360a08201511660c085015260c081015160e085015260e0810151610100850152610100810151610120850152610120810151610140850152610140810151151582850152015115156101808301520390f35b346107e95760603660031901126107e957602061085a6004356112f66112f182600052600160205260018060a01b0360046040600020015416151590565b611a73565b6044359060243590611bdf565b346107e95760203660031901126107e9576004803560008181526001602052604090209091015461133e906001600160a01b03161515611a73565b806000526001602052604060002090600a8201805461136360ff8260081c1615611ab1565b61137060ff821615611af0565b600784015442106113ea5761ff00191661010017905560048201546008909201546020926113bb91600091829182918291906001600160a01b03165af16113b5611b2f565b50611b5f565b604051907f92b8d387b3b4732fb701784c5e553091c36997ec127e0865a7c990bc62cc7382600080a260018152f35b60405162461bcd60e51b81526020600482015260136024820152724e6f74205061737365642054696d656c6f636b60681b6044820152606490fd5b346107e95760403660031901126107e957600435602435906114626112f182600052600160205260018060a01b0360046040600020015416151590565b80600052602091600183526040600020906006820154604051858101838152868252604082018281106001600160401b0382111761056c578792816114b16000948260405283519283916117e0565b8101039060025afa1561158e576000510361155457600080808481946001600a6115229801918254906114ea60ff8360081c1615611ab1565b6114f760ff831615611af0565b600985015560ff19161790556005810154600890910154906001600160a01b03165af16113b5611b2f565b7f0f7c50d316885e5d3719752f760bbbbf7d56363501e721eea4d913e255b632e482604051338152a260405160018152f35b60405162461bcd60e51b8152600481018590526012602482015271090c2e6d0d8dec6d6409cdee8409ac2e8c6d60731b6044820152606490fd5b6040513d6000823e3d90fd5b346107e9576020806003193601126107e9576001600160a01b03600435818116908190036107e95760009060009060028054925b8381106116d35750506115f96115e384611865565b936115f16040519586611844565b808552611865565b8386019490601f190136863760009160005b84811061165557878688604051928392818401908285525180915260408401929160005b82811061163e57505050500390f35b83518552869550938101939281019260010161162f565b61165e8161195d565b9054600391821b1c6000526001895282846004604060002001541614611688575b5060010161160b565b61169382959261195d565b9054911b1c86518210156116bd57816116b6918a60019460051b8a010152611a64565b939061167f565b634e487b7160e01b600052603260045260246000fd5b826116dd8261195d565b9054600391821b1c6000526001808a5261111d61175760406000209361111d61172d6040519561170c87611828565b60405161171d8161111d818c6119ce565b8752604051928380928a016119ce565b8d8501526040516117448161111d818c8a016119ce565b60408501526040519283809287016119ce565b606082015261016089600484015416928360808401528a60058201541660a0840152600681015460c0840152600781015460e0840152600a600891828101546101008601526009810154610120860152015460ff9182821615156101408601521c161515910152146117cc575b6001016115ce565b936117d8600191611a64565b9490506117c4565b60005b8381106117f35750506000910152565b81810151838201526020016117e3565b9060209161181c815180928185528580860191016117e0565b601f01601f1916010190565b61018081019081106001600160401b0382111761056c57604052565b90601f801991011681019081106001600160401b0382111761056c57604052565b6001600160401b03811161056c5760051b60200190565b6001600160401b03811161056c57601f01601f191660200190565b81601f820112156107e9578035906118ae8261187c565b926118bc6040519485611844565b828452602083830101116107e957816000926020809301838601378301015290565b81601f820112156107e9578035916020916118f884611865565b936119066040519586611844565b808552838086019160051b830101928084116107e957848301915b8483106119315750505050505090565b82356001600160401b0381116107e957869161195284848094890101611897565b815201920191611921565b6002548110156116bd5760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b90600182811c921680156119c4575b60208310146119ae57565b634e487b7160e01b600052602260045260246000fd5b91607f16916119a3565b8054600093926119dd82611994565b91828252602093600191600181169081600014611a455750600114611a04575b5050505050565b90939495506000929192528360002092846000945b838610611a31575050505001019038808080806119fd565b805485870183015294019385908201611a19565b60ff19168685015250505090151560051b0101915038808080806119fd565b600019811461106c5760010190565b15611a7a57565b60405162461bcd60e51b815260206004820152600f60248201526e48544c43204e6f742045786973747360881b6044820152606490fd5b15611ab857565b60405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e481499599d5b99195960821b6044820152606490fd5b15611af757565b60405162461bcd60e51b815260206004820152601060248201526f105b1c9958591e4814995919595b595960821b6044820152606490fd5b3d15611b5a573d90611b408261187c565b91611b4e6040519384611844565b82523d6000602084013e565b606090565b15611b6657565b60405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606490fd5b15611ba457565b60405162461bcd60e51b81526020600482015260136024820152724e6f74204675747572652054696d656c6f636b60681b6044820152606490fd5b9190826000526001602052604060002090611c0460ff600a84015460081c1615611ab1565b611c0f428411611b9d565b6004820180546001600160a01b039390841633148015611d54575b15611d20576006810192835415600014611ce457847f5e06b20ba0f50b82924d9d1572f8205321dcb0b5e85339c70430dc65015801f4938289965587600785015554169460058301541695600883015490611cd3604051948594855260e060208601526003611cc4611cb3611ca560e08901600186016119ce565b88810360408a0152846119ce565b8781036060890152600284016119ce565b918683036080880152016119ce565b9160a084015260c08301520390a490565b60405162461bcd60e51b815260206004820152601460248201527312185cda1b1bd8dac8105b1c9958591e4814d95d60621b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b4e6f20416c6c6f77616e636560a01b6044820152606490fd5b50303314611c2a565b15611d6457565b60405162461bcd60e51b815260206004820152600e60248201526d119d5b991cc8139bdd0814d95b9d60921b6044820152606490fd5b15611da157565b60405162461bcd60e51b815260206004820152601360248201527248544c4320416c72656164792045786973747360681b6044820152606490fd5b6002546801000000000000000081101561056c57806001611e00920160025561195d565b819291549060031b91821b91600019901b1916179055565b90808251908181526020809101926020808460051b8301019501936000915b848310611e475750505050505090565b9091929394958480611e65600193601f198682030187528a51611803565b9801930193019194939290611e37565b919092600091825493805194602093848301968751946040998a94858701978851908751958b8701987f45906d7e53feffed68a8db947e0f8839b1ee252166e8eead8c6ab3951a09c7b68a52870152606086015260808501526080845260a084016001600160401b03968582108883111761204457818e528551902060c086019261190160f01b845260c287015260e2860152604281526101208501968188109088111761203057868d52519020855260ff1661014083015261016082015261018001528480528390859060809060015afa156120265783518151855260018452868520600401546001600160a01b03918216911603611fee575193519051908551946375ad188160e01b8652600486015260248501526044840152808360648185305af1938415611fe357508193611faf575b50505090565b9091809350813d8311611fdc575b611fc78183611844565b81010312611fd9575051388080611fa9565b80fd5b503d611fbd565b51913d9150823e3d90fd5b855162461bcd60e51b8152600481018490526011602482015270496e76616c6964205369676e697475726560781b6044820152606490fd5b85513d85823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b634e487b7160e01b8c52604160045260248cfdfea2646970667358221220fc8e61a17986082c6323b10f12f7c547d0ed95cae2609a6d570e10993de6fd3e64736f6c63430008170033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.