Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Latest 25 from a total of 936 transactions
| Transaction Hash |
Method
|
Block
|
From
|
To
|
Amount
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Claim Swap | 177281099 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177281095 | 181 days ago | IN | 0 ETH | 0.000009 | ||||
| Initiate Swap | 177281087 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177281078 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177281074 | 181 days ago | IN | 0 ETH | 0.00000899 | ||||
| Initiate Swap | 177281066 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177281057 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177281053 | 181 days ago | IN | 0 ETH | 0.00000899 | ||||
| Initiate Swap | 177281044 | 181 days ago | IN | 0 ETH | 0.00002786 | ||||
| Claim Swap | 177281035 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177281031 | 181 days ago | IN | 0 ETH | 0.00000899 | ||||
| Initiate Swap | 177281023 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177280324 | 181 days ago | IN | 0 ETH | 0.0000106 | ||||
| Participate Swap | 177280320 | 181 days ago | IN | 0 ETH | 0.00000926 | ||||
| Initiate Swap | 177280316 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177280307 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177280303 | 181 days ago | IN | 0 ETH | 0.00000899 | ||||
| Initiate Swap | 177280295 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177280286 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177280281 | 181 days ago | IN | 0 ETH | 0.000009 | ||||
| Initiate Swap | 177280271 | 181 days ago | IN | 0 ETH | 0.00002786 | ||||
| Claim Swap | 177280262 | 181 days ago | IN | 0 ETH | 0.00000945 | ||||
| Participate Swap | 177280258 | 181 days ago | IN | 0 ETH | 0.00000899 | ||||
| Initiate Swap | 177280250 | 181 days ago | IN | 0 ETH | 0.00002787 | ||||
| Claim Swap | 177280188 | 181 days ago | IN | 0 ETH | 0.00000945 |
Loading...
Loading
Contract Name:
XFTAssetSwaps
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/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract XFTAssetSwaps is ReentrancyGuard {
struct Swap {
address initiator;
address participant;
IERC20 initiatorAsset;
IERC20 participantAsset;
uint256 initiatorAmount;
uint256 participantAmount;
bytes32 hashlock;
uint256 timelock;
bool initiatorDeposited;
bool participantDeposited;
bool completed;
bool refunded;
}
mapping(bytes32 => Swap) public swaps;
event SwapInitiated(
bytes32 indexed swapId,
address indexed initiator,
address indexed participant,
address initiatorAsset,
uint256 initiatorAmount,
bytes32 hashlock,
uint256 timelock
);
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
);
modifier swapExists(bytes32 _swapId) {
require(swaps[_swapId].initiator != address(0), "Swap does not exist");
_;
}
modifier onlyInitiator(bytes32 _swapId) {
require(msg.sender == swaps[_swapId].initiator, "Only initiator allowed");
_;
}
modifier onlyParticipant(bytes32 _swapId) {
require(msg.sender == swaps[_swapId].participant, "Only participant allowed");
_;
}
function initiateSwap(
bytes32 _swapId,
address _participant,
IERC20 _initiatorAsset,
IERC20 _participantAsset,
uint256 _initiatorAmount,
uint256 _participantAmount,
bytes32 _hashlock,
uint256 _timelock
) external nonReentrant {
require(swaps[_swapId].initiator == address(0), "Swap exists");
require(_participant != address(0), "Invalid participant");
require(_participant != msg.sender, "Self swap not allowed");
require(_initiatorAmount > 0 && _participantAmount > 0, "Invalid amounts");
require(_timelock > block.timestamp, "Timelock must be future");
require(_hashlock != bytes32(0), "Invalid hashlock");
swaps[_swapId] = Swap({
initiator: msg.sender,
participant: _participant,
initiatorAsset: _initiatorAsset,
participantAsset: _participantAsset,
initiatorAmount: _initiatorAmount,
participantAmount: _participantAmount,
hashlock: _hashlock,
timelock: _timelock,
initiatorDeposited: false,
participantDeposited: false,
completed: false,
refunded: false
});
require(
_initiatorAsset.transferFrom(msg.sender, address(this), _initiatorAmount),
"Initiator transfer failed"
);
swaps[_swapId].initiatorDeposited = true;
emit SwapInitiated(
_swapId,
msg.sender,
_participant,
address(_initiatorAsset),
_initiatorAmount,
_hashlock,
_timelock
);
}
function participateSwap(bytes32 _swapId)
external
nonReentrant
swapExists(_swapId)
onlyParticipant(_swapId)
{
Swap storage swap = swaps[_swapId];
require(!swap.participantDeposited, "Already participated");
require(!swap.completed, "Swap completed");
require(!swap.refunded, "Swap refunded");
require(block.timestamp < swap.timelock, "Swap expired");
require(
swap.participantAsset.transferFrom(msg.sender, address(this), swap.participantAmount),
"Participant transfer failed"
);
swap.participantDeposited = true;
emit SwapParticipated(
_swapId,
msg.sender,
address(swap.participantAsset),
swap.participantAmount
);
}
function claimSwap(bytes32 _swapId, bytes32 _preimage)
external
nonReentrant
swapExists(_swapId)
{
Swap storage swap = swaps[_swapId];
require(!swap.completed, "Swap completed");
require(!swap.refunded, "Swap refunded");
require(swap.initiatorDeposited && swap.participantDeposited, "Deposit missing");
require(block.timestamp < swap.timelock, "Swap expired");
require(sha256(abi.encodePacked(_preimage)) == swap.hashlock, "Bad preimage");
swap.completed = true;
require(
swap.participantAsset.transfer(swap.initiator, swap.participantAmount),
"To initiator failed"
);
require(
swap.initiatorAsset.transfer(swap.participant, swap.initiatorAmount),
"To participant failed"
);
emit SwapCompleted(_swapId, _preimage);
}
function refundSwap(bytes32 _swapId)
external
nonReentrant
swapExists(_swapId)
{
Swap storage swap = swaps[_swapId];
require(!swap.completed, "Swap completed");
require(!swap.refunded, "Swap refunded");
require(block.timestamp >= swap.timelock, "Too early");
require(
msg.sender == swap.initiator || msg.sender == swap.participant,
"Not swap party"
);
swap.refunded = true;
if (swap.initiatorDeposited) {
require(
swap.initiatorAsset.transfer(swap.initiator, swap.initiatorAmount),
"Refund initiator failed"
);
}
if (swap.participantDeposited) {
require(
swap.participantAsset.transfer(swap.participant, swap.participantAmount),
"Refund participant failed"
);
}
emit SwapRefunded(_swapId, msg.sender);
}
function getSwap(bytes32 _swapId)
external
view
returns (
address initiator,
address participant,
address initiatorAsset,
address participantAsset,
uint256 initiatorAmount,
uint256 participantAmount,
bytes32 hashlock,
uint256 timelock,
bool initiatorDeposited,
bool participantDeposited,
bool completed,
bool refunded
)
{
Swap storage swap = swaps[_swapId];
return (
swap.initiator,
swap.participant,
address(swap.initiatorAsset),
address(swap.participantAsset),
swap.initiatorAmount,
swap.participantAmount,
swap.hashlock,
swap.timelock,
swap.initiatorDeposited,
swap.participantDeposited,
swap.completed,
swap.refunded
);
}
}// 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.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}{
"optimizer": {
"enabled": true,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract ABI
API[{"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"}],"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":[{"internalType":"bytes32","name":"_swapId","type":"bytes32"},{"internalType":"bytes32","name":"_preimage","type":"bytes32"}],"name":"claimSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_swapId","type":"bytes32"}],"name":"getSwap","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"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_swapId","type":"bytes32"},{"internalType":"address","name":"_participant","type":"address"},{"internalType":"contract IERC20","name":"_initiatorAsset","type":"address"},{"internalType":"contract IERC20","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"}],"name":"initiateSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_swapId","type":"bytes32"}],"name":"participateSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_swapId","type":"bytes32"}],"name":"refundSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"swaps","outputs":[{"internalType":"address","name":"initiator","type":"address"},{"internalType":"address","name":"participant","type":"address"},{"internalType":"contract IERC20","name":"initiatorAsset","type":"address"},{"internalType":"contract IERC20","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"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506001600055611468806100256000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c80631818a9fa146100675780633da0e66e1461007c5780637319cade1461012a578063eb84e7f21461013d578063f05a4a55146101de578063fe2510ee146101f1575b600080fd5b61007a61007536600461119e565b610204565b005b61010961008a3660046111c0565b60009081526001602081905260409091208054918101546002820154600383015460048401546005850154600686015460078701546008909701546001600160a01b03988916999689169895861697959094169592949193909260ff808316926101008104821692620100008204831692630100000090920490911690565b6040516101219c9b9a999897969594939291906111d9565b60405180910390f35b61007a6101383660046111c0565b6105e3565b6101c661014b3660046111c0565b60016020819052600091825260409091208054918101546002820154600383015460048401546005850154600686015460078701546008909701546001600160a01b039889169896871697958716969094169492939192909160ff80821691610100810482169162010000820481169163010000009004168c565b6040516101219c9b9a99989796959493929190611254565b61007a6101ec3660046112ce565b6108c7565b61007a6101ff3660046111c0565b610dfc565b61020c611145565b60008281526001602052604090205482906001600160a01b031661024b5760405162461bcd60e51b815260040161024290611345565b60405180910390fd5b6000838152600160205260409020600881015462010000900460ff16156102845760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff16156102b05760405162461bcd60e51b81526004016102429061139a565b600881015460ff1680156102cd57506008810154610100900460ff165b61030b5760405162461bcd60e51b815260206004820152600f60248201526e4465706f736974206d697373696e6760881b6044820152606401610242565b8060070154421061034d5760405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606401610242565b806006015460028460405160200161036791815260200190565b60408051601f1981840301815290829052610381916113c1565b602060405180830381855afa15801561039e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103c191906113f0565b146103fd5760405162461bcd60e51b815260206004820152600c60248201526b42616420707265696d61676560a01b6044820152606401610242565b60088101805462ff000019166201000017905560038101548154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af115801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611409565b6104d25760405162461bcd60e51b8152602060048201526013602482015272151bc81a5b9a5d1a585d1bdc8819985a5b1959606a1b6044820152606401610242565b6002810154600182015460048084015460405163a9059cbb60e01b81526001600160a01b0393841692810192909252602482015291169063a9059cbb906044016020604051808303816000875af1158015610531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105559190611409565b6105995760405162461bcd60e51b8152602060048201526015602482015274151bc81c185c9d1a58da5c185b9d0819985a5b1959605a1b6044820152606401610242565b837f7430d80e0e3cfb925010ff8993f6a56392199211e297fc7825278f29980ccf51846040516105cb91815260200190565b60405180910390a250506105df6001600055565b5050565b6105eb611145565b60008181526001602052604090205481906001600160a01b03166106215760405162461bcd60e51b815260040161024290611345565b6000828152600160208190526040909120015482906001600160a01b0316331461068d5760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152606401610242565b60008381526001602052604090206008810154610100900460ff16156106ec5760405162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481c185c9d1a58da5c185d195960621b6044820152606401610242565b600881015462010000900460ff16156107175760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff16156107435760405162461bcd60e51b81526004016102429061139a565b806007015442106107855760405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606401610242565b600381015460058201546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190611409565b6108545760405162461bcd60e51b815260206004820152601b60248201527f5061727469636970616e74207472616e73666572206661696c656400000000006044820152606401610242565b60088101805461ff00191661010017905560038101546005820154604080516001600160a01b0390931683526020830191909152339186917f36a01c935797536d077135d008f5d95df22b54744528d9cd0f795ab881c52a91910160405180910390a35050506108c46001600055565b50565b6108cf611145565b6000888152600160205260409020546001600160a01b0316156109225760405162461bcd60e51b815260206004820152600b60248201526a537761702065786973747360a81b6044820152606401610242565b6001600160a01b03871661096e5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606401610242565b336001600160a01b038816036109be5760405162461bcd60e51b815260206004820152601560248201527414d95b19881cddd85c081b9bdd08185b1b1bddd959605a1b6044820152606401610242565b6000841180156109ce5750600083115b610a0c5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606401610242565b428111610a5b5760405162461bcd60e51b815260206004820152601760248201527f54696d656c6f636b206d757374206265206675747572650000000000000000006044820152606401610242565b81610a9b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606401610242565b604051806101800160405280336001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200183815260200182815260200160001515815260200160001515815260200160001515815260200160001515815250600160008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055506101208201518160080160016101000a81548160ff0219169083151502179055506101408201518160080160026101000a81548160ff0219169083151502179055506101608201518160080160036101000a81548160ff021916908315150217905550905050856001600160a01b03166323b872dd3330876040518463ffffffff1660e01b8152600401610ce2939291906001600160a01b039384168152919092166020820152604081019190915260600190565b6020604051808303816000875af1158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d259190611409565b610d715760405162461bcd60e51b815260206004820152601960248201527f496e69746961746f72207472616e73666572206661696c6564000000000000006044820152606401610242565b600088815260016020818152604092839020600801805460ff191690921790915581516001600160a01b0389811682529181018790529182018490526060820183905288169033908a907f9fba3d24d594c6fe983302709ea37fdeceb7e556ea94cf695c806048e8ef9e859060800160405180910390a4610df26001600055565b5050505050505050565b610e04611145565b60008181526001602052604090205481906001600160a01b0316610e3a5760405162461bcd60e51b815260040161024290611345565b6000828152600160205260409020600881015462010000900460ff1615610e735760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff1615610e9f5760405162461bcd60e51b81526004016102429061139a565b8060070154421015610edf5760405162461bcd60e51b8152602060048201526009602482015268546f6f206561726c7960b81b6044820152606401610242565b80546001600160a01b0316331480610f03575060018101546001600160a01b031633145b610f405760405162461bcd60e51b815260206004820152600e60248201526d4e6f74207377617020706172747960901b6044820152606401610242565b60088101805463ff00000019811663010000001790915560ff161561102b576002810154815460048084015460405163a9059cbb60e01b81526001600160a01b0393841692810192909252602482015291169063a9059cbb906044016020604051808303816000875af1158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190611409565b61102b5760405162461bcd60e51b815260206004820152601760248201527f526566756e6420696e69746961746f72206661696c65640000000000000000006044820152606401610242565b6008810154610100900460ff161561110c5760038101546001820154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af115801561109c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c09190611409565b61110c5760405162461bcd60e51b815260206004820152601960248201527f526566756e64207061727469636970616e74206661696c6564000000000000006044820152606401610242565b604051339084907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c1990600090a350506108c46001600055565b6002600054036111975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610242565b6002600055565b600080604083850312156111b157600080fd5b50508035926020909101359150565b6000602082840312156111d257600080fd5b5035919050565b6001600160a01b038d811682528c811660208301528b811660408301528a1660608201526080810189905260a0810188905260c0810187905260e0810186905284151561010082015283151561012082015282151561014082015261018081015b8215156101608301529d9c50505050505050505050505050565b6001600160a01b038d811682528c811660208301528b811660408301528a1660608201526080810189905260a0810188905260c0810187905260e08101869052841515610100820152831515610120820152610180810183151561014083015261123a565b6001600160a01b03811681146108c457600080fd5b600080600080600080600080610100898b0312156112eb57600080fd5b8835975060208901356112fd816112b9565b9650604089013561130d816112b9565b9550606089013561131d816112b9565b979a969950949760808101359660a0820135965060c0820135955060e0909101359350915050565b60208082526013908201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b604082015260600190565b6020808252600e908201526d14ddd85c0818dbdb5c1b195d195960921b604082015260600190565b6020808252600d908201526c14ddd85c081c99599d5b991959609a1b604082015260600190565b6000825160005b818110156113e257602081860181015185830152016113c8565b506000920191825250919050565b60006020828403121561140257600080fd5b5051919050565b60006020828403121561141b57600080fd5b8151801515811461142b57600080fd5b939250505056fea2646970667358221220fb172b4fdd9bd77fd477a61154e9033863ce00badee14035d5fa02fa2171357664736f6c63430008120033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100625760003560e01c80631818a9fa146100675780633da0e66e1461007c5780637319cade1461012a578063eb84e7f21461013d578063f05a4a55146101de578063fe2510ee146101f1575b600080fd5b61007a61007536600461119e565b610204565b005b61010961008a3660046111c0565b60009081526001602081905260409091208054918101546002820154600383015460048401546005850154600686015460078701546008909701546001600160a01b03988916999689169895861697959094169592949193909260ff808316926101008104821692620100008204831692630100000090920490911690565b6040516101219c9b9a999897969594939291906111d9565b60405180910390f35b61007a6101383660046111c0565b6105e3565b6101c661014b3660046111c0565b60016020819052600091825260409091208054918101546002820154600383015460048401546005850154600686015460078701546008909701546001600160a01b039889169896871697958716969094169492939192909160ff80821691610100810482169162010000820481169163010000009004168c565b6040516101219c9b9a99989796959493929190611254565b61007a6101ec3660046112ce565b6108c7565b61007a6101ff3660046111c0565b610dfc565b61020c611145565b60008281526001602052604090205482906001600160a01b031661024b5760405162461bcd60e51b815260040161024290611345565b60405180910390fd5b6000838152600160205260409020600881015462010000900460ff16156102845760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff16156102b05760405162461bcd60e51b81526004016102429061139a565b600881015460ff1680156102cd57506008810154610100900460ff165b61030b5760405162461bcd60e51b815260206004820152600f60248201526e4465706f736974206d697373696e6760881b6044820152606401610242565b8060070154421061034d5760405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606401610242565b806006015460028460405160200161036791815260200190565b60408051601f1981840301815290829052610381916113c1565b602060405180830381855afa15801561039e573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906103c191906113f0565b146103fd5760405162461bcd60e51b815260206004820152600c60248201526b42616420707265696d61676560a01b6044820152606401610242565b60088101805462ff000019166201000017905560038101548154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af115801561046c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104909190611409565b6104d25760405162461bcd60e51b8152602060048201526013602482015272151bc81a5b9a5d1a585d1bdc8819985a5b1959606a1b6044820152606401610242565b6002810154600182015460048084015460405163a9059cbb60e01b81526001600160a01b0393841692810192909252602482015291169063a9059cbb906044016020604051808303816000875af1158015610531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105559190611409565b6105995760405162461bcd60e51b8152602060048201526015602482015274151bc81c185c9d1a58da5c185b9d0819985a5b1959605a1b6044820152606401610242565b837f7430d80e0e3cfb925010ff8993f6a56392199211e297fc7825278f29980ccf51846040516105cb91815260200190565b60405180910390a250506105df6001600055565b5050565b6105eb611145565b60008181526001602052604090205481906001600160a01b03166106215760405162461bcd60e51b815260040161024290611345565b6000828152600160208190526040909120015482906001600160a01b0316331461068d5760405162461bcd60e51b815260206004820152601860248201527f4f6e6c79207061727469636970616e7420616c6c6f77656400000000000000006044820152606401610242565b60008381526001602052604090206008810154610100900460ff16156106ec5760405162461bcd60e51b8152602060048201526014602482015273105b1c9958591e481c185c9d1a58da5c185d195960621b6044820152606401610242565b600881015462010000900460ff16156107175760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff16156107435760405162461bcd60e51b81526004016102429061139a565b806007015442106107855760405162461bcd60e51b815260206004820152600c60248201526b14ddd85c08195e1c1a5c995960a21b6044820152606401610242565b600381015460058201546040516323b872dd60e01b815233600482015230602482015260448101919091526001600160a01b03909116906323b872dd906064016020604051808303816000875af11580156107e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108089190611409565b6108545760405162461bcd60e51b815260206004820152601b60248201527f5061727469636970616e74207472616e73666572206661696c656400000000006044820152606401610242565b60088101805461ff00191661010017905560038101546005820154604080516001600160a01b0390931683526020830191909152339186917f36a01c935797536d077135d008f5d95df22b54744528d9cd0f795ab881c52a91910160405180910390a35050506108c46001600055565b50565b6108cf611145565b6000888152600160205260409020546001600160a01b0316156109225760405162461bcd60e51b815260206004820152600b60248201526a537761702065786973747360a81b6044820152606401610242565b6001600160a01b03871661096e5760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081c185c9d1a58da5c185b9d606a1b6044820152606401610242565b336001600160a01b038816036109be5760405162461bcd60e51b815260206004820152601560248201527414d95b19881cddd85c081b9bdd08185b1b1bddd959605a1b6044820152606401610242565b6000841180156109ce5750600083115b610a0c5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420616d6f756e747360881b6044820152606401610242565b428111610a5b5760405162461bcd60e51b815260206004820152601760248201527f54696d656c6f636b206d757374206265206675747572650000000000000000006044820152606401610242565b81610a9b5760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420686173686c6f636b60801b6044820152606401610242565b604051806101800160405280336001600160a01b03168152602001886001600160a01b03168152602001876001600160a01b03168152602001866001600160a01b0316815260200185815260200184815260200183815260200182815260200160001515815260200160001515815260200160001515815260200160001515815250600160008a815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160030160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506080820151816004015560a0820151816005015560c0820151816006015560e082015181600701556101008201518160080160006101000a81548160ff0219169083151502179055506101208201518160080160016101000a81548160ff0219169083151502179055506101408201518160080160026101000a81548160ff0219169083151502179055506101608201518160080160036101000a81548160ff021916908315150217905550905050856001600160a01b03166323b872dd3330876040518463ffffffff1660e01b8152600401610ce2939291906001600160a01b039384168152919092166020820152604081019190915260600190565b6020604051808303816000875af1158015610d01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d259190611409565b610d715760405162461bcd60e51b815260206004820152601960248201527f496e69746961746f72207472616e73666572206661696c6564000000000000006044820152606401610242565b600088815260016020818152604092839020600801805460ff191690921790915581516001600160a01b0389811682529181018790529182018490526060820183905288169033908a907f9fba3d24d594c6fe983302709ea37fdeceb7e556ea94cf695c806048e8ef9e859060800160405180910390a4610df26001600055565b5050505050505050565b610e04611145565b60008181526001602052604090205481906001600160a01b0316610e3a5760405162461bcd60e51b815260040161024290611345565b6000828152600160205260409020600881015462010000900460ff1615610e735760405162461bcd60e51b815260040161024290611372565b60088101546301000000900460ff1615610e9f5760405162461bcd60e51b81526004016102429061139a565b8060070154421015610edf5760405162461bcd60e51b8152602060048201526009602482015268546f6f206561726c7960b81b6044820152606401610242565b80546001600160a01b0316331480610f03575060018101546001600160a01b031633145b610f405760405162461bcd60e51b815260206004820152600e60248201526d4e6f74207377617020706172747960901b6044820152606401610242565b60088101805463ff00000019811663010000001790915560ff161561102b576002810154815460048084015460405163a9059cbb60e01b81526001600160a01b0393841692810192909252602482015291169063a9059cbb906044016020604051808303816000875af1158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190611409565b61102b5760405162461bcd60e51b815260206004820152601760248201527f526566756e6420696e69746961746f72206661696c65640000000000000000006044820152606401610242565b6008810154610100900460ff161561110c5760038101546001820154600583015460405163a9059cbb60e01b81526001600160a01b039283166004820152602481019190915291169063a9059cbb906044016020604051808303816000875af115801561109c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c09190611409565b61110c5760405162461bcd60e51b815260206004820152601960248201527f526566756e64207061727469636970616e74206661696c6564000000000000006044820152606401610242565b604051339084907fc672feaa452bd52b0000f3d29c943cd9331556ab05529d49e984311220c16c1990600090a350506108c46001600055565b6002600054036111975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610242565b6002600055565b600080604083850312156111b157600080fd5b50508035926020909101359150565b6000602082840312156111d257600080fd5b5035919050565b6001600160a01b038d811682528c811660208301528b811660408301528a1660608201526080810189905260a0810188905260c0810187905260e0810186905284151561010082015283151561012082015282151561014082015261018081015b8215156101608301529d9c50505050505050505050505050565b6001600160a01b038d811682528c811660208301528b811660408301528a1660608201526080810189905260a0810188905260c0810187905260e08101869052841515610100820152831515610120820152610180810183151561014083015261123a565b6001600160a01b03811681146108c457600080fd5b600080600080600080600080610100898b0312156112eb57600080fd5b8835975060208901356112fd816112b9565b9650604089013561130d816112b9565b9550606089013561131d816112b9565b979a969950949760808101359660a0820135965060c0820135955060e0909101359350915050565b60208082526013908201527214ddd85c08191bd95cc81b9bdd08195e1a5cdd606a1b604082015260600190565b6020808252600e908201526d14ddd85c0818dbdb5c1b195d195960921b604082015260600190565b6020808252600d908201526c14ddd85c081c99599d5b991959609a1b604082015260600190565b6000825160005b818110156113e257602081860181015185830152016113c8565b506000920191825250919050565b60006020828403121561140257600080fd5b5051919050565b60006020828403121561141b57600080fd5b8151801515811461142b57600080fd5b939250505056fea2646970667358221220fb172b4fdd9bd77fd477a61154e9033863ce00badee14035d5fa02fa2171357664736f6c63430008120033
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.