Source Code
Overview
GLMR Balance
GLMR Value
$0.00Latest 1 internal transaction
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 4061325 | 920 days ago | Contract Creation | 0 GLMR |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
PausableZoneController
Compiler Version
v0.8.17+commit.8df45f5f
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.0;
import { PausableZone } from "./PausableZone.sol";
import {
PausableZoneControllerInterface
} from "./interfaces/PausableZoneControllerInterface.sol";
import {
PausableZoneEventsAndErrors
} from "./interfaces/PausableZoneEventsAndErrors.sol";
import {
Order,
Fulfillment,
OrderComponents,
AdvancedOrder,
CriteriaResolver,
Execution
} from "../lib/ConsiderationStructs.sol";
import { SeaportInterface } from "../interfaces/SeaportInterface.sol";
/**
* @title PausableZoneController
* @author cupOJoseph, BCLeFevre, stuckinaboot, stephankmin
* @notice PausableZoneController enables deploying, pausing and executing
* orders on PausableZones. This deployer is designed to be owned
* by a gnosis safe, DAO, or trusted party.
*/
contract PausableZoneController is
PausableZoneControllerInterface,
PausableZoneEventsAndErrors
{
// Set the owner that can deploy, pause and execute orders on PausableZones.
address internal _owner;
// Set the address of the new potential owner of the zone.
address private _potentialOwner;
// Set the address with the ability to pause the zone.
address internal _pauser;
// Set the immutable zone creation code hash.
bytes32 public immutable zoneCreationCode;
/**
* @dev Throws if called by any account other than the owner or pauser.
*/
modifier isPauser() {
if (msg.sender != _pauser && msg.sender != _owner) {
revert InvalidPauser();
}
_;
}
/**
* @notice Set the owner of the controller and store
* the zone creation code.
*
* @param ownerAddress The deployer to be set as the owner.
*/
constructor(address ownerAddress) {
// Set the owner address as the owner.
_owner = ownerAddress;
// Hash and store the zone creation code.
zoneCreationCode = keccak256(type(PausableZone).creationCode);
}
/**
* @notice Deploy a PausableZone to a precomputed address.
*
* @param salt The salt to be used to derive the zone address
*
* @return derivedAddress The derived address for the zone.
*/
function createZone(bytes32 salt)
external
override
returns (address derivedAddress)
{
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Derive the PausableZone address.
// This expression demonstrates address computation but is not required.
derivedAddress = address(
uint160(
uint256(
keccak256(
abi.encodePacked(
bytes1(0xff),
address(this),
salt,
zoneCreationCode
)
)
)
)
);
// Revert if a zone is currently deployed to the derived address.
if (derivedAddress.code.length != 0) {
revert ZoneAlreadyExists(derivedAddress);
}
// Deploy the zone using the supplied salt.
new PausableZone{ salt: salt }();
// Emit an event signifying that the zone was created.
emit ZoneCreated(derivedAddress, salt);
}
/**
* @notice Pause orders on a given zone.
*
* @param zone The address of the zone to be paused.
*
* @return success A boolean indicating the zone has been paused.
*/
// function pause(address zone)
// external
// override
// isPauser
// returns (bool success)
// {
// // Call pause on the given zone.
// PausableZone(zone).pause(msg.sender);
//
// // Return a boolean indicating the pause was successful.
// success = true;
// }
/**
* @notice Cancel Seaport orders on a given zone.
*
* @param pausableZoneAddress The zone that manages the
* orders to be cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to cancel.
*/
function cancelOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
OrderComponents[] calldata orders
) external override {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Create a zone object from the zone address.
PausableZone zone = PausableZone(pausableZoneAddress);
// Call cancelOrders on the given zone.
zone.cancelOrders(seaportAddress, orders);
}
/**
* @notice Execute an arbitrary number of matched orders on a given zone.
*
* @param pausableZoneAddress The zone that manages the orders
* to be cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to match.
* @param fulfillments An array of elements allocating offer
* components to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
Order[] calldata orders,
Fulfillment[] calldata fulfillments
) external payable override returns (Execution[] memory executions) {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Create a zone object from the zone address.
PausableZone zone = PausableZone(pausableZoneAddress);
// Call executeMatchOrders on the given zone and return the sequence
// of transfers performed as part of matching the given orders.
executions = zone.executeMatchOrders{ value: msg.value }(
seaportAddress,
orders,
fulfillments
);
}
/**
* @notice Execute an arbitrary number of matched advanced orders on a given
* zone.
*
* @param pausableZoneAddress The zone that manages the orders to be
* cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to match.
* @param criteriaResolvers An array where each element contains a
* reference to a specific order as well as that
* order's offer or consideration, a token
* identifier, and a proof that the supplied
* token identifier is contained in the
* order's merkle root.
* @param fulfillments An array of elements allocating offer
* components to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchAdvancedOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
AdvancedOrder[] calldata orders,
CriteriaResolver[] calldata criteriaResolvers,
Fulfillment[] calldata fulfillments
) external payable override returns (Execution[] memory executions) {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Create a zone object from the zone address.
PausableZone zone = PausableZone(pausableZoneAddress);
// Call executeMatchOrders on the given zone and return the sequence
// of transfers performed as part of matching the given orders.
executions = zone.executeMatchAdvancedOrders{ value: msg.value }(
seaportAddress,
orders,
criteriaResolvers,
fulfillments
);
}
/**
* @notice Initiate Zone ownership transfer by assigning a new potential
* owner this contract. Once set, the new potential owner
* may call `acceptOwnership` to claim ownership.
* Only the owner in question may call this function.
*
* @param newPotentialOwner The address for which to initiate ownership
* transfer to.
*/
function transferOwnership(address newPotentialOwner) external override {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Ensure the new potential owner is not an invalid address.
if (newPotentialOwner == address(0)) {
revert OwnerCanNotBeSetAsZero();
}
// Emit an event indicating that the potential owner has been updated.
emit PotentialOwnerUpdated(newPotentialOwner);
// Set the new potential owner as the potential owner.
_potentialOwner = newPotentialOwner;
}
/**
* @notice Clear the currently set potential owner, if any.
* Only the owner of this contract may call this function.
*/
function cancelOwnershipTransfer() external override {
// Ensure the caller is the current owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Emit an event indicating that the potential owner has been cleared.
emit PotentialOwnerUpdated(address(0));
// Clear the current new potential owner.
delete _potentialOwner;
}
/**
* @notice Accept ownership of this contract. Only the account that the
* current owner has set as the new potential owner may call this
* function.
*/
function acceptOwnership() external override {
// Ensure the caller is the potential owner.
if (msg.sender != _potentialOwner) {
revert CallerIsNotPotentialOwner();
}
// Emit an event indicating that the potential owner has been cleared.
emit PotentialOwnerUpdated(address(0));
// Clear the current new potential owner
delete _potentialOwner;
// Emit an event indicating ownership has been transferred.
emit OwnershipTransferred(_owner, msg.sender);
// Set the caller as the owner of this contract.
_owner = msg.sender;
}
/**
* @notice Assign the given address with the ability to pause the zone.
*
* @param pauserToAssign The address to assign the pauser role.
*/
function assignPauser(address pauserToAssign) external override {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Ensure the pauser to assign is not an invalid address.
if (pauserToAssign == address(0)) {
revert PauserCanNotBeSetAsZero();
}
// Set the given account as the pauser.
_pauser = pauserToAssign;
// Emit an event indicating the pauser has been assigned.
emit PauserUpdated(_pauser);
}
/**
* @notice Assign the given address with the ability to operate the
* given zone.
*
* @param pausableZoneAddress The zone address to assign operator role.
* @param operatorToAssign The address to assign as operator.
*/
function assignOperator(
address pausableZoneAddress,
address operatorToAssign
) external override {
// Ensure the caller is the owner.
if (msg.sender != _owner) {
revert CallerIsNotOwner();
}
// Create a zone object from the zone address.
PausableZone zone = PausableZone(pausableZoneAddress);
// Call assignOperator on the zone by passing in the given
// operator address.
zone.assignOperator(operatorToAssign);
}
/**
* @notice An external view function that returns the owner.
*
* @return The address of the owner.
*/
function owner() external view override returns (address) {
return _owner;
}
/**
* @notice An external view function that return the potential owner.
*
* @return The address of the potential owner.
*/
function potentialOwner() external view override returns (address) {
return _potentialOwner;
}
/**
* @notice An external view function that returns the pauser.
*
* @return The address of the pauser.
*/
function pauser() external view override returns (address) {
return _pauser;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { ZoneInterface } from "../interfaces/ZoneInterface.sol";
import { ZoneInteractionErrors } from "../interfaces/ZoneInteractionErrors.sol";
import {
PausableZoneEventsAndErrors
} from "./interfaces/PausableZoneEventsAndErrors.sol";
import { SeaportInterface } from "../interfaces/SeaportInterface.sol";
import {
AdvancedOrder,
CriteriaResolver,
Order,
OrderComponents,
Fulfillment,
Execution
} from "../lib/ConsiderationStructs.sol";
import { PausableZoneInterface } from "./interfaces/PausableZoneInterface.sol";
/**
* @title PausableZone
* @author cupOJoseph, BCLeFevre, ryanio
* @notice PausableZone is a simple zone implementation that approves every
* order. It can be self-destructed by its controller to pause
* restricted orders that have it set as their zone.
*/
contract PausableZone is
PausableZoneEventsAndErrors,
ZoneInterface,
PausableZoneInterface
{
// Set an immutable controller that can pause the zone & update an operator.
address internal immutable _controller;
// Set an operator that can instruct the zone to cancel or execute orders.
address public operator;
/**
* @dev Ensure that the caller is either the operator or controller.
*/
modifier isOperator() {
// Ensure that the caller is either the operator or the controller.
if (msg.sender != operator && msg.sender != _controller) {
revert InvalidOperator();
}
// Continue with function execution.
_;
}
/**
* @dev Ensure that the caller is the controller.
*/
modifier isController() {
// Ensure that the caller is the controller.
if (msg.sender != _controller) {
revert InvalidController();
}
// Continue with function execution.
_;
}
/**
* @notice Set the deployer as the controller of the zone.
*/
constructor() {
// Set the controller to the deployer.
_controller = msg.sender;
// Emit an event signifying that the zone is unpaused.
emit Unpaused();
}
/**
* @notice Cancel an arbitrary number of orders that have agreed to use the
* contract as their zone.
*
* @param seaport The Seaport address.
* @param orders The orders to cancel.
*
* @return cancelled A boolean indicating whether the supplied orders have
* been successfully cancelled.
*/
function cancelOrders(
SeaportInterface seaport,
OrderComponents[] calldata orders
) external override isOperator returns (bool cancelled) {
// Call cancel on Seaport and return its boolean value.
cancelled = seaport.cancel(orders);
}
/**
* @notice Pause this contract, safely stopping orders from using
* the contract as a zone. Restricted orders with this address as a
* zone will not be fulfillable unless the zone is redeployed to the
* same address.
*/
// function pause(address payee) external override isController {
// // Emit an event signifying that the zone is paused.
// emit Paused();
//
// // Destroy the zone, sending any ether to the transaction submitter.
// selfdestruct(payable(payee));
// }
/**
* @notice Assign the given address with the ability to operate the zone.
*
* @param operatorToAssign The address to assign as the operator.
*/
function assignOperator(address operatorToAssign)
external
override
isController
{
// Ensure the operator being assigned is not the null address.
if (operatorToAssign == address(0)) {
revert PauserCanNotBeSetAsZero();
}
// Set the given address as the new operator.
operator = operatorToAssign;
// Emit an event indicating the operator has been updated.
emit OperatorUpdated(operator);
}
/**
* @notice Execute an arbitrary number of matched orders, each with
* an arbitrary number of items for offer and consideration
* along with a set of fulfillments allocating offer components
* to consideration components.
*
* @param seaport The Seaport address.
* @param orders The orders to match.
* @param fulfillments An array of elements allocating offer components
* to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchOrders(
SeaportInterface seaport,
Order[] calldata orders,
Fulfillment[] calldata fulfillments
)
external
payable
override
isOperator
returns (Execution[] memory executions)
{
// Call matchOrders on Seaport and return the sequence of transfers
// performed as part of matching the given orders.
executions = seaport.matchOrders{ value: msg.value }(
orders,
fulfillments
);
}
/**
* @notice Execute an arbitrary number of matched advanced orders,
* each with an arbitrary number of items for offer and
* consideration along with a set of fulfillments allocating
* offer components to consideration components.
*
* @param seaport The Seaport address.
* @param orders The orders to match.
* @param criteriaResolvers An array where each element contains a reference
* to a specific order as well as that order's
* offer or consideration, a token identifier, and
* a proof that the supplied token identifier is
* contained in the order's merkle root.
* @param fulfillments An array of elements allocating offer components
* to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchAdvancedOrders(
SeaportInterface seaport,
AdvancedOrder[] calldata orders,
CriteriaResolver[] calldata criteriaResolvers,
Fulfillment[] calldata fulfillments
)
external
payable
override
isOperator
returns (Execution[] memory executions)
{
// Call matchAdvancedOrders on Seaport and return the sequence of
// transfers performed as part of matching the given orders.
executions = seaport.matchAdvancedOrders{ value: msg.value }(
orders,
criteriaResolvers,
fulfillments
);
}
/**
* @notice Check if a given order is currently valid.
*
* @dev This function is called by Seaport whenever extraData is not
* provided by the caller.
*
* @param orderHash The hash of the order.
* @param caller The caller in question.
* @param offerer The offerer in question.
* @param zoneHash The hash to provide upon calling the zone.
*
* @return validOrderMagicValue A magic value indicating if the order is
* currently valid.
*/
function isValidOrder(
bytes32 orderHash,
address caller,
address offerer,
bytes32 zoneHash
) external pure override returns (bytes4 validOrderMagicValue) {
orderHash;
caller;
offerer;
zoneHash;
// Return the selector of isValidOrder as the magic value.
validOrderMagicValue = ZoneInterface.isValidOrder.selector;
}
/**
* @notice Check if a given order including extraData is currently valid.
*
* @dev This function is called by Seaport whenever any extraData is
* provided by the caller.
*
* @param orderHash The hash of the order.
* @param caller The caller in question.
* @param order The order in question.
* @param priorOrderHashes The order hashes of each order supplied prior to
* the current order as part of a "match" variety
* of order fulfillment.
* @param criteriaResolvers The criteria resolvers corresponding to
* the order.
*
* @return validOrderMagicValue A magic value indicating if the order is
* currently valid.
*/
function isValidOrderIncludingExtraData(
bytes32 orderHash,
address caller,
AdvancedOrder calldata order,
bytes32[] calldata priorOrderHashes,
CriteriaResolver[] calldata criteriaResolvers
) external pure override returns (bytes4 validOrderMagicValue) {
orderHash;
caller;
order;
priorOrderHashes;
criteriaResolvers;
// Return the selector of isValidOrder as the magic value.
validOrderMagicValue = ZoneInterface.isValidOrder.selector;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { PausableZone } from "../PausableZone.sol";
import { PausableZoneEventsAndErrors } from "./PausableZoneEventsAndErrors.sol";
import {
Order,
Fulfillment,
OrderComponents,
AdvancedOrder,
CriteriaResolver,
Execution
} from "../../lib/ConsiderationStructs.sol";
import { SeaportInterface } from "../../interfaces/SeaportInterface.sol";
/**
* @title PausableZoneController
* @author cupOJoseph, BCLeFevre, stuckinaboot
* @notice PausableZoneController enables deploying, pausing and executing
* orders on PausableZones. This deployer is designed to be owned
* by a gnosis safe, DAO, or trusted party.
*/
interface PausableZoneControllerInterface {
/**
* @notice Deploy a PausableZone to a precomputed address.
*
* @param salt The salt to be used to derive the zone address
*
* @return derivedAddress The derived address for the zone.
*/
function createZone(bytes32 salt) external returns (address derivedAddress);
/**
* @notice Pause orders on a given zone.
*
* @param zone The address of the zone to be paused.
*
* @return success A boolean indicating the zone has been paused.
*/
// function pause(address zone) external returns (bool success);
/**
* @notice Cancel Seaport offers on a given zone.
*
* @param pausableZoneAddress The zone that manages the orders to be
* cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to cancel.
*/
function cancelOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
OrderComponents[] calldata orders
) external;
/**
* @notice Execute an arbitrary number of matched orders on a given zone.
*
* @param pausableZoneAddress The zone that manages the orders to be
* cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to match.
* @param fulfillments An array of elements allocating offer
* components to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
Order[] calldata orders,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Execute an arbitrary number of matched advanced orders on a
* given zone.
*
* @param pausableZoneAddress The zone that manages the orders to be
* cancelled.
* @param seaportAddress The Seaport address.
* @param orders The orders to match.
* @param criteriaResolvers An array where each element contains a
* reference to a specific order as well as
* that order's offer or consideration,
* a token identifier, and a proof that
* the supplied token identifier is
* contained in the order's merkle root.
* @param fulfillments An array of elements allocating offer
* components to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchAdvancedOrders(
address pausableZoneAddress,
SeaportInterface seaportAddress,
AdvancedOrder[] calldata orders,
CriteriaResolver[] calldata criteriaResolvers,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Initiate Zone ownership transfer by assigning a new potential
* owner this contract. Once set, the new potential owner
* may call `acceptOwnership` to claim ownership.
* Only the owner in question may call this function.
*
* @param newPotentialOwner The address for which to initiate ownership
* transfer to.
*/
function transferOwnership(address newPotentialOwner) external;
/**
* @notice Clear the currently set potential owner, if any.
* Only the owner of this contract may call this function.
*/
function cancelOwnershipTransfer() external;
/**
* @notice Accept ownership of this contract. Only the account that the
* current owner has set as the new potential owner may call this
* function.
*/
function acceptOwnership() external;
/**
* @notice Assign the given address with the ability to pause the zone.
*
* @param pauserToAssign The address to assign the pauser role.
*/
function assignPauser(address pauserToAssign) external;
/**
* @notice Assign the given address with the ability to operate the
* given zone.
*
* @param pausableZoneAddress The zone address to assign operator role.
* @param operatorToAssign The address to assign as operator.
*/
function assignOperator(
address pausableZoneAddress,
address operatorToAssign
) external;
/**
* @notice An external view function that returns the owner.
*
* @return The address of the owner.
*/
function owner() external view returns (address);
/**
* @notice An external view function that return the potential owner.
*
* @return The address of the potential owner.
*/
function potentialOwner() external view returns (address);
/**
* @notice An external view function that returns the pauser.
*
* @return The address of the pauser.
*/
function pauser() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @notice PausableZoneEventsAndErrors contains errors and events
* related to zone interaction.
*/
interface PausableZoneEventsAndErrors {
/**
* @dev Emit an event whenever a zone is successfully paused.
*/
event Paused();
/**
* @dev Emit an event whenever a zone is successfully unpaused (created).
*/
event Unpaused();
/**
* @dev Emit an event whenever a zone owner registers a new potential
* owner for that zone.
*
* @param newPotentialOwner The new potential owner of the zone.
*/
event PotentialOwnerUpdated(address newPotentialOwner);
/**
* @dev Emit an event whenever zone ownership is transferred.
*
* @param previousOwner The previous owner of the zone.
* @param newOwner The new owner of the zone.
*/
event OwnershipTransferred(address previousOwner, address newOwner);
/**
* @dev Emit an event whenever a new zone is created.
*
* @param zone The address of the zone.
* @param salt The salt used to deploy the zone.
*/
event ZoneCreated(address zone, bytes32 salt);
/**
* @dev Emit an event whenever a zone owner assigns a new pauser
*
* @param newPauser The new pausear of the zone.
*/
event PauserUpdated(address newPauser);
/**
* @dev Emit an event whenever a zone owner assigns a new operator
*
* @param newOperator The new operator of the zone.
*/
event OperatorUpdated(address newOperator);
/**
* @dev Revert with an error when attempting to pause the zone
* while the caller is not the owner or pauser of the zone.
*/
error InvalidPauser();
/**
* @dev Revert with an error when attempting to call an operation
* while the caller is not the controller or operator of the zone.
*/
error InvalidOperator();
/**
* @dev Revert with an error when attempting to pause the zone or update the
* operator while the caller is not the controller of the zone.
*/
error InvalidController();
/**
* @dev Revert with an error when attempting to deploy a zone that is
* currently deployed.
*/
error ZoneAlreadyExists(address zone);
/**
* @dev Revert with an error when the caller does not have the _owner role
*
*/
error CallerIsNotOwner();
/**
* @dev Revert with an error when the caller does not have the operator role
*
*/
error CallerIsNotOperator();
/**
* @dev Revert with an error when attempting to set the new potential owner
* as the 0 address.
*
*/
error OwnerCanNotBeSetAsZero();
/**
* @dev Revert with an error when attempting to set the new potential pauser
* as the 0 address.
*
*/
error PauserCanNotBeSetAsZero();
/**
* @dev Revert with an error when the caller does not have
* the potentialOwner role.
*/
error CallerIsNotPotentialOwner();
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {
OrderType,
BasicOrderType,
ItemType,
Side
} from "./ConsiderationEnums.sol";
/**
* @dev An order contains eleven components: an offerer, a zone (or account that
* can cancel the order or restrict who can fulfill the order depending on
* the type), the order type (specifying partial fill support as well as
* restricted order status), the start and end time, a hash that will be
* provided to the zone when validating restricted orders, a salt, a key
* corresponding to a given conduit, a counter, and an arbitrary number of
* offer items that can be spent along with consideration items that must
* be received by their respective recipient.
*/
struct OrderComponents {
address offerer;
address zone;
OfferItem[] offer;
ConsiderationItem[] consideration;
OrderType orderType;
uint256 startTime;
uint256 endTime;
bytes32 zoneHash;
uint256 salt;
bytes32 conduitKey;
uint256 counter;
}
/**
* @dev An offer item has five components: an item type (ETH or other native
* tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and
* ERC1155), a token address, a dual-purpose "identifierOrCriteria"
* component that will either represent a tokenId or a merkle root
* depending on the item type, and a start and end amount that support
* increasing or decreasing amounts over the duration of the respective
* order.
*/
struct OfferItem {
ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
}
/**
* @dev A consideration item has the same five components as an offer item and
* an additional sixth component designating the required recipient of the
* item.
*/
struct ConsiderationItem {
ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
address payable recipient;
}
/**
* @dev A spent item is translated from a utilized offer item and has four
* components: an item type (ETH or other native tokens, ERC20, ERC721, and
* ERC1155), a token address, a tokenId, and an amount.
*/
struct SpentItem {
ItemType itemType;
address token;
uint256 identifier;
uint256 amount;
}
/**
* @dev A received item is translated from a utilized consideration item and has
* the same four components as a spent item, as well as an additional fifth
* component designating the required recipient of the item.
*/
struct ReceivedItem {
ItemType itemType;
address token;
uint256 identifier;
uint256 amount;
address payable recipient;
}
/**
* @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155
* matching, a group of six functions may be called that only requires a
* subset of the usual order arguments. Note the use of a "basicOrderType"
* enum; this represents both the usual order type as well as the "route"
* of the basic order (a simple derivation function for the basic order
* type is `basicOrderType = orderType + (4 * basicOrderRoute)`.)
*/
struct BasicOrderParameters {
// calldata offset
address considerationToken; // 0x24
uint256 considerationIdentifier; // 0x44
uint256 considerationAmount; // 0x64
address payable offerer; // 0x84
address zone; // 0xa4
address offerToken; // 0xc4
uint256 offerIdentifier; // 0xe4
uint256 offerAmount; // 0x104
BasicOrderType basicOrderType; // 0x124
uint256 startTime; // 0x144
uint256 endTime; // 0x164
bytes32 zoneHash; // 0x184
uint256 salt; // 0x1a4
bytes32 offererConduitKey; // 0x1c4
bytes32 fulfillerConduitKey; // 0x1e4
uint256 totalOriginalAdditionalRecipients; // 0x204
AdditionalRecipient[] additionalRecipients; // 0x224
bytes signature; // 0x244
// Total length, excluding dynamic array data: 0x264 (580)
}
/**
* @dev Basic orders can supply any number of additional recipients, with the
* implied assumption that they are supplied from the offered ETH (or other
* native token) or ERC20 token for the order.
*/
struct AdditionalRecipient {
uint256 amount;
address payable recipient;
}
/**
* @dev The full set of order components, with the exception of the counter,
* must be supplied when fulfilling more sophisticated orders or groups of
* orders. The total number of original consideration items must also be
* supplied, as the caller may specify additional consideration items.
*/
struct OrderParameters {
address offerer; // 0x00
address zone; // 0x20
OfferItem[] offer; // 0x40
ConsiderationItem[] consideration; // 0x60
OrderType orderType; // 0x80
uint256 startTime; // 0xa0
uint256 endTime; // 0xc0
bytes32 zoneHash; // 0xe0
uint256 salt; // 0x100
bytes32 conduitKey; // 0x120
uint256 totalOriginalConsiderationItems; // 0x140
// offer.length // 0x160
}
/**
* @dev Orders require a signature in addition to the other order parameters.
*/
struct Order {
OrderParameters parameters;
bytes signature;
}
/**
* @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill)
* and a denominator (the total size of the order) in addition to the
* signature and other order parameters. It also supports an optional field
* for supplying extra data; this data will be included in a staticcall to
* `isValidOrderIncludingExtraData` on the zone for the order if the order
* type is restricted and the offerer or zone are not the caller.
*/
struct AdvancedOrder {
OrderParameters parameters;
uint120 numerator;
uint120 denominator;
bytes signature;
bytes extraData;
}
/**
* @dev Orders can be validated (either explicitly via `validate`, or as a
* consequence of a full or partial fill), specifically cancelled (they can
* also be cancelled in bulk via incrementing a per-zone counter), and
* partially or fully filled (with the fraction filled represented by a
* numerator and denominator).
*/
struct OrderStatus {
bool isValidated;
bool isCancelled;
uint120 numerator;
uint120 denominator;
}
/**
* @dev A criteria resolver specifies an order, side (offer vs. consideration),
* and item index. It then provides a chosen identifier (i.e. tokenId)
* alongside a merkle proof demonstrating the identifier meets the required
* criteria.
*/
struct CriteriaResolver {
uint256 orderIndex;
Side side;
uint256 index;
uint256 identifier;
bytes32[] criteriaProof;
}
/**
* @dev A fulfillment is applied to a group of orders. It decrements a series of
* offer and consideration items, then generates a single execution
* element. A given fulfillment can be applied to as many offer and
* consideration items as desired, but must contain at least one offer and
* at least one consideration that match. The fulfillment must also remain
* consistent on all key parameters across all offer items (same offerer,
* token, type, tokenId, and conduit preference) as well as across all
* consideration items (token, type, tokenId, and recipient).
*/
struct Fulfillment {
FulfillmentComponent[] offerComponents;
FulfillmentComponent[] considerationComponents;
}
/**
* @dev Each fulfillment component contains one index referencing a specific
* order and another referencing a specific offer or consideration item.
*/
struct FulfillmentComponent {
uint256 orderIndex;
uint256 itemIndex;
}
/**
* @dev An execution is triggered once all consideration items have been zeroed
* out. It sends the item in question from the offerer to the item's
* recipient, optionally sourcing approvals from either this contract
* directly or from the offerer's chosen conduit if one is specified. An
* execution is not provided as an argument, but rather is derived via
* orders, criteria resolvers, and fulfillments (where the total number of
* executions will be less than or equal to the total number of indicated
* fulfillments) and returned as part of `matchOrders`.
*/
struct Execution {
ReceivedItem item;
address offerer;
bytes32 conduitKey;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {
BasicOrderParameters,
OrderComponents,
Fulfillment,
FulfillmentComponent,
Execution,
Order,
AdvancedOrder,
OrderStatus,
CriteriaResolver
} from "../lib/ConsiderationStructs.sol";
/**
* @title SeaportInterface
* @author 0age
* @custom:version 1.1
* @notice Seaport is a generalized ETH/ERC20/ERC721/ERC1155 marketplace. It
* minimizes external calls to the greatest extent possible and provides
* lightweight methods for common routes as well as more flexible
* methods for composing advanced orders.
*
* @dev SeaportInterface contains all external function interfaces for Seaport.
*/
interface SeaportInterface {
/**
* @notice Fulfill an order offering an ERC721 token by supplying Ether (or
* the native token for the given chain) as consideration for the
* order. An arbitrary number of "additional recipients" may also be
* supplied which will each receive native tokens from the fulfiller
* as consideration.
*
* @param parameters Additional information on the fulfilled order. Note
* that the offerer must first approve this contract (or
* their preferred conduit if indicated by the order) for
* their offered ERC721 token to be transferred.
*
* @return fulfilled A boolean indicating whether the order has been
* successfully fulfilled.
*/
function fulfillBasicOrder(BasicOrderParameters calldata parameters)
external
payable
returns (bool fulfilled);
/**
* @notice Fulfill an order with an arbitrary number of items for offer and
* consideration. Note that this function does not support
* criteria-based orders or partial filling of orders (though
* filling the remainder of a partially-filled order is supported).
*
* @param order The order to fulfill. Note that both the
* offerer and the fulfiller must first approve
* this contract (or the corresponding conduit if
* indicated) to transfer any relevant tokens on
* their behalf and that contracts must implement
* `onERC1155Received` to receive ERC1155 tokens
* as consideration.
* @param fulfillerConduitKey A bytes32 value indicating what conduit, if
* any, to source the fulfiller's token approvals
* from. The zero hash signifies that no conduit
* should be used, with direct approvals set on
* Seaport.
*
* @return fulfilled A boolean indicating whether the order has been
* successfully fulfilled.
*/
function fulfillOrder(Order calldata order, bytes32 fulfillerConduitKey)
external
payable
returns (bool fulfilled);
/**
* @notice Fill an order, fully or partially, with an arbitrary number of
* items for offer and consideration alongside criteria resolvers
* containing specific token identifiers and associated proofs.
*
* @param advancedOrder The order to fulfill along with the fraction
* of the order to attempt to fill. Note that
* both the offerer and the fulfiller must first
* approve this contract (or their preferred
* conduit if indicated by the order) to transfer
* any relevant tokens on their behalf and that
* contracts must implement `onERC1155Received`
* to receive ERC1155 tokens as consideration.
* Also note that all offer and consideration
* components must have no remainder after
* multiplication of the respective amount with
* the supplied fraction for the partial fill to
* be considered valid.
* @param criteriaResolvers An array where each element contains a
* reference to a specific offer or
* consideration, a token identifier, and a proof
* that the supplied token identifier is
* contained in the merkle root held by the item
* in question's criteria element. Note that an
* empty criteria indicates that any
* (transferable) token identifier on the token
* in question is valid and that no associated
* proof needs to be supplied.
* @param fulfillerConduitKey A bytes32 value indicating what conduit, if
* any, to source the fulfiller's token approvals
* from. The zero hash signifies that no conduit
* should be used, with direct approvals set on
* Seaport.
* @param recipient The intended recipient for all received items,
* with `address(0)` indicating that the caller
* should receive the items.
*
* @return fulfilled A boolean indicating whether the order has been
* successfully fulfilled.
*/
function fulfillAdvancedOrder(
AdvancedOrder calldata advancedOrder,
CriteriaResolver[] calldata criteriaResolvers,
bytes32 fulfillerConduitKey,
address recipient
) external payable returns (bool fulfilled);
/**
* @notice Attempt to fill a group of orders, each with an arbitrary number
* of items for offer and consideration. Any order that is not
* currently active, has already been fully filled, or has been
* cancelled will be omitted. Remaining offer and consideration
* items will then be aggregated where possible as indicated by the
* supplied offer and consideration component arrays and aggregated
* items will be transferred to the fulfiller or to each intended
* recipient, respectively. Note that a failing item transfer or an
* issue with order formatting will cause the entire batch to fail.
* Note that this function does not support criteria-based orders or
* partial filling of orders (though filling the remainder of a
* partially-filled order is supported).
*
* @param orders The orders to fulfill. Note that both
* the offerer and the fulfiller must first
* approve this contract (or the
* corresponding conduit if indicated) to
* transfer any relevant tokens on their
* behalf and that contracts must implement
* `onERC1155Received` to receive ERC1155
* tokens as consideration.
* @param offerFulfillments An array of FulfillmentComponent arrays
* indicating which offer items to attempt
* to aggregate when preparing executions.
* @param considerationFulfillments An array of FulfillmentComponent arrays
* indicating which consideration items to
* attempt to aggregate when preparing
* executions.
* @param fulfillerConduitKey A bytes32 value indicating what conduit,
* if any, to source the fulfiller's token
* approvals from. The zero hash signifies
* that no conduit should be used, with
* direct approvals set on this contract.
* @param maximumFulfilled The maximum number of orders to fulfill.
*
* @return availableOrders An array of booleans indicating if each order
* with an index corresponding to the index of the
* returned boolean was fulfillable or not.
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function fulfillAvailableOrders(
Order[] calldata orders,
FulfillmentComponent[][] calldata offerFulfillments,
FulfillmentComponent[][] calldata considerationFulfillments,
bytes32 fulfillerConduitKey,
uint256 maximumFulfilled
)
external
payable
returns (bool[] memory availableOrders, Execution[] memory executions);
/**
* @notice Attempt to fill a group of orders, fully or partially, with an
* arbitrary number of items for offer and consideration per order
* alongside criteria resolvers containing specific token
* identifiers and associated proofs. Any order that is not
* currently active, has already been fully filled, or has been
* cancelled will be omitted. Remaining offer and consideration
* items will then be aggregated where possible as indicated by the
* supplied offer and consideration component arrays and aggregated
* items will be transferred to the fulfiller or to each intended
* recipient, respectively. Note that a failing item transfer or an
* issue with order formatting will cause the entire batch to fail.
*
* @param advancedOrders The orders to fulfill along with the
* fraction of those orders to attempt to
* fill. Note that both the offerer and the
* fulfiller must first approve this
* contract (or their preferred conduit if
* indicated by the order) to transfer any
* relevant tokens on their behalf and that
* contracts must implement
* `onERC1155Received` to enable receipt of
* ERC1155 tokens as consideration. Also
* note that all offer and consideration
* components must have no remainder after
* multiplication of the respective amount
* with the supplied fraction for an
* order's partial fill amount to be
* considered valid.
* @param criteriaResolvers An array where each element contains a
* reference to a specific offer or
* consideration, a token identifier, and a
* proof that the supplied token identifier
* is contained in the merkle root held by
* the item in question's criteria element.
* Note that an empty criteria indicates
* that any (transferable) token
* identifier on the token in question is
* valid and that no associated proof needs
* to be supplied.
* @param offerFulfillments An array of FulfillmentComponent arrays
* indicating which offer items to attempt
* to aggregate when preparing executions.
* @param considerationFulfillments An array of FulfillmentComponent arrays
* indicating which consideration items to
* attempt to aggregate when preparing
* executions.
* @param fulfillerConduitKey A bytes32 value indicating what conduit,
* if any, to source the fulfiller's token
* approvals from. The zero hash signifies
* that no conduit should be used, with
* direct approvals set on this contract.
* @param recipient The intended recipient for all received
* items, with `address(0)` indicating that
* the caller should receive the items.
* @param maximumFulfilled The maximum number of orders to fulfill.
*
* @return availableOrders An array of booleans indicating if each order
* with an index corresponding to the index of the
* returned boolean was fulfillable or not.
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function fulfillAvailableAdvancedOrders(
AdvancedOrder[] calldata advancedOrders,
CriteriaResolver[] calldata criteriaResolvers,
FulfillmentComponent[][] calldata offerFulfillments,
FulfillmentComponent[][] calldata considerationFulfillments,
bytes32 fulfillerConduitKey,
address recipient,
uint256 maximumFulfilled
)
external
payable
returns (bool[] memory availableOrders, Execution[] memory executions);
/**
* @notice Match an arbitrary number of orders, each with an arbitrary
* number of items for offer and consideration along with as set of
* fulfillments allocating offer components to consideration
* components. Note that this function does not support
* criteria-based or partial filling of orders (though filling the
* remainder of a partially-filled order is supported).
*
* @param orders The orders to match. Note that both the offerer and
* fulfiller on each order must first approve this
* contract (or their conduit if indicated by the order)
* to transfer any relevant tokens on their behalf and
* each consideration recipient must implement
* `onERC1155Received` to enable ERC1155 token receipt.
* @param fulfillments An array of elements allocating offer components to
* consideration components. Note that each
* consideration component must be fully met for the
* match operation to be valid.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function matchOrders(
Order[] calldata orders,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Match an arbitrary number of full or partial orders, each with an
* arbitrary number of items for offer and consideration, supplying
* criteria resolvers containing specific token identifiers and
* associated proofs as well as fulfillments allocating offer
* components to consideration components.
*
* @param orders The advanced orders to match. Note that both the
* offerer and fulfiller on each order must first
* approve this contract (or a preferred conduit if
* indicated by the order) to transfer any relevant
* tokens on their behalf and each consideration
* recipient must implement `onERC1155Received` in
* order to receive ERC1155 tokens. Also note that
* the offer and consideration components for each
* order must have no remainder after multiplying
* the respective amount with the supplied fraction
* in order for the group of partial fills to be
* considered valid.
* @param criteriaResolvers An array where each element contains a reference
* to a specific order as well as that order's
* offer or consideration, a token identifier, and
* a proof that the supplied token identifier is
* contained in the order's merkle root. Note that
* an empty root indicates that any (transferable)
* token identifier is valid and that no associated
* proof needs to be supplied.
* @param fulfillments An array of elements allocating offer components
* to consideration components. Note that each
* consideration component must be fully met in
* order for the match operation to be valid.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function matchAdvancedOrders(
AdvancedOrder[] calldata orders,
CriteriaResolver[] calldata criteriaResolvers,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Cancel an arbitrary number of orders. Note that only the offerer
* or the zone of a given order may cancel it. Callers should ensure
* that the intended order was cancelled by calling `getOrderStatus`
* and confirming that `isCancelled` returns `true`.
*
* @param orders The orders to cancel.
*
* @return cancelled A boolean indicating whether the supplied orders have
* been successfully cancelled.
*/
function cancel(OrderComponents[] calldata orders)
external
returns (bool cancelled);
/**
* @notice Validate an arbitrary number of orders, thereby registering their
* signatures as valid and allowing the fulfiller to skip signature
* verification on fulfillment. Note that validated orders may still
* be unfulfillable due to invalid item amounts or other factors;
* callers should determine whether validated orders are fulfillable
* by simulating the fulfillment call prior to execution. Also note
* that anyone can validate a signed order, but only the offerer can
* validate an order without supplying a signature.
*
* @param orders The orders to validate.
*
* @return validated A boolean indicating whether the supplied orders have
* been successfully validated.
*/
function validate(Order[] calldata orders)
external
returns (bool validated);
/**
* @notice Cancel all orders from a given offerer with a given zone in bulk
* by incrementing a counter. Note that only the offerer may
* increment the counter.
*
* @return newCounter The new counter.
*/
function incrementCounter() external returns (uint256 newCounter);
/**
* @notice Retrieve the order hash for a given order.
*
* @param order The components of the order.
*
* @return orderHash The order hash.
*/
function getOrderHash(OrderComponents calldata order)
external
view
returns (bytes32 orderHash);
/**
* @notice Retrieve the status of a given order by hash, including whether
* the order has been cancelled or validated and the fraction of the
* order that has been filled.
*
* @param orderHash The order hash in question.
*
* @return isValidated A boolean indicating whether the order in question
* has been validated (i.e. previously approved or
* partially filled).
* @return isCancelled A boolean indicating whether the order in question
* has been cancelled.
* @return totalFilled The total portion of the order that has been filled
* (i.e. the "numerator").
* @return totalSize The total size of the order that is either filled or
* unfilled (i.e. the "denominator").
*/
function getOrderStatus(bytes32 orderHash)
external
view
returns (
bool isValidated,
bool isCancelled,
uint256 totalFilled,
uint256 totalSize
);
/**
* @notice Retrieve the current counter for a given offerer.
*
* @param offerer The offerer in question.
*
* @return counter The current counter.
*/
function getCounter(address offerer)
external
view
returns (uint256 counter);
/**
* @notice Retrieve configuration information for this contract.
*
* @return version The contract version.
* @return domainSeparator The domain separator for this contract.
* @return conduitController The conduit Controller set for this contract.
*/
function information()
external
view
returns (
string memory version,
bytes32 domainSeparator,
address conduitController
);
/**
* @notice Retrieve the name of this contract.
*
* @return contractName The name of this contract.
*/
function name() external view returns (string memory contractName);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {
AdvancedOrder,
CriteriaResolver
} from "../lib/ConsiderationStructs.sol";
interface ZoneInterface {
// Called by Consideration whenever extraData is not provided by the caller.
function isValidOrder(
bytes32 orderHash,
address caller,
address offerer,
bytes32 zoneHash
) external view returns (bytes4 validOrderMagicValue);
// Called by Consideration whenever any extraData is provided by the caller.
function isValidOrderIncludingExtraData(
bytes32 orderHash,
address caller,
AdvancedOrder calldata order,
bytes32[] calldata priorOrderHashes,
CriteriaResolver[] calldata criteriaResolvers
) external view returns (bytes4 validOrderMagicValue);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @title ZoneInteractionErrors
* @author 0age
* @notice ZoneInteractionErrors contains errors related to zone interaction.
*/
interface ZoneInteractionErrors {
/**
* @dev Revert with an error when attempting to fill an order that specifies
* a restricted submitter as its order type when not submitted by
* either the offerer or the order's zone or approved as valid by the
* zone in question via a staticcall to `isValidOrder`.
*
* @param orderHash The order hash for the invalid restricted order.
*/
error InvalidRestrictedOrder(bytes32 orderHash);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import { SeaportInterface } from "../../interfaces/SeaportInterface.sol";
import {
AdvancedOrder,
CriteriaResolver,
Order,
OrderComponents,
Fulfillment,
Execution
} from "../../lib/ConsiderationStructs.sol";
/**
* @title PausableZone
* @author cupOJoseph, BCLeFevre, ryanio
* @notice PausableZone is a simple zone implementation that approves every
* order. It can be self-destructed by its controller to pause
* restricted orders that have it set as their zone.
*/
interface PausableZoneInterface {
/**
* @notice Cancel an arbitrary number of orders that have agreed to use the
* contract as their zone.
*
* @param seaport The Seaport address.
* @param orders The orders to cancel.
*
* @return cancelled A boolean indicating whether the supplied orders have
* been successfully cancelled.
*/
function cancelOrders(
SeaportInterface seaport,
OrderComponents[] calldata orders
) external returns (bool cancelled);
/**
* @notice Execute an arbitrary number of matched orders, each with
* an arbitrary number of items for offer and consideration
* along with a set of fulfillments allocating offer components
* to consideration components.
*
* @param seaport The Seaport address.
* @param orders The orders to match.
* @param fulfillments An array of elements allocating offer components
* to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchOrders(
SeaportInterface seaport,
Order[] calldata orders,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Execute an arbitrary number of matched advanced orders,
* each with an arbitrary number of items for offer and
* consideration along with a set of fulfillments allocating
* offer components to consideration components.
*
* @param seaport The Seaport address.
* @param orders The orders to match.
* @param criteriaResolvers An array where each element contains a reference
* to a specific order as well as that order's
* offer or consideration, a token identifier, and
* a proof that the supplied token identifier is
* contained in the order's merkle root.
* @param fulfillments An array of elements allocating offer components
* to consideration components.
*
* @return executions An array of elements indicating the sequence of
* transfers performed as part of matching the given
* orders.
*/
function executeMatchAdvancedOrders(
SeaportInterface seaport,
AdvancedOrder[] calldata orders,
CriteriaResolver[] calldata criteriaResolvers,
Fulfillment[] calldata fulfillments
) external payable returns (Execution[] memory executions);
/**
* @notice Pause this contract, safely stopping orders from using
* the contract as a zone. Restricted orders with this address as a
* zone will not be fulfillable unless the zone is redeployed to the
* same address.
*/
// function pause(address payee) external;
/**
* @notice Assign the given address with the ability to operate the zone.
*
* @param operatorToAssign The address to assign as the operator.
*/
function assignOperator(address operatorToAssign) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// prettier-ignore
enum OrderType {
// 0: no partial fills, anyone can execute
FULL_OPEN,
// 1: partial fills supported, anyone can execute
PARTIAL_OPEN,
// 2: no partial fills, only offerer or zone can execute
FULL_RESTRICTED,
// 3: partial fills supported, only offerer or zone can execute
PARTIAL_RESTRICTED
}
// prettier-ignore
enum BasicOrderType {
// 0: no partial fills, anyone can execute
ETH_TO_ERC721_FULL_OPEN,
// 1: partial fills supported, anyone can execute
ETH_TO_ERC721_PARTIAL_OPEN,
// 2: no partial fills, only offerer or zone can execute
ETH_TO_ERC721_FULL_RESTRICTED,
// 3: partial fills supported, only offerer or zone can execute
ETH_TO_ERC721_PARTIAL_RESTRICTED,
// 4: no partial fills, anyone can execute
ETH_TO_ERC1155_FULL_OPEN,
// 5: partial fills supported, anyone can execute
ETH_TO_ERC1155_PARTIAL_OPEN,
// 6: no partial fills, only offerer or zone can execute
ETH_TO_ERC1155_FULL_RESTRICTED,
// 7: partial fills supported, only offerer or zone can execute
ETH_TO_ERC1155_PARTIAL_RESTRICTED,
// 8: no partial fills, anyone can execute
ERC20_TO_ERC721_FULL_OPEN,
// 9: partial fills supported, anyone can execute
ERC20_TO_ERC721_PARTIAL_OPEN,
// 10: no partial fills, only offerer or zone can execute
ERC20_TO_ERC721_FULL_RESTRICTED,
// 11: partial fills supported, only offerer or zone can execute
ERC20_TO_ERC721_PARTIAL_RESTRICTED,
// 12: no partial fills, anyone can execute
ERC20_TO_ERC1155_FULL_OPEN,
// 13: partial fills supported, anyone can execute
ERC20_TO_ERC1155_PARTIAL_OPEN,
// 14: no partial fills, only offerer or zone can execute
ERC20_TO_ERC1155_FULL_RESTRICTED,
// 15: partial fills supported, only offerer or zone can execute
ERC20_TO_ERC1155_PARTIAL_RESTRICTED,
// 16: no partial fills, anyone can execute
ERC721_TO_ERC20_FULL_OPEN,
// 17: partial fills supported, anyone can execute
ERC721_TO_ERC20_PARTIAL_OPEN,
// 18: no partial fills, only offerer or zone can execute
ERC721_TO_ERC20_FULL_RESTRICTED,
// 19: partial fills supported, only offerer or zone can execute
ERC721_TO_ERC20_PARTIAL_RESTRICTED,
// 20: no partial fills, anyone can execute
ERC1155_TO_ERC20_FULL_OPEN,
// 21: partial fills supported, anyone can execute
ERC1155_TO_ERC20_PARTIAL_OPEN,
// 22: no partial fills, only offerer or zone can execute
ERC1155_TO_ERC20_FULL_RESTRICTED,
// 23: partial fills supported, only offerer or zone can execute
ERC1155_TO_ERC20_PARTIAL_RESTRICTED
}
// prettier-ignore
enum BasicOrderRouteType {
// 0: provide Ether (or other native token) to receive offered ERC721 item.
ETH_TO_ERC721,
// 1: provide Ether (or other native token) to receive offered ERC1155 item.
ETH_TO_ERC1155,
// 2: provide ERC20 item to receive offered ERC721 item.
ERC20_TO_ERC721,
// 3: provide ERC20 item to receive offered ERC1155 item.
ERC20_TO_ERC1155,
// 4: provide ERC721 item to receive offered ERC20 item.
ERC721_TO_ERC20,
// 5: provide ERC1155 item to receive offered ERC20 item.
ERC1155_TO_ERC20
}
// prettier-ignore
enum ItemType {
// 0: ETH on mainnet, MATIC on polygon, etc.
NATIVE,
// 1: ERC20 items (ERC777 and ERC20 analogues could also technically work)
ERC20,
// 2: ERC721 items
ERC721,
// 3: ERC1155 items
ERC1155,
// 4: ERC721 items where a number of tokenIds are supported
ERC721_WITH_CRITERIA,
// 5: ERC1155 items where a number of ids are supported
ERC1155_WITH_CRITERIA
}
// prettier-ignore
enum Side {
// 0: Items that can be spent
OFFER,
// 1: Items that must be received
CONSIDERATION
}{
"remappings": [
"contracts/=contracts/",
"ds-test/=lib/ds-test/src/",
"forge-std/=lib/forge-std/src/",
"pnm-contracts/=lib/pnm-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"bytecodeHash": "ipfs"
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "london",
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"ownerAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallerIsNotOperator","type":"error"},{"inputs":[],"name":"CallerIsNotOwner","type":"error"},{"inputs":[],"name":"CallerIsNotPotentialOwner","type":"error"},{"inputs":[],"name":"InvalidController","type":"error"},{"inputs":[],"name":"InvalidOperator","type":"error"},{"inputs":[],"name":"InvalidPauser","type":"error"},{"inputs":[],"name":"OwnerCanNotBeSetAsZero","type":"error"},{"inputs":[],"name":"PauserCanNotBeSetAsZero","type":"error"},{"inputs":[{"internalType":"address","name":"zone","type":"address"}],"name":"ZoneAlreadyExists","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newOperator","type":"address"}],"name":"OperatorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":false,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPauser","type":"address"}],"name":"PauserUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"PotentialOwnerUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"zone","type":"address"},{"indexed":false,"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"ZoneCreated","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pausableZoneAddress","type":"address"},{"internalType":"address","name":"operatorToAssign","type":"address"}],"name":"assignOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pauserToAssign","type":"address"}],"name":"assignPauser","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pausableZoneAddress","type":"address"},{"internalType":"contract SeaportInterface","name":"seaportAddress","type":"address"},{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"counter","type":"uint256"}],"internalType":"struct OrderComponents[]","name":"orders","type":"tuple[]"}],"name":"cancelOrders","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"salt","type":"bytes32"}],"name":"createZone","outputs":[{"internalType":"address","name":"derivedAddress","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pausableZoneAddress","type":"address"},{"internalType":"contract SeaportInterface","name":"seaportAddress","type":"address"},{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct OrderParameters","name":"parameters","type":"tuple"},{"internalType":"uint120","name":"numerator","type":"uint120"},{"internalType":"uint120","name":"denominator","type":"uint120"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"bytes","name":"extraData","type":"bytes"}],"internalType":"struct AdvancedOrder[]","name":"orders","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"enum Side","name":"side","type":"uint8"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"bytes32[]","name":"criteriaProof","type":"bytes32[]"}],"internalType":"struct CriteriaResolver[]","name":"criteriaResolvers","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct FulfillmentComponent[]","name":"offerComponents","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct FulfillmentComponent[]","name":"considerationComponents","type":"tuple[]"}],"internalType":"struct Fulfillment[]","name":"fulfillments","type":"tuple[]"}],"name":"executeMatchAdvancedOrders","outputs":[{"components":[{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ReceivedItem","name":"item","type":"tuple"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"}],"internalType":"struct Execution[]","name":"executions","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pausableZoneAddress","type":"address"},{"internalType":"contract SeaportInterface","name":"seaportAddress","type":"address"},{"components":[{"components":[{"internalType":"address","name":"offerer","type":"address"},{"internalType":"address","name":"zone","type":"address"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"}],"internalType":"struct OfferItem[]","name":"offer","type":"tuple[]"},{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifierOrCriteria","type":"uint256"},{"internalType":"uint256","name":"startAmount","type":"uint256"},{"internalType":"uint256","name":"endAmount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ConsiderationItem[]","name":"consideration","type":"tuple[]"},{"internalType":"enum OrderType","name":"orderType","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"endTime","type":"uint256"},{"internalType":"bytes32","name":"zoneHash","type":"bytes32"},{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"},{"internalType":"uint256","name":"totalOriginalConsiderationItems","type":"uint256"}],"internalType":"struct OrderParameters","name":"parameters","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct Order[]","name":"orders","type":"tuple[]"},{"components":[{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct FulfillmentComponent[]","name":"offerComponents","type":"tuple[]"},{"components":[{"internalType":"uint256","name":"orderIndex","type":"uint256"},{"internalType":"uint256","name":"itemIndex","type":"uint256"}],"internalType":"struct FulfillmentComponent[]","name":"considerationComponents","type":"tuple[]"}],"internalType":"struct Fulfillment[]","name":"fulfillments","type":"tuple[]"}],"name":"executeMatchOrders","outputs":[{"components":[{"components":[{"internalType":"enum ItemType","name":"itemType","type":"uint8"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"identifier","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address payable","name":"recipient","type":"address"}],"internalType":"struct ReceivedItem","name":"item","type":"tuple"},{"internalType":"address","name":"offerer","type":"address"},{"internalType":"bytes32","name":"conduitKey","type":"bytes32"}],"internalType":"struct Execution[]","name":"executions","type":"tuple[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"potentialOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newPotentialOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"zoneCreationCode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a060405234801561001057600080fd5b5060405162003dc038038062003dc08339810160408190526100319161008e565b600080546001600160a01b0319166001600160a01b03831617905560405161005b60208201610080565b601f1982820381018352601f90910116604052805160209190910120608052506100be565b61132b8062002a9583390190565b6000602082840312156100a057600080fd5b81516001600160a01b03811681146100b757600080fd5b9392505050565b6080516129b4620000e160003960008181610151015261040b01526129b46000f3fe6080604052600436106100c25760003560e01c80638da5cb5b1161007f578063d6f3b11011610059578063d6f3b11014610203578063dcd5b13e14610223578063f2fde38b14610243578063f7e4aac61461026357600080fd5b80638da5cb5b146101b45780639fd0506d146101d2578063b44f6608146101f057600080fd5b806323452b9c146100c757806340ddc788146100de57806346b3ce9f146101075780637242512f1461013f5780637762df251461018157806379ba50971461019f575b600080fd5b3480156100d357600080fd5b506100dc610283565b005b6100f16100ec36600461098c565b6102f4565b6040516100fe9190610a4a565b60405180910390f35b34801561011357600080fd5b50610127610122366004610ae3565b6103ad565b6040516001600160a01b0390911681526020016100fe565b34801561014b57600080fd5b506101737f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020016100fe565b34801561018d57600080fd5b506001546001600160a01b0316610127565b3480156101ab57600080fd5b506100dc6104f9565b3480156101c057600080fd5b506000546001600160a01b0316610127565b3480156101de57600080fd5b506002546001600160a01b0316610127565b6100f16101fe366004610afc565b6105c1565b34801561020f57600080fd5b506100dc61021e366004610bba565b610680565b34801561022f57600080fd5b506100dc61023e366004610c1e565b610728565b34801561024f57600080fd5b506100dc61025e366004610c1e565b6107ce565b34801561026f57600080fd5b506100dc61027e366004610c42565b61087e565b6000546001600160a01b031633146102ae57604051636db2465f60e01b815260040160405180910390fd5b604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319169055565b6000546060906001600160a01b0316331461032257604051636db2465f60e01b815260040160405180910390fd5b604051632718034d60e01b815287906001600160a01b03821690632718034d90349061035a908b908b908b908b908b906004016110d4565b60006040518083038185885af1158015610378573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103a19190810190611225565b98975050505050505050565b600080546001600160a01b031633146103d957604051636db2465f60e01b815260040160405180910390fd5b6040516001600160f81b031960208201526bffffffffffffffffffffffff193060601b166021820152603581018390527f0000000000000000000000000000000000000000000000000000000000000000605582015260750160408051601f19818403018152919052805160209091012090506001600160a01b0381163b15610483576040516283438560e01b81526001600160a01b038216600482015260240160405180910390fd5b816040516104909061090c565b8190604051809103906000f59050801580156104b0573d6000803e3d6000fd5b5050604080516001600160a01b0383168152602081018490527fd1fa916c9f898e9a8dcedb0f78093657d07014799896193f2b219bed6ac7399c910160405180910390a1919050565b6001546001600160a01b0316331461052457604051630ffcac5b60e11b815260040160405180910390fd5b604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319169055600054604080516001600160a01b0390921682523360208301527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1600080546001600160a01b03191633179055565b6000546060906001600160a01b031633146105ef57604051636db2465f60e01b815260040160405180910390fd5b6040516332e275b960e11b815289906001600160a01b038216906365c4eb7290349061062b908d908d908d908d908d908d908d9060040161149c565b60006040518083038185885af1158015610649573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526106729190810190611225565b9a9950505050505050505050565b6000546001600160a01b031633146106ab57604051636db2465f60e01b815260040160405180910390fd5b60405163e5c27af160e01b815284906001600160a01b0382169063e5c27af1906106dd908790879087906004016115bc565b6020604051808303816000875af11580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107209190611631565b505050505050565b6000546001600160a01b0316331461075357604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b03811661077a57604051635384e6f560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab9060200160405180910390a150565b6000546001600160a01b031633146107f957604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b0381166108205760405163da72ecf960e01b815260040160405180910390fd5b6040516001600160a01b03821681527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108a957604051636db2465f60e01b815260040160405180910390fd5b6040516384385c6f60e01b81526001600160a01b0382811660048301528391908216906384385c6f90602401600060405180830381600087803b1580156108ef57600080fd5b505af1158015610903573d6000803e3d6000fd5b50505050505050565b61132b8061165483390190565b6001600160a01b038116811461092e57600080fd5b50565b803561093c81610919565b919050565b60008083601f84011261095357600080fd5b5081356001600160401b0381111561096a57600080fd5b6020830191508360208260051b850101111561098557600080fd5b9250929050565b600080600080600080608087890312156109a557600080fd5b86356109b081610919565b955060208701356109c081610919565b945060408701356001600160401b03808211156109dc57600080fd5b6109e88a838b01610941565b90965094506060890135915080821115610a0157600080fd5b50610a0e89828a01610941565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b60068110610a4657610a46610a20565b9052565b602080825282518282018190526000919060409081850190868401855b82811015610ad65781518051610a7e868251610a36565b808801516001600160a01b03908116878a0152878201518888015260608083015190880152608091820151811691870191909152818801511660a086015285015160c085015260e09093019290850190600101610a67565b5091979650505050505050565b600060208284031215610af557600080fd5b5035919050565b60008060008060008060008060a0898b031215610b1857600080fd5b8835610b2381610919565b97506020890135610b3381610919565b965060408901356001600160401b0380821115610b4f57600080fd5b610b5b8c838d01610941565b909850965060608b0135915080821115610b7457600080fd5b610b808c838d01610941565b909650945060808b0135915080821115610b9957600080fd5b50610ba68b828c01610941565b999c989b5096995094979396929594505050565b60008060008060608587031215610bd057600080fd5b8435610bdb81610919565b93506020850135610beb81610919565b925060408501356001600160401b03811115610c0657600080fd5b610c1287828801610941565b95989497509550505050565b600060208284031215610c3057600080fd5b8135610c3b81610919565b9392505050565b60008060408385031215610c5557600080fd5b8235610c6081610919565b91506020830135610c7081610919565b809150509250929050565b6000823561015e19833603018112610c9257600080fd5b90910192915050565b6000808335601e19843603018112610cb257600080fd5b83016020810192503590506001600160401b03811115610cd157600080fd5b60a08102360382131561098557600080fd5b6006811061092e57600080fd5b8183526000602080850194508260005b85811015610d68578135610d1381610ce3565b610d1d8882610a36565b5082820135610d2b81610919565b6001600160a01b03168388015260408281013590880152606080830135908801526080808301359088015260a09687019690910190600101610d00565b509495945050505050565b6000808335601e19843603018112610d8a57600080fd5b83016020810192503590506001600160401b03811115610da957600080fd5b60c08102360382131561098557600080fd5b8183526000602080850194508260005b85811015610d68578135610dde81610ce3565b610de88882610a36565b5082820135610df681610919565b6001600160a01b039081168885015260408381013590890152606080840135908901526080808401359089015260a09083820135610e3381610919565b169088015260c0968701969190910190600101610dcb565b80356004811061093c57600080fd5b60048110610a4657610a46610a20565b6000610160610e8984610e7c85610931565b6001600160a01b03169052565b610e9560208401610931565b6001600160a01b03166020850152610eb06040840184610c9b565b826040870152610ec38387018284610cf0565b92505050610ed46060840184610d73565b8583036060870152610ee7838284610dbb565b92505050610ef760808401610e4b565b610f046080860182610e5a565b5060a0838101359085015260c0808401359085015260e08084013590850152610100808401359085015261012080840135908501526101409283013592909301919091525090565b6000808335601e19843603018112610f6357600080fd5b83016020810192503590506001600160401b03811115610f8257600080fd5b80360382131561098557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008235603e19833603018112610c9257600080fd5b6000808335601e19843603018112610fe757600080fd5b83016020810192503590506001600160401b0381111561100657600080fd5b8060061b360382131561098557600080fd5b8183526000602080850194508260005b85811015610d685781358752828201358388015260409687019690910190600101611028565b81835260006020808501808196508560051b810191508460005b87811015610ad657828403895261107f8288610fba565b604061108b8283610fd0565b82885261109b8389018284611018565b925050506110ab87830183610fd0565b9250868203888801526110bf828483611018565b9b88019b965050509185019150600101611068565b6001600160a01b0386168152606060208083018290529082018590526000906080600587901b840181019190840188845b8981101561117357868503607f19018352611120828c610fba565b604061112c8283610c7b565b81885261113b82890182610e6a565b91505061114a86830183610f4c565b92508782038789015261115e828483610f91565b97505050928401925090830190600101611105565b5050505082810360408401526103a181858761104e565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156111c2576111c261118a565b60405290565b60405160a081016001600160401b03811182821017156111c2576111c261118a565b604051601f8201601f191681016001600160401b03811182821017156112125761121261118a565b604052919050565b805161093c81610919565b6000602080838503121561123857600080fd5b82516001600160401b038082111561124f57600080fd5b818501915085601f83011261126357600080fd5b8151818111156112755761127561118a565b611283848260051b016111ea565b818152848101925060e09182028401850191888311156112a257600080fd5b938501935b8285101561135357848903818112156112c05760008081fd5b6112c86111a0565b60a0808312156112d85760008081fd5b6112e06111c8565b925087516112ed81610ce3565b8352878901516112fc81610919565b838a0152604088810151818501526060808a0151908501526080808a015161132381610919565b9085015283835261133589830161121a565b838b015260c0890151908301525085525093840193928501926112a7565b50979650505050505050565b80356001600160781b038116811461093c57600080fd5b60008235609e19833603018112610c9257600080fd5b81835260006001600160fb1b038311156113a557600080fd5b8260051b80836020870137939093016020019392505050565b81835260006020808501808196506005915085821b81018560005b8881101561148e578383038a526113f08289611376565b60a081358552878201356002811061140757600080fd5b85890152604082810135908601526060808301359086015260808083013536849003601e1901811261143857600080fd5b9092018881019290356001600160401b0381111561145557600080fd5b80891b360384131561146657600080fd5b8282880152611478838801828661138c565b9d8a019d965050509287019250506001016113d9565b509098975050505050505050565b6001600160a01b03881681526080602080830182905290820187905260009060a09081840160058a901b850183018b855b8c81101561158f57878303609f190184526114e8828f611376565b6114f28182610c7b565b87855261150188860182610e6a565b905061150e87830161135f565b6001600160781b03908116868901526040908061152c85840161135f565b16828801525050606061154181840184610f4c565b87840383890152611553848284610f91565b93505050506115656080830183610f4c565b9250858203608087015261157a828483610f91565b968801969550505091850191506001016114cd565b505085810360408701526115a4818a8c6113be565b9350505050828103606084015261067281858761104e565b6001600160a01b0384168152604060208083018290529082018390526000906060600585901b840181019190840186845b8781101561162357868503605f190183526116118561160c848c610c7b565b610e6a565b945091830191908301906001016115ed565b509298975050505050505050565b60006020828403121561164357600080fd5b81518015158114610c3b57600080fdfe60a060405234801561001057600080fd5b50336080526040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a16080516112bd61006e600039600081816101cd015281816102b70152818161038e015261046901526112bd6000f3fe6080604052600436106100705760003560e01c8063570ca7351161004e578063570ca7351461010c57806365c4eb721461014457806384385c6f14610157578063e5c27af11461017957600080fd5b80630e1d31dc146100755780632718034d146100be57806333131570146100de575b600080fd5b34801561008157600080fd5b506100a061009036600461054b565b506303874c7760e21b9392505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100d16100cc3660046105de565b6101a9565b6040516100b5919061068a565b3480156100ea57600080fd5b506100a06100f9366004610723565b506303874c7760e21b9695505050505050565b34801561011857600080fd5b5060005461012c906001600160a01b031681565b6040516001600160a01b0390911681526020016100b5565b6100d16101523660046107db565b610293565b34801561016357600080fd5b50610177610172366004610867565b610383565b005b34801561018557600080fd5b5061019961019436600461088b565b610447565b60405190151581526020016100b5565b6000546060906001600160a01b031633148015906101f05750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b1561020e5760405163ccea9e6f60e01b815260040160405180910390fd5b604051632a05d10160e21b81526001600160a01b0387169063a8174404903490610242908990899089908990600401610d42565b60006040518083038185885af1158015610260573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526102899190810190610e80565b9695505050505050565b6000546060906001600160a01b031633148015906102da5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156102f85760405163ccea9e6f60e01b815260040160405180910390fd5b604051632aca252160e11b81526001600160a01b038916906355944a42903490610330908b908b908b908b908b908b906004016110f4565b60006040518083038185885af115801561034e573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103779190810190610e80565b98975050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103cc576040516336abb4df60e11b815260040160405180910390fd5b6001600160a01b0381166103f357604051635384e6f560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a150565b600080546001600160a01b0316331480159061048c5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156104aa5760405163ccea9e6f60e01b815260040160405180910390fd5b604051630fd9f1e160e41b81526001600160a01b0385169063fd9f1e10906104d89086908690600401611210565b6020604051808303816000875af11580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b9190611265565b949350505050565b6001600160a01b038116811461053857600080fd5b50565b803561054681610523565b919050565b6000806000806080858703121561056157600080fd5b84359350602085013561057381610523565b9250604085013561058381610523565b9396929550929360600135925050565b60008083601f8401126105a557600080fd5b5081356001600160401b038111156105bc57600080fd5b6020830191508360208260051b85010111156105d757600080fd5b9250929050565b6000806000806000606086880312156105f657600080fd5b853561060181610523565b945060208601356001600160401b038082111561061d57600080fd5b61062989838a01610593565b9096509450604088013591508082111561064257600080fd5b5061064f88828901610593565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b6006811061068657610686610660565b9052565b602080825282518282018190526000919060409081850190868401855b8281101561071657815180516106be868251610676565b808801516001600160a01b03908116878a0152878201518888015260608083015190880152608091820151811691870191909152818801511660a086015285015160c085015260e090930192908501906001016106a7565b5091979650505050505050565b600080600080600080600060a0888a03121561073e57600080fd5b87359650602088013561075081610523565b955060408801356001600160401b038082111561076c57600080fd5b9089019060a0828c03121561078057600080fd5b9095506060890135908082111561079657600080fd5b6107a28b838c01610593565b909650945060808a01359150808211156107bb57600080fd5b506107c88a828b01610593565b989b979a50959850939692959293505050565b60008060008060008060006080888a0312156107f657600080fd5b873561080181610523565b965060208801356001600160401b038082111561081d57600080fd5b6108298b838c01610593565b909850965060408a013591508082111561084257600080fd5b61084e8b838c01610593565b909650945060608a01359150808211156107bb57600080fd5b60006020828403121561087957600080fd5b813561088481610523565b9392505050565b6000806000604084860312156108a057600080fd5b83356108ab81610523565b925060208401356001600160401b038111156108c657600080fd5b6108d286828701610593565b9497909650939450505050565b6000823561015e198336030181126108f657600080fd5b90910192915050565b6000808335601e1984360301811261091657600080fd5b83016020810192503590506001600160401b0381111561093557600080fd5b60a0810236038213156105d757600080fd5b6006811061053857600080fd5b8183526000602080850194508260005b858110156109cc57813561097781610947565b6109818882610676565b508282013561098f81610523565b6001600160a01b03168388015260408281013590880152606080830135908801526080808301359088015260a09687019690910190600101610964565b509495945050505050565b6000808335601e198436030181126109ee57600080fd5b83016020810192503590506001600160401b03811115610a0d57600080fd5b60c0810236038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc578135610a4281610947565b610a4c8882610676565b5082820135610a5a81610523565b6001600160a01b039081168885015260408381013590890152606080840135908901526080808401359089015260a09083820135610a9781610523565b169088015260c0968701969190910190600101610a2f565b80356004811061054657600080fd5b6004811061068657610686610660565b6000610160610aed84610ae08561053b565b6001600160a01b03169052565b610af96020840161053b565b6001600160a01b03166020850152610b1460408401846108ff565b826040870152610b278387018284610954565b92505050610b3860608401846109d7565b8583036060870152610b4b838284610a1f565b92505050610b5b60808401610aaf565b610b686080860182610abe565b5060a0838101359085015260c0808401359085015260e08084013590850152610100808401359085015261012080840135908501526101409283013592909301919091525090565b6000808335601e19843603018112610bc757600080fd5b83016020810192503590506001600160401b03811115610be657600080fd5b8036038213156105d757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008235603e198336030181126108f657600080fd5b6000808335601e19843603018112610c4b57600080fd5b83016020810192503590506001600160401b03811115610c6a57600080fd5b8060061b36038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc5781358752828201358388015260409687019690910190600101610c8c565b818352600060208085019450848460051b86018460005b87811015610d35578383038952610ce08288610c1e565b6040610cec8283610c34565b828752610cfc8388018284610c7c565b92505050610d0c87830183610c34565b925085820388870152610d20828483610c7c565b9b88019b955050509185019150600101610cc9565b5090979650505050505050565b60408082528181018590526000906060600587901b8401810190840188845b89811015610dcf57868403605f19018352610d7c828c610c1e565b610d8681826108df565b868652610d9587870182610ace565b90506020610da581840184610bb0565b935087830382890152610db9838583610bf5565b9750509485019493909301925050600101610d61565b5050508381036020850152610377818688610cb2565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715610e1d57610e1d610de5565b60405290565b60405160a081016001600160401b0381118282101715610e1d57610e1d610de5565b604051601f8201601f191681016001600160401b0381118282101715610e6d57610e6d610de5565b604052919050565b805161054681610523565b60006020808385031215610e9357600080fd5b82516001600160401b0380821115610eaa57600080fd5b818501915085601f830112610ebe57600080fd5b815181811115610ed057610ed0610de5565b610ede848260051b01610e45565b818152848101925060e0918202840185019188831115610efd57600080fd5b938501935b82851015610fae5784890381811215610f1b5760008081fd5b610f23610dfb565b60a080831215610f335760008081fd5b610f3b610e23565b92508751610f4881610947565b835287890151610f5781610523565b838a0152604088810151818501526060808a0151908501526080808a0151610f7e81610523565b90850152838352610f90898301610e75565b838b015260c089015190830152508552509384019392850192610f02565b50979650505050505050565b80356001600160781b038116811461054657600080fd5b60008235609e198336030181126108f657600080fd5b81835260006001600160fb1b0383111561100057600080fd5b8260051b80836020870137939093016020019392505050565b81835260006020808501945084600585811b87018560005b888110156110e6578483038a526110488289610fd1565b60a081358552878201356002811061105f57600080fd5b85890152604082810135908601526060808301359086015260808083013536849003601e1901811261109057600080fd5b9092018881019290356001600160401b038111156110ad57600080fd5b80881b36038413156110be57600080fd5b82828801526110d08388018286610fe7565b9d8a019d96505050928701925050600101611031565b509098975050505050505050565b6060808252818101879052600090608080840160058a901b850182018b855b8c8110156111d657878303607f1901845261112e828f610fd1565b60a061113a82836108df565b81865261114982870182610ace565b9150506020611159818401610fba565b6001600160781b039081168783015260409080611177868401610fba565b1682890152505061118a89840184610bb0565b8784038b89015261119c848284610bf5565b935050506111ac88840184610bb0565b9350868303898801526111c0838583610bf5565b9782019796505093909301925050600101611113565b505085810360208701526111eb818a8c611019565b93505050508281036040840152611203818587610cb2565b9998505050505050505050565b60208082528181018390526000906040600585901b8401810190840186845b8781101561071657868403603f190183526112538461124e848c6108df565b610ace565b9350918401919084019060010161122f565b60006020828403121561127757600080fd5b8151801515811461088457600080fdfea26469706673582212206fb255af791b40baf2e734f5b4d6f992857eaa75accbb74fce2d74723e28086f64736f6c63430008110033a264697066735822122043ed9d6e56c28b41b97eec404881806ddeb91692793ca2e6763b7f415c7e816864736f6c6343000811003360a060405234801561001057600080fd5b50336080526040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a16080516112bd61006e600039600081816101cd015281816102b70152818161038e015261046901526112bd6000f3fe6080604052600436106100705760003560e01c8063570ca7351161004e578063570ca7351461010c57806365c4eb721461014457806384385c6f14610157578063e5c27af11461017957600080fd5b80630e1d31dc146100755780632718034d146100be57806333131570146100de575b600080fd5b34801561008157600080fd5b506100a061009036600461054b565b506303874c7760e21b9392505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100d16100cc3660046105de565b6101a9565b6040516100b5919061068a565b3480156100ea57600080fd5b506100a06100f9366004610723565b506303874c7760e21b9695505050505050565b34801561011857600080fd5b5060005461012c906001600160a01b031681565b6040516001600160a01b0390911681526020016100b5565b6100d16101523660046107db565b610293565b34801561016357600080fd5b50610177610172366004610867565b610383565b005b34801561018557600080fd5b5061019961019436600461088b565b610447565b60405190151581526020016100b5565b6000546060906001600160a01b031633148015906101f05750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b1561020e5760405163ccea9e6f60e01b815260040160405180910390fd5b604051632a05d10160e21b81526001600160a01b0387169063a8174404903490610242908990899089908990600401610d42565b60006040518083038185885af1158015610260573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526102899190810190610e80565b9695505050505050565b6000546060906001600160a01b031633148015906102da5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156102f85760405163ccea9e6f60e01b815260040160405180910390fd5b604051632aca252160e11b81526001600160a01b038916906355944a42903490610330908b908b908b908b908b908b906004016110f4565b60006040518083038185885af115801561034e573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103779190810190610e80565b98975050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103cc576040516336abb4df60e11b815260040160405180910390fd5b6001600160a01b0381166103f357604051635384e6f560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a150565b600080546001600160a01b0316331480159061048c5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156104aa5760405163ccea9e6f60e01b815260040160405180910390fd5b604051630fd9f1e160e41b81526001600160a01b0385169063fd9f1e10906104d89086908690600401611210565b6020604051808303816000875af11580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b9190611265565b949350505050565b6001600160a01b038116811461053857600080fd5b50565b803561054681610523565b919050565b6000806000806080858703121561056157600080fd5b84359350602085013561057381610523565b9250604085013561058381610523565b9396929550929360600135925050565b60008083601f8401126105a557600080fd5b5081356001600160401b038111156105bc57600080fd5b6020830191508360208260051b85010111156105d757600080fd5b9250929050565b6000806000806000606086880312156105f657600080fd5b853561060181610523565b945060208601356001600160401b038082111561061d57600080fd5b61062989838a01610593565b9096509450604088013591508082111561064257600080fd5b5061064f88828901610593565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b6006811061068657610686610660565b9052565b602080825282518282018190526000919060409081850190868401855b8281101561071657815180516106be868251610676565b808801516001600160a01b03908116878a0152878201518888015260608083015190880152608091820151811691870191909152818801511660a086015285015160c085015260e090930192908501906001016106a7565b5091979650505050505050565b600080600080600080600060a0888a03121561073e57600080fd5b87359650602088013561075081610523565b955060408801356001600160401b038082111561076c57600080fd5b9089019060a0828c03121561078057600080fd5b9095506060890135908082111561079657600080fd5b6107a28b838c01610593565b909650945060808a01359150808211156107bb57600080fd5b506107c88a828b01610593565b989b979a50959850939692959293505050565b60008060008060008060006080888a0312156107f657600080fd5b873561080181610523565b965060208801356001600160401b038082111561081d57600080fd5b6108298b838c01610593565b909850965060408a013591508082111561084257600080fd5b61084e8b838c01610593565b909650945060608a01359150808211156107bb57600080fd5b60006020828403121561087957600080fd5b813561088481610523565b9392505050565b6000806000604084860312156108a057600080fd5b83356108ab81610523565b925060208401356001600160401b038111156108c657600080fd5b6108d286828701610593565b9497909650939450505050565b6000823561015e198336030181126108f657600080fd5b90910192915050565b6000808335601e1984360301811261091657600080fd5b83016020810192503590506001600160401b0381111561093557600080fd5b60a0810236038213156105d757600080fd5b6006811061053857600080fd5b8183526000602080850194508260005b858110156109cc57813561097781610947565b6109818882610676565b508282013561098f81610523565b6001600160a01b03168388015260408281013590880152606080830135908801526080808301359088015260a09687019690910190600101610964565b509495945050505050565b6000808335601e198436030181126109ee57600080fd5b83016020810192503590506001600160401b03811115610a0d57600080fd5b60c0810236038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc578135610a4281610947565b610a4c8882610676565b5082820135610a5a81610523565b6001600160a01b039081168885015260408381013590890152606080840135908901526080808401359089015260a09083820135610a9781610523565b169088015260c0968701969190910190600101610a2f565b80356004811061054657600080fd5b6004811061068657610686610660565b6000610160610aed84610ae08561053b565b6001600160a01b03169052565b610af96020840161053b565b6001600160a01b03166020850152610b1460408401846108ff565b826040870152610b278387018284610954565b92505050610b3860608401846109d7565b8583036060870152610b4b838284610a1f565b92505050610b5b60808401610aaf565b610b686080860182610abe565b5060a0838101359085015260c0808401359085015260e08084013590850152610100808401359085015261012080840135908501526101409283013592909301919091525090565b6000808335601e19843603018112610bc757600080fd5b83016020810192503590506001600160401b03811115610be657600080fd5b8036038213156105d757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008235603e198336030181126108f657600080fd5b6000808335601e19843603018112610c4b57600080fd5b83016020810192503590506001600160401b03811115610c6a57600080fd5b8060061b36038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc5781358752828201358388015260409687019690910190600101610c8c565b818352600060208085019450848460051b86018460005b87811015610d35578383038952610ce08288610c1e565b6040610cec8283610c34565b828752610cfc8388018284610c7c565b92505050610d0c87830183610c34565b925085820388870152610d20828483610c7c565b9b88019b955050509185019150600101610cc9565b5090979650505050505050565b60408082528181018590526000906060600587901b8401810190840188845b89811015610dcf57868403605f19018352610d7c828c610c1e565b610d8681826108df565b868652610d9587870182610ace565b90506020610da581840184610bb0565b935087830382890152610db9838583610bf5565b9750509485019493909301925050600101610d61565b5050508381036020850152610377818688610cb2565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715610e1d57610e1d610de5565b60405290565b60405160a081016001600160401b0381118282101715610e1d57610e1d610de5565b604051601f8201601f191681016001600160401b0381118282101715610e6d57610e6d610de5565b604052919050565b805161054681610523565b60006020808385031215610e9357600080fd5b82516001600160401b0380821115610eaa57600080fd5b818501915085601f830112610ebe57600080fd5b815181811115610ed057610ed0610de5565b610ede848260051b01610e45565b818152848101925060e0918202840185019188831115610efd57600080fd5b938501935b82851015610fae5784890381811215610f1b5760008081fd5b610f23610dfb565b60a080831215610f335760008081fd5b610f3b610e23565b92508751610f4881610947565b835287890151610f5781610523565b838a0152604088810151818501526060808a0151908501526080808a0151610f7e81610523565b90850152838352610f90898301610e75565b838b015260c089015190830152508552509384019392850192610f02565b50979650505050505050565b80356001600160781b038116811461054657600080fd5b60008235609e198336030181126108f657600080fd5b81835260006001600160fb1b0383111561100057600080fd5b8260051b80836020870137939093016020019392505050565b81835260006020808501945084600585811b87018560005b888110156110e6578483038a526110488289610fd1565b60a081358552878201356002811061105f57600080fd5b85890152604082810135908601526060808301359086015260808083013536849003601e1901811261109057600080fd5b9092018881019290356001600160401b038111156110ad57600080fd5b80881b36038413156110be57600080fd5b82828801526110d08388018286610fe7565b9d8a019d96505050928701925050600101611031565b509098975050505050505050565b6060808252818101879052600090608080840160058a901b850182018b855b8c8110156111d657878303607f1901845261112e828f610fd1565b60a061113a82836108df565b81865261114982870182610ace565b9150506020611159818401610fba565b6001600160781b039081168783015260409080611177868401610fba565b1682890152505061118a89840184610bb0565b8784038b89015261119c848284610bf5565b935050506111ac88840184610bb0565b9350868303898801526111c0838583610bf5565b9782019796505093909301925050600101611113565b505085810360208701526111eb818a8c611019565b93505050508281036040840152611203818587610cb2565b9998505050505050505050565b60208082528181018390526000906040600585901b8401810190840186845b8781101561071657868403603f190183526112538461124e848c6108df565b610ace565b9350918401919084019060010161122f565b60006020828403121561127757600080fd5b8151801515811461088457600080fdfea26469706673582212206fb255af791b40baf2e734f5b4d6f992857eaa75accbb74fce2d74723e28086f64736f6c634300081100330000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef
Deployed Bytecode
0x6080604052600436106100c25760003560e01c80638da5cb5b1161007f578063d6f3b11011610059578063d6f3b11014610203578063dcd5b13e14610223578063f2fde38b14610243578063f7e4aac61461026357600080fd5b80638da5cb5b146101b45780639fd0506d146101d2578063b44f6608146101f057600080fd5b806323452b9c146100c757806340ddc788146100de57806346b3ce9f146101075780637242512f1461013f5780637762df251461018157806379ba50971461019f575b600080fd5b3480156100d357600080fd5b506100dc610283565b005b6100f16100ec36600461098c565b6102f4565b6040516100fe9190610a4a565b60405180910390f35b34801561011357600080fd5b50610127610122366004610ae3565b6103ad565b6040516001600160a01b0390911681526020016100fe565b34801561014b57600080fd5b506101737fdc409381ebeb911c6cca55ed4929a12fd92258f721fc3b433328112536552a0081565b6040519081526020016100fe565b34801561018d57600080fd5b506001546001600160a01b0316610127565b3480156101ab57600080fd5b506100dc6104f9565b3480156101c057600080fd5b506000546001600160a01b0316610127565b3480156101de57600080fd5b506002546001600160a01b0316610127565b6100f16101fe366004610afc565b6105c1565b34801561020f57600080fd5b506100dc61021e366004610bba565b610680565b34801561022f57600080fd5b506100dc61023e366004610c1e565b610728565b34801561024f57600080fd5b506100dc61025e366004610c1e565b6107ce565b34801561026f57600080fd5b506100dc61027e366004610c42565b61087e565b6000546001600160a01b031633146102ae57604051636db2465f60e01b815260040160405180910390fd5b604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319169055565b6000546060906001600160a01b0316331461032257604051636db2465f60e01b815260040160405180910390fd5b604051632718034d60e01b815287906001600160a01b03821690632718034d90349061035a908b908b908b908b908b906004016110d4565b60006040518083038185885af1158015610378573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103a19190810190611225565b98975050505050505050565b600080546001600160a01b031633146103d957604051636db2465f60e01b815260040160405180910390fd5b6040516001600160f81b031960208201526bffffffffffffffffffffffff193060601b166021820152603581018390527fdc409381ebeb911c6cca55ed4929a12fd92258f721fc3b433328112536552a00605582015260750160408051601f19818403018152919052805160209091012090506001600160a01b0381163b15610483576040516283438560e01b81526001600160a01b038216600482015260240160405180910390fd5b816040516104909061090c565b8190604051809103906000f59050801580156104b0573d6000803e3d6000fd5b5050604080516001600160a01b0383168152602081018490527fd1fa916c9f898e9a8dcedb0f78093657d07014799896193f2b219bed6ac7399c910160405180910390a1919050565b6001546001600160a01b0316331461052457604051630ffcac5b60e11b815260040160405180910390fd5b604051600081527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319169055600054604080516001600160a01b0390921682523360208301527f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0910160405180910390a1600080546001600160a01b03191633179055565b6000546060906001600160a01b031633146105ef57604051636db2465f60e01b815260040160405180910390fd5b6040516332e275b960e11b815289906001600160a01b038216906365c4eb7290349061062b908d908d908d908d908d908d908d9060040161149c565b60006040518083038185885af1158015610649573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526106729190810190611225565b9a9950505050505050505050565b6000546001600160a01b031633146106ab57604051636db2465f60e01b815260040160405180910390fd5b60405163e5c27af160e01b815284906001600160a01b0382169063e5c27af1906106dd908790879087906004016115bc565b6020604051808303816000875af11580156106fc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107209190611631565b505050505050565b6000546001600160a01b0316331461075357604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b03811661077a57604051635384e6f560e01b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b0383169081179091556040519081527fa4336c0cb1e245b95ad204faed7e940d6dc999684fd8b5e1ff597a0c4efca8ab9060200160405180910390a150565b6000546001600160a01b031633146107f957604051636db2465f60e01b815260040160405180910390fd5b6001600160a01b0381166108205760405163da72ecf960e01b815260040160405180910390fd5b6040516001600160a01b03821681527f11a3cf439fb225bfe74225716b6774765670ec1060e3796802e62139d69974da9060200160405180910390a1600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146108a957604051636db2465f60e01b815260040160405180910390fd5b6040516384385c6f60e01b81526001600160a01b0382811660048301528391908216906384385c6f90602401600060405180830381600087803b1580156108ef57600080fd5b505af1158015610903573d6000803e3d6000fd5b50505050505050565b61132b8061165483390190565b6001600160a01b038116811461092e57600080fd5b50565b803561093c81610919565b919050565b60008083601f84011261095357600080fd5b5081356001600160401b0381111561096a57600080fd5b6020830191508360208260051b850101111561098557600080fd5b9250929050565b600080600080600080608087890312156109a557600080fd5b86356109b081610919565b955060208701356109c081610919565b945060408701356001600160401b03808211156109dc57600080fd5b6109e88a838b01610941565b90965094506060890135915080821115610a0157600080fd5b50610a0e89828a01610941565b979a9699509497509295939492505050565b634e487b7160e01b600052602160045260246000fd5b60068110610a4657610a46610a20565b9052565b602080825282518282018190526000919060409081850190868401855b82811015610ad65781518051610a7e868251610a36565b808801516001600160a01b03908116878a0152878201518888015260608083015190880152608091820151811691870191909152818801511660a086015285015160c085015260e09093019290850190600101610a67565b5091979650505050505050565b600060208284031215610af557600080fd5b5035919050565b60008060008060008060008060a0898b031215610b1857600080fd5b8835610b2381610919565b97506020890135610b3381610919565b965060408901356001600160401b0380821115610b4f57600080fd5b610b5b8c838d01610941565b909850965060608b0135915080821115610b7457600080fd5b610b808c838d01610941565b909650945060808b0135915080821115610b9957600080fd5b50610ba68b828c01610941565b999c989b5096995094979396929594505050565b60008060008060608587031215610bd057600080fd5b8435610bdb81610919565b93506020850135610beb81610919565b925060408501356001600160401b03811115610c0657600080fd5b610c1287828801610941565b95989497509550505050565b600060208284031215610c3057600080fd5b8135610c3b81610919565b9392505050565b60008060408385031215610c5557600080fd5b8235610c6081610919565b91506020830135610c7081610919565b809150509250929050565b6000823561015e19833603018112610c9257600080fd5b90910192915050565b6000808335601e19843603018112610cb257600080fd5b83016020810192503590506001600160401b03811115610cd157600080fd5b60a08102360382131561098557600080fd5b6006811061092e57600080fd5b8183526000602080850194508260005b85811015610d68578135610d1381610ce3565b610d1d8882610a36565b5082820135610d2b81610919565b6001600160a01b03168388015260408281013590880152606080830135908801526080808301359088015260a09687019690910190600101610d00565b509495945050505050565b6000808335601e19843603018112610d8a57600080fd5b83016020810192503590506001600160401b03811115610da957600080fd5b60c08102360382131561098557600080fd5b8183526000602080850194508260005b85811015610d68578135610dde81610ce3565b610de88882610a36565b5082820135610df681610919565b6001600160a01b039081168885015260408381013590890152606080840135908901526080808401359089015260a09083820135610e3381610919565b169088015260c0968701969190910190600101610dcb565b80356004811061093c57600080fd5b60048110610a4657610a46610a20565b6000610160610e8984610e7c85610931565b6001600160a01b03169052565b610e9560208401610931565b6001600160a01b03166020850152610eb06040840184610c9b565b826040870152610ec38387018284610cf0565b92505050610ed46060840184610d73565b8583036060870152610ee7838284610dbb565b92505050610ef760808401610e4b565b610f046080860182610e5a565b5060a0838101359085015260c0808401359085015260e08084013590850152610100808401359085015261012080840135908501526101409283013592909301919091525090565b6000808335601e19843603018112610f6357600080fd5b83016020810192503590506001600160401b03811115610f8257600080fd5b80360382131561098557600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008235603e19833603018112610c9257600080fd5b6000808335601e19843603018112610fe757600080fd5b83016020810192503590506001600160401b0381111561100657600080fd5b8060061b360382131561098557600080fd5b8183526000602080850194508260005b85811015610d685781358752828201358388015260409687019690910190600101611028565b81835260006020808501808196508560051b810191508460005b87811015610ad657828403895261107f8288610fba565b604061108b8283610fd0565b82885261109b8389018284611018565b925050506110ab87830183610fd0565b9250868203888801526110bf828483611018565b9b88019b965050509185019150600101611068565b6001600160a01b0386168152606060208083018290529082018590526000906080600587901b840181019190840188845b8981101561117357868503607f19018352611120828c610fba565b604061112c8283610c7b565b81885261113b82890182610e6a565b91505061114a86830183610f4c565b92508782038789015261115e828483610f91565b97505050928401925090830190600101611105565b5050505082810360408401526103a181858761104e565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b03811182821017156111c2576111c261118a565b60405290565b60405160a081016001600160401b03811182821017156111c2576111c261118a565b604051601f8201601f191681016001600160401b03811182821017156112125761121261118a565b604052919050565b805161093c81610919565b6000602080838503121561123857600080fd5b82516001600160401b038082111561124f57600080fd5b818501915085601f83011261126357600080fd5b8151818111156112755761127561118a565b611283848260051b016111ea565b818152848101925060e09182028401850191888311156112a257600080fd5b938501935b8285101561135357848903818112156112c05760008081fd5b6112c86111a0565b60a0808312156112d85760008081fd5b6112e06111c8565b925087516112ed81610ce3565b8352878901516112fc81610919565b838a0152604088810151818501526060808a0151908501526080808a015161132381610919565b9085015283835261133589830161121a565b838b015260c0890151908301525085525093840193928501926112a7565b50979650505050505050565b80356001600160781b038116811461093c57600080fd5b60008235609e19833603018112610c9257600080fd5b81835260006001600160fb1b038311156113a557600080fd5b8260051b80836020870137939093016020019392505050565b81835260006020808501808196506005915085821b81018560005b8881101561148e578383038a526113f08289611376565b60a081358552878201356002811061140757600080fd5b85890152604082810135908601526060808301359086015260808083013536849003601e1901811261143857600080fd5b9092018881019290356001600160401b0381111561145557600080fd5b80891b360384131561146657600080fd5b8282880152611478838801828661138c565b9d8a019d965050509287019250506001016113d9565b509098975050505050505050565b6001600160a01b03881681526080602080830182905290820187905260009060a09081840160058a901b850183018b855b8c81101561158f57878303609f190184526114e8828f611376565b6114f28182610c7b565b87855261150188860182610e6a565b905061150e87830161135f565b6001600160781b03908116868901526040908061152c85840161135f565b16828801525050606061154181840184610f4c565b87840383890152611553848284610f91565b93505050506115656080830183610f4c565b9250858203608087015261157a828483610f91565b968801969550505091850191506001016114cd565b505085810360408701526115a4818a8c6113be565b9350505050828103606084015261067281858761104e565b6001600160a01b0384168152604060208083018290529082018390526000906060600585901b840181019190840186845b8781101561162357868503605f190183526116118561160c848c610c7b565b610e6a565b945091830191908301906001016115ed565b509298975050505050505050565b60006020828403121561164357600080fd5b81518015158114610c3b57600080fdfe60a060405234801561001057600080fd5b50336080526040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a16080516112bd61006e600039600081816101cd015281816102b70152818161038e015261046901526112bd6000f3fe6080604052600436106100705760003560e01c8063570ca7351161004e578063570ca7351461010c57806365c4eb721461014457806384385c6f14610157578063e5c27af11461017957600080fd5b80630e1d31dc146100755780632718034d146100be57806333131570146100de575b600080fd5b34801561008157600080fd5b506100a061009036600461054b565b506303874c7760e21b9392505050565b6040516001600160e01b031990911681526020015b60405180910390f35b6100d16100cc3660046105de565b6101a9565b6040516100b5919061068a565b3480156100ea57600080fd5b506100a06100f9366004610723565b506303874c7760e21b9695505050505050565b34801561011857600080fd5b5060005461012c906001600160a01b031681565b6040516001600160a01b0390911681526020016100b5565b6100d16101523660046107db565b610293565b34801561016357600080fd5b50610177610172366004610867565b610383565b005b34801561018557600080fd5b5061019961019436600461088b565b610447565b60405190151581526020016100b5565b6000546060906001600160a01b031633148015906101f05750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b1561020e5760405163ccea9e6f60e01b815260040160405180910390fd5b604051632a05d10160e21b81526001600160a01b0387169063a8174404903490610242908990899089908990600401610d42565b60006040518083038185885af1158015610260573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526102899190810190610e80565b9695505050505050565b6000546060906001600160a01b031633148015906102da5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156102f85760405163ccea9e6f60e01b815260040160405180910390fd5b604051632aca252160e11b81526001600160a01b038916906355944a42903490610330908b908b908b908b908b908b906004016110f4565b60006040518083038185885af115801561034e573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526103779190810190610e80565b98975050505050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103cc576040516336abb4df60e11b815260040160405180910390fd5b6001600160a01b0381166103f357604051635384e6f560e01b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b0383169081179091556040519081527fb3b3f5f64ab192e4b5fefde1f51ce9733bbdcf831951543b325aebd49cc27ec49060200160405180910390a150565b600080546001600160a01b0316331480159061048c5750336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614155b156104aa5760405163ccea9e6f60e01b815260040160405180910390fd5b604051630fd9f1e160e41b81526001600160a01b0385169063fd9f1e10906104d89086908690600401611210565b6020604051808303816000875af11580156104f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051b9190611265565b949350505050565b6001600160a01b038116811461053857600080fd5b50565b803561054681610523565b919050565b6000806000806080858703121561056157600080fd5b84359350602085013561057381610523565b9250604085013561058381610523565b9396929550929360600135925050565b60008083601f8401126105a557600080fd5b5081356001600160401b038111156105bc57600080fd5b6020830191508360208260051b85010111156105d757600080fd5b9250929050565b6000806000806000606086880312156105f657600080fd5b853561060181610523565b945060208601356001600160401b038082111561061d57600080fd5b61062989838a01610593565b9096509450604088013591508082111561064257600080fd5b5061064f88828901610593565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b6006811061068657610686610660565b9052565b602080825282518282018190526000919060409081850190868401855b8281101561071657815180516106be868251610676565b808801516001600160a01b03908116878a0152878201518888015260608083015190880152608091820151811691870191909152818801511660a086015285015160c085015260e090930192908501906001016106a7565b5091979650505050505050565b600080600080600080600060a0888a03121561073e57600080fd5b87359650602088013561075081610523565b955060408801356001600160401b038082111561076c57600080fd5b9089019060a0828c03121561078057600080fd5b9095506060890135908082111561079657600080fd5b6107a28b838c01610593565b909650945060808a01359150808211156107bb57600080fd5b506107c88a828b01610593565b989b979a50959850939692959293505050565b60008060008060008060006080888a0312156107f657600080fd5b873561080181610523565b965060208801356001600160401b038082111561081d57600080fd5b6108298b838c01610593565b909850965060408a013591508082111561084257600080fd5b61084e8b838c01610593565b909650945060608a01359150808211156107bb57600080fd5b60006020828403121561087957600080fd5b813561088481610523565b9392505050565b6000806000604084860312156108a057600080fd5b83356108ab81610523565b925060208401356001600160401b038111156108c657600080fd5b6108d286828701610593565b9497909650939450505050565b6000823561015e198336030181126108f657600080fd5b90910192915050565b6000808335601e1984360301811261091657600080fd5b83016020810192503590506001600160401b0381111561093557600080fd5b60a0810236038213156105d757600080fd5b6006811061053857600080fd5b8183526000602080850194508260005b858110156109cc57813561097781610947565b6109818882610676565b508282013561098f81610523565b6001600160a01b03168388015260408281013590880152606080830135908801526080808301359088015260a09687019690910190600101610964565b509495945050505050565b6000808335601e198436030181126109ee57600080fd5b83016020810192503590506001600160401b03811115610a0d57600080fd5b60c0810236038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc578135610a4281610947565b610a4c8882610676565b5082820135610a5a81610523565b6001600160a01b039081168885015260408381013590890152606080840135908901526080808401359089015260a09083820135610a9781610523565b169088015260c0968701969190910190600101610a2f565b80356004811061054657600080fd5b6004811061068657610686610660565b6000610160610aed84610ae08561053b565b6001600160a01b03169052565b610af96020840161053b565b6001600160a01b03166020850152610b1460408401846108ff565b826040870152610b278387018284610954565b92505050610b3860608401846109d7565b8583036060870152610b4b838284610a1f565b92505050610b5b60808401610aaf565b610b686080860182610abe565b5060a0838101359085015260c0808401359085015260e08084013590850152610100808401359085015261012080840135908501526101409283013592909301919091525090565b6000808335601e19843603018112610bc757600080fd5b83016020810192503590506001600160401b03811115610be657600080fd5b8036038213156105d757600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60008235603e198336030181126108f657600080fd5b6000808335601e19843603018112610c4b57600080fd5b83016020810192503590506001600160401b03811115610c6a57600080fd5b8060061b36038213156105d757600080fd5b8183526000602080850194508260005b858110156109cc5781358752828201358388015260409687019690910190600101610c8c565b818352600060208085019450848460051b86018460005b87811015610d35578383038952610ce08288610c1e565b6040610cec8283610c34565b828752610cfc8388018284610c7c565b92505050610d0c87830183610c34565b925085820388870152610d20828483610c7c565b9b88019b955050509185019150600101610cc9565b5090979650505050505050565b60408082528181018590526000906060600587901b8401810190840188845b89811015610dcf57868403605f19018352610d7c828c610c1e565b610d8681826108df565b868652610d9587870182610ace565b90506020610da581840184610bb0565b935087830382890152610db9838583610bf5565b9750509485019493909301925050600101610d61565b5050508381036020850152610377818688610cb2565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715610e1d57610e1d610de5565b60405290565b60405160a081016001600160401b0381118282101715610e1d57610e1d610de5565b604051601f8201601f191681016001600160401b0381118282101715610e6d57610e6d610de5565b604052919050565b805161054681610523565b60006020808385031215610e9357600080fd5b82516001600160401b0380821115610eaa57600080fd5b818501915085601f830112610ebe57600080fd5b815181811115610ed057610ed0610de5565b610ede848260051b01610e45565b818152848101925060e0918202840185019188831115610efd57600080fd5b938501935b82851015610fae5784890381811215610f1b5760008081fd5b610f23610dfb565b60a080831215610f335760008081fd5b610f3b610e23565b92508751610f4881610947565b835287890151610f5781610523565b838a0152604088810151818501526060808a0151908501526080808a0151610f7e81610523565b90850152838352610f90898301610e75565b838b015260c089015190830152508552509384019392850192610f02565b50979650505050505050565b80356001600160781b038116811461054657600080fd5b60008235609e198336030181126108f657600080fd5b81835260006001600160fb1b0383111561100057600080fd5b8260051b80836020870137939093016020019392505050565b81835260006020808501945084600585811b87018560005b888110156110e6578483038a526110488289610fd1565b60a081358552878201356002811061105f57600080fd5b85890152604082810135908601526060808301359086015260808083013536849003601e1901811261109057600080fd5b9092018881019290356001600160401b038111156110ad57600080fd5b80881b36038413156110be57600080fd5b82828801526110d08388018286610fe7565b9d8a019d96505050928701925050600101611031565b509098975050505050505050565b6060808252818101879052600090608080840160058a901b850182018b855b8c8110156111d657878303607f1901845261112e828f610fd1565b60a061113a82836108df565b81865261114982870182610ace565b9150506020611159818401610fba565b6001600160781b039081168783015260409080611177868401610fba565b1682890152505061118a89840184610bb0565b8784038b89015261119c848284610bf5565b935050506111ac88840184610bb0565b9350868303898801526111c0838583610bf5565b9782019796505093909301925050600101611113565b505085810360208701526111eb818a8c611019565b93505050508281036040840152611203818587610cb2565b9998505050505050505050565b60208082528181018390526000906040600585901b8401810190840186845b8781101561071657868403603f190183526112538461124e848c6108df565b610ace565b9350918401919084019060010161122f565b60006020828403121561127757600080fd5b8151801515811461088457600080fdfea26469706673582212206fb255af791b40baf2e734f5b4d6f992857eaa75accbb74fce2d74723e28086f64736f6c63430008110033a264697066735822122043ed9d6e56c28b41b97eec404881806ddeb91692793ca2e6763b7f415c7e816864736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef
-----Decoded View---------------
Arg [0] : ownerAddress (address): 0x2f2d07d60ea7330DD2314f4413CCbB2dC25276EF
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002f2d07d60ea7330dd2314f4413ccbb2dc25276ef
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in GLMR
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.