| Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 133265850 | 243 days ago | 0.00002 ETH | ||||
| 133053003 | 248 days ago | 0.000038 ETH | ||||
| 132703791 | 256 days ago | 0.000014 ETH | ||||
| 132577633 | 259 days ago | 0.000017 ETH | ||||
| 131208107 | 291 days ago | 0.0015 ETH | ||||
| 131026482 | 295 days ago | 0.00104 ETH | ||||
| 131026482 | 295 days ago | 0.000004552362083 ETH | ||||
| 130970814 | 297 days ago | 0.000045 ETH | ||||
| 130228027 | 314 days ago | 0.0017 ETH | ||||
| 128715871 | 349 days ago | 0.00005 ETH | ||||
| 128715871 | 349 days ago | 0.00039 ETH | ||||
| 128437768 | 355 days ago | 0.00002 ETH | ||||
| 125307314 | 428 days ago | 0.00007 ETH | ||||
| 125307314 | 428 days ago | 0.00001 ETH | ||||
| 124913980 | 437 days ago | 0.003 ETH | ||||
| 124414168 | 448 days ago | 0.0003 ETH | ||||
| 123934484 | 459 days ago | 0.00035 ETH | ||||
| 123928194 | 460 days ago | 0.00345 ETH | ||||
| 121653771 | 512 days ago | 0.000094 ETH | ||||
| 121649110 | 512 days ago | 0.00001 ETH | ||||
| 121093573 | 525 days ago | 0.00029 ETH | ||||
| 120721767 | 534 days ago | 0.000029 ETH | ||||
| 120593983 | 537 days ago | 0.000167 ETH | ||||
| 120593983 | 537 days ago | 0.000042 ETH | ||||
| 120281966 | 544 days ago | 0.0006 ETH |
Cross-Chain Transactions
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ElementExSwapV2
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./storage/LibFeatureStorage.sol";
import "./Aggregator.sol";
import "./libs/Ownable.sol";
contract ElementExSwapV2 is Aggregator, Ownable {
struct Method {
bytes4 methodID;
string methodName;
}
struct Feature {
address feature;
string name;
Method[] methods;
}
event FeatureFunctionUpdated(
bytes4 indexed methodID,
address oldFeature,
address newFeature
);
function registerFeatures(Feature[] calldata features) external onlyOwner {
unchecked {
for (uint256 i = 0; i < features.length; ++i) {
registerFeature(features[i]);
}
}
}
function registerFeature(Feature calldata feature) public onlyOwner {
unchecked {
address impl = feature.feature;
require(impl != address(0), "registerFeature: invalid feature address.");
LibFeatureStorage.Storage storage stor = LibFeatureStorage.getStorage();
stor.featureNames[impl] = feature.name;
Method[] calldata methods = feature.methods;
for (uint256 i = 0; i < methods.length; ++i) {
bytes4 methodID = methods[i].methodID;
address oldFeature = stor.featureImpls[methodID];
if (oldFeature == address(0)) {
stor.methodIDs.push(methodID);
}
stor.featureImpls[methodID] = impl;
stor.methodNames[methodID] = methods[i].methodName;
emit FeatureFunctionUpdated(methodID, oldFeature, impl);
}
}
}
function unregister(bytes4[] calldata methodIDs) external onlyOwner {
unchecked {
uint256 removedFeatureCount;
LibFeatureStorage.Storage storage stor = LibFeatureStorage.getStorage();
// Update storage.featureImpls
for (uint256 i = 0; i < methodIDs.length; ++i) {
bytes4 methodID = methodIDs[i];
address impl = stor.featureImpls[methodID];
if (impl != address(0)) {
removedFeatureCount++;
stor.featureImpls[methodID] = address(0);
}
emit FeatureFunctionUpdated(methodID, impl, address(0));
}
if (removedFeatureCount == 0) {
return;
}
// Remove methodIDs from storage.methodIDs
bytes4[] storage storMethodIDs = stor.methodIDs;
for (uint256 i = storMethodIDs.length; i > 0; --i) {
bytes4 methodID = storMethodIDs[i - 1];
if (stor.featureImpls[methodID] == address(0)) {
if (i != storMethodIDs.length) {
storMethodIDs[i - 1] = storMethodIDs[storMethodIDs.length - 1];
}
delete storMethodIDs[storMethodIDs.length - 1];
storMethodIDs.pop();
if (removedFeatureCount == 1) { // Finished
return;
}
--removedFeatureCount;
}
}
}
}
/// @dev Fallback for just receiving ether.
receive() external payable {}
/// @dev Forwards calls to the appropriate implementation contract.
uint256 private constant STORAGE_ID_FEATURE = 1 << 128;
fallback() external payable {
assembly {
// Copy methodID to memory 0x00~0x04
calldatacopy(0, 0, 4)
// Store LibFeatureStorage.slot to memory 0x20~0x3F
mstore(0x20, STORAGE_ID_FEATURE)
// Calculate impl.slot and load impl from storage
let impl := sload(keccak256(0, 0x40))
if iszero(impl) {
// revert("Not implemented method.")
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(0x20, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(0x40, 0x000000174e6f7420696d706c656d656e746564206d6574686f642e0000000000)
mstore(0x60, 0)
revert(0, 0x64)
}
calldatacopy(0, 0, calldatasize())
if iszero(delegatecall(gas(), impl, 0, calldatasize(), 0, 0)) {
// Failed, copy the returned data and revert.
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
}
// Success, copy the returned data and return.
returndatacopy(0, 0, returndatasize())
return(0, returndatasize())
}
}
function approveERC20(IERC20 token, address operator, uint256 amount) external onlyOwner {
token.approve(operator, amount);
}
function rescueETH(address recipient) external onlyOwner {
address to = (recipient != address(0)) ? recipient : msg.sender;
_transferEth(to, address(this).balance);
}
function rescueERC20(address asset, address recipient) external onlyOwner {
address to = (recipient != address(0)) ? recipient : msg.sender;
_transferERC20(asset, to, IERC20(asset).balanceOf(address(this)));
}
function rescueERC721(address asset, uint256[] calldata ids , address recipient) external onlyOwner {
assembly {
// selector for transferFrom(address,address,uint256)
mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
mstore(0x4, address())
switch recipient
case 0 { mstore(0x24, caller()) }
default { mstore(0x24, recipient) }
for { let offset := ids.offset } lt(offset, calldatasize()) { offset := add(offset, 0x20) } {
// tokenID
mstore(0x44, calldataload(offset))
if iszero(call(gas(), asset, 0, 0, 0x64, 0, 0)) {
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
}
}
}
}
function onERC1155Received(address, address, uint256, uint256, bytes calldata) external virtual returns (bytes4) {
return this.onERC1155Received.selector;
}
function onERC1155BatchReceived(address, address, uint256[] calldata, uint256[] calldata, bytes calldata) external virtual returns (bytes4) {
return this.onERC1155BatchReceived.selector;
}
function onERC721Received(address, address, uint256, bytes calldata) external virtual returns (bytes4) {
return 0x150b7a02;
}
function onERC721Received(address, uint256, bytes calldata) external virtual returns (bytes4) {
return 0xf0b9e5ba;
}
function supportsInterface(bytes4 interfaceId) external virtual returns (bool) {
return interfaceId == this.supportsInterface.selector;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*
* _Available since v3.1._
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
library LibFeatureStorage {
uint256 constant STORAGE_ID_FEATURE = 1 << 128;
struct Storage {
// Mapping of methodID -> feature implementation
mapping(bytes4 => address) featureImpls;
// Mapping of feature implementation -> feature name
mapping(address => string) featureNames;
// Record methodIDs
bytes4[] methodIDs;
// Mapping of methodID -> method name
mapping(bytes4 => string) methodNames;
}
/// @dev Get the storage bucket for this contract.
function getStorage() internal pure returns (Storage storage stor) {
// Dip into assembly to change the slot pointed to by the local
// variable `stor`.
// See https://solidity.readthedocs.io/en/v0.6.8/assembly.html?highlight=slot#access-to-external-variables-functions-and-libraries
assembly { stor.slot := STORAGE_ID_FEATURE }
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./interfaces/IAggregator.sol";
import "./libs/FixinTokenSpender.sol";
import "./libs/ReentrancyGuard.sol";
abstract contract Aggregator is IAggregator, ReentrancyGuard, FixinTokenSpender {
address private constant ELEMENT = 0x2317D8B224328644759319DFFA2A5da77C72e0e9;
uint256 private constant WETH_MARKET_ID = 999;
address private constant WETH = 0x4200000000000000000000000000000000000006;
// markets.slot == 0
// markets.data.slot == keccak256(markets.slot) == 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563
uint256 private constant MARKETS_DATA_SLOT = 0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563;
// 168 bits(ethValue)
uint256 private constant ETH_VALUE_MASK = (1 << 168) - 1;
// 160 bits(proxy)
uint256 private constant PROXY_MASK = (1 << 160) - 1;
function batchBuyWithETH(bytes calldata tradeBytes) external override payable {
uint256 ethBalanceBefore;
assembly { ethBalanceBefore := sub(selfbalance(), callvalue()) }
// trade
_trade(tradeBytes);
// return remaining ETH (if any)
assembly {
if eq(selfbalance(), ethBalanceBefore) {
return(0, 0)
}
if gt(selfbalance(), ethBalanceBefore) {
let success := call(gas(), caller(), sub(selfbalance(), ethBalanceBefore), 0, 0, 0, 0)
return(0, 0)
}
}
revert("Failed to return ETH.");
}
function batchBuyWithERC20s(
ERC20Pair[] calldata erc20Pairs,
bytes calldata tradeBytes,
address[] calldata dustTokens
) external override payable nonReentrant {
// transfer ERC20 tokens from the sender to this contract
_transferERC20Pairs(erc20Pairs);
// trade
_trade(tradeBytes);
// return dust tokens (if any)
_returnDust(dustTokens);
// return remaining ETH (if any)
assembly {
if gt(selfbalance(), 0) {
let success := call(gas(), caller(), selfbalance(), 0, 0, 0, 0)
}
}
}
function _trade(bytes calldata tradeBytes) internal {
assembly {
let anySuccess
let itemLength
let end := add(tradeBytes.offset, tradeBytes.length)
let ptr := mload(0x40) // free memory pointer
// nextOffset == offset + 28bytes[2 + 1 + 21 + 4] + itemLength
for { let offset := tradeBytes.offset } lt(offset, end) { offset := add(add(offset, 28), itemLength) } {
// head == [2 bytes(marketId) + 1 bytes(continueIfFailed) + 21 bytes(ethValue) + 4 bytes(itemLength) + 4 bytes(item)]
// head == [16 bits(marketId) + 8 bits(continueIfFailed) + 168 bits(ethValue) + 32 bits(itemLength) + 32 bits(item)]
let head := calldataload(offset)
// itemLength = (head >> 32) & 0xffffffff
itemLength := and(shr(32, head), 0xffffffff)
// itemOffset == offset + 28
// copy item.data to memory ptr
calldatacopy(ptr, add(offset, 28), itemLength)
// marketId = head >> (8 + 168 + 32 + 32) = head >> 240
let marketId := shr(240, head)
// ElementEx
if iszero(marketId) {
// ethValue = (head >> 64) & ETH_VALUE_MASK
// ELEMENT.call{value: ethValue}(item)
if iszero(call(gas(), ELEMENT, and(shr(64, head), ETH_VALUE_MASK), ptr, itemLength, 0, 0)) {
_revertOrContinue(head)
continue
}
anySuccess := 1
continue
}
// WETH
if eq(marketId, WETH_MARKET_ID) {
let methodId := and(head, 0xffffffff)
// WETH.deposit();
if eq(methodId, 0xd0e30db0) {
if iszero(call(gas(), WETH, and(shr(64, head), ETH_VALUE_MASK), ptr, itemLength, 0, 0)) {
_revertOrContinue(head)
continue
}
anySuccess := 1
continue
}
// WETH.withdraw();
if eq(methodId, 0x2e1a7d4d) {
if iszero(call(gas(), WETH, 0, ptr, itemLength, 0, 0)) {
_revertOrContinue(head)
continue
}
anySuccess := 1
continue
}
// Do not support other methods.
_revertOrContinue(head)
continue
}
// Others
// struct Market {
// address proxy;
// bool isLibrary;
// bool isActive;
// }
// [80 bits(unused) + 8 bits(isActive) + 8 bits(isLibrary) + 160 bits(proxy)]
// [10 bytes(unused) + 1 bytes(isActive) + 1 bytes(isLibrary) + 20 bytes(proxy)]
// market.slot = markets.data.slot + marketId
// market = sload(market.slot)
let market := sload(add(MARKETS_DATA_SLOT, marketId))
// if (!market.isActive)
if iszero(byte(10, market)) {
// if (!continueIfFailed)
if iszero(byte(2, head)) {
// revert("Inactive market.")
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(0x20, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(0x40, 0x00000010496e616374697665206d61726b65742e000000000000000000000000)
mstore(0x60, 0)
revert(0, 0x64)
}
continue
}
// if (!market.isLibrary)
if iszero(byte(11, market)) {
// ethValue = (head >> 64) & ETH_VALUE_MASK
// market.proxy.call{value: ethValue}(item)
if iszero(call(gas(), and(market, PROXY_MASK), and(shr(64, head), ETH_VALUE_MASK), ptr, itemLength, 0, 0)) {
_revertOrContinue(head)
continue
}
anySuccess := 1
continue
}
// market.proxy.delegatecall(item)
if iszero(delegatecall(gas(), and(market, PROXY_MASK), ptr, itemLength, 0, 0)) {
_revertOrContinue(head)
continue
}
anySuccess := 1
}
// if (!anySuccess)
if iszero(anySuccess) {
if gt(tradeBytes.length, 0) {
if iszero(returndatasize()) {
// revert("No order succeeded.")
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(0x20, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(0x40, 0x000000134e6f206f72646572207375636365656465642e000000000000000000)
mstore(0x60, 0)
revert(0, 0x64)
}
// revert(returnData)
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
}
}
function _revertOrContinue(head) {
// head == [2 bytes(marketId) + 1 bytes(continueIfFailed) + 21 bytes(ethValue) + 4 bytes(itemLength) + 4 bytes(item)]
// if (!continueIfFailed)
if iszero(byte(2, head)) {
if iszero(returndatasize()) {
mstore(0, head)
revert(0, 0x20)
}
returndatacopy(0, 0, returndatasize())
revert(0, returndatasize())
}
}
}
}
function _transferERC20Pairs(ERC20Pair[] calldata erc20Pairs) internal {
// transfer ERC20 tokens from the sender to this contract
if (erc20Pairs.length > 0) {
assembly {
let ptr := mload(0x40)
let end := add(erc20Pairs.offset, mul(erc20Pairs.length, 0x40))
// selector for transferFrom(address,address,uint256)
mstore(ptr, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x04), caller())
mstore(add(ptr, 0x24), address())
for { let offset := erc20Pairs.offset } lt(offset, end) { offset := add(offset, 0x40) } {
let amount := calldataload(add(offset, 0x20))
if gt(amount, 0) {
mstore(add(ptr, 0x44), amount)
let success := call(gas(), calldataload(offset), 0, ptr, 0x64, 0, 0)
}
}
}
}
}
function _returnDust(address[] calldata tokens) internal {
// return remaining tokens (if any)
for (uint256 i; i < tokens.length; ) {
_transferERC20WithoutCheck(tokens[i], msg.sender, IERC20(tokens[i]).balanceOf(address(this)));
unchecked { ++i; }
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "../storage/LibOwnableStorage.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable {
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
if (owner() == address(0)) {
_transferOwnership(msg.sender);
}
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return LibOwnableStorage.getStorage().owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == msg.sender, "Ownable: caller is not the owner");
_;
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) private {
LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();
address oldOwner = stor.owner;
stor.owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// 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 v4.4.1 (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @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);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
interface IAggregator {
struct ERC20Pair {
address token;
uint256 amount;
}
function batchBuyWithETH(bytes calldata tradeBytes) external payable;
function batchBuyWithERC20s(
ERC20Pair[] calldata erc20Pairs,
bytes calldata tradeBytes,
address[] calldata dustTokens
) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
/// @dev Helpers for moving tokens around.
abstract contract FixinTokenSpender {
// Mask of the lower 20 bytes of a bytes32.
uint256 constant private ADDRESS_MASK = (1 << 160) - 1;
/// @dev Transfers ERC20 tokens from `owner` to `to`.
/// @param token The token to spend.
/// @param owner The owner of the tokens.
/// @param to The recipient of the tokens.
/// @param amount The amount of `token` to transfer.
function _transferERC20From(address token, address owner, address to, uint256 amount) internal {
uint256 success;
assembly {
let ptr := mload(0x40) // free memory pointer
// selector for transferFrom(address,address,uint256)
mstore(ptr, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x04), and(owner, ADDRESS_MASK))
mstore(add(ptr, 0x24), and(to, ADDRESS_MASK))
mstore(add(ptr, 0x44), amount)
success := call(gas(), and(token, ADDRESS_MASK), 0, ptr, 0x64, ptr, 32)
let rdsize := returndatasize()
// Check for ERC20 success. ERC20 tokens should return a boolean,
// but some don't. We accept 0-length return data as success, or at
// least 32 bytes that starts with a 32-byte boolean true.
success := and(
success, // call itself succeeded
or(
iszero(rdsize), // no return data, or
and(
iszero(lt(rdsize, 32)), // at least 32 bytes
eq(mload(ptr), 1) // starts with uint256(1)
)
)
)
}
require(success != 0, "_transferERC20/TRANSFER_FAILED");
}
/// @dev Transfers ERC20 tokens from ourselves to `to`.
/// @param token The token to spend.
/// @param to The recipient of the tokens.
/// @param amount The amount of `token` to transfer.
function _transferERC20(address token, address to, uint256 amount) internal {
uint256 success;
assembly {
let ptr := mload(0x40) // free memory pointer
// selector for transfer(address,uint256)
mstore(ptr, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x04), and(to, ADDRESS_MASK))
mstore(add(ptr, 0x24), amount)
success := call(gas(), and(token, ADDRESS_MASK), 0, ptr, 0x44, ptr, 32)
let rdsize := returndatasize()
// Check for ERC20 success. ERC20 tokens should return a boolean,
// but some don't. We accept 0-length return data as success, or at
// least 32 bytes that starts with a 32-byte boolean true.
success := and(
success, // call itself succeeded
or(
iszero(rdsize), // no return data, or
and(
iszero(lt(rdsize, 32)), // at least 32 bytes
eq(mload(ptr), 1) // starts with uint256(1)
)
)
)
}
require(success != 0, "_transferERC20/TRANSFER_FAILED");
}
function _transferERC20FromWithoutCheck(address token, address owner, address to, uint256 amount) internal {
assembly {
if gt(amount, 0) {
let ptr := mload(0x40) // free memory pointer
// selector for transferFrom(address,address,uint256)
mstore(ptr, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x04), and(owner, ADDRESS_MASK))
mstore(add(ptr, 0x24), and(to, ADDRESS_MASK))
mstore(add(ptr, 0x44), amount)
let success := call(gas(), and(token, ADDRESS_MASK), 0, ptr, 0x64, 0, 0)
}
}
}
function _transferERC20WithoutCheck(address token, address to, uint256 amount) internal {
assembly {
if gt(amount, 0) {
let ptr := mload(0x40) // free memory pointer
// selector for transfer(address,uint256)
mstore(ptr, 0xa9059cbb00000000000000000000000000000000000000000000000000000000)
mstore(add(ptr, 0x04), and(to, ADDRESS_MASK))
mstore(add(ptr, 0x24), amount)
let success := call(gas(), and(token, ADDRESS_MASK), 0, ptr, 0x44, 0, 0)
}
}
}
/// @dev Transfers some amount of ETH to the given recipient and
/// reverts if the transfer fails.
/// @param recipient The recipient of the ETH.
/// @param amount The amount of ETH to transfer.
function _transferEth(address recipient, uint256 amount) internal {
assembly {
if gt(amount, 0) {
if iszero(call(gas(), recipient, amount, 0, 0, 0, 0)) {
// revert("_transferEth/TRANSFER_FAILED")
mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
mstore(0x20, 0x0000002000000000000000000000000000000000000000000000000000000000)
mstore(0x40, 0x0000001c5f7472616e736665724574682f5452414e534645525f4641494c4544)
mstore(0x60, 0)
revert(0, 0x64)
}
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
import "../storage/LibOwnableStorage.sol";
abstract contract ReentrancyGuard {
constructor() {
LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();
if (stor.reentrancyStatus == 0) {
stor.reentrancyStatus = 1;
}
}
modifier nonReentrant() {
LibOwnableStorage.Storage storage stor = LibOwnableStorage.getStorage();
require(stor.reentrancyStatus == 1, "ReentrancyGuard: reentrant call");
stor.reentrancyStatus = 2;
_;
stor.reentrancyStatus = 1;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
library LibOwnableStorage {
uint256 constant STORAGE_ID_OWNABLE = 2 << 128;
struct Storage {
uint256 reentrancyStatus;
address owner;
}
/// @dev Get the storage bucket for this contract.
function getStorage() internal pure returns (Storage storage stor) {
assembly { stor.slot := STORAGE_ID_OWNABLE }
}
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes4","name":"methodID","type":"bytes4"},{"indexed":false,"internalType":"address","name":"oldFeature","type":"address"},{"indexed":false,"internalType":"address","name":"newFeature","type":"address"}],"name":"FeatureFunctionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct IAggregator.ERC20Pair[]","name":"erc20Pairs","type":"tuple[]"},{"internalType":"bytes","name":"tradeBytes","type":"bytes"},{"internalType":"address[]","name":"dustTokens","type":"address[]"}],"name":"batchBuyWithERC20s","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"tradeBytes","type":"bytes"}],"name":"batchBuyWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"feature","type":"address"},{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"bytes4","name":"methodID","type":"bytes4"},{"internalType":"string","name":"methodName","type":"string"}],"internalType":"struct ElementExSwapV2.Method[]","name":"methods","type":"tuple[]"}],"internalType":"struct ElementExSwapV2.Feature","name":"feature","type":"tuple"}],"name":"registerFeature","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"feature","type":"address"},{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"bytes4","name":"methodID","type":"bytes4"},{"internalType":"string","name":"methodName","type":"string"}],"internalType":"struct ElementExSwapV2.Method[]","name":"methods","type":"tuple[]"}],"internalType":"struct ElementExSwapV2.Feature[]","name":"features","type":"tuple[]"}],"name":"registerFeatures","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4[]","name":"methodIDs","type":"bytes4[]"}],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040523480156200001157600080fd5b50600062000029620000a060201b6200152e1760201c565b905060008160000154036200004357600181600001819055505b50600073ffffffffffffffffffffffffffffffffffffffff166200006c620000b960201b60201c565b73ffffffffffffffffffffffffffffffffffffffff16036200009a576200009933620000f960201b60201c565b5b620001dd565b6000700200000000000000000000000000000000905090565b6000620000d0620000a060201b6200152e1760201c565b60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600062000110620000a060201b6200152e1760201c565b905060008160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b612f4680620001ed6000396000f3fe6080604052600436106100f75760003560e01c8063a8e5e4aa1161008a578063d750e2a511610059578063d750e2a5146103cb578063f0b9e5ba146103f4578063f23a6e6114610431578063f2fde38b1461046e576100fe565b8063a8e5e4aa14610313578063ab65a1f71461033c578063bc197c8114610365578063c12e5d54146103a2576100fe565b80634c674c2d116100c65780634c674c2d146102875780635d578816146102a35780635d799f87146102bf5780638da5cb5b146102e8576100fe565b806301ffc9a7146101bb57806304824e70146101f8578063150b7a021461022157806326e2dca21461025e576100fe565b366100fe57005b60046000803770010000000000000000000000000000000060205260406000205480610195577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c174e6f7420696d706c656d656e746564206d6574686f642e0000000000604052600060605260646000fd5b3660008037600080366000845af46101b1573d6000803e3d6000fd5b3d6000803e3d6000f35b3480156101c757600080fd5b506101e260048036038101906101dd9190611d4c565b610497565b6040516101ef9190611d94565b60405180910390f35b34801561020457600080fd5b5061021f600480360381019061021a9190611e0d565b6104e8565b005b34801561022d57600080fd5b5061024860048036038101906102439190611ed5565b6105aa565b6040516102559190611f6c565b60405180910390f35b34801561026a57600080fd5b5061028560048036038101906102809190611fdd565b6105bf565b005b6102a1600480360381019061029c9190612051565b6106ae565b005b6102bd60048036038101906102b8919061214a565b61071f565b005b3480156102cb57600080fd5b506102e660048036038101906102e191906121fe565b6107c2565b005b3480156102f457600080fd5b506102fd6108ff565b60405161030a919061224d565b60405180910390f35b34801561031f57600080fd5b5061033a600480360381019061033591906122a6565b610932565b005b34801561034857600080fd5b50610363600480360381019061035e919061234f565b610a2b565b005b34801561037157600080fd5b5061038c6004803603810190610387919061239c565b610ee7565b6040516103999190611f6c565b60405180910390f35b3480156103ae57600080fd5b506103c960048036038101906103c4919061249c565b610eff565b005b3480156103d757600080fd5b506103f260048036038101906103ed919061253b565b611354565b005b34801561040057600080fd5b5061041b60048036038101906104169190612588565b611414565b6040516104289190611f6c565b60405180910390f35b34801561043d57600080fd5b50610458600480360381019061045391906125fc565b611428565b6040516104659190611f6c565b60405180910390f35b34801561047a57600080fd5b5061049560048036038101906104909190611e0d565b61143e565b005b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b3373ffffffffffffffffffffffffffffffffffffffff166105076108ff565b73ffffffffffffffffffffffffffffffffffffffff161461055d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610554906126f3565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610598573361059a565b815b90506105a68147611547565b5050565b600063150b7a0260e01b905095945050505050565b3373ffffffffffffffffffffffffffffffffffffffff166105de6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906126f3565b60405180910390fd5b7f23b872dd0000000000000000000000000000000000000000000000000000000060005230600452806000811461066e5781602452610673565b336024525b50825b368110156106a75780356044526000806064600080895af161069c573d6000803e3d6000fd5b602081019050610676565b5050505050565b600034470390506106bf83836115d4565b8047036106cb57600080f35b804711156106e457600080600080844703335af1600080f35b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107169061275f565b60405180910390fd5b600061072961152e565b90506001816000015414610772576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610769906127cb565b60405180910390fd5b600281600001819055506107868787611941565b61079085856115d4565b61079a83836119c5565b60004711156107af5760008060008047335af1505b6001816000018190555050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff166107e16108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e906126f3565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108725733610874565b815b90506108fa83828573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108b4919061224d565b602060405180830381865afa1580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190612800565b611ab5565b505050565b600061090961152e565b60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3373ffffffffffffffffffffffffffffffffffffffff166109516108ff565b73ffffffffffffffffffffffffffffffffffffffff16146109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099e906126f3565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663095ea7b383836040518363ffffffff1660e01b81526004016109e292919061283c565b6020604051808303816000875af1158015610a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a259190612891565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff16610a4a6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610aa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a97906126f3565b60405180910390fd5b600080610aab611b80565b905060005b84849050811015610c96576000858583818110610ad057610acf6128be565b5b9050602002016020810190610ae59190611d4c565b90506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c2f5784806001019550506000846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167ff05686f2e12debc00665cd81463f2ae8ae5b4f167ea8dead964a3235a7d2a767826000604051610c819291906128ed565b60405180910390a25050806001019050610ab0565b5060008203610ca6575050610ee3565b60008160020190506000818054905090505b6000811115610ede576000826001830381548110610cd957610cd86128be565b5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050600073ffffffffffffffffffffffffffffffffffffffff16846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed15782805490508214610e345782600184805490500381548110610dca57610dc96128be565b5b90600052602060002090600891828204019190066004029054906101000a900460e01b836001840381548110610e0357610e026128be565b5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c02179055505b82600184805490500381548110610e4e57610e4d6128be565b5b90600052602060002090600891828204019190066004026101000a81549063ffffffff021916905582805480610e8757610e86612916565b5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff0219169055905560018503610ec9575050505050610ee3565b846001900394505b5080600190039050610cb8565b505050505b5050565b600063bc197c8160e01b905098975050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16610f1e6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6b906126f3565b60405180910390fd5b6000816000016020810190610f899190611e0d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff1906129b7565b60405180910390fd5b6000611004611b80565b905082806020019061101691906129e6565b8260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209182611064929190612c8f565b503660008480604001906110789190612d5f565b9150915060005b8282905081101561134c57600083838381811061109f5761109e6128be565b5b90506020028101906110b19190612dc2565b60000160208101906110c39190611d4c565b90506000856000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111bf57856002018290806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c02179055505b86866000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550848484818110611264576112636128be565b5b90506020028101906112769190612dc2565b806020019061128591906129e6565b876003016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002091826112e5929190612c8f565b50817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167ff05686f2e12debc00665cd81463f2ae8ae5b4f167ea8dead964a3235a7d2a76782896040516113379291906128ed565b60405180910390a2505080600101905061107f565b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff166113736108ff565b73ffffffffffffffffffffffffffffffffffffffff16146113c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c0906126f3565b60405180910390fd5b60005b8282905081101561140f576114048383838181106113ed576113ec6128be565b5b90506020028101906113ff9190612dea565b610eff565b8060010190506113cc565b505050565b600063f0b9e5ba60e01b9050949350505050565b600063f23a6e6160e01b90509695505050505050565b3373ffffffffffffffffffffffffffffffffffffffff1661145d6108ff565b73ffffffffffffffffffffffffffffffffffffffff16146114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114aa906126f3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611522576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151990612e84565b60405180910390fd5b61152b81611b99565b50565b6000700200000000000000000000000000000000905090565b60008111156115d05760008060008084865af16115cf577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1c5f7472616e736665724574682f5452414e534645525f4641494c4544604052600060605260646000fd5b5b5050565b600080828401604051855b8281101561188057803563ffffffff8160201c16945084601c830184378060f01c8061165b57600080878674ffffffffffffffffffffffffffffffffffffffffff8660401c16732317d8b224328644759319dffa2a5da77c72e0e95af16116505761164982611915565b5050611873565b600196505050611873565b6103e781036117295763ffffffff821663d0e30db081036116ce57600080888774ffffffffffffffffffffffffffffffffffffffffff8760401c167342000000000000000000000000000000000000065af16116c2576116ba83611915565b505050611873565b60019750505050611873565b632e1a7d4d810361171857600080888760007342000000000000000000000000000000000000065af161170c5761170483611915565b505050611873565b60019750505050611873565b61172183611915565b505050611873565b807f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563015480600a1a6117d6578260021a6117ce577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c10496e616374697665206d61726b65742e000000000000000000000000604052600060605260646000fd5b505050611873565b80600b1a61183857600080888774ffffffffffffffffffffffffffffffffffffffffff8760401c1673ffffffffffffffffffffffffffffffffffffffff86165af161182c5761182483611915565b505050611873565b60019750505050611873565b600080888773ffffffffffffffffffffffffffffffffffffffff85165af461186b5761186383611915565b505050611873565b600197505050505b83601c82010190506115df565b508361191057600085111561190f573d611905577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c134e6f206f72646572207375636365656465642e000000000000000000604052600060605260646000fd5b3d6000803e3d6000fd5b5b611939565b8060021a611936573d61192c578060005260206000fd5b3d6000803e3d6000fd5b50565b505050505050565b60008282905011156119c1576040516040820283017f23b872dd000000000000000000000000000000000000000000000000000000008252336004830152306024830152835b818110156119bd57602081013560008111156119b157806044850152600080606486600086355af1505b50604081019050611987565b5050505b5050565b60005b82829050811015611ab057611aa58383838181106119e9576119e86128be565b5b90506020020160208101906119fe9190611e0d565b33858585818110611a1257611a116128be565b5b9050602002016020810190611a279190611e0d565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611a5f919061224d565b602060405180830381865afa158015611a7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa09190612800565b611c70565b8060010190506119c8565b505050565b60006040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152826024820152602081604483600073ffffffffffffffffffffffffffffffffffffffff8a165af191503d600182511460208210151681151783169250505060008103611b7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7190612ef0565b60405180910390fd5b50505050565b6000700100000000000000000000000000000000905090565b6000611ba361152e565b905060008160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000811115611ce5576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152816024820152600080604483600073ffffffffffffffffffffffffffffffffffffffff89165af150505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d2981611cf4565b8114611d3457600080fd5b50565b600081359050611d4681611d20565b92915050565b600060208284031215611d6257611d61611cea565b5b6000611d7084828501611d37565b91505092915050565b60008115159050919050565b611d8e81611d79565b82525050565b6000602082019050611da96000830184611d85565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611dda82611daf565b9050919050565b611dea81611dcf565b8114611df557600080fd5b50565b600081359050611e0781611de1565b92915050565b600060208284031215611e2357611e22611cea565b5b6000611e3184828501611df8565b91505092915050565b6000819050919050565b611e4d81611e3a565b8114611e5857600080fd5b50565b600081359050611e6a81611e44565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611e9557611e94611e70565b5b8235905067ffffffffffffffff811115611eb257611eb1611e75565b5b602083019150836001820283011115611ece57611ecd611e7a565b5b9250929050565b600080600080600060808688031215611ef157611ef0611cea565b5b6000611eff88828901611df8565b9550506020611f1088828901611df8565b9450506040611f2188828901611e5b565b935050606086013567ffffffffffffffff811115611f4257611f41611cef565b5b611f4e88828901611e7f565b92509250509295509295909350565b611f6681611cf4565b82525050565b6000602082019050611f816000830184611f5d565b92915050565b60008083601f840112611f9d57611f9c611e70565b5b8235905067ffffffffffffffff811115611fba57611fb9611e75565b5b602083019150836020820283011115611fd657611fd5611e7a565b5b9250929050565b60008060008060608587031215611ff757611ff6611cea565b5b600061200587828801611df8565b945050602085013567ffffffffffffffff81111561202657612025611cef565b5b61203287828801611f87565b9350935050604061204587828801611df8565b91505092959194509250565b6000806020838503121561206857612067611cea565b5b600083013567ffffffffffffffff81111561208657612085611cef565b5b61209285828601611e7f565b92509250509250929050565b60008083601f8401126120b4576120b3611e70565b5b8235905067ffffffffffffffff8111156120d1576120d0611e75565b5b6020830191508360408202830111156120ed576120ec611e7a565b5b9250929050565b60008083601f84011261210a57612109611e70565b5b8235905067ffffffffffffffff81111561212757612126611e75565b5b60208301915083602082028301111561214357612142611e7a565b5b9250929050565b6000806000806000806060878903121561216757612166611cea565b5b600087013567ffffffffffffffff81111561218557612184611cef565b5b61219189828a0161209e565b9650965050602087013567ffffffffffffffff8111156121b4576121b3611cef565b5b6121c089828a01611e7f565b9450945050604087013567ffffffffffffffff8111156121e3576121e2611cef565b5b6121ef89828a016120f4565b92509250509295509295509295565b6000806040838503121561221557612214611cea565b5b600061222385828601611df8565b925050602061223485828601611df8565b9150509250929050565b61224781611dcf565b82525050565b6000602082019050612262600083018461223e565b92915050565b600061227382611dcf565b9050919050565b61228381612268565b811461228e57600080fd5b50565b6000813590506122a08161227a565b92915050565b6000806000606084860312156122bf576122be611cea565b5b60006122cd86828701612291565b93505060206122de86828701611df8565b92505060406122ef86828701611e5b565b9150509250925092565b60008083601f84011261230f5761230e611e70565b5b8235905067ffffffffffffffff81111561232c5761232b611e75565b5b60208301915083602082028301111561234857612347611e7a565b5b9250929050565b6000806020838503121561236657612365611cea565b5b600083013567ffffffffffffffff81111561238457612383611cef565b5b612390858286016122f9565b92509250509250929050565b60008060008060008060008060a0898b0312156123bc576123bb611cea565b5b60006123ca8b828c01611df8565b98505060206123db8b828c01611df8565b975050604089013567ffffffffffffffff8111156123fc576123fb611cef565b5b6124088b828c01611f87565b9650965050606089013567ffffffffffffffff81111561242b5761242a611cef565b5b6124378b828c01611f87565b9450945050608089013567ffffffffffffffff81111561245a57612459611cef565b5b6124668b828c01611e7f565b92509250509295985092959890939650565b600080fd5b60006060828403121561249357612492612478565b5b81905092915050565b6000602082840312156124b2576124b1611cea565b5b600082013567ffffffffffffffff8111156124d0576124cf611cef565b5b6124dc8482850161247d565b91505092915050565b60008083601f8401126124fb576124fa611e70565b5b8235905067ffffffffffffffff81111561251857612517611e75565b5b60208301915083602082028301111561253457612533611e7a565b5b9250929050565b6000806020838503121561255257612551611cea565b5b600083013567ffffffffffffffff8111156125705761256f611cef565b5b61257c858286016124e5565b92509250509250929050565b600080600080606085870312156125a2576125a1611cea565b5b60006125b087828801611df8565b94505060206125c187828801611e5b565b935050604085013567ffffffffffffffff8111156125e2576125e1611cef565b5b6125ee87828801611e7f565b925092505092959194509250565b60008060008060008060a0878903121561261957612618611cea565b5b600061262789828a01611df8565b965050602061263889828a01611df8565b955050604061264989828a01611e5b565b945050606061265a89828a01611e5b565b935050608087013567ffffffffffffffff81111561267b5761267a611cef565b5b61268789828a01611e7f565b92509250509295509295509295565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006126dd602083612696565b91506126e8826126a7565b602082019050919050565b6000602082019050818103600083015261270c816126d0565b9050919050565b7f4661696c656420746f2072657475726e204554482e0000000000000000000000600082015250565b6000612749601583612696565b915061275482612713565b602082019050919050565b600060208201905081810360008301526127788161273c565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006127b5601f83612696565b91506127c08261277f565b602082019050919050565b600060208201905081810360008301526127e4816127a8565b9050919050565b6000815190506127fa81611e44565b92915050565b60006020828403121561281657612815611cea565b5b6000612824848285016127eb565b91505092915050565b61283681611e3a565b82525050565b6000604082019050612851600083018561223e565b61285e602083018461282d565b9392505050565b61286e81611d79565b811461287957600080fd5b50565b60008151905061288b81612865565b92915050565b6000602082840312156128a7576128a6611cea565b5b60006128b58482850161287c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050612902600083018561223e565b61290f602083018461223e565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f7265676973746572466561747572653a20696e76616c6964206665617475726560008201527f20616464726573732e0000000000000000000000000000000000000000000000602082015250565b60006129a1602983612696565b91506129ac82612945565b604082019050919050565b600060208201905081810360008301526129d081612994565b9050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112612a0357612a026129d7565b5b80840192508235915067ffffffffffffffff821115612a2557612a246129dc565b5b602083019250600182023603831315612a4157612a406129e1565b5b509250929050565b600082905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612aca57607f821691505b602082108103612add57612adc612a83565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302612b457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612b08565b612b4f8683612b08565b95508019841693508086168417925050509392505050565b6000819050919050565b6000612b8c612b87612b8284611e3a565b612b67565b611e3a565b9050919050565b6000819050919050565b612ba683612b71565b612bba612bb282612b93565b848454612b15565b825550505050565b600090565b612bcf612bc2565b612bda818484612b9d565b505050565b5b81811015612bfe57612bf3600082612bc7565b600181019050612be0565b5050565b601f821115612c4357612c1481612ae3565b612c1d84612af8565b81016020851015612c2c578190505b612c40612c3885612af8565b830182612bdf565b50505b505050565b600082821c905092915050565b6000612c6660001984600802612c48565b1980831691505092915050565b6000612c7f8383612c55565b9150826002028217905092915050565b612c998383612a49565b67ffffffffffffffff811115612cb257612cb1612a54565b5b612cbc8254612ab2565b612cc7828285612c02565b6000601f831160018114612cf65760008415612ce4578287013590505b612cee8582612c73565b865550612d56565b601f198416612d0486612ae3565b60005b82811015612d2c57848901358255600182019150602085019450602081019050612d07565b86831015612d495784890135612d45601f891682612c55565b8355505b6001600288020188555050505b50505050505050565b60008083356001602003843603038112612d7c57612d7b6129d7565b5b80840192508235915067ffffffffffffffff821115612d9e57612d9d6129dc565b5b602083019250602082023603831315612dba57612db96129e1565b5b509250929050565b600082356001604003833603038112612dde57612ddd6129d7565b5b80830191505092915050565b600082356001606003833603038112612e0657612e056129d7565b5b80830191505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612e6e602683612696565b9150612e7982612e12565b604082019050919050565b60006020820190508181036000830152612e9d81612e61565b9050919050565b7f5f7472616e7366657245524332302f5452414e534645525f4641494c45440000600082015250565b6000612eda601e83612696565b9150612ee582612ea4565b602082019050919050565b60006020820190508181036000830152612f0981612ecd565b905091905056fea26469706673582212206f57a64d18449bc70a4cf78d0d7228fac2deec2fdce295e07624e0f11c83638864736f6c63430008110033
Deployed Bytecode
0x6080604052600436106100f75760003560e01c8063a8e5e4aa1161008a578063d750e2a511610059578063d750e2a5146103cb578063f0b9e5ba146103f4578063f23a6e6114610431578063f2fde38b1461046e576100fe565b8063a8e5e4aa14610313578063ab65a1f71461033c578063bc197c8114610365578063c12e5d54146103a2576100fe565b80634c674c2d116100c65780634c674c2d146102875780635d578816146102a35780635d799f87146102bf5780638da5cb5b146102e8576100fe565b806301ffc9a7146101bb57806304824e70146101f8578063150b7a021461022157806326e2dca21461025e576100fe565b366100fe57005b60046000803770010000000000000000000000000000000060205260406000205480610195577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c174e6f7420696d706c656d656e746564206d6574686f642e0000000000604052600060605260646000fd5b3660008037600080366000845af46101b1573d6000803e3d6000fd5b3d6000803e3d6000f35b3480156101c757600080fd5b506101e260048036038101906101dd9190611d4c565b610497565b6040516101ef9190611d94565b60405180910390f35b34801561020457600080fd5b5061021f600480360381019061021a9190611e0d565b6104e8565b005b34801561022d57600080fd5b5061024860048036038101906102439190611ed5565b6105aa565b6040516102559190611f6c565b60405180910390f35b34801561026a57600080fd5b5061028560048036038101906102809190611fdd565b6105bf565b005b6102a1600480360381019061029c9190612051565b6106ae565b005b6102bd60048036038101906102b8919061214a565b61071f565b005b3480156102cb57600080fd5b506102e660048036038101906102e191906121fe565b6107c2565b005b3480156102f457600080fd5b506102fd6108ff565b60405161030a919061224d565b60405180910390f35b34801561031f57600080fd5b5061033a600480360381019061033591906122a6565b610932565b005b34801561034857600080fd5b50610363600480360381019061035e919061234f565b610a2b565b005b34801561037157600080fd5b5061038c6004803603810190610387919061239c565b610ee7565b6040516103999190611f6c565b60405180910390f35b3480156103ae57600080fd5b506103c960048036038101906103c4919061249c565b610eff565b005b3480156103d757600080fd5b506103f260048036038101906103ed919061253b565b611354565b005b34801561040057600080fd5b5061041b60048036038101906104169190612588565b611414565b6040516104289190611f6c565b60405180910390f35b34801561043d57600080fd5b50610458600480360381019061045391906125fc565b611428565b6040516104659190611f6c565b60405180910390f35b34801561047a57600080fd5b5061049560048036038101906104909190611e0d565b61143e565b005b60006301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b3373ffffffffffffffffffffffffffffffffffffffff166105076108ff565b73ffffffffffffffffffffffffffffffffffffffff161461055d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610554906126f3565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610598573361059a565b815b90506105a68147611547565b5050565b600063150b7a0260e01b905095945050505050565b3373ffffffffffffffffffffffffffffffffffffffff166105de6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b906126f3565b60405180910390fd5b7f23b872dd0000000000000000000000000000000000000000000000000000000060005230600452806000811461066e5781602452610673565b336024525b50825b368110156106a75780356044526000806064600080895af161069c573d6000803e3d6000fd5b602081019050610676565b5050505050565b600034470390506106bf83836115d4565b8047036106cb57600080f35b804711156106e457600080600080844703335af1600080f35b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107169061275f565b60405180910390fd5b600061072961152e565b90506001816000015414610772576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610769906127cb565b60405180910390fd5b600281600001819055506107868787611941565b61079085856115d4565b61079a83836119c5565b60004711156107af5760008060008047335af1505b6001816000018190555050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff166107e16108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610837576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082e906126f3565b60405180910390fd5b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036108725733610874565b815b90506108fa83828573ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016108b4919061224d565b602060405180830381865afa1580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190612800565b611ab5565b505050565b600061090961152e565b60010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b3373ffffffffffffffffffffffffffffffffffffffff166109516108ff565b73ffffffffffffffffffffffffffffffffffffffff16146109a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099e906126f3565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663095ea7b383836040518363ffffffff1660e01b81526004016109e292919061283c565b6020604051808303816000875af1158015610a01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a259190612891565b50505050565b3373ffffffffffffffffffffffffffffffffffffffff16610a4a6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610aa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a97906126f3565b60405180910390fd5b600080610aab611b80565b905060005b84849050811015610c96576000858583818110610ad057610acf6128be565b5b9050602002016020810190610ae59190611d4c565b90506000836000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610c2f5784806001019550506000846000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167ff05686f2e12debc00665cd81463f2ae8ae5b4f167ea8dead964a3235a7d2a767826000604051610c819291906128ed565b60405180910390a25050806001019050610ab0565b5060008203610ca6575050610ee3565b60008160020190506000818054905090505b6000811115610ede576000826001830381548110610cd957610cd86128be565b5b90600052602060002090600891828204019190066004029054906101000a900460e01b9050600073ffffffffffffffffffffffffffffffffffffffff16846000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610ed15782805490508214610e345782600184805490500381548110610dca57610dc96128be565b5b90600052602060002090600891828204019190066004029054906101000a900460e01b836001840381548110610e0357610e026128be565b5b90600052602060002090600891828204019190066004026101000a81548163ffffffff021916908360e01c02179055505b82600184805490500381548110610e4e57610e4d6128be565b5b90600052602060002090600891828204019190066004026101000a81549063ffffffff021916905582805480610e8757610e86612916565b5b60019003818190600052602060002090600891828204019190066004026101000a81549063ffffffff0219169055905560018503610ec9575050505050610ee3565b846001900394505b5080600190039050610cb8565b505050505b5050565b600063bc197c8160e01b905098975050505050505050565b3373ffffffffffffffffffffffffffffffffffffffff16610f1e6108ff565b73ffffffffffffffffffffffffffffffffffffffff1614610f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6b906126f3565b60405180910390fd5b6000816000016020810190610f899190611e0d565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610ffa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff1906129b7565b60405180910390fd5b6000611004611b80565b905082806020019061101691906129e6565b8260010160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209182611064929190612c8f565b503660008480604001906110789190612d5f565b9150915060005b8282905081101561134c57600083838381811061109f5761109e6128be565b5b90506020028101906110b19190612dc2565b60000160208101906110c39190611d4c565b90506000856000016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036111bf57856002018290806001815401808255809150506001900390600052602060002090600891828204019190066004029091909190916101000a81548163ffffffff021916908360e01c02179055505b86866000016000847bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550848484818110611264576112636128be565b5b90506020028101906112769190612dc2565b806020019061128591906129e6565b876003016000857bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002091826112e5929190612c8f565b50817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167ff05686f2e12debc00665cd81463f2ae8ae5b4f167ea8dead964a3235a7d2a76782896040516113379291906128ed565b60405180910390a2505080600101905061107f565b505050505050565b3373ffffffffffffffffffffffffffffffffffffffff166113736108ff565b73ffffffffffffffffffffffffffffffffffffffff16146113c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c0906126f3565b60405180910390fd5b60005b8282905081101561140f576114048383838181106113ed576113ec6128be565b5b90506020028101906113ff9190612dea565b610eff565b8060010190506113cc565b505050565b600063f0b9e5ba60e01b9050949350505050565b600063f23a6e6160e01b90509695505050505050565b3373ffffffffffffffffffffffffffffffffffffffff1661145d6108ff565b73ffffffffffffffffffffffffffffffffffffffff16146114b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114aa906126f3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611522576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151990612e84565b60405180910390fd5b61152b81611b99565b50565b6000700200000000000000000000000000000000905090565b60008111156115d05760008060008084865af16115cf577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c1c5f7472616e736665724574682f5452414e534645525f4641494c4544604052600060605260646000fd5b5b5050565b600080828401604051855b8281101561188057803563ffffffff8160201c16945084601c830184378060f01c8061165b57600080878674ffffffffffffffffffffffffffffffffffffffffff8660401c16732317d8b224328644759319dffa2a5da77c72e0e95af16116505761164982611915565b5050611873565b600196505050611873565b6103e781036117295763ffffffff821663d0e30db081036116ce57600080888774ffffffffffffffffffffffffffffffffffffffffff8760401c167342000000000000000000000000000000000000065af16116c2576116ba83611915565b505050611873565b60019750505050611873565b632e1a7d4d810361171857600080888760007342000000000000000000000000000000000000065af161170c5761170483611915565b505050611873565b60019750505050611873565b61172183611915565b505050611873565b807f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563015480600a1a6117d6578260021a6117ce577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c10496e616374697665206d61726b65742e000000000000000000000000604052600060605260646000fd5b505050611873565b80600b1a61183857600080888774ffffffffffffffffffffffffffffffffffffffffff8760401c1673ffffffffffffffffffffffffffffffffffffffff86165af161182c5761182483611915565b505050611873565b60019750505050611873565b600080888773ffffffffffffffffffffffffffffffffffffffff85165af461186b5761186383611915565b505050611873565b600197505050505b83601c82010190506115df565b508361191057600085111561190f573d611905577f08c379a0000000000000000000000000000000000000000000000000000000006000527c20000000000000000000000000000000000000000000000000000000006020527c134e6f206f72646572207375636365656465642e000000000000000000604052600060605260646000fd5b3d6000803e3d6000fd5b5b611939565b8060021a611936573d61192c578060005260206000fd5b3d6000803e3d6000fd5b50565b505050505050565b60008282905011156119c1576040516040820283017f23b872dd000000000000000000000000000000000000000000000000000000008252336004830152306024830152835b818110156119bd57602081013560008111156119b157806044850152600080606486600086355af1505b50604081019050611987565b5050505b5050565b60005b82829050811015611ab057611aa58383838181106119e9576119e86128be565b5b90506020020160208101906119fe9190611e0d565b33858585818110611a1257611a116128be565b5b9050602002016020810190611a279190611e0d565b73ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401611a5f919061224d565b602060405180830381865afa158015611a7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa09190612800565b611c70565b8060010190506119c8565b505050565b60006040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152826024820152602081604483600073ffffffffffffffffffffffffffffffffffffffff8a165af191503d600182511460208210151681151783169250505060008103611b7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7190612ef0565b60405180910390fd5b50505050565b6000700100000000000000000000000000000000905090565b6000611ba361152e565b905060008160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050828260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3505050565b6000811115611ce5576040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83166004820152816024820152600080604483600073ffffffffffffffffffffffffffffffffffffffff89165af150505b505050565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611d2981611cf4565b8114611d3457600080fd5b50565b600081359050611d4681611d20565b92915050565b600060208284031215611d6257611d61611cea565b5b6000611d7084828501611d37565b91505092915050565b60008115159050919050565b611d8e81611d79565b82525050565b6000602082019050611da96000830184611d85565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611dda82611daf565b9050919050565b611dea81611dcf565b8114611df557600080fd5b50565b600081359050611e0781611de1565b92915050565b600060208284031215611e2357611e22611cea565b5b6000611e3184828501611df8565b91505092915050565b6000819050919050565b611e4d81611e3a565b8114611e5857600080fd5b50565b600081359050611e6a81611e44565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611e9557611e94611e70565b5b8235905067ffffffffffffffff811115611eb257611eb1611e75565b5b602083019150836001820283011115611ece57611ecd611e7a565b5b9250929050565b600080600080600060808688031215611ef157611ef0611cea565b5b6000611eff88828901611df8565b9550506020611f1088828901611df8565b9450506040611f2188828901611e5b565b935050606086013567ffffffffffffffff811115611f4257611f41611cef565b5b611f4e88828901611e7f565b92509250509295509295909350565b611f6681611cf4565b82525050565b6000602082019050611f816000830184611f5d565b92915050565b60008083601f840112611f9d57611f9c611e70565b5b8235905067ffffffffffffffff811115611fba57611fb9611e75565b5b602083019150836020820283011115611fd657611fd5611e7a565b5b9250929050565b60008060008060608587031215611ff757611ff6611cea565b5b600061200587828801611df8565b945050602085013567ffffffffffffffff81111561202657612025611cef565b5b61203287828801611f87565b9350935050604061204587828801611df8565b91505092959194509250565b6000806020838503121561206857612067611cea565b5b600083013567ffffffffffffffff81111561208657612085611cef565b5b61209285828601611e7f565b92509250509250929050565b60008083601f8401126120b4576120b3611e70565b5b8235905067ffffffffffffffff8111156120d1576120d0611e75565b5b6020830191508360408202830111156120ed576120ec611e7a565b5b9250929050565b60008083601f84011261210a57612109611e70565b5b8235905067ffffffffffffffff81111561212757612126611e75565b5b60208301915083602082028301111561214357612142611e7a565b5b9250929050565b6000806000806000806060878903121561216757612166611cea565b5b600087013567ffffffffffffffff81111561218557612184611cef565b5b61219189828a0161209e565b9650965050602087013567ffffffffffffffff8111156121b4576121b3611cef565b5b6121c089828a01611e7f565b9450945050604087013567ffffffffffffffff8111156121e3576121e2611cef565b5b6121ef89828a016120f4565b92509250509295509295509295565b6000806040838503121561221557612214611cea565b5b600061222385828601611df8565b925050602061223485828601611df8565b9150509250929050565b61224781611dcf565b82525050565b6000602082019050612262600083018461223e565b92915050565b600061227382611dcf565b9050919050565b61228381612268565b811461228e57600080fd5b50565b6000813590506122a08161227a565b92915050565b6000806000606084860312156122bf576122be611cea565b5b60006122cd86828701612291565b93505060206122de86828701611df8565b92505060406122ef86828701611e5b565b9150509250925092565b60008083601f84011261230f5761230e611e70565b5b8235905067ffffffffffffffff81111561232c5761232b611e75565b5b60208301915083602082028301111561234857612347611e7a565b5b9250929050565b6000806020838503121561236657612365611cea565b5b600083013567ffffffffffffffff81111561238457612383611cef565b5b612390858286016122f9565b92509250509250929050565b60008060008060008060008060a0898b0312156123bc576123bb611cea565b5b60006123ca8b828c01611df8565b98505060206123db8b828c01611df8565b975050604089013567ffffffffffffffff8111156123fc576123fb611cef565b5b6124088b828c01611f87565b9650965050606089013567ffffffffffffffff81111561242b5761242a611cef565b5b6124378b828c01611f87565b9450945050608089013567ffffffffffffffff81111561245a57612459611cef565b5b6124668b828c01611e7f565b92509250509295985092959890939650565b600080fd5b60006060828403121561249357612492612478565b5b81905092915050565b6000602082840312156124b2576124b1611cea565b5b600082013567ffffffffffffffff8111156124d0576124cf611cef565b5b6124dc8482850161247d565b91505092915050565b60008083601f8401126124fb576124fa611e70565b5b8235905067ffffffffffffffff81111561251857612517611e75565b5b60208301915083602082028301111561253457612533611e7a565b5b9250929050565b6000806020838503121561255257612551611cea565b5b600083013567ffffffffffffffff8111156125705761256f611cef565b5b61257c858286016124e5565b92509250509250929050565b600080600080606085870312156125a2576125a1611cea565b5b60006125b087828801611df8565b94505060206125c187828801611e5b565b935050604085013567ffffffffffffffff8111156125e2576125e1611cef565b5b6125ee87828801611e7f565b925092505092959194509250565b60008060008060008060a0878903121561261957612618611cea565b5b600061262789828a01611df8565b965050602061263889828a01611df8565b955050604061264989828a01611e5b565b945050606061265a89828a01611e5b565b935050608087013567ffffffffffffffff81111561267b5761267a611cef565b5b61268789828a01611e7f565b92509250509295509295509295565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006126dd602083612696565b91506126e8826126a7565b602082019050919050565b6000602082019050818103600083015261270c816126d0565b9050919050565b7f4661696c656420746f2072657475726e204554482e0000000000000000000000600082015250565b6000612749601583612696565b915061275482612713565b602082019050919050565b600060208201905081810360008301526127788161273c565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006127b5601f83612696565b91506127c08261277f565b602082019050919050565b600060208201905081810360008301526127e4816127a8565b9050919050565b6000815190506127fa81611e44565b92915050565b60006020828403121561281657612815611cea565b5b6000612824848285016127eb565b91505092915050565b61283681611e3a565b82525050565b6000604082019050612851600083018561223e565b61285e602083018461282d565b9392505050565b61286e81611d79565b811461287957600080fd5b50565b60008151905061288b81612865565b92915050565b6000602082840312156128a7576128a6611cea565b5b60006128b58482850161287c565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050612902600083018561223e565b61290f602083018461223e565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f7265676973746572466561747572653a20696e76616c6964206665617475726560008201527f20616464726573732e0000000000000000000000000000000000000000000000602082015250565b60006129a1602983612696565b91506129ac82612945565b604082019050919050565b600060208201905081810360008301526129d081612994565b9050919050565b600080fd5b600080fd5b600080fd5b60008083356001602003843603038112612a0357612a026129d7565b5b80840192508235915067ffffffffffffffff821115612a2557612a246129dc565b5b602083019250600182023603831315612a4157612a406129e1565b5b509250929050565b600082905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612aca57607f821691505b602082108103612add57612adc612a83565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302612b457fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612b08565b612b4f8683612b08565b95508019841693508086168417925050509392505050565b6000819050919050565b6000612b8c612b87612b8284611e3a565b612b67565b611e3a565b9050919050565b6000819050919050565b612ba683612b71565b612bba612bb282612b93565b848454612b15565b825550505050565b600090565b612bcf612bc2565b612bda818484612b9d565b505050565b5b81811015612bfe57612bf3600082612bc7565b600181019050612be0565b5050565b601f821115612c4357612c1481612ae3565b612c1d84612af8565b81016020851015612c2c578190505b612c40612c3885612af8565b830182612bdf565b50505b505050565b600082821c905092915050565b6000612c6660001984600802612c48565b1980831691505092915050565b6000612c7f8383612c55565b9150826002028217905092915050565b612c998383612a49565b67ffffffffffffffff811115612cb257612cb1612a54565b5b612cbc8254612ab2565b612cc7828285612c02565b6000601f831160018114612cf65760008415612ce4578287013590505b612cee8582612c73565b865550612d56565b601f198416612d0486612ae3565b60005b82811015612d2c57848901358255600182019150602085019450602081019050612d07565b86831015612d495784890135612d45601f891682612c55565b8355505b6001600288020188555050505b50505050505050565b60008083356001602003843603038112612d7c57612d7b6129d7565b5b80840192508235915067ffffffffffffffff821115612d9e57612d9d6129dc565b5b602083019250602082023603831315612dba57612db96129e1565b5b509250929050565b600082356001604003833603038112612dde57612ddd6129d7565b5b80830191505092915050565b600082356001606003833603038112612e0657612e056129d7565b5b80830191505092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000612e6e602683612696565b9150612e7982612e12565b604082019050919050565b60006020820190508181036000830152612e9d81612e61565b9050919050565b7f5f7472616e7366657245524332302f5452414e534645525f4641494c45440000600082015250565b6000612eda601e83612696565b9150612ee582612ea4565b602082019050919050565b60006020820190508181036000830152612f0981612ecd565b905091905056fea26469706673582212206f57a64d18449bc70a4cf78d0d7228fac2deec2fdce295e07624e0f11c83638864736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
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.