Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 114 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Release Escrow | 177996033 | 190 days ago | IN | 0 ETH | 0.00000735 | ||||
| Release Escrow | 177996027 | 190 days ago | IN | 0 ETH | 0.00000739 | ||||
| Release Escrow | 177996022 | 190 days ago | IN | 0 ETH | 0.0000091 | ||||
| Deposit Escrow | 177996016 | 190 days ago | IN | 0 ETH | 0.00001214 | ||||
| Initiate Escrow ... | 177996007 | 190 days ago | IN | 0 ETH | 0.00002429 | ||||
| Release Escrow | 177993997 | 190 days ago | IN | 0 ETH | 0.00000735 | ||||
| Release Escrow | 177993991 | 190 days ago | IN | 0 ETH | 0.00000739 | ||||
| Release Escrow | 177993986 | 190 days ago | IN | 0 ETH | 0.0000091 | ||||
| Deposit Escrow | 177993982 | 190 days ago | IN | 0 ETH | 0.00001214 | ||||
| Initiate Escrow ... | 177993972 | 190 days ago | IN | 0 ETH | 0.00002429 | ||||
| Release Escrow | 177991698 | 190 days ago | IN | 0 ETH | 0.00000735 | ||||
| Release Escrow | 177991692 | 190 days ago | IN | 0 ETH | 0.00000739 | ||||
| Release Escrow | 177991686 | 190 days ago | IN | 0 ETH | 0.0000091 | ||||
| Deposit Escrow | 177991680 | 190 days ago | IN | 0 ETH | 0.00001214 | ||||
| Initiate Escrow ... | 177991669 | 190 days ago | IN | 0 ETH | 0.00002429 | ||||
| Release Escrow | 177991004 | 190 days ago | IN | 0 ETH | 0.00000735 | ||||
| Release Escrow | 177991001 | 190 days ago | IN | 0 ETH | 0.00000739 | ||||
| Release Escrow | 177990997 | 190 days ago | IN | 0 ETH | 0.0000091 | ||||
| Deposit Escrow | 177990993 | 190 days ago | IN | 0 ETH | 0.00001214 | ||||
| Initiate Escrow ... | 177990986 | 190 days ago | IN | 0 ETH | 0.00002429 | ||||
| Release Escrow | 177990480 | 190 days ago | IN | 0 ETH | 0.00000735 | ||||
| Release Escrow | 177990476 | 190 days ago | IN | 0 ETH | 0.00000738 | ||||
| Release Escrow | 177990472 | 190 days ago | IN | 0 ETH | 0.00000909 | ||||
| Deposit Escrow | 177990468 | 190 days ago | IN | 0 ETH | 0.00001214 | ||||
| Initiate Escrow ... | 177990460 | 190 days ago | IN | 0 ETH | 0.00002429 |
Loading...
Loading
Contract Name:
XFTAssetSwaps_V4
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_V4 is ReentrancyGuard, AccessControl {
bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");
struct Swap {
address initiator;
address participant;
address initiatorAsset;
address participantAsset;
uint256 initiatorAmount;
uint256 participantAmount;
bytes32 hashlock;
uint256 timelock;
bool initiatorDeposited;
bool participantDeposited;
bool completed;
bool refunded;
bool isAtomicMint;
bool isAtomicBurn;
bool isEscrowMint;
uint256 releasedAmount;
}
mapping(bytes32 => Swap) public swaps;
bytes32[] public swapIds;
event SwapInitiated(
bytes32 indexed swapId,
address indexed initiator,
address indexed participant,
address initiatorAsset,
uint256 initiatorAmount,
bytes32 hashlock,
uint256 timelock,
bool isAtomicMint,
bool isAtomicBurn,
bool isEscrowMint
);
event SwapParticipated(bytes32 indexed swapId, address indexed participant, address participantAsset, uint256 participantAmount);
event SwapCompleted(bytes32 indexed swapId, bytes32 preimage);
event SwapRefunded(bytes32 indexed swapId, address indexed refunder);
event AtomicMintExecuted(bytes32 indexed swapId, address indexed user, address burnToken, address mintToken, uint256 amount);
event AtomicBurnExecuted(bytes32 indexed swapId, address indexed user, address burnToken, address mintToken, uint256 amount);
event EscrowDeposited(bytes32 indexed swapId, address indexed user, uint256 amount);
event EscrowReleased(bytes32 indexed swapId, uint256 amount);
event EscrowRefunded(bytes32 indexed swapId);
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);
}
// --- Standard swap ---
function initiateSwap(
bytes32 id,
address participant,
address ia,
address pa,
uint256 iam,
uint256 pam,
bytes32 hl,
uint256 tl
) external nonReentrant {
require(swaps[id].initiator == address(0), "Swap exists");
require(participant != address(0) && participant != msg.sender, "Invalid participant");
require(iam > 0 && pam > 0, "Invalid amounts");
require(tl > block.timestamp, "Timelock must be future");
require(hl != bytes32(0), "Invalid hashlock");
swaps[id] = Swap({
initiator: msg.sender,
participant: participant,
initiatorAsset: ia,
participantAsset: pa,
initiatorAmount: iam,
participantAmount: pam,
hashlock: hl,
timelock: tl,
initiatorDeposited: true,
participantDeposited: false,
completed: false,
refunded: false,
isAtomicMint: false,
isAtomicBurn: false,
isEscrowMint: false,
releasedAmount: 0
});
IERC20Mintable(ia).transferFrom(msg.sender, address(this), iam);
swapIds.push(id);
emit SwapInitiated(id, msg.sender, participant, ia, iam, hl, tl, false, false, false);
}
function participateSwap(bytes32 id) external nonReentrant swapExists(id) onlyParticipant(id) {
Swap storage s = swaps[id];
require(!s.participantDeposited && !s.completed && !s.refunded && block.timestamp < s.timelock, "Cannot participate");
IERC20Mintable(s.participantAsset).transferFrom(msg.sender, address(this), s.participantAmount);
s.participantDeposited = true;
emit SwapParticipated(id, msg.sender, s.participantAsset, s.participantAmount);
}
function claimSwap(bytes32 id, bytes32 preimage) external nonReentrant swapExists(id) {
Swap storage s = swaps[id];
require(s.initiatorDeposited && s.participantDeposited && !s.completed && !s.refunded, "Cannot claim");
require(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 SwapCompleted(id, preimage);
}
function refundSwap(bytes32 id) external nonReentrant swapExists(id) {
Swap storage s = swaps[id];
require(!s.completed && !s.refunded && block.timestamp >= s.timelock, "Cannot refund");
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);
}
if (s.participantDeposited) {
IERC20Mintable(s.participantAsset).transfer(s.participant, s.participantAmount);
}
emit SwapRefunded(id, msg.sender);
}
// --- Atomic mint/burn ---
function initiateAtomicMint(
bytes32 id,
address user,
address burnToken,
address mintToken,
uint256 amount,
bytes32 hl,
uint256 tl
) external nonReentrant onlyRole(ADMIN_ROLE) {
require(swaps[id].initiator == address(0), "Swap exists");
require(user != address(0) && amount > 0 && tl > block.timestamp && hl != bytes32(0), "Invalid params");
swaps[id] = Swap({
initiator: user,
participant: address(this),
initiatorAsset: burnToken,
participantAsset: mintToken,
initiatorAmount: amount,
participantAmount: amount,
hashlock: hl,
timelock: tl,
initiatorDeposited: false,
participantDeposited: true,
completed: false,
refunded: false,
isAtomicMint: true,
isAtomicBurn: false,
isEscrowMint: false,
releasedAmount: 0
});
swapIds.push(id);
emit SwapInitiated(id, user, address(this), burnToken, amount, hl, tl, true, false, false);
}
function executeAtomicMint(bytes32 id, bytes32 preimage) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.isAtomicMint && !s.completed && !s.refunded && block.timestamp < s.timelock, "Cannot execute");
require(sha256(abi.encodePacked(preimage)) == s.hashlock, "Bad preimage");
s.completed = true;
IERC20Burnable(s.initiatorAsset).burn(s.initiator, s.initiatorAmount);
IERC20Mintable(s.participantAsset).mint(s.initiator, s.participantAmount);
emit AtomicMintExecuted(id, s.initiator, s.initiatorAsset, s.participantAsset, s.initiatorAmount);
emit SwapCompleted(id, preimage);
}
function initiateAtomicBurn(
bytes32 id,
address user,
address burnToken,
address mintToken,
uint256 amount,
bytes32 hl,
uint256 tl
) external nonReentrant onlyRole(ADMIN_ROLE) {
require(swaps[id].initiator == address(0), "Swap exists");
require(user != address(0) && amount > 0 && tl > block.timestamp && hl != bytes32(0), "Invalid params");
swaps[id] = Swap({
initiator: user,
participant: address(this),
initiatorAsset: burnToken,
participantAsset: mintToken,
initiatorAmount: amount,
participantAmount: amount,
hashlock: hl,
timelock: tl,
initiatorDeposited: false,
participantDeposited: true,
completed: false,
refunded: false,
isAtomicMint: false,
isAtomicBurn: true,
isEscrowMint: false,
releasedAmount: 0
});
swapIds.push(id);
emit SwapInitiated(id, user, address(this), burnToken, amount, hl, tl, false, true, false);
}
function executeAtomicBurn(bytes32 id, bytes32 preimage) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.isAtomicBurn && !s.completed && !s.refunded && block.timestamp < s.timelock, "Cannot execute");
require(sha256(abi.encodePacked(preimage)) == s.hashlock, "Bad preimage");
s.completed = true;
IERC20Burnable(s.initiatorAsset).burn(s.initiator, s.initiatorAmount);
IERC20Mintable(s.participantAsset).mint(s.initiator, s.participantAmount);
emit AtomicBurnExecuted(id, s.initiator, s.initiatorAsset, s.participantAsset, s.initiatorAmount);
emit SwapCompleted(id, preimage);
}
// --- Managed escrow with partial release ---
function initiateEscrowMint(
bytes32 id,
address user,
address escrowToken,
address mintToken,
uint256 amount,
uint256 tl
) external nonReentrant onlyRole(ADMIN_ROLE) {
require(swaps[id].initiator == address(0), "Swap exists");
require(user != address(0) && amount > 0 && tl > block.timestamp, "Invalid params");
swaps[id] = Swap({
initiator: user,
participant: address(this),
initiatorAsset: escrowToken,
participantAsset: mintToken,
initiatorAmount: amount,
participantAmount: amount,
hashlock: bytes32(0),
timelock: tl,
initiatorDeposited: false,
participantDeposited: true,
completed: false,
refunded: false,
isAtomicMint: false,
isAtomicBurn: false,
isEscrowMint: true,
releasedAmount: 0
});
swapIds.push(id);
emit SwapInitiated(id, user, address(this), escrowToken, amount, bytes32(0), tl, false, false, true);
}
function depositEscrow(bytes32 id) external nonReentrant swapExists(id) onlyInitiator(id) {
Swap storage s = swaps[id];
require(s.isEscrowMint && !s.initiatorDeposited && !s.completed && !s.refunded && block.timestamp < s.timelock, "Cannot deposit");
IERC20Mintable(s.initiatorAsset).transferFrom(msg.sender, address(this), s.initiatorAmount);
IERC20Mintable(s.participantAsset).mint(msg.sender, s.participantAmount);
s.initiatorDeposited = true;
emit EscrowDeposited(id, msg.sender, s.initiatorAmount);
}
function releaseEscrow(bytes32 id, uint256 amount) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.isEscrowMint && s.initiatorDeposited && !s.completed && !s.refunded && block.timestamp < s.timelock, "Cannot release");
require(amount > 0 && s.initiatorAmount - s.releasedAmount >= amount, "Invalid amount");
IERC20Burnable(s.initiatorAsset).burn(address(this), amount);
s.releasedAmount += amount;
emit EscrowReleased(id, amount);
if (s.releasedAmount == s.initiatorAmount) {
s.completed = true;
emit SwapCompleted(id, bytes32(0));
}
}
function refundEscrow(bytes32 id) external nonReentrant onlyRole(ADMIN_ROLE) swapExists(id) {
Swap storage s = swaps[id];
require(s.isEscrowMint && s.initiatorDeposited && !s.completed && !s.refunded, "Cannot refund");
IERC20Burnable(s.participantAsset).burn(s.initiator, s.participantAmount);
uint256 remaining = s.initiatorAmount - s.releasedAmount;
if (remaining > 0) {
IERC20Mintable(s.initiatorAsset).transfer(s.initiator, remaining);
}
s.refunded = true;
emit EscrowRefunded(id);
emit SwapRefunded(id, msg.sender);
}
// --- Getters ---
function getBasic(bytes32 id) external view swapExists(id) returns (address, address, address, address, uint256, uint256) {
Swap storage s = swaps[id];
return (s.initiator, s.participant, s.initiatorAsset, s.participantAsset, s.initiatorAmount, s.participantAmount);
}
function getStatus(bytes32 id) external view swapExists(id) returns (bytes32, uint256, bool, bool, bool, bool, bool, uint256) {
Swap storage s = swaps[id];
return (s.hashlock, s.timelock, s.initiatorDeposited, s.participantDeposited, s.completed, s.refunded, s.isEscrowMint, s.releasedAmount);
}
function getAllSwaps() external view returns (bytes32[] memory) {
return swapIds;
}
function getSwapCount() external view returns (uint256) {
return swapIds.length;
}
function getActiveSwaps() external view returns (bytes32[] memory) {
uint256 cnt;
for (uint i; i < swapIds.length; i++) {
Swap storage s = swaps[swapIds[i]];
if (!s.completed && !s.refunded && block.timestamp < s.timelock) cnt++;
}
bytes32[] memory active = new bytes32[](cnt);
uint j;
for (uint i; i < swapIds.length; i++) {
bytes32 sid = swapIds[i];
Swap storage s2 = swaps[sid];
if (!s2.completed && !s2.refunded && block.timestamp < s2.timelock) active[j++] = sid;
}
return active;
}
}// 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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"burnToken","type":"address"},{"indexed":false,"internalType":"address","name":"mintToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AtomicBurnExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"burnToken","type":"address"},{"indexed":false,"internalType":"address","name":"mintToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AtomicMintExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EscrowDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"}],"name":"EscrowRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EscrowReleased","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"},{"indexed":false,"internalType":"bytes32","name":"preimage","type":"bytes32"}],"name":"SwapCompleted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"initiator","type":"address"},{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":false,"internalType":"address","name":"initiatorAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"initiatorAmount","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"hashlock","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"timelock","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isAtomicMint","type":"bool"},{"indexed":false,"internalType":"bool","name":"isAtomicBurn","type":"bool"},{"indexed":false,"internalType":"bool","name":"isEscrowMint","type":"bool"}],"name":"SwapInitiated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"participant","type":"address"},{"indexed":false,"internalType":"address","name":"participantAsset","type":"address"},{"indexed":false,"internalType":"uint256","name":"participantAmount","type":"uint256"}],"name":"SwapParticipated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"swapId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"refunder","type":"address"}],"name":"SwapRefunded","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":"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"},{"internalType":"bytes32","name":"preimage","type":"bytes32"}],"name":"executeAtomicBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"bytes32","name":"preimage","type":"bytes32"}],"name":"executeAtomicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getActiveSwaps","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllSwaps","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"getBasic","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","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":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSwapCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"id","type":"bytes32"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"burnToken","type":"address"},{"internalType":"address","name":"mintToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"hl","type":"bytes32"},{"internalType":"uint256","name":"tl","type":"uint256"}],"name":"initiateAtomicBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"burnToken","type":"address"},{"internalType":"address","name":"mintToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32","name":"hl","type":"bytes32"},{"internalType":"uint256","name":"tl","type":"uint256"}],"name":"initiateAtomicMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"user","type":"address"},{"internalType":"address","name":"escrowToken","type":"address"},{"internalType":"address","name":"mintToken","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tl","type":"uint256"}],"name":"initiateEscrowMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"address","name":"ia","type":"address"},{"internalType":"address","name":"pa","type":"address"},{"internalType":"uint256","name":"iam","type":"uint256"},{"internalType":"uint256","name":"pam","type":"uint256"},{"internalType":"bytes32","name":"hl","type":"bytes32"},{"internalType":"uint256","name":"tl","type":"uint256"}],"name":"initiateSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"participateSwap","outputs":[],"stateMutability":"nonpayable","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":"uint256","name":"amount","type":"uint256"}],"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":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"swapIds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"swaps","outputs":[{"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":"bool","name":"isAtomicMint","type":"bool"},{"internalType":"bool","name":"isAtomicBurn","type":"bool"},{"internalType":"bool","name":"isEscrowMint","type":"bool"},{"internalType":"uint256","name":"releasedAmount","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060408181523462000106576001600091818355828052602091808352818420338552835260ff828520541615620000cf575b7fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759182855281845280852093732f572059dbc598c8acfea4af06fe4f7669d1b3b194858752815260ff82872054161562000095575b61311987816200010c8239f35b838652828152818620908587525284209060ff1982541617905560008051602062003225833981519152339380a438808080808062000088565b83805280835281842033855283528184208160ff19825416179055333385600080516020620032258339815191528180a462000033565b600080fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612739575080631818a9fa146124d75780631e78e27e1461229557806323a6229f14611fa0578063248a9ca314611f745780632f2ff15d14611ec15780632f807a4214611c8657806336568abe14611bf357806347aed508146119e35780635de28ae01461193b5780635e9d8576146116665780635fdb8324146113915780637319cade1461117c57806375b238fc146111415780638e2eae481461110757806391d14854146110bb578063a217fddf1461109f578063a28f9c1614611010578063cfd53d0614610e8a578063d4723ee314610c48578063d547741f14610c07578063d6cfeae014610b81578063d81671bc14610b63578063eb84e7f214610a6b578063ebe54078146107eb578063f05a4a55146103975763fe2510ee1461014a57600080fd5b34610394576020806003193601126103905760043590610168612ee6565b8183526002815260408320546001600160a01b039061018a9082161515612f3c565b8284526002825260408420906008820180549060ff8260101c161580610382575b80610374575b6101ba90612fb9565b82845416918233148015610365575b1561032f5763ff0000001981166301000000178255859060ff166102b4575b5060ff91505460081c16610227575b50505033907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c198380a36001815580f35b6003820154600183015460059093015460405163a9059cbb60e01b81529383166001600160a01b03166004850152602484015283918391168187816044810103925af180156102a95761027b575b806101f7565b8161029a92903d106102a2575b6102928183612ca0565b810190612e92565b503880610275565b503d610288565b6040513d86823e3d90fd5b600285015460048087015460405163a9059cbb60e01b81526001600160a01b0396909616918601919091526024850152839060449082908b9088165af19182156103245760ff92610307575b50846101e8565b61031d90863d88116102a2576102928183612ca0565b5038610300565b6040513d89823e3d90fd5b60405162461bcd60e51b815260048101879052600e60248201526d4e6f74207377617020706172747960901b6044820152606490fd5b508360018601541633146101c9565b5060078401544210156101b1565b5060ff8260181c16156101ab565b5080fd5b80fd5b503461039457610100366003190112610394576103b26127a9565b6103ba6127bf565b6103c26127d5565b916103cb612ee6565b6004358452600260205260408420546103ed906001600160a01b031615612e58565b6001600160a01b031691821515806107e1575b156107a65760843515158061079b575b15610764574260e435111561071f5760c435156106e7576040519061043482612c4b565b33825283602083015260018060a01b038316604083015260018060a01b03166060820152608435608082015260a43560a082015260c43560c082015260e43560e0820152600161010082015283610120820152836101408201528361016082015283610180820152836101a0820152836101c0820152836101e08201526004358452600260205260096101e0604086209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016105746101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff0000001617815561018082015181546101a08401516101c085015166ffffff0000000019909216921515602090811b64ff00000000169390931790151560281b60ff60281b161790151560301b60ff60301b161790915591015191909201556040516323b872dd60e01b81523360048201523060248201526084356044820152908180606481010381876001600160a01b0387165af180156102a9576106c8575b5061066e600435612eaa565b6040519060018060a01b03168152608435602082015260c435604082015260e435606082015260006080820152600060a0820152600060c082015233906000805160206130a483398151915260e060043592a46001815580f35b6106e09060203d6020116102a2576102928183612ca0565b5038610662565b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f54696d656c6f636b206d757374206265206675747572650000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606490fd5b5060a4351515610410565b60405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606490fd5b5033831415610400565b5034610394576107fa3661278e565b610802612ee6565b61080a6128c0565b8183526002602090815260408420546001600160a01b0392906108309084161515612f3c565b838552600282526040852060088101805460ff81861c1680610a5d575b80610a4f575b80610a42575b61086290613032565b848861088e6040518381019088825284815261087d81612c68565b604051928392839251928391612bfe565b8101039060025afa156103245762010000906108b08951600686015414612f7e565b62ff0000191617905560028101908482541687868354169160048401928354823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357610a1b575b50506003820195808754169289828254166005830154863b15610a17576040516340c10f1960e01b81526001600160a01b0392909216600483015260248201529481908690604490829084905af1948515610a0a578a956109e9575b505054935496549154604080519883166001600160a01b039081168a529383169093166020890152918701919091526000805160206130c4833981519152959216917f1690c010d2d14444cd2960e2541084b21c99319e973f0ffaf18d2790d79087899080606081015b0390a3604051908152a26001815580f35b6109f891929550939293612c21565b610a0657908792893861096e565b8880fd5b50604051903d90823e3d90fd5b8280fd5b610a2490612c21565b610a2f578738610912565b8780fd5b6040513d84823e3d90fd5b8380fd5b5060078301544210610859565b5060ff8160181c1615610853565b5060ff8160101c161561084d565b503461039457602036600319011261039457604061020091600435815260026020522060018060a01b0380825416918160018201541691806002830154169060038301541660048301546005840154906006850154926007860154946009600888015497015497604051998a5260208a015260408901526060880152608087015260a086015260c085015260e084015260ff908181161515610100850152818160081c161515610120850152818160101c161515610140850152818160181c161515610160850152818160201c161515610180850152818160281c1615156101a085015260301c1615156101c08301526101e0820152f35b50346103945780600319360112610394576020600354604051908152f35b5034610394578060031936011261039457604051600380548083529083526020808301937fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92915b828210610bf057610bec85610be081890382612ca0565b60405191829182612885565b0390f35b835486529485019460019384019390910190610bc9565b503461039457604036600319011261039457610c45600435610c276127a9565b908084526001602052610c406001604086200154612af2565b612cc2565b80f35b50346103945760208060031936011261039057600435610c66612ee6565b8083526002825260408320546001600160a01b0390610c889082161515612f3c565b81845260028352806040852054163303610e4c578184526002835260408420906008820191825460ff8160301c169081610e40575b81610e30575b81610e21575b5080610e14575b15610dde576002810154600480830180546040516323b872dd60e01b81523393810193909352306024840152604483015293889392889083906064908290889086165af19182156102a957600592610dc1575b5060038301541691015490803b15610a17576040516340c10f1960e01b8152336004820152602481019290925282908290604490829084905af18015610a3357610da9575b5050815460ff19166001179091555460405190815233927f7741da8d5fef6535db9c9101106e311884c9b79b32f04cc118998393920c324891a36001815580f35b610db290612c21565b610dbd578438610d68565b8480fd5b610dd790893d8b116102a2576102928183612ca0565b5038610d23565b60405162461bcd60e51b815260048101869052600e60248201526d10d85b9b9bdd0819195c1bdcda5d60921b6044820152606490fd5b5060078101544210610cd0565b60ff915060181c161538610cc9565b905060ff8160101c161590610cc3565b60ff8116159150610cbd565b60405162461bcd60e51b815260048101849052601660248201527513db9b1e481a5b9a5d1a585d1bdc88185b1b1bddd95960521b6044820152606490fd5b5034610394578060031936011261039457808160038054915b828110610f935750610eb48361308b565b92610ec26040519485612ca0565b808452610ed1601f199161308b565b0160209036828601378491855b848110610ef35760405180610bec8882612885565b610efc81612838565b905490831b1c808852600284526040882060088101549060ff808360101c16159283610f85575b505081610f77575b50610f40575b50610f3b9061307c565b610ede565b610f498561307c565b948751811015610f635760051b8701840152610f3b610f31565b634e487b7160e01b89526032600452602489fd5b600791500154421038610f2b565b60181c161591503880610f23565b610f9c81612838565b905490831b1c855260026020526040852060088101549060ff808360101c16159283611002575b505081610ff4575b50610fdf575b610fda9061307c565b610ea3565b92610fec610fda9161307c565b939050610fd1565b600791500154421038610fcb565b60181c161591503880610fc3565b503461039457602036600319011261039457600435808252600260205260408083205460c0936001600160a01b0393909161104e9085161515612f3c565b815260026020522090808254169181600182015416918060028301541690600383015416906005600484015493015493604051958652602086015260408501526060840152608083015260a0820152f35b5034610394578060031936011261039457602090604051908152f35b50346103945760403660031901126103945760406110d76127a9565b9160043581526001602052209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b5034610394576020366003190112610394576004359060035482101561039457602061113283612838565b90549060031b1c604051908152f35b503461039457806003193601126103945760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b5034610394576020806003193601126103905760043561119a612ee6565b8083526002825260408320546001600160a01b0392906111bd9084161515612f3c565b8184526002815282600160408620015416330361134d5781845260028152604084209260088401805460ff8160081c1615908161133d575b8161132e575b5080611321575b156112e757600385018054600590960180546040516323b872dd60e01b81523360048201523060248201526044810191909152909690949392908490869060649082908c9088165af19384156112dc577f36a01c935797536d077135d008f5d95df22b54744528d9cd0f795ab881c52a91956112b4956112be575b5050805461ff001916610100179055549454604080516001600160a01b039390971692909216865260208601523394918291820190565b0390a36001815580f35b816112d492903d106102a2576102928183612ca0565b50388061127d565b6040513d8a823e3d90fd5b60405162461bcd60e51b815260048101849052601260248201527143616e6e6f7420706172746963697061746560701b6044820152606490fd5b5060078501544210611202565b60ff915060181c1615386111fb565b905060ff8160101c1615906111f5565b6064906040519062461bcd60e51b82526004820152601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152fd5b5034610394576113a0366127eb565b926113b096949596929192612ee6565b6113b86128c0565b848852600260205260408820546113d8906001600160a01b031615612e58565b6001600160a01b03871615158061165d575b80611654575b8061164b575b6113ff90612ff5565b6040519061140c82612c4b565b60018060a01b038816825230602083015260018060a01b038716604083015260018060a01b031660608201528160808201528160a08201528260c08201528360e082015287610100820152600161012082015287610140820152876101608201526001610180820152876101a0820152876101c0820152876101e0820152848852600260205260096101e060408a209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e081015160078501556008840161154b6101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff000000001916171717905501519101556115f584612eaa565b6040519460018060a01b0316855260208501526040840152606083015260016080830152600060a0830152600060c08301526000805160206130a483398151915260e0309460018060a01b031693a46001815580f35b508215156113f6565b504284116113f0565b508115156113ea565b503461039457611675366127eb565b9261168596949596929192612ee6565b61168d6128c0565b848852600260205260408820546116ad906001600160a01b031615612e58565b6001600160a01b038716151580611932575b80611929575b80611920575b6116d490612ff5565b604051906116e182612c4b565b60018060a01b038816825230602083015260018060a01b038716604083015260018060a01b031660608201528160808201528160a08201528260c08201528360e082015287610100820152600161012082015287610140820152876101608201528761018082015260016101a0820152876101c0820152876101e0820152848852600260205260096101e060408a209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016118206101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff000000001916171717905501519101556118ca84612eaa565b6040519460018060a01b0316855260208501526040840152606083015260006080830152600160a0830152600060c08301526000805160206130a483398151915260e0309460018060a01b031693a46001815580f35b508215156116cb565b504284116116c5565b508115156116bf565b503461039457602036600319011261039457604061010091600435808252600260205261197460018060a01b0384842054161515612f3c565b815260026020522060068101549060ff6007820154916009600882015491015492604051948552602085015281811615156040850152818160081c1615156060850152818160101c1615156080850152818160181c16151560a085015260301c16151560c083015260e0820152f35b5034610394576020806003193601126103905760043590611a02612ee6565b611a0a6128c0565b8183526002815260408320546001600160a01b039190611a2d9083161515612f3c565b82845260028152604084206008810192611a62845460ff8160301c169081611be8575b81611bd8575b81611bc9575b50612fb9565b8581600384015416828454166005850154823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357611bb1575b5050611acb600483015460098401549061306f565b80611b38575b50505050630100000063ff00000019825416179055807f7b08f2d2a35d68f512d4ee819cc6c616e61aa7cd7f7b0855d95ba090d84dc4368380a233907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c198380a36001815580f35b6002830154925460405163a9059cbb60e01b81529083166001600160a01b0316600482015260248101919091529183918391168188816044810103925af18015611ba657611b88575b8080611ad1565b81611b9e92903d106102a2576102928183612ca0565b503880611b81565b6040513d87823e3d90fd5b611bba90612c21565b611bc5578538611ab6565b8580fd5b60ff915060181c161538611a5c565b905060ff8160101c161590611a56565b60ff81169150611a50565b503461039457604036600319011261039457611c0d6127a9565b336001600160a01b03821603611c2957610c4590600435612cc2565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461039457611c953661278e565b611c9d612ee6565b611ca56128c0565b8183526002602090815260408420546001600160a01b039290611ccb9084161515612f3c565b838552600282526040852060088101805460ff8160281c1680611eb3575b80611ea5575b80611e98575b611cfe90613032565b8488611d196040518381019088825284815261087d81612c68565b8101039060025afa15610324576201000090611d3b8951600686015414612f7e565b62ff0000191617905560028101908482541687868354169160048401928354823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357611e84575b50506003820195808754169289828254166005830154863b15610a17576040516340c10f1960e01b81526001600160a01b0392909216600483015260248201529481908690604490829084905af1948515610a0a578a95611e67575b505054935496549154604080519883166001600160a01b039081168a529383169093166020890152918701919091526000805160206130c4833981519152959216917f0ff034d6c2970c51b554272d214a1e55fb741dd26bfa3551fff4a9be9e42c96f9080606081016109d8565b611e7691929550939293612c21565b610a06579087928938611df9565b611e8d90612c21565b610a2f578738611d9d565b5060078301544210611cf5565b5060ff8160181c1615611cef565b5060ff8160101c1615611ce9565b503461039457604036600319011261039457600435611ede6127a9565b8183526001602052611ef66001604085200154612af2565b8183526001602052604083209060018060a01b0316908160005260205260ff6040600020541615611f25578280f35b818352600160205260408320816000526020526040600020600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461039457602036600319011261039457600160406020926004358152828452200154604051908152f35b50346103945760c036600319011261039457611fba6127a9565b611fc26127bf565b611fca6127d5565b611fd2612ee6565b611fda6128c0565b600435845260026020526040842054611ffc906001600160a01b031615612e58565b6001600160a01b03831615158061228a575b8061227f575b61201d90612ff5565b6040519061202a82612c4b565b60018060a01b038416825230602083015260018060a01b038316604083015260018060a01b03166060820152608435608082015260843560a08201528360c082015260a43560e0820152836101008201526001610120820152836101408201528361016082015283610180820152836101a082015260016101c0820152836101e08201526004358452600260205260096101e0604086209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016121716101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff0000000019161717179055015191015561221d600435612eaa565b6040519060018060a01b0316815260843560208201526000604082015260a435606082015260006080820152600060a0820152600160c0820152309160018060a01b0316906000805160206130a483398151915260e060043592a46001815580f35b504260a43511612014565b50608435151561200e565b5034610394576040366003190112610394576004356024356122b5612ee6565b6122bd6128c0565b8183526002602090815260408420546001600160a01b0392906122e39084161515612f3c565b8385526002825260408520906008820193845460ff8160301c1690816124cc575b816124bc575b816124ad575b50806124a0575b1561246a578115158061244e575b1561241857600283015416803b1561241457604051632770a7eb60e21b8152306004820152602481018390529087908290604490829084905af1801561032457612401575b5060098201918254928284018094116123eb577f9410e7c5b50451e4b5bd5ce113fd48abebd7070eb9d080df08b115b7cdc4165085600494868a9455604051908152a20154146123bd575b836001815580f35b6000805160206130c4833981519152916201000062ff000019825416179055604051848152a23880806123b5565b634e487b7160e01b600052601160045260246000fd5b61240d90969196612c21565b943861236a565b8680fd5b60405162461bcd60e51b815260048101859052600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b5081612463600485015460098601549061306f565b1015612325565b60405162461bcd60e51b815260048101859052600e60248201526d43616e6e6f742072656c6561736560901b6044820152606490fd5b5060078301544210612317565b60ff915060181c161538612310565b905060ff8160101c16159061230a565b60ff81169150612304565b5034610394576124e63661278e565b6124ee612ee6565b8183526002602052604083205461250f906001600160a01b03161515612f3c565b81835260026020526040832090600882019182549260ff84168061272c575b8061271e575b80612710575b156126dc5760078201544210156126a8576020866125676040518381019087825284815261087d81612c68565b8101039060025afa15611ba657620100006125db9461258c8851600686015414612f7e565b62ff0000191617905560038101548154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915294602092869216908290899082906044820190565b03925af1908115611ba65761263c9360209261268b575b506002810154600182015460049283015460405163a9059cbb60e01b81526001600160a01b0392831694810194909452602484015291948592909116908290889082906044820190565b03925af19081156102a9576000805160206130c48339815191529260209261266e575b50604051908152a26001815580f35b61268490833d85116102a2576102928183612ca0565b503861265f565b6126a190833d85116102a2576102928183612ca0565b50386125f2565b60405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606490fd5b5060ff8460181c161561253a565b5060ff8460101c1615612534565b5060ff8460081c1661252e565b9050346103905760203660031901126103905760043563ffffffff60e01b8116809103610a175760209250637965db0b60e01b811490811561277d575b5015158152f35b6301ffc9a760e01b14905038612776565b60409060031901126127a4576004359060243590565b600080fd5b602435906001600160a01b03821682036127a457565b604435906001600160a01b03821682036127a457565b606435906001600160a01b03821682036127a457565b60e09060031901126127a457600435906001600160a01b0360243581811681036127a4579160443582811681036127a4579160643590811681036127a457906084359060a4359060c43590565b60035481101561286f5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0190600090565b634e487b7160e01b600052603260045260246000fd5b6020908160408183019282815285518094520193019160005b8281106128ac575050505090565b83518552938101939281019260010161289e565b3360009081527f50efbde2d46c37e9785f1791697f77e94bb7b701e19f1930a668820722d376946020908152604080832054909291907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759060019060ff161561292a575050505050565b61293333612d49565b9185519161294083612c84565b60428352848301956060368837835115612ade57603087538351821015612ade5790607860218501536041915b818311612a7057505050612a2e57846129fc6048612a209360449798519889916129ed8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a526129c4815180928d603789019101612bfe565b8401917001034b99036b4b9b9b4b733903937b6329607d1b603784015251809386840190612bfe565b01036028810189520187612ca0565b5194859362461bcd60e51b8552600485015251809281602486015285850190612bfe565b601f01601f19168101030190fd5b60648386519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612aca576f181899199a1a9b1b9c1cb0b131b232b360811b901a612aa08587612d38565b5360041c928015612ab65760001901919061296d565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b6000818152600191602090838252604093848420338552835260ff858520541615612b1e575050505050565b612b2733612d49565b91855191612b3483612c84565b60428352848301956060368837835115612ade57603087538351821015612ade5790607860218501536041915b818311612bb857505050612a2e57846129fc6048612a209360449798519889916129ed8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a526129c4815180928d603789019101612bfe565b909192600f81166010811015612aca576f181899199a1a9b1b9c1cb0b131b232b360811b901a612be88587612d38565b5360041c928015612ab657600019019190612b61565b60005b838110612c115750506000910152565b8181015183820152602001612c01565b67ffffffffffffffff8111612c3557604052565b634e487b7160e01b600052604160045260246000fd5b610200810190811067ffffffffffffffff821117612c3557604052565b6040810190811067ffffffffffffffff821117612c3557604052565b6080810190811067ffffffffffffffff821117612c3557604052565b90601f8019910116810190811067ffffffffffffffff821117612c3557604052565b906000918083526001602052604083209160018060a01b03169182845260205260ff604084205416612cf357505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b90815181101561286f570160200190565b604051906060820182811067ffffffffffffffff821117612c3557604052602a825260208201604036823782511561286f5760309053815160019081101561286f57607860218401536029905b808211612dea575050612da65790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612e43576f181899199a1a9b1b9c1cb0b131b232b360811b901a612e198486612d38565b5360041c918015612e2e576000190190612d96565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15612e5f57565b60405162461bcd60e51b815260206004820152600b60248201526a537761702065786973747360a81b6044820152606490fd5b908160209103126127a4575180151581036127a45790565b60035468010000000000000000811015612c3557806001612ece9201600355612838565b819291549060031b91821b91600019901b1916179055565b600260005414612ef7576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b15612f4357565b60405162461bcd60e51b815260206004820152601360248201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606490fd5b15612f8557565b60405162461bcd60e51b815260206004820152600c60248201526b42616420707265696d61676560a01b6044820152606490fd5b15612fc057565b60405162461bcd60e51b815260206004820152600d60248201526c10d85b9b9bdd081c99599d5b99609a1b6044820152606490fd5b15612ffc57565b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606490fd5b1561303957565b60405162461bcd60e51b815260206004820152600e60248201526d43616e6e6f74206578656375746560901b6044820152606490fd5b919082039182116123eb57565b60001981146123eb5760010190565b67ffffffffffffffff8111612c355760051b6020019056fe56ab952d25400af7e525de6c26b18a94a6a03cb5f4c2b0d80fbd2cb9e3eb6f2f7430d80e0e3cfb925010ff8993f6a56392199211e297fc7825278f29980ccf51a26469706673582212209a58a506077630a27ce4d0deca8e45e43340ee3b2ac89a78e9d5c17c421f830364736f6c634300081200332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a714612739575080631818a9fa146124d75780631e78e27e1461229557806323a6229f14611fa0578063248a9ca314611f745780632f2ff15d14611ec15780632f807a4214611c8657806336568abe14611bf357806347aed508146119e35780635de28ae01461193b5780635e9d8576146116665780635fdb8324146113915780637319cade1461117c57806375b238fc146111415780638e2eae481461110757806391d14854146110bb578063a217fddf1461109f578063a28f9c1614611010578063cfd53d0614610e8a578063d4723ee314610c48578063d547741f14610c07578063d6cfeae014610b81578063d81671bc14610b63578063eb84e7f214610a6b578063ebe54078146107eb578063f05a4a55146103975763fe2510ee1461014a57600080fd5b34610394576020806003193601126103905760043590610168612ee6565b8183526002815260408320546001600160a01b039061018a9082161515612f3c565b8284526002825260408420906008820180549060ff8260101c161580610382575b80610374575b6101ba90612fb9565b82845416918233148015610365575b1561032f5763ff0000001981166301000000178255859060ff166102b4575b5060ff91505460081c16610227575b50505033907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c198380a36001815580f35b6003820154600183015460059093015460405163a9059cbb60e01b81529383166001600160a01b03166004850152602484015283918391168187816044810103925af180156102a95761027b575b806101f7565b8161029a92903d106102a2575b6102928183612ca0565b810190612e92565b503880610275565b503d610288565b6040513d86823e3d90fd5b600285015460048087015460405163a9059cbb60e01b81526001600160a01b0396909616918601919091526024850152839060449082908b9088165af19182156103245760ff92610307575b50846101e8565b61031d90863d88116102a2576102928183612ca0565b5038610300565b6040513d89823e3d90fd5b60405162461bcd60e51b815260048101879052600e60248201526d4e6f74207377617020706172747960901b6044820152606490fd5b508360018601541633146101c9565b5060078401544210156101b1565b5060ff8260181c16156101ab565b5080fd5b80fd5b503461039457610100366003190112610394576103b26127a9565b6103ba6127bf565b6103c26127d5565b916103cb612ee6565b6004358452600260205260408420546103ed906001600160a01b031615612e58565b6001600160a01b031691821515806107e1575b156107a65760843515158061079b575b15610764574260e435111561071f5760c435156106e7576040519061043482612c4b565b33825283602083015260018060a01b038316604083015260018060a01b03166060820152608435608082015260a43560a082015260c43560c082015260e43560e0820152600161010082015283610120820152836101408201528361016082015283610180820152836101a0820152836101c0820152836101e08201526004358452600260205260096101e0604086209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016105746101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff0000001617815561018082015181546101a08401516101c085015166ffffff0000000019909216921515602090811b64ff00000000169390931790151560281b60ff60281b161790151560301b60ff60301b161790915591015191909201556040516323b872dd60e01b81523360048201523060248201526084356044820152908180606481010381876001600160a01b0387165af180156102a9576106c8575b5061066e600435612eaa565b6040519060018060a01b03168152608435602082015260c435604082015260e435606082015260006080820152600060a0820152600060c082015233906000805160206130a483398151915260e060043592a46001815580f35b6106e09060203d6020116102a2576102928183612ca0565b5038610662565b60405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606490fd5b60405162461bcd60e51b815260206004820152601760248201527f54696d656c6f636b206d757374206265206675747572650000000000000000006044820152606490fd5b60405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606490fd5b5060a4351515610410565b60405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606490fd5b5033831415610400565b5034610394576107fa3661278e565b610802612ee6565b61080a6128c0565b8183526002602090815260408420546001600160a01b0392906108309084161515612f3c565b838552600282526040852060088101805460ff81861c1680610a5d575b80610a4f575b80610a42575b61086290613032565b848861088e6040518381019088825284815261087d81612c68565b604051928392839251928391612bfe565b8101039060025afa156103245762010000906108b08951600686015414612f7e565b62ff0000191617905560028101908482541687868354169160048401928354823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357610a1b575b50506003820195808754169289828254166005830154863b15610a17576040516340c10f1960e01b81526001600160a01b0392909216600483015260248201529481908690604490829084905af1948515610a0a578a956109e9575b505054935496549154604080519883166001600160a01b039081168a529383169093166020890152918701919091526000805160206130c4833981519152959216917f1690c010d2d14444cd2960e2541084b21c99319e973f0ffaf18d2790d79087899080606081015b0390a3604051908152a26001815580f35b6109f891929550939293612c21565b610a0657908792893861096e565b8880fd5b50604051903d90823e3d90fd5b8280fd5b610a2490612c21565b610a2f578738610912565b8780fd5b6040513d84823e3d90fd5b8380fd5b5060078301544210610859565b5060ff8160181c1615610853565b5060ff8160101c161561084d565b503461039457602036600319011261039457604061020091600435815260026020522060018060a01b0380825416918160018201541691806002830154169060038301541660048301546005840154906006850154926007860154946009600888015497015497604051998a5260208a015260408901526060880152608087015260a086015260c085015260e084015260ff908181161515610100850152818160081c161515610120850152818160101c161515610140850152818160181c161515610160850152818160201c161515610180850152818160281c1615156101a085015260301c1615156101c08301526101e0820152f35b50346103945780600319360112610394576020600354604051908152f35b5034610394578060031936011261039457604051600380548083529083526020808301937fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92915b828210610bf057610bec85610be081890382612ca0565b60405191829182612885565b0390f35b835486529485019460019384019390910190610bc9565b503461039457604036600319011261039457610c45600435610c276127a9565b908084526001602052610c406001604086200154612af2565b612cc2565b80f35b50346103945760208060031936011261039057600435610c66612ee6565b8083526002825260408320546001600160a01b0390610c889082161515612f3c565b81845260028352806040852054163303610e4c578184526002835260408420906008820191825460ff8160301c169081610e40575b81610e30575b81610e21575b5080610e14575b15610dde576002810154600480830180546040516323b872dd60e01b81523393810193909352306024840152604483015293889392889083906064908290889086165af19182156102a957600592610dc1575b5060038301541691015490803b15610a17576040516340c10f1960e01b8152336004820152602481019290925282908290604490829084905af18015610a3357610da9575b5050815460ff19166001179091555460405190815233927f7741da8d5fef6535db9c9101106e311884c9b79b32f04cc118998393920c324891a36001815580f35b610db290612c21565b610dbd578438610d68565b8480fd5b610dd790893d8b116102a2576102928183612ca0565b5038610d23565b60405162461bcd60e51b815260048101869052600e60248201526d10d85b9b9bdd0819195c1bdcda5d60921b6044820152606490fd5b5060078101544210610cd0565b60ff915060181c161538610cc9565b905060ff8160101c161590610cc3565b60ff8116159150610cbd565b60405162461bcd60e51b815260048101849052601660248201527513db9b1e481a5b9a5d1a585d1bdc88185b1b1bddd95960521b6044820152606490fd5b5034610394578060031936011261039457808160038054915b828110610f935750610eb48361308b565b92610ec26040519485612ca0565b808452610ed1601f199161308b565b0160209036828601378491855b848110610ef35760405180610bec8882612885565b610efc81612838565b905490831b1c808852600284526040882060088101549060ff808360101c16159283610f85575b505081610f77575b50610f40575b50610f3b9061307c565b610ede565b610f498561307c565b948751811015610f635760051b8701840152610f3b610f31565b634e487b7160e01b89526032600452602489fd5b600791500154421038610f2b565b60181c161591503880610f23565b610f9c81612838565b905490831b1c855260026020526040852060088101549060ff808360101c16159283611002575b505081610ff4575b50610fdf575b610fda9061307c565b610ea3565b92610fec610fda9161307c565b939050610fd1565b600791500154421038610fcb565b60181c161591503880610fc3565b503461039457602036600319011261039457600435808252600260205260408083205460c0936001600160a01b0393909161104e9085161515612f3c565b815260026020522090808254169181600182015416918060028301541690600383015416906005600484015493015493604051958652602086015260408501526060840152608083015260a0820152f35b5034610394578060031936011261039457602090604051908152f35b50346103945760403660031901126103945760406110d76127a9565b9160043581526001602052209060018060a01b0316600052602052602060ff604060002054166040519015158152f35b5034610394576020366003190112610394576004359060035482101561039457602061113283612838565b90549060031b1c604051908152f35b503461039457806003193601126103945760206040517fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217758152f35b5034610394576020806003193601126103905760043561119a612ee6565b8083526002825260408320546001600160a01b0392906111bd9084161515612f3c565b8184526002815282600160408620015416330361134d5781845260028152604084209260088401805460ff8160081c1615908161133d575b8161132e575b5080611321575b156112e757600385018054600590960180546040516323b872dd60e01b81523360048201523060248201526044810191909152909690949392908490869060649082908c9088165af19384156112dc577f36a01c935797536d077135d008f5d95df22b54744528d9cd0f795ab881c52a91956112b4956112be575b5050805461ff001916610100179055549454604080516001600160a01b039390971692909216865260208601523394918291820190565b0390a36001815580f35b816112d492903d106102a2576102928183612ca0565b50388061127d565b6040513d8a823e3d90fd5b60405162461bcd60e51b815260048101849052601260248201527143616e6e6f7420706172746963697061746560701b6044820152606490fd5b5060078501544210611202565b60ff915060181c1615386111fb565b905060ff8160101c1615906111f5565b6064906040519062461bcd60e51b82526004820152601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152fd5b5034610394576113a0366127eb565b926113b096949596929192612ee6565b6113b86128c0565b848852600260205260408820546113d8906001600160a01b031615612e58565b6001600160a01b03871615158061165d575b80611654575b8061164b575b6113ff90612ff5565b6040519061140c82612c4b565b60018060a01b038816825230602083015260018060a01b038716604083015260018060a01b031660608201528160808201528160a08201528260c08201528360e082015287610100820152600161012082015287610140820152876101608201526001610180820152876101a0820152876101c0820152876101e0820152848852600260205260096101e060408a209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e081015160078501556008840161154b6101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff000000001916171717905501519101556115f584612eaa565b6040519460018060a01b0316855260208501526040840152606083015260016080830152600060a0830152600060c08301526000805160206130a483398151915260e0309460018060a01b031693a46001815580f35b508215156113f6565b504284116113f0565b508115156113ea565b503461039457611675366127eb565b9261168596949596929192612ee6565b61168d6128c0565b848852600260205260408820546116ad906001600160a01b031615612e58565b6001600160a01b038716151580611932575b80611929575b80611920575b6116d490612ff5565b604051906116e182612c4b565b60018060a01b038816825230602083015260018060a01b038716604083015260018060a01b031660608201528160808201528160a08201528260c08201528360e082015287610100820152600161012082015287610140820152876101608201528761018082015260016101a0820152876101c0820152876101e0820152848852600260205260096101e060408a209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016118206101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff000000001916171717905501519101556118ca84612eaa565b6040519460018060a01b0316855260208501526040840152606083015260006080830152600160a0830152600060c08301526000805160206130a483398151915260e0309460018060a01b031693a46001815580f35b508215156116cb565b504284116116c5565b508115156116bf565b503461039457602036600319011261039457604061010091600435808252600260205261197460018060a01b0384842054161515612f3c565b815260026020522060068101549060ff6007820154916009600882015491015492604051948552602085015281811615156040850152818160081c1615156060850152818160101c1615156080850152818160181c16151560a085015260301c16151560c083015260e0820152f35b5034610394576020806003193601126103905760043590611a02612ee6565b611a0a6128c0565b8183526002815260408320546001600160a01b039190611a2d9083161515612f3c565b82845260028152604084206008810192611a62845460ff8160301c169081611be8575b81611bd8575b81611bc9575b50612fb9565b8581600384015416828454166005850154823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357611bb1575b5050611acb600483015460098401549061306f565b80611b38575b50505050630100000063ff00000019825416179055807f7b08f2d2a35d68f512d4ee819cc6c616e61aa7cd7f7b0855d95ba090d84dc4368380a233907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c198380a36001815580f35b6002830154925460405163a9059cbb60e01b81529083166001600160a01b0316600482015260248101919091529183918391168188816044810103925af18015611ba657611b88575b8080611ad1565b81611b9e92903d106102a2576102928183612ca0565b503880611b81565b6040513d87823e3d90fd5b611bba90612c21565b611bc5578538611ab6565b8580fd5b60ff915060181c161538611a5c565b905060ff8160101c161590611a56565b60ff81169150611a50565b503461039457604036600319011261039457611c0d6127a9565b336001600160a01b03821603611c2957610c4590600435612cc2565b60405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608490fd5b503461039457611c953661278e565b611c9d612ee6565b611ca56128c0565b8183526002602090815260408420546001600160a01b039290611ccb9084161515612f3c565b838552600282526040852060088101805460ff8160281c1680611eb3575b80611ea5575b80611e98575b611cfe90613032565b8488611d196040518381019088825284815261087d81612c68565b8101039060025afa15610324576201000090611d3b8951600686015414612f7e565b62ff0000191617905560028101908482541687868354169160048401928354823b15610a3e57604051632770a7eb60e21b81526001600160a01b0392909216600483015260248201529082908290604490829084905af18015610a3357611e84575b50506003820195808754169289828254166005830154863b15610a17576040516340c10f1960e01b81526001600160a01b0392909216600483015260248201529481908690604490829084905af1948515610a0a578a95611e67575b505054935496549154604080519883166001600160a01b039081168a529383169093166020890152918701919091526000805160206130c4833981519152959216917f0ff034d6c2970c51b554272d214a1e55fb741dd26bfa3551fff4a9be9e42c96f9080606081016109d8565b611e7691929550939293612c21565b610a06579087928938611df9565b611e8d90612c21565b610a2f578738611d9d565b5060078301544210611cf5565b5060ff8160181c1615611cef565b5060ff8160101c1615611ce9565b503461039457604036600319011261039457600435611ede6127a9565b8183526001602052611ef66001604085200154612af2565b8183526001602052604083209060018060a01b0316908160005260205260ff6040600020541615611f25578280f35b818352600160205260408320816000526020526040600020600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461039457602036600319011261039457600160406020926004358152828452200154604051908152f35b50346103945760c036600319011261039457611fba6127a9565b611fc26127bf565b611fca6127d5565b611fd2612ee6565b611fda6128c0565b600435845260026020526040842054611ffc906001600160a01b031615612e58565b6001600160a01b03831615158061228a575b8061227f575b61201d90612ff5565b6040519061202a82612c4b565b60018060a01b038416825230602083015260018060a01b038316604083015260018060a01b03166060820152608435608082015260843560a08201528360c082015260a43560e0820152836101008201526001610120820152836101408201528361016082015283610180820152836101a082015260016101c0820152836101e08201526004358452600260205260096101e0604086209260018060a01b038151166001600160601b0360a01b90818654161785556001850160018060a01b03602084015116828254161790556002850160018060a01b0360408401511682825416179055600385019060018060a01b03606084015116908254161790556080810151600485015560a0810151600585015560c0810151600685015560e08101516007850155600884016121716101008301511515829060ff801983541691151516179055565b610120820151815461ff00191690151560081b61ff0016178155610140820151815462ff0000191690151560101b62ff000016178155610160820151815463ff000000191690151560181b63ff000000161781556101808201511515815460ff60281b6101a0850151151560281b169064ff0000000060ff60301b6101c0870151151560301b169360201b169066ffffff0000000019161717179055015191015561221d600435612eaa565b6040519060018060a01b0316815260843560208201526000604082015260a435606082015260006080820152600060a0820152600160c0820152309160018060a01b0316906000805160206130a483398151915260e060043592a46001815580f35b504260a43511612014565b50608435151561200e565b5034610394576040366003190112610394576004356024356122b5612ee6565b6122bd6128c0565b8183526002602090815260408420546001600160a01b0392906122e39084161515612f3c565b8385526002825260408520906008820193845460ff8160301c1690816124cc575b816124bc575b816124ad575b50806124a0575b1561246a578115158061244e575b1561241857600283015416803b1561241457604051632770a7eb60e21b8152306004820152602481018390529087908290604490829084905af1801561032457612401575b5060098201918254928284018094116123eb577f9410e7c5b50451e4b5bd5ce113fd48abebd7070eb9d080df08b115b7cdc4165085600494868a9455604051908152a20154146123bd575b836001815580f35b6000805160206130c4833981519152916201000062ff000019825416179055604051848152a23880806123b5565b634e487b7160e01b600052601160045260246000fd5b61240d90969196612c21565b943861236a565b8680fd5b60405162461bcd60e51b815260048101859052600e60248201526d125b9d985b1a5908185b5bdd5b9d60921b6044820152606490fd5b5081612463600485015460098601549061306f565b1015612325565b60405162461bcd60e51b815260048101859052600e60248201526d43616e6e6f742072656c6561736560901b6044820152606490fd5b5060078301544210612317565b60ff915060181c161538612310565b905060ff8160101c16159061230a565b60ff81169150612304565b5034610394576124e63661278e565b6124ee612ee6565b8183526002602052604083205461250f906001600160a01b03161515612f3c565b81835260026020526040832090600882019182549260ff84168061272c575b8061271e575b80612710575b156126dc5760078201544210156126a8576020866125676040518381019087825284815261087d81612c68565b8101039060025afa15611ba657620100006125db9461258c8851600686015414612f7e565b62ff0000191617905560038101548154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915294602092869216908290899082906044820190565b03925af1908115611ba65761263c9360209261268b575b506002810154600182015460049283015460405163a9059cbb60e01b81526001600160a01b0392831694810194909452602484015291948592909116908290889082906044820190565b03925af19081156102a9576000805160206130c48339815191529260209261266e575b50604051908152a26001815580f35b61268490833d85116102a2576102928183612ca0565b503861265f565b6126a190833d85116102a2576102928183612ca0565b50386125f2565b60405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606490fd5b60405162461bcd60e51b815260206004820152600c60248201526b43616e6e6f7420636c61696d60a01b6044820152606490fd5b5060ff8460181c161561253a565b5060ff8460101c1615612534565b5060ff8460081c1661252e565b9050346103905760203660031901126103905760043563ffffffff60e01b8116809103610a175760209250637965db0b60e01b811490811561277d575b5015158152f35b6301ffc9a760e01b14905038612776565b60409060031901126127a4576004359060243590565b600080fd5b602435906001600160a01b03821682036127a457565b604435906001600160a01b03821682036127a457565b606435906001600160a01b03821682036127a457565b60e09060031901126127a457600435906001600160a01b0360243581811681036127a4579160443582811681036127a4579160643590811681036127a457906084359060a4359060c43590565b60035481101561286f5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0190600090565b634e487b7160e01b600052603260045260246000fd5b6020908160408183019282815285518094520193019160005b8281106128ac575050505090565b83518552938101939281019260010161289e565b3360009081527f50efbde2d46c37e9785f1791697f77e94bb7b701e19f1930a668820722d376946020908152604080832054909291907fa49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c217759060019060ff161561292a575050505050565b61293333612d49565b9185519161294083612c84565b60428352848301956060368837835115612ade57603087538351821015612ade5790607860218501536041915b818311612a7057505050612a2e57846129fc6048612a209360449798519889916129ed8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a526129c4815180928d603789019101612bfe565b8401917001034b99036b4b9b9b4b733903937b6329607d1b603784015251809386840190612bfe565b01036028810189520187612ca0565b5194859362461bcd60e51b8552600485015251809281602486015285850190612bfe565b601f01601f19168101030190fd5b60648386519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015612aca576f181899199a1a9b1b9c1cb0b131b232b360811b901a612aa08587612d38565b5360041c928015612ab65760001901919061296d565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b6000818152600191602090838252604093848420338552835260ff858520541615612b1e575050505050565b612b2733612d49565b91855191612b3483612c84565b60428352848301956060368837835115612ade57603087538351821015612ade5790607860218501536041915b818311612bb857505050612a2e57846129fc6048612a209360449798519889916129ed8984019876020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a526129c4815180928d603789019101612bfe565b909192600f81166010811015612aca576f181899199a1a9b1b9c1cb0b131b232b360811b901a612be88587612d38565b5360041c928015612ab657600019019190612b61565b60005b838110612c115750506000910152565b8181015183820152602001612c01565b67ffffffffffffffff8111612c3557604052565b634e487b7160e01b600052604160045260246000fd5b610200810190811067ffffffffffffffff821117612c3557604052565b6040810190811067ffffffffffffffff821117612c3557604052565b6080810190811067ffffffffffffffff821117612c3557604052565b90601f8019910116810190811067ffffffffffffffff821117612c3557604052565b906000918083526001602052604083209160018060a01b03169182845260205260ff604084205416612cf357505050565b8083526001602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b90815181101561286f570160200190565b604051906060820182811067ffffffffffffffff821117612c3557604052602a825260208201604036823782511561286f5760309053815160019081101561286f57607860218401536029905b808211612dea575050612da65790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015612e43576f181899199a1a9b1b9c1cb0b131b232b360811b901a612e198486612d38565b5360041c918015612e2e576000190190612d96565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15612e5f57565b60405162461bcd60e51b815260206004820152600b60248201526a537761702065786973747360a81b6044820152606490fd5b908160209103126127a4575180151581036127a45790565b60035468010000000000000000811015612c3557806001612ece9201600355612838565b819291549060031b91821b91600019901b1916179055565b600260005414612ef7576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b15612f4357565b60405162461bcd60e51b815260206004820152601360248201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b6044820152606490fd5b15612f8557565b60405162461bcd60e51b815260206004820152600c60248201526b42616420707265696d61676560a01b6044820152606490fd5b15612fc057565b60405162461bcd60e51b815260206004820152600d60248201526c10d85b9b9bdd081c99599d5b99609a1b6044820152606490fd5b15612ffc57565b60405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420706172616d7360901b6044820152606490fd5b1561303957565b60405162461bcd60e51b815260206004820152600e60248201526d43616e6e6f74206578656375746560901b6044820152606490fd5b919082039182116123eb57565b60001981146123eb5760010190565b67ffffffffffffffff8111612c355760051b6020019056fe56ab952d25400af7e525de6c26b18a94a6a03cb5f4c2b0d80fbd2cb9e3eb6f2f7430d80e0e3cfb925010ff8993f6a56392199211e297fc7825278f29980ccf51a26469706673582212209a58a506077630a27ce4d0deca8e45e43340ee3b2ac89a78e9d5c17c421f830364736f6c63430008120033
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.