Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 259 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Release Escrow | 224746740 | 38 days ago | IN | 0 ETH | 0.00000146 | ||||
| Release Escrow | 224746727 | 38 days ago | IN | 0 ETH | 0.00000147 | ||||
| Release Escrow | 224746709 | 38 days ago | IN | 0 ETH | 0.00000147 | ||||
| Deposit Escrow | 224746695 | 38 days ago | IN | 0 ETH | 0.00000245 | ||||
| Initiate Escrow ... | 224746685 | 38 days ago | IN | 0 ETH | 0.00000427 | ||||
| Release Escrow | 224746229 | 38 days ago | IN | 0 ETH | 0.00000146 | ||||
| Release Escrow | 224746212 | 38 days ago | IN | 0 ETH | 0.00000147 | ||||
| Release Escrow | 224746199 | 38 days ago | IN | 0 ETH | 0.00000182 | ||||
| Deposit Escrow | 224746180 | 38 days ago | IN | 0 ETH | 0.00000245 | ||||
| Initiate Escrow ... | 224746164 | 38 days ago | IN | 0 ETH | 0.00000427 | ||||
| Initiate Escrow ... | 224744264 | 38 days ago | IN | 0 ETH | 0.00000427 | ||||
| Release Escrow | 179956743 | 173 days ago | IN | 0 ETH | 0.00000732 | ||||
| Deposit Escrow | 179956738 | 173 days ago | IN | 0 ETH | 0.00001226 | ||||
| Initiate Escrow ... | 179956732 | 173 days ago | IN | 0 ETH | 0.00002132 | ||||
| Release Escrow | 179956497 | 173 days ago | IN | 0 ETH | 0.00000732 | ||||
| Deposit Escrow | 179956490 | 173 days ago | IN | 0 ETH | 0.00001226 | ||||
| Initiate Escrow ... | 179956484 | 173 days ago | IN | 0 ETH | 0.00002132 | ||||
| Release Escrow | 179955678 | 173 days ago | IN | 0 ETH | 0.00000732 | ||||
| Deposit Escrow | 179955672 | 173 days ago | IN | 0 ETH | 0.00001226 | ||||
| Initiate Escrow ... | 179955665 | 173 days ago | IN | 0 ETH | 0.00002132 | ||||
| Release Escrow | 179954748 | 173 days ago | IN | 0 ETH | 0.00000732 | ||||
| Deposit Escrow | 179954743 | 173 days ago | IN | 0 ETH | 0.00001226 | ||||
| Initiate Escrow ... | 179954736 | 173 days ago | IN | 0 ETH | 0.00002132 | ||||
| Release Escrow | 179954466 | 173 days ago | IN | 0 ETH | 0.00000754 | ||||
| Deposit Escrow | 179954460 | 173 days ago | IN | 0 ETH | 0.00001266 |
Loading...
Loading
Contract Name:
XFTAssetSwaps_V5
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.18;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
interface IERC20Mintable {
function mint(address to, uint256 amount) external;
function transferFrom(address from, address to, uint256 amount) external returns (bool);
function transfer(address to, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
interface IERC20Burnable {
function burn(address from, uint256 amount) external;
function transferFrom(address from, address to, uint256 amount) external returns (bool);
function transfer(address to, uint256 amount) external returns (bool);
function balanceOf(address account) external view returns (uint256);
}
contract XFTAssetSwaps_V5 is ReentrancyGuard, AccessControl {
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
enum SwapType { STANDARD, ESCROW }
struct Swap {
SwapType swapType;
address initiator;
address participant;
address initiatorAsset;
address participantAsset;
uint128 initiatorAmount;
uint128 participantAmount;
bytes32 hashlock;
uint64 timelock;
uint128 releasedAmount;
address recipient;
bool initiatorDeposited;
bool participantDeposited;
bool completed;
bool refunded;
}
mapping(bytes32 => Swap) public swaps;
mapping(bytes32 => bool) public usedIds;
uint256 private nonce;
// Core Operations
event SwapInitiated(bytes32 indexed swapId, SwapType swapType, address indexed initiator, address indexed participant);
event SwapCompleted(bytes32 indexed swapId);
event SwapRefunded(bytes32 indexed swapId);
// Token Operations
event TokensLocked(bytes32 indexed swapId, address indexed token, address indexed user, uint256 amount);
event TokensMinted(bytes32 indexed swapId, address indexed token, address indexed to, uint256 amount);
event TokensReleased(bytes32 indexed swapId, address indexed token, address indexed to, uint256 amount);
// Escrow Specific
event EscrowProgress(bytes32 indexed swapId, uint256 released, uint256 remaining);
event RecipientChanged(bytes32 indexed swapId, address indexed oldRecipient, address indexed newRecipient);
modifier swapExists(bytes32 id) {
require(swaps[id].initiator != address(0), "Swap does not exist");
_;
}
modifier onlyInitiator(bytes32 id) {
require(msg.sender == swaps[id].initiator, "Only initiator allowed");
_;
}
modifier onlyParticipant(bytes32 id) {
require(msg.sender == swaps[id].participant, "Only participant allowed");
_;
}
constructor() {
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(ADMIN_ROLE, 0x2f572059DbC598C8acfeA4AF06FE4f7669D1b3b1);
}
// === ID GENERATION ===
function generateId(bytes32 salt) internal returns (bytes32) {
bytes32 id;
if (salt == bytes32(0)) {
// Auto-generate
id = keccak256(abi.encode(block.timestamp, msg.sender, nonce++));
} else {
// Manual with salt
id = keccak256(abi.encode(salt, msg.sender, block.number));
require(!usedIds[id], "ID already used");
usedIds[id] = true;
}
require(swaps[id].initiator == address(0), "ID collision");
return id;
}
// === STANDARD SWAP ===
function initiateSwap(
bytes32 salt,
address participant,
address assetA,
address assetB,
uint128 amtA,
uint128 amtB,
bytes32 hashlock,
uint64 timelock
) external nonReentrant returns (bytes32 id) {
id = generateId(salt);
require(participant != address(0) && participant != msg.sender, "Invalid participant");
require(amtA > 0 && amtB > 0, "Invalid amounts");
require(timelock > uint64(block.timestamp), "Invalid timelock");
require(hashlock != bytes32(0), "Invalid hashlock");
swaps[id] = Swap({
swapType: SwapType.STANDARD,
initiator: msg.sender,
participant: participant,
initiatorAsset: assetA,
participantAsset: assetB,
initiatorAmount: amtA,
participantAmount: amtB,
hashlock: hashlock,
timelock: timelock,
releasedAmount: 0,
recipient: address(0),
initiatorDeposited: true,
participantDeposited: false,
completed: false,
refunded: false
});
IERC20Mintable(assetA).transferFrom(msg.sender, address(this), amtA);
emit SwapInitiated(id, SwapType.STANDARD, msg.sender, participant);
emit TokensLocked(id, assetA, msg.sender, amtA);
}
function participateSwap(bytes32 id) external nonReentrant swapExists(id) onlyParticipant(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.STANDARD, "Not standard swap");
require(!s.participantDeposited && !s.completed && !s.refunded, "Cannot participate");
require(uint64(block.timestamp) < s.timelock, "Swap expired");
IERC20Mintable(s.participantAsset).transferFrom(msg.sender, address(this), s.participantAmount);
s.participantDeposited = true;
emit TokensLocked(id, s.participantAsset, msg.sender, s.participantAmount);
}
function claimSwap(bytes32 id, bytes32 preimage) external nonReentrant swapExists(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.STANDARD, "Not standard swap");
require(s.initiatorDeposited && s.participantDeposited, "Deposits missing");
require(!s.completed && !s.refunded, "Cannot claim");
require(uint64(block.timestamp) < s.timelock, "Swap expired");
require(sha256(abi.encodePacked(preimage)) == s.hashlock, "Bad preimage");
s.completed = true;
IERC20Mintable(s.participantAsset).transfer(s.initiator, s.participantAmount);
IERC20Mintable(s.initiatorAsset).transfer(s.participant, s.initiatorAmount);
emit TokensReleased(id, s.participantAsset, s.initiator, s.participantAmount);
emit TokensReleased(id, s.initiatorAsset, s.participant, s.initiatorAmount);
emit SwapCompleted(id);
}
function refundSwap(bytes32 id) external nonReentrant swapExists(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.STANDARD, "Not standard swap");
require(!s.completed && !s.refunded, "Cannot refund");
require(uint64(block.timestamp) >= s.timelock, "Too early");
require(msg.sender == s.initiator || msg.sender == s.participant, "Not swap party");
s.refunded = true;
if (s.initiatorDeposited) {
IERC20Mintable(s.initiatorAsset).transfer(s.initiator, s.initiatorAmount);
emit TokensReleased(id, s.initiatorAsset, s.initiator, s.initiatorAmount);
}
if (s.participantDeposited) {
IERC20Mintable(s.participantAsset).transfer(s.participant, s.participantAmount);
emit TokensReleased(id, s.participantAsset, s.participant, s.participantAmount);
}
emit SwapRefunded(id);
}
// === ESCROW ===
function initiateEscrowMint(
bytes32 salt,
address user,
address escrowToken,
address mintToken,
uint128 amount,
uint64 timelock,
address recipient
) external nonReentrant onlyRole(ADMIN_ROLE) returns (bytes32 id) {
id = generateId(salt);
require(user != address(0) && amount > 0, "Invalid params");
require(timelock > uint64(block.timestamp), "Invalid timelock");
require(recipient != address(0), "Invalid recipient");
swaps[id] = Swap({
swapType: SwapType.ESCROW,
initiator: user,
participant: address(this),
initiatorAsset: escrowToken,
participantAsset: mintToken,
initiatorAmount: amount,
participantAmount: amount,
hashlock: bytes32(0),
timelock: timelock,
releasedAmount: 0,
recipient: recipient,
initiatorDeposited: false,
participantDeposited: true,
completed: false,
refunded: false
});
emit SwapInitiated(id, SwapType.ESCROW, user, address(this));
}
function setEscrowRecipient(bytes32 id, address recipient) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.ESCROW, "Not escrow swap");
require(!s.completed && !s.refunded, "Swap finalized");
require(recipient != address(0), "Invalid recipient");
address oldRecipient = s.recipient;
s.recipient = recipient;
emit RecipientChanged(id, oldRecipient, recipient);
}
function depositEscrow(bytes32 id) external nonReentrant swapExists(id) onlyInitiator(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.ESCROW, "Not escrow swap");
require(!s.initiatorDeposited && !s.completed && !s.refunded, "Cannot deposit");
require(uint64(block.timestamp) < s.timelock, "Swap expired");
IERC20Mintable(s.initiatorAsset).transferFrom(msg.sender, address(this), s.initiatorAmount);
IERC20Mintable(s.participantAsset).mint(msg.sender, s.participantAmount);
s.initiatorDeposited = true;
emit TokensLocked(id, s.initiatorAsset, msg.sender, s.initiatorAmount);
emit TokensMinted(id, s.participantAsset, msg.sender, s.participantAmount);
}
function releaseEscrow(bytes32 id, uint128 amount) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.ESCROW, "Not escrow swap");
require(s.initiatorDeposited && !s.completed && !s.refunded, "Cannot release");
require(uint64(block.timestamp) < s.timelock, "Swap expired");
require(amount > 0 && s.releasedAmount + amount <= s.initiatorAmount, "Invalid amount");
IERC20Mintable(s.initiatorAsset).transfer(s.recipient, amount);
s.releasedAmount += amount;
emit TokensReleased(id, s.initiatorAsset, s.recipient, amount);
emit EscrowProgress(id, s.releasedAmount, s.initiatorAmount - s.releasedAmount);
if (s.releasedAmount >= s.initiatorAmount) {
s.completed = true;
emit SwapCompleted(id);
}
}
function refundEscrow(bytes32 id) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.swapType == SwapType.ESCROW, "Not escrow swap");
require(s.initiatorDeposited && !s.completed && !s.refunded, "Cannot refund");
IERC20Burnable(s.participantAsset).burn(s.initiator, s.participantAmount);
uint128 remaining = s.initiatorAmount - s.releasedAmount;
if (remaining > 0) {
IERC20Mintable(s.initiatorAsset).transfer(s.initiator, remaining);
emit TokensReleased(id, s.initiatorAsset, s.initiator, remaining);
}
s.refunded = true;
emit SwapRefunded(id);
}
// === BATCH OPERATIONS ===
function batchReleaseEscrow(bytes32[] calldata ids, uint128[] calldata amounts)
external nonReentrant onlyRole(ADMIN_ROLE) {
require(ids.length == amounts.length, "Array length mismatch");
for (uint256 i = 0; i < ids.length; i++) {
_releaseEscrowInternal(ids[i], amounts[i]);
}
}
function _releaseEscrowInternal(bytes32 id, uint128 amount) internal {
require(swaps[id].initiator != address(0), "Swap does not exist");
Swap storage s = swaps[id];
require(s.swapType == SwapType.ESCROW, "Not escrow swap");
require(s.initiatorDeposited && !s.completed && !s.refunded, "Cannot release");
require(uint64(block.timestamp) < s.timelock, "Swap expired");
require(amount > 0 && s.releasedAmount + amount <= s.initiatorAmount, "Invalid amount");
IERC20Mintable(s.initiatorAsset).transfer(s.recipient, amount);
s.releasedAmount += amount;
emit TokensReleased(id, s.initiatorAsset, s.recipient, amount);
emit EscrowProgress(id, s.releasedAmount, s.initiatorAmount - s.releasedAmount);
if (s.releasedAmount >= s.initiatorAmount) {
s.completed = true;
emit SwapCompleted(id);
}
}
// === GETTERS ===
function getSwap(bytes32 id) external view swapExists(id) returns (
SwapType swapType,
address initiator,
address participant,
address initiatorAsset,
address participantAsset,
uint256 initiatorAmount,
uint256 participantAmount,
bytes32 hashlock,
uint256 timelock,
bool initiatorDeposited,
bool participantDeposited,
bool completed,
bool refunded,
uint256 releasedAmount,
address recipient
) {
Swap storage s = swaps[id];
return (
s.swapType, s.initiator, s.participant, s.initiatorAsset, s.participantAsset,
s.initiatorAmount, s.participantAmount, s.hashlock, s.timelock,
s.initiatorDeposited, s.participantDeposited, s.completed, s.refunded,
s.releasedAmount, s.recipient
);
}
function getBasic(bytes32 id) external view swapExists(id) returns (
SwapType swapType,
address initiator,
address participant,
address initiatorAsset,
address participantAsset,
uint256 initiatorAmount,
uint256 participantAmount
) {
Swap storage s = swaps[id];
return (s.swapType, s.initiator, s.participant, s.initiatorAsset, s.participantAsset, s.initiatorAmount, s.participantAmount);
}
function getStatus(bytes32 id) external view swapExists(id) returns (
bytes32 hashlock,
uint256 timelock,
bool initiatorDeposited,
bool participantDeposited,
bool completed,
bool refunded,
uint256 releasedAmount,
address recipient
) {
Swap storage s = swaps[id];
return (s.hashlock, s.timelock, s.initiatorDeposited, s.participantDeposited, s.completed, s.refunded, s.releasedAmount, s.recipient);
}
// === UTILITY ===
function isIdUsed(bytes32 id) external view returns (bool) {
return usedIds[id] || swaps[id].initiator != address(0);
}
function previewId(bytes32 salt) external view returns (bytes32) {
if (salt == bytes32(0)) {
return keccak256(abi.encode(block.timestamp, msg.sender, nonce));
} else {
return keccak256(abi.encode(salt, msg.sender, block.number));
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
enum Rounding {
Down, // Toward negative infinity
Up, // Toward infinity
Zero // Toward zero
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds up instead
* of rounding down.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
* with further edits by Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod0 := mul(x, y)
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
// See https://cs.stackexchange.com/q/138556/92363.
// Does not overflow because the denominator cannot be zero at this stage in the function.
uint256 twos = denominator & (~denominator + 1);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
// in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"released","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"remaining","type":"uint256"}],"name":"EscrowProgress","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"oldRecipient","type":"address"},{"indexed":true,"internalType":"address","name":"newRecipient","type":"address"}],"name":"RecipientChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"}],"name":"SwapCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":false,"internalType":"enum XFTAssetSwaps_V5.SwapType","name":"swapType","type":"uint8"},{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"participant","type":"address"}],"name":"SwapInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"}],"name":"SwapRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensReleased","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"ids","type":"bytes32[]"},{"internalType":"uint128[]","name":"amounts","type":"uint128[]"}],"name":"batchReleaseEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"bytes32","name":"preimage","type":"bytes32"}],"name":"claimSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"depositEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getBasic","outputs":[{"internalType":"enum XFTAssetSwaps_V5.SwapType","name":"swapType","type":"uint8"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"address","name":"initiatorAsset","type":"address"},{"internalType":"address","name":"participantAsset","type":"address"},{"internalType":"uint256","name":"initiatorAmount","type":"uint256"},{"internalType":"uint256","name":"participantAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getStatus","outputs":[{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint256","name":"timelock","type":"uint256"},{"internalType":"bool","name":"initiatorDeposited","type":"bool"},{"internalType":"bool","name":"participantDeposited","type":"bool"},{"internalType":"bool","name":"completed","type":"bool"},{"internalType":"bool","name":"refunded","type":"bool"},{"internalType":"uint256","name":"releasedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getSwap","outputs":[{"internalType":"enum XFTAssetSwaps_V5.SwapType","name":"swapType","type":"uint8"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"address","name":"initiatorAsset","type":"address"},{"internalType":"address","name":"participantAsset","type":"address"},{"internalType":"uint256","name":"initiatorAmount","type":"uint256"},{"internalType":"uint256","name":"participantAmount","type":"uint256"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint256","name":"timelock","type":"uint256"},{"internalType":"bool","name":"initiatorDeposited","type":"bool"},{"internalType":"bool","name":"participantDeposited","type":"bool"},{"internalType":"bool","name":"completed","type":"bool"},{"internalType":"bool","name":"refunded","type":"bool"},{"internalType":"uint256","name":"releasedAmount","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"escrowToken","type":"address"},{"internalType":"address","name":"mintToken","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint64","name":"timelock","type":"uint64"},{"internalType":"address","name":"recipient","type":"address"}],"name":"initiateEscrowMint","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"address","name":"assetA","type":"address"},{"internalType":"address","name":"assetB","type":"address"},{"internalType":"uint128","name":"amtA","type":"uint128"},{"internalType":"uint128","name":"amtB","type":"uint128"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint64","name":"timelock","type":"uint64"}],"name":"initiateSwap","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"isIdUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"participateSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"previewId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"refundEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"refundSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"uint128","name":"amount","type":"uint128"}],"name":"releaseEscrow","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"recipient","type":"address"}],"name":"setEscrowRecipient","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"swaps","outputs":[{"internalType":"enum XFTAssetSwaps_V5.SwapType","name":"swapType","type":"uint8"},{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"address","name":"initiatorAsset","type":"address"},{"internalType":"address","name":"participantAsset","type":"address"},{"internalType":"uint128","name":"initiatorAmount","type":"uint128"},{"internalType":"uint128","name":"participantAmount","type":"uint128"},{"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"internalType":"uint64","name":"timelock","type":"uint64"},{"internalType":"uint128","name":"releasedAmount","type":"uint128"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"bool","name":"initiatorDeposited","type":"bool"},{"internalType":"bool","name":"participantDeposited","type":"bool"},{"internalType":"bool","name":"completed","type":"bool"},{"internalType":"bool","name":"refunded","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"usedIds","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060408181523462000106576001600091818355828052602091808352818420338552835260ff828520541615620000cf575b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759182855281845280852093732f572059dbc598c8acfea4af06fe4f7669d1b3b194858752815260ff82872054161562000095575b61308287816200010c8239f35b838652828152818620908587525284209060ff198254161790556000805160206200318e833981519152339380a438808080808062000088565b83805280835281842033855283528184208160ff198254161790553333856000805160206200318e8339815191528180a462000033565b600080fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461248f5750806308481ffc14611fff5780631818a9fa14611cc4578063248a9ca314611c985780632f2ff15d14611be957806336568abe14611b565780633cb16c7314611afe5780633da0e66e146119da57806347aed508146117c05780635de28ae0146116fe57806366c83976146116d75780637319cade146114cd57806375b238fc146114925780637d01f2bd146110f85780637eadb31d146110c95780638dbeca9e14610d6057806391d1485414610d14578063a217fddf14610cf8578063a28f9c1614610c4d578063d4723ee314610998578063d547741f14610957578063eb84e7f214610858578063fb44e43014610570578063fd85226d146104395763fe2510ee1461013457600080fd5b34610436576020806003193601126104325760043590610152612bc3565b8183526002815260408320546001600160a01b0391906101789060081c83161515612d75565b828452600281526040842090815460ff8116600281101561041e5761019d9015612db7565b6007830180549160ff8360b01c16158061040f575b6101bb90612e55565b6001600160401b0380600687015416904216106103de5760081c85169133831480156103cf575b156103995760ff60b81b1916600160b81b1780825560a01c60ff166102f2575b60ff91505460a81c1661023e575b5050507fc506b8643b74e7a2fbb400c79e929dd5dfffb301fb07afb3b0e8e7c47925cf5a8280a26001815580f35b61027d6003830191848354169481600186019560048388541691019788548b60405180988195829463a9059cbb60e01b845260801c9060048401612e32565b03925af180156102e757879460008051602061302d8339815191529483926102ba575b505416945416945460801c604051908152a4388080610210565b6102d990853d87116102e0575b6102d18183612950565b810190612b81565b50386102a0565b503d6102c7565b6040513d8a823e3d90fd5b610330916002850186815416908560048801936001600160801b039384865416918d604051809a8195829463a9059cbb60e01b845260048401612e32565b03925af190811561038e57868960008051602061302d8339815191529260ff988d95610371575b505416938a8a5460081c16955416604051908152a4610202565b61038790843d86116102e0576102d18183612950565b5038610357565b6040513d8c823e3d90fd5b60405162461bcd60e51b815260048101859052600e60248201526d4e6f74207377617020706172747960901b6044820152606490fd5b508560018601541633146101e2565b60405162461bcd60e51b8152600481018590526009602482015268546f6f206561726c7960b81b6044820152606490fd5b5060b883901c60ff16156101b2565b634e487b7160e01b87526021600452602487fd5b5080fd5b80fd5b5034610436576040366003190112610436576004356104566124e4565b9061045f612bc3565b61046761258f565b808352600260205260408320546001600160a01b039061048d9060081c82161515612d75565b81845260026020526040842060ff815416600281101561055c57906104b6600160079314612ed1565b019283549060ff8260b01c16158061054e575b15610518578216936104dc851515612e91565b6001600160a01b031982168517905516907fc65d085062672e44da7d796805ba22daf52e84755f7da6b17c60cfb2db3271308480a46001815580f35b60405162461bcd60e51b815260206004820152600e60248201526d14ddd85c08199a5b985b1a5e995960921b6044820152606490fd5b5060ff8260b81c16156104c9565b634e487b7160e01b86526021600452602486fd5b5034610436576040366003190112610436576004356001600160801b036024351660243503610853576105a1612bc3565b6105a961258f565b808252600260205260408220546105cd9060081c6001600160a01b03161515612d75565b80825260026020526040822060ff815416600281101561083f5760016105f39114612ed1565b600781015460ff8160a01c1680610831575b80610822575b61061490612f0f565b61064e60068301546106336001600160401b0380831690421610612df7565b6001600160801b0360243516151590816107ef575b50612f67565b60028201805460405163a9059cbb60e01b8152919260209183916001600160a01b039182169183918a91839161068c91602435911660048401612e32565b03925af180156107e4576107c5575b506106c46106bb6024356001600160801b03600686015460401c16612f4c565b60068401612b5b565b5460078201546040516024356001600160801b0316815290916001600160a01b0383811692911690859060008051602061302d83398151915290602090a46001600160801b03600683015460401c166001600160801b0360048401541690847f8b2c7ca91521f96fbe92a918e6f1ff2cba778b596196107d3899b0d8f5d25fca6107736107518486612fa4565b604080516001600160801b038088168252909216602083015290918291820190565b0390a21015610785575b836001815580f35b60ff60b01b1916600160b01b17600791909101557fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108280a238808061077d565b6107dd9060203d6020116102e0576102d18183612950565b503861069b565b6040513d87823e3d90fd5b61080991506001600160801b036024359160401c16612f4c565b6001600160801b03806004860154169116111538610648565b5060b881901c60ff161561060b565b5060ff8160b01c1615610605565b634e487b7160e01b84526021600452602484fd5b600080fd5b50346104365760203660031901126104365760406101e091600435815260026020522060ff81549160018060a01b038060018301541691816002820154169082600382015416916004820154926005830154916007600685015494015496866040519a6108c78c8c831661253c565b60081c1660208b015260408a0152606089015260808801526001600160801b039283811660a089015260801c60c088015260e08701526001600160401b03811661010087015260401c166101208501528116610140840152818160a01c161515610160840152818160a81c161515610180840152818160b01c1615156101a084015260b81c1615156101c0820152f35b5034610436576040366003190112610436576109956004356109776124e4565b90808452600160205261099060016040862001546127c1565b612971565b80f35b50346104365760208060031936011261043257600435906109b7612bc3565b8183526002815260408320546001600160a01b0392906109dd9060081c84161515612d75565b8084526002825282604085205460081c163303610c0f5780845260028252604084209260ff845416600281101561055c576001610a1a9114612ed1565b6007840190815460ff8160a01c16159081610bff575b81610bf0575b5015610bba57610a576001600160401b038060068801541690421610612df7565b60028501918183541687600488019787610a956001600160801b0394858c54166040519586809481936323b872dd60e01b8352303360048501612b99565b03925af191821561038e57600392610b9d575b5001918884845416895490803b15610b99576040516340c10f1960e01b81529183918391829084908290610ae39060801c3360048401612e32565b03925af18015610b8e57610b76575b5050805460ff60a01b1916600160a01b179055925495546040519381168452957f34d445b1ce9e03c6f1ff46690151e7efee50f15a6a50f72b34f3d42730d3d5c993339184169086907fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f11908990a45416926040519460801c85523394a46001815580f35b610b7f90612922565b610b8a578838610af2565b8880fd5b6040513d84823e3d90fd5b8280fd5b610bb390893d8b116102e0576102d18183612950565b5038610aa8565b60405162461bcd60e51b815260048101859052600e60248201526d10d85b9b9bdd0819195c1bdcda5d60921b6044820152606490fd5b60ff915060b81c161538610a36565b905060ff8160b01c161590610a30565b60405162461bcd60e51b815260048101839052601660248201527513db9b1e481a5b9a5d1a585d1bdc88185b1b1bddd95960521b6044820152606490fd5b503461043657602036600319011261043657600435808252600260205260408083205460e0936001600160a01b03939091610c8e9060081c85161515612d75565b8152600260205220908154918160018201541682600283015416906004846003850154169301549360405195610cc78760ff831661253c565b60081c1660208601526040850152606084015260808301526001600160801b03811660a083015260801c60c0820152f35b5034610436578060031936011261043657602090604051908152f35b5034610436576040366003190112610436576040610d306124e4565b9160043581526001602052209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b5034610436576040366003190112610436576004356001600160401b03811161043257610d9190369060040161255f565b906024356001600160401b0381116110c557610db190369060040161255f565b929091610dbc612bc3565b610dc461258f565b83820361108857845b828110610ddc57856001815580f35b610de7818484612fbd565b35610df3828787612fbd565b356001600160801b03811681036110845781885260026020526040882054610e289060081c6001600160a01b03161515612d75565b8188526002602052604088209060ff82541660028110156110705790610e566001610eed9695949314612ed1565b602081600784015460ff8160a01c1680611062575b80611053575b610e7a90612f0f565b610eba6006860154610e9f6001600160401b0382166001600160401b03421610612df7565b836001600160801b03811615159182611023575b5050612f67565b60018060a01b03600286015416908d604051809a8195829463a9059cbb60e01b845260018060a01b031660048401612e32565b03925af194851561038e57610fbf95611004575b50610f1f6106bb826001600160801b03600686015460401c16612f4c565b600282015460078301546040516001600160801b039093168352916001600160a01b03838116921690859060008051602061302d83398151915290602090a46001600160801b03600683015460401c166001600160801b0360048401541690847f8b2c7ca91521f96fbe92a918e6f1ff2cba778b596196107d3899b0d8f5d25fca610fad6107518486612fa4565b0390a21015610fc4575b505050612c19565b610dcd565b60ff60b01b1916600160b01b17600791909101557fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108880a2388080610fb7565b61101c9060203d6020116102e0576102d18183612950565b5038610f01565b611039925060401c6001600160801b0316612f4c565b6001600160801b0380600489015416911611158338610eb3565b5060b881901c60ff1615610e71565b5060ff8160b01c1615610e6b565b634e487b7160e01b8a52602160045260248afd5b8780fd5b60405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606490fd5b8380fd5b50346104365760203660031901126104365760ff60406020926004358152600384522054166040519015158152f35b50346104365760e0366003190112610436576111126124e4565b61111a6124fa565b90611123612510565b9161112c612526565b60a435906001600160401b03821682036108535760c435916001600160a01b03831683036108535761115c612bc3565b61116461258f565b61116f600435612c3e565b956001600160a01b038616151580611480575b1561144a576001600160401b03926001600160801b03916111a885421686861611612b1c565b6111bc6001600160a01b0387161515612e91565b604051966111c9886128f0565b6001885260018060a01b038916602089015230604089015260018060a01b0316606088015260018060a01b03166080870152168060a086015260c08501528660e0850152166101008301528461012083015260018060a01b0316610140820152836101608201526001610180820152836101a0820152836101c08201528284526002602052604084208151600281101561055c57602095926101c060078461140d94600198965460ff6101008b60a81b038d88015160081b169216906affffffffffffffffffffff60a81b1617178155878060a01b036040850151166001600160601b0360a01b8983015416178882015560028101888060a01b036060860151166001600160601b0360a01b82541617905560038101888060a01b036080860151166001600160601b0360a01b825416179055600481016001600160801b0360a086015116815490896001600160801b031960c089015160801b1692161717905560e0840151600582015561136e600682016001600160401b03610100870151166001600160401b03198254161781556001600160801b036101208701511690612b5b565b6101408401519101805461016085015160ff60a01b1960a08b811b8c900395909516166001600160a81b03199092169190911790151590921b60ff60a01b16919091178155915b610180810151835460ff60a81b191690151560a81b60ff60a81b161783556101a0810151835460ff60b01b191690151560b01b60ff60b01b161783550151815460ff60b81b191690151560b81b60ff60b81b16179055565b604051838152847fb8f37b4fd73d774fc074f5c80b69eba735d01b2a41318fdd63a0c0bfb011e253873094878060a01b031693a455604051908152f35b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606490fd5b506001600160801b0383161515611182565b503461043657806003193601126104365760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b503461043657602080600319360112610432576004356114eb612bc3565b8083526002825260408320546001600160a01b0391906115119060081c83161515612d75565b808452600283528160016040862001541633036116925780845260028352604084209160ff835416600281101561055c5761154c9015612db7565b60078301805460ff8160a81c16159081611682575b81611673575b50156116395790859161158b6001600160401b038060068801541690421610612df7565b6003850190866115c060048585541698019788546040519788809481936323b872dd60e01b835260801c303360048501612b99565b03925af19384156102e7577fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f119461161c575b50600160a81b60ff60a81b198254161790555416925460801c936040519485523394a46001815580f35b61163290883d8a116102e0576102d18183612950565b50386115f2565b60405162461bcd60e51b815260048101869052601260248201527143616e6e6f7420706172746963697061746560701b6044820152606490fd5b60ff915060b81c161538611567565b905060ff8160b01c161590611561565b60405162461bcd60e51b815260048101849052601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152606490fd5b50346104365760203660031901126104365760206116f6600435612fcd565b604051908152f35b5034610436576020366003190112610436576004358082526002602052604080832054610100936001600160a01b039390916117409060081c85161515612d75565b8152600260205220906005820154916001600160801b0360076006830154920154916040519485526001600160401b038116602086015260ff8360a01c161515604086015260ff8360a81c161515606086015260ff8360b01c161515608086015260ff8360b81c16151560a086015260401c1660c08401521660e0820152f35b50346104365760208060031936011261043257600435906117df612bc3565b6117e761258f565b8183526002815260408320546001600160a01b03919061180d9060081c83161515612d75565b8284526002815260408420805460ff8116600281101561041e5760016118339114612ed1565b6007820193611857855460ff8160a01c1690816119ca575b816119bb575b50612e55565b8060038401541691876004850193845460801c90803b15610b995784836118999560405196879586948593632770a7eb60e21b855260081c1660048401612e32565b03925af180156102e7576119a8575b506118c86001600160801b038093541683600686015460401c1690612fa4565b9182169384611910575b855460ff60b81b1916600160b81b17865587877fc506b8643b74e7a2fbb400c79e929dd5dfffb301fb07afb3b0e8e7c47925cf5a8280a26001815580f35b611942918160028601948286541683885460081c168c60405180988195829463a9059cbb60e01b845260048401612e32565b03925af1801561199d57889460008051602061302d833981519152948392611980575b505416945460081c1694604051908152a438808080806118d2565b61199690853d87116102e0576102d18183612950565b5038611965565b6040513d8b823e3d90fd5b6119b490979197612922565b95386118a8565b60ff915060b81c161538611851565b905060ff8160b01c16159061184b565b50346104365760203660031901126104365760043580825260026020526040808320546101e0936001600160a01b03939091611a1c9060081c85161515612d75565b81526002602052209081549181600182015416908260028201541690836003820154169160048201549260058301549160076006850154940154958760405199611a698b60ff831661253c565b60081c1660208a01526040890152606088015260808701526001600160801b039283811660a088015260801c60c087015260e08601526001600160401b03811661010086015260ff8360a01c16151561012086015260ff8360a81c16151561014086015260ff8360b01c16151561016086015260ff8360b81c16151561018086015260401c166101a0840152166101c0820152f35b50346104365760203660031901126104365760209060043581526003825260ff604082205416908115611b37575b506040519015158152f35b60028352604090205460081c6001600160a01b03161515905038611b2c565b503461043657604036600319011261043657611b706124e4565b336001600160a01b03821603611b8c5761099590600435612971565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461043657604036600319011261043657600435611c066124e4565b8183526001602052611c1e60016040852001546127c1565b8183526001602052604083209060018060a01b03169081845260205260ff60408420541615611c4b578280f35b81835260016020526040832081845260205260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461043657602036600319011261043657600160406020926004358152828452200154604051908152f35b503461043657604036600319011261043657600435611ce1612bc3565b8082526002602090815260408320546001600160a01b039190611d0a9060081c83161515612d75565b828452600281526040842080549060ff8216600281101561041e57611d2f9015612db7565b60078101805460ff8160a01c1680611ff2575b15611fba5760ff8160b01c161580611fac575b15611f78576001600160401b03611d758160068601541682421610612df7565b6040518681016024358152878252604082019282841090841117611f6457918a9181611daa8a958260405283519283916128cd565b8101039060025afa15611f59578751600584015403611f2557918795949291869492600160b01b9060ff60b01b19161790556003810194808654169584600484019485549860405180998180948863a9059cbb60e01b9e8f845260801c9160081c16906004830191611e1b92612e32565b03925af19586156102e757611e6696611f08575b50600283018583825416986001860199858b54166001600160801b039c8d8a5416936040519c8d9586948593845260048401612e32565b03925af1948515611efd57838080948d9a8a99611ee0575b505416955460081c16905494886040518760801c815260008051602061302d833981519152998a91a454169554169560405191168152a47fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108280a26001815580f35b611ef6908a3d8c116102e0576102d18183612950565b5038611e7e565b6040513d8d823e3d90fd5b611f1e90863d88116102e0576102d18183612950565b5038611e2f565b60405162461bcd60e51b815260048101869052600c60248201526b42616420707265696d61676560a01b6044820152606490fd5b6040513d89823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b60405162461bcd60e51b815260048101869052600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606490fd5b5060ff8160b81c1615611d55565b60405162461bcd60e51b815260048101869052601060248201526f4465706f73697473206d697373696e6760801b6044820152606490fd5b5060ff8160a81c16611d42565b5034610436576101003660031901126104365761201a6124e4565b6120226124fa565b61202a612510565b91612033612526565b9060a435936001600160801b038516850361248b5760e435946001600160401b038616860361248757612064612bc3565b61206f600435612c3e565b956001600160a01b038416151580612474575b15612439576001600160801b038516151580612427575b156123f0576120bb6001600160401b0342166001600160401b03831611612b1c565b60c435156123b8576001600160801b036001600160401b0392604051946120e1866128f0565b8a865233602087015260018060a01b038716604087015260018060a01b038916606087015260018060a01b0316608086015281871660a08601521660c084015260c43560e0840152166101008201528561012082015285610140820152600161016082015285610180820152856101a0820152856101c0820152848652600260205260408620815160028110156123a4576007826101c0926122bc95945460ff610100600160a81b03602088015160081b169216906affffffffffffffffffffff60a81b161717815560018060a01b036040850151166001600160601b0360a01b6001830154161760018201556002810160018060a01b036060860151166001600160601b0360a01b8254161790556003810160018060a01b036080860151166001600160601b0360a01b8254161790556001600160801b0360a0850151166001600160801b031960c086015160801b1617600482015560e0840151600582015561227c600682016001600160401b03610100870151166001600160401b03198254161781556001600160801b036101208701511690612b5b565b6101408401519101805461016085015160ff60a01b90151560a01b166001600160a01b039093166001600160a81b031990911617919091178155916113b5565b6040516323b872dd60e01b8152602081806122dc86303360048501612b99565b0381896001600160a01b0389165af18015612399579160209693916001959361237c575b5060405190848252858060a01b031690867fb8f37b4fd73d774fc074f5c80b69eba735d01b2a41318fdd63a0c0bfb011e253893393a46001600160801b0360405191168152847fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f11873394878060a01b031693a455604051908152f35b61239290883d8a116102e0576102d18183612950565b5038612300565b6040513d88823e3d90fd5b634e487b7160e01b88526021600452602488fd5b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606490fd5b506001600160801b0382161515612099565b60405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606490fd5b506001600160a01b038416331415612082565b8680fd5b8580fd5b9050346104325760203660031901126104325760043563ffffffff60e01b8116809103610b995760209250637965db0b60e01b81149081156124d3575b5015158152f35b6301ffc9a760e01b149050386124cc565b602435906001600160a01b038216820361085357565b604435906001600160a01b038216820361085357565b606435906001600160a01b038216820361085357565b608435906001600160801b038216820361085357565b9060028210156125495752565b634e487b7160e01b600052602160045260246000fd5b9181601f84011215610853578235916001600160401b038311610853576020808501948460051b01011161085357565b3360009081527f50efbde2d46c37e9785f1791697f77e94bb7b701e19f1930a668820722d376946020908152604080832054909291907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759060019060ff16156125f9575050505050565b61260233612a0e565b9185519161260f83612935565b604283528483019560603688378351156127ad576030875383518210156127ad5790607860218501536041915b81831161273f575050506126fd57846126cb60486126ef9360449798519889916126bc8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a52612693815180928d6037890191016128cd565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906128cd565b01036028810189520187612950565b5194859362461bcd60e51b85526004850152518092816024860152858501906128cd565b601f01601f19168101030190fd5b60648386519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612799576f181899199a1a9b1b9c1cb0b131b232b360811b901a61276f85876129e7565b5360041c9280156127855760001901919061263c565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b6000818152600191602090838252604093848420338552835260ff8585205416156127ed575050505050565b6127f633612a0e565b9185519161280383612935565b604283528483019560603688378351156127ad576030875383518210156127ad5790607860218501536041915b818311612887575050506126fd57846126cb60486126ef9360449798519889916126bc8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a52612693815180928d6037890191016128cd565b909192600f81166010811015612799576f181899199a1a9b1b9c1cb0b131b232b360811b901a6128b785876129e7565b5360041c92801561278557600019019190612830565b60005b8381106128e05750506000910152565b81810151838201526020016128d0565b6101e081019081106001600160401b0382111761290c57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161290c57604052565b608081019081106001600160401b0382111761290c57604052565b90601f801991011681019081106001600160401b0382111761290c57604052565b906000918083526001602052604083209160018060a01b03169182845260205260ff6040842054166129a257505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b9081518110156129f8570160200190565b634e487b7160e01b600052603260045260246000fd5b60405190606082018281106001600160401b0382111761290c57604052602a82526020820160403682378251156129f8576030905381516001908110156129f857607860218401536029905b808211612aae575050612a6a5790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612b07576f181899199a1a9b1b9c1cb0b131b232b360811b901a612add84866129e7565b5360041c918015612af2576000190190612a5a565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15612b2357565b60405162461bcd60e51b815260206004820152601060248201526f496e76616c69642074696d656c6f636b60801b6044820152606490fd5b90600160401b600160c01b0382549160401b1690600160401b600160c01b031916179055565b90816020910312610853575180151581036108535790565b6001600160a01b039182168152911660208201526001600160801b03909116604082015260600190565b600260005414612bd4576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6000198114612c285760010190565b634e487b7160e01b600052601160045260246000fd5b80612ce15750600454612c5081612c19565b6004556040805142602082019081523392820192909252606081019290925290612c8781608081015b03601f198101835282612950565b5190205b60008181526002602052604090205460081c6001600160a01b0316612cad5790565b60405162461bcd60e51b815260206004820152600c60248201526b24a21031b7b63634b9b4b7b760a11b6044820152606490fd5b60408051602081019283523391810191909152436060820152612d078160808101612c79565b51902080600052600360205260ff60406000205416612d3e578060005260036020526040600020600160ff19825416179055612c8b565b60405162461bcd60e51b815260206004820152600f60248201526e125108185b1c9958591e481d5cd959608a1b6044820152606490fd5b15612d7c57565b60405162461bcd60e51b815260206004820152601360248201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606490fd5b15612dbe57565b60405162461bcd60e51b815260206004820152601160248201527004e6f74207374616e64617264207377617607c1b6044820152606490fd5b15612dfe57565b60405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606490fd5b6001600160a01b0390911681526001600160801b03909116602082015260400190565b15612e5c57565b60405162461bcd60e51b815260206004820152600d60248201526c10d85b9b9bdd081c99599d5b99609a1b6044820152606490fd5b15612e9857565b60405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b15612ed857565b60405162461bcd60e51b815260206004820152600f60248201526e04e6f7420657363726f77207377617608c1b6044820152606490fd5b15612f1657565b60405162461bcd60e51b815260206004820152600e60248201526d43616e6e6f742072656c6561736560901b6044820152606490fd5b9190916001600160801b0380809416911601918211612c2857565b15612f6e57565b60405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b6001600160801b039182169082160391908211612c2857565b91908110156129f85760051b0190565b80613006575060045460408051426020820190815233928201929092526060810192909252906130008160808101612c79565b51902090565b604080516020810192835233918101919091524360608201526130008160808101612c7956fe95d209edc2dd51498eb0f9b4c7fb85223de3a46f6a83e0aba5d2d0e9a0d72077a2646970667358221220e0195037bda68ac8d90a621069edacce50f4ae58fc7b8bf596e218edf0b5600964736f6c634300081200332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a71461248f5750806308481ffc14611fff5780631818a9fa14611cc4578063248a9ca314611c985780632f2ff15d14611be957806336568abe14611b565780633cb16c7314611afe5780633da0e66e146119da57806347aed508146117c05780635de28ae0146116fe57806366c83976146116d75780637319cade146114cd57806375b238fc146114925780637d01f2bd146110f85780637eadb31d146110c95780638dbeca9e14610d6057806391d1485414610d14578063a217fddf14610cf8578063a28f9c1614610c4d578063d4723ee314610998578063d547741f14610957578063eb84e7f214610858578063fb44e43014610570578063fd85226d146104395763fe2510ee1461013457600080fd5b34610436576020806003193601126104325760043590610152612bc3565b8183526002815260408320546001600160a01b0391906101789060081c83161515612d75565b828452600281526040842090815460ff8116600281101561041e5761019d9015612db7565b6007830180549160ff8360b01c16158061040f575b6101bb90612e55565b6001600160401b0380600687015416904216106103de5760081c85169133831480156103cf575b156103995760ff60b81b1916600160b81b1780825560a01c60ff166102f2575b60ff91505460a81c1661023e575b5050507fc506b8643b74e7a2fbb400c79e929dd5dfffb301fb07afb3b0e8e7c47925cf5a8280a26001815580f35b61027d6003830191848354169481600186019560048388541691019788548b60405180988195829463a9059cbb60e01b845260801c9060048401612e32565b03925af180156102e757879460008051602061302d8339815191529483926102ba575b505416945416945460801c604051908152a4388080610210565b6102d990853d87116102e0575b6102d18183612950565b810190612b81565b50386102a0565b503d6102c7565b6040513d8a823e3d90fd5b610330916002850186815416908560048801936001600160801b039384865416918d604051809a8195829463a9059cbb60e01b845260048401612e32565b03925af190811561038e57868960008051602061302d8339815191529260ff988d95610371575b505416938a8a5460081c16955416604051908152a4610202565b61038790843d86116102e0576102d18183612950565b5038610357565b6040513d8c823e3d90fd5b60405162461bcd60e51b815260048101859052600e60248201526d4e6f74207377617020706172747960901b6044820152606490fd5b508560018601541633146101e2565b60405162461bcd60e51b8152600481018590526009602482015268546f6f206561726c7960b81b6044820152606490fd5b5060b883901c60ff16156101b2565b634e487b7160e01b87526021600452602487fd5b5080fd5b80fd5b5034610436576040366003190112610436576004356104566124e4565b9061045f612bc3565b61046761258f565b808352600260205260408320546001600160a01b039061048d9060081c82161515612d75565b81845260026020526040842060ff815416600281101561055c57906104b6600160079314612ed1565b019283549060ff8260b01c16158061054e575b15610518578216936104dc851515612e91565b6001600160a01b031982168517905516907fc65d085062672e44da7d796805ba22daf52e84755f7da6b17c60cfb2db3271308480a46001815580f35b60405162461bcd60e51b815260206004820152600e60248201526d14ddd85c08199a5b985b1a5e995960921b6044820152606490fd5b5060ff8260b81c16156104c9565b634e487b7160e01b86526021600452602486fd5b5034610436576040366003190112610436576004356001600160801b036024351660243503610853576105a1612bc3565b6105a961258f565b808252600260205260408220546105cd9060081c6001600160a01b03161515612d75565b80825260026020526040822060ff815416600281101561083f5760016105f39114612ed1565b600781015460ff8160a01c1680610831575b80610822575b61061490612f0f565b61064e60068301546106336001600160401b0380831690421610612df7565b6001600160801b0360243516151590816107ef575b50612f67565b60028201805460405163a9059cbb60e01b8152919260209183916001600160a01b039182169183918a91839161068c91602435911660048401612e32565b03925af180156107e4576107c5575b506106c46106bb6024356001600160801b03600686015460401c16612f4c565b60068401612b5b565b5460078201546040516024356001600160801b0316815290916001600160a01b0383811692911690859060008051602061302d83398151915290602090a46001600160801b03600683015460401c166001600160801b0360048401541690847f8b2c7ca91521f96fbe92a918e6f1ff2cba778b596196107d3899b0d8f5d25fca6107736107518486612fa4565b604080516001600160801b038088168252909216602083015290918291820190565b0390a21015610785575b836001815580f35b60ff60b01b1916600160b01b17600791909101557fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108280a238808061077d565b6107dd9060203d6020116102e0576102d18183612950565b503861069b565b6040513d87823e3d90fd5b61080991506001600160801b036024359160401c16612f4c565b6001600160801b03806004860154169116111538610648565b5060b881901c60ff161561060b565b5060ff8160b01c1615610605565b634e487b7160e01b84526021600452602484fd5b600080fd5b50346104365760203660031901126104365760406101e091600435815260026020522060ff81549160018060a01b038060018301541691816002820154169082600382015416916004820154926005830154916007600685015494015496866040519a6108c78c8c831661253c565b60081c1660208b015260408a0152606089015260808801526001600160801b039283811660a089015260801c60c088015260e08701526001600160401b03811661010087015260401c166101208501528116610140840152818160a01c161515610160840152818160a81c161515610180840152818160b01c1615156101a084015260b81c1615156101c0820152f35b5034610436576040366003190112610436576109956004356109776124e4565b90808452600160205261099060016040862001546127c1565b612971565b80f35b50346104365760208060031936011261043257600435906109b7612bc3565b8183526002815260408320546001600160a01b0392906109dd9060081c84161515612d75565b8084526002825282604085205460081c163303610c0f5780845260028252604084209260ff845416600281101561055c576001610a1a9114612ed1565b6007840190815460ff8160a01c16159081610bff575b81610bf0575b5015610bba57610a576001600160401b038060068801541690421610612df7565b60028501918183541687600488019787610a956001600160801b0394858c54166040519586809481936323b872dd60e01b8352303360048501612b99565b03925af191821561038e57600392610b9d575b5001918884845416895490803b15610b99576040516340c10f1960e01b81529183918391829084908290610ae39060801c3360048401612e32565b03925af18015610b8e57610b76575b5050805460ff60a01b1916600160a01b179055925495546040519381168452957f34d445b1ce9e03c6f1ff46690151e7efee50f15a6a50f72b34f3d42730d3d5c993339184169086907fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f11908990a45416926040519460801c85523394a46001815580f35b610b7f90612922565b610b8a578838610af2565b8880fd5b6040513d84823e3d90fd5b8280fd5b610bb390893d8b116102e0576102d18183612950565b5038610aa8565b60405162461bcd60e51b815260048101859052600e60248201526d10d85b9b9bdd0819195c1bdcda5d60921b6044820152606490fd5b60ff915060b81c161538610a36565b905060ff8160b01c161590610a30565b60405162461bcd60e51b815260048101839052601660248201527513db9b1e481a5b9a5d1a585d1bdc88185b1b1bddd95960521b6044820152606490fd5b503461043657602036600319011261043657600435808252600260205260408083205460e0936001600160a01b03939091610c8e9060081c85161515612d75565b8152600260205220908154918160018201541682600283015416906004846003850154169301549360405195610cc78760ff831661253c565b60081c1660208601526040850152606084015260808301526001600160801b03811660a083015260801c60c0820152f35b5034610436578060031936011261043657602090604051908152f35b5034610436576040366003190112610436576040610d306124e4565b9160043581526001602052209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b5034610436576040366003190112610436576004356001600160401b03811161043257610d9190369060040161255f565b906024356001600160401b0381116110c557610db190369060040161255f565b929091610dbc612bc3565b610dc461258f565b83820361108857845b828110610ddc57856001815580f35b610de7818484612fbd565b35610df3828787612fbd565b356001600160801b03811681036110845781885260026020526040882054610e289060081c6001600160a01b03161515612d75565b8188526002602052604088209060ff82541660028110156110705790610e566001610eed9695949314612ed1565b602081600784015460ff8160a01c1680611062575b80611053575b610e7a90612f0f565b610eba6006860154610e9f6001600160401b0382166001600160401b03421610612df7565b836001600160801b03811615159182611023575b5050612f67565b60018060a01b03600286015416908d604051809a8195829463a9059cbb60e01b845260018060a01b031660048401612e32565b03925af194851561038e57610fbf95611004575b50610f1f6106bb826001600160801b03600686015460401c16612f4c565b600282015460078301546040516001600160801b039093168352916001600160a01b03838116921690859060008051602061302d83398151915290602090a46001600160801b03600683015460401c166001600160801b0360048401541690847f8b2c7ca91521f96fbe92a918e6f1ff2cba778b596196107d3899b0d8f5d25fca610fad6107518486612fa4565b0390a21015610fc4575b505050612c19565b610dcd565b60ff60b01b1916600160b01b17600791909101557fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108880a2388080610fb7565b61101c9060203d6020116102e0576102d18183612950565b5038610f01565b611039925060401c6001600160801b0316612f4c565b6001600160801b0380600489015416911611158338610eb3565b5060b881901c60ff1615610e71565b5060ff8160b01c1615610e6b565b634e487b7160e01b8a52602160045260248afd5b8780fd5b60405162461bcd60e51b8152602060048201526015602482015274082e4e4c2f240d8cadccee8d040dad2e6dac2e8c6d605b1b6044820152606490fd5b8380fd5b50346104365760203660031901126104365760ff60406020926004358152600384522054166040519015158152f35b50346104365760e0366003190112610436576111126124e4565b61111a6124fa565b90611123612510565b9161112c612526565b60a435906001600160401b03821682036108535760c435916001600160a01b03831683036108535761115c612bc3565b61116461258f565b61116f600435612c3e565b956001600160a01b038616151580611480575b1561144a576001600160401b03926001600160801b03916111a885421686861611612b1c565b6111bc6001600160a01b0387161515612e91565b604051966111c9886128f0565b6001885260018060a01b038916602089015230604089015260018060a01b0316606088015260018060a01b03166080870152168060a086015260c08501528660e0850152166101008301528461012083015260018060a01b0316610140820152836101608201526001610180820152836101a0820152836101c08201528284526002602052604084208151600281101561055c57602095926101c060078461140d94600198965460ff6101008b60a81b038d88015160081b169216906affffffffffffffffffffff60a81b1617178155878060a01b036040850151166001600160601b0360a01b8983015416178882015560028101888060a01b036060860151166001600160601b0360a01b82541617905560038101888060a01b036080860151166001600160601b0360a01b825416179055600481016001600160801b0360a086015116815490896001600160801b031960c089015160801b1692161717905560e0840151600582015561136e600682016001600160401b03610100870151166001600160401b03198254161781556001600160801b036101208701511690612b5b565b6101408401519101805461016085015160ff60a01b1960a08b811b8c900395909516166001600160a81b03199092169190911790151590921b60ff60a01b16919091178155915b610180810151835460ff60a81b191690151560a81b60ff60a81b161783556101a0810151835460ff60b01b191690151560b01b60ff60b01b161783550151815460ff60b81b191690151560b81b60ff60b81b16179055565b604051838152847fb8f37b4fd73d774fc074f5c80b69eba735d01b2a41318fdd63a0c0bfb011e253873094878060a01b031693a455604051908152f35b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606490fd5b506001600160801b0383161515611182565b503461043657806003193601126104365760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b503461043657602080600319360112610432576004356114eb612bc3565b8083526002825260408320546001600160a01b0391906115119060081c83161515612d75565b808452600283528160016040862001541633036116925780845260028352604084209160ff835416600281101561055c5761154c9015612db7565b60078301805460ff8160a81c16159081611682575b81611673575b50156116395790859161158b6001600160401b038060068801541690421610612df7565b6003850190866115c060048585541698019788546040519788809481936323b872dd60e01b835260801c303360048501612b99565b03925af19384156102e7577fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f119461161c575b50600160a81b60ff60a81b198254161790555416925460801c936040519485523394a46001815580f35b61163290883d8a116102e0576102d18183612950565b50386115f2565b60405162461bcd60e51b815260048101869052601260248201527143616e6e6f7420706172746963697061746560701b6044820152606490fd5b60ff915060b81c161538611567565b905060ff8160b01c161590611561565b60405162461bcd60e51b815260048101849052601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152606490fd5b50346104365760203660031901126104365760206116f6600435612fcd565b604051908152f35b5034610436576020366003190112610436576004358082526002602052604080832054610100936001600160a01b039390916117409060081c85161515612d75565b8152600260205220906005820154916001600160801b0360076006830154920154916040519485526001600160401b038116602086015260ff8360a01c161515604086015260ff8360a81c161515606086015260ff8360b01c161515608086015260ff8360b81c16151560a086015260401c1660c08401521660e0820152f35b50346104365760208060031936011261043257600435906117df612bc3565b6117e761258f565b8183526002815260408320546001600160a01b03919061180d9060081c83161515612d75565b8284526002815260408420805460ff8116600281101561041e5760016118339114612ed1565b6007820193611857855460ff8160a01c1690816119ca575b816119bb575b50612e55565b8060038401541691876004850193845460801c90803b15610b995784836118999560405196879586948593632770a7eb60e21b855260081c1660048401612e32565b03925af180156102e7576119a8575b506118c86001600160801b038093541683600686015460401c1690612fa4565b9182169384611910575b855460ff60b81b1916600160b81b17865587877fc506b8643b74e7a2fbb400c79e929dd5dfffb301fb07afb3b0e8e7c47925cf5a8280a26001815580f35b611942918160028601948286541683885460081c168c60405180988195829463a9059cbb60e01b845260048401612e32565b03925af1801561199d57889460008051602061302d833981519152948392611980575b505416945460081c1694604051908152a438808080806118d2565b61199690853d87116102e0576102d18183612950565b5038611965565b6040513d8b823e3d90fd5b6119b490979197612922565b95386118a8565b60ff915060b81c161538611851565b905060ff8160b01c16159061184b565b50346104365760203660031901126104365760043580825260026020526040808320546101e0936001600160a01b03939091611a1c9060081c85161515612d75565b81526002602052209081549181600182015416908260028201541690836003820154169160048201549260058301549160076006850154940154958760405199611a698b60ff831661253c565b60081c1660208a01526040890152606088015260808701526001600160801b039283811660a088015260801c60c087015260e08601526001600160401b03811661010086015260ff8360a01c16151561012086015260ff8360a81c16151561014086015260ff8360b01c16151561016086015260ff8360b81c16151561018086015260401c166101a0840152166101c0820152f35b50346104365760203660031901126104365760209060043581526003825260ff604082205416908115611b37575b506040519015158152f35b60028352604090205460081c6001600160a01b03161515905038611b2c565b503461043657604036600319011261043657611b706124e4565b336001600160a01b03821603611b8c5761099590600435612971565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461043657604036600319011261043657600435611c066124e4565b8183526001602052611c1e60016040852001546127c1565b8183526001602052604083209060018060a01b03169081845260205260ff60408420541615611c4b578280f35b81835260016020526040832081845260205260408320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461043657602036600319011261043657600160406020926004358152828452200154604051908152f35b503461043657604036600319011261043657600435611ce1612bc3565b8082526002602090815260408320546001600160a01b039190611d0a9060081c83161515612d75565b828452600281526040842080549060ff8216600281101561041e57611d2f9015612db7565b60078101805460ff8160a01c1680611ff2575b15611fba5760ff8160b01c161580611fac575b15611f78576001600160401b03611d758160068601541682421610612df7565b6040518681016024358152878252604082019282841090841117611f6457918a9181611daa8a958260405283519283916128cd565b8101039060025afa15611f59578751600584015403611f2557918795949291869492600160b01b9060ff60b01b19161790556003810194808654169584600484019485549860405180998180948863a9059cbb60e01b9e8f845260801c9160081c16906004830191611e1b92612e32565b03925af19586156102e757611e6696611f08575b50600283018583825416986001860199858b54166001600160801b039c8d8a5416936040519c8d9586948593845260048401612e32565b03925af1948515611efd57838080948d9a8a99611ee0575b505416955460081c16905494886040518760801c815260008051602061302d833981519152998a91a454169554169560405191168152a47fcbd087f9a8a65f06ed193f7147c5f9da5d4c1b09a2de92b7f4196854a3e0e7108280a26001815580f35b611ef6908a3d8c116102e0576102d18183612950565b5038611e7e565b6040513d8d823e3d90fd5b611f1e90863d88116102e0576102d18183612950565b5038611e2f565b60405162461bcd60e51b815260048101869052600c60248201526b42616420707265696d61676560a01b6044820152606490fd5b6040513d89823e3d90fd5b634e487b7160e01b8b52604160045260248bfd5b60405162461bcd60e51b815260048101869052600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606490fd5b5060ff8160b81c1615611d55565b60405162461bcd60e51b815260048101869052601060248201526f4465706f73697473206d697373696e6760801b6044820152606490fd5b5060ff8160a81c16611d42565b5034610436576101003660031901126104365761201a6124e4565b6120226124fa565b61202a612510565b91612033612526565b9060a435936001600160801b038516850361248b5760e435946001600160401b038616860361248757612064612bc3565b61206f600435612c3e565b956001600160a01b038416151580612474575b15612439576001600160801b038516151580612427575b156123f0576120bb6001600160401b0342166001600160401b03831611612b1c565b60c435156123b8576001600160801b036001600160401b0392604051946120e1866128f0565b8a865233602087015260018060a01b038716604087015260018060a01b038916606087015260018060a01b0316608086015281871660a08601521660c084015260c43560e0840152166101008201528561012082015285610140820152600161016082015285610180820152856101a0820152856101c0820152848652600260205260408620815160028110156123a4576007826101c0926122bc95945460ff610100600160a81b03602088015160081b169216906affffffffffffffffffffff60a81b161717815560018060a01b036040850151166001600160601b0360a01b6001830154161760018201556002810160018060a01b036060860151166001600160601b0360a01b8254161790556003810160018060a01b036080860151166001600160601b0360a01b8254161790556001600160801b0360a0850151166001600160801b031960c086015160801b1617600482015560e0840151600582015561227c600682016001600160401b03610100870151166001600160401b03198254161781556001600160801b036101208701511690612b5b565b6101408401519101805461016085015160ff60a01b90151560a01b166001600160a01b039093166001600160a81b031990911617919091178155916113b5565b6040516323b872dd60e01b8152602081806122dc86303360048501612b99565b0381896001600160a01b0389165af18015612399579160209693916001959361237c575b5060405190848252858060a01b031690867fb8f37b4fd73d774fc074f5c80b69eba735d01b2a41318fdd63a0c0bfb011e253893393a46001600160801b0360405191168152847fb64df744d1ae5af3157545a341ad27ba7390ffc9d9262575d6c17c16eca25f11873394878060a01b031693a455604051908152f35b61239290883d8a116102e0576102d18183612950565b5038612300565b6040513d88823e3d90fd5b634e487b7160e01b88526021600452602488fd5b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606490fd5b506001600160801b0382161515612099565b60405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606490fd5b506001600160a01b038416331415612082565b8680fd5b8580fd5b9050346104325760203660031901126104325760043563ffffffff60e01b8116809103610b995760209250637965db0b60e01b81149081156124d3575b5015158152f35b6301ffc9a760e01b149050386124cc565b602435906001600160a01b038216820361085357565b604435906001600160a01b038216820361085357565b606435906001600160a01b038216820361085357565b608435906001600160801b038216820361085357565b9060028210156125495752565b634e487b7160e01b600052602160045260246000fd5b9181601f84011215610853578235916001600160401b038311610853576020808501948460051b01011161085357565b3360009081527f50efbde2d46c37e9785f1791697f77e94bb7b701e19f1930a668820722d376946020908152604080832054909291907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759060019060ff16156125f9575050505050565b61260233612a0e565b9185519161260f83612935565b604283528483019560603688378351156127ad576030875383518210156127ad5790607860218501536041915b81831161273f575050506126fd57846126cb60486126ef9360449798519889916126bc8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a52612693815180928d6037890191016128cd565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906128cd565b01036028810189520187612950565b5194859362461bcd60e51b85526004850152518092816024860152858501906128cd565b601f01601f19168101030190fd5b60648386519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612799576f181899199a1a9b1b9c1cb0b131b232b360811b901a61276f85876129e7565b5360041c9280156127855760001901919061263c565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b6000818152600191602090838252604093848420338552835260ff8585205416156127ed575050505050565b6127f633612a0e565b9185519161280383612935565b604283528483019560603688378351156127ad576030875383518210156127ad5790607860218501536041915b818311612887575050506126fd57846126cb60486126ef9360449798519889916126bc8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a52612693815180928d6037890191016128cd565b909192600f81166010811015612799576f181899199a1a9b1b9c1cb0b131b232b360811b901a6128b785876129e7565b5360041c92801561278557600019019190612830565b60005b8381106128e05750506000910152565b81810151838201526020016128d0565b6101e081019081106001600160401b0382111761290c57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b03811161290c57604052565b608081019081106001600160401b0382111761290c57604052565b90601f801991011681019081106001600160401b0382111761290c57604052565b906000918083526001602052604083209160018060a01b03169182845260205260ff6040842054166129a257505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b9081518110156129f8570160200190565b634e487b7160e01b600052603260045260246000fd5b60405190606082018281106001600160401b0382111761290c57604052602a82526020820160403682378251156129f8576030905381516001908110156129f857607860218401536029905b808211612aae575050612a6a5790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612b07576f181899199a1a9b1b9c1cb0b131b232b360811b901a612add84866129e7565b5360041c918015612af2576000190190612a5a565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15612b2357565b60405162461bcd60e51b815260206004820152601060248201526f496e76616c69642074696d656c6f636b60801b6044820152606490fd5b90600160401b600160c01b0382549160401b1690600160401b600160c01b031916179055565b90816020910312610853575180151581036108535790565b6001600160a01b039182168152911660208201526001600160801b03909116604082015260600190565b600260005414612bd4576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b6000198114612c285760010190565b634e487b7160e01b600052601160045260246000fd5b80612ce15750600454612c5081612c19565b6004556040805142602082019081523392820192909252606081019290925290612c8781608081015b03601f198101835282612950565b5190205b60008181526002602052604090205460081c6001600160a01b0316612cad5790565b60405162461bcd60e51b815260206004820152600c60248201526b24a21031b7b63634b9b4b7b760a11b6044820152606490fd5b60408051602081019283523391810191909152436060820152612d078160808101612c79565b51902080600052600360205260ff60406000205416612d3e578060005260036020526040600020600160ff19825416179055612c8b565b60405162461bcd60e51b815260206004820152600f60248201526e125108185b1c9958591e481d5cd959608a1b6044820152606490fd5b15612d7c57565b60405162461bcd60e51b815260206004820152601360248201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606490fd5b15612dbe57565b60405162461bcd60e51b815260206004820152601160248201527004e6f74207374616e64617264207377617607c1b6044820152606490fd5b15612dfe57565b60405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606490fd5b6001600160a01b0390911681526001600160801b03909116602082015260400190565b15612e5c57565b60405162461bcd60e51b815260206004820152600d60248201526c10d85b9b9bdd081c99599d5b99609a1b6044820152606490fd5b15612e9857565b60405162461bcd60e51b8152602060048201526011602482015270125b9d985b1a59081c9958da5c1a595b9d607a1b6044820152606490fd5b15612ed857565b60405162461bcd60e51b815260206004820152600f60248201526e04e6f7420657363726f77207377617608c1b6044820152606490fd5b15612f1657565b60405162461bcd60e51b815260206004820152600e60248201526d43616e6e6f742072656c6561736560901b6044820152606490fd5b9190916001600160801b0380809416911601918211612c2857565b15612f6e57565b60405162461bcd60e51b815260206004820152600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b6001600160801b039182169082160391908211612c2857565b91908110156129f85760051b0190565b80613006575060045460408051426020820190815233928201929092526060810192909252906130008160808101612c79565b51902090565b604080516020810192835233918101919091524360608201526130008160808101612c7956fe95d209edc2dd51498eb0f9b4c7fb85223de3a46f6a83e0aba5d2d0e9a0d72077a2646970667358221220e0195037bda68ac8d90a621069edacce50f4ae58fc7b8bf596e218edf0b5600964736f6c63430008120033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.