diff --git a/constants/addresses.ts b/constants/addresses.ts index c4c13244..65dfa640 100644 --- a/constants/addresses.ts +++ b/constants/addresses.ts @@ -1,9 +1,9 @@ import { ChainId } from "@sushiswap/core-sdk"; export const CONDUIT_CONTROLLER_ADDRESS: { [chainId: number]: string } = { - [ChainId.ETHEREUM]: "0x00000000006ce100a8b5ed8edf18ceef9e500697", - [ChainId.RINKEBY]: "0x00000000006ce100a8b5ed8edf18ceef9e500697", - [ChainId.GÖRLI]: "0x00000000006ce100a8b5ed8edf18ceef9e500697", + [ChainId.ETHEREUM]: "0x00000000F9490004C11Cef243f5400493c00Ad63", + [ChainId.RINKEBY]: "0x00000000F9490004C11Cef243f5400493c00Ad63", + [ChainId.GÖRLI]: "0x00000000F9490004C11Cef243f5400493c00Ad63", }; export const SEAPORT_ADDRESS: { [chainId: number]: string } = { diff --git a/deploy/Conduit.ts b/deploy/Conduit.ts index 78ab2bd2..65362d36 100644 --- a/deploy/Conduit.ts +++ b/deploy/Conduit.ts @@ -1,8 +1,11 @@ import { DeployFunction } from "hardhat-deploy/types"; import { HardhatRuntimeEnvironment } from "hardhat/types"; -import { CONDUIT_CONTROLLER_ADDRESS } from "../constants/addresses"; +import { + CONDUIT_CONTROLLER_ADDRESS, + SEAPORT_ADDRESS, +} from "../constants/addresses"; -const NONCE = "555555555555555"; +const NONCE = "000000000000000"; const deployFunction: DeployFunction = async function ({ ethers, @@ -18,15 +21,20 @@ const deployFunction: DeployFunction = async function ({ const chainId = Number(await getChainId()); - let conduitController; + let conduitController, seaportAddress; if (chainId === 31337) { conduitController = await ethers.getContract("ConduitController"); - } else if (chainId in CONDUIT_CONTROLLER_ADDRESS) { + seaportAddress = (await ethers.getContract("Seaport")).address; + } else if ( + chainId in CONDUIT_CONTROLLER_ADDRESS && + chainId in SEAPORT_ADDRESS + ) { conduitController = await ethers.getContractAt( "ConduitController", CONDUIT_CONTROLLER_ADDRESS[chainId] ); + seaportAddress = SEAPORT_ADDRESS[chainId]; } else { throw Error("No CONDUITCONTROLLER!"); } @@ -47,12 +55,24 @@ const deployFunction: DeployFunction = async function ({ } else { const { gasLimit } = await ethers.provider.getBlock("latest"); - const tx = await conduitController.createConduit(conduitKey, deployer, { + let tx = await conduitController.createConduit(conduitKey, deployer, { gasLimit, }); await tx.wait(); - await conduitController.updateChannel(conduitAddress, shoyu.address, true); + tx = await conduitController.updateChannel( + conduitAddress, + seaportAddress, + true + ); + await tx.wait(); + + tx = await conduitController.updateChannel( + conduitAddress, + shoyu.address, + true + ); + await tx.wait(); console.log("Conduit deployed at address", conduitAddress); } diff --git a/deployments/goerli/AdapterRegistry.json b/deployments/goerli/AdapterRegistry.json index 91b2b53d..e22f7b43 100644 --- a/deployments/goerli/AdapterRegistry.json +++ b/deployments/goerli/AdapterRegistry.json @@ -1,5 +1,5 @@ { - "address": "0x0123Ee32eC7CD072FC433A0f3696417CA8aaF9f9", + "address": "0x29ADd59b3cC0E381e0a2c816adE0f5087674778a", "abi": [ { "inputs": [ @@ -143,45 +143,45 @@ "type": "function" } ], - "transactionHash": "0x3a9022d4f67f6e0baedf0bc3ba0705ea0e6e34ed69cac87dee0719580180d7c3", + "transactionHash": "0x720f7b5826ade4d982b0638a9cd126aa83643f5e462fcbfc0d4693a40505415c", "receipt": { "to": null, "from": "0x745E3182275791241eb92036a4A767664c456343", - "contractAddress": "0x0123Ee32eC7CD072FC433A0f3696417CA8aaF9f9", - "transactionIndex": 38, + "contractAddress": "0x29ADd59b3cC0E381e0a2c816adE0f5087674778a", + "transactionIndex": 43, "gasUsed": "602450", - "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000020000000000000000000400000000000000400040000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000000", - "blockHash": "0x3d45befa885c8cf011a7c863e97a2cfa0bafa72e98078e4d41daeeba7efe2da1", - "transactionHash": "0x3a9022d4f67f6e0baedf0bc3ba0705ea0e6e34ed69cac87dee0719580180d7c3", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000100200000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800020000000000000000000000000001000000004000000000000000000000000000000", + "blockHash": "0x1779c536c6973d3f786bd8004c04ad76428e0f1c7be86984b8ebe955cd5102a0", + "transactionHash": "0x720f7b5826ade4d982b0638a9cd126aa83643f5e462fcbfc0d4693a40505415c", "logs": [ { - "transactionIndex": 38, - "blockNumber": 7479290, - "transactionHash": "0x3a9022d4f67f6e0baedf0bc3ba0705ea0e6e34ed69cac87dee0719580180d7c3", - "address": "0x0123Ee32eC7CD072FC433A0f3696417CA8aaF9f9", + "transactionIndex": 43, + "blockNumber": 7594388, + "transactionHash": "0x720f7b5826ade4d982b0638a9cd126aa83643f5e462fcbfc0d4693a40505415c", + "address": "0x29ADd59b3cC0E381e0a2c816adE0f5087674778a", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000745e3182275791241eb92036a4a767664c456343" ], "data": "0x", - "logIndex": 3, - "blockHash": "0x3d45befa885c8cf011a7c863e97a2cfa0bafa72e98078e4d41daeeba7efe2da1" + "logIndex": 101, + "blockHash": "0x1779c536c6973d3f786bd8004c04ad76428e0f1c7be86984b8ebe955cd5102a0" } ], - "blockNumber": 7479290, - "cumulativeGasUsed": "1535222", + "blockNumber": 7594388, + "cumulativeGasUsed": "10002615", "status": 1, "byzantium": true }, "args": [ 2, [ - "0x16aBEBa80BE10540044541d9b00F059742908D05", + "0x6F19C2e253A15a14090E37592f6BEDe14CBCDbe2", "0x23d420D8e5cbDE678280Cfb84319404F5847B6cb" ] ], - "numDeployments": 4, + "numDeployments": 5, "solcInputHash": "ce961eb7631a6ee9b0f07f4cc0f96052", "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"adapterAddress\",\"type\":\"address[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"adapters\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adapterAddress\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"adapterAddress\",\"type\":\"address\"}],\"name\":\"addAdapter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"adapterAddress\",\"type\":\"address\"}],\"name\":\"setAdapterAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"bool\",\"name\":\"isActive\",\"type\":\"bool\"}],\"name\":\"setAdapterStatus\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"addAdapter(address)\":{\"details\":\"This function allows the contract owner to add a new adapter to the registry.\",\"params\":{\"adapterAddress\":\"The address of the new adapter.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"setAdapterAddress(uint256,address)\":{\"details\":\"This function allows the contract owner to set an address for the specified adapter id.\",\"params\":{\"adapterAddress\":\"The new adapter address.\",\"id\":\"The id of the adapter to change.\"}},\"setAdapterStatus(uint256,bool)\":{\"details\":\"This function allows the contract owner to the update the status of a given adapter id.\",\"params\":{\"id\":\"The id of the adapter to update.\",\"isActive\":\"The new active flag of given adapter.\"}},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/shoyu/lib/AdapterRegistry.sol\":\"AdapterRegistry\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"contracts/shoyu/lib/AdapterRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.11;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport { Adapter } from \\\"./LibShoyu.sol\\\";\\n\\ncontract AdapterRegistry is Ownable {\\n Adapter[] public adapters;\\n\\n constructor(\\n uint256 length,\\n address[] memory adapterAddress\\n ) {\\n for (uint256 i; i < length; ++i) {\\n adapters.push(Adapter(adapterAddress[i], true));\\n }\\n }\\n\\n /// @dev This function allows the contract owner to set an address\\n /// for the specified adapter id.\\n /// @param id The id of the adapter to change.\\n /// @param adapterAddress The new adapter address.\\n function setAdapterAddress(\\n uint256 id,\\n address adapterAddress\\n ) external onlyOwner {\\n Adapter storage adapter = adapters[id];\\n adapter.adapterAddress = adapterAddress; \\n }\\n\\n /// @dev This function allows the contract owner to the update the\\n /// status of a given adapter id.\\n /// @param id The id of the adapter to update.\\n /// @param isActive The new active flag of given adapter.\\n function setAdapterStatus(\\n uint256 id,\\n bool isActive\\n ) external onlyOwner {\\n Adapter storage adapter = adapters[id];\\n adapter.isActive = isActive;\\n }\\n\\n /// @dev This function allows the contract owner to add a new\\n /// adapter to the registry.\\n /// @param adapterAddress The address of the new adapter.\\n function addAdapter(\\n address adapterAddress\\n ) external onlyOwner {\\n adapters.push(Adapter(adapterAddress, true));\\n }\\n}\",\"keccak256\":\"0x80d4c1206a0a5ca87fbb06983276546546bed5db9cc77ab7fcb1dbabe0b98e73\",\"license\":\"MIT\"},\"contracts/shoyu/lib/LibShoyu.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.13;\\n\\nenum TokenSource {\\n WALLET,\\n CONDUIT\\n}\\n\\nstruct Adapter {\\n address adapterAddress;\\n bool isActive;\\n}\",\"keccak256\":\"0x62f8213d43b5a3b6ee253dc3ce89a4074b5cdbcaa60b31604cc923f20524b600\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x608060405234620000cd5762000ae7803803806200001d8162000128565b928339810190604081830312620000cd5780516020928383015160018060401b0393848211620000cd570181601f82011215620000cd578051938411620000d2575b8360051b9085806200007381850162000128565b809781520192820101928311620000cd578501905b828210620000ac576200009c8585620001e5565b6040516108219081620002c68239f35b81516001600160a01b0381168103620000cd57815290850190850162000088565b600080fd5b620000dc620000e2565b6200005f565b50634e487b7160e01b600052604160045260246000fd5b60408051919082016001600160401b038111838210176200011957604052565b62000123620000e2565b604052565b6040519190601f01601f191682016001600160401b038111838210176200011957604052565b50634e487b7160e01b600052603260045260246000fd5b60015468010000000000000000811015620001d5575b6001810180600155811015620001c5575b60016000526020600020019060018060a01b03815116825491602060ff60a01b910151151560a01b169160018060a81b03191617179055565b620001cf6200014e565b6200018c565b620001df620000e2565b6200017b565b60008054336001600160a01b0319821681178355604051939492936001600160a01b03928316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908690a3825b84811062000242575050505050565b8251811015620002b5575b6200028e60206200028884828560051b8801015116916200028062000271620000f9565b6001600160a01b039094168452565b820160019052565b62000165565b6000198114620002a15760010162000233565b634e487b7160e01b84526011600452602484fd5b620002bf6200014e565b6200024d56fe60806040526004361015610013575b600080fd5b6000803560e01c9081634d7851ea146100a2575080634ef501ac1461009957806360d54d4114610090578063715018a6146100875780638da5cb5b1461007e578063f2fde38b146100755763fc57db501461006d57600080fd5b61000e61066f565b5061000e610534565b5061000e6104e1565b5061000e610440565b5061000e6102b8565b5061000e610225565b346101675760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610167576101556004356100df61016a565b906100e861073c565b60015481101561015a575b7fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6019073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b604051f35b6101626101b0565b6100f3565b80fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361000e57565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361000e57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600154811015610218575b60016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b6102206101b0565b6101eb565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043560015481101561000e5760409060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6015460ff82519173ffffffffffffffffffffffffffffffffffffffff8116835260a01c1615156020820152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e576102f061018d565b6102f861073c565b6040516040810181811067ffffffffffffffff821117610433575b60405273ffffffffffffffffffffffffffffffffffffffff8092168152602081016001815261035c60015468010000000000000000811015610426575b600181016001556101e0565b9290926103f7576103f5936103ae915116839073ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055565b5181547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1690151560a01b74ff000000000000000000000000000000000000000016179055565b005b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b61042e6107bb565b610350565b61043b6107bb565b610313565b503461000e576000807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101675761047961073c565b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000811682558173ffffffffffffffffffffffffffffffffffffffff60405192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b503461000e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5761056c61018d565b61057461073c565b73ffffffffffffffffffffffffffffffffffffffff8091169081156105eb57600091825491817fffffffffffffffffffffffff0000000000000000000000000000000000000000841617845560405192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08484a3f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e57600435602435801515810361000e576103f5916106ba61073c565b60015481101561072f575b7fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601907fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff0000000000000000000000000000000000000000835492151560a01b169116179055565b6107376101b0565b6106c5565b73ffffffffffffffffffffffffffffffffffffffff60005416330361075d57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fdfea2646970667358221220bfa6e858016461001d4e889e42d55ba9e2f130e83d4b68c94d336d9b539a20a564736f6c634300080e0033", diff --git a/deployments/goerli/Conduit.json b/deployments/goerli/Conduit.json index 4816b012..487b6a5f 100644 --- a/deployments/goerli/Conduit.json +++ b/deployments/goerli/Conduit.json @@ -1,5 +1,5 @@ { - "address": "0x3574B84b207656dc40bA0233eBd02bcd04CbD518", + "address": "0x39784ffB1b7Cec3D92fc2ce24130B01f4C3A4CA9", "abi": [ { "inputs": [], @@ -381,10 +381,10 @@ } ], "numDeployments": 1, - "solcInputHash": "0942d0323595a7e6fae04fd08a49e90f", - "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BadReturnValueFromERC20OnTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"}],\"name\":\"ChannelClosed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isOpen\",\"type\":\"bool\"}],\"name\":\"ChannelStatusAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"identifiers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"ERC1155BatchTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Invalid1155BatchTransferEncoding\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidController\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidERC721TransferAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidItemType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingItemAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"NoContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnusedItemParameters\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"open\",\"type\":\"bool\"}],\"name\":\"ChannelUpdated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum ConduitItemType\",\"name\":\"itemType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct ConduitTransfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ConduitBatch1155Transfer[]\",\"name\":\"batchTransfers\",\"type\":\"tuple[]\"}],\"name\":\"executeBatch1155\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum ConduitItemType\",\"name\":\"itemType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct ConduitTransfer[]\",\"name\":\"standardTransfers\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ConduitBatch1155Transfer[]\",\"name\":\"batchTransfers\",\"type\":\"tuple[]\"}],\"name\":\"executeWithBatch1155\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isOpen\",\"type\":\"bool\"}],\"name\":\"updateChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"0age\",\"errors\":{\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\":[{\"details\":\"Revert with an error when an ERC20 token transfer returns a falsey value.\",\"params\":{\"amount\":\"The amount for the attempted ERC20 transfer.\",\"from\":\"The source of the attempted ERC20 transfer.\",\"to\":\"The recipient of the attempted ERC20 transfer.\",\"token\":\"The token for which the ERC20 transfer was attempted.\"}}],\"ChannelClosed(address)\":[{\"details\":\"Revert with an error when attempting to execute transfers using a caller that does not have an open channel.\"}],\"ChannelStatusAlreadySet(address,bool)\":[{\"details\":\"Revert with an error when attempting to update a channel to the current status of that channel.\"}],\"ERC1155BatchTransferGenericFailure(address,address,address,uint256[],uint256[])\":[{\"details\":\"Revert with an error when a batch ERC1155 token transfer reverts.\",\"params\":{\"amounts\":\"The amounts for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifiers\":\"The identifiers for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"Invalid1155BatchTransferEncoding()\":[{\"details\":\"Revert with an error when attempting to execute an 1155 batch transfer using calldata not produced by default ABI encoding or with different lengths for ids and amounts arrays.\"}],\"InvalidController()\":[{\"details\":\"Revert with an error when attempting to update the status of a channel from a caller that is not the conduit controller.\"}],\"InvalidERC721TransferAmount()\":[{\"details\":\"Revert with an error when an ERC721 transfer with amount other than one is attempted.\"}],\"InvalidItemType()\":[{\"details\":\"Revert with an error when attempting to execute a transfer for an item that does not have an ERC20/721/1155 item type.\"}],\"MissingItemAmount()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has an amount of zero.\"}],\"NoContract(address)\":[{\"details\":\"Revert with an error when an account being called as an assumed contract does not have code and returns no data.\",\"params\":{\"account\":\"The account that should contain code.\"}}],\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\":[{\"details\":\"Revert with an error when an ERC20, ERC721, or ERC1155 token transfer reverts.\",\"params\":{\"amount\":\"The amount for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifier\":\"The identifier for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"UnusedItemParameters()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has unused parameters. This includes both the token and the identifier parameters for native transfers as well as the identifier parameter for ERC20 transfers. Note that the conduit does not perform this check, leaving it up to the calling channel to enforce when desired.\"}]},\"kind\":\"dev\",\"methods\":{\"execute((uint8,address,address,address,uint256,uint256)[])\":{\"params\":{\"transfers\":\"The ERC20/721/1155 transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the transfers were performed successfully.\"}},\"executeBatch1155((address,address,address,uint256[],uint256[])[])\":{\"params\":{\"batchTransfers\":\"The 1155 batch item transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the item transfers were performed successfully.\"}},\"executeWithBatch1155((uint8,address,address,address,uint256,uint256)[],(address,address,address,uint256[],uint256[])[])\":{\"params\":{\"batchTransfers\":\"The 1155 batch item transfers to perform.\",\"standardTransfers\":\"The ERC20/721/1155 item transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the item transfers were performed successfully.\"}},\"updateChannel(address,bool)\":{\"params\":{\"channel\":\"The channel to open or close.\",\"isOpen\":\"The status of the channel (either open or closed).\"}}},\"title\":\"Conduit\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"In the constructor, set the deployer as the controller.\"},\"execute((uint8,address,address,address,uint256,uint256)[])\":{\"notice\":\"Execute a sequence of ERC20/721/1155 transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"executeBatch1155((address,address,address,uint256[],uint256[])[])\":{\"notice\":\"Execute a sequence of batch 1155 item transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"executeWithBatch1155((uint8,address,address,address,uint256,uint256)[],(address,address,address,uint256[],uint256[])[])\":{\"notice\":\"Execute a sequence of transfers, both single ERC20/721/1155 item transfers as well as batch 1155 item transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"updateChannel(address,bool)\":{\"notice\":\"Open or close a given channel. Only callable by the controller.\"}},\"notice\":\"This contract serves as an originator for \\\"proxied\\\" transfers. Each conduit is deployed and controlled by a \\\"conduit controller\\\" that can add and remove \\\"channels\\\" or contracts that can instruct the conduit to transfer approved ERC20/721/1155 tokens. *IMPORTANT NOTE: each conduit has an owner that can arbitrarily add or remove channels, and a malicious or negligent owner can add a channel that allows for any approved ERC20/721/1155 tokens to be taken immediately \\u2014 be extremely cautious with what conduits you give token approvals to!*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"seaport/contracts/conduit/Conduit.sol\":\"Conduit\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"seaport/contracts/conduit/Conduit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport { ConduitInterface } from \\\"../interfaces/ConduitInterface.sol\\\";\\n\\nimport { ConduitItemType } from \\\"./lib/ConduitEnums.sol\\\";\\n\\nimport { TokenTransferrer } from \\\"../lib/TokenTransferrer.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"./lib/ConduitStructs.sol\\\";\\n\\nimport \\\"./lib/ConduitConstants.sol\\\";\\n\\n/**\\n * @title Conduit\\n * @author 0age\\n * @notice This contract serves as an originator for \\\"proxied\\\" transfers. Each\\n * conduit is deployed and controlled by a \\\"conduit controller\\\" that can\\n * add and remove \\\"channels\\\" or contracts that can instruct the conduit\\n * to transfer approved ERC20/721/1155 tokens. *IMPORTANT NOTE: each\\n * conduit has an owner that can arbitrarily add or remove channels, and\\n * a malicious or negligent owner can add a channel that allows for any\\n * approved ERC20/721/1155 tokens to be taken immediately \\u2014 be extremely\\n * cautious with what conduits you give token approvals to!*\\n */\\ncontract Conduit is ConduitInterface, TokenTransferrer {\\n // Set deployer as an immutable controller that can update channel statuses.\\n address private immutable _controller;\\n\\n // Track the status of each channel.\\n mapping(address => bool) private _channels;\\n\\n /**\\n * @notice Ensure that the caller is currently registered as an open channel\\n * on the conduit.\\n */\\n modifier onlyOpenChannel() {\\n // Utilize assembly to access channel storage mapping directly.\\n assembly {\\n // Write the caller to scratch space.\\n mstore(ChannelKey_channel_ptr, caller())\\n\\n // Write the storage slot for _channels to scratch space.\\n mstore(ChannelKey_slot_ptr, _channels.slot)\\n\\n // Derive the position in storage of _channels[msg.sender]\\n // and check if the stored value is zero.\\n if iszero(\\n sload(keccak256(ChannelKey_channel_ptr, ChannelKey_length))\\n ) {\\n // The caller is not an open channel; revert with\\n // ChannelClosed(caller). First, set error signature in memory.\\n mstore(ChannelClosed_error_ptr, ChannelClosed_error_signature)\\n\\n // Next, set the caller as the argument.\\n mstore(ChannelClosed_channel_ptr, caller())\\n\\n // Finally, revert, returning full custom error with argument.\\n revert(ChannelClosed_error_ptr, ChannelClosed_error_length)\\n }\\n }\\n\\n // Continue with function execution.\\n _;\\n }\\n\\n /**\\n * @notice In the constructor, set the deployer as the controller.\\n */\\n constructor() {\\n // Set the deployer as the controller.\\n _controller = msg.sender;\\n }\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n override\\n onlyOpenChannel\\n returns (bytes4 magicValue)\\n {\\n // Retrieve the total number of transfers and place on the stack.\\n uint256 totalStandardTransfers = transfers.length;\\n\\n // Iterate over each transfer.\\n for (uint256 i = 0; i < totalStandardTransfers; ) {\\n // Retrieve the transfer in question and perform the transfer.\\n _transfer(transfers[i]);\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.execute.selector;\\n }\\n\\n /**\\n * @notice Execute a sequence of batch 1155 item transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param batchTransfers The 1155 batch item transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the item transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) external override onlyOpenChannel returns (bytes4 magicValue) {\\n // Perform 1155 batch transfers. Note that memory should be considered\\n // entirely corrupted from this point forward.\\n _performERC1155BatchTransfers(batchTransfers);\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.executeBatch1155.selector;\\n }\\n\\n /**\\n * @notice Execute a sequence of transfers, both single ERC20/721/1155 item\\n * transfers as well as batch 1155 item transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param standardTransfers The ERC20/721/1155 item transfers to perform.\\n * @param batchTransfers The 1155 batch item transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the item transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) external override onlyOpenChannel returns (bytes4 magicValue) {\\n // Retrieve the total number of transfers and place on the stack.\\n uint256 totalStandardTransfers = standardTransfers.length;\\n\\n // Iterate over each standard transfer.\\n for (uint256 i = 0; i < totalStandardTransfers; ) {\\n // Retrieve the transfer in question and perform the transfer.\\n _transfer(standardTransfers[i]);\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Perform 1155 batch transfers. Note that memory should be considered\\n // entirely corrupted from this point forward aside from the free memory\\n // pointer having the default value.\\n _performERC1155BatchTransfers(batchTransfers);\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.executeWithBatch1155.selector;\\n }\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external override {\\n // Ensure that the caller is the controller of this contract.\\n if (msg.sender != _controller) {\\n revert InvalidController();\\n }\\n\\n // Ensure that the channel does not already have the indicated status.\\n if (_channels[channel] == isOpen) {\\n revert ChannelStatusAlreadySet(channel, isOpen);\\n }\\n\\n // Update the status of the channel.\\n _channels[channel] = isOpen;\\n\\n // Emit a corresponding event.\\n emit ChannelUpdated(channel, isOpen);\\n }\\n\\n /**\\n * @dev Internal function to transfer a given ERC20/721/1155 item. Note that\\n * channels are expected to implement checks against transferring any\\n * zero-amount items if that constraint is desired.\\n *\\n * @param item The ERC20/721/1155 item to transfer.\\n */\\n function _transfer(ConduitTransfer calldata item) internal {\\n // Determine the transfer method based on the respective item type.\\n if (item.itemType == ConduitItemType.ERC20) {\\n // Transfer ERC20 token. Note that item.identifier is ignored and\\n // therefore ERC20 transfer items are potentially malleable \\u2014 this\\n // check should be performed by the calling channel if a constraint\\n // on item malleability is desired.\\n _performERC20Transfer(item.token, item.from, item.to, item.amount);\\n } else if (item.itemType == ConduitItemType.ERC721) {\\n // Ensure that exactly one 721 item is being transferred.\\n if (item.amount != 1) {\\n revert InvalidERC721TransferAmount();\\n }\\n\\n // Transfer ERC721 token.\\n _performERC721Transfer(\\n item.token,\\n item.from,\\n item.to,\\n item.identifier\\n );\\n } else if (item.itemType == ConduitItemType.ERC1155) {\\n // Transfer ERC1155 token.\\n _performERC1155Transfer(\\n item.token,\\n item.from,\\n item.to,\\n item.identifier,\\n item.amount\\n );\\n } else {\\n // Throw with an error.\\n revert InvalidItemType();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd0a8666160c7c2c1bd74ee4144b0aed727b8a5ee4b3ef9502011bc3e96edd969\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\n// error ChannelClosed(address channel)\\nuint256 constant ChannelClosed_error_signature = (\\n 0x93daadf200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ChannelClosed_error_ptr = 0x00;\\nuint256 constant ChannelClosed_channel_ptr = 0x4;\\nuint256 constant ChannelClosed_error_length = 0x24;\\n\\n// For the mapping:\\n// mapping(address => bool) channels\\n// The position in storage for a particular account is:\\n// keccak256(abi.encode(account, channels.slot))\\nuint256 constant ChannelKey_channel_ptr = 0x00;\\nuint256 constant ChannelKey_slot_ptr = 0x20;\\nuint256 constant ChannelKey_length = 0x40;\\n\",\"keccak256\":\"0x4b70ada07bfe97fc4cf18e23fbf82831c80ab2251b3ef455b4d0012a980c6f76\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitEnums.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nenum ConduitItemType {\\n NATIVE, // unused\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\",\"keccak256\":\"0x3a9ecf77688f97d1b595be27b49fca3eac93e3f91160d79f0f0063c250fd8aca\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport { ConduitItemType } from \\\"./ConduitEnums.sol\\\";\\n\\nstruct ConduitTransfer {\\n ConduitItemType itemType;\\n address token;\\n address from;\\n address to;\\n uint256 identifier;\\n uint256 amount;\\n}\\n\\nstruct ConduitBatch1155Transfer {\\n address token;\\n address from;\\n address to;\\n uint256[] ids;\\n uint256[] amounts;\\n}\\n\",\"keccak256\":\"0xfd2cec45327e9a6ebc02d7efb9daa1cfdabb26eb803e4b2e9b5e82340d92cfed\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title ConduitInterface\\n * @author 0age\\n * @notice ConduitInterface contains all external function interfaces, events,\\n * and errors for conduit contracts.\\n */\\ninterface ConduitInterface {\\n /**\\n * @dev Revert with an error when attempting to execute transfers using a\\n * caller that does not have an open channel.\\n */\\n error ChannelClosed(address channel);\\n\\n /**\\n * @dev Revert with an error when attempting to update a channel to the\\n * current status of that channel.\\n */\\n error ChannelStatusAlreadySet(address channel, bool isOpen);\\n\\n /**\\n * @dev Revert with an error when attempting to execute a transfer for an\\n * item that does not have an ERC20/721/1155 item type.\\n */\\n error InvalidItemType();\\n\\n /**\\n * @dev Revert with an error when attempting to update the status of a\\n * channel from a caller that is not the conduit controller.\\n */\\n error InvalidController();\\n\\n /**\\n * @dev Emit an event whenever a channel is opened or closed.\\n *\\n * @param channel The channel that has been updated.\\n * @param open A boolean indicating whether the conduit is open or not.\\n */\\n event ChannelUpdated(address indexed channel, bool open);\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of batch 1155 transfers. Only a caller with an\\n * open channel can call this function.\\n *\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of transfers, both single and batch 1155. Only\\n * a caller with an open channel can call this function.\\n *\\n * @param standardTransfers The ERC20/721/1155 transfers to perform.\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external;\\n}\\n\",\"keccak256\":\"0xbfcd43fd8c0f3eccfb6b5c10a4c4b794f3004ff08152116f8b1ea6512af336e1\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/TokenTransferrerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\n/**\\n * @title TokenTransferrerErrors\\n */\\ninterface TokenTransferrerErrors {\\n /**\\n * @dev Revert with an error when an ERC721 transfer with amount other than\\n * one is attempted.\\n */\\n error InvalidERC721TransferAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has an amount of zero.\\n */\\n error MissingItemAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has unused parameters. This includes both the token and the\\n * identifier parameters for native transfers as well as the identifier\\n * parameter for ERC20 transfers. Note that the conduit does not\\n * perform this check, leaving it up to the calling channel to enforce\\n * when desired.\\n */\\n error UnusedItemParameters();\\n\\n /**\\n * @dev Revert with an error when an ERC20, ERC721, or ERC1155 token\\n * transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifier The identifier for the attempted transfer.\\n * @param amount The amount for the attempted transfer.\\n */\\n error TokenTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when a batch ERC1155 token transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifiers The identifiers for the attempted transfer.\\n * @param amounts The amounts for the attempted transfer.\\n */\\n error ERC1155BatchTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256[] identifiers,\\n uint256[] amounts\\n );\\n\\n /**\\n * @dev Revert with an error when an ERC20 token transfer returns a falsey\\n * value.\\n *\\n * @param token The token for which the ERC20 transfer was attempted.\\n * @param from The source of the attempted ERC20 transfer.\\n * @param to The recipient of the attempted ERC20 transfer.\\n * @param amount The amount for the attempted ERC20 transfer.\\n */\\n error BadReturnValueFromERC20OnTransfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when an account being called as an assumed\\n * contract does not have code and returns no data.\\n *\\n * @param account The account that should contain code.\\n */\\n error NoContract(address account);\\n\\n /**\\n * @dev Revert with an error when attempting to execute an 1155 batch\\n * transfer using calldata not produced by default ABI encoding or with\\n * different lengths for ids and amounts arrays.\\n */\\n error Invalid1155BatchTransferEncoding();\\n}\\n\",\"keccak256\":\"0xd547a837e72da776edb433ef6bbb5ab1dbf4bc8e98995ca2baf83edcadd73607\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport \\\"./TokenTransferrerConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n TokenTransferrerErrors\\n} from \\\"../interfaces/TokenTransferrerErrors.sol\\\";\\n\\nimport { ConduitBatch1155Transfer } from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title TokenTransferrer\\n * @author 0age\\n * @custom:coauthor d1ll0n\\n * @custom:coauthor transmissions11\\n * @notice TokenTransferrer is a library for performing optimized ERC20, ERC721,\\n * ERC1155, and batch ERC1155 transfers, used by both Seaport as well as\\n * by conduits deployed by the ConduitController. Use great caution when\\n * considering these functions for use in other codebases, as there are\\n * significant side effects and edge cases that need to be thoroughly\\n * understood and carefully addressed.\\n */\\ncontract TokenTransferrer is TokenTransferrerErrors {\\n /**\\n * @dev Internal function to transfer ERC20 tokens from a given originator\\n * to a given recipient. Sufficient approvals must be set on the\\n * contract performing the transfer.\\n *\\n * @param token The ERC20 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC20Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC20 token transfer.\\n assembly {\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data into memory, starting with function selector.\\n mstore(ERC20_transferFrom_sig_ptr, ERC20_transferFrom_signature)\\n mstore(ERC20_transferFrom_from_ptr, from)\\n mstore(ERC20_transferFrom_to_ptr, to)\\n mstore(ERC20_transferFrom_amount_ptr, amount)\\n\\n // Make call & copy up to 32 bytes of return data to scratch space.\\n // Scratch space does not need to be cleared ahead of time, as the\\n // subsequent check will ensure that either at least a full word of\\n // return data is received (in which case it will be overwritten) or\\n // that no data is received (in which case scratch space will be\\n // ignored) on a successful call to the given token.\\n let callStatus := call(\\n gas(),\\n token,\\n 0,\\n ERC20_transferFrom_sig_ptr,\\n ERC20_transferFrom_length,\\n 0,\\n OneWord\\n )\\n\\n // Determine whether transfer was successful using status & result.\\n let success := and(\\n // Set success to whether the call reverted, if not check it\\n // either returned exactly 1 (can't just be non-zero data), or\\n // had no return data.\\n or(\\n and(eq(mload(0), 1), gt(returndatasize(), 31)),\\n iszero(returndatasize())\\n ),\\n callStatus\\n )\\n\\n // Handle cases where either the transfer failed or no data was\\n // returned. Group these, as most transfers will succeed with data.\\n // Equivalent to `or(iszero(success), iszero(returndatasize()))`\\n // but after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(success, iszero(iszero(returndatasize())))) {\\n // If the token has no code or the transfer failed: Equivalent\\n // to `or(iszero(success), iszero(extcodesize(token)))` but\\n // after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(iszero(iszero(extcodesize(token))), success)) {\\n // If the transfer failed:\\n if iszero(success) {\\n // If it was due to a revert:\\n if iszero(callStatus) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to\\n // copy returndata while expanding memory where\\n // necessary. Start by computing the word size\\n // of returndata and allocated memory. Round up\\n // to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of\\n // msize() to work around a Yul warning that\\n // prevents accessing msize directly when the IR\\n // pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(\\n returnDataWords,\\n msizeWords\\n ),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to\\n // gas remaining; bubble up the revert data if\\n // enough gas is still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite\\n // existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, specifying memory region with\\n // copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(\\n TokenTransferGenericFailure_error_token_ptr,\\n token\\n )\\n mstore(\\n TokenTransferGenericFailure_error_from_ptr,\\n from\\n )\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, 0)\\n mstore(\\n TokenTransferGenericFailure_error_amount_ptr,\\n amount\\n )\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Otherwise revert with a message about the token\\n // returning false or non-compliant return values.\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_signature\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_token_ptr,\\n token\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_from_ptr,\\n from\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_to_ptr,\\n to\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_amount_ptr,\\n amount\\n )\\n revert(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_length\\n )\\n }\\n\\n // Otherwise, revert with error about token not having code:\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Otherwise, the token just returned no data despite the call\\n // having succeeded; no need to optimize for this as it's not\\n // technically ERC20 compliant.\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer an ERC721 token from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer. Note that this function does\\n * not check whether the receiver can accept the ERC721 token (i.e. it\\n * does not use `safeTransferFrom`).\\n *\\n * @param token The ERC721 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer.\\n */\\n function _performERC721Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier\\n ) internal {\\n // Utilize assembly to perform an optimized ERC721 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data to memory starting with function selector.\\n mstore(ERC721_transferFrom_sig_ptr, ERC721_transferFrom_signature)\\n mstore(ERC721_transferFrom_from_ptr, from)\\n mstore(ERC721_transferFrom_to_ptr, to)\\n mstore(ERC721_transferFrom_id_ptr, identifier)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC721_transferFrom_sig_ptr,\\n ERC721_transferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, 1)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer.\\n *\\n * @param token The ERC1155 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The id to transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC1155Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC1155 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The following memory slots will be used when populating call data\\n // for the transfer; read the values and restore them later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n let slot0x80 := mload(Slot0x80)\\n let slot0xA0 := mload(Slot0xA0)\\n let slot0xC0 := mload(Slot0xC0)\\n\\n // Write call data into memory, beginning with function selector.\\n mstore(\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_signature\\n )\\n mstore(ERC1155_safeTransferFrom_from_ptr, from)\\n mstore(ERC1155_safeTransferFrom_to_ptr, to)\\n mstore(ERC1155_safeTransferFrom_id_ptr, identifier)\\n mstore(ERC1155_safeTransferFrom_amount_ptr, amount)\\n mstore(\\n ERC1155_safeTransferFrom_data_offset_ptr,\\n ERC1155_safeTransferFrom_data_length_offset\\n )\\n mstore(ERC1155_safeTransferFrom_data_length_ptr, 0)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, amount)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n mstore(Slot0x80, slot0x80) // Restore slot 0x80.\\n mstore(Slot0xA0, slot0xA0) // Restore slot 0xA0.\\n mstore(Slot0xC0, slot0xC0) // Restore slot 0xC0.\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer. NOTE: this function is not\\n * memory-safe; it will overwrite existing memory, restore the free\\n * memory pointer to the default value, and overwrite the zero slot.\\n * This function should only be called once memory is no longer\\n * required and when uninitialized arrays are not utilized, and memory\\n * should be considered fully corrupted (aside from the existence of a\\n * default-value free memory pointer) after calling this function.\\n *\\n * @param batchTransfers The group of 1155 batch transfers to perform.\\n */\\n function _performERC1155BatchTransfers(\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) internal {\\n // Utilize assembly to perform optimized batch 1155 transfers.\\n assembly {\\n let len := batchTransfers.length\\n // Pointer to first head in the array, which is offset to the struct\\n // at each index. This gets incremented after each loop to avoid\\n // multiplying by 32 to get the offset for each element.\\n let nextElementHeadPtr := batchTransfers.offset\\n\\n // Pointer to beginning of the head of the array. This is the\\n // reference position each offset references. It's held static to\\n // let each loop calculate the data position for an element.\\n let arrayHeadPtr := nextElementHeadPtr\\n\\n // Write the function selector, which will be reused for each call:\\n // safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\n mstore(\\n ConduitBatch1155Transfer_from_offset,\\n ERC1155_safeBatchTransferFrom_signature\\n )\\n\\n // Iterate over each batch transfer.\\n for {\\n let i := 0\\n } lt(i, len) {\\n i := add(i, 1)\\n } {\\n // Read the offset to the beginning of the element and add\\n // it to pointer to the beginning of the array head to get\\n // the absolute position of the element in calldata.\\n let elementPtr := add(\\n arrayHeadPtr,\\n calldataload(nextElementHeadPtr)\\n )\\n\\n // Retrieve the token from calldata.\\n let token := calldataload(elementPtr)\\n\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Get the total number of supplied ids.\\n let idsLength := calldataload(\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset)\\n )\\n\\n // Determine the expected offset for the amounts array.\\n let expectedAmountsOffset := add(\\n ConduitBatch1155Transfer_amounts_length_baseOffset,\\n mul(idsLength, OneWord)\\n )\\n\\n // Validate struct encoding.\\n let invalidEncoding := iszero(\\n and(\\n // ids.length == amounts.length\\n eq(\\n idsLength,\\n calldataload(add(elementPtr, expectedAmountsOffset))\\n ),\\n and(\\n // ids_offset == 0xa0\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatch1155Transfer_ids_head_offset\\n )\\n ),\\n ConduitBatch1155Transfer_ids_length_offset\\n ),\\n // amounts_offset == 0xc0 + ids.length*32\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatchTransfer_amounts_head_offset\\n )\\n ),\\n expectedAmountsOffset\\n )\\n )\\n )\\n )\\n\\n // Revert with an error if the encoding is not valid.\\n if invalidEncoding {\\n mstore(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_selector\\n )\\n revert(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_length\\n )\\n }\\n\\n // Update the offset position for the next loop\\n nextElementHeadPtr := add(nextElementHeadPtr, OneWord)\\n\\n // Copy the first section of calldata (before dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_from_offset),\\n ConduitBatch1155Transfer_usable_head_size\\n )\\n\\n // Determine size of calldata required for ids and amounts. Note\\n // that the size includes both lengths as well as the data.\\n let idsAndAmountsSize := add(TwoWords, mul(idsLength, TwoWords))\\n\\n // Update the offset for the data array in memory.\\n mstore(\\n BatchTransfer1155Params_data_head_ptr,\\n add(\\n BatchTransfer1155Params_ids_length_offset,\\n idsAndAmountsSize\\n )\\n )\\n\\n // Set the length of the data array in memory to zero.\\n mstore(\\n add(\\n BatchTransfer1155Params_data_length_basePtr,\\n idsAndAmountsSize\\n ),\\n 0\\n )\\n\\n // Determine the total calldata size for the call to transfer.\\n let transferDataSize := add(\\n BatchTransfer1155Params_calldata_baseSize,\\n idsAndAmountsSize\\n )\\n\\n // Copy second section of calldata (including dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ids_length_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset),\\n idsAndAmountsSize\\n )\\n\\n // Perform the call to transfer 1155 tokens.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ConduitBatch1155Transfer_from_offset, // Data portion start.\\n transferDataSize, // Location of the length of callData.\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary.\\n // Start by computing word size of returndata and\\n // allocated memory. Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use transferDataSize in place of msize() to\\n // work around a Yul warning that prevents accessing\\n // msize directly when the IR pipeline is activated.\\n // The free memory pointer is not used here because\\n // this function does almost all memory management\\n // manually and does not update it, and transferDataSize\\n // should be the largest memory value used (unless a\\n // previous batch was larger).\\n let msizeWords := div(transferDataSize, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert with memory region containing returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Set the error signature.\\n mstore(\\n 0,\\n ERC1155BatchTransferGenericFailure_error_signature\\n )\\n\\n // Write the token.\\n mstore(ERC1155BatchTransferGenericFailure_token_ptr, token)\\n\\n // Increase the offset to ids by 32.\\n mstore(\\n BatchTransfer1155Params_ids_head_ptr,\\n ERC1155BatchTransferGenericFailure_ids_offset\\n )\\n\\n // Increase the offset to amounts by 32.\\n mstore(\\n BatchTransfer1155Params_amounts_head_ptr,\\n add(\\n OneWord,\\n mload(BatchTransfer1155Params_amounts_head_ptr)\\n )\\n )\\n\\n // Return modified region. The total size stays the same as\\n // `token` uses the same number of bytes as `data.length`.\\n revert(0, transferDataSize)\\n }\\n }\\n\\n // Reset the free memory pointer to the default value; memory must\\n // be assumed to be dirtied and not reused from this point forward.\\n // Also note that the zero slot is not reset to zero, meaning empty\\n // arrays cannot be safely created or utilized until it is restored.\\n mstore(FreeMemoryPointerSlot, DefaultFreeMemoryPointer)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xfcfa2be72ad8a3c2c096f9dc892b7040b9efc13315fc283ffe1a407d1c974ad3\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrerConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\n/*\\n * -------------------------- Disambiguation & Other Notes ---------------------\\n * - The term \\\"head\\\" is used as it is in the documentation for ABI encoding,\\n * but only in reference to dynamic types, i.e. it always refers to the\\n * offset or pointer to the body of a dynamic type. In calldata, the head\\n * is always an offset (relative to the parent object), while in memory,\\n * the head is always the pointer to the body. More information found here:\\n * https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#argument-encoding\\n * - Note that the length of an array is separate from and precedes the\\n * head of the array.\\n *\\n * - The term \\\"body\\\" is used in place of the term \\\"head\\\" used in the ABI\\n * documentation. It refers to the start of the data for a dynamic type,\\n * e.g. the first word of a struct or the first word of the first element\\n * in an array.\\n *\\n * - The term \\\"pointer\\\" is used to describe the absolute position of a value\\n * and never an offset relative to another value.\\n * - The suffix \\\"_ptr\\\" refers to a memory pointer.\\n * - The suffix \\\"_cdPtr\\\" refers to a calldata pointer.\\n *\\n * - The term \\\"offset\\\" is used to describe the position of a value relative\\n * to some parent value. For example, OrderParameters_conduit_offset is the\\n * offset to the \\\"conduit\\\" value in the OrderParameters struct relative to\\n * the start of the body.\\n * - Note: Offsets are used to derive pointers.\\n *\\n * - Some structs have pointers defined for all of their fields in this file.\\n * Lines which are commented out are fields that are not used in the\\n * codebase but have been left in for readability.\\n */\\n\\nuint256 constant AlmostOneWord = 0x1f;\\nuint256 constant OneWord = 0x20;\\nuint256 constant TwoWords = 0x40;\\nuint256 constant ThreeWords = 0x60;\\n\\nuint256 constant FreeMemoryPointerSlot = 0x40;\\nuint256 constant ZeroSlot = 0x60;\\nuint256 constant DefaultFreeMemoryPointer = 0x80;\\n\\nuint256 constant Slot0x80 = 0x80;\\nuint256 constant Slot0xA0 = 0xa0;\\nuint256 constant Slot0xC0 = 0xc0;\\n\\n// abi.encodeWithSignature(\\\"transferFrom(address,address,uint256)\\\")\\nuint256 constant ERC20_transferFrom_signature = (\\n 0x23b872dd00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC20_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC20_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC20_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC20_transferFrom_amount_ptr = 0x44;\\nuint256 constant ERC20_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\n// \\\"safeTransferFrom(address,address,uint256,uint256,bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeTransferFrom_signature = (\\n 0xf242432a00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155_safeTransferFrom_sig_ptr = 0x0;\\nuint256 constant ERC1155_safeTransferFrom_from_ptr = 0x04;\\nuint256 constant ERC1155_safeTransferFrom_to_ptr = 0x24;\\nuint256 constant ERC1155_safeTransferFrom_id_ptr = 0x44;\\nuint256 constant ERC1155_safeTransferFrom_amount_ptr = 0x64;\\nuint256 constant ERC1155_safeTransferFrom_data_offset_ptr = 0x84;\\nuint256 constant ERC1155_safeTransferFrom_data_length_ptr = 0xa4;\\nuint256 constant ERC1155_safeTransferFrom_length = 0xc4; // 4 + 32 * 6 == 196\\nuint256 constant ERC1155_safeTransferFrom_data_length_offset = 0xa0;\\n\\n// abi.encodeWithSignature(\\n// \\\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeBatchTransferFrom_signature = (\\n 0x2eb2c2d600000000000000000000000000000000000000000000000000000000\\n);\\n\\nbytes4 constant ERC1155_safeBatchTransferFrom_selector = bytes4(\\n bytes32(ERC1155_safeBatchTransferFrom_signature)\\n);\\n\\nuint256 constant ERC721_transferFrom_signature = ERC20_transferFrom_signature;\\nuint256 constant ERC721_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC721_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC721_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC721_transferFrom_id_ptr = 0x44;\\nuint256 constant ERC721_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\\"NoContract(address)\\\")\\nuint256 constant NoContract_error_signature = (\\n 0x5f15d67200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant NoContract_error_sig_ptr = 0x0;\\nuint256 constant NoContract_error_token_ptr = 0x4;\\nuint256 constant NoContract_error_length = 0x24; // 4 + 32 == 36\\n\\n// abi.encodeWithSignature(\\n// \\\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\\\"\\n// )\\nuint256 constant TokenTransferGenericFailure_error_signature = (\\n 0xf486bc8700000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant TokenTransferGenericFailure_error_sig_ptr = 0x0;\\nuint256 constant TokenTransferGenericFailure_error_token_ptr = 0x4;\\nuint256 constant TokenTransferGenericFailure_error_from_ptr = 0x24;\\nuint256 constant TokenTransferGenericFailure_error_to_ptr = 0x44;\\nuint256 constant TokenTransferGenericFailure_error_id_ptr = 0x64;\\nuint256 constant TokenTransferGenericFailure_error_amount_ptr = 0x84;\\n\\n// 4 + 32 * 5 == 164\\nuint256 constant TokenTransferGenericFailure_error_length = 0xa4;\\n\\n// abi.encodeWithSignature(\\n// \\\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\\\"\\n// )\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_signature = (\\n 0x9889192300000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_sig_ptr = 0x0;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_token_ptr = 0x4;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_from_ptr = 0x24;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_to_ptr = 0x44;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_amount_ptr = 0x64;\\n\\n// 4 + 32 * 4 == 132\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_length = 0x84;\\n\\nuint256 constant ExtraGasBuffer = 0x20;\\nuint256 constant CostPerWord = 3;\\nuint256 constant MemoryExpansionCoefficient = 0x200;\\n\\n// Values are offset by 32 bytes in order to write the token to the beginning\\n// in the event of a revert\\nuint256 constant BatchTransfer1155Params_ptr = 0x24;\\nuint256 constant BatchTransfer1155Params_ids_head_ptr = 0x64;\\nuint256 constant BatchTransfer1155Params_amounts_head_ptr = 0x84;\\nuint256 constant BatchTransfer1155Params_data_head_ptr = 0xa4;\\nuint256 constant BatchTransfer1155Params_data_length_basePtr = 0xc4;\\nuint256 constant BatchTransfer1155Params_calldata_baseSize = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_ptr = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_offset = 0xa0;\\nuint256 constant BatchTransfer1155Params_amounts_length_baseOffset = 0xc0;\\nuint256 constant BatchTransfer1155Params_data_length_baseOffset = 0xe0;\\n\\nuint256 constant ConduitBatch1155Transfer_usable_head_size = 0x80;\\n\\nuint256 constant ConduitBatch1155Transfer_from_offset = 0x20;\\nuint256 constant ConduitBatch1155Transfer_ids_head_offset = 0x60;\\nuint256 constant ConduitBatch1155Transfer_amounts_head_offset = 0x80;\\nuint256 constant ConduitBatch1155Transfer_ids_length_offset = 0xa0;\\nuint256 constant ConduitBatch1155Transfer_amounts_length_baseOffset = 0xc0;\\nuint256 constant ConduitBatch1155Transfer_calldata_baseSize = 0xc0;\\n\\n// Note: abbreviated version of above constant to adhere to line length limit.\\nuint256 constant ConduitBatchTransfer_amounts_head_offset = 0x80;\\n\\nuint256 constant Invalid1155BatchTransferEncoding_ptr = 0x00;\\nuint256 constant Invalid1155BatchTransferEncoding_length = 0x04;\\nuint256 constant Invalid1155BatchTransferEncoding_selector = (\\n 0xeba2084c00000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant ERC1155BatchTransferGenericFailure_error_signature = (\\n 0xafc445e200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155BatchTransferGenericFailure_token_ptr = 0x04;\\nuint256 constant ERC1155BatchTransferGenericFailure_ids_offset = 0xc0;\\n\",\"keccak256\":\"0xb55807b4999544c4e336a9ea22a963ed50620522b5406d0cd8d5b6d790a2a322\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a080604052346100235733608052610c7690816100298239608051816103c50152f35b600080fdfe60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea264697066735822122046f9e0b8ef710088fe04ae4488f35c37e16de0b3839bf6fe5c6701c8022c134c64736f6c634300080e0033", - "deployedBytecode": "0x60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea264697066735822122046f9e0b8ef710088fe04ae4488f35c37e16de0b3839bf6fe5c6701c8022c134c64736f6c634300080e0033", + "solcInputHash": "ce961eb7631a6ee9b0f07f4cc0f96052", + "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BadReturnValueFromERC20OnTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"}],\"name\":\"ChannelClosed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isOpen\",\"type\":\"bool\"}],\"name\":\"ChannelStatusAlreadySet\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"identifiers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"ERC1155BatchTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Invalid1155BatchTransferEncoding\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidController\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidERC721TransferAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidItemType\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingItemAmount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"NoContract\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnusedItemParameters\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"open\",\"type\":\"bool\"}],\"name\":\"ChannelUpdated\",\"type\":\"event\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum ConduitItemType\",\"name\":\"itemType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct ConduitTransfer[]\",\"name\":\"transfers\",\"type\":\"tuple[]\"}],\"name\":\"execute\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ConduitBatch1155Transfer[]\",\"name\":\"batchTransfers\",\"type\":\"tuple[]\"}],\"name\":\"executeBatch1155\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"enum ConduitItemType\",\"name\":\"itemType\",\"type\":\"uint8\"},{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct ConduitTransfer[]\",\"name\":\"standardTransfers\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"internalType\":\"struct ConduitBatch1155Transfer[]\",\"name\":\"batchTransfers\",\"type\":\"tuple[]\"}],\"name\":\"executeWithBatch1155\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"magicValue\",\"type\":\"bytes4\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"channel\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isOpen\",\"type\":\"bool\"}],\"name\":\"updateChannel\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"0age\",\"errors\":{\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\":[{\"details\":\"Revert with an error when an ERC20 token transfer returns a falsey value.\",\"params\":{\"amount\":\"The amount for the attempted ERC20 transfer.\",\"from\":\"The source of the attempted ERC20 transfer.\",\"to\":\"The recipient of the attempted ERC20 transfer.\",\"token\":\"The token for which the ERC20 transfer was attempted.\"}}],\"ChannelClosed(address)\":[{\"details\":\"Revert with an error when attempting to execute transfers using a caller that does not have an open channel.\"}],\"ChannelStatusAlreadySet(address,bool)\":[{\"details\":\"Revert with an error when attempting to update a channel to the current status of that channel.\"}],\"ERC1155BatchTransferGenericFailure(address,address,address,uint256[],uint256[])\":[{\"details\":\"Revert with an error when a batch ERC1155 token transfer reverts.\",\"params\":{\"amounts\":\"The amounts for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifiers\":\"The identifiers for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"Invalid1155BatchTransferEncoding()\":[{\"details\":\"Revert with an error when attempting to execute an 1155 batch transfer using calldata not produced by default ABI encoding or with different lengths for ids and amounts arrays.\"}],\"InvalidController()\":[{\"details\":\"Revert with an error when attempting to update the status of a channel from a caller that is not the conduit controller.\"}],\"InvalidERC721TransferAmount()\":[{\"details\":\"Revert with an error when an ERC721 transfer with amount other than one is attempted.\"}],\"InvalidItemType()\":[{\"details\":\"Revert with an error when attempting to execute a transfer for an item that does not have an ERC20/721/1155 item type.\"}],\"MissingItemAmount()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has an amount of zero.\"}],\"NoContract(address)\":[{\"details\":\"Revert with an error when an account being called as an assumed contract does not have code and returns no data.\",\"params\":{\"account\":\"The account that should contain code.\"}}],\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\":[{\"details\":\"Revert with an error when an ERC20, ERC721, or ERC1155 token transfer reverts.\",\"params\":{\"amount\":\"The amount for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifier\":\"The identifier for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"UnusedItemParameters()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has unused parameters. This includes both the token and the identifier parameters for native transfers as well as the identifier parameter for ERC20 transfers. Note that the conduit does not perform this check, leaving it up to the calling channel to enforce when desired.\"}]},\"kind\":\"dev\",\"methods\":{\"execute((uint8,address,address,address,uint256,uint256)[])\":{\"params\":{\"transfers\":\"The ERC20/721/1155 transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the transfers were performed successfully.\"}},\"executeBatch1155((address,address,address,uint256[],uint256[])[])\":{\"params\":{\"batchTransfers\":\"The 1155 batch item transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the item transfers were performed successfully.\"}},\"executeWithBatch1155((uint8,address,address,address,uint256,uint256)[],(address,address,address,uint256[],uint256[])[])\":{\"params\":{\"batchTransfers\":\"The 1155 batch item transfers to perform.\",\"standardTransfers\":\"The ERC20/721/1155 item transfers to perform.\"},\"returns\":{\"magicValue\":\"A magic value indicating that the item transfers were performed successfully.\"}},\"updateChannel(address,bool)\":{\"params\":{\"channel\":\"The channel to open or close.\",\"isOpen\":\"The status of the channel (either open or closed).\"}}},\"title\":\"Conduit\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"constructor\":{\"notice\":\"In the constructor, set the deployer as the controller.\"},\"execute((uint8,address,address,address,uint256,uint256)[])\":{\"notice\":\"Execute a sequence of ERC20/721/1155 transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"executeBatch1155((address,address,address,uint256[],uint256[])[])\":{\"notice\":\"Execute a sequence of batch 1155 item transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"executeWithBatch1155((uint8,address,address,address,uint256,uint256)[],(address,address,address,uint256[],uint256[])[])\":{\"notice\":\"Execute a sequence of transfers, both single ERC20/721/1155 item transfers as well as batch 1155 item transfers. Only a caller with an open channel can call this function. Note that channels are expected to implement reentrancy protection if desired, and that cross-channel reentrancy may be possible if the conduit has multiple open channels at once. Also note that channels are expected to implement checks against transferring any zero-amount items if that constraint is desired.\"},\"updateChannel(address,bool)\":{\"notice\":\"Open or close a given channel. Only callable by the controller.\"}},\"notice\":\"This contract serves as an originator for \\\"proxied\\\" transfers. Each conduit is deployed and controlled by a \\\"conduit controller\\\" that can add and remove \\\"channels\\\" or contracts that can instruct the conduit to transfer approved ERC20/721/1155 tokens. *IMPORTANT NOTE: each conduit has an owner that can arbitrarily add or remove channels, and a malicious or negligent owner can add a channel that allows for any approved ERC20/721/1155 tokens to be taken immediately \\u2014 be extremely cautious with what conduits you give token approvals to!*\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"seaport/contracts/conduit/Conduit.sol\":\"Conduit\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"seaport/contracts/conduit/Conduit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { ConduitInterface } from \\\"../interfaces/ConduitInterface.sol\\\";\\n\\nimport { ConduitItemType } from \\\"./lib/ConduitEnums.sol\\\";\\n\\nimport { TokenTransferrer } from \\\"../lib/TokenTransferrer.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"./lib/ConduitStructs.sol\\\";\\n\\nimport \\\"./lib/ConduitConstants.sol\\\";\\n\\n/**\\n * @title Conduit\\n * @author 0age\\n * @notice This contract serves as an originator for \\\"proxied\\\" transfers. Each\\n * conduit is deployed and controlled by a \\\"conduit controller\\\" that can\\n * add and remove \\\"channels\\\" or contracts that can instruct the conduit\\n * to transfer approved ERC20/721/1155 tokens. *IMPORTANT NOTE: each\\n * conduit has an owner that can arbitrarily add or remove channels, and\\n * a malicious or negligent owner can add a channel that allows for any\\n * approved ERC20/721/1155 tokens to be taken immediately \\u2014 be extremely\\n * cautious with what conduits you give token approvals to!*\\n */\\ncontract Conduit is ConduitInterface, TokenTransferrer {\\n // Set deployer as an immutable controller that can update channel statuses.\\n address private immutable _controller;\\n\\n // Track the status of each channel.\\n mapping(address => bool) private _channels;\\n\\n /**\\n * @notice Ensure that the caller is currently registered as an open channel\\n * on the conduit.\\n */\\n modifier onlyOpenChannel() {\\n // Utilize assembly to access channel storage mapping directly.\\n assembly {\\n // Write the caller to scratch space.\\n mstore(ChannelKey_channel_ptr, caller())\\n\\n // Write the storage slot for _channels to scratch space.\\n mstore(ChannelKey_slot_ptr, _channels.slot)\\n\\n // Derive the position in storage of _channels[msg.sender]\\n // and check if the stored value is zero.\\n if iszero(\\n sload(keccak256(ChannelKey_channel_ptr, ChannelKey_length))\\n ) {\\n // The caller is not an open channel; revert with\\n // ChannelClosed(caller). First, set error signature in memory.\\n mstore(ChannelClosed_error_ptr, ChannelClosed_error_signature)\\n\\n // Next, set the caller as the argument.\\n mstore(ChannelClosed_channel_ptr, caller())\\n\\n // Finally, revert, returning full custom error with argument.\\n revert(ChannelClosed_error_ptr, ChannelClosed_error_length)\\n }\\n }\\n\\n // Continue with function execution.\\n _;\\n }\\n\\n /**\\n * @notice In the constructor, set the deployer as the controller.\\n */\\n constructor() {\\n // Set the deployer as the controller.\\n _controller = msg.sender;\\n }\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n override\\n onlyOpenChannel\\n returns (bytes4 magicValue)\\n {\\n // Retrieve the total number of transfers and place on the stack.\\n uint256 totalStandardTransfers = transfers.length;\\n\\n // Iterate over each transfer.\\n for (uint256 i = 0; i < totalStandardTransfers; ) {\\n // Retrieve the transfer in question and perform the transfer.\\n _transfer(transfers[i]);\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.execute.selector;\\n }\\n\\n /**\\n * @notice Execute a sequence of batch 1155 item transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param batchTransfers The 1155 batch item transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the item transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) external override onlyOpenChannel returns (bytes4 magicValue) {\\n // Perform 1155 batch transfers. Note that memory should be considered\\n // entirely corrupted from this point forward.\\n _performERC1155BatchTransfers(batchTransfers);\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.executeBatch1155.selector;\\n }\\n\\n /**\\n * @notice Execute a sequence of transfers, both single ERC20/721/1155 item\\n * transfers as well as batch 1155 item transfers. Only a caller\\n * with an open channel can call this function. Note that channels\\n * are expected to implement reentrancy protection if desired, and\\n * that cross-channel reentrancy may be possible if the conduit has\\n * multiple open channels at once. Also note that channels are\\n * expected to implement checks against transferring any zero-amount\\n * items if that constraint is desired.\\n *\\n * @param standardTransfers The ERC20/721/1155 item transfers to perform.\\n * @param batchTransfers The 1155 batch item transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the item transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) external override onlyOpenChannel returns (bytes4 magicValue) {\\n // Retrieve the total number of transfers and place on the stack.\\n uint256 totalStandardTransfers = standardTransfers.length;\\n\\n // Iterate over each standard transfer.\\n for (uint256 i = 0; i < totalStandardTransfers; ) {\\n // Retrieve the transfer in question and perform the transfer.\\n _transfer(standardTransfers[i]);\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Perform 1155 batch transfers. Note that memory should be considered\\n // entirely corrupted from this point forward aside from the free memory\\n // pointer having the default value.\\n _performERC1155BatchTransfers(batchTransfers);\\n\\n // Return a magic value indicating that the transfers were performed.\\n magicValue = this.executeWithBatch1155.selector;\\n }\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external override {\\n // Ensure that the caller is the controller of this contract.\\n if (msg.sender != _controller) {\\n revert InvalidController();\\n }\\n\\n // Ensure that the channel does not already have the indicated status.\\n if (_channels[channel] == isOpen) {\\n revert ChannelStatusAlreadySet(channel, isOpen);\\n }\\n\\n // Update the status of the channel.\\n _channels[channel] = isOpen;\\n\\n // Emit a corresponding event.\\n emit ChannelUpdated(channel, isOpen);\\n }\\n\\n /**\\n * @dev Internal function to transfer a given ERC20/721/1155 item. Note that\\n * channels are expected to implement checks against transferring any\\n * zero-amount items if that constraint is desired.\\n *\\n * @param item The ERC20/721/1155 item to transfer.\\n */\\n function _transfer(ConduitTransfer calldata item) internal {\\n // Determine the transfer method based on the respective item type.\\n if (item.itemType == ConduitItemType.ERC20) {\\n // Transfer ERC20 token. Note that item.identifier is ignored and\\n // therefore ERC20 transfer items are potentially malleable \\u2014 this\\n // check should be performed by the calling channel if a constraint\\n // on item malleability is desired.\\n _performERC20Transfer(item.token, item.from, item.to, item.amount);\\n } else if (item.itemType == ConduitItemType.ERC721) {\\n // Ensure that exactly one 721 item is being transferred.\\n if (item.amount != 1) {\\n revert InvalidERC721TransferAmount();\\n }\\n\\n // Transfer ERC721 token.\\n _performERC721Transfer(\\n item.token,\\n item.from,\\n item.to,\\n item.identifier\\n );\\n } else if (item.itemType == ConduitItemType.ERC1155) {\\n // Transfer ERC1155 token.\\n _performERC1155Transfer(\\n item.token,\\n item.from,\\n item.to,\\n item.identifier,\\n item.amount\\n );\\n } else {\\n // Throw with an error.\\n revert InvalidItemType();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x17e293f09a6325b6e472dde037673607156fc74cb39dccc307f0e61f4272150c\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// error ChannelClosed(address channel)\\nuint256 constant ChannelClosed_error_signature = (\\n 0x93daadf200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ChannelClosed_error_ptr = 0x00;\\nuint256 constant ChannelClosed_channel_ptr = 0x4;\\nuint256 constant ChannelClosed_error_length = 0x24;\\n\\n// For the mapping:\\n// mapping(address => bool) channels\\n// The position in storage for a particular account is:\\n// keccak256(abi.encode(account, channels.slot))\\nuint256 constant ChannelKey_channel_ptr = 0x00;\\nuint256 constant ChannelKey_slot_ptr = 0x20;\\nuint256 constant ChannelKey_length = 0x40;\\n\",\"keccak256\":\"0x16760358c7ae3cb1604e2ed4bd45ecb083b7b150ee914bc6d6204aefcb8c8d9e\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitEnums.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nenum ConduitItemType {\\n NATIVE, // unused\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\",\"keccak256\":\"0x1a84850bbff4b820573334c70ee0797462f20fd8c9b86fdebeacc85ecb1963a6\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { ConduitItemType } from \\\"./ConduitEnums.sol\\\";\\n\\nstruct ConduitTransfer {\\n ConduitItemType itemType;\\n address token;\\n address from;\\n address to;\\n uint256 identifier;\\n uint256 amount;\\n}\\n\\nstruct ConduitBatch1155Transfer {\\n address token;\\n address from;\\n address to;\\n uint256[] ids;\\n uint256[] amounts;\\n}\\n\",\"keccak256\":\"0xe3e87c74dd79c59293e49b7236cc7befdc19886bb79af5fe53208b1772fd24f9\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title ConduitInterface\\n * @author 0age\\n * @notice ConduitInterface contains all external function interfaces, events,\\n * and errors for conduit contracts.\\n */\\ninterface ConduitInterface {\\n /**\\n * @dev Revert with an error when attempting to execute transfers using a\\n * caller that does not have an open channel.\\n */\\n error ChannelClosed(address channel);\\n\\n /**\\n * @dev Revert with an error when attempting to update a channel to the\\n * current status of that channel.\\n */\\n error ChannelStatusAlreadySet(address channel, bool isOpen);\\n\\n /**\\n * @dev Revert with an error when attempting to execute a transfer for an\\n * item that does not have an ERC20/721/1155 item type.\\n */\\n error InvalidItemType();\\n\\n /**\\n * @dev Revert with an error when attempting to update the status of a\\n * channel from a caller that is not the conduit controller.\\n */\\n error InvalidController();\\n\\n /**\\n * @dev Emit an event whenever a channel is opened or closed.\\n *\\n * @param channel The channel that has been updated.\\n * @param open A boolean indicating whether the conduit is open or not.\\n */\\n event ChannelUpdated(address indexed channel, bool open);\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of batch 1155 transfers. Only a caller with an\\n * open channel can call this function.\\n *\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of transfers, both single and batch 1155. Only\\n * a caller with an open channel can call this function.\\n *\\n * @param standardTransfers The ERC20/721/1155 transfers to perform.\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external;\\n}\\n\",\"keccak256\":\"0x3f3224e8455ccd73027671e44be8c5a2338c8cd4c0f1dca3fa0f15a44ef14f06\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/TokenTransferrerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title TokenTransferrerErrors\\n */\\ninterface TokenTransferrerErrors {\\n /**\\n * @dev Revert with an error when an ERC721 transfer with amount other than\\n * one is attempted.\\n */\\n error InvalidERC721TransferAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has an amount of zero.\\n */\\n error MissingItemAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has unused parameters. This includes both the token and the\\n * identifier parameters for native transfers as well as the identifier\\n * parameter for ERC20 transfers. Note that the conduit does not\\n * perform this check, leaving it up to the calling channel to enforce\\n * when desired.\\n */\\n error UnusedItemParameters();\\n\\n /**\\n * @dev Revert with an error when an ERC20, ERC721, or ERC1155 token\\n * transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifier The identifier for the attempted transfer.\\n * @param amount The amount for the attempted transfer.\\n */\\n error TokenTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when a batch ERC1155 token transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifiers The identifiers for the attempted transfer.\\n * @param amounts The amounts for the attempted transfer.\\n */\\n error ERC1155BatchTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256[] identifiers,\\n uint256[] amounts\\n );\\n\\n /**\\n * @dev Revert with an error when an ERC20 token transfer returns a falsey\\n * value.\\n *\\n * @param token The token for which the ERC20 transfer was attempted.\\n * @param from The source of the attempted ERC20 transfer.\\n * @param to The recipient of the attempted ERC20 transfer.\\n * @param amount The amount for the attempted ERC20 transfer.\\n */\\n error BadReturnValueFromERC20OnTransfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when an account being called as an assumed\\n * contract does not have code and returns no data.\\n *\\n * @param account The account that should contain code.\\n */\\n error NoContract(address account);\\n\\n /**\\n * @dev Revert with an error when attempting to execute an 1155 batch\\n * transfer using calldata not produced by default ABI encoding or with\\n * different lengths for ids and amounts arrays.\\n */\\n error Invalid1155BatchTransferEncoding();\\n}\\n\",\"keccak256\":\"0x0a89101400c263654f920aad668249ce67eaebd1af7d5582d38456c8384fc962\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport \\\"./TokenTransferrerConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n TokenTransferrerErrors\\n} from \\\"../interfaces/TokenTransferrerErrors.sol\\\";\\n\\nimport { ConduitBatch1155Transfer } from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title TokenTransferrer\\n * @author 0age\\n * @custom:coauthor d1ll0n\\n * @custom:coauthor transmissions11\\n * @notice TokenTransferrer is a library for performing optimized ERC20, ERC721,\\n * ERC1155, and batch ERC1155 transfers, used by both Seaport as well as\\n * by conduits deployed by the ConduitController. Use great caution when\\n * considering these functions for use in other codebases, as there are\\n * significant side effects and edge cases that need to be thoroughly\\n * understood and carefully addressed.\\n */\\ncontract TokenTransferrer is TokenTransferrerErrors {\\n /**\\n * @dev Internal function to transfer ERC20 tokens from a given originator\\n * to a given recipient. Sufficient approvals must be set on the\\n * contract performing the transfer.\\n *\\n * @param token The ERC20 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC20Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC20 token transfer.\\n assembly {\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data into memory, starting with function selector.\\n mstore(ERC20_transferFrom_sig_ptr, ERC20_transferFrom_signature)\\n mstore(ERC20_transferFrom_from_ptr, from)\\n mstore(ERC20_transferFrom_to_ptr, to)\\n mstore(ERC20_transferFrom_amount_ptr, amount)\\n\\n // Make call & copy up to 32 bytes of return data to scratch space.\\n // Scratch space does not need to be cleared ahead of time, as the\\n // subsequent check will ensure that either at least a full word of\\n // return data is received (in which case it will be overwritten) or\\n // that no data is received (in which case scratch space will be\\n // ignored) on a successful call to the given token.\\n let callStatus := call(\\n gas(),\\n token,\\n 0,\\n ERC20_transferFrom_sig_ptr,\\n ERC20_transferFrom_length,\\n 0,\\n OneWord\\n )\\n\\n // Determine whether transfer was successful using status & result.\\n let success := and(\\n // Set success to whether the call reverted, if not check it\\n // either returned exactly 1 (can't just be non-zero data), or\\n // had no return data.\\n or(\\n and(eq(mload(0), 1), gt(returndatasize(), 31)),\\n iszero(returndatasize())\\n ),\\n callStatus\\n )\\n\\n // Handle cases where either the transfer failed or no data was\\n // returned. Group these, as most transfers will succeed with data.\\n // Equivalent to `or(iszero(success), iszero(returndatasize()))`\\n // but after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(success, iszero(iszero(returndatasize())))) {\\n // If the token has no code or the transfer failed: Equivalent\\n // to `or(iszero(success), iszero(extcodesize(token)))` but\\n // after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(iszero(iszero(extcodesize(token))), success)) {\\n // If the transfer failed:\\n if iszero(success) {\\n // If it was due to a revert:\\n if iszero(callStatus) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to\\n // copy returndata while expanding memory where\\n // necessary. Start by computing the word size\\n // of returndata and allocated memory. Round up\\n // to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of\\n // msize() to work around a Yul warning that\\n // prevents accessing msize directly when the IR\\n // pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(\\n returnDataWords,\\n msizeWords\\n ),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to\\n // gas remaining; bubble up the revert data if\\n // enough gas is still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite\\n // existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, specifying memory region with\\n // copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(\\n TokenTransferGenericFailure_error_token_ptr,\\n token\\n )\\n mstore(\\n TokenTransferGenericFailure_error_from_ptr,\\n from\\n )\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, 0)\\n mstore(\\n TokenTransferGenericFailure_error_amount_ptr,\\n amount\\n )\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Otherwise revert with a message about the token\\n // returning false or non-compliant return values.\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_signature\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_token_ptr,\\n token\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_from_ptr,\\n from\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_to_ptr,\\n to\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_amount_ptr,\\n amount\\n )\\n revert(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_length\\n )\\n }\\n\\n // Otherwise, revert with error about token not having code:\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Otherwise, the token just returned no data despite the call\\n // having succeeded; no need to optimize for this as it's not\\n // technically ERC20 compliant.\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer an ERC721 token from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer. Note that this function does\\n * not check whether the receiver can accept the ERC721 token (i.e. it\\n * does not use `safeTransferFrom`).\\n *\\n * @param token The ERC721 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer.\\n */\\n function _performERC721Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier\\n ) internal {\\n // Utilize assembly to perform an optimized ERC721 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data to memory starting with function selector.\\n mstore(ERC721_transferFrom_sig_ptr, ERC721_transferFrom_signature)\\n mstore(ERC721_transferFrom_from_ptr, from)\\n mstore(ERC721_transferFrom_to_ptr, to)\\n mstore(ERC721_transferFrom_id_ptr, identifier)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC721_transferFrom_sig_ptr,\\n ERC721_transferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, 1)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer.\\n *\\n * @param token The ERC1155 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The id to transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC1155Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC1155 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The following memory slots will be used when populating call data\\n // for the transfer; read the values and restore them later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n let slot0x80 := mload(Slot0x80)\\n let slot0xA0 := mload(Slot0xA0)\\n let slot0xC0 := mload(Slot0xC0)\\n\\n // Write call data into memory, beginning with function selector.\\n mstore(\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_signature\\n )\\n mstore(ERC1155_safeTransferFrom_from_ptr, from)\\n mstore(ERC1155_safeTransferFrom_to_ptr, to)\\n mstore(ERC1155_safeTransferFrom_id_ptr, identifier)\\n mstore(ERC1155_safeTransferFrom_amount_ptr, amount)\\n mstore(\\n ERC1155_safeTransferFrom_data_offset_ptr,\\n ERC1155_safeTransferFrom_data_length_offset\\n )\\n mstore(ERC1155_safeTransferFrom_data_length_ptr, 0)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, amount)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n mstore(Slot0x80, slot0x80) // Restore slot 0x80.\\n mstore(Slot0xA0, slot0xA0) // Restore slot 0xA0.\\n mstore(Slot0xC0, slot0xC0) // Restore slot 0xC0.\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer. NOTE: this function is not\\n * memory-safe; it will overwrite existing memory, restore the free\\n * memory pointer to the default value, and overwrite the zero slot.\\n * This function should only be called once memory is no longer\\n * required and when uninitialized arrays are not utilized, and memory\\n * should be considered fully corrupted (aside from the existence of a\\n * default-value free memory pointer) after calling this function.\\n *\\n * @param batchTransfers The group of 1155 batch transfers to perform.\\n */\\n function _performERC1155BatchTransfers(\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) internal {\\n // Utilize assembly to perform optimized batch 1155 transfers.\\n assembly {\\n let len := batchTransfers.length\\n // Pointer to first head in the array, which is offset to the struct\\n // at each index. This gets incremented after each loop to avoid\\n // multiplying by 32 to get the offset for each element.\\n let nextElementHeadPtr := batchTransfers.offset\\n\\n // Pointer to beginning of the head of the array. This is the\\n // reference position each offset references. It's held static to\\n // let each loop calculate the data position for an element.\\n let arrayHeadPtr := nextElementHeadPtr\\n\\n // Write the function selector, which will be reused for each call:\\n // safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\n mstore(\\n ConduitBatch1155Transfer_from_offset,\\n ERC1155_safeBatchTransferFrom_signature\\n )\\n\\n // Iterate over each batch transfer.\\n for {\\n let i := 0\\n } lt(i, len) {\\n i := add(i, 1)\\n } {\\n // Read the offset to the beginning of the element and add\\n // it to pointer to the beginning of the array head to get\\n // the absolute position of the element in calldata.\\n let elementPtr := add(\\n arrayHeadPtr,\\n calldataload(nextElementHeadPtr)\\n )\\n\\n // Retrieve the token from calldata.\\n let token := calldataload(elementPtr)\\n\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Get the total number of supplied ids.\\n let idsLength := calldataload(\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset)\\n )\\n\\n // Determine the expected offset for the amounts array.\\n let expectedAmountsOffset := add(\\n ConduitBatch1155Transfer_amounts_length_baseOffset,\\n mul(idsLength, OneWord)\\n )\\n\\n // Validate struct encoding.\\n let invalidEncoding := iszero(\\n and(\\n // ids.length == amounts.length\\n eq(\\n idsLength,\\n calldataload(add(elementPtr, expectedAmountsOffset))\\n ),\\n and(\\n // ids_offset == 0xa0\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatch1155Transfer_ids_head_offset\\n )\\n ),\\n ConduitBatch1155Transfer_ids_length_offset\\n ),\\n // amounts_offset == 0xc0 + ids.length*32\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatchTransfer_amounts_head_offset\\n )\\n ),\\n expectedAmountsOffset\\n )\\n )\\n )\\n )\\n\\n // Revert with an error if the encoding is not valid.\\n if invalidEncoding {\\n mstore(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_selector\\n )\\n revert(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_length\\n )\\n }\\n\\n // Update the offset position for the next loop\\n nextElementHeadPtr := add(nextElementHeadPtr, OneWord)\\n\\n // Copy the first section of calldata (before dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_from_offset),\\n ConduitBatch1155Transfer_usable_head_size\\n )\\n\\n // Determine size of calldata required for ids and amounts. Note\\n // that the size includes both lengths as well as the data.\\n let idsAndAmountsSize := add(TwoWords, mul(idsLength, TwoWords))\\n\\n // Update the offset for the data array in memory.\\n mstore(\\n BatchTransfer1155Params_data_head_ptr,\\n add(\\n BatchTransfer1155Params_ids_length_offset,\\n idsAndAmountsSize\\n )\\n )\\n\\n // Set the length of the data array in memory to zero.\\n mstore(\\n add(\\n BatchTransfer1155Params_data_length_basePtr,\\n idsAndAmountsSize\\n ),\\n 0\\n )\\n\\n // Determine the total calldata size for the call to transfer.\\n let transferDataSize := add(\\n BatchTransfer1155Params_calldata_baseSize,\\n idsAndAmountsSize\\n )\\n\\n // Copy second section of calldata (including dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ids_length_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset),\\n idsAndAmountsSize\\n )\\n\\n // Perform the call to transfer 1155 tokens.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ConduitBatch1155Transfer_from_offset, // Data portion start.\\n transferDataSize, // Location of the length of callData.\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary.\\n // Start by computing word size of returndata and\\n // allocated memory. Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use transferDataSize in place of msize() to\\n // work around a Yul warning that prevents accessing\\n // msize directly when the IR pipeline is activated.\\n // The free memory pointer is not used here because\\n // this function does almost all memory management\\n // manually and does not update it, and transferDataSize\\n // should be the largest memory value used (unless a\\n // previous batch was larger).\\n let msizeWords := div(transferDataSize, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert with memory region containing returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Set the error signature.\\n mstore(\\n 0,\\n ERC1155BatchTransferGenericFailure_error_signature\\n )\\n\\n // Write the token.\\n mstore(ERC1155BatchTransferGenericFailure_token_ptr, token)\\n\\n // Increase the offset to ids by 32.\\n mstore(\\n BatchTransfer1155Params_ids_head_ptr,\\n ERC1155BatchTransferGenericFailure_ids_offset\\n )\\n\\n // Increase the offset to amounts by 32.\\n mstore(\\n BatchTransfer1155Params_amounts_head_ptr,\\n add(\\n OneWord,\\n mload(BatchTransfer1155Params_amounts_head_ptr)\\n )\\n )\\n\\n // Return modified region. The total size stays the same as\\n // `token` uses the same number of bytes as `data.length`.\\n revert(0, transferDataSize)\\n }\\n }\\n\\n // Reset the free memory pointer to the default value; memory must\\n // be assumed to be dirtied and not reused from this point forward.\\n // Also note that the zero slot is not reset to zero, meaning empty\\n // arrays cannot be safely created or utilized until it is restored.\\n mstore(FreeMemoryPointerSlot, DefaultFreeMemoryPointer)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dd7add814595c3e416dafb8678a33bb037f15fcb0c1f9249472867ec3b5b952\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrerConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/*\\n * -------------------------- Disambiguation & Other Notes ---------------------\\n * - The term \\\"head\\\" is used as it is in the documentation for ABI encoding,\\n * but only in reference to dynamic types, i.e. it always refers to the\\n * offset or pointer to the body of a dynamic type. In calldata, the head\\n * is always an offset (relative to the parent object), while in memory,\\n * the head is always the pointer to the body. More information found here:\\n * https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#argument-encoding\\n * - Note that the length of an array is separate from and precedes the\\n * head of the array.\\n *\\n * - The term \\\"body\\\" is used in place of the term \\\"head\\\" used in the ABI\\n * documentation. It refers to the start of the data for a dynamic type,\\n * e.g. the first word of a struct or the first word of the first element\\n * in an array.\\n *\\n * - The term \\\"pointer\\\" is used to describe the absolute position of a value\\n * and never an offset relative to another value.\\n * - The suffix \\\"_ptr\\\" refers to a memory pointer.\\n * - The suffix \\\"_cdPtr\\\" refers to a calldata pointer.\\n *\\n * - The term \\\"offset\\\" is used to describe the position of a value relative\\n * to some parent value. For example, OrderParameters_conduit_offset is the\\n * offset to the \\\"conduit\\\" value in the OrderParameters struct relative to\\n * the start of the body.\\n * - Note: Offsets are used to derive pointers.\\n *\\n * - Some structs have pointers defined for all of their fields in this file.\\n * Lines which are commented out are fields that are not used in the\\n * codebase but have been left in for readability.\\n */\\n\\nuint256 constant AlmostOneWord = 0x1f;\\nuint256 constant OneWord = 0x20;\\nuint256 constant TwoWords = 0x40;\\nuint256 constant ThreeWords = 0x60;\\n\\nuint256 constant FreeMemoryPointerSlot = 0x40;\\nuint256 constant ZeroSlot = 0x60;\\nuint256 constant DefaultFreeMemoryPointer = 0x80;\\n\\nuint256 constant Slot0x80 = 0x80;\\nuint256 constant Slot0xA0 = 0xa0;\\nuint256 constant Slot0xC0 = 0xc0;\\n\\n// abi.encodeWithSignature(\\\"transferFrom(address,address,uint256)\\\")\\nuint256 constant ERC20_transferFrom_signature = (\\n 0x23b872dd00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC20_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC20_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC20_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC20_transferFrom_amount_ptr = 0x44;\\nuint256 constant ERC20_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\n// \\\"safeTransferFrom(address,address,uint256,uint256,bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeTransferFrom_signature = (\\n 0xf242432a00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155_safeTransferFrom_sig_ptr = 0x0;\\nuint256 constant ERC1155_safeTransferFrom_from_ptr = 0x04;\\nuint256 constant ERC1155_safeTransferFrom_to_ptr = 0x24;\\nuint256 constant ERC1155_safeTransferFrom_id_ptr = 0x44;\\nuint256 constant ERC1155_safeTransferFrom_amount_ptr = 0x64;\\nuint256 constant ERC1155_safeTransferFrom_data_offset_ptr = 0x84;\\nuint256 constant ERC1155_safeTransferFrom_data_length_ptr = 0xa4;\\nuint256 constant ERC1155_safeTransferFrom_length = 0xc4; // 4 + 32 * 6 == 196\\nuint256 constant ERC1155_safeTransferFrom_data_length_offset = 0xa0;\\n\\n// abi.encodeWithSignature(\\n// \\\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeBatchTransferFrom_signature = (\\n 0x2eb2c2d600000000000000000000000000000000000000000000000000000000\\n);\\n\\nbytes4 constant ERC1155_safeBatchTransferFrom_selector = bytes4(\\n bytes32(ERC1155_safeBatchTransferFrom_signature)\\n);\\n\\nuint256 constant ERC721_transferFrom_signature = ERC20_transferFrom_signature;\\nuint256 constant ERC721_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC721_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC721_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC721_transferFrom_id_ptr = 0x44;\\nuint256 constant ERC721_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\\"NoContract(address)\\\")\\nuint256 constant NoContract_error_signature = (\\n 0x5f15d67200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant NoContract_error_sig_ptr = 0x0;\\nuint256 constant NoContract_error_token_ptr = 0x4;\\nuint256 constant NoContract_error_length = 0x24; // 4 + 32 == 36\\n\\n// abi.encodeWithSignature(\\n// \\\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\\\"\\n// )\\nuint256 constant TokenTransferGenericFailure_error_signature = (\\n 0xf486bc8700000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant TokenTransferGenericFailure_error_sig_ptr = 0x0;\\nuint256 constant TokenTransferGenericFailure_error_token_ptr = 0x4;\\nuint256 constant TokenTransferGenericFailure_error_from_ptr = 0x24;\\nuint256 constant TokenTransferGenericFailure_error_to_ptr = 0x44;\\nuint256 constant TokenTransferGenericFailure_error_id_ptr = 0x64;\\nuint256 constant TokenTransferGenericFailure_error_amount_ptr = 0x84;\\n\\n// 4 + 32 * 5 == 164\\nuint256 constant TokenTransferGenericFailure_error_length = 0xa4;\\n\\n// abi.encodeWithSignature(\\n// \\\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\\\"\\n// )\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_signature = (\\n 0x9889192300000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_sig_ptr = 0x0;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_token_ptr = 0x4;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_from_ptr = 0x24;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_to_ptr = 0x44;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_amount_ptr = 0x64;\\n\\n// 4 + 32 * 4 == 132\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_length = 0x84;\\n\\nuint256 constant ExtraGasBuffer = 0x20;\\nuint256 constant CostPerWord = 3;\\nuint256 constant MemoryExpansionCoefficient = 0x200;\\n\\n// Values are offset by 32 bytes in order to write the token to the beginning\\n// in the event of a revert\\nuint256 constant BatchTransfer1155Params_ptr = 0x24;\\nuint256 constant BatchTransfer1155Params_ids_head_ptr = 0x64;\\nuint256 constant BatchTransfer1155Params_amounts_head_ptr = 0x84;\\nuint256 constant BatchTransfer1155Params_data_head_ptr = 0xa4;\\nuint256 constant BatchTransfer1155Params_data_length_basePtr = 0xc4;\\nuint256 constant BatchTransfer1155Params_calldata_baseSize = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_ptr = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_offset = 0xa0;\\nuint256 constant BatchTransfer1155Params_amounts_length_baseOffset = 0xc0;\\nuint256 constant BatchTransfer1155Params_data_length_baseOffset = 0xe0;\\n\\nuint256 constant ConduitBatch1155Transfer_usable_head_size = 0x80;\\n\\nuint256 constant ConduitBatch1155Transfer_from_offset = 0x20;\\nuint256 constant ConduitBatch1155Transfer_ids_head_offset = 0x60;\\nuint256 constant ConduitBatch1155Transfer_amounts_head_offset = 0x80;\\nuint256 constant ConduitBatch1155Transfer_ids_length_offset = 0xa0;\\nuint256 constant ConduitBatch1155Transfer_amounts_length_baseOffset = 0xc0;\\nuint256 constant ConduitBatch1155Transfer_calldata_baseSize = 0xc0;\\n\\n// Note: abbreviated version of above constant to adhere to line length limit.\\nuint256 constant ConduitBatchTransfer_amounts_head_offset = 0x80;\\n\\nuint256 constant Invalid1155BatchTransferEncoding_ptr = 0x00;\\nuint256 constant Invalid1155BatchTransferEncoding_length = 0x04;\\nuint256 constant Invalid1155BatchTransferEncoding_selector = (\\n 0xeba2084c00000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant ERC1155BatchTransferGenericFailure_error_signature = (\\n 0xafc445e200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155BatchTransferGenericFailure_token_ptr = 0x04;\\nuint256 constant ERC1155BatchTransferGenericFailure_ids_offset = 0xc0;\\n\",\"keccak256\":\"0xa27ce8b77d5386e95f9b9b4897f1585b78e016c8d1e4c6531fe3b1963cdba08a\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a080604052346100235733608052610c7690816100298239608051816103c50152f35b600080fdfe60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea2646970667358221220d7a2c9d1ff41dff1a10bd291c12df075544db21959b033bec2f37e6a5968270764736f6c634300080e0033", + "deployedBytecode": "0x60806040526004361015610013575b600080fd5b6000803560e01c9081634ce34aa21461006657508063899e104c1461005d5780638df25d92146100545763c4e8fcb51461004c57600080fd5b61000e610362565b5061000e61027f565b5061000e6101ab565b346101465760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101465760043567ffffffffffffffff8111610142576100b5903690600401610149565b9133815280602052604081205415610116575b8281106100fa576040517f4ce34aa2000000000000000000000000000000000000000000000000000000008152602090f35b8061011061010b6001938686610532565b6105c4565b016100c8565b807f93daadf2000000000000000000000000000000000000000000000000000000006024925233600452fd5b5080fd5b80fd5b9181601f8401121561000e5782359167ffffffffffffffff831161000e5760208085019460c0850201011161000e57565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5767ffffffffffffffff60043581811161000e576101fc903690600401610149565b9160243590811161000e5761021590369060040161017a565b919092600033815280602052604081205415610116575b8181106102685761023d8486610acb565b6040517f899e104c000000000000000000000000000000000000000000000000000000008152602090f35b8061027961010b6001938587610532565b0161022c565b503461000e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043567ffffffffffffffff811161000e576102cf90369060040161017a565b33600052600060205260406000205415610316576102ec91610acb565b60206040517f8df25d92000000000000000000000000000000000000000000000000000000008152f35b7f93daadf2000000000000000000000000000000000000000000000000000000006000523360045260246000fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b503461000e5760407ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261000e5760043561039e81610344565b6024359081151580830361000e5773ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001633036105085761041f6104188473ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b5460ff1690565b1515146104b657816104a6846104767fae63067d43ac07563b7eb8db6595635fc77f1578a2a5ea06ba91b63e2afa37e29573ffffffffffffffffffffffffffffffffffffffff166000526000602052604060002090565b9060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083541691151516179055565b60405193151584521691602090a2005b506040517f924e341e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9190911660048201529015156024820152604490fd5b60046040517f6d5769be000000000000000000000000000000000000000000000000000000008152fd5b91908110156105425760c0020190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6004111561057b57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b35600481101561000e5790565b356105c181610344565b90565b60016105cf826105aa565b6105d881610571565b0361061357806105ed602061061193016105b7565b906105fa604082016105b7565b60a0610608606084016105b7565b92013592610712565b565b600261061e826105aa565b61062781610571565b0361069657600160a08201350361066c5780610648602061061193016105b7565b90610655604082016105b7565b6080610663606084016105b7565b92013592610882565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b60036106a1826105aa565b6106aa81610571565b036106e857806106bf602061061193016105b7565b6106cb604083016105b7565b6106d7606084016105b7565b90608060a085013594013592610990565b60046040517f7932f1fc000000000000000000000000000000000000000000000000000000008152fd5b9092604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d151581161561077c575b505050505050604052606052565b80863b15151661076e579087959691156107bc57602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b156107f657506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d610835575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c908060030291808211610869575b505060205a91011061086057856107fc565b833d81803e3d90fd5b8080600392028380020360091c9203020101868061084e565b9092813b1561096257604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156108db5750505050604052606052565b8593943d61091e575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211610949575b505060205a91011061086057856108e4565b8080600392028380020360091c92030201018680610937565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b15610a9d57604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af115610a0d57505050505060805260a05260c052604052606052565b89949550883d610a50575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c908060030291808211610a84575b505060205a910110610a7b5786610a18565b843d81803e3d90fd5b8080600392028380020360091c92030201018780610a69565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b90816020907f2eb2c2d600000000000000000000000000000000000000000000000000000000825260005b838110610b095750505050506080604052565b8435820194853590813b156109625760a09182880192833560059181831b948b60c08097608094818301868501351490606085013514169201013584141615610c165789019a890160243760061b9360e0850160a452610104850194600086526040019060c437600080858982865af115610b8a5750505050600101610af6565b869394503d610bcb575b507fafc445e20000000000000000000000000000000000000000000000000000000060005260045260645260849081510190526000fd5b84601f3d01821c911c90600381810292808311610bff575b505050835a910110610bf55784610b94565b3d6000803e3d6000fd5b8080028380020360091c9203020101858080610be3565b7feba2084c0000000000000000000000000000000000000000000000000000000060005260046000fdfea2646970667358221220d7a2c9d1ff41dff1a10bd291c12df075544db21959b033bec2f37e6a5968270764736f6c634300080e0033", "devdoc": { "author": "0age", "errors": { @@ -534,7 +534,7 @@ "storageLayout": { "storage": [ { - "astId": 6801, + "astId": 6522, "contract": "seaport/contracts/conduit/Conduit.sol:Conduit", "label": "_channels", "offset": 0, diff --git a/deployments/goerli/Seaport.json b/deployments/goerli/Seaport.json index 7d8e16ea..f4ce00dd 100644 --- a/deployments/goerli/Seaport.json +++ b/deployments/goerli/Seaport.json @@ -2595,7 +2595,7 @@ "type": "function" } ], - "numDeployments": 6, + "numDeployments": 14, "solcInputHash": "ce961eb7631a6ee9b0f07f4cc0f96052", "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"conduitController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"BadContractSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BadFraction\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"BadReturnValueFromERC20OnTransfer\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"}],\"name\":\"BadSignatureV\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConsiderationCriteriaResolverOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"orderIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"considerationIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"shortfallAmount\",\"type\":\"uint256\"}],\"name\":\"ConsiderationNotMet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CriteriaNotEnabledForItem\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"identifiers\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"}],\"name\":\"ERC1155BatchTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"EtherTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InexactFraction\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InsufficientEtherSupplied\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"Invalid1155BatchTransferEncoding\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidBasicOrderParameterEncoding\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"conduit\",\"type\":\"address\"}],\"name\":\"InvalidCallToConduit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidCanceller\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"conduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"conduit\",\"type\":\"address\"}],\"name\":\"InvalidConduit\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidERC721TransferAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidFulfillmentComponentData\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"InvalidMsgValue\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNativeOfferItem\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidProof\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"InvalidRestrictedOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidTime\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MismatchedFulfillmentOfferAndConsiderationComponents\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"enum Side\",\"name\":\"side\",\"type\":\"uint8\"}],\"name\":\"MissingFulfillmentComponentOnAggregation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingItemAmount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MissingOriginalConsiderationItems\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"NoContract\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoReentrantCalls\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NoSpecifiedOrdersAvailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OfferAndConsiderationRequiredOnFulfillment\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OfferCriteriaResolverOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"OrderAlreadyFilled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OrderCriteriaResolverOutOfRange\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"OrderIsCancelled\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"OrderPartiallyFilled\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PartialFillsNotEnabledForOrder\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"identifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"TokenTransferGenericFailure\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnresolvedConsiderationCriteria\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnresolvedOfferCriteria\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnusedItemParameters\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newCounter\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"offerer\",\"type\":\"address\"}],\"name\":\"CounterIncremented\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"offerer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"zone\",\"type\":\"address\"}],\"name\":\"OrderCancelled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"offerer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"zone\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"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\"}],\"indexed\":false,\"internalType\":\"struct SpentItem[]\",\"name\":\"offer\",\"type\":\"tuple[]\"},{\"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\"}],\"indexed\":false,\"internalType\":\"struct ReceivedItem[]\",\"name\":\"consideration\",\"type\":\"tuple[]\"}],\"name\":\"OrderFulfilled\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"offerer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"zone\",\"type\":\"address\"}],\"name\":\"OrderValidated\",\"type\":\"event\"},{\"inputs\":[{\"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\":\"cancel\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"cancelled\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"advancedOrder\",\"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[]\"},{\"internalType\":\"bytes32\",\"name\":\"fulfillerConduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"}],\"name\":\"fulfillAdvancedOrder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"advancedOrders\",\"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\":[{\"internalType\":\"uint256\",\"name\":\"orderIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"itemIndex\",\"type\":\"uint256\"}],\"internalType\":\"struct FulfillmentComponent[][]\",\"name\":\"offerFulfillments\",\"type\":\"tuple[][]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"orderIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"itemIndex\",\"type\":\"uint256\"}],\"internalType\":\"struct FulfillmentComponent[][]\",\"name\":\"considerationFulfillments\",\"type\":\"tuple[][]\"},{\"internalType\":\"bytes32\",\"name\":\"fulfillerConduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"maximumFulfilled\",\"type\":\"uint256\"}],\"name\":\"fulfillAvailableAdvancedOrders\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"availableOrders\",\"type\":\"bool[]\"},{\"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\":[{\"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\":[{\"internalType\":\"uint256\",\"name\":\"orderIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"itemIndex\",\"type\":\"uint256\"}],\"internalType\":\"struct FulfillmentComponent[][]\",\"name\":\"offerFulfillments\",\"type\":\"tuple[][]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"orderIndex\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"itemIndex\",\"type\":\"uint256\"}],\"internalType\":\"struct FulfillmentComponent[][]\",\"name\":\"considerationFulfillments\",\"type\":\"tuple[][]\"},{\"internalType\":\"bytes32\",\"name\":\"fulfillerConduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"maximumFulfilled\",\"type\":\"uint256\"}],\"name\":\"fulfillAvailableOrders\",\"outputs\":[{\"internalType\":\"bool[]\",\"name\":\"availableOrders\",\"type\":\"bool[]\"},{\"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\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"considerationToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"considerationIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"considerationAmount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"offerer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"zone\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"offerToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"offerIdentifier\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"offerAmount\",\"type\":\"uint256\"},{\"internalType\":\"enum BasicOrderType\",\"name\":\"basicOrderType\",\"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\":\"offererConduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"fulfillerConduitKey\",\"type\":\"bytes32\"},{\"internalType\":\"uint256\",\"name\":\"totalOriginalAdditionalRecipients\",\"type\":\"uint256\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"recipient\",\"type\":\"address\"}],\"internalType\":\"struct AdditionalRecipient[]\",\"name\":\"additionalRecipients\",\"type\":\"tuple[]\"},{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"internalType\":\"struct BasicOrderParameters\",\"name\":\"parameters\",\"type\":\"tuple\"}],\"name\":\"fulfillBasicOrder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"order\",\"type\":\"tuple\"},{\"internalType\":\"bytes32\",\"name\":\"fulfillerConduitKey\",\"type\":\"bytes32\"}],\"name\":\"fulfillOrder\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"fulfilled\",\"type\":\"bool\"}],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"offerer\",\"type\":\"address\"}],\"name\":\"getCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"counter\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"order\",\"type\":\"tuple\"}],\"name\":\"getOrderHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"orderHash\",\"type\":\"bytes32\"}],\"name\":\"getOrderStatus\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isValidated\",\"type\":\"bool\"},{\"internalType\":\"bool\",\"name\":\"isCancelled\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"totalFilled\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"totalSize\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementCounter\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"newCounter\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"information\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"bytes32\",\"name\":\"domainSeparator\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"conduitController\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"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\":\"advancedOrders\",\"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\":\"matchAdvancedOrders\",\"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\":[{\"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\":\"matchOrders\",\"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\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"contractName\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"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[]\"}],\"name\":\"validate\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"validated\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"0age (0age.eth)\",\"custom:coauthor\":\"d1ll0n (d1ll0n.eth)transmissions11 (t11s.eth)\",\"custom:contributor\":\"Kartik (slokh.eth)LeFevre (lefevre.eth)Joseph Schiarizzi (CupOJoseph.eth)Aspyn Palatnick (stuckinaboot.eth)James Wenzel (emo.eth)Stephan Min (stephanm.eth)Ryan Ghods (ralxz.eth)hack3r-0m (hack3r-0m.eth)Diego Estevez (antidiego.eth)Chomtana (chomtana.eth)Saw-mon and Natalie (sawmonandnatalie.eth)0xBeans (0xBeans.eth)0x4non (punkdev.eth)Laurence E. Day (norsefire.eth)vectorized.eth (vectorized.eth)karmacoma (karmacoma.eth)horsefacts (horsefacts.eth)UncarvedBlock (uncarvedblock.eth)Zoraiz Mahmood (zorz.eth)William Poulin (wpoulin.eth)Rajiv Patel-O'Connor (rajivpoc.eth)tserg (tserg.eth)cygaar (cygaar.eth)Meta0xNull (meta0xnull.eth)gpersoon (gpersoon.eth)Matt Solomon (msolomon.eth)Weikang Song (weikangs.eth)zer0dot (zer0dot.eth)Mudit Gupta (mudit.eth)leonardoalt (leoalt.eth)cmichel (cmichel.eth)PraneshASP (pranesh.eth)JasperAlexander (jasperalexander.eth)Ellahi (ellahi.eth)zaz (1zaz1.eth)berndartmueller (berndartmueller.eth)dmfxyz (dmfxyz.eth)daltoncoder (dontkillrobots.eth)0xf4ce (0xf4ce.eth)phaze (phaze.eth)hrkrshnn (hrkrshnn.eth)axic (axic.eth)leastwood (leastwood.eth)0xsanson (sanson.eth)blockdev (blockd3v.eth)fiveoutofnine (fiveoutofnine.eth)shuklaayush (shuklaayush.eth)0xPatissierpcaversaccioDavid Eibercsanuragjainsach1r0twojoy0ori_dabushDaniel GelfandokkothejawaFlameHorizonvdrgdmitriiabokeh-ethasutorufosrfart(rfa)Riley Holterhusbig-tech-sux\",\"custom:version\":\"1.1\",\"errors\":{\"BadContractSignature()\":[{\"details\":\"Revert with an error when an EIP-1271 call to an account fails.\"}],\"BadFraction()\":[{\"details\":\"Revert with an error when supplying a fraction with a value of zero for the numerator or denominator, or one where the numerator exceeds the denominator.\"}],\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\":[{\"details\":\"Revert with an error when an ERC20 token transfer returns a falsey value.\",\"params\":{\"amount\":\"The amount for the attempted ERC20 transfer.\",\"from\":\"The source of the attempted ERC20 transfer.\",\"to\":\"The recipient of the attempted ERC20 transfer.\",\"token\":\"The token for which the ERC20 transfer was attempted.\"}}],\"BadSignatureV(uint8)\":[{\"details\":\"Revert with an error when a signature that does not contain a v value of 27 or 28 has been supplied.\",\"params\":{\"v\":\"The invalid v value.\"}}],\"ConsiderationCriteriaResolverOutOfRange()\":[{\"details\":\"Revert with an error when providing a criteria resolver that refers to an order with a consideration item that has not been supplied.\"}],\"ConsiderationNotMet(uint256,uint256,uint256)\":[{\"details\":\"Revert with an error if a consideration amount has not been fully zeroed out after applying all fulfillments.\",\"params\":{\"considerationIndex\":\"The index of the consideration item on the order.\",\"orderIndex\":\"The index of the order with the consideration item with a shortfall.\",\"shortfallAmount\":\"The unfulfilled consideration amount.\"}}],\"CriteriaNotEnabledForItem()\":[{\"details\":\"Revert with an error when providing a criteria resolver that refers to an order with an item that does not expect a criteria to be resolved.\"}],\"ERC1155BatchTransferGenericFailure(address,address,address,uint256[],uint256[])\":[{\"details\":\"Revert with an error when a batch ERC1155 token transfer reverts.\",\"params\":{\"amounts\":\"The amounts for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifiers\":\"The identifiers for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"EtherTransferGenericFailure(address,uint256)\":[{\"details\":\"Revert with an error when an ether transfer reverts.\"}],\"InexactFraction()\":[{\"details\":\"Revert with an error when attempting to apply a fraction as part of a partial fill that does not divide the target amount cleanly.\"}],\"InsufficientEtherSupplied()\":[{\"details\":\"Revert with an error when insufficient ether is supplied as part of msg.value when fulfilling orders.\"}],\"Invalid1155BatchTransferEncoding()\":[{\"details\":\"Revert with an error when attempting to execute an 1155 batch transfer using calldata not produced by default ABI encoding or with different lengths for ids and amounts arrays.\"}],\"InvalidBasicOrderParameterEncoding()\":[{\"details\":\"Revert with an error when attempting to fill a basic order using calldata not produced by default ABI encoding.\"}],\"InvalidCallToConduit(address)\":[{\"details\":\"Revert with an error when a call to a conduit fails with revert data that is too expensive to return.\"}],\"InvalidCanceller()\":[{\"details\":\"Revert with an error when attempting to cancel an order as a caller other than the indicated offerer or zone.\"}],\"InvalidConduit(bytes32,address)\":[{\"details\":\"Revert with an error when attempting to fill an order referencing an invalid conduit (i.e. one that has not been deployed).\"}],\"InvalidERC721TransferAmount()\":[{\"details\":\"Revert with an error when an ERC721 transfer with amount other than one is attempted.\"}],\"InvalidFulfillmentComponentData()\":[{\"details\":\"Revert with an error when an order or item index are out of range or a fulfillment component does not match the type, token, identifier, or conduit preference of the initial consideration item.\"}],\"InvalidMsgValue(uint256)\":[{\"details\":\"Revert with an error when a caller attempts to supply callvalue to a non-payable basic order route or does not supply any callvalue to a payable basic order route.\"}],\"InvalidNativeOfferItem()\":[{\"details\":\"Revert with an error when attempting to fulfill an order with an offer for ETH outside of matching orders.\"}],\"InvalidProof()\":[{\"details\":\"Revert with an error when providing a criteria resolver that contains an invalid proof with respect to the given item and chosen identifier.\"}],\"InvalidRestrictedOrder(bytes32)\":[{\"details\":\"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`.\",\"params\":{\"orderHash\":\"The order hash for the invalid restricted order.\"}}],\"InvalidSignature()\":[{\"details\":\"Revert with an error when a signer cannot be recovered from the supplied signature.\"}],\"InvalidSigner()\":[{\"details\":\"Revert with an error when the signer recovered by the supplied signature does not match the offerer or an allowed EIP-1271 signer as specified by the offerer in the event they are a contract.\"}],\"InvalidTime()\":[{\"details\":\"Revert with an error when attempting to fill an order outside the specified start time and end time.\"}],\"MismatchedFulfillmentOfferAndConsiderationComponents()\":[{\"details\":\"Revert with an error when the initial offer item named by a fulfillment component does not match the type, token, identifier, or conduit preference of the initial consideration item.\"}],\"MissingFulfillmentComponentOnAggregation(uint8)\":[{\"details\":\"Revert with an error when a fulfillment is provided that does not declare at least one component as part of a call to fulfill available orders.\"}],\"MissingItemAmount()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has an amount of zero.\"}],\"MissingOriginalConsiderationItems()\":[{\"details\":\"Revert with an error when an order is supplied for fulfillment with a consideration array that is shorter than the original array.\"}],\"NoContract(address)\":[{\"details\":\"Revert with an error when an account being called as an assumed contract does not have code and returns no data.\",\"params\":{\"account\":\"The account that should contain code.\"}}],\"NoReentrantCalls()\":[{\"details\":\"Revert with an error when a caller attempts to reenter a protected function.\"}],\"NoSpecifiedOrdersAvailable()\":[{\"details\":\"Revert with an error when attempting to fulfill any number of available orders when none are fulfillable.\"}],\"OfferAndConsiderationRequiredOnFulfillment()\":[{\"details\":\"Revert with an error when a fulfillment is provided that does not declare at least one offer component and at least one consideration component.\"}],\"OfferCriteriaResolverOutOfRange()\":[{\"details\":\"Revert with an error when providing a criteria resolver that refers to an order with an offer item that has not been supplied.\"}],\"OrderAlreadyFilled(bytes32)\":[{\"details\":\"Revert with an error when attempting to fill an order that has already been fully filled.\",\"params\":{\"orderHash\":\"The order hash on which a fill was attempted.\"}}],\"OrderCriteriaResolverOutOfRange()\":[{\"details\":\"Revert with an error when providing a criteria resolver that refers to an order that has not been supplied.\"}],\"OrderIsCancelled(bytes32)\":[{\"details\":\"Revert with an error when attempting to fill an order that has been cancelled.\",\"params\":{\"orderHash\":\"The hash of the cancelled order.\"}}],\"OrderPartiallyFilled(bytes32)\":[{\"details\":\"Revert with an error when attempting to fill a basic order that has been partially filled.\",\"params\":{\"orderHash\":\"The hash of the partially used order.\"}}],\"PartialFillsNotEnabledForOrder()\":[{\"details\":\"Revert with an error when a partial fill is attempted on an order that does not specify partial fill support in its order type.\"}],\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\":[{\"details\":\"Revert with an error when an ERC20, ERC721, or ERC1155 token transfer reverts.\",\"params\":{\"amount\":\"The amount for the attempted transfer.\",\"from\":\"The source of the attempted transfer.\",\"identifier\":\"The identifier for the attempted transfer.\",\"to\":\"The recipient of the attempted transfer.\",\"token\":\"The token for which the transfer was attempted.\"}}],\"UnresolvedConsiderationCriteria()\":[{\"details\":\"Revert with an error if a consideration item still has unresolved criteria after applying all criteria resolvers.\"}],\"UnresolvedOfferCriteria()\":[{\"details\":\"Revert with an error if an offer item still has unresolved criteria after applying all criteria resolvers.\"}],\"UnusedItemParameters()\":[{\"details\":\"Revert with an error when attempting to fulfill an order where an item has unused parameters. This includes both the token and the identifier parameters for native transfers as well as the identifier parameter for ERC20 transfers. Note that the conduit does not perform this check, leaving it up to the calling channel to enforce when desired.\"}]},\"kind\":\"dev\",\"methods\":{\"cancel((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256)[])\":{\"params\":{\"orders\":\"The orders to cancel.\"},\"returns\":{\"cancelled\":\"A boolean indicating whether the supplied orders have been successfully cancelled.\"}},\"constructor\":{\"params\":{\"conduitController\":\"A contract that deploys conduits, or proxies that may optionally be used to transfer approved ERC20/721/1155 tokens.\"}},\"fulfillAdvancedOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes),(uint256,uint8,uint256,uint256,bytes32[])[],bytes32,address)\":{\"params\":{\"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 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.\",\"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.\",\"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 (and direct approvals set on Consideration).\",\"recipient\":\"The intended recipient for all received items, with `address(0)` indicating that the caller should receive the items.\"},\"returns\":{\"fulfilled\":\"A boolean indicating whether the order has been successfully fulfilled.\"}},\"fulfillAvailableAdvancedOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes)[],(uint256,uint8,uint256,uint256,bytes32[])[],(uint256,uint256)[][],(uint256,uint256)[][],bytes32,address,uint256)\":{\"params\":{\"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 conduit if indicated by the order) to transfer any relevant tokens on their behalf and that contracts must implement `onERC1155Received` in order 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 an order's partial fill amount to be considered valid.\",\"considerationFulfillments\":\"An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.\",\"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.\",\"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 (and direct approvals set on Consideration).\",\"maximumFulfilled\":\"The maximum number of orders to fulfill.\",\"offerFulfillments\":\"An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.\",\"recipient\":\"The intended recipient for all received items, with `address(0)` indicating that the caller should receive the items.\"},\"returns\":{\"availableOrders\":\"An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.\",\"executions\":\" An array of elements indicating the sequence of transfers performed as part of matching the given orders.\"}},\"fulfillAvailableOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[],(uint256,uint256)[][],(uint256,uint256)[][],bytes32,uint256)\":{\"params\":{\"considerationFulfillments\":\"An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.\",\"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 (and direct approvals set on Consideration).\",\"maximumFulfilled\":\"The maximum number of orders to fulfill.\",\"offerFulfillments\":\"An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.\",\"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.\"},\"returns\":{\"availableOrders\":\"An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.\",\"executions\":\" An array of elements indicating the sequence of transfers performed as part of matching the given orders.\"}},\"fulfillBasicOrder((address,uint256,uint256,address,address,address,uint256,uint256,uint8,uint256,uint256,bytes32,uint256,bytes32,bytes32,uint256,(uint256,address)[],bytes))\":{\"params\":{\"parameters\":\"Additional information on the fulfilled order. Note that the offerer and the fulfiller must first approve this contract (or their chosen conduit if indicated) before any tokens can be transferred. Also note that contract recipients of ERC1155 consideration items must implement `onERC1155Received` in order to receive those items.\"},\"returns\":{\"fulfilled\":\"A boolean indicating whether the order has been successfully fulfilled.\"}},\"fulfillOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes),bytes32)\":{\"params\":{\"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 (and direct approvals set on Consideration).\",\"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.\"},\"returns\":{\"fulfilled\":\"A boolean indicating whether the order has been successfully fulfilled.\"}},\"getCounter(address)\":{\"params\":{\"offerer\":\"The offerer in question.\"},\"returns\":{\"counter\":\"The current counter.\"}},\"getOrderHash((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256))\":{\"params\":{\"order\":\"The components of the order.\"},\"returns\":{\"orderHash\":\"The order hash.\"}},\"getOrderStatus(bytes32)\":{\"params\":{\"orderHash\":\"The order hash in question.\"},\"returns\":{\"isCancelled\":\"A boolean indicating whether the order in question has been cancelled.\",\"isValidated\":\"A boolean indicating whether the order in question has been validated (i.e. previously approved or partially filled).\",\"totalFilled\":\"The total portion of the order that has been filled (i.e. the \\\"numerator\\\").\",\"totalSize\":\" The total size of the order that is either filled or unfilled (i.e. the \\\"denominator\\\").\"}},\"incrementCounter()\":{\"returns\":{\"newCounter\":\"The new counter.\"}},\"information()\":{\"returns\":{\"conduitController\":\"The conduit Controller set for this contract.\",\"domainSeparator\":\" The domain separator for this contract.\",\"version\":\" The contract version.\"}},\"matchAdvancedOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes)[],(uint256,uint8,uint256,uint256,bytes32[])[],((uint256,uint256)[],(uint256,uint256)[])[])\":{\"params\":{\"advancedOrders\":\"The advanced 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` 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.\",\"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.\",\"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.\"},\"returns\":{\"executions\":\"An array of elements indicating the sequence of transfers performed as part of matching the given orders.\"}},\"matchOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[],((uint256,uint256)[],(uint256,uint256)[])[])\":{\"params\":{\"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.\",\"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` in order to receive ERC1155 tokens.\"},\"returns\":{\"executions\":\"An array of elements indicating the sequence of transfers performed as part of matching the given orders.\"}},\"name()\":{\"returns\":{\"contractName\":\"The name of this contract.\"}},\"validate(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[])\":{\"params\":{\"orders\":\"The orders to validate.\"},\"returns\":{\"validated\":\"A boolean indicating whether the supplied orders have been successfully validated.\"}}},\"title\":\"Seaport\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"cancel((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256)[])\":{\"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`.\"},\"constructor\":{\"notice\":\"Derive and set hashes, reference chainId, and associated domain separator during deployment.\"},\"fulfillAdvancedOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes),(uint256,uint8,uint256,uint256,bytes32[])[],bytes32,address)\":{\"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.\"},\"fulfillAvailableAdvancedOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes)[],(uint256,uint8,uint256,uint256,bytes32[])[],(uint256,uint256)[][],(uint256,uint256)[][],bytes32,address,uint256)\":{\"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.\"},\"fulfillAvailableOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[],(uint256,uint256)[][],(uint256,uint256)[][],bytes32,uint256)\":{\"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).\"},\"fulfillBasicOrder((address,uint256,uint256,address,address,address,uint256,uint256,uint8,uint256,uint256,bytes32,uint256,bytes32,bytes32,uint256,(uint256,address)[],bytes))\":{\"notice\":\"Fulfill an order offering an ERC20, ERC721, or ERC1155 item by supplying Ether (or other native tokens), ERC20 tokens, an ERC721 item, or an ERC1155 item as consideration. Six permutations are supported: Native token to ERC721, Native token to ERC1155, ERC20 to ERC721, ERC20 to ERC1155, ERC721 to ERC20, and ERC1155 to ERC20 (with native tokens supplied as msg.value). For an order to be eligible for fulfillment via this method, it must contain a single offer item (though that item may have a greater amount if the item is not an ERC721). An arbitrary number of \\\"additional recipients\\\" may also be supplied which will each receive native tokens or ERC20 items from the fulfiller as consideration. Refer to the documentation for a more comprehensive summary of how to utilize this method and what orders are compatible with it.\"},\"fulfillOrder(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes),bytes32)\":{\"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).\"},\"getCounter(address)\":{\"notice\":\"Retrieve the current counter for a given offerer.\"},\"getOrderHash((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256))\":{\"notice\":\"Retrieve the order hash for a given order.\"},\"getOrderStatus(bytes32)\":{\"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.\"},\"incrementCounter()\":{\"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.\"},\"information()\":{\"notice\":\"Retrieve configuration information for this contract.\"},\"matchAdvancedOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),uint120,uint120,bytes,bytes)[],(uint256,uint8,uint256,uint256,bytes32[])[],((uint256,uint256)[],(uint256,uint256)[])[])\":{\"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.\"},\"matchOrders(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[],((uint256,uint256)[],(uint256,uint256)[])[])\":{\"notice\":\"Match an arbitrary number of orders, each with an arbitrary number of items for offer and consideration along with a 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).\"},\"name()\":{\"notice\":\"Retrieve the name of this contract.\"},\"validate(((address,address,(uint8,address,uint256,uint256,uint256)[],(uint8,address,uint256,uint256,uint256,address)[],uint8,uint256,uint256,bytes32,uint256,bytes32,uint256),bytes)[])\":{\"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.\"}},\"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 or groups of orders. Each order contains an arbitrary number of items that may be spent (the \\\"offer\\\") along with an arbitrary number of items that must be received back by the indicated recipients (the \\\"consideration\\\").\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"seaport/contracts/Seaport.sol\":\"Seaport\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"seaport/contracts/Seaport.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { Consideration } from \\\"./lib/Consideration.sol\\\";\\n\\n/**\\n * @title Seaport\\n * @custom:version 1.1\\n * @author 0age (0age.eth)\\n * @custom:coauthor d1ll0n (d1ll0n.eth)\\n * @custom:coauthor transmissions11 (t11s.eth)\\n * @custom:contributor Kartik (slokh.eth)\\n * @custom:contributor LeFevre (lefevre.eth)\\n * @custom:contributor Joseph Schiarizzi (CupOJoseph.eth)\\n * @custom:contributor Aspyn Palatnick (stuckinaboot.eth)\\n * @custom:contributor James Wenzel (emo.eth)\\n * @custom:contributor Stephan Min (stephanm.eth)\\n * @custom:contributor Ryan Ghods (ralxz.eth)\\n * @custom:contributor hack3r-0m (hack3r-0m.eth)\\n * @custom:contributor Diego Estevez (antidiego.eth)\\n * @custom:contributor Chomtana (chomtana.eth)\\n * @custom:contributor Saw-mon and Natalie (sawmonandnatalie.eth)\\n * @custom:contributor 0xBeans (0xBeans.eth)\\n * @custom:contributor 0x4non (punkdev.eth)\\n * @custom:contributor Laurence E. Day (norsefire.eth)\\n * @custom:contributor vectorized.eth (vectorized.eth)\\n * @custom:contributor karmacoma (karmacoma.eth)\\n * @custom:contributor horsefacts (horsefacts.eth)\\n * @custom:contributor UncarvedBlock (uncarvedblock.eth)\\n * @custom:contributor Zoraiz Mahmood (zorz.eth)\\n * @custom:contributor William Poulin (wpoulin.eth)\\n * @custom:contributor Rajiv Patel-O'Connor (rajivpoc.eth)\\n * @custom:contributor tserg (tserg.eth)\\n * @custom:contributor cygaar (cygaar.eth)\\n * @custom:contributor Meta0xNull (meta0xnull.eth)\\n * @custom:contributor gpersoon (gpersoon.eth)\\n * @custom:contributor Matt Solomon (msolomon.eth)\\n * @custom:contributor Weikang Song (weikangs.eth)\\n * @custom:contributor zer0dot (zer0dot.eth)\\n * @custom:contributor Mudit Gupta (mudit.eth)\\n * @custom:contributor leonardoalt (leoalt.eth)\\n * @custom:contributor cmichel (cmichel.eth)\\n * @custom:contributor PraneshASP (pranesh.eth)\\n * @custom:contributor JasperAlexander (jasperalexander.eth)\\n * @custom:contributor Ellahi (ellahi.eth)\\n * @custom:contributor zaz (1zaz1.eth)\\n * @custom:contributor berndartmueller (berndartmueller.eth)\\n * @custom:contributor dmfxyz (dmfxyz.eth)\\n * @custom:contributor daltoncoder (dontkillrobots.eth)\\n * @custom:contributor 0xf4ce (0xf4ce.eth)\\n * @custom:contributor phaze (phaze.eth)\\n * @custom:contributor hrkrshnn (hrkrshnn.eth)\\n * @custom:contributor axic (axic.eth)\\n * @custom:contributor leastwood (leastwood.eth)\\n * @custom:contributor 0xsanson (sanson.eth)\\n * @custom:contributor blockdev (blockd3v.eth)\\n * @custom:contributor fiveoutofnine (fiveoutofnine.eth)\\n * @custom:contributor shuklaayush (shuklaayush.eth)\\n * @custom:contributor 0xPatissier\\n * @custom:contributor pcaversaccio\\n * @custom:contributor David Eiber\\n * @custom:contributor csanuragjain\\n * @custom:contributor sach1r0\\n * @custom:contributor twojoy0\\n * @custom:contributor ori_dabush\\n * @custom:contributor Daniel Gelfand\\n * @custom:contributor okkothejawa\\n * @custom:contributor FlameHorizon\\n * @custom:contributor vdrg\\n * @custom:contributor dmitriia\\n * @custom:contributor bokeh-eth\\n * @custom:contributor asutorufos\\n * @custom:contributor rfart(rfa)\\n * @custom:contributor Riley Holterhus\\n * @custom:contributor big-tech-sux\\n * @notice Seaport is a generalized ETH/ERC20/ERC721/ERC1155 marketplace. It\\n * minimizes external calls to the greatest extent possible and provides\\n * lightweight methods for common routes as well as more flexible\\n * methods for composing advanced orders or groups of orders. Each order\\n * contains an arbitrary number of items that may be spent (the \\\"offer\\\")\\n * along with an arbitrary number of items that must be received back by\\n * the indicated recipients (the \\\"consideration\\\").\\n */\\ncontract Seaport is Consideration {\\n /**\\n * @notice Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) Consideration(conduitController) {}\\n\\n /**\\n * @dev Internal pure function to retrieve and return the name of this\\n * contract.\\n *\\n * @return The name of this contract.\\n */\\n function _name() internal pure override returns (string memory) {\\n // Return the name of the contract.\\n assembly {\\n mstore(0x20, 0x20)\\n mstore(0x47, 0x07536561706f7274)\\n return(0x20, 0x60)\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to retrieve the name of this contract as a\\n * string that will be used to derive the name hash in the constructor.\\n *\\n * @return The name of this contract as a string.\\n */\\n function _nameString() internal pure override returns (string memory) {\\n // Return the name of the contract.\\n return \\\"Seaport\\\";\\n }\\n}\\n\",\"keccak256\":\"0x79cf9bcdf54cefb9c6deb9bf92ceef898fa9684bbdf7b73bd7bd7ee176baa59c\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitEnums.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nenum ConduitItemType {\\n NATIVE, // unused\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\",\"keccak256\":\"0x1a84850bbff4b820573334c70ee0797462f20fd8c9b86fdebeacc85ecb1963a6\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { ConduitItemType } from \\\"./ConduitEnums.sol\\\";\\n\\nstruct ConduitTransfer {\\n ConduitItemType itemType;\\n address token;\\n address from;\\n address to;\\n uint256 identifier;\\n uint256 amount;\\n}\\n\\nstruct ConduitBatch1155Transfer {\\n address token;\\n address from;\\n address to;\\n uint256[] ids;\\n uint256[] amounts;\\n}\\n\",\"keccak256\":\"0xe3e87c74dd79c59293e49b7236cc7befdc19886bb79af5fe53208b1772fd24f9\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/AmountDerivationErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title AmountDerivationErrors\\n * @author 0age\\n * @notice AmountDerivationErrors contains errors related to amount derivation.\\n */\\ninterface AmountDerivationErrors {\\n /**\\n * @dev Revert with an error when attempting to apply a fraction as part of\\n * a partial fill that does not divide the target amount cleanly.\\n */\\n error InexactFraction();\\n}\\n\",\"keccak256\":\"0xd7296f4958294009bd696a8034ed5b1c6562f753f3767869e83c20a9203e21e0\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitControllerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title ConduitControllerInterface\\n * @author 0age\\n * @notice ConduitControllerInterface contains all external function interfaces,\\n * structs, events, and errors for the conduit controller.\\n */\\ninterface ConduitControllerInterface {\\n /**\\n * @dev Track the conduit key, current owner, new potential owner, and open\\n * channels for each deployed conduit.\\n */\\n struct ConduitProperties {\\n bytes32 key;\\n address owner;\\n address potentialOwner;\\n address[] channels;\\n mapping(address => uint256) channelIndexesPlusOne;\\n }\\n\\n /**\\n * @dev Emit an event whenever a new conduit is created.\\n *\\n * @param conduit The newly created conduit.\\n * @param conduitKey The conduit key used to create the new conduit.\\n */\\n event NewConduit(address conduit, bytes32 conduitKey);\\n\\n /**\\n * @dev Emit an event whenever conduit ownership is transferred.\\n *\\n * @param conduit The conduit for which ownership has been\\n * transferred.\\n * @param previousOwner The previous owner of the conduit.\\n * @param newOwner The new owner of the conduit.\\n */\\n event OwnershipTransferred(\\n address indexed conduit,\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n /**\\n * @dev Emit an event whenever a conduit owner registers a new potential\\n * owner for that conduit.\\n *\\n * @param newPotentialOwner The new potential owner of the conduit.\\n */\\n event PotentialOwnerUpdated(address indexed newPotentialOwner);\\n\\n /**\\n * @dev Revert with an error when attempting to create a new conduit using a\\n * conduit key where the first twenty bytes of the key do not match the\\n * address of the caller.\\n */\\n error InvalidCreator();\\n\\n /**\\n * @dev Revert with an error when attempting to create a new conduit when no\\n * initial owner address is supplied.\\n */\\n error InvalidInitialOwner();\\n\\n /**\\n * @dev Revert with an error when attempting to set a new potential owner\\n * that is already set.\\n */\\n error NewPotentialOwnerAlreadySet(\\n address conduit,\\n address newPotentialOwner\\n );\\n\\n /**\\n * @dev Revert with an error when attempting to cancel ownership transfer\\n * when no new potential owner is currently set.\\n */\\n error NoPotentialOwnerCurrentlySet(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to interact with a conduit that\\n * does not yet exist.\\n */\\n error NoConduit();\\n\\n /**\\n * @dev Revert with an error when attempting to create a conduit that\\n * already exists.\\n */\\n error ConduitAlreadyExists(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to update channels or transfer\\n * ownership of a conduit when the caller is not the owner of the\\n * conduit in question.\\n */\\n error CallerIsNotOwner(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to register a new potential\\n * owner and supplying the null address.\\n */\\n error NewPotentialOwnerIsZeroAddress(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to claim ownership of a conduit\\n * with a caller that is not the current potential owner for the\\n * conduit in question.\\n */\\n error CallerIsNotNewPotentialOwner(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to retrieve a channel using an\\n * index that is out of range.\\n */\\n error ChannelOutOfRange(address conduit);\\n\\n /**\\n * @notice Deploy a new conduit using a supplied conduit key and assigning\\n * an initial owner for the deployed conduit. Note that the first\\n * twenty bytes of the supplied conduit key must match the caller\\n * and that a new conduit cannot be created if one has already been\\n * deployed using the same conduit key.\\n *\\n * @param conduitKey The conduit key used to deploy the conduit. Note that\\n * the first twenty bytes of the conduit key must match\\n * the caller of this contract.\\n * @param initialOwner The initial owner to set for the new conduit.\\n *\\n * @return conduit The address of the newly deployed conduit.\\n */\\n function createConduit(bytes32 conduitKey, address initialOwner)\\n external\\n returns (address conduit);\\n\\n /**\\n * @notice Open or close a channel on a given conduit, thereby allowing the\\n * specified account to execute transfers against that conduit.\\n * Extreme care must be taken when updating channels, as malicious\\n * or vulnerable channels can transfer any ERC20, ERC721 and ERC1155\\n * tokens where the token holder has granted the conduit approval.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to open or close the channel.\\n * @param channel The channel to open or close on the conduit.\\n * @param isOpen A boolean indicating whether to open or close the channel.\\n */\\n function updateChannel(\\n address conduit,\\n address channel,\\n bool isOpen\\n ) external;\\n\\n /**\\n * @notice Initiate conduit ownership transfer by assigning a new potential\\n * owner for the given conduit. Once set, the new potential owner\\n * may call `acceptOwnership` to claim ownership of the conduit.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to initiate ownership transfer.\\n * @param newPotentialOwner The new potential owner of the conduit.\\n */\\n function transferOwnership(address conduit, address newPotentialOwner)\\n external;\\n\\n /**\\n * @notice Clear the currently set potential owner, if any, from a conduit.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to cancel ownership transfer.\\n */\\n function cancelOwnershipTransfer(address conduit) external;\\n\\n /**\\n * @notice Accept ownership of a supplied conduit. Only accounts that the\\n * current owner has set as the new potential owner may call this\\n * function.\\n *\\n * @param conduit The conduit for which to accept ownership.\\n */\\n function acceptOwnership(address conduit) external;\\n\\n /**\\n * @notice Retrieve the current owner of a deployed conduit.\\n *\\n * @param conduit The conduit for which to retrieve the associated owner.\\n *\\n * @return owner The owner of the supplied conduit.\\n */\\n function ownerOf(address conduit) external view returns (address owner);\\n\\n /**\\n * @notice Retrieve the conduit key for a deployed conduit via reverse\\n * lookup.\\n *\\n * @param conduit The conduit for which to retrieve the associated conduit\\n * key.\\n *\\n * @return conduitKey The conduit key used to deploy the supplied conduit.\\n */\\n function getKey(address conduit) external view returns (bytes32 conduitKey);\\n\\n /**\\n * @notice Derive the conduit associated with a given conduit key and\\n * determine whether that conduit exists (i.e. whether it has been\\n * deployed).\\n *\\n * @param conduitKey The conduit key used to derive the conduit.\\n *\\n * @return conduit The derived address of the conduit.\\n * @return exists A boolean indicating whether the derived conduit has been\\n * deployed or not.\\n */\\n function getConduit(bytes32 conduitKey)\\n external\\n view\\n returns (address conduit, bool exists);\\n\\n /**\\n * @notice Retrieve the potential owner, if any, for a given conduit. The\\n * current owner may set a new potential owner via\\n * `transferOwnership` and that owner may then accept ownership of\\n * the conduit in question via `acceptOwnership`.\\n *\\n * @param conduit The conduit for which to retrieve the potential owner.\\n *\\n * @return potentialOwner The potential owner, if any, for the conduit.\\n */\\n function getPotentialOwner(address conduit)\\n external\\n view\\n returns (address potentialOwner);\\n\\n /**\\n * @notice Retrieve the status (either open or closed) of a given channel on\\n * a conduit.\\n *\\n * @param conduit The conduit for which to retrieve the channel status.\\n * @param channel The channel for which to retrieve the status.\\n *\\n * @return isOpen The status of the channel on the given conduit.\\n */\\n function getChannelStatus(address conduit, address channel)\\n external\\n view\\n returns (bool isOpen);\\n\\n /**\\n * @notice Retrieve the total number of open channels for a given conduit.\\n *\\n * @param conduit The conduit for which to retrieve the total channel count.\\n *\\n * @return totalChannels The total number of open channels for the conduit.\\n */\\n function getTotalChannels(address conduit)\\n external\\n view\\n returns (uint256 totalChannels);\\n\\n /**\\n * @notice Retrieve an open channel at a specific index for a given conduit.\\n * Note that the index of a channel can change as a result of other\\n * channels being closed on the conduit.\\n *\\n * @param conduit The conduit for which to retrieve the open channel.\\n * @param channelIndex The index of the channel in question.\\n *\\n * @return channel The open channel, if any, at the specified channel index.\\n */\\n function getChannel(address conduit, uint256 channelIndex)\\n external\\n view\\n returns (address channel);\\n\\n /**\\n * @notice Retrieve all open channels for a given conduit. Note that calling\\n * this function for a conduit with many channels will revert with\\n * an out-of-gas error.\\n *\\n * @param conduit The conduit for which to retrieve open channels.\\n *\\n * @return channels An array of open channels on the given conduit.\\n */\\n function getChannels(address conduit)\\n external\\n view\\n returns (address[] memory channels);\\n\\n /**\\n * @dev Retrieve the conduit creation code and runtime code hashes.\\n */\\n function getConduitCodeHashes()\\n external\\n view\\n returns (bytes32 creationCodeHash, bytes32 runtimeCodeHash);\\n}\\n\",\"keccak256\":\"0xb124e40645efdf5d92b48fd54eaeb0ba1d05fde62bf51e7684c1bc3bf5343388\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title ConduitInterface\\n * @author 0age\\n * @notice ConduitInterface contains all external function interfaces, events,\\n * and errors for conduit contracts.\\n */\\ninterface ConduitInterface {\\n /**\\n * @dev Revert with an error when attempting to execute transfers using a\\n * caller that does not have an open channel.\\n */\\n error ChannelClosed(address channel);\\n\\n /**\\n * @dev Revert with an error when attempting to update a channel to the\\n * current status of that channel.\\n */\\n error ChannelStatusAlreadySet(address channel, bool isOpen);\\n\\n /**\\n * @dev Revert with an error when attempting to execute a transfer for an\\n * item that does not have an ERC20/721/1155 item type.\\n */\\n error InvalidItemType();\\n\\n /**\\n * @dev Revert with an error when attempting to update the status of a\\n * channel from a caller that is not the conduit controller.\\n */\\n error InvalidController();\\n\\n /**\\n * @dev Emit an event whenever a channel is opened or closed.\\n *\\n * @param channel The channel that has been updated.\\n * @param open A boolean indicating whether the conduit is open or not.\\n */\\n event ChannelUpdated(address indexed channel, bool open);\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of batch 1155 transfers. Only a caller with an\\n * open channel can call this function.\\n *\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of transfers, both single and batch 1155. Only\\n * a caller with an open channel can call this function.\\n *\\n * @param standardTransfers The ERC20/721/1155 transfers to perform.\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external;\\n}\\n\",\"keccak256\":\"0x3f3224e8455ccd73027671e44be8c5a2338c8cd4c0f1dca3fa0f15a44ef14f06\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConsiderationEventsAndErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { SpentItem, ReceivedItem } from \\\"../lib/ConsiderationStructs.sol\\\";\\n\\n/**\\n * @title ConsiderationEventsAndErrors\\n * @author 0age\\n * @notice ConsiderationEventsAndErrors contains all events and errors.\\n */\\ninterface ConsiderationEventsAndErrors {\\n /**\\n * @dev Emit an event whenever an order is successfully fulfilled.\\n *\\n * @param orderHash The hash of the fulfilled order.\\n * @param offerer The offerer of the fulfilled order.\\n * @param zone The zone of the fulfilled order.\\n * @param recipient The recipient of each spent item on the fulfilled\\n * order, or the null address if there is no specific\\n * fulfiller (i.e. the order is part of a group of\\n * orders). Defaults to the caller unless explicitly\\n * specified otherwise by the fulfiller.\\n * @param offer The offer items spent as part of the order.\\n * @param consideration The consideration items received as part of the\\n * order along with the recipients of each item.\\n */\\n event OrderFulfilled(\\n bytes32 orderHash,\\n address indexed offerer,\\n address indexed zone,\\n address recipient,\\n SpentItem[] offer,\\n ReceivedItem[] consideration\\n );\\n\\n /**\\n * @dev Emit an event whenever an order is successfully cancelled.\\n *\\n * @param orderHash The hash of the cancelled order.\\n * @param offerer The offerer of the cancelled order.\\n * @param zone The zone of the cancelled order.\\n */\\n event OrderCancelled(\\n bytes32 orderHash,\\n address indexed offerer,\\n address indexed zone\\n );\\n\\n /**\\n * @dev Emit an event whenever an order is explicitly validated. Note that\\n * this event will not be emitted on partial fills even though they do\\n * validate the order as part of partial fulfillment.\\n *\\n * @param orderHash The hash of the validated order.\\n * @param offerer The offerer of the validated order.\\n * @param zone The zone of the validated order.\\n */\\n event OrderValidated(\\n bytes32 orderHash,\\n address indexed offerer,\\n address indexed zone\\n );\\n\\n /**\\n * @dev Emit an event whenever a counter for a given offerer is incremented.\\n *\\n * @param newCounter The new counter for the offerer.\\n * @param offerer The offerer in question.\\n */\\n event CounterIncremented(uint256 newCounter, address indexed offerer);\\n\\n /**\\n * @dev Revert with an error when attempting to fill an order that has\\n * already been fully filled.\\n *\\n * @param orderHash The order hash on which a fill was attempted.\\n */\\n error OrderAlreadyFilled(bytes32 orderHash);\\n\\n /**\\n * @dev Revert with an error when attempting to fill an order outside the\\n * specified start time and end time.\\n */\\n error InvalidTime();\\n\\n /**\\n * @dev Revert with an error when attempting to fill an order referencing an\\n * invalid conduit (i.e. one that has not been deployed).\\n */\\n error InvalidConduit(bytes32 conduitKey, address conduit);\\n\\n /**\\n * @dev Revert with an error when an order is supplied for fulfillment with\\n * a consideration array that is shorter than the original array.\\n */\\n error MissingOriginalConsiderationItems();\\n\\n /**\\n * @dev Revert with an error when a call to a conduit fails with revert data\\n * that is too expensive to return.\\n */\\n error InvalidCallToConduit(address conduit);\\n\\n /**\\n * @dev Revert with an error if a consideration amount has not been fully\\n * zeroed out after applying all fulfillments.\\n *\\n * @param orderIndex The index of the order with the consideration\\n * item with a shortfall.\\n * @param considerationIndex The index of the consideration item on the\\n * order.\\n * @param shortfallAmount The unfulfilled consideration amount.\\n */\\n error ConsiderationNotMet(\\n uint256 orderIndex,\\n uint256 considerationIndex,\\n uint256 shortfallAmount\\n );\\n\\n /**\\n * @dev Revert with an error when insufficient ether is supplied as part of\\n * msg.value when fulfilling orders.\\n */\\n error InsufficientEtherSupplied();\\n\\n /**\\n * @dev Revert with an error when an ether transfer reverts.\\n */\\n error EtherTransferGenericFailure(address account, uint256 amount);\\n\\n /**\\n * @dev Revert with an error when a partial fill is attempted on an order\\n * that does not specify partial fill support in its order type.\\n */\\n error PartialFillsNotEnabledForOrder();\\n\\n /**\\n * @dev Revert with an error when attempting to fill an order that has been\\n * cancelled.\\n *\\n * @param orderHash The hash of the cancelled order.\\n */\\n error OrderIsCancelled(bytes32 orderHash);\\n\\n /**\\n * @dev Revert with an error when attempting to fill a basic order that has\\n * been partially filled.\\n *\\n * @param orderHash The hash of the partially used order.\\n */\\n error OrderPartiallyFilled(bytes32 orderHash);\\n\\n /**\\n * @dev Revert with an error when attempting to cancel an order as a caller\\n * other than the indicated offerer or zone.\\n */\\n error InvalidCanceller();\\n\\n /**\\n * @dev Revert with an error when supplying a fraction with a value of zero\\n * for the numerator or denominator, or one where the numerator exceeds\\n * the denominator.\\n */\\n error BadFraction();\\n\\n /**\\n * @dev Revert with an error when a caller attempts to supply callvalue to a\\n * non-payable basic order route or does not supply any callvalue to a\\n * payable basic order route.\\n */\\n error InvalidMsgValue(uint256 value);\\n\\n /**\\n * @dev Revert with an error when attempting to fill a basic order using\\n * calldata not produced by default ABI encoding.\\n */\\n error InvalidBasicOrderParameterEncoding();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill any number of\\n * available orders when none are fulfillable.\\n */\\n error NoSpecifiedOrdersAvailable();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order with an\\n * offer for ETH outside of matching orders.\\n */\\n error InvalidNativeOfferItem();\\n}\\n\",\"keccak256\":\"0xe31a7bc05a79d64fbbe1a02af1c71d44e95fcdd92b6240d3636622e681b6982b\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConsiderationInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n BasicOrderParameters,\\n OrderComponents,\\n Fulfillment,\\n FulfillmentComponent,\\n Execution,\\n Order,\\n AdvancedOrder,\\n OrderStatus,\\n CriteriaResolver\\n} from \\\"../lib/ConsiderationStructs.sol\\\";\\n\\n/**\\n * @title ConsiderationInterface\\n * @author 0age\\n * @custom:version 1.1\\n * @notice Consideration is a generalized ETH/ERC20/ERC721/ERC1155 marketplace.\\n * It minimizes external calls to the greatest extent possible and\\n * provides lightweight methods for common routes as well as more\\n * flexible methods for composing advanced orders.\\n *\\n * @dev ConsiderationInterface contains all external function interfaces for\\n * Consideration.\\n */\\ninterface ConsiderationInterface {\\n /**\\n * @notice Fulfill an order offering an ERC721 token by supplying Ether (or\\n * the native token for the given chain) as consideration for the\\n * order. An arbitrary number of \\\"additional recipients\\\" may also be\\n * supplied which will each receive native tokens from the fulfiller\\n * as consideration.\\n *\\n * @param parameters Additional information on the fulfilled order. Note\\n * that the offerer must first approve this contract (or\\n * their preferred conduit if indicated by the order) for\\n * their offered ERC721 token to be transferred.\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillBasicOrder(BasicOrderParameters calldata parameters)\\n external\\n payable\\n returns (bool fulfilled);\\n\\n /**\\n * @notice Fulfill an order with an arbitrary number of items for offer and\\n * consideration. Note that this function does not support\\n * criteria-based orders or partial filling of orders (though\\n * filling the remainder of a partially-filled order is supported).\\n *\\n * @param order The order to fulfill. Note that both the\\n * offerer and the fulfiller must first approve\\n * this contract (or the corresponding conduit if\\n * indicated) to transfer any relevant tokens on\\n * their behalf and that contracts must implement\\n * `onERC1155Received` to receive ERC1155 tokens\\n * as consideration.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used, with direct approvals set on\\n * Consideration.\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillOrder(Order calldata order, bytes32 fulfillerConduitKey)\\n external\\n payable\\n returns (bool fulfilled);\\n\\n /**\\n * @notice Fill an order, fully or partially, with an arbitrary number of\\n * items for offer and consideration alongside criteria resolvers\\n * containing specific token identifiers and associated proofs.\\n *\\n * @param advancedOrder The order to fulfill along with the fraction\\n * of the order to attempt to fill. Note that\\n * both the offerer and the fulfiller must first\\n * approve this contract (or their preferred\\n * conduit if indicated by the order) to transfer\\n * any relevant tokens on their behalf and that\\n * contracts must implement `onERC1155Received`\\n * to receive ERC1155 tokens as consideration.\\n * Also note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount with\\n * the supplied fraction for the partial fill to\\n * be considered valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a proof\\n * that the supplied token identifier is\\n * contained in the merkle root held by the item\\n * in question's criteria element. Note that an\\n * empty criteria indicates that any\\n * (transferable) token identifier on the token\\n * in question is valid and that no associated\\n * proof needs to be supplied.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used, with direct approvals set on\\n * Consideration.\\n * @param recipient The intended recipient for all received items,\\n * with `address(0)` indicating that the caller\\n * should receive the items.\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillAdvancedOrder(\\n AdvancedOrder calldata advancedOrder,\\n CriteriaResolver[] calldata criteriaResolvers,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n ) external payable returns (bool fulfilled);\\n\\n /**\\n * @notice Attempt to fill a group of orders, each with an arbitrary number\\n * of items for offer and consideration. Any order that is not\\n * currently active, has already been fully filled, or has been\\n * cancelled will be omitted. Remaining offer and consideration\\n * items will then be aggregated where possible as indicated by the\\n * supplied offer and consideration component arrays and aggregated\\n * items will be transferred to the fulfiller or to each intended\\n * recipient, respectively. Note that a failing item transfer or an\\n * issue with order formatting will cause the entire batch to fail.\\n * Note that this function does not support criteria-based orders or\\n * partial filling of orders (though filling the remainder of a\\n * partially-filled order is supported).\\n *\\n * @param orders The orders to fulfill. Note that both\\n * the offerer and the fulfiller must first\\n * approve this contract (or the\\n * corresponding conduit if indicated) to\\n * transfer any relevant tokens on their\\n * behalf and that contracts must implement\\n * `onERC1155Received` to receive ERC1155\\n * tokens as consideration.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used, with\\n * direct approvals set on this contract.\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function fulfillAvailableOrders(\\n Order[] calldata orders,\\n FulfillmentComponent[][] calldata offerFulfillments,\\n FulfillmentComponent[][] calldata considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n uint256 maximumFulfilled\\n )\\n external\\n payable\\n returns (bool[] memory availableOrders, Execution[] memory executions);\\n\\n /**\\n * @notice Attempt to fill a group of orders, fully or partially, with an\\n * arbitrary number of items for offer and consideration per order\\n * alongside criteria resolvers containing specific token\\n * identifiers and associated proofs. Any order that is not\\n * currently active, has already been fully filled, or has been\\n * cancelled will be omitted. Remaining offer and consideration\\n * items will then be aggregated where possible as indicated by the\\n * supplied offer and consideration component arrays and aggregated\\n * items will be transferred to the fulfiller or to each intended\\n * recipient, respectively. Note that a failing item transfer or an\\n * issue with order formatting will cause the entire batch to fail.\\n *\\n * @param advancedOrders The orders to fulfill along with the\\n * fraction of those orders to attempt to\\n * fill. Note that both the offerer and the\\n * fulfiller must first approve this\\n * contract (or their preferred conduit if\\n * indicated by the order) to transfer any\\n * relevant tokens on their behalf and that\\n * contracts must implement\\n * `onERC1155Received` to enable receipt of\\n * ERC1155 tokens as consideration. Also\\n * note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount\\n * with the supplied fraction for an\\n * order's partial fill amount to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a\\n * proof that the supplied token identifier\\n * is contained in the merkle root held by\\n * the item in question's criteria element.\\n * Note that an empty criteria indicates\\n * that any (transferable) token\\n * identifier on the token in question is\\n * valid and that no associated proof needs\\n * to be supplied.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used, with\\n * direct approvals set on this contract.\\n * @param recipient The intended recipient for all received\\n * items, with `address(0)` indicating that\\n * the caller should receive the items.\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function fulfillAvailableAdvancedOrders(\\n AdvancedOrder[] calldata advancedOrders,\\n CriteriaResolver[] calldata criteriaResolvers,\\n FulfillmentComponent[][] calldata offerFulfillments,\\n FulfillmentComponent[][] calldata considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n address recipient,\\n uint256 maximumFulfilled\\n )\\n external\\n payable\\n returns (bool[] memory availableOrders, Execution[] memory executions);\\n\\n /**\\n * @notice Match an arbitrary number of orders, each with an arbitrary\\n * number of items for offer and consideration along with as set of\\n * fulfillments allocating offer components to consideration\\n * components. Note that this function does not support\\n * criteria-based or partial filling of orders (though filling the\\n * remainder of a partially-filled order is supported).\\n *\\n * @param orders The orders to match. Note that both the offerer and\\n * fulfiller on each order must first approve this\\n * contract (or their conduit if indicated by the order)\\n * to transfer any relevant tokens on their behalf and\\n * each consideration recipient must implement\\n * `onERC1155Received` to enable ERC1155 token receipt.\\n * @param fulfillments An array of elements allocating offer components to\\n * consideration components. Note that each\\n * consideration component must be fully met for the\\n * match operation to be valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function matchOrders(\\n Order[] calldata orders,\\n Fulfillment[] calldata fulfillments\\n ) external payable returns (Execution[] memory executions);\\n\\n /**\\n * @notice Match an arbitrary number of full or partial orders, each with an\\n * arbitrary number of items for offer and consideration, supplying\\n * criteria resolvers containing specific token identifiers and\\n * associated proofs as well as fulfillments allocating offer\\n * components to consideration components.\\n *\\n * @param orders The advanced orders to match. Note that both the\\n * offerer and fulfiller on each order must first\\n * approve this contract (or a preferred conduit if\\n * indicated by the order) to transfer any relevant\\n * tokens on their behalf and each consideration\\n * recipient must implement `onERC1155Received` in\\n * order to receive ERC1155 tokens. Also note that\\n * the offer and consideration components for each\\n * order must have no remainder after multiplying\\n * the respective amount with the supplied fraction\\n * in order for the group of partial fills to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific order as well as that order's\\n * offer or consideration, a token identifier, and\\n * a proof that the supplied token identifier is\\n * contained in the order's merkle root. Note that\\n * an empty root indicates that any (transferable)\\n * token identifier is valid and that no associated\\n * proof needs to be supplied.\\n * @param fulfillments An array of elements allocating offer components\\n * to consideration components. Note that each\\n * consideration component must be fully met in\\n * order for the match operation to be valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function matchAdvancedOrders(\\n AdvancedOrder[] calldata orders,\\n CriteriaResolver[] calldata criteriaResolvers,\\n Fulfillment[] calldata fulfillments\\n ) external payable returns (Execution[] memory executions);\\n\\n /**\\n * @notice Cancel an arbitrary number of orders. Note that only the offerer\\n * or the zone of a given order may cancel it. Callers should ensure\\n * that the intended order was cancelled by calling `getOrderStatus`\\n * and confirming that `isCancelled` returns `true`.\\n *\\n * @param orders The orders to cancel.\\n *\\n * @return cancelled A boolean indicating whether the supplied orders have\\n * been successfully cancelled.\\n */\\n function cancel(OrderComponents[] calldata orders)\\n external\\n returns (bool cancelled);\\n\\n /**\\n * @notice Validate an arbitrary number of orders, thereby registering their\\n * signatures as valid and allowing the fulfiller to skip signature\\n * verification on fulfillment. Note that validated orders may still\\n * be unfulfillable due to invalid item amounts or other factors;\\n * callers should determine whether validated orders are fulfillable\\n * by simulating the fulfillment call prior to execution. Also note\\n * that anyone can validate a signed order, but only the offerer can\\n * validate an order without supplying a signature.\\n *\\n * @param orders The orders to validate.\\n *\\n * @return validated A boolean indicating whether the supplied orders have\\n * been successfully validated.\\n */\\n function validate(Order[] calldata orders)\\n external\\n returns (bool validated);\\n\\n /**\\n * @notice Cancel all orders from a given offerer with a given zone in bulk\\n * by incrementing a counter. Note that only the offerer may\\n * increment the counter.\\n *\\n * @return newCounter The new counter.\\n */\\n function incrementCounter() external returns (uint256 newCounter);\\n\\n /**\\n * @notice Retrieve the order hash for a given order.\\n *\\n * @param order The components of the order.\\n *\\n * @return orderHash The order hash.\\n */\\n function getOrderHash(OrderComponents calldata order)\\n external\\n view\\n returns (bytes32 orderHash);\\n\\n /**\\n * @notice Retrieve the status of a given order by hash, including whether\\n * the order has been cancelled or validated and the fraction of the\\n * order that has been filled.\\n *\\n * @param orderHash The order hash in question.\\n *\\n * @return isValidated A boolean indicating whether the order in question\\n * has been validated (i.e. previously approved or\\n * partially filled).\\n * @return isCancelled A boolean indicating whether the order in question\\n * has been cancelled.\\n * @return totalFilled The total portion of the order that has been filled\\n * (i.e. the \\\"numerator\\\").\\n * @return totalSize The total size of the order that is either filled or\\n * unfilled (i.e. the \\\"denominator\\\").\\n */\\n function getOrderStatus(bytes32 orderHash)\\n external\\n view\\n returns (\\n bool isValidated,\\n bool isCancelled,\\n uint256 totalFilled,\\n uint256 totalSize\\n );\\n\\n /**\\n * @notice Retrieve the current counter for a given offerer.\\n *\\n * @param offerer The offerer in question.\\n *\\n * @return counter The current counter.\\n */\\n function getCounter(address offerer)\\n external\\n view\\n returns (uint256 counter);\\n\\n /**\\n * @notice Retrieve configuration information for this contract.\\n *\\n * @return version The contract version.\\n * @return domainSeparator The domain separator for this contract.\\n * @return conduitController The conduit Controller set for this contract.\\n */\\n function information()\\n external\\n view\\n returns (\\n string memory version,\\n bytes32 domainSeparator,\\n address conduitController\\n );\\n\\n /**\\n * @notice Retrieve the name of this contract.\\n *\\n * @return contractName The name of this contract.\\n */\\n function name() external view returns (string memory contractName);\\n}\\n\",\"keccak256\":\"0x7805c824eb046172bb7fd11a9fc12e9a1b3421771af88665f1baee9bb494c4bf\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/CriteriaResolutionErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title CriteriaResolutionErrors\\n * @author 0age\\n * @notice CriteriaResolutionErrors contains all errors related to criteria\\n * resolution.\\n */\\ninterface CriteriaResolutionErrors {\\n /**\\n * @dev Revert with an error when providing a criteria resolver that refers\\n * to an order that has not been supplied.\\n */\\n error OrderCriteriaResolverOutOfRange();\\n\\n /**\\n * @dev Revert with an error if an offer item still has unresolved criteria\\n * after applying all criteria resolvers.\\n */\\n error UnresolvedOfferCriteria();\\n\\n /**\\n * @dev Revert with an error if a consideration item still has unresolved\\n * criteria after applying all criteria resolvers.\\n */\\n error UnresolvedConsiderationCriteria();\\n\\n /**\\n * @dev Revert with an error when providing a criteria resolver that refers\\n * to an order with an offer item that has not been supplied.\\n */\\n error OfferCriteriaResolverOutOfRange();\\n\\n /**\\n * @dev Revert with an error when providing a criteria resolver that refers\\n * to an order with a consideration item that has not been supplied.\\n */\\n error ConsiderationCriteriaResolverOutOfRange();\\n\\n /**\\n * @dev Revert with an error when providing a criteria resolver that refers\\n * to an order with an item that does not expect a criteria to be\\n * resolved.\\n */\\n error CriteriaNotEnabledForItem();\\n\\n /**\\n * @dev Revert with an error when providing a criteria resolver that\\n * contains an invalid proof with respect to the given item and\\n * chosen identifier.\\n */\\n error InvalidProof();\\n}\\n\",\"keccak256\":\"0x7f94afdbf5a346aee951f7c2b93baa67a5e01980d496604bce70994bee727b13\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/EIP1271Interface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\ninterface EIP1271Interface {\\n function isValidSignature(bytes32 digest, bytes calldata signature)\\n external\\n view\\n returns (bytes4);\\n}\\n\",\"keccak256\":\"0x7b508919429572c3a59b27b8fd9d06c560ec0b7189bc22ad73f8c293d705745f\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/FulfillmentApplicationErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { Side } from \\\"../lib/ConsiderationEnums.sol\\\";\\n\\n/**\\n * @title FulfillmentApplicationErrors\\n * @author 0age\\n * @notice FulfillmentApplicationErrors contains errors related to fulfillment\\n * application and aggregation.\\n */\\ninterface FulfillmentApplicationErrors {\\n /**\\n * @dev Revert with an error when a fulfillment is provided that does not\\n * declare at least one component as part of a call to fulfill\\n * available orders.\\n */\\n error MissingFulfillmentComponentOnAggregation(Side side);\\n\\n /**\\n * @dev Revert with an error when a fulfillment is provided that does not\\n * declare at least one offer component and at least one consideration\\n * component.\\n */\\n error OfferAndConsiderationRequiredOnFulfillment();\\n\\n /**\\n * @dev Revert with an error when the initial offer item named by a\\n * fulfillment component does not match the type, token, identifier,\\n * or conduit preference of the initial consideration item.\\n */\\n error MismatchedFulfillmentOfferAndConsiderationComponents();\\n\\n /**\\n * @dev Revert with an error when an order or item index are out of range\\n * or a fulfillment component does not match the type, token,\\n * identifier, or conduit preference of the initial consideration item.\\n */\\n error InvalidFulfillmentComponentData();\\n}\\n\",\"keccak256\":\"0xa9001846591c94e90ee09ac70f978d7e20fa794fabe83d877019736b22a00754\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ReentrancyErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title ReentrancyErrors\\n * @author 0age\\n * @notice ReentrancyErrors contains errors related to reentrancy.\\n */\\ninterface ReentrancyErrors {\\n /**\\n * @dev Revert with an error when a caller attempts to reenter a protected\\n * function.\\n */\\n error NoReentrantCalls();\\n}\\n\",\"keccak256\":\"0xd8825124dc105b07e1d2c857f219a30092f02f14b56905ae44e503ead6d276c8\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/SignatureVerificationErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title SignatureVerificationErrors\\n * @author 0age\\n * @notice SignatureVerificationErrors contains all errors related to signature\\n * verification.\\n */\\ninterface SignatureVerificationErrors {\\n /**\\n * @dev Revert with an error when a signature that does not contain a v\\n * value of 27 or 28 has been supplied.\\n *\\n * @param v The invalid v value.\\n */\\n error BadSignatureV(uint8 v);\\n\\n /**\\n * @dev Revert with an error when the signer recovered by the supplied\\n * signature does not match the offerer or an allowed EIP-1271 signer\\n * as specified by the offerer in the event they are a contract.\\n */\\n error InvalidSigner();\\n\\n /**\\n * @dev Revert with an error when a signer cannot be recovered from the\\n * supplied signature.\\n */\\n error InvalidSignature();\\n\\n /**\\n * @dev Revert with an error when an EIP-1271 call to an account fails.\\n */\\n error BadContractSignature();\\n}\\n\",\"keccak256\":\"0xd0f5b26469ba6cd303e5ea9b53cf6b7c25cb00918097eb59a263678b51197381\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/TokenTransferrerErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title TokenTransferrerErrors\\n */\\ninterface TokenTransferrerErrors {\\n /**\\n * @dev Revert with an error when an ERC721 transfer with amount other than\\n * one is attempted.\\n */\\n error InvalidERC721TransferAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has an amount of zero.\\n */\\n error MissingItemAmount();\\n\\n /**\\n * @dev Revert with an error when attempting to fulfill an order where an\\n * item has unused parameters. This includes both the token and the\\n * identifier parameters for native transfers as well as the identifier\\n * parameter for ERC20 transfers. Note that the conduit does not\\n * perform this check, leaving it up to the calling channel to enforce\\n * when desired.\\n */\\n error UnusedItemParameters();\\n\\n /**\\n * @dev Revert with an error when an ERC20, ERC721, or ERC1155 token\\n * transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifier The identifier for the attempted transfer.\\n * @param amount The amount for the attempted transfer.\\n */\\n error TokenTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when a batch ERC1155 token transfer reverts.\\n *\\n * @param token The token for which the transfer was attempted.\\n * @param from The source of the attempted transfer.\\n * @param to The recipient of the attempted transfer.\\n * @param identifiers The identifiers for the attempted transfer.\\n * @param amounts The amounts for the attempted transfer.\\n */\\n error ERC1155BatchTransferGenericFailure(\\n address token,\\n address from,\\n address to,\\n uint256[] identifiers,\\n uint256[] amounts\\n );\\n\\n /**\\n * @dev Revert with an error when an ERC20 token transfer returns a falsey\\n * value.\\n *\\n * @param token The token for which the ERC20 transfer was attempted.\\n * @param from The source of the attempted ERC20 transfer.\\n * @param to The recipient of the attempted ERC20 transfer.\\n * @param amount The amount for the attempted ERC20 transfer.\\n */\\n error BadReturnValueFromERC20OnTransfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n );\\n\\n /**\\n * @dev Revert with an error when an account being called as an assumed\\n * contract does not have code and returns no data.\\n *\\n * @param account The account that should contain code.\\n */\\n error NoContract(address account);\\n\\n /**\\n * @dev Revert with an error when attempting to execute an 1155 batch\\n * transfer using calldata not produced by default ABI encoding or with\\n * different lengths for ids and amounts arrays.\\n */\\n error Invalid1155BatchTransferEncoding();\\n}\\n\",\"keccak256\":\"0x0a89101400c263654f920aad668249ce67eaebd1af7d5582d38456c8384fc962\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ZoneInteractionErrors.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title ZoneInteractionErrors\\n * @author 0age\\n * @notice ZoneInteractionErrors contains errors related to zone interaction.\\n */\\ninterface ZoneInteractionErrors {\\n /**\\n * @dev Revert with an error when attempting to fill an order that specifies\\n * a restricted submitter as its order type when not submitted by\\n * either the offerer or the order's zone or approved as valid by the\\n * zone in question via a staticcall to `isValidOrder`.\\n *\\n * @param orderHash The order hash for the invalid restricted order.\\n */\\n error InvalidRestrictedOrder(bytes32 orderHash);\\n}\\n\",\"keccak256\":\"0x966590f8c6e0df523168b933cd73d0c063902f52a0853f4766cbcf977e3164f8\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ZoneInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n AdvancedOrder,\\n CriteriaResolver\\n} from \\\"../lib/ConsiderationStructs.sol\\\";\\n\\ninterface ZoneInterface {\\n // Called by Consideration whenever extraData is not provided by the caller.\\n function isValidOrder(\\n bytes32 orderHash,\\n address caller,\\n address offerer,\\n bytes32 zoneHash\\n ) external view returns (bytes4 validOrderMagicValue);\\n\\n // Called by Consideration whenever any extraData is provided by the caller.\\n function isValidOrderIncludingExtraData(\\n bytes32 orderHash,\\n address caller,\\n AdvancedOrder calldata order,\\n bytes32[] calldata priorOrderHashes,\\n CriteriaResolver[] calldata criteriaResolvers\\n ) external view returns (bytes4 validOrderMagicValue);\\n}\\n\",\"keccak256\":\"0x9a4f2743b4010dd76046163fb2ac0c83a3f1287e703de87bcbef51a707281e32\",\"license\":\"MIT\"},\"seaport/contracts/lib/AmountDeriver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\n// prettier-ignore\\nimport {\\n AmountDerivationErrors\\n} from \\\"../interfaces/AmountDerivationErrors.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title AmountDeriver\\n * @author 0age\\n * @notice AmountDeriver contains view and pure functions related to deriving\\n * item amounts based on partial fill quantity and on linear\\n * interpolation based on current time when the start amount and end\\n * amount differ.\\n */\\ncontract AmountDeriver is AmountDerivationErrors {\\n /**\\n * @dev Internal view function to derive the current amount of a given item\\n * based on the current price, the starting price, and the ending\\n * price. If the start and end prices differ, the current price will be\\n * interpolated on a linear basis. Note that this function expects that\\n * the startTime parameter of orderParameters is not greater than the\\n * current block timestamp and that the endTime parameter is greater\\n * than the current block timestamp. If this condition is not upheld,\\n * duration / elapsed / remaining variables will underflow.\\n *\\n * @param startAmount The starting amount of the item.\\n * @param endAmount The ending amount of the item.\\n * @param startTime The starting time of the order.\\n * @param endTime The end time of the order.\\n * @param roundUp A boolean indicating whether the resultant amount\\n * should be rounded up or down.\\n *\\n * @return amount The current amount.\\n */\\n function _locateCurrentAmount(\\n uint256 startAmount,\\n uint256 endAmount,\\n uint256 startTime,\\n uint256 endTime,\\n bool roundUp\\n ) internal view returns (uint256 amount) {\\n // Only modify end amount if it doesn't already equal start amount.\\n if (startAmount != endAmount) {\\n // Declare variables to derive in the subsequent unchecked scope.\\n uint256 duration;\\n uint256 elapsed;\\n uint256 remaining;\\n\\n // Skip underflow checks as startTime <= block.timestamp < endTime.\\n unchecked {\\n // Derive the duration for the order and place it on the stack.\\n duration = endTime - startTime;\\n\\n // Derive time elapsed since the order started & place on stack.\\n elapsed = block.timestamp - startTime;\\n\\n // Derive time remaining until order expires and place on stack.\\n remaining = duration - elapsed;\\n }\\n\\n // Aggregate new amounts weighted by time with rounding factor.\\n uint256 totalBeforeDivision = ((startAmount * remaining) +\\n (endAmount * elapsed));\\n\\n // Use assembly to combine operations and skip divide-by-zero check.\\n assembly {\\n // Multiply by iszero(iszero(totalBeforeDivision)) to ensure\\n // amount is set to zero if totalBeforeDivision is zero,\\n // as intermediate overflow can occur if it is zero.\\n amount := mul(\\n iszero(iszero(totalBeforeDivision)),\\n // Subtract 1 from the numerator and add 1 to the result if\\n // roundUp is true to get the proper rounding direction.\\n // Division is performed with no zero check as duration\\n // cannot be zero as long as startTime < endTime.\\n add(\\n div(sub(totalBeforeDivision, roundUp), duration),\\n roundUp\\n )\\n )\\n }\\n\\n // Return the current amount.\\n return amount;\\n }\\n\\n // Return the original amount as startAmount == endAmount.\\n return endAmount;\\n }\\n\\n /**\\n * @dev Internal pure function to return a fraction of a given value and to\\n * ensure the resultant value does not have any fractional component.\\n * Note that this function assumes that zero will never be supplied as\\n * the denominator parameter; invalid / undefined behavior will result\\n * should a denominator of zero be provided.\\n *\\n * @param numerator A value indicating the portion of the order that\\n * should be filled.\\n * @param denominator A value indicating the total size of the order. Note\\n * that this value cannot be equal to zero.\\n * @param value The value for which to compute the fraction.\\n *\\n * @return newValue The value after applying the fraction.\\n */\\n function _getFraction(\\n uint256 numerator,\\n uint256 denominator,\\n uint256 value\\n ) internal pure returns (uint256 newValue) {\\n // Return value early in cases where the fraction resolves to 1.\\n if (numerator == denominator) {\\n return value;\\n }\\n\\n // Ensure fraction can be applied to the value with no remainder. Note\\n // that the denominator cannot be zero.\\n assembly {\\n // Ensure new value contains no remainder via mulmod operator.\\n // Credit to @hrkrshnn + @axic for proposing this optimal solution.\\n if mulmod(value, numerator, denominator) {\\n mstore(0, InexactFraction_error_signature)\\n revert(0, InexactFraction_error_len)\\n }\\n }\\n\\n // Multiply the numerator by the value and ensure no overflow occurs.\\n uint256 valueTimesNumerator = value * numerator;\\n\\n // Divide and check for remainder. Note that denominator cannot be zero.\\n assembly {\\n // Perform division without zero check.\\n newValue := div(valueTimesNumerator, denominator)\\n }\\n }\\n\\n /**\\n * @dev Internal view function to apply a fraction to a consideration\\n * or offer item.\\n *\\n * @param startAmount The starting amount of the item.\\n * @param endAmount The ending amount of the item.\\n * @param numerator A value indicating the portion of the order that\\n * should be filled.\\n * @param denominator A value indicating the total size of the order.\\n * @param startTime The starting time of the order.\\n * @param endTime The end time of the order.\\n * @param roundUp A boolean indicating whether the resultant\\n * amount should be rounded up or down.\\n *\\n * @return amount The received item to transfer with the final amount.\\n */\\n function _applyFraction(\\n uint256 startAmount,\\n uint256 endAmount,\\n uint256 numerator,\\n uint256 denominator,\\n uint256 startTime,\\n uint256 endTime,\\n bool roundUp\\n ) internal view returns (uint256 amount) {\\n // If start amount equals end amount, apply fraction to end amount.\\n if (startAmount == endAmount) {\\n // Apply fraction to end amount.\\n amount = _getFraction(numerator, denominator, endAmount);\\n } else {\\n // Otherwise, apply fraction to both and interpolated final amount.\\n amount = _locateCurrentAmount(\\n _getFraction(numerator, denominator, startAmount),\\n _getFraction(numerator, denominator, endAmount),\\n startTime,\\n endTime,\\n roundUp\\n );\\n }\\n }\\n}\\n\",\"keccak256\":\"0x051b07d24d20c452764037213be56c2ed894941067153cfa80fbff1b154c1ebd\",\"license\":\"MIT\"},\"seaport/contracts/lib/Assertions.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { OrderParameters } from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { GettersAndDerivers } from \\\"./GettersAndDerivers.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n TokenTransferrerErrors\\n} from \\\"../interfaces/TokenTransferrerErrors.sol\\\";\\n\\nimport { CounterManager } from \\\"./CounterManager.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title Assertions\\n * @author 0age\\n * @notice Assertions contains logic for making various assertions that do not\\n * fit neatly within a dedicated semantic scope.\\n */\\ncontract Assertions is\\n GettersAndDerivers,\\n CounterManager,\\n TokenTransferrerErrors\\n{\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController)\\n GettersAndDerivers(conduitController)\\n {}\\n\\n /**\\n * @dev Internal view function to ensure that the supplied consideration\\n * array length on a given set of order parameters is not less than the\\n * original consideration array length for that order and to retrieve\\n * the current counter for a given order's offerer and zone and use it\\n * to derive the order hash.\\n *\\n * @param orderParameters The parameters of the order to hash.\\n *\\n * @return The hash.\\n */\\n function _assertConsiderationLengthAndGetOrderHash(\\n OrderParameters memory orderParameters\\n ) internal view returns (bytes32) {\\n // Ensure supplied consideration array length is not less than original.\\n _assertConsiderationLengthIsNotLessThanOriginalConsiderationLength(\\n orderParameters.consideration.length,\\n orderParameters.totalOriginalConsiderationItems\\n );\\n\\n // Derive and return order hash using current counter for the offerer.\\n return\\n _deriveOrderHash(\\n orderParameters,\\n _getCounter(orderParameters.offerer)\\n );\\n }\\n\\n /**\\n * @dev Internal pure function to ensure that the supplied consideration\\n * array length for an order to be fulfilled is not less than the\\n * original consideration array length for that order.\\n *\\n * @param suppliedConsiderationItemTotal The number of consideration items\\n * supplied when fulfilling the order.\\n * @param originalConsiderationItemTotal The number of consideration items\\n * supplied on initial order creation.\\n */\\n function _assertConsiderationLengthIsNotLessThanOriginalConsiderationLength(\\n uint256 suppliedConsiderationItemTotal,\\n uint256 originalConsiderationItemTotal\\n ) internal pure {\\n // Ensure supplied consideration array length is not less than original.\\n if (suppliedConsiderationItemTotal < originalConsiderationItemTotal) {\\n revert MissingOriginalConsiderationItems();\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to ensure that a given item amount is not\\n * zero.\\n *\\n * @param amount The amount to check.\\n */\\n function _assertNonZeroAmount(uint256 amount) internal pure {\\n // Revert if the supplied amount is equal to zero.\\n if (amount == 0) {\\n revert MissingItemAmount();\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to validate calldata offsets for dynamic\\n * types in BasicOrderParameters and other parameters. This ensures\\n * that functions using the calldata object normally will be using the\\n * same data as the assembly functions and that values that are bound\\n * to a given range are within that range. Note that no parameters are\\n * supplied as all basic order functions use the same calldata\\n * encoding.\\n */\\n function _assertValidBasicOrderParameters() internal pure {\\n // Declare a boolean designating basic order parameter offset validity.\\n bool validOffsets;\\n\\n // Utilize assembly in order to read offset data directly from calldata.\\n assembly {\\n /*\\n * Checks:\\n * 1. Order parameters struct offset == 0x20\\n * 2. Additional recipients arr offset == 0x240\\n * 3. Signature offset == 0x260 + (recipients.length * 0x40)\\n * 4. BasicOrderType between 0 and 23 (i.e. < 24)\\n */\\n validOffsets := and(\\n // Order parameters at calldata 0x04 must have offset of 0x20.\\n eq(\\n calldataload(BasicOrder_parameters_cdPtr),\\n BasicOrder_parameters_ptr\\n ),\\n // Additional recipients at cd 0x224 must have offset of 0x240.\\n eq(\\n calldataload(BasicOrder_additionalRecipients_head_cdPtr),\\n BasicOrder_additionalRecipients_head_ptr\\n )\\n )\\n\\n validOffsets := and(\\n validOffsets,\\n eq(\\n // Load signature offset from calldata 0x244.\\n calldataload(BasicOrder_signature_cdPtr),\\n // Derive expected offset as start of recipients + len * 64.\\n add(\\n BasicOrder_signature_ptr,\\n mul(\\n // Additional recipients length at calldata 0x264.\\n calldataload(\\n BasicOrder_additionalRecipients_length_cdPtr\\n ),\\n // Each additional recipient has a length of 0x40.\\n AdditionalRecipients_size\\n )\\n )\\n )\\n )\\n\\n validOffsets := and(\\n validOffsets,\\n lt(\\n // BasicOrderType parameter at calldata offset 0x124.\\n calldataload(BasicOrder_basicOrderType_cdPtr),\\n // Value should be less than 24.\\n BasicOrder_basicOrderType_range\\n )\\n )\\n }\\n\\n // Revert with an error if basic order parameter offsets are invalid.\\n if (!validOffsets) {\\n revert InvalidBasicOrderParameterEncoding();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x64a57bb30f544bc107b7be0a87ea19a7bc16f38957e28f056fce0afbe3c37175\",\"license\":\"MIT\"},\"seaport/contracts/lib/BasicOrderFulfiller.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ConduitInterface } from \\\"../interfaces/ConduitInterface.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OrderType,\\n ItemType,\\n BasicOrderRouteType\\n} from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n AdditionalRecipient,\\n BasicOrderParameters,\\n OfferItem,\\n ConsiderationItem,\\n SpentItem,\\n ReceivedItem\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { OrderValidator } from \\\"./OrderValidator.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title BasicOrderFulfiller\\n * @author 0age\\n * @notice BasicOrderFulfiller contains functionality for fulfilling \\\"basic\\\"\\n * orders with minimal overhead. See documentation for details on what\\n * qualifies as a basic order.\\n */\\ncontract BasicOrderFulfiller is OrderValidator {\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) OrderValidator(conduitController) {}\\n\\n /**\\n * @dev Internal function to fulfill an order offering an ERC20, ERC721, or\\n * ERC1155 item by supplying Ether (or other native tokens), ERC20\\n * tokens, an ERC721 item, or an ERC1155 item as consideration. Six\\n * permutations are supported: Native token to ERC721, Native token to\\n * ERC1155, ERC20 to ERC721, ERC20 to ERC1155, ERC721 to ERC20, and\\n * ERC1155 to ERC20 (with native tokens supplied as msg.value). For an\\n * order to be eligible for fulfillment via this method, it must\\n * contain a single offer item (though that item may have a greater\\n * amount if the item is not an ERC721). An arbitrary number of\\n * \\\"additional recipients\\\" may also be supplied which will each receive\\n * native tokens or ERC20 items from the fulfiller as consideration.\\n * Refer to the documentation for a more comprehensive summary of how\\n * to utilize this method and what orders are compatible with it.\\n *\\n * @param parameters Additional information on the fulfilled order. Note\\n * that the offerer and the fulfiller must first approve\\n * this contract (or their chosen conduit if indicated)\\n * before any tokens can be transferred. Also note that\\n * contract recipients of ERC1155 consideration items must\\n * implement `onERC1155Received` in order to receive those\\n * items.\\n *\\n * @return A boolean indicating whether the order has been fulfilled.\\n */\\n function _validateAndFulfillBasicOrder(\\n BasicOrderParameters calldata parameters\\n ) internal returns (bool) {\\n // Declare enums for order type & route to extract from basicOrderType.\\n BasicOrderRouteType route;\\n OrderType orderType;\\n\\n // Declare additional recipient item type to derive from the route type.\\n ItemType additionalRecipientsItemType;\\n\\n // Utilize assembly to extract the order type and the basic order route.\\n assembly {\\n // Read basicOrderType from calldata.\\n let basicOrderType := calldataload(BasicOrder_basicOrderType_cdPtr)\\n\\n // Mask all but 2 least-significant bits to derive the order type.\\n orderType := and(basicOrderType, 3)\\n\\n // Divide basicOrderType by four to derive the route.\\n route := shr(2, basicOrderType)\\n\\n // If route > 1 additionalRecipient items are ERC20 (1) else Eth (0)\\n additionalRecipientsItemType := gt(route, 1)\\n }\\n\\n {\\n // Declare temporary variable for enforcing payable status.\\n bool correctPayableStatus;\\n\\n // Utilize assembly to compare the route to the callvalue.\\n assembly {\\n // route 0 and 1 are payable, otherwise route is not payable.\\n correctPayableStatus := eq(\\n additionalRecipientsItemType,\\n iszero(callvalue())\\n )\\n }\\n\\n // Revert if msg.value has not been supplied as part of payable\\n // routes or has been supplied as part of non-payable routes.\\n if (!correctPayableStatus) {\\n revert InvalidMsgValue(msg.value);\\n }\\n }\\n\\n // Declare more arguments that will be derived from route and calldata.\\n address additionalRecipientsToken;\\n ItemType offeredItemType;\\n bool offerTypeIsAdditionalRecipientsType;\\n\\n // Declare scope for received item type to manage stack pressure.\\n {\\n ItemType receivedItemType;\\n\\n // Utilize assembly to retrieve function arguments and cast types.\\n assembly {\\n // Check if offered item type == additional recipient item type.\\n offerTypeIsAdditionalRecipientsType := gt(route, 3)\\n\\n // If route > 3 additionalRecipientsToken is at 0xc4 else 0x24.\\n additionalRecipientsToken := calldataload(\\n add(\\n BasicOrder_considerationToken_cdPtr,\\n mul(\\n offerTypeIsAdditionalRecipientsType,\\n BasicOrder_common_params_size\\n )\\n )\\n )\\n\\n // If route > 2, receivedItemType is route - 2. If route is 2,\\n // the receivedItemType is ERC20 (1). Otherwise, it is Eth (0).\\n receivedItemType := add(\\n mul(sub(route, 2), gt(route, 2)),\\n eq(route, 2)\\n )\\n\\n // If route > 3, offeredItemType is ERC20 (1). Route is 2 or 3,\\n // offeredItemType = route. Route is 0 or 1, it is route + 2.\\n offeredItemType := sub(\\n add(route, mul(iszero(additionalRecipientsItemType), 2)),\\n mul(\\n offerTypeIsAdditionalRecipientsType,\\n add(receivedItemType, 1)\\n )\\n )\\n }\\n\\n // Derive & validate order using parameters and update order status.\\n _prepareBasicFulfillmentFromCalldata(\\n parameters,\\n orderType,\\n receivedItemType,\\n additionalRecipientsItemType,\\n additionalRecipientsToken,\\n offeredItemType\\n );\\n }\\n\\n // Declare conduitKey argument used by transfer functions.\\n bytes32 conduitKey;\\n\\n // Utilize assembly to derive conduit (if relevant) based on route.\\n assembly {\\n // use offerer conduit for routes 0-3, fulfiller conduit otherwise.\\n conduitKey := calldataload(\\n add(\\n BasicOrder_offererConduit_cdPtr,\\n mul(offerTypeIsAdditionalRecipientsType, OneWord)\\n )\\n )\\n }\\n\\n // Transfer tokens based on the route.\\n if (additionalRecipientsItemType == ItemType.NATIVE) {\\n // Ensure neither the token nor the identifier parameters are set.\\n if (\\n (uint160(parameters.considerationToken) |\\n parameters.considerationIdentifier) != 0\\n ) {\\n revert UnusedItemParameters();\\n }\\n\\n // Transfer the ERC721 or ERC1155 item, bypassing the accumulator.\\n _transferIndividual721Or1155Item(\\n offeredItemType,\\n parameters.offerToken,\\n parameters.offerer,\\n msg.sender,\\n parameters.offerIdentifier,\\n parameters.offerAmount,\\n conduitKey\\n );\\n\\n // Transfer native to recipients, return excess to caller & wrap up.\\n _transferEthAndFinalize(\\n parameters.considerationAmount,\\n parameters.offerer,\\n parameters.additionalRecipients\\n );\\n } else {\\n // Initialize an accumulator array. From this point forward, no new\\n // memory regions can be safely allocated until the accumulator is\\n // no longer being utilized, as the accumulator operates in an\\n // open-ended fashion from this memory pointer; existing memory may\\n // still be accessed and modified, however.\\n bytes memory accumulator = new bytes(AccumulatorDisarmed);\\n\\n // Choose transfer method for ERC721 or ERC1155 item based on route.\\n if (route == BasicOrderRouteType.ERC20_TO_ERC721) {\\n // Transfer ERC721 to caller using offerer's conduit preference.\\n _transferERC721(\\n parameters.offerToken,\\n parameters.offerer,\\n msg.sender,\\n parameters.offerIdentifier,\\n parameters.offerAmount,\\n conduitKey,\\n accumulator\\n );\\n } else if (route == BasicOrderRouteType.ERC20_TO_ERC1155) {\\n // Transfer ERC1155 to caller with offerer's conduit preference.\\n _transferERC1155(\\n parameters.offerToken,\\n parameters.offerer,\\n msg.sender,\\n parameters.offerIdentifier,\\n parameters.offerAmount,\\n conduitKey,\\n accumulator\\n );\\n } else if (route == BasicOrderRouteType.ERC721_TO_ERC20) {\\n // Transfer ERC721 to offerer using caller's conduit preference.\\n _transferERC721(\\n parameters.considerationToken,\\n msg.sender,\\n parameters.offerer,\\n parameters.considerationIdentifier,\\n parameters.considerationAmount,\\n conduitKey,\\n accumulator\\n );\\n } else {\\n // route == BasicOrderRouteType.ERC1155_TO_ERC20\\n\\n // Transfer ERC1155 to offerer with caller's conduit preference.\\n _transferERC1155(\\n parameters.considerationToken,\\n msg.sender,\\n parameters.offerer,\\n parameters.considerationIdentifier,\\n parameters.considerationAmount,\\n conduitKey,\\n accumulator\\n );\\n }\\n\\n // Transfer ERC20 tokens to all recipients and wrap up.\\n _transferERC20AndFinalize(\\n parameters.offerer,\\n parameters,\\n offerTypeIsAdditionalRecipientsType,\\n accumulator\\n );\\n\\n // Trigger any remaining accumulated transfers via call to conduit.\\n _triggerIfArmed(accumulator);\\n }\\n\\n // Clear the reentrancy guard.\\n _clearReentrancyGuard();\\n\\n return true;\\n }\\n\\n /**\\n * @dev Internal function to prepare fulfillment of a basic order with\\n * manual calldata and memory access. This calculates the order hash,\\n * emits an OrderFulfilled event, and asserts basic order validity.\\n * Note that calldata offsets must be validated as this function\\n * accesses constant calldata pointers for dynamic types that match\\n * default ABI encoding, but valid ABI encoding can use arbitrary\\n * offsets. Checking that the offsets were produced by default encoding\\n * will ensure that other functions using Solidity's calldata accessors\\n * (which calculate pointers from the stored offsets) are reading the\\n * same data as the order hash is derived from. Also note that This\\n * function accesses memory directly. It does not clear the expanded\\n * memory regions used, nor does it update the free memory pointer, so\\n * other direct memory access must not assume that unused memory is\\n * empty.\\n *\\n * @param parameters The parameters of the basic order.\\n * @param orderType The order type.\\n * @param receivedItemType The item type of the initial\\n * consideration item on the order.\\n * @param additionalRecipientsItemType The item type of any additional\\n * consideration item on the order.\\n * @param additionalRecipientsToken The ERC20 token contract address (if\\n * applicable) for any additional\\n * consideration item on the order.\\n * @param offeredItemType The item type of the offered item on\\n * the order.\\n */\\n function _prepareBasicFulfillmentFromCalldata(\\n BasicOrderParameters calldata parameters,\\n OrderType orderType,\\n ItemType receivedItemType,\\n ItemType additionalRecipientsItemType,\\n address additionalRecipientsToken,\\n ItemType offeredItemType\\n ) internal {\\n // Ensure this function cannot be triggered during a reentrant call.\\n _setReentrancyGuard();\\n\\n // Ensure current timestamp falls between order start time and end time.\\n _verifyTime(parameters.startTime, parameters.endTime, true);\\n\\n // Verify that calldata offsets for all dynamic types were produced by\\n // default encoding. This ensures that the constants we use for calldata\\n // pointers to dynamic types are the same as those calculated by\\n // Solidity using their offsets. Also verify that the basic order type\\n // is within range.\\n _assertValidBasicOrderParameters();\\n\\n // Ensure supplied consideration array length is not less than original.\\n _assertConsiderationLengthIsNotLessThanOriginalConsiderationLength(\\n parameters.additionalRecipients.length,\\n parameters.totalOriginalAdditionalRecipients\\n );\\n\\n // Declare stack element for the order hash.\\n bytes32 orderHash;\\n\\n {\\n /**\\n * First, handle consideration items. Memory Layout:\\n * 0x60: final hash of the array of consideration item hashes\\n * 0x80-0x160: reused space for EIP712 hashing of each item\\n * - 0x80: ConsiderationItem EIP-712 typehash (constant)\\n * - 0xa0: itemType\\n * - 0xc0: token\\n * - 0xe0: identifier\\n * - 0x100: startAmount\\n * - 0x120: endAmount\\n * - 0x140: recipient\\n * 0x160-END_ARR: array of consideration item hashes\\n * - 0x160: primary consideration item EIP712 hash\\n * - 0x180-END_ARR: additional recipient item EIP712 hashes\\n * END_ARR: beginning of data for OrderFulfilled event\\n * - END_ARR + 0x120: length of ReceivedItem array\\n * - END_ARR + 0x140: beginning of data for first ReceivedItem\\n * (Note: END_ARR = 0x180 + RECIPIENTS_LENGTH * 0x20)\\n */\\n\\n // Load consideration item typehash from runtime and place on stack.\\n bytes32 typeHash = _CONSIDERATION_ITEM_TYPEHASH;\\n\\n // Utilize assembly to enable reuse of memory regions and use\\n // constant pointers when possible.\\n assembly {\\n /*\\n * 1. Calculate the EIP712 ConsiderationItem hash for the\\n * primary consideration item of the basic order.\\n */\\n\\n // Write ConsiderationItem type hash and item type to memory.\\n mstore(BasicOrder_considerationItem_typeHash_ptr, typeHash)\\n mstore(\\n BasicOrder_considerationItem_itemType_ptr,\\n receivedItemType\\n )\\n\\n // Copy calldata region with (token, identifier, amount) from\\n // BasicOrderParameters to ConsiderationItem. The\\n // considerationAmount is written to startAmount and endAmount\\n // as basic orders do not have dynamic amounts.\\n calldatacopy(\\n BasicOrder_considerationItem_token_ptr,\\n BasicOrder_considerationToken_cdPtr,\\n ThreeWords\\n )\\n\\n // Copy calldata region with considerationAmount and offerer\\n // from BasicOrderParameters to endAmount and recipient in\\n // ConsiderationItem.\\n calldatacopy(\\n BasicOrder_considerationItem_endAmount_ptr,\\n BasicOrder_considerationAmount_cdPtr,\\n TwoWords\\n )\\n\\n // Calculate EIP712 ConsiderationItem hash and store it in the\\n // array of EIP712 consideration hashes.\\n mstore(\\n BasicOrder_considerationHashesArray_ptr,\\n keccak256(\\n BasicOrder_considerationItem_typeHash_ptr,\\n EIP712_ConsiderationItem_size\\n )\\n )\\n\\n /*\\n * 2. Write a ReceivedItem struct for the primary consideration\\n * item to the consideration array in OrderFulfilled.\\n */\\n\\n // Get the length of the additional recipients array.\\n let totalAdditionalRecipients := calldataload(\\n BasicOrder_additionalRecipients_length_cdPtr\\n )\\n\\n // Calculate pointer to length of OrderFulfilled consideration\\n // array.\\n let eventConsiderationArrPtr := add(\\n OrderFulfilled_consideration_length_baseOffset,\\n mul(totalAdditionalRecipients, OneWord)\\n )\\n\\n // Set the length of the consideration array to the number of\\n // additional recipients, plus one for the primary consideration\\n // item.\\n mstore(\\n eventConsiderationArrPtr,\\n add(\\n calldataload(\\n BasicOrder_additionalRecipients_length_cdPtr\\n ),\\n 1\\n )\\n )\\n\\n // Overwrite the consideration array pointer so it points to the\\n // body of the first element\\n eventConsiderationArrPtr := add(\\n eventConsiderationArrPtr,\\n OneWord\\n )\\n\\n // Set itemType at start of the ReceivedItem memory region.\\n mstore(eventConsiderationArrPtr, receivedItemType)\\n\\n // Copy calldata region (token, identifier, amount & recipient)\\n // from BasicOrderParameters to ReceivedItem memory.\\n calldatacopy(\\n add(eventConsiderationArrPtr, Common_token_offset),\\n BasicOrder_considerationToken_cdPtr,\\n FourWords\\n )\\n\\n /*\\n * 3. Calculate EIP712 ConsiderationItem hashes for original\\n * additional recipients and add a ReceivedItem for each to the\\n * consideration array in the OrderFulfilled event. The original\\n * additional recipients are all the considerations signed by\\n * the offerer aside from the primary consideration of the\\n * order. Uses memory region from 0x80-0x160 as a buffer for\\n * calculating EIP712 ConsiderationItem hashes.\\n */\\n\\n // Put pointer to consideration hashes array on the stack.\\n // This will be updated as each additional recipient is hashed\\n let\\n considerationHashesPtr\\n := BasicOrder_considerationHashesArray_ptr\\n\\n // Write item type, token, & identifier for additional recipient\\n // to memory region for hashing EIP712 ConsiderationItem; these\\n // values will be reused for each recipient.\\n mstore(\\n BasicOrder_considerationItem_itemType_ptr,\\n additionalRecipientsItemType\\n )\\n mstore(\\n BasicOrder_considerationItem_token_ptr,\\n additionalRecipientsToken\\n )\\n mstore(BasicOrder_considerationItem_identifier_ptr, 0)\\n\\n // Read length of the additionalRecipients array from calldata\\n // and iterate.\\n totalAdditionalRecipients := calldataload(\\n BasicOrder_totalOriginalAdditionalRecipients_cdPtr\\n )\\n let i := 0\\n // prettier-ignore\\n for {} lt(i, totalAdditionalRecipients) {\\n i := add(i, 1)\\n } {\\n /*\\n * Calculate EIP712 ConsiderationItem hash for recipient.\\n */\\n\\n // Retrieve calldata pointer for additional recipient.\\n let additionalRecipientCdPtr := add(\\n BasicOrder_additionalRecipients_data_cdPtr,\\n mul(AdditionalRecipients_size, i)\\n )\\n\\n // Copy startAmount from calldata to the ConsiderationItem\\n // struct.\\n calldatacopy(\\n BasicOrder_considerationItem_startAmount_ptr,\\n additionalRecipientCdPtr,\\n OneWord\\n )\\n\\n // Copy endAmount and recipient from calldata to the\\n // ConsiderationItem struct.\\n calldatacopy(\\n BasicOrder_considerationItem_endAmount_ptr,\\n additionalRecipientCdPtr,\\n AdditionalRecipients_size\\n )\\n\\n // Add 1 word to the pointer as part of each loop to reduce\\n // operations needed to get local offset into the array.\\n considerationHashesPtr := add(\\n considerationHashesPtr,\\n OneWord\\n )\\n\\n // Calculate EIP712 ConsiderationItem hash and store it in\\n // the array of consideration hashes.\\n mstore(\\n considerationHashesPtr,\\n keccak256(\\n BasicOrder_considerationItem_typeHash_ptr,\\n EIP712_ConsiderationItem_size\\n )\\n )\\n\\n /*\\n * Write ReceivedItem to OrderFulfilled data.\\n */\\n\\n // At this point, eventConsiderationArrPtr points to the\\n // beginning of the ReceivedItem struct of the previous\\n // element in the array. Increase it by the size of the\\n // struct to arrive at the pointer for the current element.\\n eventConsiderationArrPtr := add(\\n eventConsiderationArrPtr,\\n ReceivedItem_size\\n )\\n\\n // Write itemType to the ReceivedItem struct.\\n mstore(\\n eventConsiderationArrPtr,\\n additionalRecipientsItemType\\n )\\n\\n // Write token to the next word of the ReceivedItem struct.\\n mstore(\\n add(eventConsiderationArrPtr, OneWord),\\n additionalRecipientsToken\\n )\\n\\n // Copy endAmount & recipient words to ReceivedItem struct.\\n calldatacopy(\\n add(\\n eventConsiderationArrPtr,\\n ReceivedItem_amount_offset\\n ),\\n additionalRecipientCdPtr,\\n TwoWords\\n )\\n }\\n\\n /*\\n * 4. Hash packed array of ConsiderationItem EIP712 hashes:\\n * `keccak256(abi.encodePacked(receivedItemHashes))`\\n * Note that it is set at 0x60 \\u2014 all other memory begins at\\n * 0x80. 0x60 is the \\\"zero slot\\\" and will be restored at the end\\n * of the assembly section and before required by the compiler.\\n */\\n mstore(\\n receivedItemsHash_ptr,\\n keccak256(\\n BasicOrder_considerationHashesArray_ptr,\\n mul(add(totalAdditionalRecipients, 1), OneWord)\\n )\\n )\\n\\n /*\\n * 5. Add a ReceivedItem for each tip to the consideration array\\n * in the OrderFulfilled event. The tips are all the\\n * consideration items that were not signed by the offerer and\\n * were provided by the fulfiller.\\n */\\n\\n // Overwrite length to length of the additionalRecipients array.\\n totalAdditionalRecipients := calldataload(\\n BasicOrder_additionalRecipients_length_cdPtr\\n )\\n // prettier-ignore\\n for {} lt(i, totalAdditionalRecipients) {\\n i := add(i, 1)\\n } {\\n // Retrieve calldata pointer for additional recipient.\\n let additionalRecipientCdPtr := add(\\n BasicOrder_additionalRecipients_data_cdPtr,\\n mul(AdditionalRecipients_size, i)\\n )\\n\\n // At this point, eventConsiderationArrPtr points to the\\n // beginning of the ReceivedItem struct of the previous\\n // element in the array. Increase it by the size of the\\n // struct to arrive at the pointer for the current element.\\n eventConsiderationArrPtr := add(\\n eventConsiderationArrPtr,\\n ReceivedItem_size\\n )\\n\\n // Write itemType to the ReceivedItem struct.\\n mstore(\\n eventConsiderationArrPtr,\\n additionalRecipientsItemType\\n )\\n\\n // Write token to the next word of the ReceivedItem struct.\\n mstore(\\n add(eventConsiderationArrPtr, OneWord),\\n additionalRecipientsToken\\n )\\n\\n // Copy endAmount & recipient words to ReceivedItem struct.\\n calldatacopy(\\n add(\\n eventConsiderationArrPtr,\\n ReceivedItem_amount_offset\\n ),\\n additionalRecipientCdPtr,\\n TwoWords\\n )\\n }\\n }\\n }\\n\\n {\\n /**\\n * Next, handle offered items. Memory Layout:\\n * EIP712 data for OfferItem\\n * - 0x80: OfferItem EIP-712 typehash (constant)\\n * - 0xa0: itemType\\n * - 0xc0: token\\n * - 0xe0: identifier (reused for offeredItemsHash)\\n * - 0x100: startAmount\\n * - 0x120: endAmount\\n */\\n\\n // Place offer item typehash on the stack.\\n bytes32 typeHash = _OFFER_ITEM_TYPEHASH;\\n\\n // Utilize assembly to enable reuse of memory regions when possible.\\n assembly {\\n /*\\n * 1. Calculate OfferItem EIP712 hash\\n */\\n\\n // Write the OfferItem typeHash to memory.\\n mstore(BasicOrder_offerItem_typeHash_ptr, typeHash)\\n\\n // Write the OfferItem item type to memory.\\n mstore(BasicOrder_offerItem_itemType_ptr, offeredItemType)\\n\\n // Copy calldata region with (offerToken, offerIdentifier,\\n // offerAmount) from OrderParameters to (token, identifier,\\n // startAmount) in OfferItem struct. The offerAmount is written\\n // to startAmount and endAmount as basic orders do not have\\n // dynamic amounts.\\n calldatacopy(\\n BasicOrder_offerItem_token_ptr,\\n BasicOrder_offerToken_cdPtr,\\n ThreeWords\\n )\\n\\n // Copy offerAmount from calldata to endAmount in OfferItem\\n // struct.\\n calldatacopy(\\n BasicOrder_offerItem_endAmount_ptr,\\n BasicOrder_offerAmount_cdPtr,\\n OneWord\\n )\\n\\n // Compute EIP712 OfferItem hash, write result to scratch space:\\n // `keccak256(abi.encode(offeredItem))`\\n mstore(\\n 0,\\n keccak256(\\n BasicOrder_offerItem_typeHash_ptr,\\n EIP712_OfferItem_size\\n )\\n )\\n\\n /*\\n * 2. Calculate hash of array of EIP712 hashes and write the\\n * result to the corresponding OfferItem struct:\\n * `keccak256(abi.encodePacked(offerItemHashes))`\\n */\\n mstore(BasicOrder_order_offerHashes_ptr, keccak256(0, OneWord))\\n\\n /*\\n * 3. Write SpentItem to offer array in OrderFulfilled event.\\n */\\n let eventConsiderationArrPtr := add(\\n OrderFulfilled_offer_length_baseOffset,\\n mul(\\n calldataload(\\n BasicOrder_additionalRecipients_length_cdPtr\\n ),\\n OneWord\\n )\\n )\\n\\n // Set a length of 1 for the offer array.\\n mstore(eventConsiderationArrPtr, 1)\\n\\n // Write itemType to the SpentItem struct.\\n mstore(add(eventConsiderationArrPtr, OneWord), offeredItemType)\\n\\n // Copy calldata region with (offerToken, offerIdentifier,\\n // offerAmount) from OrderParameters to (token, identifier,\\n // amount) in SpentItem struct.\\n calldatacopy(\\n add(eventConsiderationArrPtr, AdditionalRecipients_size),\\n BasicOrder_offerToken_cdPtr,\\n ThreeWords\\n )\\n }\\n }\\n\\n {\\n /**\\n * Once consideration items and offer items have been handled,\\n * derive the final order hash. Memory Layout:\\n * 0x80-0x1c0: EIP712 data for order\\n * - 0x80: Order EIP-712 typehash (constant)\\n * - 0xa0: orderParameters.offerer\\n * - 0xc0: orderParameters.zone\\n * - 0xe0: keccak256(abi.encodePacked(offerHashes))\\n * - 0x100: keccak256(abi.encodePacked(considerationHashes))\\n * - 0x120: orderParameters.basicOrderType (% 4 = orderType)\\n * - 0x140: orderParameters.startTime\\n * - 0x160: orderParameters.endTime\\n * - 0x180: orderParameters.zoneHash\\n * - 0x1a0: orderParameters.salt\\n * - 0x1c0: orderParameters.conduitKey\\n * - 0x1e0: _counters[orderParameters.offerer] (from storage)\\n */\\n\\n // Read the offerer from calldata and place on the stack.\\n address offerer;\\n assembly {\\n offerer := calldataload(BasicOrder_offerer_cdPtr)\\n }\\n\\n // Read offerer's current counter from storage and place on stack.\\n uint256 counter = _getCounter(offerer);\\n\\n // Load order typehash from runtime code and place on stack.\\n bytes32 typeHash = _ORDER_TYPEHASH;\\n\\n assembly {\\n // Set the OrderItem typeHash in memory.\\n mstore(BasicOrder_order_typeHash_ptr, typeHash)\\n\\n // Copy offerer and zone from OrderParameters in calldata to the\\n // Order struct.\\n calldatacopy(\\n BasicOrder_order_offerer_ptr,\\n BasicOrder_offerer_cdPtr,\\n TwoWords\\n )\\n\\n // Copy receivedItemsHash from zero slot to the Order struct.\\n mstore(\\n BasicOrder_order_considerationHashes_ptr,\\n mload(receivedItemsHash_ptr)\\n )\\n\\n // Write the supplied orderType to the Order struct.\\n mstore(BasicOrder_order_orderType_ptr, orderType)\\n\\n // Copy startTime, endTime, zoneHash, salt & conduit from\\n // calldata to the Order struct.\\n calldatacopy(\\n BasicOrder_order_startTime_ptr,\\n BasicOrder_startTime_cdPtr,\\n FiveWords\\n )\\n\\n // Write offerer's counter, retrieved from storage, to struct.\\n mstore(BasicOrder_order_counter_ptr, counter)\\n\\n // Compute the EIP712 Order hash.\\n orderHash := keccak256(\\n BasicOrder_order_typeHash_ptr,\\n EIP712_Order_size\\n )\\n }\\n }\\n\\n assembly {\\n /**\\n * After the order hash has been derived, emit OrderFulfilled event:\\n * event OrderFulfilled(\\n * bytes32 orderHash,\\n * address indexed offerer,\\n * address indexed zone,\\n * address fulfiller,\\n * SpentItem[] offer,\\n * > (itemType, token, id, amount)\\n * ReceivedItem[] consideration\\n * > (itemType, token, id, amount, recipient)\\n * )\\n * topic0 - OrderFulfilled event signature\\n * topic1 - offerer\\n * topic2 - zone\\n * data:\\n * - 0x00: orderHash\\n * - 0x20: fulfiller\\n * - 0x40: offer arr ptr (0x80)\\n * - 0x60: consideration arr ptr (0x120)\\n * - 0x80: offer arr len (1)\\n * - 0xa0: offer.itemType\\n * - 0xc0: offer.token\\n * - 0xe0: offer.identifier\\n * - 0x100: offer.amount\\n * - 0x120: 1 + recipients.length\\n * - 0x140: recipient 0\\n */\\n\\n // Derive pointer to start of OrderFulfilled event data\\n let eventDataPtr := add(\\n OrderFulfilled_baseOffset,\\n mul(\\n calldataload(BasicOrder_additionalRecipients_length_cdPtr),\\n OneWord\\n )\\n )\\n\\n // Write the order hash to the head of the event's data region.\\n mstore(eventDataPtr, orderHash)\\n\\n // Write the fulfiller (i.e. the caller) next for receiver argument.\\n mstore(add(eventDataPtr, OrderFulfilled_fulfiller_offset), caller())\\n\\n // Write the SpentItem and ReceivedItem array offsets (constants).\\n mstore(\\n // SpentItem array offset\\n add(eventDataPtr, OrderFulfilled_offer_head_offset),\\n OrderFulfilled_offer_body_offset\\n )\\n mstore(\\n // ReceivedItem array offset\\n add(eventDataPtr, OrderFulfilled_consideration_head_offset),\\n OrderFulfilled_consideration_body_offset\\n )\\n\\n // Derive total data size including SpentItem and ReceivedItem data.\\n // SpentItem portion is already included in the baseSize constant,\\n // as there can only be one element in the array.\\n let dataSize := add(\\n OrderFulfilled_baseSize,\\n mul(\\n calldataload(BasicOrder_additionalRecipients_length_cdPtr),\\n ReceivedItem_size\\n )\\n )\\n\\n // Emit OrderFulfilled log with three topics (the event signature\\n // as well as the two indexed arguments, the offerer and the zone).\\n log3(\\n // Supply the pointer for event data in memory.\\n eventDataPtr,\\n // Supply the size of event data in memory.\\n dataSize,\\n // Supply the OrderFulfilled event signature.\\n OrderFulfilled_selector,\\n // Supply the first topic (the offerer).\\n calldataload(BasicOrder_offerer_cdPtr),\\n // Supply the second topic (the zone).\\n calldataload(BasicOrder_zone_cdPtr)\\n )\\n\\n // Restore the zero slot.\\n mstore(ZeroSlot, 0)\\n }\\n\\n // Determine whether order is restricted and, if so, that it is valid.\\n _assertRestrictedBasicOrderValidity(\\n orderHash,\\n parameters.zoneHash,\\n orderType,\\n parameters.offerer,\\n parameters.zone\\n );\\n\\n // Verify and update the status of the derived order.\\n _validateBasicOrderAndUpdateStatus(\\n orderHash,\\n parameters.offerer,\\n parameters.signature\\n );\\n }\\n\\n /**\\n * @dev Internal function to transfer Ether (or other native tokens) to a\\n * given recipient as part of basic order fulfillment. Note that\\n * conduits are not utilized for native tokens as the transferred\\n * amount must be provided as msg.value.\\n *\\n * @param amount The amount to transfer.\\n * @param to The recipient of the native token transfer.\\n * @param additionalRecipients The additional recipients of the order.\\n */\\n function _transferEthAndFinalize(\\n uint256 amount,\\n address payable to,\\n AdditionalRecipient[] calldata additionalRecipients\\n ) internal {\\n // Put ether value supplied by the caller on the stack.\\n uint256 etherRemaining = msg.value;\\n\\n // Retrieve total number of additional recipients and place on stack.\\n uint256 totalAdditionalRecipients = additionalRecipients.length;\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n // Iterate over each additional recipient.\\n for (uint256 i = 0; i < totalAdditionalRecipients; ++i) {\\n // Retrieve the additional recipient.\\n AdditionalRecipient calldata additionalRecipient = (\\n additionalRecipients[i]\\n );\\n\\n // Read ether amount to transfer to recipient & place on stack.\\n uint256 additionalRecipientAmount = additionalRecipient.amount;\\n\\n // Ensure that sufficient Ether is available.\\n if (additionalRecipientAmount > etherRemaining) {\\n revert InsufficientEtherSupplied();\\n }\\n\\n // Transfer Ether to the additional recipient.\\n _transferEth(\\n additionalRecipient.recipient,\\n additionalRecipientAmount\\n );\\n\\n // Reduce ether value available. Skip underflow check as\\n // subtracted value is confirmed above as less than remaining.\\n etherRemaining -= additionalRecipientAmount;\\n }\\n }\\n\\n // Ensure that sufficient Ether is still available.\\n if (amount > etherRemaining) {\\n revert InsufficientEtherSupplied();\\n }\\n\\n // Transfer Ether to the offerer.\\n _transferEth(to, amount);\\n\\n // If any Ether remains after transfers, return it to the caller.\\n if (etherRemaining > amount) {\\n // Skip underflow check as etherRemaining > amount.\\n unchecked {\\n // Transfer remaining Ether to the caller.\\n _transferEth(payable(msg.sender), etherRemaining - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC20 tokens to a given recipient as\\n * part of basic order fulfillment.\\n *\\n * @param offerer The offerer of the fulfiller order.\\n * @param parameters The basic order parameters.\\n * @param fromOfferer A boolean indicating whether to decrement amount from\\n * the offered amount.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _transferERC20AndFinalize(\\n address offerer,\\n BasicOrderParameters calldata parameters,\\n bool fromOfferer,\\n bytes memory accumulator\\n ) internal {\\n // Declare from and to variables determined by fromOfferer value.\\n address from;\\n address to;\\n\\n // Declare token and amount variables determined by fromOfferer value.\\n address token;\\n uint256 amount;\\n\\n // Declare and check identifier variable within an isolated scope.\\n {\\n // Declare identifier variable determined by fromOfferer value.\\n uint256 identifier;\\n\\n // Set ERC20 token transfer variables based on fromOfferer boolean.\\n if (fromOfferer) {\\n // Use offerer as from value and msg.sender as to value.\\n from = offerer;\\n to = msg.sender;\\n\\n // Use offer token and related values if token is from offerer.\\n token = parameters.offerToken;\\n identifier = parameters.offerIdentifier;\\n amount = parameters.offerAmount;\\n } else {\\n // Use msg.sender as from value and offerer as to value.\\n from = msg.sender;\\n to = offerer;\\n\\n // Otherwise, use consideration token and related values.\\n token = parameters.considerationToken;\\n identifier = parameters.considerationIdentifier;\\n amount = parameters.considerationAmount;\\n }\\n\\n // Ensure that no identifier is supplied.\\n if (identifier != 0) {\\n revert UnusedItemParameters();\\n }\\n }\\n\\n // Determine the appropriate conduit to utilize.\\n bytes32 conduitKey;\\n\\n // Utilize assembly to derive conduit (if relevant) based on route.\\n assembly {\\n // Use offerer conduit if fromOfferer, fulfiller conduit otherwise.\\n conduitKey := calldataload(\\n sub(\\n BasicOrder_fulfillerConduit_cdPtr,\\n mul(fromOfferer, OneWord)\\n )\\n )\\n }\\n\\n // Retrieve total number of additional recipients and place on stack.\\n uint256 totalAdditionalRecipients = (\\n parameters.additionalRecipients.length\\n );\\n\\n // Iterate over each additional recipient.\\n for (uint256 i = 0; i < totalAdditionalRecipients; ) {\\n // Retrieve the additional recipient.\\n AdditionalRecipient calldata additionalRecipient = (\\n parameters.additionalRecipients[i]\\n );\\n\\n uint256 additionalRecipientAmount = additionalRecipient.amount;\\n\\n // Decrement the amount to transfer to fulfiller if indicated.\\n if (fromOfferer) {\\n amount -= additionalRecipientAmount;\\n }\\n\\n // Transfer ERC20 tokens to additional recipient given approval.\\n _transferERC20(\\n token,\\n from,\\n additionalRecipient.recipient,\\n additionalRecipientAmount,\\n conduitKey,\\n accumulator\\n );\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Transfer ERC20 token amount (from account must have proper approval).\\n _transferERC20(token, from, to, amount, conduitKey, accumulator);\\n }\\n}\\n\",\"keccak256\":\"0x5442625e6297ba9739337a43969ce3197ad99c3330368e8559d8aa8fc7a074f2\",\"license\":\"MIT\"},\"seaport/contracts/lib/Consideration.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\n// prettier-ignore\\nimport {\\n ConsiderationInterface\\n} from \\\"../interfaces/ConsiderationInterface.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OrderComponents,\\n BasicOrderParameters,\\n OrderParameters,\\n Order,\\n AdvancedOrder,\\n OrderStatus,\\n CriteriaResolver,\\n Fulfillment,\\n FulfillmentComponent,\\n Execution\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { OrderCombiner } from \\\"./OrderCombiner.sol\\\";\\n\\n/**\\n * @title Consideration\\n * @author 0age\\n * @custom:coauthor d1ll0n\\n * @custom:coauthor transmissions11\\n * @custom:version 1.1\\n * @notice Consideration is a generalized ETH/ERC20/ERC721/ERC1155 marketplace.\\n * It minimizes external calls to the greatest extent possible and\\n * provides lightweight methods for common routes as well as more\\n * flexible methods for composing advanced orders or groups of orders.\\n * Each order contains an arbitrary number of items that may be spent\\n * (the \\\"offer\\\") along with an arbitrary number of items that must be\\n * received back by the indicated recipients (the \\\"consideration\\\").\\n */\\ncontract Consideration is ConsiderationInterface, OrderCombiner {\\n /**\\n * @notice Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) OrderCombiner(conduitController) {}\\n\\n /**\\n * @notice Fulfill an order offering an ERC20, ERC721, or ERC1155 item by\\n * supplying Ether (or other native tokens), ERC20 tokens, an ERC721\\n * item, or an ERC1155 item as consideration. Six permutations are\\n * supported: Native token to ERC721, Native token to ERC1155, ERC20\\n * to ERC721, ERC20 to ERC1155, ERC721 to ERC20, and ERC1155 to\\n * ERC20 (with native tokens supplied as msg.value). For an order to\\n * be eligible for fulfillment via this method, it must contain a\\n * single offer item (though that item may have a greater amount if\\n * the item is not an ERC721). An arbitrary number of \\\"additional\\n * recipients\\\" may also be supplied which will each receive native\\n * tokens or ERC20 items from the fulfiller as consideration. Refer\\n * to the documentation for a more comprehensive summary of how to\\n * utilize this method and what orders are compatible with it.\\n *\\n * @param parameters Additional information on the fulfilled order. Note\\n * that the offerer and the fulfiller must first approve\\n * this contract (or their chosen conduit if indicated)\\n * before any tokens can be transferred. Also note that\\n * contract recipients of ERC1155 consideration items must\\n * implement `onERC1155Received` in order to receive those\\n * items.\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillBasicOrder(BasicOrderParameters calldata parameters)\\n external\\n payable\\n override\\n returns (bool fulfilled)\\n {\\n // Validate and fulfill the basic order.\\n fulfilled = _validateAndFulfillBasicOrder(parameters);\\n }\\n\\n /**\\n * @notice Fulfill an order with an arbitrary number of items for offer and\\n * consideration. Note that this function does not support\\n * criteria-based orders or partial filling of orders (though\\n * filling the remainder of a partially-filled order is supported).\\n *\\n * @param order The order to fulfill. Note that both the\\n * offerer and the fulfiller must first approve\\n * this contract (or the corresponding conduit if\\n * indicated) to transfer any relevant tokens on\\n * their behalf and that contracts must implement\\n * `onERC1155Received` to receive ERC1155 tokens\\n * as consideration.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used (and direct approvals set on\\n * Consideration).\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillOrder(Order calldata order, bytes32 fulfillerConduitKey)\\n external\\n payable\\n override\\n returns (bool fulfilled)\\n {\\n // Convert order to \\\"advanced\\\" order, then validate and fulfill it.\\n fulfilled = _validateAndFulfillAdvancedOrder(\\n _convertOrderToAdvanced(order),\\n new CriteriaResolver[](0), // No criteria resolvers supplied.\\n fulfillerConduitKey,\\n msg.sender\\n );\\n }\\n\\n /**\\n * @notice Fill an order, fully or partially, with an arbitrary number of\\n * items for offer and consideration alongside criteria resolvers\\n * containing specific token identifiers and associated proofs.\\n *\\n * @param advancedOrder The order to fulfill along with the fraction\\n * of the order to attempt to fill. Note that\\n * both the offerer and the fulfiller must first\\n * approve this contract (or their conduit if\\n * indicated by the order) to transfer any\\n * relevant tokens on their behalf and that\\n * contracts must implement `onERC1155Received`\\n * to receive ERC1155 tokens as consideration.\\n * Also note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount with\\n * the supplied fraction for the partial fill to\\n * be considered valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a proof\\n * that the supplied token identifier is\\n * contained in the merkle root held by the item\\n * in question's criteria element. Note that an\\n * empty criteria indicates that any\\n * (transferable) token identifier on the token\\n * in question is valid and that no associated\\n * proof needs to be supplied.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used (and direct approvals set on\\n * Consideration).\\n * @param recipient The intended recipient for all received items,\\n * with `address(0)` indicating that the caller\\n * should receive the items.\\n *\\n * @return fulfilled A boolean indicating whether the order has been\\n * successfully fulfilled.\\n */\\n function fulfillAdvancedOrder(\\n AdvancedOrder calldata advancedOrder,\\n CriteriaResolver[] calldata criteriaResolvers,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n ) external payable override returns (bool fulfilled) {\\n // Validate and fulfill the order.\\n fulfilled = _validateAndFulfillAdvancedOrder(\\n advancedOrder,\\n criteriaResolvers,\\n fulfillerConduitKey,\\n recipient == address(0) ? msg.sender : recipient\\n );\\n }\\n\\n /**\\n * @notice Attempt to fill a group of orders, each with an arbitrary number\\n * of items for offer and consideration. Any order that is not\\n * currently active, has already been fully filled, or has been\\n * cancelled will be omitted. Remaining offer and consideration\\n * items will then be aggregated where possible as indicated by the\\n * supplied offer and consideration component arrays and aggregated\\n * items will be transferred to the fulfiller or to each intended\\n * recipient, respectively. Note that a failing item transfer or an\\n * issue with order formatting will cause the entire batch to fail.\\n * Note that this function does not support criteria-based orders or\\n * partial filling of orders (though filling the remainder of a\\n * partially-filled order is supported).\\n *\\n * @param orders The orders to fulfill. Note that both\\n * the offerer and the fulfiller must first\\n * approve this contract (or the\\n * corresponding conduit if indicated) to\\n * transfer any relevant tokens on their\\n * behalf and that contracts must implement\\n * `onERC1155Received` to receive ERC1155\\n * tokens as consideration.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used (and\\n * direct approvals set on Consideration).\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function fulfillAvailableOrders(\\n Order[] calldata orders,\\n FulfillmentComponent[][] calldata offerFulfillments,\\n FulfillmentComponent[][] calldata considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n uint256 maximumFulfilled\\n )\\n external\\n payable\\n override\\n returns (bool[] memory availableOrders, Execution[] memory executions)\\n {\\n // Convert orders to \\\"advanced\\\" orders and fulfill all available orders.\\n return\\n _fulfillAvailableAdvancedOrders(\\n _convertOrdersToAdvanced(orders), // Convert to advanced orders.\\n new CriteriaResolver[](0), // No criteria resolvers supplied.\\n offerFulfillments,\\n considerationFulfillments,\\n fulfillerConduitKey,\\n msg.sender,\\n maximumFulfilled\\n );\\n }\\n\\n /**\\n * @notice Attempt to fill a group of orders, fully or partially, with an\\n * arbitrary number of items for offer and consideration per order\\n * alongside criteria resolvers containing specific token\\n * identifiers and associated proofs. Any order that is not\\n * currently active, has already been fully filled, or has been\\n * cancelled will be omitted. Remaining offer and consideration\\n * items will then be aggregated where possible as indicated by the\\n * supplied offer and consideration component arrays and aggregated\\n * items will be transferred to the fulfiller or to each intended\\n * recipient, respectively. Note that a failing item transfer or an\\n * issue with order formatting will cause the entire batch to fail.\\n *\\n * @param advancedOrders The orders to fulfill along with the\\n * fraction of those orders to attempt to\\n * fill. Note that both the offerer and the\\n * fulfiller must first approve this\\n * contract (or their conduit if indicated\\n * by the order) to transfer any relevant\\n * tokens on their behalf and that\\n * contracts must implement\\n * `onERC1155Received` in order to receive\\n * ERC1155 tokens as consideration. Also\\n * note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount\\n * with the supplied fraction for an\\n * order's partial fill amount to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a\\n * proof that the supplied token identifier\\n * is contained in the merkle root held by\\n * the item in question's criteria element.\\n * Note that an empty criteria indicates\\n * that any (transferable) token\\n * identifier on the token in question is\\n * valid and that no associated proof needs\\n * to be supplied.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used (and\\n * direct approvals set on Consideration).\\n * @param recipient The intended recipient for all received\\n * items, with `address(0)` indicating that\\n * the caller should receive the items.\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function fulfillAvailableAdvancedOrders(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] calldata criteriaResolvers,\\n FulfillmentComponent[][] calldata offerFulfillments,\\n FulfillmentComponent[][] calldata considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n address recipient,\\n uint256 maximumFulfilled\\n )\\n external\\n payable\\n override\\n returns (bool[] memory availableOrders, Execution[] memory executions)\\n {\\n // Fulfill all available orders.\\n return\\n _fulfillAvailableAdvancedOrders(\\n advancedOrders,\\n criteriaResolvers,\\n offerFulfillments,\\n considerationFulfillments,\\n fulfillerConduitKey,\\n recipient == address(0) ? msg.sender : recipient,\\n maximumFulfilled\\n );\\n }\\n\\n /**\\n * @notice Match an arbitrary number of orders, each with an arbitrary\\n * number of items for offer and consideration along with a set of\\n * fulfillments allocating offer components to consideration\\n * components. Note that this function does not support\\n * criteria-based or partial filling of orders (though filling the\\n * remainder of a partially-filled order is supported).\\n *\\n * @param orders The orders to match. Note that both the offerer\\n * and fulfiller on each order must first approve\\n * this contract (or their conduit if indicated by\\n * the order) to transfer any relevant tokens on\\n * their behalf and each consideration recipient\\n * must implement `onERC1155Received` in order to\\n * receive ERC1155 tokens.\\n * @param fulfillments An array of elements allocating offer components\\n * to consideration components. Note that each\\n * consideration component must be fully met in\\n * order for the match operation to be valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function matchOrders(\\n Order[] calldata orders,\\n Fulfillment[] calldata fulfillments\\n ) external payable override returns (Execution[] memory executions) {\\n // Convert to advanced, validate, and match orders using fulfillments.\\n return\\n _matchAdvancedOrders(\\n _convertOrdersToAdvanced(orders),\\n new CriteriaResolver[](0), // No criteria resolvers supplied.\\n fulfillments\\n );\\n }\\n\\n /**\\n * @notice Match an arbitrary number of full or partial orders, each with an\\n * arbitrary number of items for offer and consideration, supplying\\n * criteria resolvers containing specific token identifiers and\\n * associated proofs as well as fulfillments allocating offer\\n * components to consideration components.\\n *\\n * @param advancedOrders The advanced orders to match. Note that both the\\n * offerer and fulfiller on each order must first\\n * approve this contract (or their conduit if\\n * indicated by the order) to transfer any relevant\\n * tokens on their behalf and each consideration\\n * recipient must implement `onERC1155Received` in\\n * order to receive ERC1155 tokens. Also note that\\n * the offer and consideration components for each\\n * order must have no remainder after multiplying\\n * the respective amount with the supplied fraction\\n * in order for the group of partial fills to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific order as well as that order's\\n * offer or consideration, a token identifier, and\\n * a proof that the supplied token identifier is\\n * contained in the order's merkle root. Note that\\n * an empty root indicates that any (transferable)\\n * token identifier is valid and that no associated\\n * proof needs to be supplied.\\n * @param fulfillments An array of elements allocating offer components\\n * to consideration components. Note that each\\n * consideration component must be fully met in\\n * order for the match operation to be valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function matchAdvancedOrders(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] calldata criteriaResolvers,\\n Fulfillment[] calldata fulfillments\\n ) external payable override returns (Execution[] memory executions) {\\n // Validate and match the advanced orders using supplied fulfillments.\\n return\\n _matchAdvancedOrders(\\n advancedOrders,\\n criteriaResolvers,\\n fulfillments\\n );\\n }\\n\\n /**\\n * @notice Cancel an arbitrary number of orders. Note that only the offerer\\n * or the zone of a given order may cancel it. Callers should ensure\\n * that the intended order was cancelled by calling `getOrderStatus`\\n * and confirming that `isCancelled` returns `true`.\\n *\\n * @param orders The orders to cancel.\\n *\\n * @return cancelled A boolean indicating whether the supplied orders have\\n * been successfully cancelled.\\n */\\n function cancel(OrderComponents[] calldata orders)\\n external\\n override\\n returns (bool cancelled)\\n {\\n // Cancel the orders.\\n cancelled = _cancel(orders);\\n }\\n\\n /**\\n * @notice Validate an arbitrary number of orders, thereby registering their\\n * signatures as valid and allowing the fulfiller to skip signature\\n * verification on fulfillment. Note that validated orders may still\\n * be unfulfillable due to invalid item amounts or other factors;\\n * callers should determine whether validated orders are fulfillable\\n * by simulating the fulfillment call prior to execution. Also note\\n * that anyone can validate a signed order, but only the offerer can\\n * validate an order without supplying a signature.\\n *\\n * @param orders The orders to validate.\\n *\\n * @return validated A boolean indicating whether the supplied orders have\\n * been successfully validated.\\n */\\n function validate(Order[] calldata orders)\\n external\\n override\\n returns (bool validated)\\n {\\n // Validate the orders.\\n validated = _validate(orders);\\n }\\n\\n /**\\n * @notice Cancel all orders from a given offerer with a given zone in bulk\\n * by incrementing a counter. Note that only the offerer may\\n * increment the counter.\\n *\\n * @return newCounter The new counter.\\n */\\n function incrementCounter() external override returns (uint256 newCounter) {\\n // Increment current counter for the supplied offerer.\\n newCounter = _incrementCounter();\\n }\\n\\n /**\\n * @notice Retrieve the order hash for a given order.\\n *\\n * @param order The components of the order.\\n *\\n * @return orderHash The order hash.\\n */\\n function getOrderHash(OrderComponents calldata order)\\n external\\n view\\n override\\n returns (bytes32 orderHash)\\n {\\n // Derive order hash by supplying order parameters along with counter.\\n orderHash = _deriveOrderHash(\\n OrderParameters(\\n order.offerer,\\n order.zone,\\n order.offer,\\n order.consideration,\\n order.orderType,\\n order.startTime,\\n order.endTime,\\n order.zoneHash,\\n order.salt,\\n order.conduitKey,\\n order.consideration.length\\n ),\\n order.counter\\n );\\n }\\n\\n /**\\n * @notice Retrieve the status of a given order by hash, including whether\\n * the order has been cancelled or validated and the fraction of the\\n * order that has been filled.\\n *\\n * @param orderHash The order hash in question.\\n *\\n * @return isValidated A boolean indicating whether the order in question\\n * has been validated (i.e. previously approved or\\n * partially filled).\\n * @return isCancelled A boolean indicating whether the order in question\\n * has been cancelled.\\n * @return totalFilled The total portion of the order that has been filled\\n * (i.e. the \\\"numerator\\\").\\n * @return totalSize The total size of the order that is either filled or\\n * unfilled (i.e. the \\\"denominator\\\").\\n */\\n function getOrderStatus(bytes32 orderHash)\\n external\\n view\\n override\\n returns (\\n bool isValidated,\\n bool isCancelled,\\n uint256 totalFilled,\\n uint256 totalSize\\n )\\n {\\n // Retrieve the order status using the order hash.\\n return _getOrderStatus(orderHash);\\n }\\n\\n /**\\n * @notice Retrieve the current counter for a given offerer.\\n *\\n * @param offerer The offerer in question.\\n *\\n * @return counter The current counter.\\n */\\n function getCounter(address offerer)\\n external\\n view\\n override\\n returns (uint256 counter)\\n {\\n // Return the counter for the supplied offerer.\\n counter = _getCounter(offerer);\\n }\\n\\n /**\\n * @notice Retrieve configuration information for this contract.\\n *\\n * @return version The contract version.\\n * @return domainSeparator The domain separator for this contract.\\n * @return conduitController The conduit Controller set for this contract.\\n */\\n function information()\\n external\\n view\\n override\\n returns (\\n string memory version,\\n bytes32 domainSeparator,\\n address conduitController\\n )\\n {\\n // Return the information for this contract.\\n return _information();\\n }\\n\\n /**\\n * @notice Retrieve the name of this contract.\\n *\\n * @return contractName The name of this contract.\\n */\\n function name()\\n external\\n pure\\n override\\n returns (string memory contractName)\\n {\\n // Return the name of the contract.\\n contractName = _name();\\n }\\n}\\n\",\"keccak256\":\"0xbda2745bb8df212d440164dfd1e2e61d95a13f449597116a65f76feaaec0b1dd\",\"license\":\"MIT\"},\"seaport/contracts/lib/ConsiderationBase.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\n// prettier-ignore\\nimport {\\n ConduitControllerInterface\\n} from \\\"../interfaces/ConduitControllerInterface.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n ConsiderationEventsAndErrors\\n} from \\\"../interfaces/ConsiderationEventsAndErrors.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title ConsiderationBase\\n * @author 0age\\n * @notice ConsiderationBase contains immutable constants and constructor logic.\\n */\\ncontract ConsiderationBase is ConsiderationEventsAndErrors {\\n // Precompute hashes, original chainId, and domain separator on deployment.\\n bytes32 internal immutable _NAME_HASH;\\n bytes32 internal immutable _VERSION_HASH;\\n bytes32 internal immutable _EIP_712_DOMAIN_TYPEHASH;\\n bytes32 internal immutable _OFFER_ITEM_TYPEHASH;\\n bytes32 internal immutable _CONSIDERATION_ITEM_TYPEHASH;\\n bytes32 internal immutable _ORDER_TYPEHASH;\\n uint256 internal immutable _CHAIN_ID;\\n bytes32 internal immutable _DOMAIN_SEPARATOR;\\n\\n // Allow for interaction with the conduit controller.\\n ConduitControllerInterface internal immutable _CONDUIT_CONTROLLER;\\n\\n // Cache the conduit creation code hash used by the conduit controller.\\n bytes32 internal immutable _CONDUIT_CREATION_CODE_HASH;\\n\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) {\\n // Derive name and version hashes alongside required EIP-712 typehashes.\\n (\\n _NAME_HASH,\\n _VERSION_HASH,\\n _EIP_712_DOMAIN_TYPEHASH,\\n _OFFER_ITEM_TYPEHASH,\\n _CONSIDERATION_ITEM_TYPEHASH,\\n _ORDER_TYPEHASH\\n ) = _deriveTypehashes();\\n\\n // Store the current chainId and derive the current domain separator.\\n _CHAIN_ID = block.chainid;\\n _DOMAIN_SEPARATOR = _deriveDomainSeparator();\\n\\n // Set the supplied conduit controller.\\n _CONDUIT_CONTROLLER = ConduitControllerInterface(conduitController);\\n\\n // Retrieve the conduit creation code hash from the supplied controller.\\n (_CONDUIT_CREATION_CODE_HASH, ) = (\\n _CONDUIT_CONTROLLER.getConduitCodeHashes()\\n );\\n }\\n\\n /**\\n * @dev Internal view function to derive the EIP-712 domain separator.\\n *\\n * @return The derived domain separator.\\n */\\n function _deriveDomainSeparator() internal view returns (bytes32) {\\n // prettier-ignore\\n return keccak256(\\n abi.encode(\\n _EIP_712_DOMAIN_TYPEHASH,\\n _NAME_HASH,\\n _VERSION_HASH,\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /**\\n * @dev Internal pure function to retrieve the default name of this\\n * contract and return.\\n *\\n * @return The name of this contract.\\n */\\n function _name() internal pure virtual returns (string memory) {\\n // Return the name of the contract.\\n assembly {\\n // First element is the offset for the returned string. Offset the\\n // value in memory by one word so that the free memory pointer will\\n // be overwritten by the next write.\\n mstore(OneWord, OneWord)\\n\\n // Name is right padded, so it touches the length which is left\\n // padded. This enables writing both values at once. The free memory\\n // pointer will be overwritten in the process.\\n mstore(NameLengthPtr, NameWithLength)\\n\\n // Standard ABI encoding pads returned data to the nearest word. Use\\n // the already empty zero slot memory region for this purpose and\\n // return the final name string, offset by the original single word.\\n return(OneWord, ThreeWords)\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to retrieve the default name of this contract\\n * as a string that can be used internally.\\n *\\n * @return The name of this contract.\\n */\\n function _nameString() internal pure virtual returns (string memory) {\\n // Return the name of the contract.\\n return \\\"Consideration\\\";\\n }\\n\\n /**\\n * @dev Internal pure function to derive required EIP-712 typehashes and\\n * other hashes during contract creation.\\n *\\n * @return nameHash The hash of the name of the contract.\\n * @return versionHash The hash of the version string of the\\n * contract.\\n * @return eip712DomainTypehash The primary EIP-712 domain typehash.\\n * @return offerItemTypehash The EIP-712 typehash for OfferItem\\n * types.\\n * @return considerationItemTypehash The EIP-712 typehash for\\n * ConsiderationItem types.\\n * @return orderTypehash The EIP-712 typehash for Order types.\\n */\\n function _deriveTypehashes()\\n internal\\n pure\\n returns (\\n bytes32 nameHash,\\n bytes32 versionHash,\\n bytes32 eip712DomainTypehash,\\n bytes32 offerItemTypehash,\\n bytes32 considerationItemTypehash,\\n bytes32 orderTypehash\\n )\\n {\\n // Derive hash of the name of the contract.\\n nameHash = keccak256(bytes(_nameString()));\\n\\n // Derive hash of the version string of the contract.\\n versionHash = keccak256(bytes(\\\"1.1\\\"));\\n\\n // Construct the OfferItem type string.\\n // prettier-ignore\\n bytes memory offerItemTypeString = abi.encodePacked(\\n \\\"OfferItem(\\\",\\n \\\"uint8 itemType,\\\",\\n \\\"address token,\\\",\\n \\\"uint256 identifierOrCriteria,\\\",\\n \\\"uint256 startAmount,\\\",\\n \\\"uint256 endAmount\\\",\\n \\\")\\\"\\n );\\n\\n // Construct the ConsiderationItem type string.\\n // prettier-ignore\\n bytes memory considerationItemTypeString = abi.encodePacked(\\n \\\"ConsiderationItem(\\\",\\n \\\"uint8 itemType,\\\",\\n \\\"address token,\\\",\\n \\\"uint256 identifierOrCriteria,\\\",\\n \\\"uint256 startAmount,\\\",\\n \\\"uint256 endAmount,\\\",\\n \\\"address recipient\\\",\\n \\\")\\\"\\n );\\n\\n // Construct the OrderComponents type string, not including the above.\\n // prettier-ignore\\n bytes memory orderComponentsPartialTypeString = abi.encodePacked(\\n \\\"OrderComponents(\\\",\\n \\\"address offerer,\\\",\\n \\\"address zone,\\\",\\n \\\"OfferItem[] offer,\\\",\\n \\\"ConsiderationItem[] consideration,\\\",\\n \\\"uint8 orderType,\\\",\\n \\\"uint256 startTime,\\\",\\n \\\"uint256 endTime,\\\",\\n \\\"bytes32 zoneHash,\\\",\\n \\\"uint256 salt,\\\",\\n \\\"bytes32 conduitKey,\\\",\\n \\\"uint256 counter\\\",\\n \\\")\\\"\\n );\\n\\n // Construct the primary EIP-712 domain type string.\\n // prettier-ignore\\n eip712DomainTypehash = keccak256(\\n abi.encodePacked(\\n \\\"EIP712Domain(\\\",\\n \\\"string name,\\\",\\n \\\"string version,\\\",\\n \\\"uint256 chainId,\\\",\\n \\\"address verifyingContract\\\",\\n \\\")\\\"\\n )\\n );\\n\\n // Derive the OfferItem type hash using the corresponding type string.\\n offerItemTypehash = keccak256(offerItemTypeString);\\n\\n // Derive ConsiderationItem type hash using corresponding type string.\\n considerationItemTypehash = keccak256(considerationItemTypeString);\\n\\n // Derive OrderItem type hash via combination of relevant type strings.\\n orderTypehash = keccak256(\\n abi.encodePacked(\\n orderComponentsPartialTypeString,\\n considerationItemTypeString,\\n offerItemTypeString\\n )\\n );\\n }\\n}\\n\",\"keccak256\":\"0x440744f335a102ede0897323eb50f3afe1857c4deca3f194a0dca01d4e0f601a\",\"license\":\"MIT\"},\"seaport/contracts/lib/ConsiderationConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/*\\n * -------------------------- Disambiguation & Other Notes ---------------------\\n * - The term \\\"head\\\" is used as it is in the documentation for ABI encoding,\\n * but only in reference to dynamic types, i.e. it always refers to the\\n * offset or pointer to the body of a dynamic type. In calldata, the head\\n * is always an offset (relative to the parent object), while in memory,\\n * the head is always the pointer to the body. More information found here:\\n * https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#argument-encoding\\n * - Note that the length of an array is separate from and precedes the\\n * head of the array.\\n *\\n * - The term \\\"body\\\" is used in place of the term \\\"head\\\" used in the ABI\\n * documentation. It refers to the start of the data for a dynamic type,\\n * e.g. the first word of a struct or the first word of the first element\\n * in an array.\\n *\\n * - The term \\\"pointer\\\" is used to describe the absolute position of a value\\n * and never an offset relative to another value.\\n * - The suffix \\\"_ptr\\\" refers to a memory pointer.\\n * - The suffix \\\"_cdPtr\\\" refers to a calldata pointer.\\n *\\n * - The term \\\"offset\\\" is used to describe the position of a value relative\\n * to some parent value. For example, OrderParameters_conduit_offset is the\\n * offset to the \\\"conduit\\\" value in the OrderParameters struct relative to\\n * the start of the body.\\n * - Note: Offsets are used to derive pointers.\\n *\\n * - Some structs have pointers defined for all of their fields in this file.\\n * Lines which are commented out are fields that are not used in the\\n * codebase but have been left in for readability.\\n */\\n\\n// Declare constants for name, version, and reentrancy sentinel values.\\n\\n// Name is right padded, so it touches the length which is left padded. This\\n// enables writing both values at once. Length goes at byte 95 in memory, and\\n// name fills bytes 96-109, so both values can be written left-padded to 77.\\nuint256 constant NameLengthPtr = 77;\\nuint256 constant NameWithLength = 0x0d436F6E73696465726174696F6E;\\n\\nuint256 constant Version = 0x312e31;\\nuint256 constant Version_length = 3;\\nuint256 constant Version_shift = 0xe8;\\n\\nuint256 constant _NOT_ENTERED = 1;\\nuint256 constant _ENTERED = 2;\\n\\n// Common Offsets\\n// Offsets for identically positioned fields shared by:\\n// OfferItem, ConsiderationItem, SpentItem, ReceivedItem\\n\\nuint256 constant Common_token_offset = 0x20;\\nuint256 constant Common_identifier_offset = 0x40;\\nuint256 constant Common_amount_offset = 0x60;\\n\\nuint256 constant ReceivedItem_size = 0xa0;\\nuint256 constant ReceivedItem_amount_offset = 0x60;\\nuint256 constant ReceivedItem_recipient_offset = 0x80;\\n\\nuint256 constant ReceivedItem_CommonParams_size = 0x60;\\n\\nuint256 constant ConsiderationItem_recipient_offset = 0xa0;\\n// Store the same constant in an abbreviated format for a line length fix.\\nuint256 constant ConsiderItem_recipient_offset = 0xa0;\\n\\nuint256 constant Execution_offerer_offset = 0x20;\\nuint256 constant Execution_conduit_offset = 0x40;\\n\\nuint256 constant InvalidFulfillmentComponentData_error_signature = (\\n 0x7fda727900000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant InvalidFulfillmentComponentData_error_len = 0x04;\\n\\nuint256 constant Panic_error_signature = (\\n 0x4e487b7100000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant Panic_error_offset = 0x04;\\nuint256 constant Panic_error_length = 0x24;\\nuint256 constant Panic_arithmetic = 0x11;\\n\\nuint256 constant MissingItemAmount_error_signature = (\\n 0x91b3e51400000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant MissingItemAmount_error_len = 0x04;\\n\\nuint256 constant OrderParameters_offer_head_offset = 0x40;\\nuint256 constant OrderParameters_consideration_head_offset = 0x60;\\nuint256 constant OrderParameters_conduit_offset = 0x120;\\nuint256 constant OrderParameters_counter_offset = 0x140;\\n\\nuint256 constant Fulfillment_itemIndex_offset = 0x20;\\n\\nuint256 constant AdvancedOrder_numerator_offset = 0x20;\\n\\nuint256 constant AlmostOneWord = 0x1f;\\nuint256 constant OneWord = 0x20;\\nuint256 constant TwoWords = 0x40;\\nuint256 constant ThreeWords = 0x60;\\nuint256 constant FourWords = 0x80;\\nuint256 constant FiveWords = 0xa0;\\n\\nuint256 constant FreeMemoryPointerSlot = 0x40;\\nuint256 constant ZeroSlot = 0x60;\\nuint256 constant DefaultFreeMemoryPointer = 0x80;\\n\\nuint256 constant Slot0x80 = 0x80;\\nuint256 constant Slot0xA0 = 0xa0;\\n\\nuint256 constant BasicOrder_endAmount_cdPtr = 0x104;\\nuint256 constant BasicOrder_common_params_size = 0xa0;\\nuint256 constant BasicOrder_considerationHashesArray_ptr = 0x160;\\n\\nuint256 constant EIP712_Order_size = 0x180;\\nuint256 constant EIP712_OfferItem_size = 0xc0;\\nuint256 constant EIP712_ConsiderationItem_size = 0xe0;\\nuint256 constant AdditionalRecipients_size = 0x40;\\n\\nuint256 constant EIP712_DomainSeparator_offset = 0x02;\\nuint256 constant EIP712_OrderHash_offset = 0x22;\\nuint256 constant EIP712_DigestPayload_size = 0x42;\\n\\nuint256 constant receivedItemsHash_ptr = 0x60;\\n\\n/*\\n * Memory layout in _prepareBasicFulfillmentFromCalldata of\\n * data for OrderFulfilled\\n *\\n * event OrderFulfilled(\\n * bytes32 orderHash,\\n * address indexed offerer,\\n * address indexed zone,\\n * address fulfiller,\\n * SpentItem[] offer,\\n * > (itemType, token, id, amount)\\n * ReceivedItem[] consideration\\n * > (itemType, token, id, amount, recipient)\\n * )\\n *\\n * - 0x00: orderHash\\n * - 0x20: fulfiller\\n * - 0x40: offer offset (0x80)\\n * - 0x60: consideration offset (0x120)\\n * - 0x80: offer.length (1)\\n * - 0xa0: offerItemType\\n * - 0xc0: offerToken\\n * - 0xe0: offerIdentifier\\n * - 0x100: offerAmount\\n * - 0x120: consideration.length (1 + additionalRecipients.length)\\n * - 0x140: considerationItemType\\n * - 0x160: considerationToken\\n * - 0x180: considerationIdentifier\\n * - 0x1a0: considerationAmount\\n * - 0x1c0: considerationRecipient\\n * - ...\\n */\\n\\n// Minimum length of the OrderFulfilled event data.\\n// Must be added to the size of the ReceivedItem array for additionalRecipients\\n// (0xa0 * additionalRecipients.length) to calculate full size of the buffer.\\nuint256 constant OrderFulfilled_baseSize = 0x1e0;\\nuint256 constant OrderFulfilled_selector = (\\n 0x9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f31\\n);\\n\\n// Minimum offset in memory to OrderFulfilled event data.\\n// Must be added to the size of the EIP712 hash array for additionalRecipients\\n// (32 * additionalRecipients.length) to calculate the pointer to event data.\\nuint256 constant OrderFulfilled_baseOffset = 0x180;\\nuint256 constant OrderFulfilled_consideration_length_baseOffset = 0x2a0;\\nuint256 constant OrderFulfilled_offer_length_baseOffset = 0x200;\\n\\n// uint256 constant OrderFulfilled_orderHash_offset = 0x00;\\nuint256 constant OrderFulfilled_fulfiller_offset = 0x20;\\nuint256 constant OrderFulfilled_offer_head_offset = 0x40;\\nuint256 constant OrderFulfilled_offer_body_offset = 0x80;\\nuint256 constant OrderFulfilled_consideration_head_offset = 0x60;\\nuint256 constant OrderFulfilled_consideration_body_offset = 0x120;\\n\\n// BasicOrderParameters\\nuint256 constant BasicOrder_parameters_cdPtr = 0x04;\\nuint256 constant BasicOrder_considerationToken_cdPtr = 0x24;\\n// uint256 constant BasicOrder_considerationIdentifier_cdPtr = 0x44;\\nuint256 constant BasicOrder_considerationAmount_cdPtr = 0x64;\\nuint256 constant BasicOrder_offerer_cdPtr = 0x84;\\nuint256 constant BasicOrder_zone_cdPtr = 0xa4;\\nuint256 constant BasicOrder_offerToken_cdPtr = 0xc4;\\n// uint256 constant BasicOrder_offerIdentifier_cdPtr = 0xe4;\\nuint256 constant BasicOrder_offerAmount_cdPtr = 0x104;\\nuint256 constant BasicOrder_basicOrderType_cdPtr = 0x124;\\nuint256 constant BasicOrder_startTime_cdPtr = 0x144;\\n// uint256 constant BasicOrder_endTime_cdPtr = 0x164;\\n// uint256 constant BasicOrder_zoneHash_cdPtr = 0x184;\\n// uint256 constant BasicOrder_salt_cdPtr = 0x1a4;\\nuint256 constant BasicOrder_offererConduit_cdPtr = 0x1c4;\\nuint256 constant BasicOrder_fulfillerConduit_cdPtr = 0x1e4;\\nuint256 constant BasicOrder_totalOriginalAdditionalRecipients_cdPtr = 0x204;\\nuint256 constant BasicOrder_additionalRecipients_head_cdPtr = 0x224;\\nuint256 constant BasicOrder_signature_cdPtr = 0x244;\\nuint256 constant BasicOrder_additionalRecipients_length_cdPtr = 0x264;\\nuint256 constant BasicOrder_additionalRecipients_data_cdPtr = 0x284;\\n\\nuint256 constant BasicOrder_parameters_ptr = 0x20;\\n\\nuint256 constant BasicOrder_basicOrderType_range = 0x18; // 24 values\\n\\n/*\\n * Memory layout in _prepareBasicFulfillmentFromCalldata of\\n * EIP712 data for ConsiderationItem\\n * - 0x80: ConsiderationItem EIP-712 typehash (constant)\\n * - 0xa0: itemType\\n * - 0xc0: token\\n * - 0xe0: identifier\\n * - 0x100: startAmount\\n * - 0x120: endAmount\\n * - 0x140: recipient\\n */\\nuint256 constant BasicOrder_considerationItem_typeHash_ptr = 0x80; // memoryPtr\\nuint256 constant BasicOrder_considerationItem_itemType_ptr = 0xa0;\\nuint256 constant BasicOrder_considerationItem_token_ptr = 0xc0;\\nuint256 constant BasicOrder_considerationItem_identifier_ptr = 0xe0;\\nuint256 constant BasicOrder_considerationItem_startAmount_ptr = 0x100;\\nuint256 constant BasicOrder_considerationItem_endAmount_ptr = 0x120;\\n// uint256 constant BasicOrder_considerationItem_recipient_ptr = 0x140;\\n\\n/*\\n * Memory layout in _prepareBasicFulfillmentFromCalldata of\\n * EIP712 data for OfferItem\\n * - 0x80: OfferItem EIP-712 typehash (constant)\\n * - 0xa0: itemType\\n * - 0xc0: token\\n * - 0xe0: identifier (reused for offeredItemsHash)\\n * - 0x100: startAmount\\n * - 0x120: endAmount\\n */\\nuint256 constant BasicOrder_offerItem_typeHash_ptr = DefaultFreeMemoryPointer;\\nuint256 constant BasicOrder_offerItem_itemType_ptr = 0xa0;\\nuint256 constant BasicOrder_offerItem_token_ptr = 0xc0;\\n// uint256 constant BasicOrder_offerItem_identifier_ptr = 0xe0;\\n// uint256 constant BasicOrder_offerItem_startAmount_ptr = 0x100;\\nuint256 constant BasicOrder_offerItem_endAmount_ptr = 0x120;\\n\\n/*\\n * Memory layout in _prepareBasicFulfillmentFromCalldata of\\n * EIP712 data for Order\\n * - 0x80: Order EIP-712 typehash (constant)\\n * - 0xa0: orderParameters.offerer\\n * - 0xc0: orderParameters.zone\\n * - 0xe0: keccak256(abi.encodePacked(offerHashes))\\n * - 0x100: keccak256(abi.encodePacked(considerationHashes))\\n * - 0x120: orderType\\n * - 0x140: startTime\\n * - 0x160: endTime\\n * - 0x180: zoneHash\\n * - 0x1a0: salt\\n * - 0x1c0: conduit\\n * - 0x1e0: _counters[orderParameters.offerer] (from storage)\\n */\\nuint256 constant BasicOrder_order_typeHash_ptr = 0x80;\\nuint256 constant BasicOrder_order_offerer_ptr = 0xa0;\\n// uint256 constant BasicOrder_order_zone_ptr = 0xc0;\\nuint256 constant BasicOrder_order_offerHashes_ptr = 0xe0;\\nuint256 constant BasicOrder_order_considerationHashes_ptr = 0x100;\\nuint256 constant BasicOrder_order_orderType_ptr = 0x120;\\nuint256 constant BasicOrder_order_startTime_ptr = 0x140;\\n// uint256 constant BasicOrder_order_endTime_ptr = 0x160;\\n// uint256 constant BasicOrder_order_zoneHash_ptr = 0x180;\\n// uint256 constant BasicOrder_order_salt_ptr = 0x1a0;\\n// uint256 constant BasicOrder_order_conduitKey_ptr = 0x1c0;\\nuint256 constant BasicOrder_order_counter_ptr = 0x1e0;\\nuint256 constant BasicOrder_additionalRecipients_head_ptr = 0x240;\\nuint256 constant BasicOrder_signature_ptr = 0x260;\\n\\n// Signature-related\\nbytes32 constant EIP2098_allButHighestBitMask = (\\n 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\\n);\\nbytes32 constant ECDSA_twentySeventhAndTwentyEighthBytesSet = (\\n 0x0000000000000000000000000000000000000000000000000000000101000000\\n);\\nuint256 constant ECDSA_MaxLength = 65;\\nuint256 constant ECDSA_signature_s_offset = 0x40;\\nuint256 constant ECDSA_signature_v_offset = 0x60;\\n\\nbytes32 constant EIP1271_isValidSignature_selector = (\\n 0x1626ba7e00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant EIP1271_isValidSignature_signatureHead_negativeOffset = 0x20;\\nuint256 constant EIP1271_isValidSignature_digest_negativeOffset = 0x40;\\nuint256 constant EIP1271_isValidSignature_selector_negativeOffset = 0x44;\\nuint256 constant EIP1271_isValidSignature_calldata_baseLength = 0x64;\\n\\nuint256 constant EIP1271_isValidSignature_signature_head_offset = 0x40;\\n\\n// abi.encodeWithSignature(\\\"NoContract(address)\\\")\\nuint256 constant NoContract_error_signature = (\\n 0x5f15d67200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant NoContract_error_sig_ptr = 0x0;\\nuint256 constant NoContract_error_token_ptr = 0x4;\\nuint256 constant NoContract_error_length = 0x24; // 4 + 32 == 36\\n\\nuint256 constant EIP_712_PREFIX = (\\n 0x1901000000000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant ExtraGasBuffer = 0x20;\\nuint256 constant CostPerWord = 3;\\nuint256 constant MemoryExpansionCoefficient = 0x200; // 512\\n\\nuint256 constant Create2AddressDerivation_ptr = 0x0b;\\nuint256 constant Create2AddressDerivation_length = 0x55;\\n\\nuint256 constant MaskOverByteTwelve = (\\n 0x0000000000000000000000ff0000000000000000000000000000000000000000\\n);\\n\\nuint256 constant MaskOverLastTwentyBytes = (\\n 0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff\\n);\\n\\nuint256 constant MaskOverFirstFourBytes = (\\n 0xffffffff00000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant Conduit_execute_signature = (\\n 0x4ce34aa200000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant MaxUint8 = 0xff;\\nuint256 constant MaxUint120 = 0xffffffffffffffffffffffffffffff;\\n\\nuint256 constant Conduit_execute_ConduitTransfer_ptr = 0x20;\\nuint256 constant Conduit_execute_ConduitTransfer_length = 0x01;\\n\\nuint256 constant Conduit_execute_ConduitTransfer_offset_ptr = 0x04;\\nuint256 constant Conduit_execute_ConduitTransfer_length_ptr = 0x24;\\nuint256 constant Conduit_execute_transferItemType_ptr = 0x44;\\nuint256 constant Conduit_execute_transferToken_ptr = 0x64;\\nuint256 constant Conduit_execute_transferFrom_ptr = 0x84;\\nuint256 constant Conduit_execute_transferTo_ptr = 0xa4;\\nuint256 constant Conduit_execute_transferIdentifier_ptr = 0xc4;\\nuint256 constant Conduit_execute_transferAmount_ptr = 0xe4;\\n\\nuint256 constant OneConduitExecute_size = 0x104;\\n\\n// Sentinel value to indicate that the conduit accumulator is not armed.\\nuint256 constant AccumulatorDisarmed = 0x20;\\nuint256 constant AccumulatorArmed = 0x40;\\nuint256 constant Accumulator_conduitKey_ptr = 0x20;\\nuint256 constant Accumulator_selector_ptr = 0x40;\\nuint256 constant Accumulator_array_offset_ptr = 0x44;\\nuint256 constant Accumulator_array_length_ptr = 0x64;\\n\\nuint256 constant Accumulator_itemSizeOffsetDifference = 0x3c;\\n\\nuint256 constant Accumulator_array_offset = 0x20;\\nuint256 constant Conduit_transferItem_size = 0xc0;\\nuint256 constant Conduit_transferItem_token_ptr = 0x20;\\nuint256 constant Conduit_transferItem_from_ptr = 0x40;\\nuint256 constant Conduit_transferItem_to_ptr = 0x60;\\nuint256 constant Conduit_transferItem_identifier_ptr = 0x80;\\nuint256 constant Conduit_transferItem_amount_ptr = 0xa0;\\n\\n// Declare constant for errors related to amount derivation.\\n// error InexactFraction() @ AmountDerivationErrors.sol\\nuint256 constant InexactFraction_error_signature = (\\n 0xc63cf08900000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant InexactFraction_error_len = 0x04;\\n\\n// Declare constant for errors related to signature verification.\\nuint256 constant Ecrecover_precompile = 1;\\nuint256 constant Ecrecover_args_size = 0x80;\\nuint256 constant Signature_lower_v = 27;\\n\\n// error BadSignatureV(uint8) @ SignatureVerificationErrors.sol\\nuint256 constant BadSignatureV_error_signature = (\\n 0x1f003d0a00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant BadSignatureV_error_offset = 0x04;\\nuint256 constant BadSignatureV_error_length = 0x24;\\n\\n// error InvalidSigner() @ SignatureVerificationErrors.sol\\nuint256 constant InvalidSigner_error_signature = (\\n 0x815e1d6400000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant InvalidSigner_error_length = 0x04;\\n\\n// error InvalidSignature() @ SignatureVerificationErrors.sol\\nuint256 constant InvalidSignature_error_signature = (\\n 0x8baa579f00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant InvalidSignature_error_length = 0x04;\\n\\n// error BadContractSignature() @ SignatureVerificationErrors.sol\\nuint256 constant BadContractSignature_error_signature = (\\n 0x4f7fb80d00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant BadContractSignature_error_length = 0x04;\\n\\nuint256 constant NumBitsAfterSelector = 0xe0;\\n\\n// 69 is the lowest modulus for which the remainder\\n// of every selector other than the two match functions\\n// is greater than those of the match functions.\\nuint256 constant NonMatchSelector_MagicModulus = 69;\\n// Of the two match function selectors, the highest\\n// remainder modulo 69 is 29.\\nuint256 constant NonMatchSelector_MagicRemainder = 0x1d;\\n\",\"keccak256\":\"0xa932563f00b8cbf6e403247d8633211c581904481e67b64f085346c456ae5e80\",\"license\":\"MIT\"},\"seaport/contracts/lib/ConsiderationEnums.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nenum OrderType {\\n // 0: no partial fills, anyone can execute\\n FULL_OPEN,\\n\\n // 1: partial fills supported, anyone can execute\\n PARTIAL_OPEN,\\n\\n // 2: no partial fills, only offerer or zone can execute\\n FULL_RESTRICTED,\\n\\n // 3: partial fills supported, only offerer or zone can execute\\n PARTIAL_RESTRICTED\\n}\\n\\n// prettier-ignore\\nenum BasicOrderType {\\n // 0: no partial fills, anyone can execute\\n ETH_TO_ERC721_FULL_OPEN,\\n\\n // 1: partial fills supported, anyone can execute\\n ETH_TO_ERC721_PARTIAL_OPEN,\\n\\n // 2: no partial fills, only offerer or zone can execute\\n ETH_TO_ERC721_FULL_RESTRICTED,\\n\\n // 3: partial fills supported, only offerer or zone can execute\\n ETH_TO_ERC721_PARTIAL_RESTRICTED,\\n\\n // 4: no partial fills, anyone can execute\\n ETH_TO_ERC1155_FULL_OPEN,\\n\\n // 5: partial fills supported, anyone can execute\\n ETH_TO_ERC1155_PARTIAL_OPEN,\\n\\n // 6: no partial fills, only offerer or zone can execute\\n ETH_TO_ERC1155_FULL_RESTRICTED,\\n\\n // 7: partial fills supported, only offerer or zone can execute\\n ETH_TO_ERC1155_PARTIAL_RESTRICTED,\\n\\n // 8: no partial fills, anyone can execute\\n ERC20_TO_ERC721_FULL_OPEN,\\n\\n // 9: partial fills supported, anyone can execute\\n ERC20_TO_ERC721_PARTIAL_OPEN,\\n\\n // 10: no partial fills, only offerer or zone can execute\\n ERC20_TO_ERC721_FULL_RESTRICTED,\\n\\n // 11: partial fills supported, only offerer or zone can execute\\n ERC20_TO_ERC721_PARTIAL_RESTRICTED,\\n\\n // 12: no partial fills, anyone can execute\\n ERC20_TO_ERC1155_FULL_OPEN,\\n\\n // 13: partial fills supported, anyone can execute\\n ERC20_TO_ERC1155_PARTIAL_OPEN,\\n\\n // 14: no partial fills, only offerer or zone can execute\\n ERC20_TO_ERC1155_FULL_RESTRICTED,\\n\\n // 15: partial fills supported, only offerer or zone can execute\\n ERC20_TO_ERC1155_PARTIAL_RESTRICTED,\\n\\n // 16: no partial fills, anyone can execute\\n ERC721_TO_ERC20_FULL_OPEN,\\n\\n // 17: partial fills supported, anyone can execute\\n ERC721_TO_ERC20_PARTIAL_OPEN,\\n\\n // 18: no partial fills, only offerer or zone can execute\\n ERC721_TO_ERC20_FULL_RESTRICTED,\\n\\n // 19: partial fills supported, only offerer or zone can execute\\n ERC721_TO_ERC20_PARTIAL_RESTRICTED,\\n\\n // 20: no partial fills, anyone can execute\\n ERC1155_TO_ERC20_FULL_OPEN,\\n\\n // 21: partial fills supported, anyone can execute\\n ERC1155_TO_ERC20_PARTIAL_OPEN,\\n\\n // 22: no partial fills, only offerer or zone can execute\\n ERC1155_TO_ERC20_FULL_RESTRICTED,\\n\\n // 23: partial fills supported, only offerer or zone can execute\\n ERC1155_TO_ERC20_PARTIAL_RESTRICTED\\n}\\n\\n// prettier-ignore\\nenum BasicOrderRouteType {\\n // 0: provide Ether (or other native token) to receive offered ERC721 item.\\n ETH_TO_ERC721,\\n\\n // 1: provide Ether (or other native token) to receive offered ERC1155 item.\\n ETH_TO_ERC1155,\\n\\n // 2: provide ERC20 item to receive offered ERC721 item.\\n ERC20_TO_ERC721,\\n\\n // 3: provide ERC20 item to receive offered ERC1155 item.\\n ERC20_TO_ERC1155,\\n\\n // 4: provide ERC721 item to receive offered ERC20 item.\\n ERC721_TO_ERC20,\\n\\n // 5: provide ERC1155 item to receive offered ERC20 item.\\n ERC1155_TO_ERC20\\n}\\n\\n// prettier-ignore\\nenum ItemType {\\n // 0: ETH on mainnet, MATIC on polygon, etc.\\n NATIVE,\\n\\n // 1: ERC20 items (ERC777 and ERC20 analogues could also technically work)\\n ERC20,\\n\\n // 2: ERC721 items\\n ERC721,\\n\\n // 3: ERC1155 items\\n ERC1155,\\n\\n // 4: ERC721 items where a number of tokenIds are supported\\n ERC721_WITH_CRITERIA,\\n\\n // 5: ERC1155 items where a number of ids are supported\\n ERC1155_WITH_CRITERIA\\n}\\n\\n// prettier-ignore\\nenum Side {\\n // 0: Items that can be spent\\n OFFER,\\n\\n // 1: Items that must be received\\n CONSIDERATION\\n}\\n\",\"keccak256\":\"0xe78faea2c9d9322ca557af34e8d576fe21dab9c995f0657d34ba6c4e94fe9c0f\",\"license\":\"MIT\"},\"seaport/contracts/lib/ConsiderationStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n OrderType,\\n BasicOrderType,\\n ItemType,\\n Side\\n} from \\\"./ConsiderationEnums.sol\\\";\\n\\n/**\\n * @dev An order contains eleven components: an offerer, a zone (or account that\\n * can cancel the order or restrict who can fulfill the order depending on\\n * the type), the order type (specifying partial fill support as well as\\n * restricted order status), the start and end time, a hash that will be\\n * provided to the zone when validating restricted orders, a salt, a key\\n * corresponding to a given conduit, a counter, and an arbitrary number of\\n * offer items that can be spent along with consideration items that must\\n * be received by their respective recipient.\\n */\\nstruct OrderComponents {\\n address offerer;\\n address zone;\\n OfferItem[] offer;\\n ConsiderationItem[] consideration;\\n OrderType orderType;\\n uint256 startTime;\\n uint256 endTime;\\n bytes32 zoneHash;\\n uint256 salt;\\n bytes32 conduitKey;\\n uint256 counter;\\n}\\n\\n/**\\n * @dev An offer item has five components: an item type (ETH or other native\\n * tokens, ERC20, ERC721, and ERC1155, as well as criteria-based ERC721 and\\n * ERC1155), a token address, a dual-purpose \\\"identifierOrCriteria\\\"\\n * component that will either represent a tokenId or a merkle root\\n * depending on the item type, and a start and end amount that support\\n * increasing or decreasing amounts over the duration of the respective\\n * order.\\n */\\nstruct OfferItem {\\n ItemType itemType;\\n address token;\\n uint256 identifierOrCriteria;\\n uint256 startAmount;\\n uint256 endAmount;\\n}\\n\\n/**\\n * @dev A consideration item has the same five components as an offer item and\\n * an additional sixth component designating the required recipient of the\\n * item.\\n */\\nstruct ConsiderationItem {\\n ItemType itemType;\\n address token;\\n uint256 identifierOrCriteria;\\n uint256 startAmount;\\n uint256 endAmount;\\n address payable recipient;\\n}\\n\\n/**\\n * @dev A spent item is translated from a utilized offer item and has four\\n * components: an item type (ETH or other native tokens, ERC20, ERC721, and\\n * ERC1155), a token address, a tokenId, and an amount.\\n */\\nstruct SpentItem {\\n ItemType itemType;\\n address token;\\n uint256 identifier;\\n uint256 amount;\\n}\\n\\n/**\\n * @dev A received item is translated from a utilized consideration item and has\\n * the same four components as a spent item, as well as an additional fifth\\n * component designating the required recipient of the item.\\n */\\nstruct ReceivedItem {\\n ItemType itemType;\\n address token;\\n uint256 identifier;\\n uint256 amount;\\n address payable recipient;\\n}\\n\\n/**\\n * @dev For basic orders involving ETH / native / ERC20 <=> ERC721 / ERC1155\\n * matching, a group of six functions may be called that only requires a\\n * subset of the usual order arguments. Note the use of a \\\"basicOrderType\\\"\\n * enum; this represents both the usual order type as well as the \\\"route\\\"\\n * of the basic order (a simple derivation function for the basic order\\n * type is `basicOrderType = orderType + (4 * basicOrderRoute)`.)\\n */\\nstruct BasicOrderParameters {\\n // calldata offset\\n address considerationToken; // 0x24\\n uint256 considerationIdentifier; // 0x44\\n uint256 considerationAmount; // 0x64\\n address payable offerer; // 0x84\\n address zone; // 0xa4\\n address offerToken; // 0xc4\\n uint256 offerIdentifier; // 0xe4\\n uint256 offerAmount; // 0x104\\n BasicOrderType basicOrderType; // 0x124\\n uint256 startTime; // 0x144\\n uint256 endTime; // 0x164\\n bytes32 zoneHash; // 0x184\\n uint256 salt; // 0x1a4\\n bytes32 offererConduitKey; // 0x1c4\\n bytes32 fulfillerConduitKey; // 0x1e4\\n uint256 totalOriginalAdditionalRecipients; // 0x204\\n AdditionalRecipient[] additionalRecipients; // 0x224\\n bytes signature; // 0x244\\n // Total length, excluding dynamic array data: 0x264 (580)\\n}\\n\\n/**\\n * @dev Basic orders can supply any number of additional recipients, with the\\n * implied assumption that they are supplied from the offered ETH (or other\\n * native token) or ERC20 token for the order.\\n */\\nstruct AdditionalRecipient {\\n uint256 amount;\\n address payable recipient;\\n}\\n\\n/**\\n * @dev The full set of order components, with the exception of the counter,\\n * must be supplied when fulfilling more sophisticated orders or groups of\\n * orders. The total number of original consideration items must also be\\n * supplied, as the caller may specify additional consideration items.\\n */\\nstruct OrderParameters {\\n address offerer; // 0x00\\n address zone; // 0x20\\n OfferItem[] offer; // 0x40\\n ConsiderationItem[] consideration; // 0x60\\n OrderType orderType; // 0x80\\n uint256 startTime; // 0xa0\\n uint256 endTime; // 0xc0\\n bytes32 zoneHash; // 0xe0\\n uint256 salt; // 0x100\\n bytes32 conduitKey; // 0x120\\n uint256 totalOriginalConsiderationItems; // 0x140\\n // offer.length // 0x160\\n}\\n\\n/**\\n * @dev Orders require a signature in addition to the other order parameters.\\n */\\nstruct Order {\\n OrderParameters parameters;\\n bytes signature;\\n}\\n\\n/**\\n * @dev Advanced orders include a numerator (i.e. a fraction to attempt to fill)\\n * and a denominator (the total size of the order) in addition to the\\n * signature and other order parameters. It also supports an optional field\\n * for supplying extra data; this data will be included in a staticcall to\\n * `isValidOrderIncludingExtraData` on the zone for the order if the order\\n * type is restricted and the offerer or zone are not the caller.\\n */\\nstruct AdvancedOrder {\\n OrderParameters parameters;\\n uint120 numerator;\\n uint120 denominator;\\n bytes signature;\\n bytes extraData;\\n}\\n\\n/**\\n * @dev Orders can be validated (either explicitly via `validate`, or as a\\n * consequence of a full or partial fill), specifically cancelled (they can\\n * also be cancelled in bulk via incrementing a per-zone counter), and\\n * partially or fully filled (with the fraction filled represented by a\\n * numerator and denominator).\\n */\\nstruct OrderStatus {\\n bool isValidated;\\n bool isCancelled;\\n uint120 numerator;\\n uint120 denominator;\\n}\\n\\n/**\\n * @dev A criteria resolver specifies an order, side (offer vs. consideration),\\n * and item index. It then provides a chosen identifier (i.e. tokenId)\\n * alongside a merkle proof demonstrating the identifier meets the required\\n * criteria.\\n */\\nstruct CriteriaResolver {\\n uint256 orderIndex;\\n Side side;\\n uint256 index;\\n uint256 identifier;\\n bytes32[] criteriaProof;\\n}\\n\\n/**\\n * @dev A fulfillment is applied to a group of orders. It decrements a series of\\n * offer and consideration items, then generates a single execution\\n * element. A given fulfillment can be applied to as many offer and\\n * consideration items as desired, but must contain at least one offer and\\n * at least one consideration that match. The fulfillment must also remain\\n * consistent on all key parameters across all offer items (same offerer,\\n * token, type, tokenId, and conduit preference) as well as across all\\n * consideration items (token, type, tokenId, and recipient).\\n */\\nstruct Fulfillment {\\n FulfillmentComponent[] offerComponents;\\n FulfillmentComponent[] considerationComponents;\\n}\\n\\n/**\\n * @dev Each fulfillment component contains one index referencing a specific\\n * order and another referencing a specific offer or consideration item.\\n */\\nstruct FulfillmentComponent {\\n uint256 orderIndex;\\n uint256 itemIndex;\\n}\\n\\n/**\\n * @dev An execution is triggered once all consideration items have been zeroed\\n * out. It sends the item in question from the offerer to the item's\\n * recipient, optionally sourcing approvals from either this contract\\n * directly or from the offerer's chosen conduit if one is specified. An\\n * execution is not provided as an argument, but rather is derived via\\n * orders, criteria resolvers, and fulfillments (where the total number of\\n * executions will be less than or equal to the total number of indicated\\n * fulfillments) and returned as part of `matchOrders`.\\n */\\nstruct Execution {\\n ReceivedItem item;\\n address offerer;\\n bytes32 conduitKey;\\n}\\n\",\"keccak256\":\"0xdff3fe285196739bcbf37437ea09cb5db6f479070fdbc8cb37de733be673d234\",\"license\":\"MIT\"},\"seaport/contracts/lib/CounterManager.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\n// prettier-ignore\\nimport {\\n ConsiderationEventsAndErrors\\n} from \\\"../interfaces/ConsiderationEventsAndErrors.sol\\\";\\n\\nimport { ReentrancyGuard } from \\\"./ReentrancyGuard.sol\\\";\\n\\n/**\\n * @title CounterManager\\n * @author 0age\\n * @notice CounterManager contains a storage mapping and related functionality\\n * for retrieving and incrementing a per-offerer counter.\\n */\\ncontract CounterManager is ConsiderationEventsAndErrors, ReentrancyGuard {\\n // Only orders signed using an offerer's current counter are fulfillable.\\n mapping(address => uint256) private _counters;\\n\\n /**\\n * @dev Internal function to cancel all orders from a given offerer with a\\n * given zone in bulk by incrementing a counter. Note that only the\\n * offerer may increment the counter.\\n *\\n * @return newCounter The new counter.\\n */\\n function _incrementCounter() internal returns (uint256 newCounter) {\\n // Ensure that the reentrancy guard is not currently set.\\n _assertNonReentrant();\\n\\n // Skip overflow check as counter cannot be incremented that far.\\n unchecked {\\n // Increment current counter for the supplied offerer.\\n newCounter = ++_counters[msg.sender];\\n }\\n\\n // Emit an event containing the new counter.\\n emit CounterIncremented(newCounter, msg.sender);\\n }\\n\\n /**\\n * @dev Internal view function to retrieve the current counter for a given\\n * offerer.\\n *\\n * @param offerer The offerer in question.\\n *\\n * @return currentCounter The current counter.\\n */\\n function _getCounter(address offerer)\\n internal\\n view\\n returns (uint256 currentCounter)\\n {\\n // Return the counter for the supplied offerer.\\n currentCounter = _counters[offerer];\\n }\\n}\\n\",\"keccak256\":\"0xa56f43a4c52412010da9c268c511035cc7d021e28e90d3570ab4a59af70d6385\",\"license\":\"MIT\"},\"seaport/contracts/lib/CriteriaResolution.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ItemType, Side } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OfferItem,\\n ConsiderationItem,\\n OrderParameters,\\n AdvancedOrder,\\n CriteriaResolver\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n CriteriaResolutionErrors\\n} from \\\"../interfaces/CriteriaResolutionErrors.sol\\\";\\n\\n/**\\n * @title CriteriaResolution\\n * @author 0age\\n * @notice CriteriaResolution contains a collection of pure functions related to\\n * resolving criteria-based items.\\n */\\ncontract CriteriaResolution is CriteriaResolutionErrors {\\n /**\\n * @dev Internal pure function to apply criteria resolvers containing\\n * specific token identifiers and associated proofs to order items.\\n *\\n * @param advancedOrders The orders to apply criteria resolvers to.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific order as well as that\\n * order's offer or consideration, a token\\n * identifier, and a proof that the supplied token\\n * identifier is contained in the order's merkle\\n * root. Note that a root of zero indicates that\\n * any transferable token identifier is valid and\\n * that no proof needs to be supplied.\\n */\\n function _applyCriteriaResolvers(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] memory criteriaResolvers\\n ) internal pure {\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Retrieve length of criteria resolvers array and place on stack.\\n uint256 totalCriteriaResolvers = criteriaResolvers.length;\\n\\n // Retrieve length of orders array and place on stack.\\n uint256 totalAdvancedOrders = advancedOrders.length;\\n\\n // Iterate over each criteria resolver.\\n for (uint256 i = 0; i < totalCriteriaResolvers; ++i) {\\n // Retrieve the criteria resolver.\\n CriteriaResolver memory criteriaResolver = (\\n criteriaResolvers[i]\\n );\\n\\n // Read the order index from memory and place it on the stack.\\n uint256 orderIndex = criteriaResolver.orderIndex;\\n\\n // Ensure that the order index is in range.\\n if (orderIndex >= totalAdvancedOrders) {\\n revert OrderCriteriaResolverOutOfRange();\\n }\\n\\n // Skip criteria resolution for order if not fulfilled.\\n if (advancedOrders[orderIndex].numerator == 0) {\\n continue;\\n }\\n\\n // Retrieve the parameters for the order.\\n OrderParameters memory orderParameters = (\\n advancedOrders[orderIndex].parameters\\n );\\n\\n // Read component index from memory and place it on the stack.\\n uint256 componentIndex = criteriaResolver.index;\\n\\n // Declare values for item's type and criteria.\\n ItemType itemType;\\n uint256 identifierOrCriteria;\\n\\n // If the criteria resolver refers to an offer item...\\n if (criteriaResolver.side == Side.OFFER) {\\n // Retrieve the offer.\\n OfferItem[] memory offer = orderParameters.offer;\\n\\n // Ensure that the component index is in range.\\n if (componentIndex >= offer.length) {\\n revert OfferCriteriaResolverOutOfRange();\\n }\\n\\n // Retrieve relevant item using the component index.\\n OfferItem memory offerItem = offer[componentIndex];\\n\\n // Read item type and criteria from memory & place on stack.\\n itemType = offerItem.itemType;\\n identifierOrCriteria = offerItem.identifierOrCriteria;\\n\\n // Optimistically update item type to remove criteria usage.\\n // Use assembly to operate on ItemType enum as a number.\\n ItemType newItemType;\\n assembly {\\n // Item type 4 becomes 2 and item type 5 becomes 3.\\n newItemType := sub(3, eq(itemType, 4))\\n }\\n offerItem.itemType = newItemType;\\n\\n // Optimistically update identifier w/ supplied identifier.\\n offerItem.identifierOrCriteria = criteriaResolver\\n .identifier;\\n } else {\\n // Otherwise, the resolver refers to a consideration item.\\n ConsiderationItem[] memory consideration = (\\n orderParameters.consideration\\n );\\n\\n // Ensure that the component index is in range.\\n if (componentIndex >= consideration.length) {\\n revert ConsiderationCriteriaResolverOutOfRange();\\n }\\n\\n // Retrieve relevant item using order and component index.\\n ConsiderationItem memory considerationItem = (\\n consideration[componentIndex]\\n );\\n\\n // Read item type and criteria from memory & place on stack.\\n itemType = considerationItem.itemType;\\n identifierOrCriteria = (\\n considerationItem.identifierOrCriteria\\n );\\n\\n // Optimistically update item type to remove criteria usage.\\n // Use assembly to operate on ItemType enum as a number.\\n ItemType newItemType;\\n assembly {\\n // Item type 4 becomes 2 and item type 5 becomes 3.\\n newItemType := sub(3, eq(itemType, 4))\\n }\\n considerationItem.itemType = newItemType;\\n\\n // Optimistically update identifier w/ supplied identifier.\\n considerationItem.identifierOrCriteria = (\\n criteriaResolver.identifier\\n );\\n }\\n\\n // Ensure the specified item type indicates criteria usage.\\n if (!_isItemWithCriteria(itemType)) {\\n revert CriteriaNotEnabledForItem();\\n }\\n\\n // If criteria is not 0 (i.e. a collection-wide offer)...\\n if (identifierOrCriteria != uint256(0)) {\\n // Verify identifier inclusion in criteria root using proof.\\n _verifyProof(\\n criteriaResolver.identifier,\\n identifierOrCriteria,\\n criteriaResolver.criteriaProof\\n );\\n }\\n }\\n\\n // Iterate over each advanced order.\\n for (uint256 i = 0; i < totalAdvancedOrders; ++i) {\\n // Retrieve the advanced order.\\n AdvancedOrder memory advancedOrder = advancedOrders[i];\\n\\n // Skip criteria resolution for order if not fulfilled.\\n if (advancedOrder.numerator == 0) {\\n continue;\\n }\\n\\n // Retrieve the parameters for the order.\\n OrderParameters memory orderParameters = (\\n advancedOrder.parameters\\n );\\n\\n // Read consideration length from memory and place on stack.\\n uint256 totalItems = orderParameters.consideration.length;\\n\\n // Iterate over each consideration item on the order.\\n for (uint256 j = 0; j < totalItems; ++j) {\\n // Ensure item type no longer indicates criteria usage.\\n if (\\n _isItemWithCriteria(\\n orderParameters.consideration[j].itemType\\n )\\n ) {\\n revert UnresolvedConsiderationCriteria();\\n }\\n }\\n\\n // Read offer length from memory and place on stack.\\n totalItems = orderParameters.offer.length;\\n\\n // Iterate over each offer item on the order.\\n for (uint256 j = 0; j < totalItems; ++j) {\\n // Ensure item type no longer indicates criteria usage.\\n if (\\n _isItemWithCriteria(orderParameters.offer[j].itemType)\\n ) {\\n revert UnresolvedOfferCriteria();\\n }\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to check whether a given item type represents\\n * a criteria-based ERC721 or ERC1155 item (e.g. an item that can be\\n * resolved to one of a number of different identifiers at the time of\\n * order fulfillment).\\n *\\n * @param itemType The item type in question.\\n *\\n * @return withCriteria A boolean indicating that the item type in question\\n * represents a criteria-based item.\\n */\\n function _isItemWithCriteria(ItemType itemType)\\n internal\\n pure\\n returns (bool withCriteria)\\n {\\n // ERC721WithCriteria is ItemType 4. ERC1155WithCriteria is ItemType 5.\\n assembly {\\n withCriteria := gt(itemType, 3)\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to ensure that a given element is contained\\n * in a merkle root via a supplied proof.\\n *\\n * @param leaf The element for which to prove inclusion.\\n * @param root The merkle root that inclusion will be proved against.\\n * @param proof The merkle proof.\\n */\\n function _verifyProof(\\n uint256 leaf,\\n uint256 root,\\n bytes32[] memory proof\\n ) internal pure {\\n // Declare a variable that will be used to determine proof validity.\\n bool isValid;\\n\\n // Utilize assembly to efficiently verify the proof against the root.\\n assembly {\\n // Store the leaf at the beginning of scratch space.\\n mstore(0, leaf)\\n\\n // Derive the hash of the leaf to use as the initial proof element.\\n let computedHash := keccak256(0, OneWord)\\n\\n // Based on: https://github.com/Rari-Capital/solmate/blob/v7/src/utils/MerkleProof.sol\\n // Get memory start location of the first element in proof array.\\n let data := add(proof, OneWord)\\n\\n // Iterate over each proof element to compute the root hash.\\n for {\\n // Left shift by 5 is equivalent to multiplying by 0x20.\\n let end := add(data, shl(5, mload(proof)))\\n } lt(data, end) {\\n // Increment by one word at a time.\\n data := add(data, OneWord)\\n } {\\n // Get the proof element.\\n let loadedData := mload(data)\\n\\n // Sort proof elements and place them in scratch space.\\n // Slot of `computedHash` in scratch space.\\n // If the condition is true: 0x20, otherwise: 0x00.\\n let scratch := shl(5, gt(computedHash, loadedData))\\n\\n // Store elements to hash contiguously in scratch space. Scratch\\n // space is 64 bytes (0x00 - 0x3f) & both elements are 32 bytes.\\n mstore(scratch, computedHash)\\n mstore(xor(scratch, OneWord), loadedData)\\n\\n // Derive the updated hash.\\n computedHash := keccak256(0, TwoWords)\\n }\\n\\n // Compare the final hash to the supplied root.\\n isValid := eq(computedHash, root)\\n }\\n\\n // Revert if computed hash does not equal supplied root.\\n if (!isValid) {\\n revert InvalidProof();\\n }\\n }\\n}\\n\",\"keccak256\":\"0x75596c0dcb664b99ca247362bebbb910f7e3fb02a04175461a7132420bffd594\",\"license\":\"MIT\"},\"seaport/contracts/lib/Executor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ConduitInterface } from \\\"../interfaces/ConduitInterface.sol\\\";\\n\\nimport { ConduitItemType } from \\\"../conduit/lib/ConduitEnums.sol\\\";\\n\\nimport { ItemType } from \\\"./ConsiderationEnums.sol\\\";\\n\\nimport { ReceivedItem } from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { Verifiers } from \\\"./Verifiers.sol\\\";\\n\\nimport { TokenTransferrer } from \\\"./TokenTransferrer.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title Executor\\n * @author 0age\\n * @notice Executor contains functions related to processing executions (i.e.\\n * transferring items, either directly or via conduits).\\n */\\ncontract Executor is Verifiers, TokenTransferrer {\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) Verifiers(conduitController) {}\\n\\n /**\\n * @dev Internal function to transfer a given item, either directly or via\\n * a corresponding conduit.\\n *\\n * @param item The item to transfer, including an amount and a\\n * recipient.\\n * @param from The account supplying the item.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _transfer(\\n ReceivedItem memory item,\\n address from,\\n bytes32 conduitKey,\\n bytes memory accumulator\\n ) internal {\\n // If the item type indicates Ether or a native token...\\n if (item.itemType == ItemType.NATIVE) {\\n // Ensure neither the token nor the identifier parameters are set.\\n if ((uint160(item.token) | item.identifier) != 0) {\\n revert UnusedItemParameters();\\n }\\n\\n // transfer the native tokens to the recipient.\\n _transferEth(item.recipient, item.amount);\\n } else if (item.itemType == ItemType.ERC20) {\\n // Ensure that no identifier is supplied.\\n if (item.identifier != 0) {\\n revert UnusedItemParameters();\\n }\\n\\n // Transfer ERC20 tokens from the source to the recipient.\\n _transferERC20(\\n item.token,\\n from,\\n item.recipient,\\n item.amount,\\n conduitKey,\\n accumulator\\n );\\n } else if (item.itemType == ItemType.ERC721) {\\n // Transfer ERC721 token from the source to the recipient.\\n _transferERC721(\\n item.token,\\n from,\\n item.recipient,\\n item.identifier,\\n item.amount,\\n conduitKey,\\n accumulator\\n );\\n } else {\\n // Transfer ERC1155 token from the source to the recipient.\\n _transferERC1155(\\n item.token,\\n from,\\n item.recipient,\\n item.identifier,\\n item.amount,\\n conduitKey,\\n accumulator\\n );\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer an individual ERC721 or ERC1155 item\\n * from a given originator to a given recipient. The accumulator will\\n * be bypassed, meaning that this function should be utilized in cases\\n * where multiple item transfers can be accumulated into a single\\n * conduit call. Sufficient approvals must be set, either on the\\n * respective conduit or on this contract itself.\\n *\\n * @param itemType The type of item to transfer, either ERC721 or ERC1155.\\n * @param token The token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer.\\n * @param amount The amount to transfer.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n */\\n function _transferIndividual721Or1155Item(\\n ItemType itemType,\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount,\\n bytes32 conduitKey\\n ) internal {\\n // Determine if the transfer is to be performed via a conduit.\\n if (conduitKey != bytes32(0)) {\\n // Use free memory pointer as calldata offset for the conduit call.\\n uint256 callDataOffset;\\n\\n // Utilize assembly to place each argument in free memory.\\n assembly {\\n // Retrieve the free memory pointer and use it as the offset.\\n callDataOffset := mload(FreeMemoryPointerSlot)\\n\\n // Write ConduitInterface.execute.selector to memory.\\n mstore(callDataOffset, Conduit_execute_signature)\\n\\n // Write the offset to the ConduitTransfer array in memory.\\n mstore(\\n add(\\n callDataOffset,\\n Conduit_execute_ConduitTransfer_offset_ptr\\n ),\\n Conduit_execute_ConduitTransfer_ptr\\n )\\n\\n // Write the length of the ConduitTransfer array to memory.\\n mstore(\\n add(\\n callDataOffset,\\n Conduit_execute_ConduitTransfer_length_ptr\\n ),\\n Conduit_execute_ConduitTransfer_length\\n )\\n\\n // Write the item type to memory.\\n mstore(\\n add(callDataOffset, Conduit_execute_transferItemType_ptr),\\n itemType\\n )\\n\\n // Write the token to memory.\\n mstore(\\n add(callDataOffset, Conduit_execute_transferToken_ptr),\\n token\\n )\\n\\n // Write the transfer source to memory.\\n mstore(\\n add(callDataOffset, Conduit_execute_transferFrom_ptr),\\n from\\n )\\n\\n // Write the transfer recipient to memory.\\n mstore(add(callDataOffset, Conduit_execute_transferTo_ptr), to)\\n\\n // Write the token identifier to memory.\\n mstore(\\n add(callDataOffset, Conduit_execute_transferIdentifier_ptr),\\n identifier\\n )\\n\\n // Write the transfer amount to memory.\\n mstore(\\n add(callDataOffset, Conduit_execute_transferAmount_ptr),\\n amount\\n )\\n }\\n\\n // Perform the call to the conduit.\\n _callConduitUsingOffsets(\\n conduitKey,\\n callDataOffset,\\n OneConduitExecute_size\\n );\\n } else {\\n // Otherwise, determine whether it is an ERC721 or ERC1155 item.\\n if (itemType == ItemType.ERC721) {\\n // Ensure that exactly one 721 item is being transferred.\\n if (amount != 1) {\\n revert InvalidERC721TransferAmount();\\n }\\n\\n // Perform transfer via the token contract directly.\\n _performERC721Transfer(token, from, to, identifier);\\n } else {\\n // Perform transfer via the token contract directly.\\n _performERC1155Transfer(token, from, to, identifier, amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer Ether or other native tokens to a\\n * given recipient.\\n *\\n * @param to The recipient of the transfer.\\n * @param amount The amount to transfer.\\n */\\n function _transferEth(address payable to, uint256 amount) internal {\\n // Ensure that the supplied amount is non-zero.\\n _assertNonZeroAmount(amount);\\n\\n // Declare a variable indicating whether the call was successful or not.\\n bool success;\\n\\n assembly {\\n // Transfer the ETH and store if it succeeded or not.\\n success := call(gas(), to, amount, 0, 0, 0, 0)\\n }\\n\\n // If the call fails...\\n if (!success) {\\n // Revert and pass the revert reason along if one was returned.\\n _revertWithReasonIfOneIsReturned();\\n\\n // Otherwise, revert with a generic error message.\\n revert EtherTransferGenericFailure(to, amount);\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC20 tokens from a given originator\\n * to a given recipient using a given conduit if applicable. Sufficient\\n * approvals must be set on this contract or on a respective conduit.\\n *\\n * @param token The ERC20 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param amount The amount to transfer.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _transferERC20(\\n address token,\\n address from,\\n address to,\\n uint256 amount,\\n bytes32 conduitKey,\\n bytes memory accumulator\\n ) internal {\\n // Ensure that the supplied amount is non-zero.\\n _assertNonZeroAmount(amount);\\n\\n // Trigger accumulated transfers if the conduits differ.\\n _triggerIfArmedAndNotAccumulatable(accumulator, conduitKey);\\n\\n // If no conduit has been specified...\\n if (conduitKey == bytes32(0)) {\\n // Perform the token transfer directly.\\n _performERC20Transfer(token, from, to, amount);\\n } else {\\n // Insert the call to the conduit into the accumulator.\\n _insert(\\n conduitKey,\\n accumulator,\\n ConduitItemType.ERC20,\\n token,\\n from,\\n to,\\n uint256(0),\\n amount\\n );\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer a single ERC721 token from a given\\n * originator to a given recipient. Sufficient approvals must be set,\\n * either on the respective conduit or on this contract itself.\\n *\\n * @param token The ERC721 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer (must be 1 for ERC721).\\n * @param amount The amount to transfer.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _transferERC721(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount,\\n bytes32 conduitKey,\\n bytes memory accumulator\\n ) internal {\\n // Trigger accumulated transfers if the conduits differ.\\n _triggerIfArmedAndNotAccumulatable(accumulator, conduitKey);\\n\\n // If no conduit has been specified...\\n if (conduitKey == bytes32(0)) {\\n // Ensure that exactly one 721 item is being transferred.\\n if (amount != 1) {\\n revert InvalidERC721TransferAmount();\\n }\\n\\n // Perform transfer via the token contract directly.\\n _performERC721Transfer(token, from, to, identifier);\\n } else {\\n // Insert the call to the conduit into the accumulator.\\n _insert(\\n conduitKey,\\n accumulator,\\n ConduitItemType.ERC721,\\n token,\\n from,\\n to,\\n identifier,\\n amount\\n );\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given originator\\n * to a given recipient. Sufficient approvals must be set, either on\\n * the respective conduit or on this contract itself.\\n *\\n * @param token The ERC1155 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The id to transfer.\\n * @param amount The amount to transfer.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _transferERC1155(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount,\\n bytes32 conduitKey,\\n bytes memory accumulator\\n ) internal {\\n // Ensure that the supplied amount is non-zero.\\n _assertNonZeroAmount(amount);\\n\\n // Trigger accumulated transfers if the conduits differ.\\n _triggerIfArmedAndNotAccumulatable(accumulator, conduitKey);\\n\\n // If no conduit has been specified...\\n if (conduitKey == bytes32(0)) {\\n // Perform transfer via the token contract directly.\\n _performERC1155Transfer(token, from, to, identifier, amount);\\n } else {\\n // Insert the call to the conduit into the accumulator.\\n _insert(\\n conduitKey,\\n accumulator,\\n ConduitItemType.ERC1155,\\n token,\\n from,\\n to,\\n identifier,\\n amount\\n );\\n }\\n }\\n\\n /**\\n * @dev Internal function to trigger a call to the conduit currently held by\\n * the accumulator if the accumulator contains item transfers (i.e. it\\n * is \\\"armed\\\") and the supplied conduit key does not match the key held\\n * by the accumulator.\\n *\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n */\\n function _triggerIfArmedAndNotAccumulatable(\\n bytes memory accumulator,\\n bytes32 conduitKey\\n ) internal {\\n // Retrieve the current conduit key from the accumulator.\\n bytes32 accumulatorConduitKey = _getAccumulatorConduitKey(accumulator);\\n\\n // Perform conduit call if the set key does not match the supplied key.\\n if (accumulatorConduitKey != conduitKey) {\\n _triggerIfArmed(accumulator);\\n }\\n }\\n\\n /**\\n * @dev Internal function to trigger a call to the conduit currently held by\\n * the accumulator if the accumulator contains item transfers (i.e. it\\n * is \\\"armed\\\").\\n *\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _triggerIfArmed(bytes memory accumulator) internal {\\n // Exit if the accumulator is not \\\"armed\\\".\\n if (accumulator.length != AccumulatorArmed) {\\n return;\\n }\\n\\n // Retrieve the current conduit key from the accumulator.\\n bytes32 accumulatorConduitKey = _getAccumulatorConduitKey(accumulator);\\n\\n // Perform conduit call.\\n _trigger(accumulatorConduitKey, accumulator);\\n }\\n\\n /**\\n * @dev Internal function to trigger a call to the conduit corresponding to\\n * a given conduit key, supplying all accumulated item transfers. The\\n * accumulator will be \\\"disarmed\\\" and reset in the process.\\n *\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n */\\n function _trigger(bytes32 conduitKey, bytes memory accumulator) internal {\\n // Declare variables for offset in memory & size of calldata to conduit.\\n uint256 callDataOffset;\\n uint256 callDataSize;\\n\\n // Call the conduit with all the accumulated transfers.\\n assembly {\\n // Call begins at third word; the first is length or \\\"armed\\\" status,\\n // and the second is the current conduit key.\\n callDataOffset := add(accumulator, TwoWords)\\n\\n // 68 + items * 192\\n callDataSize := add(\\n Accumulator_array_offset_ptr,\\n mul(\\n mload(add(accumulator, Accumulator_array_length_ptr)),\\n Conduit_transferItem_size\\n )\\n )\\n }\\n\\n // Call conduit derived from conduit key & supply accumulated transfers.\\n _callConduitUsingOffsets(conduitKey, callDataOffset, callDataSize);\\n\\n // Reset accumulator length to signal that it is now \\\"disarmed\\\".\\n assembly {\\n mstore(accumulator, AccumulatorDisarmed)\\n }\\n }\\n\\n /**\\n * @dev Internal function to perform a call to the conduit corresponding to\\n * a given conduit key based on the offset and size of the calldata in\\n * question in memory.\\n *\\n * @param conduitKey A bytes32 value indicating what corresponding\\n * conduit, if any, to source token approvals from.\\n * The zero hash signifies that no conduit should be\\n * used, with direct approvals set on this contract.\\n * @param callDataOffset The memory pointer where calldata is contained.\\n * @param callDataSize The size of calldata in memory.\\n */\\n function _callConduitUsingOffsets(\\n bytes32 conduitKey,\\n uint256 callDataOffset,\\n uint256 callDataSize\\n ) internal {\\n // Derive the address of the conduit using the conduit key.\\n address conduit = _deriveConduit(conduitKey);\\n\\n bool success;\\n bytes4 result;\\n\\n // call the conduit.\\n assembly {\\n // Ensure first word of scratch space is empty.\\n mstore(0, 0)\\n\\n // Perform call, placing first word of return data in scratch space.\\n success := call(\\n gas(),\\n conduit,\\n 0,\\n callDataOffset,\\n callDataSize,\\n 0,\\n OneWord\\n )\\n\\n // Take value from scratch space and place it on the stack.\\n result := mload(0)\\n }\\n\\n // If the call failed...\\n if (!success) {\\n // Pass along whatever revert reason was given by the conduit.\\n _revertWithReasonIfOneIsReturned();\\n\\n // Otherwise, revert with a generic error.\\n revert InvalidCallToConduit(conduit);\\n }\\n\\n // Ensure result was extracted and matches EIP-1271 magic value.\\n if (result != ConduitInterface.execute.selector) {\\n revert InvalidConduit(conduitKey, conduit);\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to retrieve the current conduit key set for\\n * the accumulator.\\n *\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n *\\n * @return accumulatorConduitKey The conduit key currently set for the\\n * accumulator.\\n */\\n function _getAccumulatorConduitKey(bytes memory accumulator)\\n internal\\n pure\\n returns (bytes32 accumulatorConduitKey)\\n {\\n // Retrieve the current conduit key from the accumulator.\\n assembly {\\n accumulatorConduitKey := mload(\\n add(accumulator, Accumulator_conduitKey_ptr)\\n )\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to place an item transfer into an accumulator\\n * that collects a series of transfers to execute against a given\\n * conduit in a single call.\\n *\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. The zero hash\\n * signifies that no conduit should be used, with direct\\n * approvals set on this contract.\\n * @param accumulator An open-ended array that collects transfers to execute\\n * against a given conduit in a single call.\\n * @param itemType The type of the item to transfer.\\n * @param token The token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer.\\n * @param amount The amount to transfer.\\n */\\n function _insert(\\n bytes32 conduitKey,\\n bytes memory accumulator,\\n ConduitItemType itemType,\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n ) internal pure {\\n uint256 elements;\\n // \\\"Arm\\\" and prime accumulator if it's not already armed. The sentinel\\n // value is held in the length of the accumulator array.\\n if (accumulator.length == AccumulatorDisarmed) {\\n elements = 1;\\n bytes4 selector = ConduitInterface.execute.selector;\\n assembly {\\n mstore(accumulator, AccumulatorArmed) // \\\"arm\\\" the accumulator.\\n mstore(add(accumulator, Accumulator_conduitKey_ptr), conduitKey)\\n mstore(add(accumulator, Accumulator_selector_ptr), selector)\\n mstore(\\n add(accumulator, Accumulator_array_offset_ptr),\\n Accumulator_array_offset\\n )\\n mstore(add(accumulator, Accumulator_array_length_ptr), elements)\\n }\\n } else {\\n // Otherwise, increase the number of elements by one.\\n assembly {\\n elements := add(\\n mload(add(accumulator, Accumulator_array_length_ptr)),\\n 1\\n )\\n mstore(add(accumulator, Accumulator_array_length_ptr), elements)\\n }\\n }\\n\\n // Insert the item.\\n assembly {\\n let itemPointer := sub(\\n add(accumulator, mul(elements, Conduit_transferItem_size)),\\n Accumulator_itemSizeOffsetDifference\\n )\\n mstore(itemPointer, itemType)\\n mstore(add(itemPointer, Conduit_transferItem_token_ptr), token)\\n mstore(add(itemPointer, Conduit_transferItem_from_ptr), from)\\n mstore(add(itemPointer, Conduit_transferItem_to_ptr), to)\\n mstore(\\n add(itemPointer, Conduit_transferItem_identifier_ptr),\\n identifier\\n )\\n mstore(add(itemPointer, Conduit_transferItem_amount_ptr), amount)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x6b248a05b34e80beb1058bef27b6928616bb0faf2e19d86fcf54540e1f3c4c85\",\"license\":\"MIT\"},\"seaport/contracts/lib/FulfillmentApplier.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ItemType, Side } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OfferItem,\\n ConsiderationItem,\\n ReceivedItem,\\n OrderParameters,\\n AdvancedOrder,\\n Execution,\\n FulfillmentComponent\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n FulfillmentApplicationErrors\\n} from \\\"../interfaces/FulfillmentApplicationErrors.sol\\\";\\n\\n/**\\n * @title FulfillmentApplier\\n * @author 0age\\n * @notice FulfillmentApplier contains logic related to applying fulfillments,\\n * both as part of order matching (where offer items are matched to\\n * consideration items) as well as fulfilling available orders (where\\n * order items and consideration items are independently aggregated).\\n */\\ncontract FulfillmentApplier is FulfillmentApplicationErrors {\\n /**\\n * @dev Internal pure function to match offer items to consideration items\\n * on a group of orders via a supplied fulfillment.\\n *\\n * @param advancedOrders The orders to match.\\n * @param offerComponents An array designating offer components to\\n * match to consideration components.\\n * @param considerationComponents An array designating consideration\\n * components to match to offer components.\\n * Note that each consideration amount must\\n * be zero in order for the match operation\\n * to be valid.\\n *\\n * @return execution The transfer performed as a result of the fulfillment.\\n */\\n function _applyFulfillment(\\n AdvancedOrder[] memory advancedOrders,\\n FulfillmentComponent[] calldata offerComponents,\\n FulfillmentComponent[] calldata considerationComponents\\n ) internal pure returns (Execution memory execution) {\\n // Ensure 1+ of both offer and consideration components are supplied.\\n if (\\n offerComponents.length == 0 || considerationComponents.length == 0\\n ) {\\n revert OfferAndConsiderationRequiredOnFulfillment();\\n }\\n\\n // Declare a new Execution struct.\\n Execution memory considerationExecution;\\n\\n // Validate & aggregate consideration items to new Execution object.\\n _aggregateValidFulfillmentConsiderationItems(\\n advancedOrders,\\n considerationComponents,\\n considerationExecution\\n );\\n\\n // Retrieve the consideration item from the execution struct.\\n ReceivedItem memory considerationItem = considerationExecution.item;\\n\\n // Recipient does not need to be specified because it will always be set\\n // to that of the consideration.\\n // Validate & aggregate offer items to Execution object.\\n _aggregateValidFulfillmentOfferItems(\\n advancedOrders,\\n offerComponents,\\n execution\\n );\\n\\n // Ensure offer and consideration share types, tokens and identifiers.\\n if (\\n execution.item.itemType != considerationItem.itemType ||\\n execution.item.token != considerationItem.token ||\\n execution.item.identifier != considerationItem.identifier\\n ) {\\n revert MismatchedFulfillmentOfferAndConsiderationComponents();\\n }\\n\\n // If total consideration amount exceeds the offer amount...\\n if (considerationItem.amount > execution.item.amount) {\\n // Retrieve the first consideration component from the fulfillment.\\n FulfillmentComponent memory targetComponent = (\\n considerationComponents[0]\\n );\\n\\n // Skip underflow check as the conditional being true implies that\\n // considerationItem.amount > execution.item.amount.\\n unchecked {\\n // Add excess consideration item amount to original order array.\\n advancedOrders[targetComponent.orderIndex]\\n .parameters\\n .consideration[targetComponent.itemIndex]\\n .startAmount = (considerationItem.amount -\\n execution.item.amount);\\n }\\n\\n // Reduce total consideration amount to equal the offer amount.\\n considerationItem.amount = execution.item.amount;\\n } else {\\n // Retrieve the first offer component from the fulfillment.\\n FulfillmentComponent memory targetComponent = offerComponents[0];\\n\\n // Skip underflow check as the conditional being false implies that\\n // execution.item.amount >= considerationItem.amount.\\n unchecked {\\n // Add excess offer item amount to the original array of orders.\\n advancedOrders[targetComponent.orderIndex]\\n .parameters\\n .offer[targetComponent.itemIndex]\\n .startAmount = (execution.item.amount -\\n considerationItem.amount);\\n }\\n\\n // Reduce total offer amount to equal the consideration amount.\\n execution.item.amount = considerationItem.amount;\\n }\\n\\n // Reuse consideration recipient.\\n execution.item.recipient = considerationItem.recipient;\\n\\n // Return the final execution that will be triggered for relevant items.\\n return execution; // Execution(considerationItem, offerer, conduitKey);\\n }\\n\\n /**\\n * @dev Internal view function to aggregate offer or consideration items\\n * from a group of orders into a single execution via a supplied array\\n * of fulfillment components. Items that are not available to aggregate\\n * will not be included in the aggregated execution.\\n *\\n * @param advancedOrders The orders to aggregate.\\n * @param side The side (i.e. offer or consideration).\\n * @param fulfillmentComponents An array designating item components to\\n * aggregate if part of an available order.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token\\n * approvals from. The zero hash signifies that\\n * no conduit should be used, with approvals\\n * set directly on this contract.\\n * @param recipient The intended recipient for all received\\n * items.\\n *\\n * @return execution The transfer performed as a result of the fulfillment.\\n */\\n function _aggregateAvailable(\\n AdvancedOrder[] memory advancedOrders,\\n Side side,\\n FulfillmentComponent[] memory fulfillmentComponents,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n ) internal view returns (Execution memory execution) {\\n // Skip overflow / underflow checks; conditions checked or unreachable.\\n unchecked {\\n // Retrieve fulfillment components array length and place on stack.\\n // Ensure at least one fulfillment component has been supplied.\\n if (fulfillmentComponents.length == 0) {\\n revert MissingFulfillmentComponentOnAggregation(side);\\n }\\n\\n // If the fulfillment components are offer components...\\n if (side == Side.OFFER) {\\n // Set the supplied recipient on the execution item.\\n execution.item.recipient = payable(recipient);\\n\\n // Return execution for aggregated items provided by offerer.\\n _aggregateValidFulfillmentOfferItems(\\n advancedOrders,\\n fulfillmentComponents,\\n execution\\n );\\n } else {\\n // Otherwise, fulfillment components are consideration\\n // components. Return execution for aggregated items provided by\\n // the fulfiller.\\n _aggregateValidFulfillmentConsiderationItems(\\n advancedOrders,\\n fulfillmentComponents,\\n execution\\n );\\n\\n // Set the caller as the offerer on the execution.\\n execution.offerer = msg.sender;\\n\\n // Set fulfiller conduit key as the conduit key on execution.\\n execution.conduitKey = fulfillerConduitKey;\\n }\\n\\n // Set the offerer and recipient to null address if execution\\n // amount is zero. This will cause the execution item to be skipped.\\n if (execution.item.amount == 0) {\\n execution.offerer = address(0);\\n execution.item.recipient = payable(0);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to aggregate a group of offer items using\\n * supplied directives on which component items are candidates for\\n * aggregation, skipping items on orders that are not available.\\n *\\n * @param advancedOrders The orders to aggregate offer items from.\\n * @param offerComponents An array of FulfillmentComponent structs\\n * indicating the order index and item index of each\\n * candidate offer item for aggregation.\\n * @param execution The execution to apply the aggregation to.\\n */\\n function _aggregateValidFulfillmentOfferItems(\\n AdvancedOrder[] memory advancedOrders,\\n FulfillmentComponent[] memory offerComponents,\\n Execution memory execution\\n ) internal pure {\\n assembly {\\n // Declare function for reverts on invalid fulfillment data.\\n function throwInvalidFulfillmentComponentData() {\\n // Store the InvalidFulfillmentComponentData error signature.\\n mstore(0, InvalidFulfillmentComponentData_error_signature)\\n\\n // Return, supplying InvalidFulfillmentComponentData signature.\\n revert(0, InvalidFulfillmentComponentData_error_len)\\n }\\n\\n // Declare function for reverts due to arithmetic overflows.\\n function throwOverflow() {\\n // Store the Panic error signature.\\n mstore(0, Panic_error_signature)\\n\\n // Store the arithmetic (0x11) panic code as initial argument.\\n mstore(Panic_error_offset, Panic_arithmetic)\\n\\n // Return, supplying Panic signature and arithmetic code.\\n revert(0, Panic_error_length)\\n }\\n\\n // Get position in offerComponents head.\\n let fulfillmentHeadPtr := add(offerComponents, OneWord)\\n\\n // Retrieve the order index using the fulfillment pointer.\\n let orderIndex := mload(mload(fulfillmentHeadPtr))\\n\\n // Ensure that the order index is not out of range.\\n if iszero(lt(orderIndex, mload(advancedOrders))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Read advancedOrders[orderIndex] pointer from its array head.\\n let orderPtr := mload(\\n // Calculate head position of advancedOrders[orderIndex].\\n add(add(advancedOrders, OneWord), mul(orderIndex, OneWord))\\n )\\n\\n // Read the pointer to OrderParameters from the AdvancedOrder.\\n let paramsPtr := mload(orderPtr)\\n\\n // Load the offer array pointer.\\n let offerArrPtr := mload(\\n add(paramsPtr, OrderParameters_offer_head_offset)\\n )\\n\\n // Retrieve item index using an offset of the fulfillment pointer.\\n let itemIndex := mload(\\n add(mload(fulfillmentHeadPtr), Fulfillment_itemIndex_offset)\\n )\\n\\n // Only continue if the fulfillment is not invalid.\\n if iszero(lt(itemIndex, mload(offerArrPtr))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Retrieve consideration item pointer using the item index.\\n let offerItemPtr := mload(\\n add(\\n // Get pointer to beginning of receivedItem.\\n add(offerArrPtr, OneWord),\\n // Calculate offset to pointer for desired order.\\n mul(itemIndex, OneWord)\\n )\\n )\\n\\n // Declare a variable for the final aggregated item amount.\\n let amount := 0\\n\\n // Create variable to track errors encountered with amount.\\n let errorBuffer := 0\\n\\n // Only add offer amount to execution amount on a nonzero numerator.\\n if mload(add(orderPtr, AdvancedOrder_numerator_offset)) {\\n // Retrieve amount pointer using consideration item pointer.\\n let amountPtr := add(offerItemPtr, Common_amount_offset)\\n\\n // Set the amount.\\n amount := mload(amountPtr)\\n\\n // Zero out amount on item to indicate it is credited.\\n mstore(amountPtr, 0)\\n\\n // Buffer indicating whether issues were found.\\n errorBuffer := iszero(amount)\\n }\\n\\n // Retrieve the received item pointer.\\n let receivedItemPtr := mload(execution)\\n\\n // Set the item type on the received item.\\n mstore(receivedItemPtr, mload(offerItemPtr))\\n\\n // Set the token on the received item.\\n mstore(\\n add(receivedItemPtr, Common_token_offset),\\n mload(add(offerItemPtr, Common_token_offset))\\n )\\n\\n // Set the identifier on the received item.\\n mstore(\\n add(receivedItemPtr, Common_identifier_offset),\\n mload(add(offerItemPtr, Common_identifier_offset))\\n )\\n\\n // Set the offerer on returned execution using order pointer.\\n mstore(add(execution, Execution_offerer_offset), mload(paramsPtr))\\n\\n // Set conduitKey on returned execution via offset of order pointer.\\n mstore(\\n add(execution, Execution_conduit_offset),\\n mload(add(paramsPtr, OrderParameters_conduit_offset))\\n )\\n\\n // Calculate the hash of (itemType, token, identifier).\\n let dataHash := keccak256(\\n receivedItemPtr,\\n ReceivedItem_CommonParams_size\\n )\\n\\n // Get position one word past last element in head of array.\\n let endPtr := add(\\n offerComponents,\\n mul(mload(offerComponents), OneWord)\\n )\\n\\n // Iterate over remaining offer components.\\n // prettier-ignore\\n for {} lt(fulfillmentHeadPtr, endPtr) {} {\\n // Increment the pointer to the fulfillment head by one word.\\n fulfillmentHeadPtr := add(fulfillmentHeadPtr, OneWord)\\n\\n // Get the order index using the fulfillment pointer.\\n orderIndex := mload(mload(fulfillmentHeadPtr))\\n\\n // Ensure the order index is in range.\\n if iszero(lt(orderIndex, mload(advancedOrders))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Get pointer to AdvancedOrder element.\\n orderPtr := mload(\\n add(\\n add(advancedOrders, OneWord),\\n mul(orderIndex, OneWord)\\n )\\n )\\n\\n // Only continue if numerator is not zero.\\n if iszero(mload(\\n add(orderPtr, AdvancedOrder_numerator_offset)\\n )) {\\n continue\\n }\\n\\n // Read the pointer to OrderParameters from the AdvancedOrder.\\n paramsPtr := mload(orderPtr)\\n\\n // Load offer array pointer.\\n offerArrPtr := mload(\\n add(\\n paramsPtr,\\n OrderParameters_offer_head_offset\\n )\\n )\\n\\n // Get the item index using the fulfillment pointer.\\n itemIndex := mload(add(mload(fulfillmentHeadPtr), OneWord))\\n\\n // Throw if itemIndex is out of the range of array.\\n if iszero(\\n lt(itemIndex, mload(offerArrPtr))\\n ) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Retrieve offer item pointer using index.\\n offerItemPtr := mload(\\n add(\\n // Get pointer to beginning of receivedItem.\\n add(offerArrPtr, OneWord),\\n // Use offset to pointer for desired order.\\n mul(itemIndex, OneWord)\\n )\\n )\\n\\n // Retrieve amount pointer using offer item pointer.\\n let amountPtr := add(\\n offerItemPtr,\\n Common_amount_offset\\n )\\n\\n // Add offer amount to execution amount.\\n let newAmount := add(amount, mload(amountPtr))\\n\\n // Update error buffer: 1 = zero amount, 2 = overflow, 3 = both.\\n errorBuffer := or(\\n errorBuffer,\\n or(\\n shl(1, lt(newAmount, amount)),\\n iszero(mload(amountPtr))\\n )\\n )\\n\\n // Update the amount to the new, summed amount.\\n amount := newAmount\\n\\n // Zero out amount on original item to indicate it is credited.\\n mstore(amountPtr, 0)\\n\\n // Ensure the indicated item matches original item.\\n if iszero(\\n and(\\n and(\\n // The offerer must match on both items.\\n eq(\\n mload(paramsPtr),\\n mload(\\n add(execution, Execution_offerer_offset)\\n )\\n ),\\n // The conduit key must match on both items.\\n eq(\\n mload(\\n add(\\n paramsPtr,\\n OrderParameters_conduit_offset\\n )\\n ),\\n mload(\\n add(\\n execution,\\n Execution_conduit_offset\\n )\\n )\\n )\\n ),\\n // The itemType, token, and identifier must match.\\n eq(\\n dataHash,\\n keccak256(\\n offerItemPtr,\\n ReceivedItem_CommonParams_size\\n )\\n )\\n )\\n ) {\\n // Throw if any of the requirements are not met.\\n throwInvalidFulfillmentComponentData()\\n }\\n }\\n // Write final amount to execution.\\n mstore(add(mload(execution), Common_amount_offset), amount)\\n\\n // Determine whether the error buffer contains a nonzero error code.\\n if errorBuffer {\\n // If errorBuffer is 1, an item had an amount of zero.\\n if eq(errorBuffer, 1) {\\n // Store the MissingItemAmount error signature.\\n mstore(0, MissingItemAmount_error_signature)\\n\\n // Return, supplying MissingItemAmount signature.\\n revert(0, MissingItemAmount_error_len)\\n }\\n\\n // If errorBuffer is not 1 or 0, the sum overflowed.\\n // Panic!\\n throwOverflow()\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to aggregate a group of consideration items\\n * using supplied directives on which component items are candidates\\n * for aggregation, skipping items on orders that are not available.\\n *\\n * @param advancedOrders The orders to aggregate consideration\\n * items from.\\n * @param considerationComponents An array of FulfillmentComponent structs\\n * indicating the order index and item index\\n * of each candidate consideration item for\\n * aggregation.\\n * @param execution The execution to apply the aggregation to.\\n */\\n function _aggregateValidFulfillmentConsiderationItems(\\n AdvancedOrder[] memory advancedOrders,\\n FulfillmentComponent[] memory considerationComponents,\\n Execution memory execution\\n ) internal pure {\\n // Utilize assembly in order to efficiently aggregate the items.\\n assembly {\\n // Declare function for reverts on invalid fulfillment data.\\n function throwInvalidFulfillmentComponentData() {\\n // Store the InvalidFulfillmentComponentData error signature.\\n mstore(0, InvalidFulfillmentComponentData_error_signature)\\n\\n // Return, supplying InvalidFulfillmentComponentData signature.\\n revert(0, InvalidFulfillmentComponentData_error_len)\\n }\\n\\n // Declare function for reverts due to arithmetic overflows.\\n function throwOverflow() {\\n // Store the Panic error signature.\\n mstore(0, Panic_error_signature)\\n\\n // Store the arithmetic (0x11) panic code as initial argument.\\n mstore(Panic_error_offset, Panic_arithmetic)\\n\\n // Return, supplying Panic signature and arithmetic code.\\n revert(0, Panic_error_length)\\n }\\n\\n // Get position in considerationComponents head.\\n let fulfillmentHeadPtr := add(considerationComponents, OneWord)\\n\\n // Retrieve the order index using the fulfillment pointer.\\n let orderIndex := mload(mload(fulfillmentHeadPtr))\\n\\n // Ensure that the order index is not out of range.\\n if iszero(lt(orderIndex, mload(advancedOrders))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Read advancedOrders[orderIndex] pointer from its array head.\\n let orderPtr := mload(\\n // Calculate head position of advancedOrders[orderIndex].\\n add(add(advancedOrders, OneWord), mul(orderIndex, OneWord))\\n )\\n\\n // Load consideration array pointer.\\n let considerationArrPtr := mload(\\n add(\\n // Read pointer to OrderParameters from the AdvancedOrder.\\n mload(orderPtr),\\n OrderParameters_consideration_head_offset\\n )\\n )\\n\\n // Retrieve item index using an offset of the fulfillment pointer.\\n let itemIndex := mload(\\n add(mload(fulfillmentHeadPtr), Fulfillment_itemIndex_offset)\\n )\\n\\n // Ensure that the order index is not out of range.\\n if iszero(lt(itemIndex, mload(considerationArrPtr))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Retrieve consideration item pointer using the item index.\\n let considerationItemPtr := mload(\\n add(\\n // Get pointer to beginning of receivedItem.\\n add(considerationArrPtr, OneWord),\\n // Calculate offset to pointer for desired order.\\n mul(itemIndex, OneWord)\\n )\\n )\\n\\n // Declare a variable for the final aggregated item amount.\\n let amount := 0\\n\\n // Create variable to track errors encountered with amount.\\n let errorBuffer := 0\\n\\n // Only add consideration amount to execution amount if numerator is\\n // greater than zero.\\n if mload(add(orderPtr, AdvancedOrder_numerator_offset)) {\\n // Retrieve amount pointer using consideration item pointer.\\n let amountPtr := add(considerationItemPtr, Common_amount_offset)\\n\\n // Set the amount.\\n amount := mload(amountPtr)\\n\\n // Set error bit if amount is zero.\\n errorBuffer := iszero(amount)\\n\\n // Zero out amount on item to indicate it is credited.\\n mstore(amountPtr, 0)\\n }\\n\\n // Retrieve ReceivedItem pointer from Execution.\\n let receivedItem := mload(execution)\\n\\n // Set the item type on the received item.\\n mstore(receivedItem, mload(considerationItemPtr))\\n\\n // Set the token on the received item.\\n mstore(\\n add(receivedItem, Common_token_offset),\\n mload(add(considerationItemPtr, Common_token_offset))\\n )\\n\\n // Set the identifier on the received item.\\n mstore(\\n add(receivedItem, Common_identifier_offset),\\n mload(add(considerationItemPtr, Common_identifier_offset))\\n )\\n\\n // Set the recipient on the received item.\\n mstore(\\n add(receivedItem, ReceivedItem_recipient_offset),\\n mload(\\n add(\\n considerationItemPtr,\\n ConsiderationItem_recipient_offset\\n )\\n )\\n )\\n\\n // Calculate the hash of (itemType, token, identifier).\\n let dataHash := keccak256(\\n receivedItem,\\n ReceivedItem_CommonParams_size\\n )\\n\\n // Get position one word past last element in head of array.\\n let endPtr := add(\\n considerationComponents,\\n mul(mload(considerationComponents), OneWord)\\n )\\n\\n // Iterate over remaining offer components.\\n // prettier-ignore\\n for {} lt(fulfillmentHeadPtr, endPtr) {} {\\n // Increment position in considerationComponents head.\\n fulfillmentHeadPtr := add(fulfillmentHeadPtr, OneWord)\\n\\n // Get the order index using the fulfillment pointer.\\n orderIndex := mload(mload(fulfillmentHeadPtr))\\n\\n // Ensure the order index is in range.\\n if iszero(lt(orderIndex, mload(advancedOrders))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Get pointer to AdvancedOrder element.\\n orderPtr := mload(\\n add(\\n add(advancedOrders, OneWord),\\n mul(orderIndex, OneWord)\\n )\\n )\\n\\n // Only continue if numerator is not zero.\\n if iszero(\\n mload(add(orderPtr, AdvancedOrder_numerator_offset))\\n ) {\\n continue\\n }\\n\\n // Load consideration array pointer from OrderParameters.\\n considerationArrPtr := mload(\\n add(\\n // Get pointer to OrderParameters from AdvancedOrder.\\n mload(orderPtr),\\n OrderParameters_consideration_head_offset\\n )\\n )\\n\\n // Get the item index using the fulfillment pointer.\\n itemIndex := mload(add(mload(fulfillmentHeadPtr), OneWord))\\n\\n // Check if itemIndex is within the range of array.\\n if iszero(lt(itemIndex, mload(considerationArrPtr))) {\\n throwInvalidFulfillmentComponentData()\\n }\\n\\n // Retrieve consideration item pointer using index.\\n considerationItemPtr := mload(\\n add(\\n // Get pointer to beginning of receivedItem.\\n add(considerationArrPtr, OneWord),\\n // Use offset to pointer for desired order.\\n mul(itemIndex, OneWord)\\n )\\n )\\n\\n // Retrieve amount pointer using consideration item pointer.\\n let amountPtr := add(\\n considerationItemPtr,\\n Common_amount_offset\\n )\\n\\n // Add offer amount to execution amount.\\n let newAmount := add(amount, mload(amountPtr))\\n\\n // Update error buffer: 1 = zero amount, 2 = overflow, 3 = both.\\n errorBuffer := or(\\n errorBuffer,\\n or(\\n shl(1, lt(newAmount, amount)),\\n iszero(mload(amountPtr))\\n )\\n )\\n\\n // Update the amount to the new, summed amount.\\n amount := newAmount\\n\\n // Zero out amount on original item to indicate it is credited.\\n mstore(amountPtr, 0)\\n\\n // Ensure the indicated item matches original item.\\n if iszero(\\n and(\\n // Item recipients must match.\\n eq(\\n mload(\\n add(\\n considerationItemPtr,\\n ConsiderItem_recipient_offset\\n )\\n ),\\n mload(\\n add(\\n receivedItem,\\n ReceivedItem_recipient_offset\\n )\\n )\\n ),\\n // The itemType, token, identifier must match.\\n eq(\\n dataHash,\\n keccak256(\\n considerationItemPtr,\\n ReceivedItem_CommonParams_size\\n )\\n )\\n )\\n ) {\\n // Throw if any of the requirements are not met.\\n throwInvalidFulfillmentComponentData()\\n }\\n }\\n // Write final amount to execution.\\n mstore(add(receivedItem, Common_amount_offset), amount)\\n\\n // Determine whether the error buffer contains a nonzero error code.\\n if errorBuffer {\\n // If errorBuffer is 1, an item had an amount of zero.\\n if eq(errorBuffer, 1) {\\n // Store the MissingItemAmount error signature.\\n mstore(0, MissingItemAmount_error_signature)\\n\\n // Return, supplying MissingItemAmount signature.\\n revert(0, MissingItemAmount_error_len)\\n }\\n\\n // If errorBuffer is not 1 or 0, the sum overflowed.\\n // Panic!\\n throwOverflow()\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5f3a4c217732e4744e83b5e8dac1942c611d078917842e880335d23d54179b89\",\"license\":\"MIT\"},\"seaport/contracts/lib/GettersAndDerivers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { OrderParameters } from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { ConsiderationBase } from \\\"./ConsiderationBase.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title GettersAndDerivers\\n * @author 0age\\n * @notice ConsiderationInternal contains pure and internal view functions\\n * related to getting or deriving various values.\\n */\\ncontract GettersAndDerivers is ConsiderationBase {\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController)\\n ConsiderationBase(conduitController)\\n {}\\n\\n /**\\n * @dev Internal view function to derive the order hash for a given order.\\n * Note that only the original consideration items are included in the\\n * order hash, as additional consideration items may be supplied by the\\n * caller.\\n *\\n * @param orderParameters The parameters of the order to hash.\\n * @param counter The counter of the order to hash.\\n *\\n * @return orderHash The hash.\\n */\\n function _deriveOrderHash(\\n OrderParameters memory orderParameters,\\n uint256 counter\\n ) internal view returns (bytes32 orderHash) {\\n // Get length of original consideration array and place it on the stack.\\n uint256 originalConsiderationLength = (\\n orderParameters.totalOriginalConsiderationItems\\n );\\n\\n /*\\n * Memory layout for an array of structs (dynamic or not) is similar\\n * to ABI encoding of dynamic types, with a head segment followed by\\n * a data segment. The main difference is that the head of an element\\n * is a memory pointer rather than an offset.\\n */\\n\\n // Declare a variable for the derived hash of the offer array.\\n bytes32 offerHash;\\n\\n // Read offer item EIP-712 typehash from runtime code & place on stack.\\n bytes32 typeHash = _OFFER_ITEM_TYPEHASH;\\n\\n // Utilize assembly so that memory regions can be reused across hashes.\\n assembly {\\n // Retrieve the free memory pointer and place on the stack.\\n let hashArrPtr := mload(FreeMemoryPointerSlot)\\n\\n // Get the pointer to the offers array.\\n let offerArrPtr := mload(\\n add(orderParameters, OrderParameters_offer_head_offset)\\n )\\n\\n // Load the length.\\n let offerLength := mload(offerArrPtr)\\n\\n // Set the pointer to the first offer's head.\\n offerArrPtr := add(offerArrPtr, OneWord)\\n\\n // Iterate over the offer items.\\n // prettier-ignore\\n for { let i := 0 } lt(i, offerLength) {\\n i := add(i, 1)\\n } {\\n // Read the pointer to the offer data and subtract one word\\n // to get typeHash pointer.\\n let ptr := sub(mload(offerArrPtr), OneWord)\\n\\n // Read the current value before the offer data.\\n let value := mload(ptr)\\n\\n // Write the type hash to the previous word.\\n mstore(ptr, typeHash)\\n\\n // Take the EIP712 hash and store it in the hash array.\\n mstore(hashArrPtr, keccak256(ptr, EIP712_OfferItem_size))\\n\\n // Restore the previous word.\\n mstore(ptr, value)\\n\\n // Increment the array pointers by one word.\\n offerArrPtr := add(offerArrPtr, OneWord)\\n hashArrPtr := add(hashArrPtr, OneWord)\\n }\\n\\n // Derive the offer hash using the hashes of each item.\\n offerHash := keccak256(\\n mload(FreeMemoryPointerSlot),\\n mul(offerLength, OneWord)\\n )\\n }\\n\\n // Declare a variable for the derived hash of the consideration array.\\n bytes32 considerationHash;\\n\\n // Read consideration item typehash from runtime code & place on stack.\\n typeHash = _CONSIDERATION_ITEM_TYPEHASH;\\n\\n // Utilize assembly so that memory regions can be reused across hashes.\\n assembly {\\n // Retrieve the free memory pointer and place on the stack.\\n let hashArrPtr := mload(FreeMemoryPointerSlot)\\n\\n // Get the pointer to the consideration array.\\n let considerationArrPtr := add(\\n mload(\\n add(\\n orderParameters,\\n OrderParameters_consideration_head_offset\\n )\\n ),\\n OneWord\\n )\\n\\n // Iterate over the consideration items (not including tips).\\n // prettier-ignore\\n for { let i := 0 } lt(i, originalConsiderationLength) {\\n i := add(i, 1)\\n } {\\n // Read the pointer to the consideration data and subtract one\\n // word to get typeHash pointer.\\n let ptr := sub(mload(considerationArrPtr), OneWord)\\n\\n // Read the current value before the consideration data.\\n let value := mload(ptr)\\n\\n // Write the type hash to the previous word.\\n mstore(ptr, typeHash)\\n\\n // Take the EIP712 hash and store it in the hash array.\\n mstore(\\n hashArrPtr,\\n keccak256(ptr, EIP712_ConsiderationItem_size)\\n )\\n\\n // Restore the previous word.\\n mstore(ptr, value)\\n\\n // Increment the array pointers by one word.\\n considerationArrPtr := add(considerationArrPtr, OneWord)\\n hashArrPtr := add(hashArrPtr, OneWord)\\n }\\n\\n // Derive the consideration hash using the hashes of each item.\\n considerationHash := keccak256(\\n mload(FreeMemoryPointerSlot),\\n mul(originalConsiderationLength, OneWord)\\n )\\n }\\n\\n // Read order item EIP-712 typehash from runtime code & place on stack.\\n typeHash = _ORDER_TYPEHASH;\\n\\n // Utilize assembly to access derived hashes & other arguments directly.\\n assembly {\\n // Retrieve pointer to the region located just behind parameters.\\n let typeHashPtr := sub(orderParameters, OneWord)\\n\\n // Store the value at that pointer location to restore later.\\n let previousValue := mload(typeHashPtr)\\n\\n // Store the order item EIP-712 typehash at the typehash location.\\n mstore(typeHashPtr, typeHash)\\n\\n // Retrieve the pointer for the offer array head.\\n let offerHeadPtr := add(\\n orderParameters,\\n OrderParameters_offer_head_offset\\n )\\n\\n // Retrieve the data pointer referenced by the offer head.\\n let offerDataPtr := mload(offerHeadPtr)\\n\\n // Store the offer hash at the retrieved memory location.\\n mstore(offerHeadPtr, offerHash)\\n\\n // Retrieve the pointer for the consideration array head.\\n let considerationHeadPtr := add(\\n orderParameters,\\n OrderParameters_consideration_head_offset\\n )\\n\\n // Retrieve the data pointer referenced by the consideration head.\\n let considerationDataPtr := mload(considerationHeadPtr)\\n\\n // Store the consideration hash at the retrieved memory location.\\n mstore(considerationHeadPtr, considerationHash)\\n\\n // Retrieve the pointer for the counter.\\n let counterPtr := add(\\n orderParameters,\\n OrderParameters_counter_offset\\n )\\n\\n // Store the counter at the retrieved memory location.\\n mstore(counterPtr, counter)\\n\\n // Derive the order hash using the full range of order parameters.\\n orderHash := keccak256(typeHashPtr, EIP712_Order_size)\\n\\n // Restore the value previously held at typehash pointer location.\\n mstore(typeHashPtr, previousValue)\\n\\n // Restore offer data pointer at the offer head pointer location.\\n mstore(offerHeadPtr, offerDataPtr)\\n\\n // Restore consideration data pointer at the consideration head ptr.\\n mstore(considerationHeadPtr, considerationDataPtr)\\n\\n // Restore consideration item length at the counter pointer.\\n mstore(counterPtr, originalConsiderationLength)\\n }\\n }\\n\\n /**\\n * @dev Internal view function to derive the address of a given conduit\\n * using a corresponding conduit key.\\n *\\n * @param conduitKey A bytes32 value indicating what corresponding conduit,\\n * if any, to source token approvals from. This value is\\n * the \\\"salt\\\" parameter supplied by the deployer (i.e. the\\n * conduit controller) when deploying the given conduit.\\n *\\n * @return conduit The address of the conduit associated with the given\\n * conduit key.\\n */\\n function _deriveConduit(bytes32 conduitKey)\\n internal\\n view\\n returns (address conduit)\\n {\\n // Read conduit controller address from runtime and place on the stack.\\n address conduitController = address(_CONDUIT_CONTROLLER);\\n\\n // Read conduit creation code hash from runtime and place on the stack.\\n bytes32 conduitCreationCodeHash = _CONDUIT_CREATION_CODE_HASH;\\n\\n // Leverage scratch space to perform an efficient hash.\\n assembly {\\n // Retrieve the free memory pointer; it will be replaced afterwards.\\n let freeMemoryPointer := mload(FreeMemoryPointerSlot)\\n\\n // Place the control character and the conduit controller in scratch\\n // space; note that eleven bytes at the beginning are left unused.\\n mstore(0, or(MaskOverByteTwelve, conduitController))\\n\\n // Place the conduit key in the next region of scratch space.\\n mstore(OneWord, conduitKey)\\n\\n // Place conduit creation code hash in free memory pointer location.\\n mstore(TwoWords, conduitCreationCodeHash)\\n\\n // Derive conduit by hashing and applying a mask over last 20 bytes.\\n conduit := and(\\n // Hash the relevant region.\\n keccak256(\\n // The region starts at memory pointer 11.\\n Create2AddressDerivation_ptr,\\n // The region is 85 bytes long (1 + 20 + 32 + 32).\\n Create2AddressDerivation_length\\n ),\\n // The address equals the last twenty bytes of the hash.\\n MaskOverLastTwentyBytes\\n )\\n\\n // Restore the free memory pointer.\\n mstore(FreeMemoryPointerSlot, freeMemoryPointer)\\n }\\n }\\n\\n /**\\n * @dev Internal view function to get the EIP-712 domain separator. If the\\n * chainId matches the chainId set on deployment, the cached domain\\n * separator will be returned; otherwise, it will be derived from\\n * scratch.\\n *\\n * @return The domain separator.\\n */\\n function _domainSeparator() internal view returns (bytes32) {\\n // prettier-ignore\\n return block.chainid == _CHAIN_ID\\n ? _DOMAIN_SEPARATOR\\n : _deriveDomainSeparator();\\n }\\n\\n /**\\n * @dev Internal view function to retrieve configuration information for\\n * this contract.\\n *\\n * @return version The contract version.\\n * @return domainSeparator The domain separator for this contract.\\n * @return conduitController The conduit Controller set for this contract.\\n */\\n function _information()\\n internal\\n view\\n returns (\\n string memory version,\\n bytes32 domainSeparator,\\n address conduitController\\n )\\n {\\n // Derive the domain separator.\\n domainSeparator = _domainSeparator();\\n\\n // Declare variable as immutables cannot be accessed within assembly.\\n conduitController = address(_CONDUIT_CONTROLLER);\\n\\n // Allocate a string with the intended length.\\n version = new string(Version_length);\\n\\n // Set the version as data on the newly allocated string.\\n assembly {\\n mstore(add(version, OneWord), shl(Version_shift, Version))\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to efficiently derive an digest to sign for\\n * an order in accordance with EIP-712.\\n *\\n * @param domainSeparator The domain separator.\\n * @param orderHash The order hash.\\n *\\n * @return value The hash.\\n */\\n function _deriveEIP712Digest(bytes32 domainSeparator, bytes32 orderHash)\\n internal\\n pure\\n returns (bytes32 value)\\n {\\n // Leverage scratch space to perform an efficient hash.\\n assembly {\\n // Place the EIP-712 prefix at the start of scratch space.\\n mstore(0, EIP_712_PREFIX)\\n\\n // Place the domain separator in the next region of scratch space.\\n mstore(EIP712_DomainSeparator_offset, domainSeparator)\\n\\n // Place the order hash in scratch space, spilling into the first\\n // two bytes of the free memory pointer \\u2014 this should never be set\\n // as memory cannot be expanded to that size, and will be zeroed out\\n // after the hash is performed.\\n mstore(EIP712_OrderHash_offset, orderHash)\\n\\n // Hash the relevant region (65 bytes).\\n value := keccak256(0, EIP712_DigestPayload_size)\\n\\n // Clear out the dirtied bits in the memory pointer.\\n mstore(EIP712_OrderHash_offset, 0)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x0ebbfce9155cd6fd49f4a8974e8bf23d09374b50f2dbc7e28906564f7b433643\",\"license\":\"MIT\"},\"seaport/contracts/lib/LowLevelHelpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title LowLevelHelpers\\n * @author 0age\\n * @notice LowLevelHelpers contains logic for performing various low-level\\n * operations.\\n */\\ncontract LowLevelHelpers {\\n /**\\n * @dev Internal view function to staticcall an arbitrary target with given\\n * calldata. Note that no data is written to memory and no contract\\n * size check is performed.\\n *\\n * @param target The account to staticcall.\\n * @param callData The calldata to supply when staticcalling the target.\\n *\\n * @return success The status of the staticcall to the target.\\n */\\n function _staticcall(address target, bytes memory callData)\\n internal\\n view\\n returns (bool success)\\n {\\n assembly {\\n // Perform the staticcall.\\n success := staticcall(\\n gas(),\\n target,\\n add(callData, OneWord),\\n mload(callData),\\n 0,\\n 0\\n )\\n }\\n }\\n\\n /**\\n * @dev Internal view function to revert and pass along the revert reason if\\n * data was returned by the last call and that the size of that data\\n * does not exceed the currently allocated memory size.\\n */\\n function _revertWithReasonIfOneIsReturned() internal view {\\n assembly {\\n // If it returned a message, bubble it up as long as sufficient gas\\n // remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy returndata\\n // while expanding memory where necessary. Start by computing\\n // the word size of returndata and allocated memory.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to work\\n // around a Yul warning that prevents accessing msize directly\\n // when the IR pipeline is activated.\\n let msizeWords := div(mload(FreeMemoryPointerSlot), OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(sub(returnDataWords, msizeWords), CostPerWord),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas remaining;\\n // bubble up the revert data if enough gas is still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, specifying memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal pure function to determine if the first word of returndata\\n * matches an expected magic value.\\n *\\n * @param expected The expected magic value.\\n *\\n * @return A boolean indicating whether the expected value matches the one\\n * located in the first word of returndata.\\n */\\n function _doesNotMatchMagic(bytes4 expected) internal pure returns (bool) {\\n // Declare a variable for the value held by the return data buffer.\\n bytes4 result;\\n\\n // Utilize assembly in order to read directly from returndata buffer.\\n assembly {\\n // Only put result on stack if return data is exactly one word.\\n if eq(returndatasize(), OneWord) {\\n // Copy the word directly from return data into scratch space.\\n returndatacopy(0, 0, OneWord)\\n\\n // Take value from scratch space and place it on the stack.\\n result := mload(0)\\n }\\n }\\n\\n // Return a boolean indicating whether expected and located value match.\\n return result != expected;\\n }\\n}\\n\",\"keccak256\":\"0x57700a6f8f18d1cdfc8492724ef3b9f89aa143382f13794489df70c1f3fc027c\",\"license\":\"MIT\"},\"seaport/contracts/lib/OrderCombiner.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { Side, ItemType } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OfferItem,\\n ConsiderationItem,\\n ReceivedItem,\\n OrderParameters,\\n Fulfillment,\\n FulfillmentComponent,\\n Execution,\\n Order,\\n AdvancedOrder,\\n CriteriaResolver\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { OrderFulfiller } from \\\"./OrderFulfiller.sol\\\";\\n\\nimport { FulfillmentApplier } from \\\"./FulfillmentApplier.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title OrderCombiner\\n * @author 0age\\n * @notice OrderCombiner contains logic for fulfilling combinations of orders,\\n * either by matching offer items to consideration items or by\\n * fulfilling orders where available.\\n */\\ncontract OrderCombiner is OrderFulfiller, FulfillmentApplier {\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) OrderFulfiller(conduitController) {}\\n\\n /**\\n * @notice Internal function to attempt to fill a group of orders, fully or\\n * partially, with an arbitrary number of items for offer and\\n * consideration per order alongside criteria resolvers containing\\n * specific token identifiers and associated proofs. Any order that\\n * is not currently active, has already been fully filled, or has\\n * been cancelled will be omitted. Remaining offer and consideration\\n * items will then be aggregated where possible as indicated by the\\n * supplied offer and consideration component arrays and aggregated\\n * items will be transferred to the fulfiller or to each intended\\n * recipient, respectively. Note that a failing item transfer or an\\n * issue with order formatting will cause the entire batch to fail.\\n *\\n * @param advancedOrders The orders to fulfill along with the\\n * fraction of those orders to attempt to\\n * fill. Note that both the offerer and the\\n * fulfiller must first approve this\\n * contract (or a conduit if indicated by\\n * the order) to transfer any relevant\\n * tokens on their behalf and that\\n * contracts must implement\\n * `onERC1155Received` in order to receive\\n * ERC1155 tokens as consideration. Also\\n * note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount\\n * with the supplied fraction for an\\n * order's partial fill amount to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a\\n * proof that the supplied token identifier\\n * is contained in the merkle root held by\\n * the item in question's criteria element.\\n * Note that an empty criteria indicates\\n * that any (transferable) token\\n * identifier on the token in question is\\n * valid and that no associated proof needs\\n * to be supplied.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used (and\\n * direct approvals set on Consideration).\\n * @param recipient The intended recipient for all received\\n * items.\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function _fulfillAvailableAdvancedOrders(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] memory criteriaResolvers,\\n FulfillmentComponent[][] calldata offerFulfillments,\\n FulfillmentComponent[][] calldata considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n address recipient,\\n uint256 maximumFulfilled\\n )\\n internal\\n returns (bool[] memory availableOrders, Execution[] memory executions)\\n {\\n // Validate orders, apply amounts, & determine if they utilize conduits.\\n _validateOrdersAndPrepareToFulfill(\\n advancedOrders,\\n criteriaResolvers,\\n false, // Signifies that invalid orders should NOT revert.\\n maximumFulfilled,\\n recipient\\n );\\n\\n // Aggregate used offer and consideration items and execute transfers.\\n (availableOrders, executions) = _executeAvailableFulfillments(\\n advancedOrders,\\n offerFulfillments,\\n considerationFulfillments,\\n fulfillerConduitKey,\\n recipient\\n );\\n\\n // Return order fulfillment details and executions.\\n return (availableOrders, executions);\\n }\\n\\n /**\\n * @dev Internal function to validate a group of orders, update their\\n * statuses, reduce amounts by their previously filled fractions, apply\\n * criteria resolvers, and emit OrderFulfilled events.\\n *\\n * @param advancedOrders The advanced orders to validate and reduce by\\n * their previously filled amounts.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific order as well as that order's\\n * offer or consideration, a token identifier, and\\n * a proof that the supplied token identifier is\\n * contained in the order's merkle root. Note that\\n * a root of zero indicates that any transferable\\n * token identifier is valid and that no proof\\n * needs to be supplied.\\n * @param revertOnInvalid A boolean indicating whether to revert on any\\n * order being invalid; setting this to false will\\n * instead cause the invalid order to be skipped.\\n * @param maximumFulfilled The maximum number of orders to fulfill.\\n * @param recipient The intended recipient for all received items.\\n */\\n function _validateOrdersAndPrepareToFulfill(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] memory criteriaResolvers,\\n bool revertOnInvalid,\\n uint256 maximumFulfilled,\\n address recipient\\n ) internal {\\n // Ensure this function cannot be triggered during a reentrant call.\\n _setReentrancyGuard();\\n\\n // Read length of orders array and place on the stack.\\n uint256 totalOrders = advancedOrders.length;\\n\\n // Track the order hash for each order being fulfilled.\\n bytes32[] memory orderHashes = new bytes32[](totalOrders);\\n\\n // Override orderHashes length to zero after memory has been allocated.\\n assembly {\\n mstore(orderHashes, 0)\\n }\\n\\n // Declare an error buffer indicating status of any native offer items.\\n // {00} == 0 => In a match function, no native offer items: allow.\\n // {01} == 1 => In a match function, some native offer items: allow.\\n // {10} == 2 => Not in a match function, no native offer items: allow.\\n // {11} == 3 => Not in a match function, some native offer items: THROW.\\n uint256 invalidNativeOfferItemErrorBuffer;\\n\\n // Use assembly to set the value for the second bit of the error buffer.\\n assembly {\\n // Use the second bit of the error buffer to indicate whether the\\n // current function is not matchAdvancedOrders or matchOrders.\\n invalidNativeOfferItemErrorBuffer := shl(\\n 1,\\n gt(\\n // Take the remainder of the selector modulo a magic value.\\n mod(\\n shr(NumBitsAfterSelector, calldataload(0)),\\n NonMatchSelector_MagicModulus\\n ),\\n // Check if remainder is higher than the greatest remainder\\n // of the two match selectors modulo the magic value.\\n NonMatchSelector_MagicRemainder\\n )\\n )\\n }\\n\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Iterate over each order.\\n for (uint256 i = 0; i < totalOrders; ++i) {\\n // Retrieve the current order.\\n AdvancedOrder memory advancedOrder = advancedOrders[i];\\n\\n // Determine if max number orders have already been fulfilled.\\n if (maximumFulfilled == 0) {\\n // Mark fill fraction as zero as the order will not be used.\\n advancedOrder.numerator = 0;\\n\\n // Update the length of the orderHashes array.\\n assembly {\\n mstore(orderHashes, add(i, 1))\\n }\\n\\n // Continue iterating through the remaining orders.\\n continue;\\n }\\n\\n // Validate it, update status, and determine fraction to fill.\\n (\\n bytes32 orderHash,\\n uint256 numerator,\\n uint256 denominator\\n ) = _validateOrderAndUpdateStatus(\\n advancedOrder,\\n criteriaResolvers,\\n revertOnInvalid,\\n orderHashes\\n );\\n\\n // Update the length of the orderHashes array.\\n assembly {\\n mstore(orderHashes, add(i, 1))\\n }\\n\\n // Do not track hash or adjust prices if order is not fulfilled.\\n if (numerator == 0) {\\n // Mark fill fraction as zero if the order is not fulfilled.\\n advancedOrder.numerator = 0;\\n\\n // Continue iterating through the remaining orders.\\n continue;\\n }\\n\\n // Otherwise, track the order hash in question.\\n orderHashes[i] = orderHash;\\n\\n // Decrement the number of fulfilled orders.\\n // Skip underflow check as the condition before\\n // implies that maximumFulfilled > 0.\\n maximumFulfilled--;\\n\\n // Place the start time for the order on the stack.\\n uint256 startTime = advancedOrder.parameters.startTime;\\n\\n // Place the end time for the order on the stack.\\n uint256 endTime = advancedOrder.parameters.endTime;\\n\\n // Retrieve array of offer items for the order in question.\\n OfferItem[] memory offer = advancedOrder.parameters.offer;\\n\\n // Read length of offer array and place on the stack.\\n uint256 totalOfferItems = offer.length;\\n\\n // Iterate over each offer item on the order.\\n for (uint256 j = 0; j < totalOfferItems; ++j) {\\n // Retrieve the offer item.\\n OfferItem memory offerItem = offer[j];\\n\\n assembly {\\n // If the offer item is for the native token, set the\\n // first bit of the error buffer to true.\\n invalidNativeOfferItemErrorBuffer := or(\\n invalidNativeOfferItemErrorBuffer,\\n iszero(mload(offerItem))\\n )\\n }\\n\\n // Apply order fill fraction to offer item end amount.\\n uint256 endAmount = _getFraction(\\n numerator,\\n denominator,\\n offerItem.endAmount\\n );\\n\\n // Reuse same fraction if start and end amounts are equal.\\n if (offerItem.startAmount == offerItem.endAmount) {\\n // Apply derived amount to both start and end amount.\\n offerItem.startAmount = endAmount;\\n } else {\\n // Apply order fill fraction to offer item start amount.\\n offerItem.startAmount = _getFraction(\\n numerator,\\n denominator,\\n offerItem.startAmount\\n );\\n }\\n\\n // Update end amount in memory to match the derived amount.\\n offerItem.endAmount = endAmount;\\n\\n // Adjust offer amount using current time; round down.\\n offerItem.startAmount = _locateCurrentAmount(\\n offerItem.startAmount,\\n offerItem.endAmount,\\n startTime,\\n endTime,\\n false // round down\\n );\\n }\\n\\n // Retrieve array of consideration items for order in question.\\n ConsiderationItem[] memory consideration = (\\n advancedOrder.parameters.consideration\\n );\\n\\n // Read length of consideration array and place on the stack.\\n uint256 totalConsiderationItems = consideration.length;\\n\\n // Iterate over each consideration item on the order.\\n for (uint256 j = 0; j < totalConsiderationItems; ++j) {\\n // Retrieve the consideration item.\\n ConsiderationItem memory considerationItem = (\\n consideration[j]\\n );\\n\\n // Apply fraction to consideration item end amount.\\n uint256 endAmount = _getFraction(\\n numerator,\\n denominator,\\n considerationItem.endAmount\\n );\\n\\n // Reuse same fraction if start and end amounts are equal.\\n if (\\n considerationItem.startAmount ==\\n considerationItem.endAmount\\n ) {\\n // Apply derived amount to both start and end amount.\\n considerationItem.startAmount = endAmount;\\n } else {\\n // Apply fraction to consideration item start amount.\\n considerationItem.startAmount = _getFraction(\\n numerator,\\n denominator,\\n considerationItem.startAmount\\n );\\n }\\n\\n // Update end amount in memory to match the derived amount.\\n considerationItem.endAmount = endAmount;\\n\\n // Adjust consideration amount using current time; round up.\\n considerationItem.startAmount = (\\n _locateCurrentAmount(\\n considerationItem.startAmount,\\n considerationItem.endAmount,\\n startTime,\\n endTime,\\n true // round up\\n )\\n );\\n\\n // Utilize assembly to manually \\\"shift\\\" the recipient value.\\n assembly {\\n // Write recipient to endAmount, as endAmount is not\\n // used from this point on and can be repurposed to fit\\n // the layout of a ReceivedItem.\\n mstore(\\n add(\\n considerationItem,\\n ReceivedItem_recipient_offset // old endAmount\\n ),\\n mload(\\n add(\\n considerationItem,\\n ConsiderationItem_recipient_offset\\n )\\n )\\n )\\n }\\n }\\n }\\n }\\n\\n // If the first bit is set, a native offer item was encountered. If the\\n // second bit is set in the error buffer, the current function is not\\n // matchOrders or matchAdvancedOrders. If the value is three, both the\\n // first and second bits were set; in that case, revert with an error.\\n if (invalidNativeOfferItemErrorBuffer == 3) {\\n revert InvalidNativeOfferItem();\\n }\\n\\n // Apply criteria resolvers to each order as applicable.\\n _applyCriteriaResolvers(advancedOrders, criteriaResolvers);\\n\\n // Emit an event for each order signifying that it has been fulfilled.\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Iterate over each order.\\n for (uint256 i = 0; i < totalOrders; ++i) {\\n // Do not emit an event if no order hash is present.\\n if (orderHashes[i] == bytes32(0)) {\\n continue;\\n }\\n\\n // Retrieve parameters for the order in question.\\n OrderParameters memory orderParameters = (\\n advancedOrders[i].parameters\\n );\\n\\n // Emit an OrderFulfilled event.\\n _emitOrderFulfilledEvent(\\n orderHashes[i],\\n orderParameters.offerer,\\n orderParameters.zone,\\n recipient,\\n orderParameters.offer,\\n orderParameters.consideration\\n );\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal function to fulfill a group of validated orders, fully or\\n * partially, with an arbitrary number of items for offer and\\n * consideration per order and to execute transfers. Any order that is\\n * not currently active, has already been fully filled, or has been\\n * cancelled will be omitted. Remaining offer and consideration items\\n * will then be aggregated where possible as indicated by the supplied\\n * offer and consideration component arrays and aggregated items will\\n * be transferred to the fulfiller or to each intended recipient,\\n * respectively. Note that a failing item transfer or an issue with\\n * order formatting will cause the entire batch to fail.\\n *\\n * @param advancedOrders The orders to fulfill along with the\\n * fraction of those orders to attempt to\\n * fill. Note that both the offerer and the\\n * fulfiller must first approve this\\n * contract (or the conduit if indicated by\\n * the order) to transfer any relevant\\n * tokens on their behalf and that\\n * contracts must implement\\n * `onERC1155Received` in order to receive\\n * ERC1155 tokens as consideration. Also\\n * note that all offer and consideration\\n * components must have no remainder after\\n * multiplication of the respective amount\\n * with the supplied fraction for an\\n * order's partial fill amount to be\\n * considered valid.\\n * @param offerFulfillments An array of FulfillmentComponent arrays\\n * indicating which offer items to attempt\\n * to aggregate when preparing executions.\\n * @param considerationFulfillments An array of FulfillmentComponent arrays\\n * indicating which consideration items to\\n * attempt to aggregate when preparing\\n * executions.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit,\\n * if any, to source the fulfiller's token\\n * approvals from. The zero hash signifies\\n * that no conduit should be used, with\\n * direct approvals set on Consideration.\\n * @param recipient The intended recipient for all received\\n * items.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function _executeAvailableFulfillments(\\n AdvancedOrder[] memory advancedOrders,\\n FulfillmentComponent[][] memory offerFulfillments,\\n FulfillmentComponent[][] memory considerationFulfillments,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n )\\n internal\\n returns (bool[] memory availableOrders, Execution[] memory executions)\\n {\\n // Retrieve length of offer fulfillments array and place on the stack.\\n uint256 totalOfferFulfillments = offerFulfillments.length;\\n\\n // Retrieve length of consideration fulfillments array & place on stack.\\n uint256 totalConsiderationFulfillments = (\\n considerationFulfillments.length\\n );\\n\\n // Allocate an execution for each offer and consideration fulfillment.\\n executions = new Execution[](\\n totalOfferFulfillments + totalConsiderationFulfillments\\n );\\n\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Track number of filtered executions.\\n uint256 totalFilteredExecutions = 0;\\n\\n // Iterate over each offer fulfillment.\\n for (uint256 i = 0; i < totalOfferFulfillments; ++i) {\\n /// Retrieve the offer fulfillment components in question.\\n FulfillmentComponent[] memory components = (\\n offerFulfillments[i]\\n );\\n\\n // Derive aggregated execution corresponding with fulfillment.\\n Execution memory execution = _aggregateAvailable(\\n advancedOrders,\\n Side.OFFER,\\n components,\\n fulfillerConduitKey,\\n recipient\\n );\\n\\n // If offerer and recipient on the execution are the same...\\n if (execution.item.recipient == execution.offerer) {\\n // Increment total filtered executions.\\n ++totalFilteredExecutions;\\n } else {\\n // Otherwise, assign the execution to the executions array.\\n executions[i - totalFilteredExecutions] = execution;\\n }\\n }\\n\\n // Iterate over each consideration fulfillment.\\n for (uint256 i = 0; i < totalConsiderationFulfillments; ++i) {\\n /// Retrieve consideration fulfillment components in question.\\n FulfillmentComponent[] memory components = (\\n considerationFulfillments[i]\\n );\\n\\n // Derive aggregated execution corresponding with fulfillment.\\n Execution memory execution = _aggregateAvailable(\\n advancedOrders,\\n Side.CONSIDERATION,\\n components,\\n fulfillerConduitKey,\\n address(0) // unused\\n );\\n\\n // If offerer and recipient on the execution are the same...\\n if (execution.item.recipient == execution.offerer) {\\n // Increment total filtered executions.\\n ++totalFilteredExecutions;\\n } else {\\n // Otherwise, assign the execution to the executions array.\\n executions[\\n i + totalOfferFulfillments - totalFilteredExecutions\\n ] = execution;\\n }\\n }\\n\\n // If some number of executions have been filtered...\\n if (totalFilteredExecutions != 0) {\\n // reduce the total length of the executions array.\\n assembly {\\n mstore(\\n executions,\\n sub(mload(executions), totalFilteredExecutions)\\n )\\n }\\n }\\n }\\n\\n // Revert if no orders are available.\\n if (executions.length == 0) {\\n revert NoSpecifiedOrdersAvailable();\\n }\\n\\n // Perform final checks and return.\\n availableOrders = _performFinalChecksAndExecuteOrders(\\n advancedOrders,\\n executions\\n );\\n\\n return (availableOrders, executions);\\n }\\n\\n /**\\n * @dev Internal function to perform a final check that each consideration\\n * item for an arbitrary number of fulfilled orders has been met and to\\n * trigger associated executions, transferring the respective items.\\n *\\n * @param advancedOrders The orders to check and perform executions for.\\n * @param executions An array of elements indicating the sequence of\\n * transfers to perform when fulfilling the given\\n * orders.\\n *\\n * @return availableOrders An array of booleans indicating if each order\\n * with an index corresponding to the index of the\\n * returned boolean was fulfillable or not.\\n */\\n function _performFinalChecksAndExecuteOrders(\\n AdvancedOrder[] memory advancedOrders,\\n Execution[] memory executions\\n ) internal returns (bool[] memory availableOrders) {\\n // Retrieve the length of the advanced orders array and place on stack.\\n uint256 totalOrders = advancedOrders.length;\\n\\n // Initialize array for tracking available orders.\\n availableOrders = new bool[](totalOrders);\\n\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Iterate over orders to ensure all considerations are met.\\n for (uint256 i = 0; i < totalOrders; ++i) {\\n // Retrieve the order in question.\\n AdvancedOrder memory advancedOrder = advancedOrders[i];\\n\\n // Skip consideration item checks for order if not fulfilled.\\n if (advancedOrder.numerator == 0) {\\n // Note: orders do not need to be marked as unavailable as a\\n // new memory region has been allocated. Review carefully if\\n // altering compiler version or managing memory manually.\\n continue;\\n }\\n\\n // Mark the order as available.\\n availableOrders[i] = true;\\n\\n // Retrieve consideration items to ensure they are fulfilled.\\n ConsiderationItem[] memory consideration = (\\n advancedOrder.parameters.consideration\\n );\\n\\n // Read length of consideration array and place on the stack.\\n uint256 totalConsiderationItems = consideration.length;\\n\\n // Iterate over each consideration item to ensure it is met.\\n for (uint256 j = 0; j < totalConsiderationItems; ++j) {\\n // Retrieve remaining amount on the consideration item.\\n uint256 unmetAmount = consideration[j].startAmount;\\n\\n // Revert if the remaining amount is not zero.\\n if (unmetAmount != 0) {\\n revert ConsiderationNotMet(i, j, unmetAmount);\\n }\\n }\\n }\\n }\\n\\n // Put ether value supplied by the caller on the stack.\\n uint256 etherRemaining = msg.value;\\n\\n // Initialize an accumulator array. From this point forward, no new\\n // memory regions can be safely allocated until the accumulator is no\\n // longer being utilized, as the accumulator operates in an open-ended\\n // fashion from this memory pointer; existing memory may still be\\n // accessed and modified, however.\\n bytes memory accumulator = new bytes(AccumulatorDisarmed);\\n\\n // Retrieve the length of the executions array and place on stack.\\n uint256 totalExecutions = executions.length;\\n\\n // Iterate over each execution.\\n for (uint256 i = 0; i < totalExecutions; ) {\\n // Retrieve the execution and the associated received item.\\n Execution memory execution = executions[i];\\n ReceivedItem memory item = execution.item;\\n\\n // If execution transfers native tokens, reduce value available.\\n if (item.itemType == ItemType.NATIVE) {\\n // Ensure that sufficient native tokens are still available.\\n if (item.amount > etherRemaining) {\\n revert InsufficientEtherSupplied();\\n }\\n\\n // Skip underflow check as amount is less than ether remaining.\\n unchecked {\\n etherRemaining -= item.amount;\\n }\\n }\\n\\n // Transfer the item specified by the execution.\\n _transfer(\\n item,\\n execution.offerer,\\n execution.conduitKey,\\n accumulator\\n );\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n // Trigger any remaining accumulated transfers via call to the conduit.\\n _triggerIfArmed(accumulator);\\n\\n // If any ether remains after fulfillments, return it to the caller.\\n if (etherRemaining != 0) {\\n _transferEth(payable(msg.sender), etherRemaining);\\n }\\n\\n // Clear the reentrancy guard.\\n _clearReentrancyGuard();\\n\\n // Return the array containing available orders.\\n return (availableOrders);\\n }\\n\\n /**\\n * @dev Internal function to match an arbitrary number of full or partial\\n * orders, each with an arbitrary number of items for offer and\\n * consideration, supplying criteria resolvers containing specific\\n * token identifiers and associated proofs as well as fulfillments\\n * allocating offer components to consideration components.\\n *\\n * @param advancedOrders The advanced orders to match. Note that both the\\n * offerer and fulfiller on each order must first\\n * approve this contract (or their conduit if\\n * indicated by the order) to transfer any relevant\\n * tokens on their behalf and each consideration\\n * recipient must implement `onERC1155Received` in\\n * order to receive ERC1155 tokens. Also note that\\n * the offer and consideration components for each\\n * order must have no remainder after multiplying\\n * the respective amount with the supplied fraction\\n * in order for the group of partial fills to be\\n * considered valid.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific order as well as that order's\\n * offer or consideration, a token identifier, and\\n * a proof that the supplied token identifier is\\n * contained in the order's merkle root. Note that\\n * an empty root indicates that any (transferable)\\n * token identifier is valid and that no associated\\n * proof needs to be supplied.\\n * @param fulfillments An array of elements allocating offer components\\n * to consideration components. Note that each\\n * consideration component must be fully met in\\n * order for the match operation to be valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function _matchAdvancedOrders(\\n AdvancedOrder[] memory advancedOrders,\\n CriteriaResolver[] memory criteriaResolvers,\\n Fulfillment[] calldata fulfillments\\n ) internal returns (Execution[] memory executions) {\\n // Validate orders, update order status, and determine item amounts.\\n _validateOrdersAndPrepareToFulfill(\\n advancedOrders,\\n criteriaResolvers,\\n true, // Signifies that invalid orders should revert.\\n advancedOrders.length,\\n address(0) // OrderFulfilled event has no recipient when matching.\\n );\\n\\n // Fulfill the orders using the supplied fulfillments.\\n return _fulfillAdvancedOrders(advancedOrders, fulfillments);\\n }\\n\\n /**\\n * @dev Internal function to fulfill an arbitrary number of orders, either\\n * full or partial, after validating, adjusting amounts, and applying\\n * criteria resolvers.\\n *\\n * @param advancedOrders The orders to match, including a fraction to\\n * attempt to fill for each order.\\n * @param fulfillments An array of elements allocating offer\\n * components to consideration components. Note\\n * that the final amount of each consideration\\n * component must be zero for a match operation to\\n * be considered valid.\\n *\\n * @return executions An array of elements indicating the sequence of\\n * transfers performed as part of matching the given\\n * orders.\\n */\\n function _fulfillAdvancedOrders(\\n AdvancedOrder[] memory advancedOrders,\\n Fulfillment[] calldata fulfillments\\n ) internal returns (Execution[] memory executions) {\\n // Retrieve fulfillments array length and place on the stack.\\n uint256 totalFulfillments = fulfillments.length;\\n\\n // Allocate executions by fulfillment and apply them to each execution.\\n executions = new Execution[](totalFulfillments);\\n\\n // Skip overflow checks as all for loops are indexed starting at zero.\\n unchecked {\\n // Track number of filtered executions.\\n uint256 totalFilteredExecutions = 0;\\n\\n // Iterate over each fulfillment.\\n for (uint256 i = 0; i < totalFulfillments; ++i) {\\n /// Retrieve the fulfillment in question.\\n Fulfillment calldata fulfillment = fulfillments[i];\\n\\n // Derive the execution corresponding with the fulfillment.\\n Execution memory execution = _applyFulfillment(\\n advancedOrders,\\n fulfillment.offerComponents,\\n fulfillment.considerationComponents\\n );\\n\\n // If offerer and recipient on the execution are the same...\\n if (execution.item.recipient == execution.offerer) {\\n // Increment total filtered executions.\\n ++totalFilteredExecutions;\\n } else {\\n // Otherwise, assign the execution to the executions array.\\n executions[i - totalFilteredExecutions] = execution;\\n }\\n }\\n\\n // If some number of executions have been filtered...\\n if (totalFilteredExecutions != 0) {\\n // reduce the total length of the executions array.\\n assembly {\\n mstore(\\n executions,\\n sub(mload(executions), totalFilteredExecutions)\\n )\\n }\\n }\\n }\\n\\n // Perform final checks and execute orders.\\n _performFinalChecksAndExecuteOrders(advancedOrders, executions);\\n\\n // Return the executions array.\\n return (executions);\\n }\\n}\\n\",\"keccak256\":\"0x7e81e9bc099cc80218b93d3ca6cc060b325f6ae1d328f1f38f67cd1af618c206\",\"license\":\"MIT\"},\"seaport/contracts/lib/OrderFulfiller.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ItemType } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OfferItem,\\n ConsiderationItem,\\n SpentItem,\\n ReceivedItem,\\n OrderParameters,\\n Order,\\n AdvancedOrder,\\n CriteriaResolver\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { BasicOrderFulfiller } from \\\"./BasicOrderFulfiller.sol\\\";\\n\\nimport { CriteriaResolution } from \\\"./CriteriaResolution.sol\\\";\\n\\nimport { AmountDeriver } from \\\"./AmountDeriver.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title OrderFulfiller\\n * @author 0age\\n * @notice OrderFulfiller contains logic related to order fulfillment where a\\n * single order is being fulfilled and where basic order fulfillment is\\n * not available as an option.\\n */\\ncontract OrderFulfiller is\\n BasicOrderFulfiller,\\n CriteriaResolution,\\n AmountDeriver\\n{\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController)\\n BasicOrderFulfiller(conduitController)\\n {}\\n\\n /**\\n * @dev Internal function to validate an order and update its status, adjust\\n * prices based on current time, apply criteria resolvers, determine\\n * what portion to fill, and transfer relevant tokens.\\n *\\n * @param advancedOrder The order to fulfill as well as the fraction\\n * to fill. Note that all offer and consideration\\n * components must divide with no remainder for\\n * the partial fill to be valid.\\n * @param criteriaResolvers An array where each element contains a\\n * reference to a specific offer or\\n * consideration, a token identifier, and a proof\\n * that the supplied token identifier is\\n * contained in the order's merkle root. Note\\n * that a criteria of zero indicates that any\\n * (transferable) token identifier is valid and\\n * that no proof needs to be supplied.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used, with direct approvals set on\\n * Consideration.\\n * @param recipient The intended recipient for all received items.\\n *\\n * @return A boolean indicating whether the order has been fulfilled.\\n */\\n function _validateAndFulfillAdvancedOrder(\\n AdvancedOrder memory advancedOrder,\\n CriteriaResolver[] memory criteriaResolvers,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n ) internal returns (bool) {\\n // Ensure this function cannot be triggered during a reentrant call.\\n _setReentrancyGuard();\\n\\n // Declare empty bytes32 array (unused, will remain empty).\\n bytes32[] memory priorOrderHashes;\\n\\n // Validate order, update status, and determine fraction to fill.\\n (\\n bytes32 orderHash,\\n uint256 fillNumerator,\\n uint256 fillDenominator\\n ) = _validateOrderAndUpdateStatus(\\n advancedOrder,\\n criteriaResolvers,\\n true,\\n priorOrderHashes\\n );\\n\\n // Create an array with length 1 containing the order.\\n AdvancedOrder[] memory advancedOrders = new AdvancedOrder[](1);\\n\\n // Populate the order as the first and only element of the new array.\\n advancedOrders[0] = advancedOrder;\\n\\n // Apply criteria resolvers using generated orders and details arrays.\\n _applyCriteriaResolvers(advancedOrders, criteriaResolvers);\\n\\n // Retrieve the order parameters after applying criteria resolvers.\\n OrderParameters memory orderParameters = advancedOrders[0].parameters;\\n\\n // Perform each item transfer with the appropriate fractional amount.\\n _applyFractionsAndTransferEach(\\n orderParameters,\\n fillNumerator,\\n fillDenominator,\\n fulfillerConduitKey,\\n recipient\\n );\\n\\n // Emit an event signifying that the order has been fulfilled.\\n _emitOrderFulfilledEvent(\\n orderHash,\\n orderParameters.offerer,\\n orderParameters.zone,\\n recipient,\\n orderParameters.offer,\\n orderParameters.consideration\\n );\\n\\n // Clear the reentrancy guard.\\n _clearReentrancyGuard();\\n\\n return true;\\n }\\n\\n /**\\n * @dev Internal function to transfer each item contained in a given single\\n * order fulfillment after applying a respective fraction to the amount\\n * being transferred.\\n *\\n * @param orderParameters The parameters for the fulfilled order.\\n * @param numerator A value indicating the portion of the order\\n * that should be filled.\\n * @param denominator A value indicating the total order size.\\n * @param fulfillerConduitKey A bytes32 value indicating what conduit, if\\n * any, to source the fulfiller's token approvals\\n * from. The zero hash signifies that no conduit\\n * should be used, with direct approvals set on\\n * Consideration.\\n * @param recipient The intended recipient for all received items.\\n */\\n function _applyFractionsAndTransferEach(\\n OrderParameters memory orderParameters,\\n uint256 numerator,\\n uint256 denominator,\\n bytes32 fulfillerConduitKey,\\n address recipient\\n ) internal {\\n // Read start time & end time from order parameters and place on stack.\\n uint256 startTime = orderParameters.startTime;\\n uint256 endTime = orderParameters.endTime;\\n\\n // Initialize an accumulator array. From this point forward, no new\\n // memory regions can be safely allocated until the accumulator is no\\n // longer being utilized, as the accumulator operates in an open-ended\\n // fashion from this memory pointer; existing memory may still be\\n // accessed and modified, however.\\n bytes memory accumulator = new bytes(AccumulatorDisarmed);\\n\\n // As of solidity 0.6.0, inline assembly cannot directly access function\\n // definitions, but can still access locally scoped function variables.\\n // This means that in order to recast the type of a function, we need to\\n // create a local variable to reference the internal function definition\\n // (using the same type) and a local variable with the desired type,\\n // and then cast the original function pointer to the desired type.\\n\\n /**\\n * Repurpose existing OfferItem memory regions on the offer array for\\n * the order by overriding the _transfer function pointer to accept a\\n * modified OfferItem argument in place of the usual ReceivedItem:\\n *\\n * ========= OfferItem ========== ====== ReceivedItem ======\\n * ItemType itemType; ------------> ItemType itemType;\\n * address token; ----------------> address token;\\n * uint256 identifierOrCriteria; -> uint256 identifier;\\n * uint256 startAmount; ----------> uint256 amount;\\n * uint256 endAmount; ------------> address recipient;\\n */\\n\\n // Declare a nested scope to minimize stack depth.\\n unchecked {\\n // Declare a virtual function pointer taking an OfferItem argument.\\n function(OfferItem memory, address, bytes32, bytes memory)\\n internal _transferOfferItem;\\n\\n {\\n // Assign _transfer function to a new function pointer (it takes\\n // a ReceivedItem as its initial argument)\\n function(ReceivedItem memory, address, bytes32, bytes memory)\\n internal _transferReceivedItem = _transfer;\\n\\n // Utilize assembly to override the virtual function pointer.\\n assembly {\\n // Cast initial ReceivedItem type to an OfferItem type.\\n _transferOfferItem := _transferReceivedItem\\n }\\n }\\n\\n // Read offer array length from memory and place on stack.\\n uint256 totalOfferItems = orderParameters.offer.length;\\n\\n // Iterate over each offer on the order.\\n // Skip overflow check as for loop is indexed starting at zero.\\n for (uint256 i = 0; i < totalOfferItems; ++i) {\\n // Retrieve the offer item.\\n OfferItem memory offerItem = orderParameters.offer[i];\\n\\n // Offer items for the native token can not be received\\n // outside of a match order function.\\n if (offerItem.itemType == ItemType.NATIVE) {\\n revert InvalidNativeOfferItem();\\n }\\n\\n // Declare an additional nested scope to minimize stack depth.\\n {\\n // Apply fill fraction to get offer item amount to transfer.\\n uint256 amount = _applyFraction(\\n offerItem.startAmount,\\n offerItem.endAmount,\\n numerator,\\n denominator,\\n startTime,\\n endTime,\\n false\\n );\\n\\n // Utilize assembly to set overloaded offerItem arguments.\\n assembly {\\n // Write new fractional amount to startAmount as amount.\\n mstore(\\n add(offerItem, ReceivedItem_amount_offset),\\n amount\\n )\\n\\n // Write recipient to endAmount.\\n mstore(\\n add(offerItem, ReceivedItem_recipient_offset),\\n recipient\\n )\\n }\\n }\\n\\n // Transfer the item from the offerer to the recipient.\\n _transferOfferItem(\\n offerItem,\\n orderParameters.offerer,\\n orderParameters.conduitKey,\\n accumulator\\n );\\n }\\n }\\n\\n // Put ether value supplied by the caller on the stack.\\n uint256 etherRemaining = msg.value;\\n\\n /**\\n * Repurpose existing ConsiderationItem memory regions on the\\n * consideration array for the order by overriding the _transfer\\n * function pointer to accept a modified ConsiderationItem argument in\\n * place of the usual ReceivedItem:\\n *\\n * ====== ConsiderationItem ===== ====== ReceivedItem ======\\n * ItemType itemType; ------------> ItemType itemType;\\n * address token; ----------------> address token;\\n * uint256 identifierOrCriteria;--> uint256 identifier;\\n * uint256 startAmount; ----------> uint256 amount;\\n * uint256 endAmount; /----> address recipient;\\n * address recipient; ------/\\n */\\n\\n // Declare a nested scope to minimize stack depth.\\n unchecked {\\n // Declare virtual function pointer with ConsiderationItem argument.\\n function(ConsiderationItem memory, address, bytes32, bytes memory)\\n internal _transferConsiderationItem;\\n {\\n // Reassign _transfer function to a new function pointer (it\\n // takes a ReceivedItem as its initial argument).\\n function(ReceivedItem memory, address, bytes32, bytes memory)\\n internal _transferReceivedItem = _transfer;\\n\\n // Utilize assembly to override the virtual function pointer.\\n assembly {\\n // Cast ReceivedItem type to ConsiderationItem type.\\n _transferConsiderationItem := _transferReceivedItem\\n }\\n }\\n\\n // Read consideration array length from memory and place on stack.\\n uint256 totalConsiderationItems = orderParameters\\n .consideration\\n .length;\\n\\n // Iterate over each consideration item on the order.\\n // Skip overflow check as for loop is indexed starting at zero.\\n for (uint256 i = 0; i < totalConsiderationItems; ++i) {\\n // Retrieve the consideration item.\\n ConsiderationItem memory considerationItem = (\\n orderParameters.consideration[i]\\n );\\n\\n // Apply fraction & derive considerationItem amount to transfer.\\n uint256 amount = _applyFraction(\\n considerationItem.startAmount,\\n considerationItem.endAmount,\\n numerator,\\n denominator,\\n startTime,\\n endTime,\\n true\\n );\\n\\n // Use assembly to set overloaded considerationItem arguments.\\n assembly {\\n // Write derived fractional amount to startAmount as amount.\\n mstore(\\n add(considerationItem, ReceivedItem_amount_offset),\\n amount\\n )\\n\\n // Write original recipient to endAmount as recipient.\\n mstore(\\n add(considerationItem, ReceivedItem_recipient_offset),\\n mload(\\n add(\\n considerationItem,\\n ConsiderationItem_recipient_offset\\n )\\n )\\n )\\n }\\n\\n // Reduce available value if offer spent ETH or a native token.\\n if (considerationItem.itemType == ItemType.NATIVE) {\\n // Ensure that sufficient native tokens are still available.\\n if (amount > etherRemaining) {\\n revert InsufficientEtherSupplied();\\n }\\n\\n // Skip underflow check as a comparison has just been made.\\n etherRemaining -= amount;\\n }\\n\\n // Transfer item from caller to recipient specified by the item.\\n _transferConsiderationItem(\\n considerationItem,\\n msg.sender,\\n fulfillerConduitKey,\\n accumulator\\n );\\n }\\n }\\n\\n // Trigger any remaining accumulated transfers via call to the conduit.\\n _triggerIfArmed(accumulator);\\n\\n // If any ether remains after fulfillments...\\n if (etherRemaining != 0) {\\n // return it to the caller.\\n _transferEth(payable(msg.sender), etherRemaining);\\n }\\n }\\n\\n /**\\n * @dev Internal function to emit an OrderFulfilled event. OfferItems are\\n * translated into SpentItems and ConsiderationItems are translated\\n * into ReceivedItems.\\n *\\n * @param orderHash The order hash.\\n * @param offerer The offerer for the order.\\n * @param zone The zone for the order.\\n * @param fulfiller The fulfiller of the order, or the null address if\\n * the order was fulfilled via order matching.\\n * @param offer The offer items for the order.\\n * @param consideration The consideration items for the order.\\n */\\n function _emitOrderFulfilledEvent(\\n bytes32 orderHash,\\n address offerer,\\n address zone,\\n address fulfiller,\\n OfferItem[] memory offer,\\n ConsiderationItem[] memory consideration\\n ) internal {\\n // Cast already-modified offer memory region as spent items.\\n SpentItem[] memory spentItems;\\n assembly {\\n spentItems := offer\\n }\\n\\n // Cast already-modified consideration memory region as received items.\\n ReceivedItem[] memory receivedItems;\\n assembly {\\n receivedItems := consideration\\n }\\n\\n // Emit an event signifying that the order has been fulfilled.\\n emit OrderFulfilled(\\n orderHash,\\n offerer,\\n zone,\\n fulfiller,\\n spentItems,\\n receivedItems\\n );\\n }\\n\\n /**\\n * @dev Internal pure function to convert an order to an advanced order with\\n * numerator and denominator of 1 and empty extraData.\\n *\\n * @param order The order to convert.\\n *\\n * @return advancedOrder The new advanced order.\\n */\\n function _convertOrderToAdvanced(Order calldata order)\\n internal\\n pure\\n returns (AdvancedOrder memory advancedOrder)\\n {\\n // Convert to partial order (1/1 or full fill) and return new value.\\n advancedOrder = AdvancedOrder(\\n order.parameters,\\n 1,\\n 1,\\n order.signature,\\n \\\"\\\"\\n );\\n }\\n\\n /**\\n * @dev Internal pure function to convert an array of orders to an array of\\n * advanced orders with numerator and denominator of 1.\\n *\\n * @param orders The orders to convert.\\n *\\n * @return advancedOrders The new array of partial orders.\\n */\\n function _convertOrdersToAdvanced(Order[] calldata orders)\\n internal\\n pure\\n returns (AdvancedOrder[] memory advancedOrders)\\n {\\n // Read the number of orders from calldata and place on the stack.\\n uint256 totalOrders = orders.length;\\n\\n // Allocate new empty array for each partial order in memory.\\n advancedOrders = new AdvancedOrder[](totalOrders);\\n\\n // Skip overflow check as the index for the loop starts at zero.\\n unchecked {\\n // Iterate over the given orders.\\n for (uint256 i = 0; i < totalOrders; ++i) {\\n // Convert to partial order (1/1 or full fill) and update array.\\n advancedOrders[i] = _convertOrderToAdvanced(orders[i]);\\n }\\n }\\n\\n // Return the array of advanced orders.\\n return advancedOrders;\\n }\\n}\\n\",\"keccak256\":\"0xfb7940a73c325e6c1ec9decdf46f55f8005462151f60e08243ddd50860027f79\",\"license\":\"MIT\"},\"seaport/contracts/lib/OrderValidator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { OrderType } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n OrderParameters,\\n Order,\\n AdvancedOrder,\\n OrderComponents,\\n OrderStatus,\\n CriteriaResolver\\n} from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\nimport { Executor } from \\\"./Executor.sol\\\";\\n\\nimport { ZoneInteraction } from \\\"./ZoneInteraction.sol\\\";\\n\\n/**\\n * @title OrderValidator\\n * @author 0age\\n * @notice OrderValidator contains functionality related to validating orders\\n * and updating their status.\\n */\\ncontract OrderValidator is Executor, ZoneInteraction {\\n // Track status of each order (validated, cancelled, and fraction filled).\\n mapping(bytes32 => OrderStatus) private _orderStatus;\\n\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) Executor(conduitController) {}\\n\\n /**\\n * @dev Internal function to verify and update the status of a basic order.\\n *\\n * @param orderHash The hash of the order.\\n * @param offerer The offerer of the order.\\n * @param signature A signature from the offerer indicating that the order\\n * has been approved.\\n */\\n function _validateBasicOrderAndUpdateStatus(\\n bytes32 orderHash,\\n address offerer,\\n bytes memory signature\\n ) internal {\\n // Retrieve the order status for the given order hash.\\n OrderStatus storage orderStatus = _orderStatus[orderHash];\\n\\n // Ensure order is fillable and is not cancelled.\\n _verifyOrderStatus(\\n orderHash,\\n orderStatus,\\n true, // Only allow unused orders when fulfilling basic orders.\\n true // Signifies to revert if the order is invalid.\\n );\\n\\n // If the order is not already validated, verify the supplied signature.\\n if (!orderStatus.isValidated) {\\n _verifySignature(offerer, orderHash, signature);\\n }\\n\\n // Update order status as fully filled, packing struct values.\\n orderStatus.isValidated = true;\\n orderStatus.isCancelled = false;\\n orderStatus.numerator = 1;\\n orderStatus.denominator = 1;\\n }\\n\\n /**\\n * @dev Internal function to validate an order, determine what portion to\\n * fill, and update its status. The desired fill amount is supplied as\\n * a fraction, as is the returned amount to fill.\\n *\\n * @param advancedOrder The order to fulfill as well as the fraction to\\n * fill. Note that all offer and consideration\\n * amounts must divide with no remainder in order\\n * for a partial fill to be valid.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific offer or consideration, a token\\n * identifier, and a proof that the supplied token\\n * identifier is contained in the order's merkle\\n * root. Note that a criteria of zero indicates\\n * that any (transferable) token identifier is\\n * valid and that no proof needs to be supplied.\\n * @param revertOnInvalid A boolean indicating whether to revert if the\\n * order is invalid due to the time or status.\\n * @param priorOrderHashes The order hashes of each order supplied prior to\\n * the current order as part of a \\\"match\\\" variety\\n * of order fulfillment (e.g. this array will be\\n * empty for single or \\\"fulfill available\\\").\\n *\\n * @return orderHash The order hash.\\n * @return newNumerator A value indicating the portion of the order that\\n * will be filled.\\n * @return newDenominator A value indicating the total size of the order.\\n */\\n function _validateOrderAndUpdateStatus(\\n AdvancedOrder memory advancedOrder,\\n CriteriaResolver[] memory criteriaResolvers,\\n bool revertOnInvalid,\\n bytes32[] memory priorOrderHashes\\n )\\n internal\\n returns (\\n bytes32 orderHash,\\n uint256 newNumerator,\\n uint256 newDenominator\\n )\\n {\\n // Retrieve the parameters for the order.\\n OrderParameters memory orderParameters = advancedOrder.parameters;\\n\\n // Ensure current timestamp falls between order start time and end time.\\n if (\\n !_verifyTime(\\n orderParameters.startTime,\\n orderParameters.endTime,\\n revertOnInvalid\\n )\\n ) {\\n // Assuming an invalid time and no revert, return zeroed out values.\\n return (bytes32(0), 0, 0);\\n }\\n\\n // Read numerator and denominator from memory and place on the stack.\\n uint256 numerator = uint256(advancedOrder.numerator);\\n uint256 denominator = uint256(advancedOrder.denominator);\\n\\n // Ensure that the supplied numerator and denominator are valid.\\n if (numerator > denominator || numerator == 0) {\\n revert BadFraction();\\n }\\n\\n // If attempting partial fill (n < d) check order type & ensure support.\\n if (\\n numerator < denominator &&\\n _doesNotSupportPartialFills(orderParameters.orderType)\\n ) {\\n // Revert if partial fill was attempted on an unsupported order.\\n revert PartialFillsNotEnabledForOrder();\\n }\\n\\n // Retrieve current counter & use it w/ parameters to derive order hash.\\n orderHash = _assertConsiderationLengthAndGetOrderHash(orderParameters);\\n\\n // Ensure restricted orders have a valid submitter or pass a zone check.\\n _assertRestrictedAdvancedOrderValidity(\\n advancedOrder,\\n criteriaResolvers,\\n priorOrderHashes,\\n orderHash,\\n orderParameters.zoneHash,\\n orderParameters.orderType,\\n orderParameters.offerer,\\n orderParameters.zone\\n );\\n\\n // Retrieve the order status using the derived order hash.\\n OrderStatus storage orderStatus = _orderStatus[orderHash];\\n\\n // Ensure order is fillable and is not cancelled.\\n if (\\n !_verifyOrderStatus(\\n orderHash,\\n orderStatus,\\n false, // Allow partially used orders to be filled.\\n revertOnInvalid\\n )\\n ) {\\n // Assuming an invalid order status and no revert, return zero fill.\\n return (orderHash, 0, 0);\\n }\\n\\n // If the order is not already validated, verify the supplied signature.\\n if (!orderStatus.isValidated) {\\n _verifySignature(\\n orderParameters.offerer,\\n orderHash,\\n advancedOrder.signature\\n );\\n }\\n\\n // Read filled amount as numerator and denominator and put on the stack.\\n uint256 filledNumerator = orderStatus.numerator;\\n uint256 filledDenominator = orderStatus.denominator;\\n\\n // If order (orderStatus) currently has a non-zero denominator it is\\n // partially filled.\\n if (filledDenominator != 0) {\\n // If denominator of 1 supplied, fill all remaining amount on order.\\n if (denominator == 1) {\\n // Scale numerator & denominator to match current denominator.\\n numerator = filledDenominator;\\n denominator = filledDenominator;\\n }\\n // Otherwise, if supplied denominator differs from current one...\\n else if (filledDenominator != denominator) {\\n // scale current numerator by the supplied denominator, then...\\n filledNumerator *= denominator;\\n\\n // the supplied numerator & denominator by current denominator.\\n numerator *= filledDenominator;\\n denominator *= filledDenominator;\\n }\\n\\n // Once adjusted, if current+supplied numerator exceeds denominator:\\n if (filledNumerator + numerator > denominator) {\\n // Skip underflow check: denominator >= orderStatus.numerator\\n unchecked {\\n // Reduce current numerator so it + supplied = denominator.\\n numerator = denominator - filledNumerator;\\n }\\n }\\n\\n // Increment the filled numerator by the new numerator.\\n filledNumerator += numerator;\\n\\n // Use assembly to ensure fractional amounts are below max uint120.\\n assembly {\\n // Check filledNumerator and denominator for uint120 overflow.\\n if or(\\n gt(filledNumerator, MaxUint120),\\n gt(denominator, MaxUint120)\\n ) {\\n // Derive greatest common divisor using euclidean algorithm.\\n function gcd(_a, _b) -> out {\\n for {\\n\\n } _b {\\n\\n } {\\n let _c := _b\\n _b := mod(_a, _c)\\n _a := _c\\n }\\n out := _a\\n }\\n let scaleDown := gcd(\\n numerator,\\n gcd(filledNumerator, denominator)\\n )\\n\\n // Ensure that the divisor is at least one.\\n let safeScaleDown := add(scaleDown, iszero(scaleDown))\\n\\n // Scale all fractional values down by gcd.\\n numerator := div(numerator, safeScaleDown)\\n filledNumerator := div(filledNumerator, safeScaleDown)\\n denominator := div(denominator, safeScaleDown)\\n\\n // Perform the overflow check a second time.\\n if or(\\n gt(filledNumerator, MaxUint120),\\n gt(denominator, MaxUint120)\\n ) {\\n // Store the Panic error signature.\\n mstore(0, Panic_error_signature)\\n\\n // Set arithmetic (0x11) panic code as initial argument.\\n mstore(Panic_error_offset, Panic_arithmetic)\\n\\n // Return, supplying Panic signature & arithmetic code.\\n revert(0, Panic_error_length)\\n }\\n }\\n }\\n // Skip overflow check: checked above unless numerator is reduced.\\n unchecked {\\n // Update order status and fill amount, packing struct values.\\n orderStatus.isValidated = true;\\n orderStatus.isCancelled = false;\\n orderStatus.numerator = uint120(filledNumerator);\\n orderStatus.denominator = uint120(denominator);\\n }\\n } else {\\n // Update order status and fill amount, packing struct values.\\n orderStatus.isValidated = true;\\n orderStatus.isCancelled = false;\\n orderStatus.numerator = uint120(numerator);\\n orderStatus.denominator = uint120(denominator);\\n }\\n\\n // Return order hash, a modified numerator, and a modified denominator.\\n return (orderHash, numerator, denominator);\\n }\\n\\n /**\\n * @dev Internal function to cancel an arbitrary number of orders. Note that\\n * only the offerer or the zone of a given order may cancel it. Callers\\n * should ensure that the intended order was cancelled by calling\\n * `getOrderStatus` and confirming that `isCancelled` returns `true`.\\n *\\n * @param orders The orders to cancel.\\n *\\n * @return cancelled A boolean indicating whether the supplied orders were\\n * successfully cancelled.\\n */\\n function _cancel(OrderComponents[] calldata orders)\\n internal\\n returns (bool cancelled)\\n {\\n // Ensure that the reentrancy guard is not currently set.\\n _assertNonReentrant();\\n\\n // Declare variables outside of the loop.\\n OrderStatus storage orderStatus;\\n address offerer;\\n address zone;\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n // Read length of the orders array from memory and place on stack.\\n uint256 totalOrders = orders.length;\\n\\n // Iterate over each order.\\n for (uint256 i = 0; i < totalOrders; ) {\\n // Retrieve the order.\\n OrderComponents calldata order = orders[i];\\n\\n offerer = order.offerer;\\n zone = order.zone;\\n\\n // Ensure caller is either offerer or zone of the order.\\n if (msg.sender != offerer && msg.sender != zone) {\\n revert InvalidCanceller();\\n }\\n\\n // Derive order hash using the order parameters and the counter.\\n bytes32 orderHash = _deriveOrderHash(\\n OrderParameters(\\n offerer,\\n zone,\\n order.offer,\\n order.consideration,\\n order.orderType,\\n order.startTime,\\n order.endTime,\\n order.zoneHash,\\n order.salt,\\n order.conduitKey,\\n order.consideration.length\\n ),\\n order.counter\\n );\\n\\n // Retrieve the order status using the derived order hash.\\n orderStatus = _orderStatus[orderHash];\\n\\n // Update the order status as not valid and cancelled.\\n orderStatus.isValidated = false;\\n orderStatus.isCancelled = true;\\n\\n // Emit an event signifying that the order has been cancelled.\\n emit OrderCancelled(orderHash, offerer, zone);\\n\\n // Increment counter inside body of loop for gas efficiency.\\n ++i;\\n }\\n }\\n\\n // Return a boolean indicating that orders were successfully cancelled.\\n cancelled = true;\\n }\\n\\n /**\\n * @dev Internal function to validate an arbitrary number of orders, thereby\\n * registering their signatures as valid and allowing the fulfiller to\\n * skip signature verification on fulfillment. Note that validated\\n * orders may still be unfulfillable due to invalid item amounts or\\n * other factors; callers should determine whether validated orders are\\n * fulfillable by simulating the fulfillment call prior to execution.\\n * Also note that anyone can validate a signed order, but only the\\n * offerer can validate an order without supplying a signature.\\n *\\n * @param orders The orders to validate.\\n *\\n * @return validated A boolean indicating whether the supplied orders were\\n * successfully validated.\\n */\\n function _validate(Order[] calldata orders)\\n internal\\n returns (bool validated)\\n {\\n // Ensure that the reentrancy guard is not currently set.\\n _assertNonReentrant();\\n\\n // Declare variables outside of the loop.\\n OrderStatus storage orderStatus;\\n bytes32 orderHash;\\n address offerer;\\n\\n // Skip overflow check as for loop is indexed starting at zero.\\n unchecked {\\n // Read length of the orders array from memory and place on stack.\\n uint256 totalOrders = orders.length;\\n\\n // Iterate over each order.\\n for (uint256 i = 0; i < totalOrders; ) {\\n // Retrieve the order.\\n Order calldata order = orders[i];\\n\\n // Retrieve the order parameters.\\n OrderParameters calldata orderParameters = order.parameters;\\n\\n // Move offerer from memory to the stack.\\n offerer = orderParameters.offerer;\\n\\n // Get current counter & use it w/ params to derive order hash.\\n orderHash = _assertConsiderationLengthAndGetOrderHash(\\n orderParameters\\n );\\n\\n // Retrieve the order status using the derived order hash.\\n orderStatus = _orderStatus[orderHash];\\n\\n // Ensure order is fillable and retrieve the filled amount.\\n _verifyOrderStatus(\\n orderHash,\\n orderStatus,\\n false, // Signifies that partially filled orders are valid.\\n true // Signifies to revert if the order is invalid.\\n );\\n\\n // If the order has not already been validated...\\n if (!orderStatus.isValidated) {\\n // Verify the supplied signature.\\n _verifySignature(offerer, orderHash, order.signature);\\n\\n // Update order status to mark the order as valid.\\n orderStatus.isValidated = true;\\n\\n // Emit an event signifying the order has been validated.\\n emit OrderValidated(\\n orderHash,\\n offerer,\\n orderParameters.zone\\n );\\n }\\n\\n // Increment counter inside body of the loop for gas efficiency.\\n ++i;\\n }\\n }\\n\\n // Return a boolean indicating that orders were successfully validated.\\n validated = true;\\n }\\n\\n /**\\n * @dev Internal view function to retrieve the status of a given order by\\n * hash, including whether the order has been cancelled or validated\\n * and the fraction of the order that has been filled.\\n *\\n * @param orderHash The order hash in question.\\n *\\n * @return isValidated A boolean indicating whether the order in question\\n * has been validated (i.e. previously approved or\\n * partially filled).\\n * @return isCancelled A boolean indicating whether the order in question\\n * has been cancelled.\\n * @return totalFilled The total portion of the order that has been filled\\n * (i.e. the \\\"numerator\\\").\\n * @return totalSize The total size of the order that is either filled or\\n * unfilled (i.e. the \\\"denominator\\\").\\n */\\n function _getOrderStatus(bytes32 orderHash)\\n internal\\n view\\n returns (\\n bool isValidated,\\n bool isCancelled,\\n uint256 totalFilled,\\n uint256 totalSize\\n )\\n {\\n // Retrieve the order status using the order hash.\\n OrderStatus storage orderStatus = _orderStatus[orderHash];\\n\\n // Return the fields on the order status.\\n return (\\n orderStatus.isValidated,\\n orderStatus.isCancelled,\\n orderStatus.numerator,\\n orderStatus.denominator\\n );\\n }\\n\\n /**\\n * @dev Internal pure function to check whether a given order type indicates\\n * that partial fills are not supported (e.g. only \\\"full fills\\\" are\\n * allowed for the order in question).\\n *\\n * @param orderType The order type in question.\\n *\\n * @return isFullOrder A boolean indicating whether the order type only\\n * supports full fills.\\n */\\n function _doesNotSupportPartialFills(OrderType orderType)\\n internal\\n pure\\n returns (bool isFullOrder)\\n {\\n // The \\\"full\\\" order types are even, while \\\"partial\\\" order types are odd.\\n // Bitwise and by 1 is equivalent to modulo by 2, but 2 gas cheaper.\\n assembly {\\n // Equivalent to `uint256(orderType) & 1 == 0`.\\n isFullOrder := iszero(and(orderType, 1))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x447e0ce125d169dc7fd6c19faddc0473335022b34163ed618b2c52ace3775701\",\"license\":\"MIT\"},\"seaport/contracts/lib/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ReentrancyErrors } from \\\"../interfaces/ReentrancyErrors.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title ReentrancyGuard\\n * @author 0age\\n * @notice ReentrancyGuard contains a storage variable and related functionality\\n * for protecting against reentrancy.\\n */\\ncontract ReentrancyGuard is ReentrancyErrors {\\n // Prevent reentrant calls on protected functions.\\n uint256 private _reentrancyGuard;\\n\\n /**\\n * @dev Initialize the reentrancy guard during deployment.\\n */\\n constructor() {\\n // Initialize the reentrancy guard in a cleared state.\\n _reentrancyGuard = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Internal function to ensure that the sentinel value for the\\n * reentrancy guard is not currently set and, if not, to set the\\n * sentinel value for the reentrancy guard.\\n */\\n function _setReentrancyGuard() internal {\\n // Ensure that the reentrancy guard is not already set.\\n _assertNonReentrant();\\n\\n // Set the reentrancy guard.\\n _reentrancyGuard = _ENTERED;\\n }\\n\\n /**\\n * @dev Internal function to unset the reentrancy guard sentinel value.\\n */\\n function _clearReentrancyGuard() internal {\\n // Clear the reentrancy guard.\\n _reentrancyGuard = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Internal view function to ensure that the sentinel value for the\\n reentrancy guard is not currently set.\\n */\\n function _assertNonReentrant() internal view {\\n // Ensure that the reentrancy guard is not currently set.\\n if (_reentrancyGuard != _NOT_ENTERED) {\\n revert NoReentrantCalls();\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa52711c788a24071f8a872ea5ee3030f0f8f592abf8f0d5577707e585a7628d5\",\"license\":\"MIT\"},\"seaport/contracts/lib/SignatureVerification.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { EIP1271Interface } from \\\"../interfaces/EIP1271Interface.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n SignatureVerificationErrors\\n} from \\\"../interfaces/SignatureVerificationErrors.sol\\\";\\n\\nimport { LowLevelHelpers } from \\\"./LowLevelHelpers.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n/**\\n * @title SignatureVerification\\n * @author 0age\\n * @notice SignatureVerification contains logic for verifying signatures.\\n */\\ncontract SignatureVerification is SignatureVerificationErrors, LowLevelHelpers {\\n /**\\n * @dev Internal view function to verify the signature of an order. An\\n * ERC-1271 fallback will be attempted if either the signature length\\n * is not 64 or 65 bytes or if the recovered signer does not match the\\n * supplied signer.\\n *\\n * @param signer The signer for the order.\\n * @param digest The digest to verify the signature against.\\n * @param signature A signature from the signer indicating that the order\\n * has been approved.\\n */\\n function _assertValidSignature(\\n address signer,\\n bytes32 digest,\\n bytes memory signature\\n ) internal view {\\n // Declare value for ecrecover equality or 1271 call success status.\\n bool success;\\n\\n // Utilize assembly to perform optimized signature verification check.\\n assembly {\\n // Ensure that first word of scratch space is empty.\\n mstore(0, 0)\\n\\n // Declare value for v signature parameter.\\n let v\\n\\n // Get the length of the signature.\\n let signatureLength := mload(signature)\\n\\n // Get the pointer to the value preceding the signature length.\\n // This will be used for temporary memory overrides - either the\\n // signature head for isValidSignature or the digest for ecrecover.\\n let wordBeforeSignaturePtr := sub(signature, OneWord)\\n\\n // Cache the current value behind the signature to restore it later.\\n let cachedWordBeforeSignature := mload(wordBeforeSignaturePtr)\\n\\n // Declare lenDiff + recoveredSigner scope to manage stack pressure.\\n {\\n // Take the difference between the max ECDSA signature length\\n // and the actual signature length. Overflow desired for any\\n // values > 65. If the diff is not 0 or 1, it is not a valid\\n // ECDSA signature - move on to EIP1271 check.\\n let lenDiff := sub(ECDSA_MaxLength, signatureLength)\\n\\n // Declare variable for recovered signer.\\n let recoveredSigner\\n\\n // If diff is 0 or 1, it may be an ECDSA signature.\\n // Try to recover signer.\\n if iszero(gt(lenDiff, 1)) {\\n // Read the signature `s` value.\\n let originalSignatureS := mload(\\n add(signature, ECDSA_signature_s_offset)\\n )\\n\\n // Read the first byte of the word after `s`. If the\\n // signature is 65 bytes, this will be the real `v` value.\\n // If not, it will need to be modified - doing it this way\\n // saves an extra condition.\\n v := byte(\\n 0,\\n mload(add(signature, ECDSA_signature_v_offset))\\n )\\n\\n // If lenDiff is 1, parse 64-byte signature as ECDSA.\\n if lenDiff {\\n // Extract yParity from highest bit of vs and add 27 to\\n // get v.\\n v := add(\\n shr(MaxUint8, originalSignatureS),\\n Signature_lower_v\\n )\\n\\n // Extract canonical s from vs, all but the highest bit.\\n // Temporarily overwrite the original `s` value in the\\n // signature.\\n mstore(\\n add(signature, ECDSA_signature_s_offset),\\n and(\\n originalSignatureS,\\n EIP2098_allButHighestBitMask\\n )\\n )\\n }\\n // Temporarily overwrite the signature length with `v` to\\n // conform to the expected input for ecrecover.\\n mstore(signature, v)\\n\\n // Temporarily overwrite the word before the length with\\n // `digest` to conform to the expected input for ecrecover.\\n mstore(wordBeforeSignaturePtr, digest)\\n\\n // Attempt to recover the signer for the given signature. Do\\n // not check the call status as ecrecover will return a null\\n // address if the signature is invalid.\\n pop(\\n staticcall(\\n gas(),\\n Ecrecover_precompile, // Call ecrecover precompile.\\n wordBeforeSignaturePtr, // Use data memory location.\\n Ecrecover_args_size, // Size of digest, v, r, and s.\\n 0, // Write result to scratch space.\\n OneWord // Provide size of returned result.\\n )\\n )\\n\\n // Restore cached word before signature.\\n mstore(wordBeforeSignaturePtr, cachedWordBeforeSignature)\\n\\n // Restore cached signature length.\\n mstore(signature, signatureLength)\\n\\n // Restore cached signature `s` value.\\n mstore(\\n add(signature, ECDSA_signature_s_offset),\\n originalSignatureS\\n )\\n\\n // Read the recovered signer from the buffer given as return\\n // space for ecrecover.\\n recoveredSigner := mload(0)\\n }\\n\\n // Set success to true if the signature provided was a valid\\n // ECDSA signature and the signer is not the null address. Use\\n // gt instead of direct as success is used outside of assembly.\\n success := and(eq(signer, recoveredSigner), gt(signer, 0))\\n }\\n\\n // If the signature was not verified with ecrecover, try EIP1271.\\n if iszero(success) {\\n // Temporarily overwrite the word before the signature length\\n // and use it as the head of the signature input to\\n // `isValidSignature`, which has a value of 64.\\n mstore(\\n wordBeforeSignaturePtr,\\n EIP1271_isValidSignature_signature_head_offset\\n )\\n\\n // Get pointer to use for the selector of `isValidSignature`.\\n let selectorPtr := sub(\\n signature,\\n EIP1271_isValidSignature_selector_negativeOffset\\n )\\n\\n // Cache the value currently stored at the selector pointer.\\n let cachedWordOverwrittenBySelector := mload(selectorPtr)\\n\\n // Get pointer to use for `digest` input to `isValidSignature`.\\n let digestPtr := sub(\\n signature,\\n EIP1271_isValidSignature_digest_negativeOffset\\n )\\n\\n // Cache the value currently stored at the digest pointer.\\n let cachedWordOverwrittenByDigest := mload(digestPtr)\\n\\n // Write the selector first, since it overlaps the digest.\\n mstore(selectorPtr, EIP1271_isValidSignature_selector)\\n\\n // Next, write the digest.\\n mstore(digestPtr, digest)\\n\\n // Call signer with `isValidSignature` to validate signature.\\n success := staticcall(\\n gas(),\\n signer,\\n selectorPtr,\\n add(\\n signatureLength,\\n EIP1271_isValidSignature_calldata_baseLength\\n ),\\n 0,\\n OneWord\\n )\\n\\n // Determine if the signature is valid on successful calls.\\n if success {\\n // If first word of scratch space does not contain EIP-1271\\n // signature selector, revert.\\n if iszero(eq(mload(0), EIP1271_isValidSignature_selector)) {\\n // Revert with bad 1271 signature if signer has code.\\n if extcodesize(signer) {\\n // Bad contract signature.\\n mstore(0, BadContractSignature_error_signature)\\n revert(0, BadContractSignature_error_length)\\n }\\n\\n // Check if signature length was invalid.\\n if gt(sub(ECDSA_MaxLength, signatureLength), 1) {\\n // Revert with generic invalid signature error.\\n mstore(0, InvalidSignature_error_signature)\\n revert(0, InvalidSignature_error_length)\\n }\\n\\n // Check if v was invalid.\\n if iszero(\\n byte(v, ECDSA_twentySeventhAndTwentyEighthBytesSet)\\n ) {\\n // Revert with invalid v value.\\n mstore(0, BadSignatureV_error_signature)\\n mstore(BadSignatureV_error_offset, v)\\n revert(0, BadSignatureV_error_length)\\n }\\n\\n // Revert with generic invalid signer error message.\\n mstore(0, InvalidSigner_error_signature)\\n revert(0, InvalidSigner_error_length)\\n }\\n }\\n\\n // Restore the cached values overwritten by selector, digest and\\n // signature head.\\n mstore(wordBeforeSignaturePtr, cachedWordBeforeSignature)\\n mstore(selectorPtr, cachedWordOverwrittenBySelector)\\n mstore(digestPtr, cachedWordOverwrittenByDigest)\\n }\\n }\\n\\n // If the call failed...\\n if (!success) {\\n // Revert and pass reason along if one was returned.\\n _revertWithReasonIfOneIsReturned();\\n\\n // Otherwise, revert with error indicating bad contract signature.\\n assembly {\\n mstore(0, BadContractSignature_error_signature)\\n revert(0, BadContractSignature_error_length)\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa9690795dd713c005b2ae794a30fc62058ec87c9ed7a4449c133d7e635da32c7\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport \\\"./TokenTransferrerConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n TokenTransferrerErrors\\n} from \\\"../interfaces/TokenTransferrerErrors.sol\\\";\\n\\nimport { ConduitBatch1155Transfer } from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title TokenTransferrer\\n * @author 0age\\n * @custom:coauthor d1ll0n\\n * @custom:coauthor transmissions11\\n * @notice TokenTransferrer is a library for performing optimized ERC20, ERC721,\\n * ERC1155, and batch ERC1155 transfers, used by both Seaport as well as\\n * by conduits deployed by the ConduitController. Use great caution when\\n * considering these functions for use in other codebases, as there are\\n * significant side effects and edge cases that need to be thoroughly\\n * understood and carefully addressed.\\n */\\ncontract TokenTransferrer is TokenTransferrerErrors {\\n /**\\n * @dev Internal function to transfer ERC20 tokens from a given originator\\n * to a given recipient. Sufficient approvals must be set on the\\n * contract performing the transfer.\\n *\\n * @param token The ERC20 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC20Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC20 token transfer.\\n assembly {\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data into memory, starting with function selector.\\n mstore(ERC20_transferFrom_sig_ptr, ERC20_transferFrom_signature)\\n mstore(ERC20_transferFrom_from_ptr, from)\\n mstore(ERC20_transferFrom_to_ptr, to)\\n mstore(ERC20_transferFrom_amount_ptr, amount)\\n\\n // Make call & copy up to 32 bytes of return data to scratch space.\\n // Scratch space does not need to be cleared ahead of time, as the\\n // subsequent check will ensure that either at least a full word of\\n // return data is received (in which case it will be overwritten) or\\n // that no data is received (in which case scratch space will be\\n // ignored) on a successful call to the given token.\\n let callStatus := call(\\n gas(),\\n token,\\n 0,\\n ERC20_transferFrom_sig_ptr,\\n ERC20_transferFrom_length,\\n 0,\\n OneWord\\n )\\n\\n // Determine whether transfer was successful using status & result.\\n let success := and(\\n // Set success to whether the call reverted, if not check it\\n // either returned exactly 1 (can't just be non-zero data), or\\n // had no return data.\\n or(\\n and(eq(mload(0), 1), gt(returndatasize(), 31)),\\n iszero(returndatasize())\\n ),\\n callStatus\\n )\\n\\n // Handle cases where either the transfer failed or no data was\\n // returned. Group these, as most transfers will succeed with data.\\n // Equivalent to `or(iszero(success), iszero(returndatasize()))`\\n // but after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(success, iszero(iszero(returndatasize())))) {\\n // If the token has no code or the transfer failed: Equivalent\\n // to `or(iszero(success), iszero(extcodesize(token)))` but\\n // after it's inverted for JUMPI this expression is cheaper.\\n if iszero(and(iszero(iszero(extcodesize(token))), success)) {\\n // If the transfer failed:\\n if iszero(success) {\\n // If it was due to a revert:\\n if iszero(callStatus) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to\\n // copy returndata while expanding memory where\\n // necessary. Start by computing the word size\\n // of returndata and allocated memory. Round up\\n // to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of\\n // msize() to work around a Yul warning that\\n // prevents accessing msize directly when the IR\\n // pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(\\n returnDataWords,\\n msizeWords\\n ),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to\\n // gas remaining; bubble up the revert data if\\n // enough gas is still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite\\n // existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, specifying memory region with\\n // copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(\\n TokenTransferGenericFailure_error_token_ptr,\\n token\\n )\\n mstore(\\n TokenTransferGenericFailure_error_from_ptr,\\n from\\n )\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, 0)\\n mstore(\\n TokenTransferGenericFailure_error_amount_ptr,\\n amount\\n )\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Otherwise revert with a message about the token\\n // returning false or non-compliant return values.\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_signature\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_token_ptr,\\n token\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_from_ptr,\\n from\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_to_ptr,\\n to\\n )\\n mstore(\\n BadReturnValueFromERC20OnTransfer_error_amount_ptr,\\n amount\\n )\\n revert(\\n BadReturnValueFromERC20OnTransfer_error_sig_ptr,\\n BadReturnValueFromERC20OnTransfer_error_length\\n )\\n }\\n\\n // Otherwise, revert with error about token not having code:\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Otherwise, the token just returned no data despite the call\\n // having succeeded; no need to optimize for this as it's not\\n // technically ERC20 compliant.\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer an ERC721 token from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer. Note that this function does\\n * not check whether the receiver can accept the ERC721 token (i.e. it\\n * does not use `safeTransferFrom`).\\n *\\n * @param token The ERC721 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The tokenId to transfer.\\n */\\n function _performERC721Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier\\n ) internal {\\n // Utilize assembly to perform an optimized ERC721 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The free memory pointer memory slot will be used when populating\\n // call data for the transfer; read the value and restore it later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n\\n // Write call data to memory starting with function selector.\\n mstore(ERC721_transferFrom_sig_ptr, ERC721_transferFrom_signature)\\n mstore(ERC721_transferFrom_from_ptr, from)\\n mstore(ERC721_transferFrom_to_ptr, to)\\n mstore(ERC721_transferFrom_id_ptr, identifier)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC721_transferFrom_sig_ptr,\\n ERC721_transferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, 1)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer.\\n *\\n * @param token The ERC1155 token to transfer.\\n * @param from The originator of the transfer.\\n * @param to The recipient of the transfer.\\n * @param identifier The id to transfer.\\n * @param amount The amount to transfer.\\n */\\n function _performERC1155Transfer(\\n address token,\\n address from,\\n address to,\\n uint256 identifier,\\n uint256 amount\\n ) internal {\\n // Utilize assembly to perform an optimized ERC1155 token transfer.\\n assembly {\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // The following memory slots will be used when populating call data\\n // for the transfer; read the values and restore them later.\\n let memPointer := mload(FreeMemoryPointerSlot)\\n let slot0x80 := mload(Slot0x80)\\n let slot0xA0 := mload(Slot0xA0)\\n let slot0xC0 := mload(Slot0xC0)\\n\\n // Write call data into memory, beginning with function selector.\\n mstore(\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_signature\\n )\\n mstore(ERC1155_safeTransferFrom_from_ptr, from)\\n mstore(ERC1155_safeTransferFrom_to_ptr, to)\\n mstore(ERC1155_safeTransferFrom_id_ptr, identifier)\\n mstore(ERC1155_safeTransferFrom_amount_ptr, amount)\\n mstore(\\n ERC1155_safeTransferFrom_data_offset_ptr,\\n ERC1155_safeTransferFrom_data_length_offset\\n )\\n mstore(ERC1155_safeTransferFrom_data_length_ptr, 0)\\n\\n // Perform the call, ignoring return data.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ERC1155_safeTransferFrom_sig_ptr,\\n ERC1155_safeTransferFrom_length,\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as sufficient\\n // gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary. Start\\n // by computing word size of returndata & allocated memory.\\n // Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use the free memory pointer in place of msize() to\\n // work around a Yul warning that prevents accessing msize\\n // directly when the IR pipeline is activated.\\n let msizeWords := div(memPointer, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(returnDataWords, returnDataWords),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing memory.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert, giving memory region with copied returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Otherwise revert with a generic error message.\\n mstore(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_signature\\n )\\n mstore(TokenTransferGenericFailure_error_token_ptr, token)\\n mstore(TokenTransferGenericFailure_error_from_ptr, from)\\n mstore(TokenTransferGenericFailure_error_to_ptr, to)\\n mstore(TokenTransferGenericFailure_error_id_ptr, identifier)\\n mstore(TokenTransferGenericFailure_error_amount_ptr, amount)\\n revert(\\n TokenTransferGenericFailure_error_sig_ptr,\\n TokenTransferGenericFailure_error_length\\n )\\n }\\n\\n mstore(Slot0x80, slot0x80) // Restore slot 0x80.\\n mstore(Slot0xA0, slot0xA0) // Restore slot 0xA0.\\n mstore(Slot0xC0, slot0xC0) // Restore slot 0xC0.\\n\\n // Restore the original free memory pointer.\\n mstore(FreeMemoryPointerSlot, memPointer)\\n\\n // Restore the zero slot to zero.\\n mstore(ZeroSlot, 0)\\n }\\n }\\n\\n /**\\n * @dev Internal function to transfer ERC1155 tokens from a given\\n * originator to a given recipient. Sufficient approvals must be set on\\n * the contract performing the transfer and contract recipients must\\n * implement the ERC1155TokenReceiver interface to indicate that they\\n * are willing to accept the transfer. NOTE: this function is not\\n * memory-safe; it will overwrite existing memory, restore the free\\n * memory pointer to the default value, and overwrite the zero slot.\\n * This function should only be called once memory is no longer\\n * required and when uninitialized arrays are not utilized, and memory\\n * should be considered fully corrupted (aside from the existence of a\\n * default-value free memory pointer) after calling this function.\\n *\\n * @param batchTransfers The group of 1155 batch transfers to perform.\\n */\\n function _performERC1155BatchTransfers(\\n ConduitBatch1155Transfer[] calldata batchTransfers\\n ) internal {\\n // Utilize assembly to perform optimized batch 1155 transfers.\\n assembly {\\n let len := batchTransfers.length\\n // Pointer to first head in the array, which is offset to the struct\\n // at each index. This gets incremented after each loop to avoid\\n // multiplying by 32 to get the offset for each element.\\n let nextElementHeadPtr := batchTransfers.offset\\n\\n // Pointer to beginning of the head of the array. This is the\\n // reference position each offset references. It's held static to\\n // let each loop calculate the data position for an element.\\n let arrayHeadPtr := nextElementHeadPtr\\n\\n // Write the function selector, which will be reused for each call:\\n // safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\n mstore(\\n ConduitBatch1155Transfer_from_offset,\\n ERC1155_safeBatchTransferFrom_signature\\n )\\n\\n // Iterate over each batch transfer.\\n for {\\n let i := 0\\n } lt(i, len) {\\n i := add(i, 1)\\n } {\\n // Read the offset to the beginning of the element and add\\n // it to pointer to the beginning of the array head to get\\n // the absolute position of the element in calldata.\\n let elementPtr := add(\\n arrayHeadPtr,\\n calldataload(nextElementHeadPtr)\\n )\\n\\n // Retrieve the token from calldata.\\n let token := calldataload(elementPtr)\\n\\n // If the token has no code, revert.\\n if iszero(extcodesize(token)) {\\n mstore(NoContract_error_sig_ptr, NoContract_error_signature)\\n mstore(NoContract_error_token_ptr, token)\\n revert(NoContract_error_sig_ptr, NoContract_error_length)\\n }\\n\\n // Get the total number of supplied ids.\\n let idsLength := calldataload(\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset)\\n )\\n\\n // Determine the expected offset for the amounts array.\\n let expectedAmountsOffset := add(\\n ConduitBatch1155Transfer_amounts_length_baseOffset,\\n mul(idsLength, OneWord)\\n )\\n\\n // Validate struct encoding.\\n let invalidEncoding := iszero(\\n and(\\n // ids.length == amounts.length\\n eq(\\n idsLength,\\n calldataload(add(elementPtr, expectedAmountsOffset))\\n ),\\n and(\\n // ids_offset == 0xa0\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatch1155Transfer_ids_head_offset\\n )\\n ),\\n ConduitBatch1155Transfer_ids_length_offset\\n ),\\n // amounts_offset == 0xc0 + ids.length*32\\n eq(\\n calldataload(\\n add(\\n elementPtr,\\n ConduitBatchTransfer_amounts_head_offset\\n )\\n ),\\n expectedAmountsOffset\\n )\\n )\\n )\\n )\\n\\n // Revert with an error if the encoding is not valid.\\n if invalidEncoding {\\n mstore(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_selector\\n )\\n revert(\\n Invalid1155BatchTransferEncoding_ptr,\\n Invalid1155BatchTransferEncoding_length\\n )\\n }\\n\\n // Update the offset position for the next loop\\n nextElementHeadPtr := add(nextElementHeadPtr, OneWord)\\n\\n // Copy the first section of calldata (before dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_from_offset),\\n ConduitBatch1155Transfer_usable_head_size\\n )\\n\\n // Determine size of calldata required for ids and amounts. Note\\n // that the size includes both lengths as well as the data.\\n let idsAndAmountsSize := add(TwoWords, mul(idsLength, TwoWords))\\n\\n // Update the offset for the data array in memory.\\n mstore(\\n BatchTransfer1155Params_data_head_ptr,\\n add(\\n BatchTransfer1155Params_ids_length_offset,\\n idsAndAmountsSize\\n )\\n )\\n\\n // Set the length of the data array in memory to zero.\\n mstore(\\n add(\\n BatchTransfer1155Params_data_length_basePtr,\\n idsAndAmountsSize\\n ),\\n 0\\n )\\n\\n // Determine the total calldata size for the call to transfer.\\n let transferDataSize := add(\\n BatchTransfer1155Params_calldata_baseSize,\\n idsAndAmountsSize\\n )\\n\\n // Copy second section of calldata (including dynamic values).\\n calldatacopy(\\n BatchTransfer1155Params_ids_length_ptr,\\n add(elementPtr, ConduitBatch1155Transfer_ids_length_offset),\\n idsAndAmountsSize\\n )\\n\\n // Perform the call to transfer 1155 tokens.\\n let success := call(\\n gas(),\\n token,\\n 0,\\n ConduitBatch1155Transfer_from_offset, // Data portion start.\\n transferDataSize, // Location of the length of callData.\\n 0,\\n 0\\n )\\n\\n // If the transfer reverted:\\n if iszero(success) {\\n // If it returned a message, bubble it up as long as\\n // sufficient gas remains to do so:\\n if returndatasize() {\\n // Ensure that sufficient gas is available to copy\\n // returndata while expanding memory where necessary.\\n // Start by computing word size of returndata and\\n // allocated memory. Round up to the nearest full word.\\n let returnDataWords := div(\\n add(returndatasize(), AlmostOneWord),\\n OneWord\\n )\\n\\n // Note: use transferDataSize in place of msize() to\\n // work around a Yul warning that prevents accessing\\n // msize directly when the IR pipeline is activated.\\n // The free memory pointer is not used here because\\n // this function does almost all memory management\\n // manually and does not update it, and transferDataSize\\n // should be the largest memory value used (unless a\\n // previous batch was larger).\\n let msizeWords := div(transferDataSize, OneWord)\\n\\n // Next, compute the cost of the returndatacopy.\\n let cost := mul(CostPerWord, returnDataWords)\\n\\n // Then, compute cost of new memory allocation.\\n if gt(returnDataWords, msizeWords) {\\n cost := add(\\n cost,\\n add(\\n mul(\\n sub(returnDataWords, msizeWords),\\n CostPerWord\\n ),\\n div(\\n sub(\\n mul(\\n returnDataWords,\\n returnDataWords\\n ),\\n mul(msizeWords, msizeWords)\\n ),\\n MemoryExpansionCoefficient\\n )\\n )\\n )\\n }\\n\\n // Finally, add a small constant and compare to gas\\n // remaining; bubble up the revert data if enough gas is\\n // still available.\\n if lt(add(cost, ExtraGasBuffer), gas()) {\\n // Copy returndata to memory; overwrite existing.\\n returndatacopy(0, 0, returndatasize())\\n\\n // Revert with memory region containing returndata.\\n revert(0, returndatasize())\\n }\\n }\\n\\n // Set the error signature.\\n mstore(\\n 0,\\n ERC1155BatchTransferGenericFailure_error_signature\\n )\\n\\n // Write the token.\\n mstore(ERC1155BatchTransferGenericFailure_token_ptr, token)\\n\\n // Increase the offset to ids by 32.\\n mstore(\\n BatchTransfer1155Params_ids_head_ptr,\\n ERC1155BatchTransferGenericFailure_ids_offset\\n )\\n\\n // Increase the offset to amounts by 32.\\n mstore(\\n BatchTransfer1155Params_amounts_head_ptr,\\n add(\\n OneWord,\\n mload(BatchTransfer1155Params_amounts_head_ptr)\\n )\\n )\\n\\n // Return modified region. The total size stays the same as\\n // `token` uses the same number of bytes as `data.length`.\\n revert(0, transferDataSize)\\n }\\n }\\n\\n // Reset the free memory pointer to the default value; memory must\\n // be assumed to be dirtied and not reused from this point forward.\\n // Also note that the zero slot is not reset to zero, meaning empty\\n // arrays cannot be safely created or utilized until it is restored.\\n mstore(FreeMemoryPointerSlot, DefaultFreeMemoryPointer)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x9dd7add814595c3e416dafb8678a33bb037f15fcb0c1f9249472867ec3b5b952\",\"license\":\"MIT\"},\"seaport/contracts/lib/TokenTransferrerConstants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/*\\n * -------------------------- Disambiguation & Other Notes ---------------------\\n * - The term \\\"head\\\" is used as it is in the documentation for ABI encoding,\\n * but only in reference to dynamic types, i.e. it always refers to the\\n * offset or pointer to the body of a dynamic type. In calldata, the head\\n * is always an offset (relative to the parent object), while in memory,\\n * the head is always the pointer to the body. More information found here:\\n * https://docs.soliditylang.org/en/v0.8.14/abi-spec.html#argument-encoding\\n * - Note that the length of an array is separate from and precedes the\\n * head of the array.\\n *\\n * - The term \\\"body\\\" is used in place of the term \\\"head\\\" used in the ABI\\n * documentation. It refers to the start of the data for a dynamic type,\\n * e.g. the first word of a struct or the first word of the first element\\n * in an array.\\n *\\n * - The term \\\"pointer\\\" is used to describe the absolute position of a value\\n * and never an offset relative to another value.\\n * - The suffix \\\"_ptr\\\" refers to a memory pointer.\\n * - The suffix \\\"_cdPtr\\\" refers to a calldata pointer.\\n *\\n * - The term \\\"offset\\\" is used to describe the position of a value relative\\n * to some parent value. For example, OrderParameters_conduit_offset is the\\n * offset to the \\\"conduit\\\" value in the OrderParameters struct relative to\\n * the start of the body.\\n * - Note: Offsets are used to derive pointers.\\n *\\n * - Some structs have pointers defined for all of their fields in this file.\\n * Lines which are commented out are fields that are not used in the\\n * codebase but have been left in for readability.\\n */\\n\\nuint256 constant AlmostOneWord = 0x1f;\\nuint256 constant OneWord = 0x20;\\nuint256 constant TwoWords = 0x40;\\nuint256 constant ThreeWords = 0x60;\\n\\nuint256 constant FreeMemoryPointerSlot = 0x40;\\nuint256 constant ZeroSlot = 0x60;\\nuint256 constant DefaultFreeMemoryPointer = 0x80;\\n\\nuint256 constant Slot0x80 = 0x80;\\nuint256 constant Slot0xA0 = 0xa0;\\nuint256 constant Slot0xC0 = 0xc0;\\n\\n// abi.encodeWithSignature(\\\"transferFrom(address,address,uint256)\\\")\\nuint256 constant ERC20_transferFrom_signature = (\\n 0x23b872dd00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC20_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC20_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC20_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC20_transferFrom_amount_ptr = 0x44;\\nuint256 constant ERC20_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\n// \\\"safeTransferFrom(address,address,uint256,uint256,bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeTransferFrom_signature = (\\n 0xf242432a00000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155_safeTransferFrom_sig_ptr = 0x0;\\nuint256 constant ERC1155_safeTransferFrom_from_ptr = 0x04;\\nuint256 constant ERC1155_safeTransferFrom_to_ptr = 0x24;\\nuint256 constant ERC1155_safeTransferFrom_id_ptr = 0x44;\\nuint256 constant ERC1155_safeTransferFrom_amount_ptr = 0x64;\\nuint256 constant ERC1155_safeTransferFrom_data_offset_ptr = 0x84;\\nuint256 constant ERC1155_safeTransferFrom_data_length_ptr = 0xa4;\\nuint256 constant ERC1155_safeTransferFrom_length = 0xc4; // 4 + 32 * 6 == 196\\nuint256 constant ERC1155_safeTransferFrom_data_length_offset = 0xa0;\\n\\n// abi.encodeWithSignature(\\n// \\\"safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)\\\"\\n// )\\nuint256 constant ERC1155_safeBatchTransferFrom_signature = (\\n 0x2eb2c2d600000000000000000000000000000000000000000000000000000000\\n);\\n\\nbytes4 constant ERC1155_safeBatchTransferFrom_selector = bytes4(\\n bytes32(ERC1155_safeBatchTransferFrom_signature)\\n);\\n\\nuint256 constant ERC721_transferFrom_signature = ERC20_transferFrom_signature;\\nuint256 constant ERC721_transferFrom_sig_ptr = 0x0;\\nuint256 constant ERC721_transferFrom_from_ptr = 0x04;\\nuint256 constant ERC721_transferFrom_to_ptr = 0x24;\\nuint256 constant ERC721_transferFrom_id_ptr = 0x44;\\nuint256 constant ERC721_transferFrom_length = 0x64; // 4 + 32 * 3 == 100\\n\\n// abi.encodeWithSignature(\\\"NoContract(address)\\\")\\nuint256 constant NoContract_error_signature = (\\n 0x5f15d67200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant NoContract_error_sig_ptr = 0x0;\\nuint256 constant NoContract_error_token_ptr = 0x4;\\nuint256 constant NoContract_error_length = 0x24; // 4 + 32 == 36\\n\\n// abi.encodeWithSignature(\\n// \\\"TokenTransferGenericFailure(address,address,address,uint256,uint256)\\\"\\n// )\\nuint256 constant TokenTransferGenericFailure_error_signature = (\\n 0xf486bc8700000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant TokenTransferGenericFailure_error_sig_ptr = 0x0;\\nuint256 constant TokenTransferGenericFailure_error_token_ptr = 0x4;\\nuint256 constant TokenTransferGenericFailure_error_from_ptr = 0x24;\\nuint256 constant TokenTransferGenericFailure_error_to_ptr = 0x44;\\nuint256 constant TokenTransferGenericFailure_error_id_ptr = 0x64;\\nuint256 constant TokenTransferGenericFailure_error_amount_ptr = 0x84;\\n\\n// 4 + 32 * 5 == 164\\nuint256 constant TokenTransferGenericFailure_error_length = 0xa4;\\n\\n// abi.encodeWithSignature(\\n// \\\"BadReturnValueFromERC20OnTransfer(address,address,address,uint256)\\\"\\n// )\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_signature = (\\n 0x9889192300000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_sig_ptr = 0x0;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_token_ptr = 0x4;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_from_ptr = 0x24;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_to_ptr = 0x44;\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_amount_ptr = 0x64;\\n\\n// 4 + 32 * 4 == 132\\nuint256 constant BadReturnValueFromERC20OnTransfer_error_length = 0x84;\\n\\nuint256 constant ExtraGasBuffer = 0x20;\\nuint256 constant CostPerWord = 3;\\nuint256 constant MemoryExpansionCoefficient = 0x200;\\n\\n// Values are offset by 32 bytes in order to write the token to the beginning\\n// in the event of a revert\\nuint256 constant BatchTransfer1155Params_ptr = 0x24;\\nuint256 constant BatchTransfer1155Params_ids_head_ptr = 0x64;\\nuint256 constant BatchTransfer1155Params_amounts_head_ptr = 0x84;\\nuint256 constant BatchTransfer1155Params_data_head_ptr = 0xa4;\\nuint256 constant BatchTransfer1155Params_data_length_basePtr = 0xc4;\\nuint256 constant BatchTransfer1155Params_calldata_baseSize = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_ptr = 0xc4;\\n\\nuint256 constant BatchTransfer1155Params_ids_length_offset = 0xa0;\\nuint256 constant BatchTransfer1155Params_amounts_length_baseOffset = 0xc0;\\nuint256 constant BatchTransfer1155Params_data_length_baseOffset = 0xe0;\\n\\nuint256 constant ConduitBatch1155Transfer_usable_head_size = 0x80;\\n\\nuint256 constant ConduitBatch1155Transfer_from_offset = 0x20;\\nuint256 constant ConduitBatch1155Transfer_ids_head_offset = 0x60;\\nuint256 constant ConduitBatch1155Transfer_amounts_head_offset = 0x80;\\nuint256 constant ConduitBatch1155Transfer_ids_length_offset = 0xa0;\\nuint256 constant ConduitBatch1155Transfer_amounts_length_baseOffset = 0xc0;\\nuint256 constant ConduitBatch1155Transfer_calldata_baseSize = 0xc0;\\n\\n// Note: abbreviated version of above constant to adhere to line length limit.\\nuint256 constant ConduitBatchTransfer_amounts_head_offset = 0x80;\\n\\nuint256 constant Invalid1155BatchTransferEncoding_ptr = 0x00;\\nuint256 constant Invalid1155BatchTransferEncoding_length = 0x04;\\nuint256 constant Invalid1155BatchTransferEncoding_selector = (\\n 0xeba2084c00000000000000000000000000000000000000000000000000000000\\n);\\n\\nuint256 constant ERC1155BatchTransferGenericFailure_error_signature = (\\n 0xafc445e200000000000000000000000000000000000000000000000000000000\\n);\\nuint256 constant ERC1155BatchTransferGenericFailure_token_ptr = 0x04;\\nuint256 constant ERC1155BatchTransferGenericFailure_ids_offset = 0xc0;\\n\",\"keccak256\":\"0xa27ce8b77d5386e95f9b9b4897f1585b78e016c8d1e4c6531fe3b1963cdba08a\",\"license\":\"MIT\"},\"seaport/contracts/lib/Verifiers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { OrderStatus } from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport { Assertions } from \\\"./Assertions.sol\\\";\\n\\nimport { SignatureVerification } from \\\"./SignatureVerification.sol\\\";\\n\\n/**\\n * @title Verifiers\\n * @author 0age\\n * @notice Verifiers contains functions for performing verifications.\\n */\\ncontract Verifiers is Assertions, SignatureVerification {\\n /**\\n * @dev Derive and set hashes, reference chainId, and associated domain\\n * separator during deployment.\\n *\\n * @param conduitController A contract that deploys conduits, or proxies\\n * that may optionally be used to transfer approved\\n * ERC20/721/1155 tokens.\\n */\\n constructor(address conduitController) Assertions(conduitController) {}\\n\\n /**\\n * @dev Internal view function to ensure that the current time falls within\\n * an order's valid timespan.\\n *\\n * @param startTime The time at which the order becomes active.\\n * @param endTime The time at which the order becomes inactive.\\n * @param revertOnInvalid A boolean indicating whether to revert if the\\n * order is not active.\\n *\\n * @return valid A boolean indicating whether the order is active.\\n */\\n function _verifyTime(\\n uint256 startTime,\\n uint256 endTime,\\n bool revertOnInvalid\\n ) internal view returns (bool valid) {\\n // Revert if order's timespan hasn't started yet or has already ended.\\n if (startTime > block.timestamp || endTime <= block.timestamp) {\\n // Only revert if revertOnInvalid has been supplied as true.\\n if (revertOnInvalid) {\\n revert InvalidTime();\\n }\\n\\n // Return false as the order is invalid.\\n return false;\\n }\\n\\n // Return true as the order time is valid.\\n valid = true;\\n }\\n\\n /**\\n * @dev Internal view function to verify the signature of an order. An\\n * ERC-1271 fallback will be attempted if either the signature length\\n * is not 64 or 65 bytes or if the recovered signer does not match the\\n * supplied offerer. Note that in cases where a 64 or 65 byte signature\\n * is supplied, only standard ECDSA signatures that recover to a\\n * non-zero address are supported.\\n *\\n * @param offerer The offerer for the order.\\n * @param orderHash The order hash.\\n * @param signature A signature from the offerer indicating that the order\\n * has been approved.\\n */\\n function _verifySignature(\\n address offerer,\\n bytes32 orderHash,\\n bytes memory signature\\n ) internal view {\\n // Skip signature verification if the offerer is the caller.\\n if (offerer == msg.sender) {\\n return;\\n }\\n\\n // Derive EIP-712 digest using the domain separator and the order hash.\\n bytes32 digest = _deriveEIP712Digest(_domainSeparator(), orderHash);\\n\\n // Ensure that the signature for the digest is valid for the offerer.\\n _assertValidSignature(offerer, digest, signature);\\n }\\n\\n /**\\n * @dev Internal view function to validate that a given order is fillable\\n * and not cancelled based on the order status.\\n *\\n * @param orderHash The order hash.\\n * @param orderStatus The status of the order, including whether it has\\n * been cancelled and the fraction filled.\\n * @param onlyAllowUnused A boolean flag indicating whether partial fills\\n * are supported by the calling function.\\n * @param revertOnInvalid A boolean indicating whether to revert if the\\n * order has been cancelled or filled beyond the\\n * allowable amount.\\n *\\n * @return valid A boolean indicating whether the order is valid.\\n */\\n function _verifyOrderStatus(\\n bytes32 orderHash,\\n OrderStatus storage orderStatus,\\n bool onlyAllowUnused,\\n bool revertOnInvalid\\n ) internal view returns (bool valid) {\\n // Ensure that the order has not been cancelled.\\n if (orderStatus.isCancelled) {\\n // Only revert if revertOnInvalid has been supplied as true.\\n if (revertOnInvalid) {\\n revert OrderIsCancelled(orderHash);\\n }\\n\\n // Return false as the order status is invalid.\\n return false;\\n }\\n\\n // Read order status numerator from storage and place on stack.\\n uint256 orderStatusNumerator = orderStatus.numerator;\\n\\n // If the order is not entirely unused...\\n if (orderStatusNumerator != 0) {\\n // ensure the order has not been partially filled when not allowed.\\n if (onlyAllowUnused) {\\n // Always revert on partial fills when onlyAllowUnused is true.\\n revert OrderPartiallyFilled(orderHash);\\n }\\n // Otherwise, ensure that order has not been entirely filled.\\n else if (orderStatusNumerator >= orderStatus.denominator) {\\n // Only revert if revertOnInvalid has been supplied as true.\\n if (revertOnInvalid) {\\n revert OrderAlreadyFilled(orderHash);\\n }\\n\\n // Return false as the order status is invalid.\\n return false;\\n }\\n }\\n\\n // Return true as the order status is valid.\\n valid = true;\\n }\\n}\\n\",\"keccak256\":\"0x27f0a3791ded47a6b8fc15e726a0b1a0932de4ee21652bc6d220b53e38201a55\",\"license\":\"MIT\"},\"seaport/contracts/lib/ZoneInteraction.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.13;\\n\\nimport { ZoneInterface } from \\\"../interfaces/ZoneInterface.sol\\\";\\n\\nimport { OrderType } from \\\"./ConsiderationEnums.sol\\\";\\n\\n// prettier-ignore\\nimport { AdvancedOrder, CriteriaResolver } from \\\"./ConsiderationStructs.sol\\\";\\n\\nimport \\\"./ConsiderationConstants.sol\\\";\\n\\n// prettier-ignore\\nimport {\\n ZoneInteractionErrors\\n} from \\\"../interfaces/ZoneInteractionErrors.sol\\\";\\n\\nimport { LowLevelHelpers } from \\\"./LowLevelHelpers.sol\\\";\\n\\n/**\\n * @title ZoneInteraction\\n * @author 0age\\n * @notice ZoneInteraction contains logic related to interacting with zones.\\n */\\ncontract ZoneInteraction is ZoneInteractionErrors, LowLevelHelpers {\\n /**\\n * @dev Internal view function to determine if an order has a restricted\\n * order type and, if so, to ensure that either the offerer or the zone\\n * are the fulfiller or that a staticcall to `isValidOrder` on the zone\\n * returns a magic value indicating that the order is currently valid.\\n *\\n * @param orderHash The hash of the order.\\n * @param zoneHash The hash to provide upon calling the zone.\\n * @param orderType The type of the order.\\n * @param offerer The offerer in question.\\n * @param zone The zone in question.\\n */\\n function _assertRestrictedBasicOrderValidity(\\n bytes32 orderHash,\\n bytes32 zoneHash,\\n OrderType orderType,\\n address offerer,\\n address zone\\n ) internal view {\\n // Order type 2-3 require zone or offerer be caller or zone to approve.\\n if (\\n uint256(orderType) > 1 &&\\n msg.sender != zone &&\\n msg.sender != offerer\\n ) {\\n // Perform minimal staticcall to the zone.\\n _callIsValidOrder(zone, orderHash, offerer, zoneHash);\\n }\\n }\\n\\n function _callIsValidOrder(\\n address zone,\\n bytes32 orderHash,\\n address offerer,\\n bytes32 zoneHash\\n ) internal view {\\n // Perform minimal staticcall to the zone.\\n bool success = _staticcall(\\n zone,\\n abi.encodeWithSelector(\\n ZoneInterface.isValidOrder.selector,\\n orderHash,\\n msg.sender,\\n offerer,\\n zoneHash\\n )\\n );\\n\\n // Ensure call was successful and returned the correct magic value.\\n _assertIsValidOrderStaticcallSuccess(success, orderHash);\\n }\\n\\n /**\\n * @dev Internal view function to determine whether an order is a restricted\\n * order and, if so, to ensure that it was either submitted by the\\n * offerer or the zone for the order, or that the zone returns the\\n * expected magic value upon performing a staticcall to `isValidOrder`\\n * or `isValidOrderIncludingExtraData` depending on whether the order\\n * fulfillment specifies extra data or criteria resolvers.\\n *\\n * @param advancedOrder The advanced order in question.\\n * @param criteriaResolvers An array where each element contains a reference\\n * to a specific offer or consideration, a token\\n * identifier, and a proof that the supplied token\\n * identifier is contained in the order's merkle\\n * root. Note that a criteria of zero indicates\\n * that any (transferable) token identifier is\\n * valid and that no proof needs to be supplied.\\n * @param priorOrderHashes The order hashes of each order supplied prior to\\n * the current order as part of a \\\"match\\\" variety\\n * of order fulfillment (e.g. this array will be\\n * empty for single or \\\"fulfill available\\\").\\n * @param orderHash The hash of the order.\\n * @param zoneHash The hash to provide upon calling the zone.\\n * @param orderType The type of the order.\\n * @param offerer The offerer in question.\\n * @param zone The zone in question.\\n */\\n function _assertRestrictedAdvancedOrderValidity(\\n AdvancedOrder memory advancedOrder,\\n CriteriaResolver[] memory criteriaResolvers,\\n bytes32[] memory priorOrderHashes,\\n bytes32 orderHash,\\n bytes32 zoneHash,\\n OrderType orderType,\\n address offerer,\\n address zone\\n ) internal view {\\n // Order type 2-3 require zone or offerer be caller or zone to approve.\\n if (\\n uint256(orderType) > 1 &&\\n msg.sender != zone &&\\n msg.sender != offerer\\n ) {\\n // If no extraData or criteria resolvers are supplied...\\n if (\\n advancedOrder.extraData.length == 0 &&\\n criteriaResolvers.length == 0\\n ) {\\n // Perform minimal staticcall to the zone.\\n _callIsValidOrder(zone, orderHash, offerer, zoneHash);\\n } else {\\n // Otherwise, extra data or criteria resolvers were supplied; in\\n // that event, perform a more verbose staticcall to the zone.\\n bool success = _staticcall(\\n zone,\\n abi.encodeWithSelector(\\n ZoneInterface.isValidOrderIncludingExtraData.selector,\\n orderHash,\\n msg.sender,\\n advancedOrder,\\n priorOrderHashes,\\n criteriaResolvers\\n )\\n );\\n\\n // Ensure call was successful and returned correct magic value.\\n _assertIsValidOrderStaticcallSuccess(success, orderHash);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal view function to ensure that a staticcall to `isValidOrder`\\n * or `isValidOrderIncludingExtraData` as part of validating a\\n * restricted order that was not submitted by the named offerer or zone\\n * was successful and returned the required magic value.\\n *\\n * @param success A boolean indicating the status of the staticcall.\\n * @param orderHash The order hash of the order in question.\\n */\\n function _assertIsValidOrderStaticcallSuccess(\\n bool success,\\n bytes32 orderHash\\n ) internal view {\\n // If the call failed...\\n if (!success) {\\n // Revert and pass reason along if one was returned.\\n _revertWithReasonIfOneIsReturned();\\n\\n // Otherwise, revert with a generic error message.\\n revert InvalidRestrictedOrder(orderHash);\\n }\\n\\n // Ensure result was extracted and matches isValidOrder magic value.\\n if (_doesNotMatchMagic(ZoneInterface.isValidOrder.selector)) {\\n revert InvalidRestrictedOrder(orderHash);\\n }\\n }\\n}\\n\",\"keccak256\":\"0xd405327255360f648d60e2ebd4ce1c9f19af0a90645d319e7694d10d5d3200b6\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101c060405234620000b9576200001f6200001962000114565b62000151565b604051615f7e90816200076d82396080518161282c015260a05181612852015260c05181612809015260e051818181611758015261269701526101005181818161162401526126e60152610120518181816117f40152612734015261014051816127b7015261016051816127dd015261018051818181611003015281816122f4015261246a01526101a05181818161233201526124a80152f35b600080fd5b604081019081106001600160401b03821117620000da57604052565b634e487b7160e01b600052604160045260246000fd5b601f909101601f19168101906001600160401b03821190821017620000da57604052565b620066eb60208138039182604051938492620001318285620000f0565b833981010312620000b957516001600160a01b0381168103620000b95790565b604060049162000160620002e3565b610120526101005260e05260c05260a05260805246610140526200018362000237565b610160526001600160a01b03166101808190528151630a96ad3960e01b815292839182905afa90811562000203575b600091620001cd575b506101a052620001cb6001600055565b565b620001f3915060403d8111620001fb575b620001ea8183620000f0565b81019062000213565b5038620001bb565b503d620001de565b6200020d6200022a565b620001b2565b9190826040910312620000b9576020825192015190565b506040513d6000823e3d90fd5b60c05160805160a0516040519160208301938452604083015260608201524660808201523060a082015260a0815260c0810181811060018060401b03821117620000da5760405251902090565b604051906200029382620000be565b6003825262312e3160e81b6020830152565b90815180926000905b828210620002cb575011620002c1570190565b6000828201520190565b915080602080928401015181850152018391620002ae565b620002ed62000747565b8051602080920120916200030062000284565b8281519101209160405181810192816200032b85600a906909ecccccae492e8cada560b31b81520190565b6e1d5a5b9d0e081a5d195b551e5c194b608a1b8152600f016d1859191c995cdcc81d1bdad95b8b60921b8152600e017f75696e74323536206964656e7469666965724f7243726974657269612c0000008152601d017f75696e74323536207374617274416d6f756e742c0000000000000000000000008152601401701d5a5b9d0c8d4d88195b99105b5bdd5b9d607a1b8152601101602960f81b81526001010392601f19938481018452620003e19084620000f0565b60405171086dedce6d2c8cae4c2e8d2dedc92e8cada560731b8282019081529481601287016e1d5a5b9d0e081a5d195b551e5c194b608a1b8152600f016d1859191c995cdcc81d1bdad95b8b60921b8152600e017f75696e74323536206964656e7469666965724f7243726974657269612c0000008152601d017f75696e74323536207374617274416d6f756e742c0000000000000000000000008152601401711d5a5b9d0c8d4d88195b99105b5bdd5b9d0b60721b8152601201701859191c995cdcc81c9958da5c1a595b9d607a1b8152601101602960f81b8152600101038181018352620004d29083620000f0565b6040519283818101620004fc906010906f09ee4c8cae486dedae0dedccadce8e6560831b81520190565b6f1859191c995cdcc81bd999995c995c8b60821b81526010016c1859191c995cdcc81e9bdb994b609a1b8152600d017113d999995c925d195b56d7481bd999995c8b60721b81526012017f436f6e73696465726174696f6e4974656d5b5d20636f6e73696465726174696f8152611b8b60f21b60208201526022016f1d5a5b9d0e081bdc99195c951e5c194b60821b8152601001711d5a5b9d0c8d4d881cdd185c9d151a5b594b60721b81526012016f1d5a5b9d0c8d4d88195b99151a5b594b60821b815260100170189e5d195ccccc881e9bdb9952185cda0b607a1b81526011016c1d5a5b9d0c8d4d881cd85b1d0b609a1b8152600d017f6279746573333220636f6e647569744b65792c0000000000000000000000000081526013016e3ab4b73a191a9b1031b7bab73a32b960891b8152600f01602960f81b81526001010382810185526200064e9085620000f0565b6040516c08a92a06e626488dedac2d2dc5609b1b8282019081529080600d83016b1cdd1c9a5b99c81b985b594b60a21b8152600c016e1cdd1c9a5b99c81d995c9cda5bdb8b608a1b8152600f016f1d5a5b9d0c8d4d8818da185a5b92590b60821b81526010017f6164647265737320766572696679696e67436f6e7472616374000000000000008152601901602960f81b8152600101038481018252620006f69082620000f0565b5190209786519020968351902095604051938492830195866200071991620002a5565b6200072491620002a5565b6200072f91620002a5565b039081018252620007419082620000f0565b51902090565b604051906200075682620000be565b600782526614d9585c1bdc9d60ca1b602083015256fe60806040526004361015610013575b600080fd5b60003560e01c806306fdde031461013f57806346423aa71461013657806355944a421461012d5780635b34b9661461012457806379df72bd1461011b57806387201b41146101125780638814773214610109578063a817440414610100578063b3a34c4c146100f7578063e7acab24146100ee578063ed98a574146100e5578063f07ec373146100dc578063f47b7740146100d3578063fb0f3ee1146100ca5763fd9f1e10146100c257600080fd5b61000e61132d565b5061000e61102c565b5061000e610f8b565b5061000e610f46565b5061000e610eb5565b5061000e610e07565b5061000e610da3565b5061000e610d32565b5061000e610be3565b5061000e610b0f565b5061000e610994565b5061000e61092f565b5061000e61089e565b5061000e6101c1565b5061000e610199565b91908251928382526000905b8482106101815750601f8460209495601f199311610174575b0116010190565b600085828601015261016d565b90602090818082850101519082860101520190610154565b503461000e57600060031936011261000e57602080526707536561706f727460475260606020f35b503461000e57602060031936011261000e57600435600052600260205260806040600020546040519060ff81161515825260ff8160081c16151560208301526effffffffffffffffffffffffffffff8160101c16604083015260881c6060820152f35b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60a0810190811067ffffffffffffffff82111761027057604052565b610278610224565b604052565b60c0810190811067ffffffffffffffff82111761027057604052565b6020810190811067ffffffffffffffff82111761027057604052565b6040810190811067ffffffffffffffff82111761027057604052565b90601f601f19910116810190811067ffffffffffffffff82111761027057604052565b60405190610160820182811067ffffffffffffffff82111761027057604052565b6040519061032282610254565b565b60209067ffffffffffffffff811161033e575b60051b0190565b610346610224565b610337565b6001600160a01b0381160361000e57565b60a435906103228261034b565b35906103228261034b565b3590600682101561000e57565b92919261038d82610324565b60409461039c865192836102d1565b819584835260208093019160a080960285019481861161000e57925b8584106103c85750505050505050565b868483031261000e5784879184516103df81610254565b6103e887610374565b8152828701356103f78161034b565b83820152858701358682015260608088013590820152608080880135908201528152019301926103b8565b9080601f8301121561000e5781602061043d93359101610381565b90565b92919261044c82610324565b60409461045b865192836102d1565b819584835260208093019160c080960285019481861161000e57925b8584106104875750505050505050565b868483031261000e57848791845161049e8161027d565b6104a787610374565b8152828701356104b68161034b565b838201528587013586820152606080880135908201526080808801359082015260a080880135906104e68261034b565b820152815201930192610477565b9080601f8301121561000e5781602061043d93359101610440565b6004111561000e57565b35906103228261050f565b9190916101608184031261000e5761053a6102f4565b9261054482610369565b845261055260208301610369565b602085015267ffffffffffffffff90604083013582811161000e5781610579918501610422565b6040860152606083013591821161000e576105959183016104f4565b60608401526105a660808201610519565b608084015260a081013560a084015260c081013560c084015260e081013560e0840152610100808201359084015261012080820135908401526101408091013590830152565b35906effffffffffffffffffffffffffffff8216820361000e57565b92919267ffffffffffffffff8211610650575b604051916106336020601f19601f84011601846102d1565b82948184528183011161000e578281602093846000960137010152565b610658610224565b61061b565b9080601f8301121561000e5781602061043d93359101610608565b91909160a08184031261000e5761068d610315565b9267ffffffffffffffff823581811161000e57826106ac918501610524565b85526106ba602084016105ec565b60208601526106cb604084016105ec565b6040860152606083013581811161000e57826106e891850161065d565b6060860152608083013590811161000e57610703920161065d565b6080830152565b9080601f8301121561000e5781359061072282610324565b9261073060405194856102d1565b828452602092838086019160051b8301019280841161000e57848301915b84831061075e5750505050505090565b823567ffffffffffffffff811161000e57869161078084848094890101610678565b81520192019161074e565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020808501948460051b01011161000e57565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600611156107f657565b6103226107bc565b608090805161080c816107ec565b8352816001600160a01b03918260208201511660208601526040810151604086015260608101516060860152015116910152565b90815180825260208080930193019160005b828110610860575050505090565b909192938260e0600192604088516108798382516107fe565b808501516001600160a01b031660a0840152015160c082015201950193929101610852565b50606060031936011261000e5767ffffffffffffffff60043581811161000e576108cc90369060040161070a565b9060243581811161000e576108e590369060040161078b565b60443592831161000e5761092b9361091161090761091795369060040161078b565b9490933691611bff565b90613e21565b604051918291602083526020830190610840565b0390f35b503461000e57600060031936011261000e57610949615017565b3360005260016020526020604060002060018154018091556040518181527f721c20121297512b72821b97f5326877ea8ecf4bb9948fea5bfcb6453074d37f833392a2604051908152f35b503461000e5760031960208136011261000e5760043567ffffffffffffffff811161000e576101608160040192823603011261000e576109d38261152d565b916109e06024830161152d565b906109ee6044840182611cfc565b6064850192916109fe8484611d50565b92909360848801610a0e90611dae565b95610a1891611d50565b969050610a236102f4565b6001600160a01b0390991689526001600160a01b031660208901523690610a4992610381565b60408701523690610a5992610440565b6060850152610a6b9060808501611db8565b60a482013560a084015260c482013560c084015260e482013560e08401526101048201356101008401526101248201356101208401526101408301526101440135610ab59161268a565b604051908152602090f35b9092916040820191604081528451809352606081019260208096019060005b818110610af95750505061043d9394818403910152610840565b8251151586529487019491870191600101610adf565b5060e060031936011261000e5767ffffffffffffffff60043581811161000e57610b3d90369060040161070a565b60243582811161000e57610b5590369060040161078b565b909160443584811161000e57610b6f90369060040161078b565b9060643595861161000e57610b8b610ba496369060040161078b565b929091610b9661035c565b9560c4359760843596611cc2565b9061092b60405192839283610ac0565b602060031982011261000e576004359067ffffffffffffffff821161000e57610bdf9160040161078b565b9091565b503461000e57610bf236610bb4565b610bfa615017565b60005b818110610c105760405160018152602090f35b80610c1e6001928486613f13565b610c2881806146ae565b610c318161152d565b91610c44610c3f3684610524565b614fa9565b91610c59836000526002602052604060002090565b610c6381856155a2565b50610c76610c72825460ff1690565b1590565b610c86575b505050505001610bfd565b7ffde361574a066b44b3b5fe98a87108b7565e327327954c4faeea56a4e6491a0a92610d2592610d01610d0793610cd6610ccf610cc86020968781019061158b565b3691610608565b898b615303565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b0161152d565b6040519384526001600160a01b039081169416929081906020820190565b0390a33880808080610c7b565b50604060031936011261000e5767ffffffffffffffff60043581811161000e57610d6090369060040161078b565b60249291923591821161000e5761092b92610d8d610d8561091794369060040161078b565b939092614750565b60405190610d9a82610299565b60008252613e21565b5060031960408136011261000e576004359067ffffffffffffffff821161000e57604090823603011261000e57610dfd610de16020926004016146e1565b60405190610dee82610299565b600082523391602435916141fd565b6040519015158152f35b5060031960808136011261000e576004359067ffffffffffffffff9081831161000e5760a090833603011261000e5760243590811161000e5761092b91610e55610e9692369060040161078b565b90606435610e628161034b565b6001600160a01b038116610ea85750610e90610e8433945b3690600401610678565b91604435933691611bff565b906141fd565b60405190151581529081906020820190565b610e84610e909194610e7a565b5060a060031936011261000e5767ffffffffffffffff60043581811161000e57610ee390369060040161078b565b9060243583811161000e57610efc90369060040161078b565b91909260443594851161000e57610f25610f1d610ba496369060040161078b565b929093614750565b9160405193610f3385610299565b6000855260843595339560643595612a0b565b503461000e57602060031936011261000e576020610f83600435610f698161034b565b6001600160a01b0316600052600160205260406000205490565b604051908152f35b503461000e57600060031936011261000e57610ff3610fa86127b4565b60405190610fb5826102b5565b600382527f312e3100000000000000000000000000000000000000000000000000000000006020830152604051928392606084526060840190610148565b9060208301526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660408301520390f35b5060031960208136011261000e5760043567ffffffffffffffff811161000e576102408160040192823603011261000e5761012435908160021c926001841193341585036112f85784936003821160028314916110d183600286117ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe870102018815926001820185028460011b880103998a92600360a088026024013593168a6115dc565b6110e38260051b6101c40135986107ec565b156111b5575050506111036110f78261152d565b6001600160a01b031690565b6001600160a01b0390811660248401351761118b5761115f60449461115a6111759761116b9461113560a4890161152d565b9060648901946111448661152d565b9060e48b01359360c48c01359333931691611dcf565b61152d565b91610204840190611537565b93909201356119df565b61117f6001600055565b60405160018152602090f35b60046040517f6ab37ce7000000000000000000000000000000000000000000000000000000008152fd5b9194509161121e6110f7606461122396611228996111d1611514565b8a819b996111df839b6107ec565b1561122d5750610d01916111f560a4850161152d565b61120086860161152d565b9060e48601359160c4870135916001600160a01b03339216906120c8565b611ac5565b6122c4565b611175565b611236816107ec565b6003810361127d57506112789161124f60a4850161152d565b61125a86860161152d565b9060e48601359160c4870135916001600160a01b03339216906121be565b610d01565b806112896004926107ec565b036112c3576112789161129b8861152d565b6112a686860161152d565b6044860135916001600160a01b03602488013592169033906120c8565b611278916112d08861152d565b6112db86860161152d565b6044860135916001600160a01b03602488013592169033906121be565b6040517fa61be9f0000000000000000000000000000000000000000000000000000000008152346004820152602490fd5b0390fd5b503461000e5761133c36610bb4565b611344615017565b60005b81811061135a5760405160018152602090f35b611365818385614fe2565b61136e8161152d565b60209061137c82840161152d565b6001600160a01b0391828116938433141580611508575b6114de576040956113a681880182611cfc565b6060808401926113b68486611d50565b90916080948a8689016113c890611dae565b976113d3908a611d50565b9a90506113de6102f4565b6001600160a01b03909c168c526001600160a01b03909116908b0152369061140592610381565b8c890152369061141492610440565b9086015284019061142491611db8565b60a0808201359084015260c0808201359084015260e08082013590840152610100808201359084015261012080820135908401526101409182840152013561146b9161268a565b93611480856000526002602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101001790555193845216917f6bacc01dbe442496068f7d234edd811f1a5f833243e0aec824f86ab861f3c90d90602090a3600101611347565b60046040517f80ec7374000000000000000000000000000000000000000000000000000000008152fd5b50838316331415611393565b60405190611521826102b5565b60208083523683820137565b3561043d8161034b565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e57602001918160061b3603831361000e57565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e5760200191813603831361000e57565b9591906115e7615008565b6115fb610140880135610120890135615296565b50611604611927565b611622611615610200890189611537565b6101e08a013591506118f6565b7f00000000000000000000000000000000000000000000000000000000000000006080528160a0526060602460c037604060646101203760e06080908120610160526001610264359081016102a060059290921b918201526102c081019384526024906102e00137610160928460a0528560c052600060e05260005b8394610204358210156116fb5790604060a0600193602090818560061b6102840161010037838560061b6102840161012037019660e0608020885201968888528960c08201526101008360061b610284019101370193929361169e565b5090929350969590966001610204350160051b610160206060525b83610264358210156117495790604060a060019301958787528860c08201526101008360061b6102840191013701611716565b505093509490506103229391507f00000000000000000000000000000000000000000000000000000000000000006080528260a052606060c460c03760206101046101203760c0608020600052602060002060e05260016102643560051b610200015261022092836102643560051b0152606060c46102406102643560051b01376118ee610cc8608435936117f1856001600160a01b03166000526001602052604060002090565b547f00000000000000000000000000000000000000000000000000000000000000006080526040608460a03760605161010052846101205260a0610144610140376101e0526101809485608020956102643560051b0190868252336101a06102643560051b015260806101c06102643560051b01526101206101e06102643560051b01527f9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f3160a4359260a061026435026101e00190a360006060526118e56060820161115a6118bf8261152d565b966118cc6080860161152d565b906001600160a01b03809916906101608701358b61569d565b9581019061158b565b9216906147dc565b106118fd57565b60046040517f466aa616000000000000000000000000000000000000000000000000000000008152fd5b601861012435106102643560061b61026001610244351461024061022435146020600435141616161561195657565b60046040517f39f3e3fd000000000000000000000000000000000000000000000000000000008152fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b90156119b95790565b61043d611980565b91908110156119d2575b60061b0190565b6119da611980565b6119cb565b919234936000915b808310611a4257505050828211611a185781611a0291611e97565b808211611a0d575050565b610322910333611e97565b60046040517f1a783b8d000000000000000000000000000000000000000000000000000000008152fd5b909194611a508683856119c1565b90813590808211611a1857611a748260206001950135611a6f8161034b565b611e97565b03950191906119e7565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b818110611ab9570390565b611ac1611a7e565b0390565b90939291908115611b85579333611ade60a0830161152d565b60e08301359260c08101355b61118b578460051b6101e40335946102008201611b078184611537565b93905060005b848110611b24575050505050956103229596611f2c565b8989858e611b3c85611b368989611537565b906119c1565b803592611b6a575b91611b649391611b5d6110f7602060019998960161152d565b908c611f2c565b01611b0d565b92909493919b8c611b7a91611aae565b9b9193949092611b44565b933394611b918261152d565b6040830135926020810135611aea565b81601f8201121561000e57803591611bb883610324565b92611bc660405194856102d1565b808452602092838086019260051b82010192831161000e578301905b828210611bf0575050505090565b81358152908301908301611be2565b909291611c0b84610324565b91604094611c1b865194856102d1565b839581855260208095019160051b83019380851161000e5783925b858410611c465750505050505050565b67ffffffffffffffff90843582811161000e5786019060a08285031261000e578451611c7181610254565b8235815289830135600281101561000e578a82015285830135868201526060808401359082015260808084013594851161000e57611cb3868c96879601611ba1565b90820152815201930192611c36565b90611cf090610bdf9a99989796959493986001600160a01b03811615600014611cf6575033985b3691611bff565b90612a0b565b98611ce9565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e576020019160a082023603831361000e57565b9035907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561000e570180359067ffffffffffffffff821161000e576020019160c082023603831361000e57565b600411156107f657565b3561043d8161050f565b6004821015611dc45752565b611dcc6107bc565b52565b949290959391841515600014611e3b5761032296604051967f4ce34aa2000000000000000000000000000000000000000000000000000000008852602060048901526001602489015260448801526064870152608486015260a485015260c484015260e4830152612451565b9291946002919450611e4c816107ec565b03611e8b57600103611e61576103229361504d565b60046040517fefcc00b1000000000000000000000000000000000000000000000000000000008152fd5b9291906103229461515b565b90611ea181611efb565b600080808084865af115611eb3575050565b60449250611ebf612895565b6001600160a01b03604051927f470c7c1d0000000000000000000000000000000000000000000000000000000084521660048301526024820152fd5b15611f0257565b60046040517f91b3e514000000000000000000000000000000000000000000000000000000008152fd5b929193949094611f3b83611efb565b611f4581836122b1565b806120ba575050604051926000947f23b872dd00000000000000000000000000000000000000000000000000000000865280600452816024528260445260208660648180885af1803d15601f3d1160018a51141617163d1515811615611fb4575b505050505050604052606052565b80863b151516611fa657908795969115611ff457602486887f5f15d672000000000000000000000000000000000000000000000000000000008252600452fd5b1561202e57506084947f98891923000000000000000000000000000000000000000000000000000000008552600452602452604452606452fd5b3d61206d575b5060a4947ff486bc8700000000000000000000000000000000000000000000000000000000855260045260245260445281606452608452fd5b601f3d0160051c9060051c9080600302918082116120a1575b505060205a9101106120985785612034565b833d81803e3d90fd5b8080600392028380020360091c92030201018680612086565b9061032295929493916125c0565b959092949391936120d981836122b1565b806120f0575050600103611e61576103229361504d565b9060649593916000979593975060208251146000146121ab5760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280888401525b02019360027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48601527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe48501526004840152602483015260448201520152565b5060c0868201600181510180915261214b565b9590919293946121cd86611efb565b6121d781836122b1565b806121e75750506103229461515b565b906064959694939291602082511460001461229e5760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280888401525b02019360037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48601527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe48501526004840152602483015260448201520152565b5060c0868201600181510180915261223e565b906020820151036122bf5750565b610322905b60408082510361244d57602082015160c06064840151026044019180519260206001600160a01b036000928184927f00000000000000000000000000000000000000000000000000000000000000001674ff00000000000000000000000000000000000000001783528684527f000000000000000000000000000000000000000000000000000000000000000086526055600b201696855281805284880182885af190519015612402577fffffffff000000000000000000000000000000000000000000000000000000007f4ce34aa2000000000000000000000000000000000000000000000000000000009116036123c05750505060209052565b517f1cf99b2600000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b03919091166024820152604490fd5b611329848361240f612895565b517fd13d53d40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201529081906024820190565b5050565b6040519160206001600160a01b036101046000938285937f00000000000000000000000000000000000000000000000000000000000000001674ff00000000000000000000000000000000000000001784528685527f00000000000000000000000000000000000000000000000000000000000000006040526055600b20169660405282805282875af190519015612574577fffffffff000000000000000000000000000000000000000000000000000000007f4ce34aa200000000000000000000000000000000000000000000000000000000911603612530575050565b6040517f1cf99b2600000000000000000000000000000000000000000000000000000000815260048101919091526001600160a01b03919091166024820152604490fd5b61132983612580612895565b6040517fd13d53d40000000000000000000000000000000000000000000000000000000081526001600160a01b0390911660048201529081906024820190565b9060649492939160208251146000146126775760c0906001906040845260208401527f4ce34aa20000000000000000000000000000000000000000000000000000000060408401526020604484015280878401525b02019260017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc48501527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe484015260048301526024820152600060448201520152565b5060c08582016001815101809152612615565b91909161014081018051917f0000000000000000000000000000000000000000000000000000000000000000604051604083018051928351926020809501906000915b868684106127915750505050506040519160051b8220917f00000000000000000000000000000000000000000000000000000000000000009093606086019481865101906000915b8a831061276d575050505050601f198660051b604051209401978851907f00000000000000000000000000000000000000000000000000000000000000008a5282519383528451958552865261018089209852525252565b838082601f19600194510180519089815260e0812087525201920192019190612715565b8082601f19600194510180519088815260c08120875252019201920191906126cd565b467f0000000000000000000000000000000000000000000000000000000000000000036127ff577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261288f8161027d565b51902090565b3d61289c57565b601f3d0160051c60405160051c9080600302918082116128cf575b505060205a9101106128c557565b3d6000803e3d6000fd5b8080600392028380020360091c920302010138806128b7565b919082604091031261000e576040516040810181811067ffffffffffffffff821117612922575b6040526020808294803584520135910152565b61292a610224565b61290f565b92919261293b82610324565b60409261294a845192836102d1565b819581835260208093019160061b84019381851161000e57915b84831061297357505050505050565b83869161298084866128e8565b815201920191612964565b9291909261299884610324565b916129a660405193846102d1565b829480845260208094019060051b83019282841161000e5780915b8483106129d057505050505050565b823567ffffffffffffffff811161000e57820184601f8201121561000e578691612a00868385809535910161292f565b8152019201916129c1565b96989792612a268a612a359695612a2d95949998998b612c40565b369161298b565b93369161298b565b908251825191612a4d612a48848461314b565b61366d565b9760009586915b848310612b47575050506000935b838510612abf57505050505080612ab4575b50825115612a8a5782612a8691613b15565b9190565b60046040517fd5da9a1b000000000000000000000000000000000000000000000000000000008152fd5b835103835238612a74565b909192939488612ada84612ad38986612c1e565b518a613745565b8051608001516001600160a01b03166001600160a01b03612b086110f760208501516001600160a01b031690565b911603612b225750506001809101955b0193929190612a62565b8791612b4191612b3a85896001979c01038093612c1e565b528b612c1e565b50612b18565b9091968a612b6583612b5e8b879b98999a9b612c1e565b518c6136c9565b8051608001516001600160a01b03166001600160a01b03612b936110f760208501516001600160a01b031690565b911603612bb05750506001809101975b0191909594939295612a54565b8991612bcd91612bc6856001969d038093612c1e565b528d612c1e565b50612ba3565b90612bdd82610324565b612bea60405191826102d1565b828152601f19612bfa8294610324565b0190602036910137565b602090805115612c12570190565b612c1a611980565b0190565b6020918151811015612c33575b60051b010190565b612c3b611980565b612c2b565b93929091612c4c615008565b845192612c5884612bd3565b9160008352601d604560003560e01c061160011b9060005b868110612d30575050600314612d0657612c8a9086613266565b60005b838110612c9c57505050509050565b80612ca960019284612c1e565b5115612d0157612cfb612cbc8289612c1e565b5151612cc88386612c1e565b519086612cdc82516001600160a01b031690565b60208301516001600160a01b03169060606040850151940151946145e5565b01612c8d565b612cfb565b60046040517f12d3f5a3000000000000000000000000000000000000000000000000000000008152fd5b612d3a818a612c1e565b51918015612ebf57612d4d868685614cb3565b9290916001850189528215612eab57907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91612d89868b612c1e565b52019380519260a084015193604060c08201519101518051908560005b838110612e405750505050606080935101519485519560005b878110612dd85750505050505050506001905b01612c70565b808760a0612de860019486612c1e565b5188612e2489898d6080860197612e01895187836131fa565b918701958651908a518214600014612e30575050508085525b80885284516131a0565b90520151905201612dbf565b612e39926131fa565b8552612e1a565b612e4a8184612c1e565b519b8c5115179b86868b60808401938451612e669085896131fa565b60608192019586519881518a1460001499612e919760019b612e9b575050508187525b52845161315f565b9052018690612da6565b612ea4926131fa565b8752612e89565b509360019392506000915060200152612dd2565b91906000602060019301528181018652612dd2565b612edc615008565b805192612ee884612bd3565b92600091828552601d6045843560e01c061160011b90835b878110612f90575050600314612d0657612f1a9083613266565b838110612f275750505050565b80612f3460019285612c1e565b5115612f8b57612f85612f478285612c1e565b5151612f538387612c1e565b5190612f6681516001600160a01b031690565b60208201516001600160a01b0316906060604084015193015193614513565b01612f1a565b612f85565b612f9a8187612c1e565b51918581156130fb5750612faf888685614ee0565b929091600185018b528883156130e95750907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91612fed868d612c1e565b52019380519260a084015191604060c0860151950151805190858c5b83811061308f5750505050606090510151938451948a5b86811061303857505050505050506001905b01612f00565b8061304560019284612c1e565b5160a0608082019189613083888b61305f87518d866131fa565b60608601948d8651908a518214600014612e305750505080855280885284516131a0565b90520151905201613020565b6130998184612c1e565b519b8c5115179b868a89608084019384516130b59085896131fa565b60608192019586519881518a14600014996130df9760019b612e9b5750505081875252845161315f565b9052018690613009565b92505093600193925060200152613032565b6020600193929401528181018852613032565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482118115151661313f570290565b613147611a7e565b0290565b81198111613157570190565b612c1a611a7e565b909283820361316e5750505090565b82939161318a613196946131909303954203918287039061310e565b9261310e565b9061314b565b9081049015150290565b90928382036131af5750505090565b926131906131cd9261318a856001969703964203918288039061310e565b917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff830104019015150290565b9190918281146132435782818309613219576132159161310e565b0490565b7fc63cf0890000000000000000000000000000000000000000000000000000000060005260046000fd5b50905090565b600211156107f657565b5161043d816107ec565b611dcc826107ec565b815181519260005b8281106133a45750505060005b82811061328757505050565b6132918183612c1e565b516132c56132b160208301516effffffffffffffffffffffffffffff1690565b6effffffffffffffffffffffffffffff1690565b1561339b5751606081018051519060005b828110613354575050506040809101908151519160005b83811061330257505050506001905b0161327b565b61331f613319613313838551612c1e565b51613253565b60031090565b61332b576001016132ed565b600483517fa6cfc673000000000000000000000000000000000000000000000000000000008152fd5b613365613319613313838551612c1e565b613371576001016132d6565b60046040517fff75a340000000000000000000000000000000000000000000000000000000008152fd5b506001906132fc565b6133ae8183612c1e565b5180519086821015613565576020916133e56132b1846133ce848b612c1e565b5101516effffffffffffffffffffffffffffff1690565b1561355a576133f49087612c1e565b515191604092838301519183015161340b81613249565b61341481613249565b6134e55783015180518210156134bc579061342e91612c1e565b5191600383519361343e856107ec565b84906134558482019160048351981485039061325d565b606085015190525b11156134935750906001929181613478575b50505b0161326e565b61348c91608060608301519201519161358f565b388061346f565b600490517f94eb6af6000000000000000000000000000000000000000000000000000000008152fd5b600484517fbfb3f8ce000000000000000000000000000000000000000000000000000000008152fd5b929060608094015180518210156135315760039161350291612c1e565b5193845194613510866107ec565b85916135278583019260048451991486039061325d565b850151905261345d565b600483517f6088d7de000000000000000000000000000000000000000000000000000000008152fd5b505050600190613472565b60046040517f869586c4000000000000000000000000000000000000000000000000000000008152fd5b91909160009081526020808220928181019282825192600593841b0101915b8285106135eb575050505050036135c157565b60046040517f09bde339000000000000000000000000000000000000000000000000000000008152fd5b8451808711821b968752958418959095526040812094938301936135ae565b604051906060820182811067ffffffffffffffff821117613660575b8060405260408361363683610254565b6000928381528360808301528360a08301528360c08301528360e083015281528260208201520152565b613668610224565b613626565b9061367782610324565b61368460405191826102d1565b828152601f196136948294610324565b019060005b8281106136a557505050565b6020906136b061360a565b82828501015201613699565b906002821015611dc45752565b9092916136d461360a565b93805115613714576136f6926001600160a01b038693166080845101526137e9565b81516060810151156137055750565b60806000918260208601520152565b60246040517f375c24c100000000000000000000000000000000000000000000000000000000815260006004820152fd5b92919061375061360a565b9381511561378d576137639185916139aa565b60208301903382526040840152825190606082015115613781575050565b60009182608092520152565b60246040517f375c24c100000000000000000000000000000000000000000000000000000000815260016004820152fd5b507f7fda72790000000000000000000000000000000000000000000000000000000060005260046000fd5b92919260208201906020825151825181101561399d575b60051b82010151928351926020604085015181835101518151811015613990575b60051b01015160009460208697015161397a575b9061012060609260408b5193805185526020810151602086015201516040840152805160208c0152015160408a01522091805160051b01905b8181106138c1575050505060608293945101526138885750565b60011461389757610322611a7e565b7f91b3e5140000000000000000000000000000000000000000000000000000000060005260046000fd5b60209095949501906020825151855181101561396d575b60051b85010151602081015115613964575160606020604083015181865101518151811015613957575b60051b01015196818801519081158a8381011060011b17179801966000828201522084149060408a0151610120820151149060208b015190511416161561394a575b9061386e565b6139526137be565b613944565b61395f6137be565b613902565b50949394613944565b6139756137be565b6138d8565b6060820180516000909152801597509550613835565b6139986137be565b613821565b6139a56137be565b613800565b9291602080830194855151918151831015613b08575b80600593841b8301015194606093828588510151818b5101518151811015613afb575b831b010151926000968188990151613ae6575b51948451865281850151828701526040850151604087015260a0809501519a608087019b8c52878720948051851b01905b818110613a4257505050505050508394955001526138885750565b83909a999a01908c848351518551811015613ad9575b871b850101518581015115613acf578a869151015181855101518151811015613ac2575b881b0101518a81019b8d8d518091019e8f9115911060011b17179c9b60009052888b822089149251910151141615613ab5575b90613a27565b613abd6137be565b613aaf565b613aca6137be565b613a7c565b5050999899613aaf565b613ae16137be565b613a58565b848701805160009091528015995097506139f6565b613b036137be565b6139e3565b613b106137be565b6139c0565b908151613b2181612bd3565b9260005b828110613be5575050503490613b39611514565b9080519060005b828110613b7457505050613b53906122c4565b80613b64575b5061043d6001600055565b613b6e9033611e97565b38613b59565b613b7e8183612c1e565b518051908151613b8d816107ec565b613b96816107ec565b15613bca575b8560019392826040613bbb6020613bc49601516001600160a01b031690565b91015191613cae565b01613b40565b9560608293920181815111611a185751900395909190613b9c565b613bef8183612c1e565b51613c0f6132b160208301516effffffffffffffffffffffffffffff1690565b15613ca557613c27613c218388612c1e565b60019052565b606080915101519081519160005b838110613c4a57505050506001905b01613b25565b82613c558284612c1e565b51015180613c665750600101613c35565b6040517fa5f542080000000000000000000000000000000000000000000000000000000081526004810187905260248101929092526044820152606490fd5b50600190613c44565b9290918351613cbc816107ec565b613cc5816107ec565b613d1a57505050613ce36110f760208301516001600160a01b031690565b6001600160a01b03604083015191161761118b57806060613d1160806103229401516001600160a01b031690565b91015190611e97565b90919260018151613d2a816107ec565b613d33816107ec565b03613d8357604081015161118b5761032293613d5960208301516001600160a01b031690565b906001600160a01b036060613d7860808601516001600160a01b031690565b940151931691611f2c565b9260028451613d91816107ec565b613d9a816107ec565b03613de05783613db760206103229601516001600160a01b031690565b60808201516001600160a01b0316926001600160a01b03606060408501519401519416916120c8565b83613df860206103229601516001600160a01b031690565b60808201516001600160a01b0316926001600160a01b03606060408501519401519416916121be565b90613e33909493929482519083612ed4565b613e3c8261366d565b9160009485915b808310613e705750505090613e619184829495613e65575b50613b15565b5090565b825103825238613e5b565b909195613e7e878385613f13565b613ea4613e8b8280611537565b90613e9b60209485810190611537565b92909189613f6c565b906001600160a01b03613ed96110f7613ec960808651016001600160a01b0390511690565b938501516001600160a01b031690565b911603613ef057506001809101965b019190613e43565b96613f0d8298600193830390613f06828a612c1e565b5287612c1e565b50613ee8565b9190811015613f54575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc18136030182121561000e570190565b613f5c611980565b613f1d565b61043d9036906128e8565b92909391613f7861360a565b948115801561415e575b61413457613f8e61360a565b613fa381613f9d36888861292f565b886139aa565b5191613fba87613fb436848661292f565b886137e9565b613fc48751613253565b835190613fd0826107ec565b613fd9826107ec565b613fe2816107ec565b148015906140fc575b80156140e9575b6140bf5761043d9561406f95608095896060948588019687518784510151106000146140825750505061403161402c8593614057936119b0565b613f61565b60208361404a8d828a5191510151900396845190612c1e565b5151015191015190612c1e565b5101528651015190525b01516001600160a01b031690565b6080835101906001600160a01b03169052565b86979694506140b1935061404a856140a161402c6020956040956119b0565b9451015188518551910397612c1e565b510152519086510152614061565b60046040517f09cfb455000000000000000000000000000000000000000000000000000000008152fd5b5060408751015160408401511415613ff2565b508651602001516001600160a01b03166001600160a01b0361412b6110f760208701516001600160a01b031690565b91161415613feb565b60046040517f98e9db6e000000000000000000000000000000000000000000000000000000008152fd5b508315613f82565b6040519061417382610254565b604051608083610160830167ffffffffffffffff8111848210176141f0575b6040526000808452806020850152606093846040820152848082015281848201528160a08201528160c08201528160e08201528161010082015281610120820152816101408201528252806020830152604082015282808201520152565b6141f8610224565b614192565b909291614208615017565b600260005561421784836148c0565b9490919260405195614228876102b5565b6001875260005b6020808210156142515790602091614245614166565b90828b0101520161422f565b505061428583959761428061429e9a61428e97998351156142ba575b60208401528251156142ad575b82613266565b612c04565b515195866142c7565b81516001600160a01b0316612cdc565b6142a86001600055565b600190565b6142b5611980565b61427a565b6142c2611980565b61426d565b939192909360a093848201519360c0830151966142e2611514565b96604092838601908151519160005b8381106143d7575050505034986060809601978851519860005b8a8110614338575050505050505050505050614326906122c4565b8061432e5750565b6103229033611e97565b614343818351612c1e565b51898101805161435d87878d8c60808801958651906144a1565b8092528783015190528151614371816107ec565b61437a816107ec565b15614397575b50906143918d8c6001943390613cae565b0161430b565b90919e9d8082116143ae579d9e9d039c908a614380565b600489517f1a783b8d000000000000000000000000000000000000000000000000000000008152fd5b6143e2818351612c1e565b5180516143ee816107ec565b6143f7816107ec565b15614441579061443b8d8f93868f8d6144236001988e936060870193845195608089019687519061446a565b9052528c610120613bbb82516001600160a01b031690565b016142f1565b600488517f12d3f5a3000000000000000000000000000000000000000000000000000000008152fd5b90939084810361448057505061043d93506131fa565b938361449561043d979661449b9496866131fa565b936131fa565b9061315f565b9093908481036144b757505061043d93506131fa565b938361449561043d97966144cc9496866131fa565b906131a0565b90815180825260208080930193019160005b8281106144f2575050505090565b909192938260a08261450760019489516107fe565b019501939291016144e4565b91939290936040805193608091828601918652602090600082880152838188015285518093528160a088019601936000915b84831061459a5750505050505091614595827f9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f31948380950360608501526001600160a01b038091169716956144d2565b0390a3565b90919293949684836001928a5180516145b2816107ec565b8252808401516001600160a01b031684830152858101518683015260609081015190820152019801959493019190614545565b92909493916040918251946080918287019187526001600160a01b0394856020921682890152838189015286518093528160a089019701936000915b84831061466a57505050505050828285949361459593867f9d9af8e38d66c62e2c12f0225249fd9d721c54b83f48d9352c97c6cacdcb6f319896036060870152169716956144d2565b90919293949784836001928b518051614682816107ec565b8252808401518c1684830152858101518683015260609081015190820152019901959493019190614621565b9035907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffea18136030182121561000e570190565b6146e9614166565b506147336147056146fa83806146ae565b92602081019061158b565b61471c6040519461471586610254565b3690610524565b845260016020850152600160408501523691610608565b606082015260405161474481610299565b60008152608082015290565b61475982610324565b9161476760405193846102d1565b808352601f1961477682610324565b0160005b8181106147c557505060005b8181106147935750505090565b806147a96147a46001938587613f13565b6146e1565b6147b38287612c1e565b526147be8186612c1e565b5001614786565b6020906147d0614166565b8282880101520161477a565b929190836000526002602052604060002091825460ff8160081c1661487b576effffffffffffffffffffffffffffff8160101c1661484a579460ff7101000000000000000000000000000001000195961615614839575b50505055565b61484292615303565b388080614833565b602486604051907fee9e0e630000000000000000000000000000000000000000000000000000000082526004820152fd5b602486604051907f1a5155740000000000000000000000000000000000000000000000000000000082526004820152fd5b90805b6148b7575090565b809106806148af565b90918151926148db610c7260a086015160c087015190615296565b614ca7576148fe6132b160208501516effffffffffffffffffffffffffffff1690565b9361491e6132b160408601516effffffffffffffffffffffffffffff1690565b948581118015614c9f575b614c755785811080614c5d575b614c335761498261494683614fa9565b9360e0840151608085015161495a81611da4565b85516001600160a01b0316918761497b60208901516001600160a01b031690565b948b615cc1565b614996836000526002602052604060002090565b916149a4610c7284866155a2565b614c23578254958460ff881615614bfc575b5050506effffffffffffffffffffffffffffff90818660101c169560881c96871515600014614b7f5760018103614b4757505085945b856149f7888361314b565b11614b3d575b86614a079161314b565b8082871183831117614ad6575b5090614a8f818493614a4e614ad19660017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b84547fffffffffffffffffffffffffffffff00000000000000000000000000000000ff16911660101b70ffffffffffffffffffffffffffffff000016178355565b815470ffffffffffffffffffffffffffffffffff1690861660881b7fffffffffffffffffffffffffffffff000000000000000000000000000000000016179055565b929190565b9690614ae987614aef92989594986148ac565b826148ac565b80150180809204970492049480861181841117614b0e57909138614a14565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80860396506149fd565b959096868103614b58575b506149ec565b614b7281614b6c89614b78959b9a9b61310e565b9861310e565b9761310e565b9438614b52565b9550955090614ad191614bb78260017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b81547fffffffffffffffffffffffffffffff00000000000000000000000000000000ff1687821660101b70ffffffffffffffffffffffffffffff000016178255614a8f565b6060614c12614c1b94516001600160a01b031690565b92015191615303565b3880846149b6565b5050509150915090600090600090565b60046040517fa11b63ff000000000000000000000000000000000000000000000000000000008152fd5b5060016080830151614c6e81611da4565b1615614936565b60046040517f5a052b32000000000000000000000000000000000000000000000000000000008152fd5b508015614929565b50600092508291508190565b919290928251614ccf610c7260a083015160c0840151906152df565b614ed057614cf26132b160208601516effffffffffffffffffffffffffffff1690565b614d116132b160408701516effffffffffffffffffffffffffffff1690565b958682118015614ec8575b614c755786821080614eb0575b614c3357614d7d90614d3a84614fa9565b9460e0850151608086015190614d4f82611da4565b87614d6188516001600160a01b031690565b93614d7660208a01516001600160a01b031690565b958c615da2565b614d91836000526002602052604060002090565b91614d9f610c728486615645565b614c23578254958460ff881615614e92575b5050506effffffffffffffffffffffffffffff90818660101c169560881c96871515600014614b7f5760018103614e6657505085945b85614df2888361314b565b11614e5c575b86614e029161314b565b8082871183821117614e48575090614a8f818493614a4e614ad19660017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00825416179055565b969050614aef614ae98789989594986148ac565b8086039650614df8565b959096868103614e77575b50614de7565b614b7281614b6c89614e8b959b9a9b61310e565b9438614e71565b6060614c12614ea894516001600160a01b031690565b388084614db1565b5060016080840151614ec181611da4565b1615614d29565b508115614d1c565b5050915050600090600090600090565b919290928251614efc610c7260a083015160c084015190615296565b614ed057614f1f6132b160208601516effffffffffffffffffffffffffffff1690565b614f3e6132b160408701516effffffffffffffffffffffffffffff1690565b958682118015614fa1575b614c755786821080614f89575b614c3357614f6790614d3a84614fa9565b614f7b836000526002602052604060002090565b91614d9f610c7284866155a2565b5060016080840151614f9a81611da4565b1615614f56565b508115614f49565b61043d90614fc2606082015151610140830151906118f6565b80516001600160a01b03166000908152600160205260409020549061268a565b909161043d92811015614ffb575b60051b8101906146ae565b615003611980565b614ff0565b615010615017565b6002600055565b60016000540361502357565b60046040517f7fa8a987000000000000000000000000000000000000000000000000000000008152fd5b9092813b1561512d57604051926000947f23b872dd000000000000000000000000000000000000000000000000000000008652806004528160245282604452858060648180885af1156150a65750505050604052606052565b8593943d6150e9575b5060a4947ff486bc870000000000000000000000000000000000000000000000000000000085526004526024526044526064526001608452fd5b601f3d0160051c9060051c908060030291808211615114575b505060205a91011061209857856150af565b8080600392028380020360091c92030201018680615102565b507f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b929093833b1561526857604051936080519160a0519360c051956000987ff242432a000000000000000000000000000000000000000000000000000000008a528060045281602452826044528360645260a06084528960a452898060c48180895af1156151d857505050505060805260a05260c052604052606052565b89949550883d61521b575b5060a4957ff486bc87000000000000000000000000000000000000000000000000000000008652600452602452604452606452608452fd5b601f3d0160051c9060051c90806003029180821161524f575b505060205a91011061524657866151e3565b843d81803e3d90fd5b8080600392028380020360091c92030201018780615234565b837f5f15d6720000000000000000000000000000000000000000000000000000000060005260045260246000fd5b42109081156152d4575b506152aa57600190565b60046040517f6f7eac26000000000000000000000000000000000000000000000000000000008152fd5b9050421015386152a0565b42109081156152f8575b506152f357600190565b600090565b9050421015386152e9565b9091336001600160a01b0383161461559d5761531d6127b4565b926000937f190100000000000000000000000000000000000000000000000000000000000085526002526022526042832090836022528380528392815191601f198101805184604103918860018411938415615532575b508514851515169788156153c3575b5050505050505050156153935750565b60049061539e612895565b7f4f7fb80d000000000000000000000000000000000000000000000000000000008152fd5b909192939495969750604082527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffbc8501937fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0855196019660208b60648a519b7f1626ba7e000000000000000000000000000000000000000000000000000000009d8e8b528c520188845afa998a615469575b505050505252523880808080808080615383565b8b51036154765780615455565b908a913b61550a576154e257640101000000821a156154b757807f815e1d640000000000000000000000000000000000000000000000000000000060049252fd5b6024917f1f003d0a000000000000000000000000000000000000000000000000000000008252600452fd5b807f8baa579f0000000000000000000000000000000000000000000000000000000060049252fd5b6004827f4f7fb80d000000000000000000000000000000000000000000000000000000008152fd5b9850506040840180519060608601518b1a99615569575b89865288835260208b60808560015afa5083835287865252885138615374565b9850601b8160ff1c01987f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168152615549565b505050565b905460ff8160081c16615614576effffffffffffffffffffffffffffff8160101c1690816155d3575b505050600190565b60881c11156155e35780806155cb565b602490604051907f10fda3e10000000000000000000000000000000000000000000000000000000082526004820152fd5b602482604051907f1a5155740000000000000000000000000000000000000000000000000000000082526004820152fd5b906000905460ff8160081c16615694576effffffffffffffffffffffffffffff8160101c16908161567a575b50505050600190565b60881c111561568a578080615671565b6155e35750600090565b50905050600090565b90929160019060048110156156fd575b11806156ea575b806156d7575b6156c5575b50505050565b6156ce9361570a565b388080806156bf565b506001600160a01b0382163314156156ba565b506001600160a01b0384163314156156b4565b6157056107bc565b6156ad565b6000919290829161032295604051906001600160a01b0360208301937f0e1d31dc00000000000000000000000000000000000000000000000000000000855288602485015233604485015216606483015260848201526084815261576d8161027d565b51915afa615e78565b90815180825260208080930193019160005b828110615796575050505090565b909192938260a0600192875180516157ad816107ec565b8252808401516001600160a01b03168483015260408082015190830152606080820151908301526080908101519082015201950193929101615788565b90815180825260208080930193019160005b82811061580a575050505090565b909192938260c060019287518051615821816107ec565b8252808401516001600160a01b039081168584015260408083015190840152606080830151908401526080808301519084015260a0918201511690820152019501939291016157fc565b906004821015611dc45752565b6060519081815260208091019160809160005b828110615899575050505090565b83518552938101939281019260010161588b565b90815180825260208080930193019160005b8281106158cd575050505090565b8351855293810193928101926001016158bf565b90815180825260208092019182818360051b85019501936000915b84831061590c5750505050505090565b909192939495848061595e83856001950387528a518051825261593584820151858401906136bc565b60408082015190830152606080820151908301526080809101519160a0809282015201906158ad565b98019301930191949392906158fc565b92615b02906001600160a01b0361043d9694615b0f94875216602086015260a06040860152805160a080870152610140906159b482880182516001600160a01b03169052565b6080615af1615a286159f38a6159dc6020870151610160809301906001600160a01b03169052565b6040860151906101808d01526102a08c0190615776565b60608501517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec08c8303016101a08d01526157ea565b615a3a838501516101c08c019061586b565b60a08401516101e08b015260c08401516102008b015260e08401516102208b015261010094858501516102408c015261012094858101516102608d015201516102808b0152615aa1602087015160c08c01906effffffffffffffffffffffffffffff169052565b60408601516effffffffffffffffffffffffffffff1660e08b015260608601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6095868c840301908c0152610148565b930151918784030190870152610148565b8381036060850152615878565b9160808184039101526158e1565b939061043d95936001600160a01b03615b0f94615cb393885216602087015260a06040870152805160a08088015261014090615b6482890182516001600160a01b03169052565b6080615ca2615bd8615ba38b6020860151615b8d61016091828401906001600160a01b03169052565b61018060408801519201526102a08d0190615776565b60608501518c82037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec0016101a08e01526157ea565b615bea838501516101c08d019061586b565b60a08401516101e08c015260c08401516102008c015260e08401516102208c015261010094858501516102408d0152610120948c6102608783015191015201516102808c0152615c52602087015160c08d01906effffffffffffffffffffffffffffff169052565b60408601516effffffffffffffffffffffffffffff1660e08c015260608601517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6095868d840301908d0152610148565b930151918884030190880152610148565b9084820360608601526158ad565b909591929493600190615cd381611da4565b1180615d8f575b80615d7c575b615ced575b505050505050565b6080810151511580615d73575b15615d155750615d0a945061570a565b388080808080615ce5565b6000935083929450615d6061576d615d6e9760405192839160208301957f33131570000000000000000000000000000000000000000000000000000000008752338b6024860161596e565b03601f1981018352826102d1565b615d0a565b50855115615cfa565b506001600160a01b038416331415615ce0565b506001600160a01b038216331415615cda565b919692939594600190615db481611da4565b1180615e65575b80615e52575b615dcf575b50505050505050565b6080820151511580615e49575b15615df9575050615ded945061570a565b38808080808080615dc6565b600094508493955061576d615e4497615d6060405193849260208401967f33131570000000000000000000000000000000000000000000000000000000008852338c60248701615b1d565b615ded565b50805115615ddc565b506001600160a01b038516331415615dc1565b506001600160a01b038316331415615dbb565b15615f0f577f0e1d31dc000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000600060203d14615f04575b1603615ed35750565b602490604051907ffb5014fc0000000000000000000000000000000000000000000000000000000082526004820152fd5b602081803e51615eca565b602490615f1a612895565b604051907ffb5014fc0000000000000000000000000000000000000000000000000000000082526004820152fdfea26469706673582212209177a9398263fd39986bf51ffce37520ec7ad3d626c4e5ec68078d19dab2648164736f6c634300080e0033", diff --git a/deployments/goerli/Shoyu.json b/deployments/goerli/Shoyu.json index afa7e48c..15d212a5 100644 --- a/deployments/goerli/Shoyu.json +++ b/deployments/goerli/Shoyu.json @@ -1,5 +1,5 @@ { - "address": "0x9C469F36bd7ed31Ee965034a5683B249928De5B8", + "address": "0x7dd6DC62d9E498cdb0CaB6B274F92Abf7f52469C", "abi": [ { "inputs": [ @@ -317,41 +317,41 @@ "type": "receive" } ], - "transactionHash": "0x5281bebf28e6b6eeba85e6665a46ed09e2bec4bc879a75621757610d2a79c20a", + "transactionHash": "0x7dded5103fd814c972dc2d7c32c881dab3646618f877c0bb58a783dcf02e98de", "receipt": { "to": null, "from": "0x745E3182275791241eb92036a4A767664c456343", - "contractAddress": "0x9C469F36bd7ed31Ee965034a5683B249928De5B8", - "transactionIndex": 11, + "contractAddress": "0x7dd6DC62d9E498cdb0CaB6B274F92Abf7f52469C", + "transactionIndex": 15, "gasUsed": "892192", - "logsBloom": "0x00000000000000000000000000000000000000000000004000800000000000000000000000000000000100010000000000000000000000000000100000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000000", - "blockHash": "0xbd03b3f55ef190562b97115cd901217a896a63eb3f543832f1d26a95543effb0", - "transactionHash": "0x5281bebf28e6b6eeba85e6665a46ed09e2bec4bc879a75621757610d2a79c20a", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000100000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000400000000000000000000000000040000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000001000000000000000000000000000000000000000", + "blockHash": "0x2c8675978ffdcf5eb558bcd9431ffe26da0b2eccdbfd47300dcec6dc3e388eb3", + "transactionHash": "0x7dded5103fd814c972dc2d7c32c881dab3646618f877c0bb58a783dcf02e98de", "logs": [ { - "transactionIndex": 11, - "blockNumber": 7479331, - "transactionHash": "0x5281bebf28e6b6eeba85e6665a46ed09e2bec4bc879a75621757610d2a79c20a", - "address": "0x9C469F36bd7ed31Ee965034a5683B249928De5B8", + "transactionIndex": 15, + "blockNumber": 7594389, + "transactionHash": "0x7dded5103fd814c972dc2d7c32c881dab3646618f877c0bb58a783dcf02e98de", + "address": "0x7dd6DC62d9E498cdb0CaB6B274F92Abf7f52469C", "topics": [ "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", "0x0000000000000000000000000000000000000000000000000000000000000000", "0x000000000000000000000000745e3182275791241eb92036a4a767664c456343" ], "data": "0x", - "logIndex": 8, - "blockHash": "0xbd03b3f55ef190562b97115cd901217a896a63eb3f543832f1d26a95543effb0" + "logIndex": 22, + "blockHash": "0x2c8675978ffdcf5eb558bcd9431ffe26da0b2eccdbfd47300dcec6dc3e388eb3" } ], - "blockNumber": 7479331, - "cumulativeGasUsed": "11835446", + "blockNumber": 7594389, + "cumulativeGasUsed": "3127311", "status": 1, "byzantium": true }, "args": [ - "0x0123Ee32eC7CD072FC433A0f3696417CA8aaF9f9" + "0x29ADd59b3cC0E381e0a2c816adE0f5087674778a" ], - "numDeployments": 1, + "numDeployments": 2, "solcInputHash": "ce961eb7631a6ee9b0f07f4cc0f96052", "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_adapterRegistery\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Paused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"Unpaused\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adapterRegistry\",\"outputs\":[{\"internalType\":\"contract AdapterRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approveERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint8[]\",\"name\":\"adapterIds\",\"type\":\"uint8[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"cook\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155BatchReceived\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC1155Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"\",\"type\":\"bytes\"}],\"name\":\"onERC721Received\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"paused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpause\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"approveERC20(address,address,uint256)\":{\"details\":\"This function is used by the contract owner to grant ERC20 token approval to a specified operator.\",\"params\":{\"amount\":\"The operator's allowance.\",\"operator\":\"The operator to grant approval to.\",\"token\":\"The ERC20 token to approve.\"}},\"cook(uint8[],bytes[])\":{\"details\":\"This function executes a set of actions and allows composability (contract calls) to other contracts that exist in AdapterRegistry.\",\"params\":{\"adapterIds\":\"An array containing a sequence of ids of adapters to executed.\",\"datas\":\"The encoded function data to be used when calling each adapter.\"}},\"onERC1155Received(address,address,uint256,uint256,bytes)\":{\"details\":\"Allows this contract to receive ERC1155 tokens\"},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"pause()\":{\"details\":\"Allows contract owner to pause `cook()`.\"},\"paused()\":{\"details\":\"Returns true if the contract is paused, and false otherwise.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"unpause()\":{\"details\":\"Allows contract owner to unpause this contract.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/shoyu/Shoyu.sol\":\"Shoyu\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial owner.\\n */\\n constructor() {\\n _transferOwnership(_msgSender());\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions anymore. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby removing any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xa94b34880e3c1b0b931662cb1c09e5dfa6662f31cba80e07c5ee71cd135c9673\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/Pausable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which allows children to implement an emergency stop\\n * mechanism that can be triggered by an authorized account.\\n *\\n * This module is used through inheritance. It will make available the\\n * modifiers `whenNotPaused` and `whenPaused`, which can be applied to\\n * the functions of your contract. Note that they will not be pausable by\\n * simply including this module, only once the modifiers are put in place.\\n */\\nabstract contract Pausable is Context {\\n /**\\n * @dev Emitted when the pause is triggered by `account`.\\n */\\n event Paused(address account);\\n\\n /**\\n * @dev Emitted when the pause is lifted by `account`.\\n */\\n event Unpaused(address account);\\n\\n bool private _paused;\\n\\n /**\\n * @dev Initializes the contract in unpaused state.\\n */\\n constructor() {\\n _paused = false;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is not paused.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n modifier whenNotPaused() {\\n _requireNotPaused();\\n _;\\n }\\n\\n /**\\n * @dev Modifier to make a function callable only when the contract is paused.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n modifier whenPaused() {\\n _requirePaused();\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the contract is paused, and false otherwise.\\n */\\n function paused() public view virtual returns (bool) {\\n return _paused;\\n }\\n\\n /**\\n * @dev Throws if the contract is paused.\\n */\\n function _requireNotPaused() internal view virtual {\\n require(!paused(), \\\"Pausable: paused\\\");\\n }\\n\\n /**\\n * @dev Throws if the contract is not paused.\\n */\\n function _requirePaused() internal view virtual {\\n require(paused(), \\\"Pausable: not paused\\\");\\n }\\n\\n /**\\n * @dev Triggers stopped state.\\n *\\n * Requirements:\\n *\\n * - The contract must not be paused.\\n */\\n function _pause() internal virtual whenNotPaused {\\n _paused = true;\\n emit Paused(_msgSender());\\n }\\n\\n /**\\n * @dev Returns to normal state.\\n *\\n * Requirements:\\n *\\n * - The contract must be paused.\\n */\\n function _unpause() internal virtual whenPaused {\\n _paused = false;\\n emit Unpaused(_msgSender());\\n }\\n}\\n\",\"keccak256\":\"0x0849d93b16c9940beb286a7864ed02724b248b93e0d80ef6355af5ef15c64773\",\"license\":\"MIT\"},\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0x0e9621f60b2faabe65549f7ed0f24e8853a45c1b7990d47e8160e523683f3935\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n}\\n\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@rari-capital/solmate/src/tokens/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Minimalist and gas efficient standard ERC1155 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\\nabstract contract ERC1155 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event TransferSingle(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256 id,\\n uint256 amount\\n );\\n\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] amounts\\n );\\n\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n event URI(string value, uint256 indexed id);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC1155 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(address => mapping(uint256 => uint256)) public balanceOf;\\n\\n mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function uri(uint256 id) public view virtual returns (string memory);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC1155 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function setApprovalForAll(address operator, bool approved) public virtual {\\n isApprovedForAll[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) public virtual {\\n require(msg.sender == from || isApprovedForAll[from][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n balanceOf[from][id] -= amount;\\n balanceOf[to][id] += amount;\\n\\n emit TransferSingle(msg.sender, from, to, id, amount);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==\\n ERC1155TokenReceiver.onERC1155Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) public virtual {\\n require(ids.length == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n require(msg.sender == from || isApprovedForAll[from][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n // Storing these outside the loop saves ~15 gas per iteration.\\n uint256 id;\\n uint256 amount;\\n\\n for (uint256 i = 0; i < ids.length; ) {\\n id = ids[i];\\n amount = amounts[i];\\n\\n balanceOf[from][id] -= amount;\\n balanceOf[to][id] += amount;\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, from, to, ids, amounts);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==\\n ERC1155TokenReceiver.onERC1155BatchReceived.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)\\n public\\n view\\n virtual\\n returns (uint256[] memory balances)\\n {\\n require(owners.length == ids.length, \\\"LENGTH_MISMATCH\\\");\\n\\n balances = new uint256[](owners.length);\\n\\n // Unchecked because the only math done is incrementing\\n // the array index counter which cannot possibly overflow.\\n unchecked {\\n for (uint256 i = 0; i < owners.length; ++i) {\\n balances[i] = balanceOf[owners[i]][ids[i]];\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC165 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return\\n interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\\n interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155\\n interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n balanceOf[to][id] += amount;\\n\\n emit TransferSingle(msg.sender, address(0), to, id, amount);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==\\n ERC1155TokenReceiver.onERC1155Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n uint256 idsLength = ids.length; // Saves MLOADs.\\n\\n require(idsLength == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n for (uint256 i = 0; i < idsLength; ) {\\n balanceOf[to][ids[i]] += amounts[i];\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, address(0), to, ids, amounts);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==\\n ERC1155TokenReceiver.onERC1155BatchReceived.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _batchBurn(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n uint256 idsLength = ids.length; // Saves MLOADs.\\n\\n require(idsLength == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n for (uint256 i = 0; i < idsLength; ) {\\n balanceOf[from][ids[i]] -= amounts[i];\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, from, address(0), ids, amounts);\\n }\\n\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n balanceOf[from][id] -= amount;\\n\\n emit TransferSingle(msg.sender, from, address(0), id, amount);\\n }\\n}\\n\\n/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\\nabstract contract ERC1155TokenReceiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC1155TokenReceiver.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x0ed909c57d26645a267388dcec3ba5b8ce7510afb9ed9561da45b0d386f90ab8\",\"license\":\"AGPL-3.0-only\"},\"@rari-capital/solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x0240f7703cff32a61ee3e9fbb339e09a944260432a9ef37debf3692b1a6c8049\",\"license\":\"AGPL-3.0-only\"},\"@rari-capital/solmate/src/tokens/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\\nabstract contract ERC721 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 indexed id);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 indexed id);\\n\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE/LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n function tokenURI(uint256 id) public view virtual returns (string memory);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 BALANCE/OWNER STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(uint256 => address) internal _ownerOf;\\n\\n mapping(address => uint256) internal _balanceOf;\\n\\n function ownerOf(uint256 id) public view virtual returns (address owner) {\\n require((owner = _ownerOf[id]) != address(0), \\\"NOT_MINTED\\\");\\n }\\n\\n function balanceOf(address owner) public view virtual returns (uint256) {\\n require(owner != address(0), \\\"ZERO_ADDRESS\\\");\\n\\n return _balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 APPROVAL STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(uint256 => address) public getApproved;\\n\\n mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 id) public virtual {\\n address owner = _ownerOf[id];\\n\\n require(msg.sender == owner || isApprovedForAll[owner][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n getApproved[id] = spender;\\n\\n emit Approval(owner, spender, id);\\n }\\n\\n function setApprovalForAll(address operator, bool approved) public virtual {\\n isApprovedForAll[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 id\\n ) public virtual {\\n require(from == _ownerOf[id], \\\"WRONG_FROM\\\");\\n\\n require(to != address(0), \\\"INVALID_RECIPIENT\\\");\\n\\n require(\\n msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],\\n \\\"NOT_AUTHORIZED\\\"\\n );\\n\\n // Underflow of the sender's balance is impossible because we check for\\n // ownership above and the recipient's balance can't realistically overflow.\\n unchecked {\\n _balanceOf[from]--;\\n\\n _balanceOf[to]++;\\n }\\n\\n _ownerOf[id] = to;\\n\\n delete getApproved[id];\\n\\n emit Transfer(from, to, id);\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id\\n ) public virtual {\\n transferFrom(from, to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, \\\"\\\") ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n bytes calldata data\\n ) public virtual {\\n transferFrom(from, to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC165 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return\\n interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\\n interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721\\n interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 id) internal virtual {\\n require(to != address(0), \\\"INVALID_RECIPIENT\\\");\\n\\n require(_ownerOf[id] == address(0), \\\"ALREADY_MINTED\\\");\\n\\n // Counter overflow is incredibly unrealistic.\\n unchecked {\\n _balanceOf[to]++;\\n }\\n\\n _ownerOf[id] = to;\\n\\n emit Transfer(address(0), to, id);\\n }\\n\\n function _burn(uint256 id) internal virtual {\\n address owner = _ownerOf[id];\\n\\n require(owner != address(0), \\\"NOT_MINTED\\\");\\n\\n // Ownership check above ensures no underflow.\\n unchecked {\\n _balanceOf[owner]--;\\n }\\n\\n delete _ownerOf[id];\\n\\n delete getApproved[id];\\n\\n emit Transfer(owner, address(0), id);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL SAFE MINT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _safeMint(address to, uint256 id) internal virtual {\\n _mint(to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, \\\"\\\") ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _safeMint(\\n address to,\\n uint256 id,\\n bytes memory data\\n ) internal virtual {\\n _mint(to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n}\\n\\n/// @notice A generic interface for a contract which properly accepts ERC721 tokens.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\\nabstract contract ERC721TokenReceiver {\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC721TokenReceiver.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0xb59c7c25eca386f39da4819a9f70f89b73b7583d5f5127a83ffe5339800b1183\",\"license\":\"AGPL-3.0-only\"},\"contracts/shoyu/Shoyu.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.13;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/Pausable.sol\\\";\\nimport \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport \\\"@rari-capital/solmate/src/tokens/ERC20.sol\\\";\\nimport \\\"@rari-capital/solmate/src/tokens/ERC721.sol\\\";\\nimport \\\"@rari-capital/solmate/src/tokens/ERC1155.sol\\\";\\nimport \\\"./lib/AdapterRegistry.sol\\\";\\n\\ncontract Shoyu is Ownable, Pausable, ReentrancyGuard {\\n AdapterRegistry public immutable adapterRegistry;\\n\\n constructor(address _adapterRegistery) {\\n adapterRegistry = AdapterRegistry(_adapterRegistery);\\n }\\n\\n /// @dev This function executes a set of actions and allows composability\\n /// (contract calls) to other contracts that exist in AdapterRegistry.\\n /// @param adapterIds An array containing a sequence of ids of adapters to executed.\\n /// @param datas The encoded function data to be used when calling each adapter.\\n function cook(\\n uint8[] calldata adapterIds,\\n bytes[] calldata datas\\n ) external payable whenNotPaused nonReentrant {\\n uint256 length = adapterIds.length;\\n for (uint256 i; i < length; ++i) {\\n (\\n address adapterAddress,\\n bool isActive\\n ) = adapterRegistry.adapters(adapterIds[i]);\\n\\n require(isActive, \\\"cook: inactive adapter\\\");\\n\\n (bool success, ) = adapterAddress.delegatecall(datas[i]);\\n\\n if (!success) {\\n assembly {\\n returndatacopy(0, 0, returndatasize())\\n revert(0, returndatasize())\\n }\\n }\\n }\\n\\n _refundExcessETH();\\n }\\n\\n /// @dev Internal function to return any left over ETH to `msg.sender`.\\n function _refundExcessETH() internal {\\n uint256 balance = address(this).balance;\\n if (balance > 0) {\\n payable(msg.sender).transfer(balance);\\n }\\n }\\n\\n /// @dev This function is used by the contract owner to grant\\n /// ERC20 token approval to a specified operator.\\n /// @param token The ERC20 token to approve.\\n /// @param operator The operator to grant approval to.\\n /// @param amount The operator's allowance.\\n function approveERC20(\\n address token,\\n address operator,\\n uint256 amount\\n ) external onlyOwner {\\n ERC20(token).approve(operator, amount);\\n }\\n\\n /// @dev Allows contract owner to pause `cook()`.\\n function pause() external onlyOwner {\\n _pause();\\n }\\n\\n /// @dev Allows contract owner to unpause this contract.\\n function unpause() external onlyOwner{\\n _unpause();\\n }\\n\\n /// @dev Fallback for just receiving ether.\\n receive() external payable {}\\n\\n /// @dev Allows this contract to receive ERC1155 tokens\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) public pure returns (bytes4) {\\n return this.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) public pure returns (bytes4) {\\n return this.onERC1155BatchReceived.selector;\\n }\\n\\n // @dev Allows this contract to receive ERC721 tokens\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n ) external pure returns (bytes4) {\\n return 0x150b7a02;\\n }\\n\\n // @dev Used by ERC721BasicToken.sol\\n function onERC721Received(\\n address,\\n uint256,\\n bytes calldata\\n ) external pure returns (bytes4) {\\n return 0xf0b9e5ba;\\n }\\n}\\n\",\"keccak256\":\"0x86370fdae08721c07e8665812671d57b16cfab4cbac16ce4f58037a8ffb63b92\",\"license\":\"MIT\"},\"contracts/shoyu/lib/AdapterRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.11;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport { Adapter } from \\\"./LibShoyu.sol\\\";\\n\\ncontract AdapterRegistry is Ownable {\\n Adapter[] public adapters;\\n\\n constructor(\\n uint256 length,\\n address[] memory adapterAddress\\n ) {\\n for (uint256 i; i < length; ++i) {\\n adapters.push(Adapter(adapterAddress[i], true));\\n }\\n }\\n\\n /// @dev This function allows the contract owner to set an address\\n /// for the specified adapter id.\\n /// @param id The id of the adapter to change.\\n /// @param adapterAddress The new adapter address.\\n function setAdapterAddress(\\n uint256 id,\\n address adapterAddress\\n ) external onlyOwner {\\n Adapter storage adapter = adapters[id];\\n adapter.adapterAddress = adapterAddress; \\n }\\n\\n /// @dev This function allows the contract owner to the update the\\n /// status of a given adapter id.\\n /// @param id The id of the adapter to update.\\n /// @param isActive The new active flag of given adapter.\\n function setAdapterStatus(\\n uint256 id,\\n bool isActive\\n ) external onlyOwner {\\n Adapter storage adapter = adapters[id];\\n adapter.isActive = isActive;\\n }\\n\\n /// @dev This function allows the contract owner to add a new\\n /// adapter to the registry.\\n /// @param adapterAddress The address of the new adapter.\\n function addAdapter(\\n address adapterAddress\\n ) external onlyOwner {\\n adapters.push(Adapter(adapterAddress, true));\\n }\\n}\",\"keccak256\":\"0x80d4c1206a0a5ca87fbb06983276546546bed5db9cc77ab7fcb1dbabe0b98e73\",\"license\":\"MIT\"},\"contracts/shoyu/lib/LibShoyu.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.13;\\n\\nenum TokenSource {\\n WALLET,\\n CONDUIT\\n}\\n\\nstruct Adapter {\\n address adapterAddress;\\n bool isActive;\\n}\",\"keccak256\":\"0x62f8213d43b5a3b6ee253dc3ce89a4074b5cdbcaa60b31604cc923f20524b600\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x60a03461007757601f610f5438819003918201601f19168301916001600160401b0383118484101761007c5780849260209460405283398101031261007757516001600160a01b03811681036100775761005890610092565b604051610e6790816100ed82396080518181816102f801526105f60152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b600080546040516001600160a01b0393923391858416917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36001600160a81b0319163360ff60a01b191617600055600180551660805256fe6080604052600436101561001b575b361561001957600080fd5b005b60003560e01c8063150b7a021461011f5780633f4ba83a1461011657806350b5c16a1461010d5780635c975abb14610104578063715018a6146100fb5780638456cb59146100f25780638da5cb5b146100e9578063a8e5e4aa146100e0578063a9141af4146100d7578063bc197c81146100ce578063f0b9e5ba146100c5578063f23a6e61146100bc5763f2fde38b0361000e576100b7610929565b61000e565b506100b76108b5565b506100b761084c565b506100b76107a2565b506100b7610591565b506100b761048a565b506100b7610455565b506100b76103c6565b506100b7610343565b506100b761031c565b506100b76102ca565b506100b76101ed565b506100b7610179565b73ffffffffffffffffffffffffffffffffffffffff81160361014657565b600080fd5b9181601f840112156101465782359167ffffffffffffffff8311610146576020838186019501011161014657565b503461014657608060031936011261014657610196600435610128565b6101a1602435610128565b60643567ffffffffffffffff8111610146576101c190369060040161014b565b505060206040517f150b7a02000000000000000000000000000000000000000000000000000000008152f35b5034610146576000806003193601126102c757610208610a4a565b805460ff8160a01c1615610269577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1681557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a1604051f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b80fd5b503461014657600060031936011261014657602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461014657600060031936011261014657602060ff60005460a01c166040519015158152f35b5034610146576000806003193601126102c75761035e610a4a565b80547fffffffffffffffffffffffff0000000000000000000000000000000000000000811682558173ffffffffffffffffffffffffffffffffffffffff60405192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08284a3f35b5034610146576000806003193601126102c7576103e1610a4a565b6103e9610d8c565b740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff8254161781557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a1604051f35b503461014657600060031936011261014657602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461014657606060031936011261014657600060206004356104ac81610128565b6044602435916104bb83610128565b6104c3610a4a565b60405194859384927f095ea7b300000000000000000000000000000000000000000000000000000000845273ffffffffffffffffffffffffffffffffffffffff809216600485015284356024850152165af18015610553575b61052257005b6020813d821161054b575b8161053a60209383610bb1565b810103126101465761001990610bff565b3d915061052d565b61055b610c32565b61051c565b9181601f840112156101465782359167ffffffffffffffff8311610146576020808501948460051b01011161014657565b506040806003193601126101465767ffffffffffffffff9060048035838111610146576105c19036908301610560565b93602435908111610146576105d99036908401610560565b9290916105e4610d8c565b600260015414610745576002600155947f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff169060005b81811061064d57600087610641610df9565b61064a60018055565b51f35b6000806106a28961066761066286888f610b55565b610b73565b8151809381927f4ef501ac0000000000000000000000000000000000000000000000000000000083528b830191909160ff6020820193169052565b0381895afa8015610738575b82918291610705575b506106c190610c3f565b6106cc848a8a610ca4565b906106db8c5180938193610d12565b03915af46106e7610d20565b50156106fb576106f690610ac9565b61062f565b3d6000803e3d6000fd5b6106c1925061072a91508b3d8d11610731575b6107228183610bb1565b810190610c0c565b90916106b7565b503d610718565b610740610c32565b6106ae565b60648260208751917f08c379a0000000000000000000000000000000000000000000000000000000008352820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152fd5b50346101465760a0600319360112610146576107bf600435610128565b6107ca602435610128565b67ffffffffffffffff604435818111610146576107eb903690600401610560565b505060643581811161014657610805903690600401610560565b50506084359081116101465761081f90369060040161014b565b50506040517fbc197c81000000000000000000000000000000000000000000000000000000008152602090f35b503461014657606060031936011261014657610869600435610128565b60443567ffffffffffffffff81116101465761088990369060040161014b565b505060206040517ff0b9e5ba000000000000000000000000000000000000000000000000000000008152f35b50346101465760a0600319360112610146576108d2600435610128565b6108dd602435610128565b60843567ffffffffffffffff8111610146576108fd90369060040161014b565b505060206040517ff23a6e61000000000000000000000000000000000000000000000000000000008152f35b50346101465760206003193601126101465760043561094781610128565b61094f610a4a565b73ffffffffffffffffffffffffffffffffffffffff8091169081156109c657600091825491817fffffffffffffffffffffffff0000000000000000000000000000000000000000841617845560405192167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08484a3f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b73ffffffffffffffffffffffffffffffffffffffff600054163303610a6b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610af65760010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190811015610b66575b60051b0190565b610b6e610b25565b610b5f565b3560ff811681036101465790565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610bf257604052565b610bfa610b81565b604052565b5190811515820361014657565b919082604091031261014657610c2f60208351610c2881610128565b9301610bff565b90565b506040513d6000823e3d90fd5b15610c4657565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f636f6f6b3a20696e6163746976652061646170746572000000000000000000006044820152fd5b9190811015610d05575b60051b810135907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe18136030182121561014657019081359167ffffffffffffffff8311610146576020018236038113610146579190565b610d0d610b25565b610cae565b908092918237016000815290565b3d15610d87573d9067ffffffffffffffff8211610d7a575b60405191610d6e60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610bb1565b82523d6000602084013e565b610d82610b81565b610d38565b606090565b60ff60005460a01c16610d9b57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b4780158015610e06575050565b600080809381938290610e28575b3390f115610e1e57565b610e26610c32565b565b506108fc610e1456fea2646970667358221220b766e6ab69627fc727b785e241a56822c6128b35f1a4fc9078ad4727e83cadc364736f6c634300080e0033", diff --git a/deployments/goerli/TransformationAdapter.json b/deployments/goerli/TransformationAdapter.json index 2b0d83ef..b3d154d3 100644 --- a/deployments/goerli/TransformationAdapter.json +++ b/deployments/goerli/TransformationAdapter.json @@ -1,5 +1,5 @@ { - "address": "0x16aBEBa80BE10540044541d9b00F059742908D05", + "address": "0x6F19C2e253A15a14090E37592f6BEDe14CBCDbe2", "abi": [ { "inputs": [ @@ -316,19 +316,19 @@ "type": "function" } ], - "transactionHash": "0x3da64d0d2acf92ed12ecc8ea9181944d29658d6eeab9850966434aeae3ac90df", + "transactionHash": "0x2f851db9188f4dd59bc0f8db7b8d75303bc25aa2f4395f5656be02fec4319def", "receipt": { "to": null, "from": "0x745E3182275791241eb92036a4A767664c456343", - "contractAddress": "0x16aBEBa80BE10540044541d9b00F059742908D05", - "transactionIndex": 47, - "gasUsed": "2042505", + "contractAddress": "0x6F19C2e253A15a14090E37592f6BEDe14CBCDbe2", + "transactionIndex": 11, + "gasUsed": "2042493", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xdcbd23d8b7c3c7111cc135d6afb0926dac8d93181c83712a294577c59868d4c8", - "transactionHash": "0x3da64d0d2acf92ed12ecc8ea9181944d29658d6eeab9850966434aeae3ac90df", + "blockHash": "0x7d1bf9ff3ce30539a74caf64eeb0e49b5f8c0c7fd05deb65449326f1466052ed", + "transactionHash": "0x2f851db9188f4dd59bc0f8db7b8d75303bc25aa2f4395f5656be02fec4319def", "logs": [], - "blockNumber": 7479289, - "cumulativeGasUsed": "8872363", + "blockNumber": 7594386, + "cumulativeGasUsed": "2813816", "status": 1, "byzantium": true }, @@ -336,9 +336,9 @@ "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", "0xc35DADB65012eC5796536bD9864eD8773aBc74C4", "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303", - "0x00000000006ce100a8b5ed8edf18ceef9e500697" + "0x00000000F9490004C11Cef243f5400493c00Ad63" ], - "numDeployments": 5, + "numDeployments": 6, "solcInputHash": "ce961eb7631a6ee9b0f07f4cc0f96052", "metadata": "{\"compiler\":{\"version\":\"0.8.14+commit.80d49f37\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_factory\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"_pairCodeHash\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"_conduitController\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"returnERC1155\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"returnERC20\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"returnERC721\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountIn\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"unwrapNative\",\"type\":\"bool\"}],\"name\":\"swapExactIn\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOut\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amountInMax\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"enum TokenSource\",\"name\":\"tokenSource\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"transferData\",\"type\":\"bytes\"},{\"internalType\":\"bool\",\"name\":\"unwrapNative\",\"type\":\"bool\"}],\"name\":\"swapExactOut\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amountOutMin\",\"type\":\"uint256\"},{\"internalType\":\"address[]\",\"name\":\"path\",\"type\":\"address[]\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"unwrapNative\",\"type\":\"bool\"}],\"name\":\"swapMaxIn\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"enum TokenSource\",\"name\":\"source\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferERC1155From\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"enum TokenSource\",\"name\":\"source\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferERC20From\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"enum TokenSource\",\"name\":\"source\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"transferERC721From\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"address payable\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"unwrapNativeToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"wrapNativeToken\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{\"returnERC1155(address,uint256)\":{\"details\":\"Function to return any excess ERC1155 token from address(this) to `msg.sender`.\",\"params\":{\"token\":\"The token to return to the caller.\",\"tokenId\":\"The token identifier of the asset.\"}},\"returnERC20(address)\":{\"details\":\"Function to return any excess ERC20 tokens from address(this) to `msg.sender`.\",\"params\":{\"token\":\"The token to return to the caller.\"}},\"returnERC721(address,uint256)\":{\"details\":\"Function to return any left over ERC721 token from address(this) to `msg.sender`.\",\"params\":{\"token\":\"The token to return to the caller.\",\"tokenId\":\"The token identifier of the asset.\"}},\"swapExactIn(uint256,uint256,address[],address,bool)\":{\"details\":\"This function swaps an exact amount of tokens from address(this) and sends a mimimum amount of output token to the specified recipient.\",\"params\":{\"amountIn\":\"The exact amount of input token to be spent.\",\"amountOutMin\":\"The minimum amount of output token to be received.\",\"path\":\"The swap path.\",\"to\":\"The recipient of output token.\",\"unwrapNative\":\"Flag to unwrap for native token if output token is WETH.\"}},\"swapExactOut(uint256,uint256,address[],address,uint8,bytes,bool)\":{\"details\":\"This function swaps ERC20 tokens from msg.sender for an exact amount of output tokens, sent to the specified recipient.\",\"params\":{\"amountInMax\":\"The maximum amount of input to be spent.\",\"amountOut\":\"The exact amount of output token to receive.\",\"path\":\"The swap path.\",\"to\":\"The recipient to receive output token.\",\"tokenSource\":\"The token / approval source for input token.\",\"transferData\":\"Additional data required depending on `source`.\",\"unwrapNative\":\"Flag to unwrap for native token if output token is WETH.\"}},\"swapMaxIn(uint256,address[],address,bool)\":{\"details\":\"This function performs the swaps as outlined in `path`. This contract's entire balance of input token will be swapped for a minimum amount of output token, sent to the specified recipient.\",\"params\":{\"amountOutMin\":\"The minimum amount of output token to be received.\",\"path\":\"The swap path.\",\"to\":\"The recipient of output token.\",\"unwrapNative\":\"Flag to unwrap for native token if output token is WETH.\"}},\"transferERC1155From(address,address,uint256,uint256,uint8,bytes)\":{\"details\":\"Function to transfer an ERC1155 token from `msg.sender` to a given recipient. Assets will be transferred from a user's wallet with approvals being sourced from the Shoyu contract or Seaport Conduit.\",\"params\":{\"amount\":\"The amount of the asset to transfer.\",\"data\":\"Additional encoded data required depending on `source`.\",\"source\":\"The NFT approval source.\",\"to\":\"The recipient of the transfer.\",\"token\":\"The ERC1155 token to transfer.\",\"tokenId\":\"The tokenId of the asset to transfer.\"}},\"transferERC20From(address,address,uint256,uint8,bytes)\":{\"details\":\"Function to transfer ERC20 tokens from `msg.sender` to a given recipient. Assets can be transferred from a user's wallet with approvals being sourced from Shoyu contract or Shoyu's Seaport Conduit.\",\"params\":{\"amount\":\"The amount to transfer.\",\"data\":\"Additional encoded data required depending on `source`.\",\"source\":\"The token / approval source.\",\"to\":\"The recipient of the transfer.\",\"token\":\"The ERC20 token to transfer.\"}},\"transferERC721From(address,address,uint256,uint8,bytes)\":{\"details\":\"Function to transfer an ERC721 token from `msg.sender` to a given recipient. Assets will be transferred from a user's wallet with approvals being sourced from the Shoyu contract or Seaport Conduit.\",\"params\":{\"data\":\"Additional encoded data required depending on `source`.\",\"source\":\"The NFT approval source.\",\"to\":\"The recipient of the transfer.\",\"token\":\"The ERC721 token to transfer.\",\"tokenId\":\"The tokenId of the asset to transfer.\"}},\"unwrapNativeToken(uint256,address)\":{\"details\":\"This function unwraps WETH held by address(this) and transfers ETH to the specified recipient.\",\"params\":{\"amount\":\"The amount of WETH to be unwrapped.\",\"to\":\"The ETH recipient.\"}},\"wrapNativeToken(uint256)\":{\"details\":\"This function wraps ETH held by address(this).\",\"params\":{\"amount\":\"The amount of ETH to wrap\"}}},\"stateVariables\":{\"WETH\":{\"details\":\"The WETH address.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/shoyu/adapters/Transform/TransformationAdapter.sol\":\"TransformationAdapter\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":19066},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@rari-capital/solmate/src/tokens/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Minimalist and gas efficient standard ERC1155 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\\nabstract contract ERC1155 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event TransferSingle(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256 id,\\n uint256 amount\\n );\\n\\n event TransferBatch(\\n address indexed operator,\\n address indexed from,\\n address indexed to,\\n uint256[] ids,\\n uint256[] amounts\\n );\\n\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n event URI(string value, uint256 indexed id);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC1155 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(address => mapping(uint256 => uint256)) public balanceOf;\\n\\n mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function uri(uint256 id) public view virtual returns (string memory);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC1155 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function setApprovalForAll(address operator, bool approved) public virtual {\\n isApprovedForAll[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes calldata data\\n ) public virtual {\\n require(msg.sender == from || isApprovedForAll[from][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n balanceOf[from][id] -= amount;\\n balanceOf[to][id] += amount;\\n\\n emit TransferSingle(msg.sender, from, to, id, amount);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) ==\\n ERC1155TokenReceiver.onERC1155Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function safeBatchTransferFrom(\\n address from,\\n address to,\\n uint256[] calldata ids,\\n uint256[] calldata amounts,\\n bytes calldata data\\n ) public virtual {\\n require(ids.length == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n require(msg.sender == from || isApprovedForAll[from][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n // Storing these outside the loop saves ~15 gas per iteration.\\n uint256 id;\\n uint256 amount;\\n\\n for (uint256 i = 0; i < ids.length; ) {\\n id = ids[i];\\n amount = amounts[i];\\n\\n balanceOf[from][id] -= amount;\\n balanceOf[to][id] += amount;\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, from, to, ids, amounts);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) ==\\n ERC1155TokenReceiver.onERC1155BatchReceived.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function balanceOfBatch(address[] calldata owners, uint256[] calldata ids)\\n public\\n view\\n virtual\\n returns (uint256[] memory balances)\\n {\\n require(owners.length == ids.length, \\\"LENGTH_MISMATCH\\\");\\n\\n balances = new uint256[](owners.length);\\n\\n // Unchecked because the only math done is incrementing\\n // the array index counter which cannot possibly overflow.\\n unchecked {\\n for (uint256 i = 0; i < owners.length; ++i) {\\n balances[i] = balanceOf[owners[i]][ids[i]];\\n }\\n }\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC165 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return\\n interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\\n interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155\\n interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(\\n address to,\\n uint256 id,\\n uint256 amount,\\n bytes memory data\\n ) internal virtual {\\n balanceOf[to][id] += amount;\\n\\n emit TransferSingle(msg.sender, address(0), to, id, amount);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) ==\\n ERC1155TokenReceiver.onERC1155Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _batchMint(\\n address to,\\n uint256[] memory ids,\\n uint256[] memory amounts,\\n bytes memory data\\n ) internal virtual {\\n uint256 idsLength = ids.length; // Saves MLOADs.\\n\\n require(idsLength == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n for (uint256 i = 0; i < idsLength; ) {\\n balanceOf[to][ids[i]] += amounts[i];\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, address(0), to, ids, amounts);\\n\\n require(\\n to.code.length == 0\\n ? to != address(0)\\n : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) ==\\n ERC1155TokenReceiver.onERC1155BatchReceived.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _batchBurn(\\n address from,\\n uint256[] memory ids,\\n uint256[] memory amounts\\n ) internal virtual {\\n uint256 idsLength = ids.length; // Saves MLOADs.\\n\\n require(idsLength == amounts.length, \\\"LENGTH_MISMATCH\\\");\\n\\n for (uint256 i = 0; i < idsLength; ) {\\n balanceOf[from][ids[i]] -= amounts[i];\\n\\n // An array can't have a total length\\n // larger than the max uint256 value.\\n unchecked {\\n ++i;\\n }\\n }\\n\\n emit TransferBatch(msg.sender, from, address(0), ids, amounts);\\n }\\n\\n function _burn(\\n address from,\\n uint256 id,\\n uint256 amount\\n ) internal virtual {\\n balanceOf[from][id] -= amount;\\n\\n emit TransferSingle(msg.sender, from, address(0), id, amount);\\n }\\n}\\n\\n/// @notice A generic interface for a contract which properly accepts ERC1155 tokens.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol)\\nabstract contract ERC1155TokenReceiver {\\n function onERC1155Received(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC1155TokenReceiver.onERC1155Received.selector;\\n }\\n\\n function onERC1155BatchReceived(\\n address,\\n address,\\n uint256[] calldata,\\n uint256[] calldata,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC1155TokenReceiver.onERC1155BatchReceived.selector;\\n }\\n}\\n\",\"keccak256\":\"0x0ed909c57d26645a267388dcec3ba5b8ce7510afb9ed9561da45b0d386f90ab8\",\"license\":\"AGPL-3.0-only\"},\"@rari-capital/solmate/src/tokens/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)\\n/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)\\n/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.\\nabstract contract ERC20 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 amount);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 amount);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n uint8 public immutable decimals;\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 public totalSupply;\\n\\n mapping(address => uint256) public balanceOf;\\n\\n mapping(address => mapping(address => uint256)) public allowance;\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n uint256 internal immutable INITIAL_CHAIN_ID;\\n\\n bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;\\n\\n mapping(address => uint256) public nonces;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint8 _decimals\\n ) {\\n name = _name;\\n symbol = _symbol;\\n decimals = _decimals;\\n\\n INITIAL_CHAIN_ID = block.chainid;\\n INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC20 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 amount) public virtual returns (bool) {\\n allowance[msg.sender][spender] = amount;\\n\\n emit Approval(msg.sender, spender, amount);\\n\\n return true;\\n }\\n\\n function transfer(address to, uint256 amount) public virtual returns (bool) {\\n balanceOf[msg.sender] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(msg.sender, to, amount);\\n\\n return true;\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) public virtual returns (bool) {\\n uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.\\n\\n if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;\\n\\n balanceOf[from] -= amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n return true;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n EIP-2612 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) public virtual {\\n require(deadline >= block.timestamp, \\\"PERMIT_DEADLINE_EXPIRED\\\");\\n\\n // Unchecked because the only math done is incrementing\\n // the owner's nonce which cannot realistically overflow.\\n unchecked {\\n address recoveredAddress = ecrecover(\\n keccak256(\\n abi.encodePacked(\\n \\\"\\\\x19\\\\x01\\\",\\n DOMAIN_SEPARATOR(),\\n keccak256(\\n abi.encode(\\n keccak256(\\n \\\"Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)\\\"\\n ),\\n owner,\\n spender,\\n value,\\n nonces[owner]++,\\n deadline\\n )\\n )\\n )\\n ),\\n v,\\n r,\\n s\\n );\\n\\n require(recoveredAddress != address(0) && recoveredAddress == owner, \\\"INVALID_SIGNER\\\");\\n\\n allowance[recoveredAddress][spender] = value;\\n }\\n\\n emit Approval(owner, spender, value);\\n }\\n\\n function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {\\n return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();\\n }\\n\\n function computeDomainSeparator() internal view virtual returns (bytes32) {\\n return\\n keccak256(\\n abi.encode(\\n keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\\\"),\\n keccak256(bytes(name)),\\n keccak256(\\\"1\\\"),\\n block.chainid,\\n address(this)\\n )\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 amount) internal virtual {\\n totalSupply += amount;\\n\\n // Cannot overflow because the sum of all user\\n // balances can't exceed the max uint256 value.\\n unchecked {\\n balanceOf[to] += amount;\\n }\\n\\n emit Transfer(address(0), to, amount);\\n }\\n\\n function _burn(address from, uint256 amount) internal virtual {\\n balanceOf[from] -= amount;\\n\\n // Cannot underflow because a user's balance\\n // will never be larger than the total supply.\\n unchecked {\\n totalSupply -= amount;\\n }\\n\\n emit Transfer(from, address(0), amount);\\n }\\n}\\n\",\"keccak256\":\"0x0240f7703cff32a61ee3e9fbb339e09a944260432a9ef37debf3692b1a6c8049\",\"license\":\"AGPL-3.0-only\"},\"@rari-capital/solmate/src/tokens/ERC721.sol\":{\"content\":\"// SPDX-License-Identifier: AGPL-3.0-only\\npragma solidity >=0.8.0;\\n\\n/// @notice Modern, minimalist, and gas efficient ERC-721 implementation.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\\nabstract contract ERC721 {\\n /*//////////////////////////////////////////////////////////////\\n EVENTS\\n //////////////////////////////////////////////////////////////*/\\n\\n event Transfer(address indexed from, address indexed to, uint256 indexed id);\\n\\n event Approval(address indexed owner, address indexed spender, uint256 indexed id);\\n\\n event ApprovalForAll(address indexed owner, address indexed operator, bool approved);\\n\\n /*//////////////////////////////////////////////////////////////\\n METADATA STORAGE/LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n string public name;\\n\\n string public symbol;\\n\\n function tokenURI(uint256 id) public view virtual returns (string memory);\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 BALANCE/OWNER STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(uint256 => address) internal _ownerOf;\\n\\n mapping(address => uint256) internal _balanceOf;\\n\\n function ownerOf(uint256 id) public view virtual returns (address owner) {\\n require((owner = _ownerOf[id]) != address(0), \\\"NOT_MINTED\\\");\\n }\\n\\n function balanceOf(address owner) public view virtual returns (uint256) {\\n require(owner != address(0), \\\"ZERO_ADDRESS\\\");\\n\\n return _balanceOf[owner];\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 APPROVAL STORAGE\\n //////////////////////////////////////////////////////////////*/\\n\\n mapping(uint256 => address) public getApproved;\\n\\n mapping(address => mapping(address => bool)) public isApprovedForAll;\\n\\n /*//////////////////////////////////////////////////////////////\\n CONSTRUCTOR\\n //////////////////////////////////////////////////////////////*/\\n\\n constructor(string memory _name, string memory _symbol) {\\n name = _name;\\n symbol = _symbol;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC721 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function approve(address spender, uint256 id) public virtual {\\n address owner = _ownerOf[id];\\n\\n require(msg.sender == owner || isApprovedForAll[owner][msg.sender], \\\"NOT_AUTHORIZED\\\");\\n\\n getApproved[id] = spender;\\n\\n emit Approval(owner, spender, id);\\n }\\n\\n function setApprovalForAll(address operator, bool approved) public virtual {\\n isApprovedForAll[msg.sender][operator] = approved;\\n\\n emit ApprovalForAll(msg.sender, operator, approved);\\n }\\n\\n function transferFrom(\\n address from,\\n address to,\\n uint256 id\\n ) public virtual {\\n require(from == _ownerOf[id], \\\"WRONG_FROM\\\");\\n\\n require(to != address(0), \\\"INVALID_RECIPIENT\\\");\\n\\n require(\\n msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id],\\n \\\"NOT_AUTHORIZED\\\"\\n );\\n\\n // Underflow of the sender's balance is impossible because we check for\\n // ownership above and the recipient's balance can't realistically overflow.\\n unchecked {\\n _balanceOf[from]--;\\n\\n _balanceOf[to]++;\\n }\\n\\n _ownerOf[id] = to;\\n\\n delete getApproved[id];\\n\\n emit Transfer(from, to, id);\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id\\n ) public virtual {\\n transferFrom(from, to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, \\\"\\\") ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function safeTransferFrom(\\n address from,\\n address to,\\n uint256 id,\\n bytes calldata data\\n ) public virtual {\\n transferFrom(from, to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n ERC165 LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {\\n return\\n interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165\\n interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721\\n interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL MINT/BURN LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _mint(address to, uint256 id) internal virtual {\\n require(to != address(0), \\\"INVALID_RECIPIENT\\\");\\n\\n require(_ownerOf[id] == address(0), \\\"ALREADY_MINTED\\\");\\n\\n // Counter overflow is incredibly unrealistic.\\n unchecked {\\n _balanceOf[to]++;\\n }\\n\\n _ownerOf[id] = to;\\n\\n emit Transfer(address(0), to, id);\\n }\\n\\n function _burn(uint256 id) internal virtual {\\n address owner = _ownerOf[id];\\n\\n require(owner != address(0), \\\"NOT_MINTED\\\");\\n\\n // Ownership check above ensures no underflow.\\n unchecked {\\n _balanceOf[owner]--;\\n }\\n\\n delete _ownerOf[id];\\n\\n delete getApproved[id];\\n\\n emit Transfer(owner, address(0), id);\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n INTERNAL SAFE MINT LOGIC\\n //////////////////////////////////////////////////////////////*/\\n\\n function _safeMint(address to, uint256 id) internal virtual {\\n _mint(to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, \\\"\\\") ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n\\n function _safeMint(\\n address to,\\n uint256 id,\\n bytes memory data\\n ) internal virtual {\\n _mint(to, id);\\n\\n require(\\n to.code.length == 0 ||\\n ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) ==\\n ERC721TokenReceiver.onERC721Received.selector,\\n \\\"UNSAFE_RECIPIENT\\\"\\n );\\n }\\n}\\n\\n/// @notice A generic interface for a contract which properly accepts ERC721 tokens.\\n/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol)\\nabstract contract ERC721TokenReceiver {\\n function onERC721Received(\\n address,\\n address,\\n uint256,\\n bytes calldata\\n ) external virtual returns (bytes4) {\\n return ERC721TokenReceiver.onERC721Received.selector;\\n }\\n}\\n\",\"keccak256\":\"0xb59c7c25eca386f39da4819a9f70f89b73b7583d5f5127a83ffe5339800b1183\",\"license\":\"AGPL-3.0-only\"},\"@sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface IUniswapV2Pair {\\n event Approval(address indexed owner, address indexed spender, uint value);\\n event Transfer(address indexed from, address indexed to, uint value);\\n\\n function name() external pure returns (string memory);\\n function symbol() external pure returns (string memory);\\n function decimals() external pure returns (uint8);\\n function totalSupply() external view returns (uint);\\n function balanceOf(address owner) external view returns (uint);\\n function allowance(address owner, address spender) external view returns (uint);\\n\\n function approve(address spender, uint value) external returns (bool);\\n function transfer(address to, uint value) external returns (bool);\\n function transferFrom(address from, address to, uint value) external returns (bool);\\n\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n function PERMIT_TYPEHASH() external pure returns (bytes32);\\n function nonces(address owner) external view returns (uint);\\n\\n function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;\\n\\n event Mint(address indexed sender, uint amount0, uint amount1);\\n event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);\\n event Swap(\\n address indexed sender,\\n uint amount0In,\\n uint amount1In,\\n uint amount0Out,\\n uint amount1Out,\\n address indexed to\\n );\\n event Sync(uint112 reserve0, uint112 reserve1);\\n\\n function MINIMUM_LIQUIDITY() external pure returns (uint);\\n function factory() external view returns (address);\\n function token0() external view returns (address);\\n function token1() external view returns (address);\\n function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);\\n function price0CumulativeLast() external view returns (uint);\\n function price1CumulativeLast() external view returns (uint);\\n function kLast() external view returns (uint);\\n\\n function mint(address to) external returns (uint liquidity);\\n function burn(address to) external returns (uint amount0, uint amount1);\\n function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;\\n function skim(address to) external;\\n function sync() external;\\n\\n function initialize(address, address) external;\\n}\",\"keccak256\":\"0x08f9a63b34855eec941be8d36a04424f1a1725a2c030373fcef3afeb480ca385\",\"license\":\"GPL-3.0\"},\"@sushiswap/core/contracts/uniswapv2/interfaces/IWETH.sol\":{\"content\":\"// SPDX-License-Identifier: GPL-3.0\\n\\npragma solidity >=0.5.0;\\n\\ninterface IWETH {\\n function deposit() external payable;\\n function transfer(address to, uint value) external returns (bool);\\n function withdraw(uint) external;\\n}\",\"keccak256\":\"0x680172744962444cd2f8470d50991336b431fe4e29dd835018ac2f36e53344be\",\"license\":\"GPL-3.0\"},\"contracts/shoyu/adapters/Transfer/ConduitAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport { ConduitControllerInterface } from \\\"seaport/contracts/interfaces/ConduitControllerInterface.sol\\\";\\nimport { ConduitInterface } from \\\"seaport/contracts/interfaces/ConduitInterface.sol\\\";\\nimport { ConduitTransfer } from \\\"seaport/contracts/conduit/lib/ConduitStructs.sol\\\";\\nimport { ConduitItemType } from \\\"seaport/contracts/conduit/lib/ConduitEnums.sol\\\";\\n\\ncontract ConduitAdapter {\\n // Allow for interaction with the conduit controller.\\n ConduitControllerInterface private immutable _CONDUIT_CONTROLLER;\\n // Cache the conduit creation hash used by the conduit controller.\\n bytes32 private immutable _CONDUIT_CREATION_CODE_HASH;\\n\\n constructor(address _conduitController) {\\n // Get the conduit creation code hash from the supplied conduit\\n // controller and set it as an immutable.\\n ConduitControllerInterface conduitController = ConduitControllerInterface(\\n _conduitController\\n );\\n (_CONDUIT_CREATION_CODE_HASH, ) = conduitController.getConduitCodeHashes();\\n\\n // Set the supplied conduit controller as an immutable.\\n _CONDUIT_CONTROLLER = conduitController;\\n }\\n\\n /// @dev This function derives the conduit address from the deployer,\\n /// conduit key, and creation code hash.\\n function _getConduit(bytes32 conduitKey) internal view returns (address conduit) {\\n conduit = address(\\n uint160(\\n uint256(\\n keccak256(\\n abi.encodePacked(\\n bytes1(0xff),\\n address(_CONDUIT_CONTROLLER),\\n conduitKey,\\n _CONDUIT_CREATION_CODE_HASH\\n )\\n )\\n )\\n )\\n );\\n }\\n\\n /// @dev This function transfers an ERC20 using a Seaport\\n /// Conduit to source approval.\\n /// @notice Only use `msg.sender` or `address(this)` in the from param.\\n /// @param token The ERC20 token to transfer.\\n /// @param from The originator of the transfer.\\n /// @param to The recipient of the transfer.\\n /// @param amount The amount of ERC20 to be sent.\\n /// @param conduitKey The key of the conduit to used.\\n function _transferERC20WithConduit(\\n address token,\\n address from,\\n address to,\\n uint256 amount,\\n bytes32 conduitKey\\n ) internal {\\n address conduit = _getConduit(conduitKey);\\n\\n ConduitTransfer[] memory conduitTransfers = new ConduitTransfer[](1);\\n conduitTransfers[0] = ConduitTransfer(\\n ConduitItemType.ERC20,\\n token,\\n from,\\n to,\\n 0,\\n amount\\n );\\n\\n // Call the conduit and execute transfer.\\n ConduitInterface(conduit).execute(conduitTransfers);\\n }\\n\\n /// @dev This function transfers an ERC721 token using a Seaport\\n /// Conduit to source approval.\\n /// @notice Only use `msg.sender` or `address(this)` in the from param.\\n /// @param token The ERC721 token to transfer.\\n /// @param from The originator of the transfer.\\n /// @param to The recipient of the transfer.\\n /// @param tokenId The tokenId of the ERC721 to be sent.\\n /// @param conduitKey The key of the conduit to used.\\n function _transferERC721WithConduit(\\n address token,\\n address from,\\n address to,\\n uint256 tokenId,\\n bytes32 conduitKey\\n ) internal {\\n address conduit = _getConduit(conduitKey);\\n\\n ConduitTransfer[] memory conduitTransfers = new ConduitTransfer[](1);\\n conduitTransfers[0] = ConduitTransfer(\\n ConduitItemType.ERC721,\\n token,\\n from,\\n to,\\n tokenId,\\n 1\\n );\\n\\n // Call the conduit and execute transfer.\\n ConduitInterface(conduit).execute(conduitTransfers);\\n }\\n\\n /// @dev This function transfers an ERC1155 token using a Seaport\\n /// Conduit to source approval.\\n /// @notice Only use `msg.sender` or `address(this)` in the from param.\\n /// @param token The ERC1155 token to transfer.\\n /// @param from The originator of the transfer.\\n /// @param to The recipient of the transfer.\\n /// @param tokenId The tokenId of the ERC1155 to be sent.\\n /// @param amount The amount of the ERC1155 to be sent.\\n /// @param conduitKey The key of the conduit to used.\\n function _transferERC1155WithConduit(\\n address token,\\n address from,\\n address to,\\n uint256 tokenId,\\n uint256 amount,\\n bytes32 conduitKey\\n ) internal {\\n address conduit = _getConduit(conduitKey);\\n\\n ConduitTransfer[] memory conduitTransfers = new ConduitTransfer[](1);\\n conduitTransfers[0] = ConduitTransfer(\\n ConduitItemType.ERC1155,\\n token,\\n from,\\n to,\\n tokenId,\\n amount\\n );\\n\\n // Call the conduit and execute transfer.\\n ConduitInterface(conduit).execute(conduitTransfers);\\n }\\n}\",\"keccak256\":\"0x02c920eaaada2a15eaca0bb144724a480290992e32897ba97fd491e5e73b33fa\",\"license\":\"MIT\"},\"contracts/shoyu/adapters/Transfer/TransferAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport \\\"@rari-capital/solmate/src/tokens/ERC20.sol\\\";\\nimport \\\"@rari-capital/solmate/src/tokens/ERC721.sol\\\";\\nimport \\\"@rari-capital/solmate/src/tokens/ERC1155.sol\\\";\\nimport \\\"./ConduitAdapter.sol\\\";\\nimport { TokenSource } from \\\"../../lib/LibShoyu.sol\\\";\\n\\ncontract TransferAdapter is ConduitAdapter {\\n constructor(address _conduitController) ConduitAdapter(_conduitController) {}\\n\\n /// @dev Function to transfer ERC20 tokens from `msg.sender`\\n /// to a given recipient. Assets can be transferred from\\n /// a user's wallet with approvals being sourced from\\n /// Shoyu contract or Shoyu's Seaport Conduit.\\n /// @param token The ERC20 token to transfer.\\n /// @param to The recipient of the transfer.\\n /// @param amount The amount to transfer.\\n /// @param source The token / approval source.\\n /// @param data Additional encoded data required depending on `source`.\\n function transferERC20From(\\n address token,\\n address to,\\n uint256 amount,\\n TokenSource source,\\n bytes memory data\\n ) public {\\n if (source == TokenSource.WALLET) {\\n ERC20(token).transferFrom(msg.sender, to, amount);\\n } else if (source == TokenSource.CONDUIT) {\\n bytes32 conduitKey = abi.decode(data, (bytes32));\\n\\n _transferERC20WithConduit(\\n token,\\n msg.sender,\\n to,\\n amount,\\n conduitKey\\n );\\n }\\n }\\n\\n /// @dev Function to transfer an ERC721 token from `msg.sender`\\n /// to a given recipient. Assets will be transferred from\\n /// a user's wallet with approvals being sourced from the\\n /// Shoyu contract or Seaport Conduit.\\n /// @param token The ERC721 token to transfer.\\n /// @param to The recipient of the transfer.\\n /// @param tokenId The tokenId of the asset to transfer.\\n /// @param source The NFT approval source.\\n /// @param data Additional encoded data required depending on `source`.\\n function transferERC721From(\\n address token,\\n address to,\\n uint256 tokenId,\\n TokenSource source,\\n bytes memory data\\n ) public {\\n if (source == TokenSource.WALLET) {\\n ERC721(token).safeTransferFrom(\\n msg.sender,\\n to,\\n tokenId\\n );\\n } else if (source == TokenSource.CONDUIT) {\\n bytes32 conduitKey = abi.decode(data, (bytes32));\\n\\n _transferERC721WithConduit(\\n token,\\n msg.sender,\\n to,\\n tokenId,\\n conduitKey\\n );\\n }\\n }\\n\\n /// @dev Function to transfer an ERC1155 token from `msg.sender`\\n /// to a given recipient. Assets will be transferred from\\n /// a user's wallet with approvals being sourced from the\\n /// Shoyu contract or Seaport Conduit.\\n /// @param token The ERC1155 token to transfer.\\n /// @param to The recipient of the transfer.\\n /// @param tokenId The tokenId of the asset to transfer.\\n /// @param amount The amount of the asset to transfer.\\n /// @param source The NFT approval source.\\n /// @param data Additional encoded data required depending on `source`.\\n function transferERC1155From(\\n address token,\\n address to,\\n uint256 tokenId,\\n uint256 amount,\\n TokenSource source,\\n bytes memory data\\n ) public {\\n if (source == TokenSource.WALLET) {\\n ERC1155(token).safeTransferFrom(\\n msg.sender,\\n to,\\n tokenId,\\n amount,\\n \\\"0x\\\"\\n );\\n } else if (source == TokenSource.CONDUIT) {\\n bytes32 conduitKey = abi.decode(data, (bytes32));\\n\\n _transferERC1155WithConduit(\\n token,\\n msg.sender,\\n to,\\n tokenId,\\n amount,\\n conduitKey\\n );\\n }\\n }\\n\\n /// @dev Function to return any excess ERC20 tokens from address(this)\\n /// to `msg.sender`.\\n /// @param token The token to return to the caller.\\n function returnERC20(address token) external {\\n uint256 balance = ERC20(token).balanceOf(address(this));\\n if (balance > 0) {\\n ERC20(token).transfer(msg.sender, balance);\\n }\\n }\\n\\n /// @dev Function to return any left over ERC721 token from\\n /// address(this) to `msg.sender`.\\n /// @param token The token to return to the caller.\\n /// @param tokenId The token identifier of the asset.\\n function returnERC721(address token, uint256 tokenId) external {\\n if (ERC721(token).ownerOf(tokenId) == address(this)) {\\n ERC721(token).transferFrom(address(this), msg.sender, tokenId);\\n }\\n }\\n\\n /// @dev Function to return any excess ERC1155 token from\\n /// address(this) to `msg.sender`.\\n /// @param token The token to return to the caller.\\n /// @param tokenId The token identifier of the asset.\\n function returnERC1155(address token, uint256 tokenId) external {\\n uint256 balance = ERC1155(token).balanceOf(address(this), tokenId);\\n if (balance > 0) {\\n ERC1155(token).safeTransferFrom(\\n address(this),\\n msg.sender,\\n tokenId,\\n balance,\\n \\\"\\\"\\n );\\n }\\n }\\n}\",\"keccak256\":\"0x173f2334576cc7f5f1c5ecacfe299d208daed76291be4f7c0c5f4094bfe9246d\",\"license\":\"MIT\"},\"contracts/shoyu/adapters/Transform/LegacySwapAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.7;\\n\\nimport \\\"@sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol\\\";\\nimport \\\"../Transfer/ConduitAdapter.sol\\\";\\nimport \\\"../Transfer/TransferAdapter.sol\\\";\\nimport { pairFor, sortTokens, getAmountsIn, getAmountsOut } from \\\"../../lib/LibSushi.sol\\\";\\nimport { TokenSource } from \\\"../../lib/LibShoyu.sol\\\";\\n\\ncontract LegacySwapAdapter is TransferAdapter {\\n /// @dev The UniswapV2Factory address.\\n address private immutable factory;\\n /// @dev The UniswapV2 pair init code.\\n bytes32 private immutable pairCodeHash;\\n\\n constructor(\\n address _factory,\\n bytes32 _pairCodeHash,\\n address _conduitController\\n ) TransferAdapter (_conduitController) {\\n factory = _factory;\\n pairCodeHash = _pairCodeHash;\\n }\\n\\n /// @dev This function transfers the input token from msg.sender and\\n /// performs the swaps outlined in `path`. An exact amount of the\\n /// output token is sent to the specified recipient.\\n /// @param amountOut The exact amount of output token to receive.\\n /// @param amountInMax The maximum amount of input to be spent.\\n /// @param path The swap path.\\n /// @param to The recipient to receive output token.\\n /// @param tokenSource The token / approval source for input token.\\n /// @param transferData Additional data required depending on `source`.\\n function _legacySwapExactOut(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] memory path,\\n address to,\\n TokenSource tokenSource,\\n bytes memory transferData\\n ) internal returns (uint256 amountIn) {\\n uint256[] memory amounts = getAmountsIn(\\n factory,\\n amountOut,\\n path,\\n pairCodeHash\\n );\\n amountIn = amounts[0];\\n\\n require(amountIn <= amountInMax, '_legacySwapExactOut/EXCESSIVE_AMOUNT_IN');\\n\\n transferERC20From(\\n path[0],\\n pairFor(\\n factory,\\n path[0],\\n path[1],\\n pairCodeHash\\n ),\\n amountIn,\\n tokenSource,\\n transferData\\n );\\n\\n _swap(amounts, path, to);\\n }\\n\\n /// @dev This function transfers an exact amount of the input token\\n /// from address(this) and performs the swaps outlined in `path`.\\n /// The output token is sent to the specified recipient.\\n /// @param amountIn The exact amount of input token to be spent.\\n /// @param amountOutMin The minimum amount of output token to be received.\\n /// @param path The swap path.\\n /// @param to The recipient of output token.\\n function _legacySwapExactIn(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] memory path,\\n address to\\n ) internal returns (uint256 amountOut) {\\n uint256[] memory amounts = getAmountsOut(\\n factory,\\n amountIn,\\n path,\\n pairCodeHash\\n );\\n amountOut = amounts[amounts.length - 1];\\n\\n require(amountOut >= amountOutMin, \\\"_legacySwapExactIn/EXCESSIVE_AMOUNT_OUT\\\");\\n\\n ERC20(path[0]).transfer(\\n pairFor(\\n factory,\\n path[0],\\n path[1],\\n pairCodeHash\\n ),\\n amountIn\\n );\\n\\n _swap(amounts, path, to);\\n }\\n\\n /// @dev Performs swaps as outlined in `path` and sends the output\\n /// token to the specified recipient.\\n /// @notice Requires the initial amount to have already been sent to the\\n /// first pair.\\n /// @param amounts The amounts to be swapped.\\n /// @param path The swap path.\\n /// @param _to The recipient of output token.\\n function _swap(\\n uint256[] memory amounts,\\n address[] memory path,\\n address _to\\n ) internal virtual {\\n for (uint256 i; i < path.length - 1; i++) {\\n (address input, address output) = (path[i], path[i + 1]);\\n\\n (address token0, ) = sortTokens(input, output);\\n\\n uint256 amountOut = amounts[i + 1];\\n\\n (uint256 amount0Out, uint256 amount1Out) = input == token0\\n ? (uint256(0), amountOut)\\n : (amountOut, uint256(0));\\n address to = i < path.length - 2 ? pairFor(factory, output, path[i + 2], pairCodeHash) : _to;\\n\\n IUniswapV2Pair(pairFor(factory, input, output, pairCodeHash)).swap(\\n amount0Out,\\n amount1Out,\\n to,\\n new bytes(0)\\n );\\n }\\n }\\n\\n \\n}\",\"keccak256\":\"0x95f16d8d76adfded50d18996d2b6147a077dec2ab344528fd33ce6789f93bf57\",\"license\":\"MIT\"},\"contracts/shoyu/adapters/Transform/TransformationAdapter.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.11;\\n\\nimport \\\"@sushiswap/core/contracts/uniswapv2/interfaces/IWETH.sol\\\";\\nimport \\\"./LegacySwapAdapter.sol\\\";\\n\\ncontract TransformationAdapter is LegacySwapAdapter {\\n /// @dev The WETH address.\\n address private immutable WETH;\\n\\n constructor(\\n address _weth,\\n address _factory,\\n bytes32 _pairCodeHash,\\n address _conduitController\\n ) LegacySwapAdapter(\\n _factory,\\n _pairCodeHash,\\n _conduitController\\n ) {\\n WETH = _weth;\\n }\\n\\n /// @dev This function swaps ERC20 tokens from msg.sender\\n /// for an exact amount of output tokens, sent\\n /// to the specified recipient.\\n /// @param amountOut The exact amount of output token to receive.\\n /// @param amountInMax The maximum amount of input to be spent.\\n /// @param path The swap path.\\n /// @param to The recipient to receive output token.\\n /// @param tokenSource The token / approval source for input token.\\n /// @param transferData Additional data required depending on `source`.\\n /// @param unwrapNative Flag to unwrap for native token if output token is WETH.\\n function swapExactOut(\\n uint256 amountOut,\\n uint256 amountInMax,\\n address[] memory path,\\n address payable to,\\n TokenSource tokenSource,\\n bytes memory transferData,\\n bool unwrapNative\\n ) public payable {\\n _legacySwapExactOut(\\n amountOut,\\n amountInMax,\\n path,\\n unwrapNative ? address(this) : to,\\n tokenSource,\\n transferData\\n );\\n\\n if (unwrapNative) {\\n IWETH(WETH).withdraw(amountOut);\\n if (to != address(this)) {\\n to.transfer(amountOut);\\n }\\n }\\n }\\n\\n /// @dev This function swaps an exact amount of tokens from address(this)\\n /// and sends a mimimum amount of output token to the specified recipient.\\n /// @param amountIn The exact amount of input token to be spent.\\n /// @param amountOutMin The minimum amount of output token to be received.\\n /// @param path The swap path.\\n /// @param to The recipient of output token.\\n /// @param unwrapNative Flag to unwrap for native token if output token is WETH.\\n function swapExactIn(\\n uint256 amountIn,\\n uint256 amountOutMin,\\n address[] memory path,\\n address payable to,\\n bool unwrapNative\\n ) public payable {\\n uint256 amountOut = _legacySwapExactIn(\\n amountIn,\\n amountOutMin,\\n path,\\n unwrapNative ? address(this) : to\\n );\\n\\n if (unwrapNative) {\\n IWETH(WETH).withdraw(amountOut);\\n if (to != address(this)) {\\n to.transfer(amountOut);\\n }\\n }\\n }\\n\\n /// @dev This function performs the swaps as outlined in `path`. This contract's\\n /// entire balance of input token will be swapped for a minimum amount of\\n /// output token, sent to the specified recipient.\\n /// @param amountOutMin The minimum amount of output token to be received.\\n /// @param path The swap path.\\n /// @param to The recipient of output token.\\n /// @param unwrapNative Flag to unwrap for native token if output token is WETH.\\n function swapMaxIn(\\n uint256 amountOutMin,\\n address[] memory path,\\n address payable to,\\n bool unwrapNative\\n ) public payable {\\n uint256 amountOut = _legacySwapExactIn(\\n ERC20(path[0]).balanceOf(address(this)),\\n amountOutMin,\\n path,\\n unwrapNative ? address(this) : to\\n );\\n\\n if (unwrapNative) {\\n IWETH(WETH).withdraw(amountOut);\\n if (to != address(this)) {\\n to.transfer(amountOut);\\n }\\n }\\n\\n }\\n\\n /// @dev This function unwraps WETH held by address(this)\\n /// and transfers ETH to the specified recipient.\\n /// @param amount The amount of WETH to be unwrapped.\\n /// @param to The ETH recipient.\\n function unwrapNativeToken(\\n uint256 amount,\\n address payable to\\n ) public {\\n IWETH(WETH).withdraw(amount);\\n if (to != address(this)) {\\n to.transfer(amount);\\n }\\n }\\n\\n /// @dev This function wraps ETH held by address(this).\\n /// @param amount The amount of ETH to wrap\\n function wrapNativeToken(uint256 amount) public payable {\\n IWETH(WETH).deposit{value: amount}();\\n }\\n}\",\"keccak256\":\"0x32b2fe2ab1c5055d6e1450236072f872cd26ef83b9ff1928205ec2d09430a5ab\",\"license\":\"MIT\"},\"contracts/shoyu/lib/LibShoyu.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.13;\\n\\nenum TokenSource {\\n WALLET,\\n CONDUIT\\n}\\n\\nstruct Adapter {\\n address adapterAddress;\\n bool isActive;\\n}\",\"keccak256\":\"0x62f8213d43b5a3b6ee253dc3ce89a4074b5cdbcaa60b31604cc923f20524b600\",\"license\":\"MIT\"},\"contracts/shoyu/lib/LibSushi.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity >=0.8.13;\\n\\n// Adapted from: https://github.com/sushiswap/limit-order/blob/a901749362691acd307f2370a876a33d33cde53e/contracts/libraries/UniswapV2Library.sol\\n\\nimport \\\"@sushiswap/core/contracts/uniswapv2/interfaces/IUniswapV2Pair.sol\\\";\\n\\n// returns sorted token addresses, used to handle return values from pairs sorted in this order\\nfunction sortTokens(\\n address tokenA,\\n address tokenB\\n) pure returns (address token0, address token1) {\\n require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');\\n (token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);\\n require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');\\n}\\n\\n// calculates the CREATE2 address for a pair without making any external calls\\nfunction pairFor(\\n address factory,\\n address tokenA,\\n address tokenB,\\n bytes32 pairCodeHash\\n) pure returns (address pair) {\\n (address token0, address token1) = sortTokens(tokenA, tokenB);\\n pair = address(uint160(uint(keccak256(abi.encodePacked(\\n hex'ff',\\n factory,\\n keccak256(abi.encodePacked(token0, token1)),\\n pairCodeHash // init code hash\\n )))));\\n}\\n\\n// fetches and sorts the reserves for a pair\\nfunction getReserves(\\n address factory,\\n address tokenA,\\n address tokenB,\\n bytes32 pairCodeHash\\n) view returns (uint reserveA, uint reserveB) {\\n (address token0,) = sortTokens(tokenA, tokenB);\\n (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB, pairCodeHash)).getReserves();\\n (reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);\\n}\\n\\n// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset\\nfunction getAmountOut(\\n uint amountIn,\\n uint reserveIn,\\n uint reserveOut\\n) pure returns (uint amountOut) {\\n require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint amountInWithFee = amountIn* 997;\\n uint numerator = amountInWithFee * reserveOut;\\n uint denominator = reserveIn * 1000 + amountInWithFee;\\n amountOut = numerator / denominator;\\n}\\n\\n// given an output amount of an asset and pair reserves, returns a required input amount of the other asset\\nfunction getAmountIn(\\n uint amountOut,\\n uint reserveIn,\\n uint reserveOut\\n) pure returns (uint amountIn) {\\n require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');\\n require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');\\n uint numerator = reserveIn * amountOut * 1000;\\n uint denominator = (reserveOut - amountOut) * 997;\\n amountIn = numerator / denominator + 1;\\n}\\n\\n// performs chained getAmountOut calculations on any number of pairs\\nfunction getAmountsOut(\\n address factory,\\n uint amountIn,\\n address[] memory path,\\n bytes32 pairCodeHash\\n) view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[0] = amountIn;\\n for (uint i; i < path.length - 1; i++) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1], pairCodeHash);\\n amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);\\n }\\n}\\n\\n// performs chained getAmountIn calculations on any number of pairs\\nfunction getAmountsIn(\\n address factory,\\n uint amountOut,\\n address[] memory path,\\n bytes32 pairCodeHash\\n) view returns (uint[] memory amounts) {\\n require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');\\n amounts = new uint[](path.length);\\n amounts[amounts.length - 1] = amountOut;\\n for (uint i = path.length - 1; i > 0; i--) {\\n (uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i], pairCodeHash);\\n amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);\\n }\\n}\\n\",\"keccak256\":\"0x9d6d1ae10f45688d641e7c0172059452c2496250ecbe2f5254fee7125e39d6f7\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitEnums.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nenum ConduitItemType {\\n NATIVE, // unused\\n ERC20,\\n ERC721,\\n ERC1155\\n}\\n\",\"keccak256\":\"0x1a84850bbff4b820573334c70ee0797462f20fd8c9b86fdebeacc85ecb1963a6\",\"license\":\"MIT\"},\"seaport/contracts/conduit/lib/ConduitStructs.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\nimport { ConduitItemType } from \\\"./ConduitEnums.sol\\\";\\n\\nstruct ConduitTransfer {\\n ConduitItemType itemType;\\n address token;\\n address from;\\n address to;\\n uint256 identifier;\\n uint256 amount;\\n}\\n\\nstruct ConduitBatch1155Transfer {\\n address token;\\n address from;\\n address to;\\n uint256[] ids;\\n uint256[] amounts;\\n}\\n\",\"keccak256\":\"0xe3e87c74dd79c59293e49b7236cc7befdc19886bb79af5fe53208b1772fd24f9\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitControllerInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n/**\\n * @title ConduitControllerInterface\\n * @author 0age\\n * @notice ConduitControllerInterface contains all external function interfaces,\\n * structs, events, and errors for the conduit controller.\\n */\\ninterface ConduitControllerInterface {\\n /**\\n * @dev Track the conduit key, current owner, new potential owner, and open\\n * channels for each deployed conduit.\\n */\\n struct ConduitProperties {\\n bytes32 key;\\n address owner;\\n address potentialOwner;\\n address[] channels;\\n mapping(address => uint256) channelIndexesPlusOne;\\n }\\n\\n /**\\n * @dev Emit an event whenever a new conduit is created.\\n *\\n * @param conduit The newly created conduit.\\n * @param conduitKey The conduit key used to create the new conduit.\\n */\\n event NewConduit(address conduit, bytes32 conduitKey);\\n\\n /**\\n * @dev Emit an event whenever conduit ownership is transferred.\\n *\\n * @param conduit The conduit for which ownership has been\\n * transferred.\\n * @param previousOwner The previous owner of the conduit.\\n * @param newOwner The new owner of the conduit.\\n */\\n event OwnershipTransferred(\\n address indexed conduit,\\n address indexed previousOwner,\\n address indexed newOwner\\n );\\n\\n /**\\n * @dev Emit an event whenever a conduit owner registers a new potential\\n * owner for that conduit.\\n *\\n * @param newPotentialOwner The new potential owner of the conduit.\\n */\\n event PotentialOwnerUpdated(address indexed newPotentialOwner);\\n\\n /**\\n * @dev Revert with an error when attempting to create a new conduit using a\\n * conduit key where the first twenty bytes of the key do not match the\\n * address of the caller.\\n */\\n error InvalidCreator();\\n\\n /**\\n * @dev Revert with an error when attempting to create a new conduit when no\\n * initial owner address is supplied.\\n */\\n error InvalidInitialOwner();\\n\\n /**\\n * @dev Revert with an error when attempting to set a new potential owner\\n * that is already set.\\n */\\n error NewPotentialOwnerAlreadySet(\\n address conduit,\\n address newPotentialOwner\\n );\\n\\n /**\\n * @dev Revert with an error when attempting to cancel ownership transfer\\n * when no new potential owner is currently set.\\n */\\n error NoPotentialOwnerCurrentlySet(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to interact with a conduit that\\n * does not yet exist.\\n */\\n error NoConduit();\\n\\n /**\\n * @dev Revert with an error when attempting to create a conduit that\\n * already exists.\\n */\\n error ConduitAlreadyExists(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to update channels or transfer\\n * ownership of a conduit when the caller is not the owner of the\\n * conduit in question.\\n */\\n error CallerIsNotOwner(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to register a new potential\\n * owner and supplying the null address.\\n */\\n error NewPotentialOwnerIsZeroAddress(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to claim ownership of a conduit\\n * with a caller that is not the current potential owner for the\\n * conduit in question.\\n */\\n error CallerIsNotNewPotentialOwner(address conduit);\\n\\n /**\\n * @dev Revert with an error when attempting to retrieve a channel using an\\n * index that is out of range.\\n */\\n error ChannelOutOfRange(address conduit);\\n\\n /**\\n * @notice Deploy a new conduit using a supplied conduit key and assigning\\n * an initial owner for the deployed conduit. Note that the first\\n * twenty bytes of the supplied conduit key must match the caller\\n * and that a new conduit cannot be created if one has already been\\n * deployed using the same conduit key.\\n *\\n * @param conduitKey The conduit key used to deploy the conduit. Note that\\n * the first twenty bytes of the conduit key must match\\n * the caller of this contract.\\n * @param initialOwner The initial owner to set for the new conduit.\\n *\\n * @return conduit The address of the newly deployed conduit.\\n */\\n function createConduit(bytes32 conduitKey, address initialOwner)\\n external\\n returns (address conduit);\\n\\n /**\\n * @notice Open or close a channel on a given conduit, thereby allowing the\\n * specified account to execute transfers against that conduit.\\n * Extreme care must be taken when updating channels, as malicious\\n * or vulnerable channels can transfer any ERC20, ERC721 and ERC1155\\n * tokens where the token holder has granted the conduit approval.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to open or close the channel.\\n * @param channel The channel to open or close on the conduit.\\n * @param isOpen A boolean indicating whether to open or close the channel.\\n */\\n function updateChannel(\\n address conduit,\\n address channel,\\n bool isOpen\\n ) external;\\n\\n /**\\n * @notice Initiate conduit ownership transfer by assigning a new potential\\n * owner for the given conduit. Once set, the new potential owner\\n * may call `acceptOwnership` to claim ownership of the conduit.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to initiate ownership transfer.\\n * @param newPotentialOwner The new potential owner of the conduit.\\n */\\n function transferOwnership(address conduit, address newPotentialOwner)\\n external;\\n\\n /**\\n * @notice Clear the currently set potential owner, if any, from a conduit.\\n * Only the owner of the conduit in question may call this function.\\n *\\n * @param conduit The conduit for which to cancel ownership transfer.\\n */\\n function cancelOwnershipTransfer(address conduit) external;\\n\\n /**\\n * @notice Accept ownership of a supplied conduit. Only accounts that the\\n * current owner has set as the new potential owner may call this\\n * function.\\n *\\n * @param conduit The conduit for which to accept ownership.\\n */\\n function acceptOwnership(address conduit) external;\\n\\n /**\\n * @notice Retrieve the current owner of a deployed conduit.\\n *\\n * @param conduit The conduit for which to retrieve the associated owner.\\n *\\n * @return owner The owner of the supplied conduit.\\n */\\n function ownerOf(address conduit) external view returns (address owner);\\n\\n /**\\n * @notice Retrieve the conduit key for a deployed conduit via reverse\\n * lookup.\\n *\\n * @param conduit The conduit for which to retrieve the associated conduit\\n * key.\\n *\\n * @return conduitKey The conduit key used to deploy the supplied conduit.\\n */\\n function getKey(address conduit) external view returns (bytes32 conduitKey);\\n\\n /**\\n * @notice Derive the conduit associated with a given conduit key and\\n * determine whether that conduit exists (i.e. whether it has been\\n * deployed).\\n *\\n * @param conduitKey The conduit key used to derive the conduit.\\n *\\n * @return conduit The derived address of the conduit.\\n * @return exists A boolean indicating whether the derived conduit has been\\n * deployed or not.\\n */\\n function getConduit(bytes32 conduitKey)\\n external\\n view\\n returns (address conduit, bool exists);\\n\\n /**\\n * @notice Retrieve the potential owner, if any, for a given conduit. The\\n * current owner may set a new potential owner via\\n * `transferOwnership` and that owner may then accept ownership of\\n * the conduit in question via `acceptOwnership`.\\n *\\n * @param conduit The conduit for which to retrieve the potential owner.\\n *\\n * @return potentialOwner The potential owner, if any, for the conduit.\\n */\\n function getPotentialOwner(address conduit)\\n external\\n view\\n returns (address potentialOwner);\\n\\n /**\\n * @notice Retrieve the status (either open or closed) of a given channel on\\n * a conduit.\\n *\\n * @param conduit The conduit for which to retrieve the channel status.\\n * @param channel The channel for which to retrieve the status.\\n *\\n * @return isOpen The status of the channel on the given conduit.\\n */\\n function getChannelStatus(address conduit, address channel)\\n external\\n view\\n returns (bool isOpen);\\n\\n /**\\n * @notice Retrieve the total number of open channels for a given conduit.\\n *\\n * @param conduit The conduit for which to retrieve the total channel count.\\n *\\n * @return totalChannels The total number of open channels for the conduit.\\n */\\n function getTotalChannels(address conduit)\\n external\\n view\\n returns (uint256 totalChannels);\\n\\n /**\\n * @notice Retrieve an open channel at a specific index for a given conduit.\\n * Note that the index of a channel can change as a result of other\\n * channels being closed on the conduit.\\n *\\n * @param conduit The conduit for which to retrieve the open channel.\\n * @param channelIndex The index of the channel in question.\\n *\\n * @return channel The open channel, if any, at the specified channel index.\\n */\\n function getChannel(address conduit, uint256 channelIndex)\\n external\\n view\\n returns (address channel);\\n\\n /**\\n * @notice Retrieve all open channels for a given conduit. Note that calling\\n * this function for a conduit with many channels will revert with\\n * an out-of-gas error.\\n *\\n * @param conduit The conduit for which to retrieve open channels.\\n *\\n * @return channels An array of open channels on the given conduit.\\n */\\n function getChannels(address conduit)\\n external\\n view\\n returns (address[] memory channels);\\n\\n /**\\n * @dev Retrieve the conduit creation code and runtime code hashes.\\n */\\n function getConduitCodeHashes()\\n external\\n view\\n returns (bytes32 creationCodeHash, bytes32 runtimeCodeHash);\\n}\\n\",\"keccak256\":\"0xb124e40645efdf5d92b48fd54eaeb0ba1d05fde62bf51e7684c1bc3bf5343388\",\"license\":\"MIT\"},\"seaport/contracts/interfaces/ConduitInterface.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.7;\\n\\n// prettier-ignore\\nimport {\\n ConduitTransfer,\\n ConduitBatch1155Transfer\\n} from \\\"../conduit/lib/ConduitStructs.sol\\\";\\n\\n/**\\n * @title ConduitInterface\\n * @author 0age\\n * @notice ConduitInterface contains all external function interfaces, events,\\n * and errors for conduit contracts.\\n */\\ninterface ConduitInterface {\\n /**\\n * @dev Revert with an error when attempting to execute transfers using a\\n * caller that does not have an open channel.\\n */\\n error ChannelClosed(address channel);\\n\\n /**\\n * @dev Revert with an error when attempting to update a channel to the\\n * current status of that channel.\\n */\\n error ChannelStatusAlreadySet(address channel, bool isOpen);\\n\\n /**\\n * @dev Revert with an error when attempting to execute a transfer for an\\n * item that does not have an ERC20/721/1155 item type.\\n */\\n error InvalidItemType();\\n\\n /**\\n * @dev Revert with an error when attempting to update the status of a\\n * channel from a caller that is not the conduit controller.\\n */\\n error InvalidController();\\n\\n /**\\n * @dev Emit an event whenever a channel is opened or closed.\\n *\\n * @param channel The channel that has been updated.\\n * @param open A boolean indicating whether the conduit is open or not.\\n */\\n event ChannelUpdated(address indexed channel, bool open);\\n\\n /**\\n * @notice Execute a sequence of ERC20/721/1155 transfers. Only a caller\\n * with an open channel can call this function.\\n *\\n * @param transfers The ERC20/721/1155 transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function execute(ConduitTransfer[] calldata transfers)\\n external\\n returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of batch 1155 transfers. Only a caller with an\\n * open channel can call this function.\\n *\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeBatch1155(\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Execute a sequence of transfers, both single and batch 1155. Only\\n * a caller with an open channel can call this function.\\n *\\n * @param standardTransfers The ERC20/721/1155 transfers to perform.\\n * @param batch1155Transfers The 1155 batch transfers to perform.\\n *\\n * @return magicValue A magic value indicating that the transfers were\\n * performed successfully.\\n */\\n function executeWithBatch1155(\\n ConduitTransfer[] calldata standardTransfers,\\n ConduitBatch1155Transfer[] calldata batch1155Transfers\\n ) external returns (bytes4 magicValue);\\n\\n /**\\n * @notice Open or close a given channel. Only callable by the controller.\\n *\\n * @param channel The channel to open or close.\\n * @param isOpen The status of the channel (either open or closed).\\n */\\n function updateChannel(address channel, bool isOpen) external;\\n}\\n\",\"keccak256\":\"0x3f3224e8455ccd73027671e44be8c5a2338c8cd4c0f1dca3fa0f15a44ef14f06\",\"license\":\"MIT\"}},\"version\":1}", "bytecode": "0x6101208060405234620000d057608081620025c28038038091620000248285620000d5565b833981010312620000d057806200003f62000068926200010f565b906200004e602082016200010f565b620000616060604084015193016200010f565b9262000124565b6040516124169081620001ac82396080518161136f015260a0518161139e015260c051818181611598015281816118e10152611b34015260e0518181816115b9015281816119030152611b560152610100518181816103bb01528181610bca0152610e000152f35b600080fd5b601f909101601f19168101906001600160401b03821190821017620000f957604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620000d057565b60408051630a96ad3960e01b815291946001600160a01b031691908082600481865afa908115620001a1576000916200016c575b5060a0525060805260c05260e05261010052565b82813d831162000199575b620001838183620000d5565b8101031262000196575051803862000158565b80fd5b503d62000177565b513d6000823e3d90fdfe60806040526004361015610013575b600080fd5b60003560e01c8062c5a565146100ee57806302232c1f146100e55780630b7bc729146100dc578063464d91cf146100d35780638974e275146100ca5780639b223997146100c1578063ae408017146100b8578063b80e2d50146100af578063c56420f7146100a6578063c72936681461009d5763d75c74621461009557600080fd5b61000e610dda565b5061000e610caa565b5061000e610b90565b5061000e610a5b565b5061000e610984565b5061000e61084b565b5061000e6106e7565b5061000e6106cc565b5061000e610526565b5061000e6104a5565b5061000e610319565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b67ffffffffffffffff811161013b57604052565b6101436100f7565b604052565b60c0810190811067ffffffffffffffff82111761013b57604052565b6080810190811067ffffffffffffffff82111761013b57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761013b57604052565b604051906101ce82610148565b565b60209067ffffffffffffffff81116101ea575b60051b0190565b6101f26100f7565b6101e3565b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b81601f8201121561000e5780359161022c836101d0565b9261023a6040519485610180565b808452602092838086019260051b82010192831161000e578301905b828210610264575050505090565b8380918335610272816101f7565b815201910190610256565b60843590600282101561000e57565b81601f8201121561000e5780359067ffffffffffffffff8211610302575b604051926102e060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8601160185610180565b8284526020838301011161000e57816000926020809301838601378301015290565b61030a6100f7565b6102aa565b8015150361000e57565b5060e060031936011261000e5760043567ffffffffffffffff60443581811161000e5761034a903690600401610215565b60643591610357836101f7565b61035f61027d565b60a43591821161000e5761037a61039a92369060040161028c565b9060c435936103888561030f565b84156104885730905b60243588611590565b506103a2575b005b73ffffffffffffffffffffffffffffffffffffffff90817f000000000000000000000000000000000000000000000000000000000000000016803b1561000e57600060405180927f2e1a7d4d0000000000000000000000000000000000000000000000000000000082528183816104218a600483019190602083019252565b03925af1801561047b575b610462575b50163081146103a05760008080938193828215610459575bf11561045157005b6103a0610ef1565b506108fc610449565b8061046f61047592610127565b806113d6565b38610431565b610483610ef1565b61042c565b73ffffffffffffffffffffffffffffffffffffffff861690610391565b5060a060031936011261000e5760443567ffffffffffffffff811161000e576104d2903690600401610215565b6064356104de816101f7565b610502608435926104ee8461030f565b83156105095730905b602435600435611b24565b916103a257005b73ffffffffffffffffffffffffffffffffffffffff8316906104f7565b503461000e57604060031936011261000e57600435610544816101f7565b6024359073ffffffffffffffffffffffffffffffffffffffff80911690604051907f6352211e0000000000000000000000000000000000000000000000000000000082526020828061059e87600483019190602083019252565b0381865afa918215610666575b600092610636575b501630146105bd57005b803b1561000e576040517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015233602482015260448101929092526000908290818381606481015b03925af18015610629575b61061c57005b8061046f6103a092610127565b610631610ef1565b610616565b61065891925060203d811161065f575b6106508183610180565b8101906114f0565b90386105b3565b503d610646565b61066e610ef1565b6105ab565b60a060031982011261000e5760043561068b816101f7565b91602435610698816101f7565b9160443591606435600281101561000e57916084359067ffffffffffffffff821161000e576106c99160040161028c565b90565b503461000e576103a06106de36610673565b93929092610efe565b503461000e5760c060031936011261000e57600435610705816101f7565b602435610711816101f7565b604435916064359061072161027d565b60a43567ffffffffffffffff811161000e5761074190369060040161028c565b9061074b81610ebb565b8061081557505073ffffffffffffffffffffffffffffffffffffffff16803b1561000e576040517ff242432a00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9390931660248401526044830193909352606482015260a06084820152600260a48201527f307800000000000000000000000000000000000000000000000000000000000060c482015290600090829060e490829084905af180156106295761061c57005b806108266001929794969397610ebb565b1461082d57005b610843856020806103a098518301019101610ecd565b933390611442565b503461000e57604060031936011261000e57600435610869816101f7565b6040517efdd58e0000000000000000000000000000000000000000000000000000000081523060048201526024803590820181905273ffffffffffffffffffffffffffffffffffffffff929092169190602081604481865afa908115610977575b600091610949575b50806108da57005b823b1561000e576040517ff242432a0000000000000000000000000000000000000000000000000000000081523060048201523360248201526044810192909252606482015260a06084820152600060a482018190529091829060c490829084905af180156106295761061c57005b61096a915060203d8111610970575b6109628183610180565b810190610ecd565b386108d2565b503d610958565b61097f610ef1565b6108ca565b503461000e5761099336610673565b906109a081959395610ebb565b80610a2557505073ffffffffffffffffffffffffffffffffffffffff1691823b1561000e576040517f42842e0e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff909216602483015260448201529060009082908183816064810161060b565b80610a366001929694959396610ebb565b14610a3d57005b610a53846020806103a097518301019101610ecd565b9233906113e1565b50608060031936011261000e5760243567ffffffffffffffff811161000e57610a88903690600401610215565b604435610a94816101f7565b61050260643592610aa48461030f565b610ae9610ad0610ad0610ab6846110a0565b5173ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529190602090839060249082905afa918215610b83575b600092610b63575b508415610b465730915b60043590611b24565b73ffffffffffffffffffffffffffffffffffffffff841691610b3d565b610b7c91925060203d8111610970576109628183610180565b9038610b33565b610b8b610ef1565b610b2b565b503461000e57604060031936011261000e57602435600435610bb1826101f7565b73ffffffffffffffffffffffffffffffffffffffff90817f00000000000000000000000000000000000000000000000000000000000000001691823b1561000e57604051937f2e1a7d4d00000000000000000000000000000000000000000000000000000000855284600081819796818381610c368a6004849d019190602083019252565b03925af18015610c9d575b610c8a575b501690308203610c57575b82604051f35b828092918192828215610c81575bf115610c74575b803880610c51565b610c7c610ef1565b610c6c565b506108fc610c65565b8061046f610c9792610127565b38610c46565b610ca5610ef1565b610c41565b503461000e5760208060031936011261000e5773ffffffffffffffffffffffffffffffffffffffff600435610cde816101f7565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015291168282602481845afa918215610dcd575b600092610dae575b5081610d2c57005b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815233600482015260248101929092528290829060449082906000905af18015610da1575b610d7b57005b816103a092903d10610d9a575b610d928183610180565b810190610edc565b503d610d88565b610da9610ef1565b610d75565b610dc6919250833d8511610970576109628183610180565b9038610d24565b610dd5610ef1565b610d1c565b5060006020600319360112610e885773ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001681813b15610e8857600491604051928380927fd0e30db00000000000000000000000000000000000000000000000000000000082528235905af18015610e7b575b610e6c575b50604051f35b610e7590610127565b38610e66565b610e83610ef1565b610e61565b80fd5b507f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b60021115610ec557565b6101ce610e8b565b9081602091031261000e575190565b9081602091031261000e57516106c98161030f565b506040513d6000823e3d90fd5b9293909193610f0c81610ebb565b80610fa75750506040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff9182166024820152604481019390935260209183916064918391600091165af18015610f9a575b610f83575b50565b610f809060203d8111610d9a57610d928183610180565b610fa2610ef1565b610f7b565b80610fb760019296949396610ebb565b14610fc3575b50505050565b610fd984602080610fe197518301019101610ecd565b9233906111cf565b38808080610fbd565b60409081519180830183811067ffffffffffffffff821117611063575b815260018352829160005b60208082101561105b5783516020929161102b82610148565b600082526000818301526000868301526000606083015260006080830152600060a0830152828801015201611012565b505091925050565b61106b6100f7565b611007565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6020908051156110ae570190565b6110b6611070565b0190565b6040908051600110156110ae570190565b60209181518110156110e0575b60051b010190565b6110e8611070565b6110d8565b9081602091031261000e57517fffffffff000000000000000000000000000000000000000000000000000000008116810361000e5790565b60208082019080835283518092528060408094019401926000905b83821061114f57505050505090565b90919293948360c06001928851805160048110156111c2575b825273ffffffffffffffffffffffffffffffffffffffff80858301511685840152808783015116878401526060908183015116908301526080808201519083015260a0809101519082015201960192019093929193611140565b6111ca610e8b565b611168565b906112c4929160209461126d6111f973ffffffffffffffffffffffffffffffffffffffff9861130b565b94611250611205610fea565b956112336112116101c1565b60018152965b73ffffffffffffffffffffffffffffffffffffffff16878c0152565b73ffffffffffffffffffffffffffffffffffffffff166040860152565b73ffffffffffffffffffffffffffffffffffffffff166060840152565b6000608083015260a0820152611282826110a0565b5261128c816110a0565b5060006040519586809581947f4ce34aa200000000000000000000000000000000000000000000000000000000835260048301611125565b0393165af180156112fe575b6112d75750565b610f809060203d81116112f7575b6112ef8183610180565b8101906110ed565b503d6112e5565b611306610ef1565b6112d0565b73ffffffffffffffffffffffffffffffffffffffff9060405160208101917fff0000000000000000000000000000000000000000000000000000000000000083527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b16602183015260358201527f00000000000000000000000000000000000000000000000000000000000000006055820152605581526113cf81610164565b5190201690565b600091031261000e57565b906112c4929160209461142d61140b73ffffffffffffffffffffffffffffffffffffffff9861130b565b94611250611417610fea565b956112336114236101c1565b6002815296611217565b6080820152600160a0820152611282826110a0565b6020946112c4946114dd61146a73ffffffffffffffffffffffffffffffffffffffff9961130b565b956114c0611476610fea565b966114a36114826101c1565b600381529773ffffffffffffffffffffffffffffffffffffffff16888d0152565b73ffffffffffffffffffffffffffffffffffffffff166040870152565b73ffffffffffffffffffffffffffffffffffffffff166060850152565b608083015260a0820152611282826110a0565b9081602091031261000e57516106c9816101f7565b1561150c57565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f5f6c65676163795377617045786163744f75742f4558434553534956455f414d60448201527f4f554e545f494e000000000000000000000000000000000000000000000000006064820152fd5b9295949193907f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000006115e6600288511015611e65565b6115f08751611eca565b95865190600182106116f0575b61160c600019809301896110cb565b528751600181106116e3575b01805b61167f57509261167a926101ce979592611674889661163d6116499d9a6110a0565b519c8d94851115611505565b611655610ab68a6110a0565b92611662610ab68b6110a0565b61166e610ab68c6110ba565b91611d8a565b90610efe565b6118da565b806116c56116b4848b6116ad610ab6866116a7610ab66116a16116dd9b611745565b866110cb565b936110cb565b9088611fe0565b906116bf848c6110cb565b516122ed565b6116d76116d183611745565b8a6110cb565b526122df565b8061161b565b6116eb6116fd565b611618565b6116f86116fd565b6115fd565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600190600019811461173d570190565b6110b66116fd565b600019906001811061173d570190565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe906002811061173d570190565b81811061178e570390565b6117966116fd565b0390565b6001907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe811161173d570190565b6002907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd811161173d570190565b8119811161173d570190565b604051906000602083019280841067ffffffffffffffff85111761182e575b8360405281815292369037565b6118366100f7565b611821565b9273ffffffffffffffffffffffffffffffffffffffff91959495845260209283850152166040830152608060608301528351908160808401526000945b8286106118c4575050601f817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09260a09596116118b7575b0116010190565b60008582860101526118b0565b85810182015184870160a0015294810194611878565b92919260007f0000000000000000000000000000000000000000000000000000000000000000927f0000000000000000000000000000000000000000000000000000000000000000915b61192e8251611745565b811015611a905780611944610ab68993856110cb565b611953610ab66116a18461179a565b8561195e8284611c6c565b5091868a61197461196e8861179a565b8c6110cb565b519473ffffffffffffffffffffffffffffffffffffffff878116911603611a76579282610ad092826119dd96610ad0968b60009a9d5b6119b48651611755565b821015611a6a5750610ab66119d5956119cf61166e936117c8565b906110cb565b965b8d611d8a565b916119e6611802565b92803b1561000e57611a459560008094611a2f604051978896879586947f022c0d9f0000000000000000000000000000000000000000000000000000000086526004860161183b565b03925af18015611a5d575b611a4a575b5061172d565b611924565b8061046f611a5792610127565b38611a3f565b611a65610ef1565b611a3a565b945050505050966119d7565b9392610ad092610ad092826119dd9697838b60009d6119aa565b50505050509050565b15611aa057565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f5f6c6567616379537761704578616374496e2f4558434553534956455f414d4f60448201527f554e545f4f5554000000000000000000000000000000000000000000000000006064820152fd5b916101ce9294939194611c2b60207f0000000000000000000000000000000000000000000000000000000000000000927f000000000000000000000000000000000000000000000000000000000000000093611bd1611b8586888585611f19565b95611ba6611b9c611b968951611745565b896110cb565b519c8d1015611a99565b611bb8610ad0610ad0610ab68b6110a0565b92611bc5610ab68a6110a0565b61166e610ab68b6110ba565b60006040518096819582947fa9059cbb000000000000000000000000000000000000000000000000000000008452600484016020909392919373ffffffffffffffffffffffffffffffffffffffff60408201951681520152565b03925af18015611c5f575b611c41575b506118da565b611c589060203d8111610d9a57610d928183610180565b5038611c3b565b611c67610ef1565b611c36565b909173ffffffffffffffffffffffffffffffffffffffff91828416838216818114611d06571015611d0157925b91831615611ca357565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f4144445245535300006044820152fd5b611c99565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602560248201527f556e697377617056324c6962726172793a204944454e544943414c5f4144445260448201527f45535345530000000000000000000000000000000000000000000000000000006064820152fd5b9192611dad73ffffffffffffffffffffffffffffffffffffffff9460b593611c6c565b6040939193519060208201947fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009182809260601b16875260601b16603483015260288252606082019482861067ffffffffffffffff871117611e58575b85604052825190209060808301967fff00000000000000000000000000000000000000000000000000000000000000885260601b16608183015260958201520152605581526113cf81610164565b611e606100f7565b611e0a565b15611e6c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f556e697377617056324c6962726172793a20494e56414c49445f5041544800006044820152fd5b90611ed4826101d0565b611ee16040519182610180565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0611f0f82946101d0565b0190602036910137565b90939291611f2b600282511015611e65565b611f358151611eca565b94855115611fb8575b602086015260005b600019825160018110611fab575b01811015610fbd5780611f94611f8386611f74610ab6611fa696886110cb565b6116ad610ab6611b968761179a565b90611f8e848b6110cb565b516121f3565b611fa0611b968361179a565b5261172d565b611f46565b611fb36116fd565b611f54565b611fc0611070565b611f3e565b51906dffffffffffffffffffffffffffff8216820361000e57565b6060829161201460049596611ff58886611c6c565b509773ffffffffffffffffffffffffffffffffffffffff958694611d8a565b16604051948580927f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa9283156120d5575b600090819461207d575b5081906dffffffffffffffffffffffffffff809116941694169116146000146120795791565b9091565b93506060843d82116120cd575b8161209760609383610180565b81010312610e88576120a884611fc5565b9060406120b760208701611fc5565b95015163ffffffff811603610e88575081612053565b3d915061208a565b6120dd610ef1565b612049565b156120e957565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4c60448201527f49515549444954590000000000000000000000000000000000000000000000006064820152fd5b6103e8908060001904821181151516612184570290565b61218c6116fd565b0290565b6103e5908060001904821181151516612184570290565b8060001904821181151516612184570290565b81156121c4570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b801561225b576106c99261223a61223461223f9385151580612252575b612219906120e2565b6103e59080600019048211600116612245575b0292836121a7565b9361216d565b6117f6565b906121ba565b61224d6116fd565b61222c565b50831515612210565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4960448201527f4e5055545f414d4f554e540000000000000000000000000000000000000000006064820152fd5b60001990801561173d570190565b801561235c576106c99261233a61233561231c848661234197151580612353575b612317906120e2565b6121a7565b936103e893856000190485118615151661234657611783565b612190565b91026121ba565b61179a565b61234e6116fd565b611783565b5085151561230e565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f556e697377617056324c6962726172793a20494e53554646494349454e545f4f60448201527f55545055545f414d4f554e5400000000000000000000000000000000000000006064820152fdfea26469706673582212202930953405f096d519e59cc67824621c4ba2df4d4ca8730abadb1f53260bcf3964736f6c634300080e0033", diff --git a/package.json b/package.json index ff25ee51..bc7585ff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@shoyunft/contracts", - "version": "2.0.3", + "version": "2.0.4", "description": "ShoyuNFT", "main": "contracts/Shoyu.sol", "author": "0xMasayoshi",