Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 42 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create Nft With ... | 18062967 | 449 days ago | IN | 0 ETH | 0.01539181 | ||||
Create Nft With ... | 17774967 | 490 days ago | IN | 0 ETH | 0.02325207 | ||||
Create Nft With ... | 17726897 | 496 days ago | IN | 0 ETH | 0.02526305 | ||||
Create Nft With ... | 16482404 | 672 days ago | IN | 0 ETH | 0.02307689 | ||||
Create Nft With ... | 16382727 | 685 days ago | IN | 0 ETH | 0.0213544 | ||||
Create Nft With ... | 16374866 | 687 days ago | IN | 0 ETH | 0.01807156 | ||||
Create Nft With ... | 16336319 | 692 days ago | IN | 0 ETH | 0.03462175 | ||||
Create Nft With ... | 16336263 | 692 days ago | IN | 0 ETH | 0.02706543 | ||||
Create Nft With ... | 16284022 | 699 days ago | IN | 0 ETH | 0.0308458 | ||||
Create Nft With ... | 16198552 | 711 days ago | IN | 0 ETH | 0.03656165 | ||||
Create Nft With ... | 16164049 | 716 days ago | IN | 0 ETH | 0.01848658 | ||||
Create Nft With ... | 15918584 | 750 days ago | IN | 0 ETH | 0.04175914 | ||||
Create Nft With ... | 15887611 | 755 days ago | IN | 0 ETH | 0.02160493 | ||||
Create Nft With ... | 15887585 | 755 days ago | IN | 0 ETH | 0.02080803 | ||||
Create Nft With ... | 15671850 | 785 days ago | IN | 0 ETH | 0.01679041 | ||||
Create Nft With ... | 15665262 | 786 days ago | IN | 0 ETH | 0.00920731 | ||||
Create Nft With ... | 15525121 | 806 days ago | IN | 0 ETH | 0.00650288 | ||||
Create Nft With ... | 15502908 | 809 days ago | IN | 0 ETH | 0.03798176 | ||||
Create Nft With ... | 15502745 | 809 days ago | IN | 0 ETH | 0.02714534 | ||||
Create Nft With ... | 15306867 | 841 days ago | IN | 0 ETH | 0.01746088 | ||||
Deploy ERC721Con... | 15236619 | 851 days ago | IN | 0 ETH | 0.00641982 | ||||
Create Nft With ... | 15185270 | 859 days ago | IN | 0 ETH | 0.01118496 | ||||
Create Nft With ... | 15185235 | 859 days ago | IN | 0 ETH | 0.01710279 | ||||
Create Nft With ... | 15185215 | 859 days ago | IN | 0 ETH | 0.01957556 | ||||
Create Nft With ... | 15185169 | 859 days ago | IN | 0 ETH | 0.0239065 |
Latest 25 internal transactions (View All)
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
ERC721Factory
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 import "./utils/Deployer.sol"; import "./interfaces/IFactory.sol"; import "./interfaces/IERC721Template.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IERC20Template.sol"; import "./interfaces/IERC20.sol"; import "./utils/SafeERC20.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; /** * @title DTFactory contract * @author Ocean Protocol Team * * @dev Implementation of Ocean datatokens Factory * * DTFactory deploys datatoken proxy contracts. * New datatoken proxy contracts are links to the template contract's bytecode. * Proxy contract functionality is based on Ocean Protocol custom implementation of ERC1167 standard. */ contract ERC721Factory is Deployer, Ownable, ReentrancyGuard, IFactory { using SafeERC20 for IERC20; using SafeMath for uint256; uint256 private currentNFTCount; address private erc20Factory; uint256 private nftTemplateCount; struct Template { address templateAddress; bool isActive; } mapping(uint256 => Template) public nftTemplateList; mapping(uint256 => Template) public templateList; mapping(address => address) public erc721List; mapping(address => bool) public erc20List; event NFTCreated( address newTokenAddress, address indexed templateAddress, string tokenName, address indexed admin, string symbol, string tokenURI, bool transferable, address indexed creator ); uint256 private currentTokenCount = 0; uint256 public templateCount; address public router; event Template721Added(address indexed _templateAddress, uint256 indexed nftTemplateCount); event Template20Added(address indexed _templateAddress, uint256 indexed nftTemplateCount); //stored here only for ABI reasons event TokenCreated( address indexed newTokenAddress, address indexed templateAddress, string name, string symbol, uint256 cap, address creator ); event NewPool( address poolAddress, address ssContract, address baseTokenAddress ); event NewFixedRate(bytes32 exchangeId, address indexed owner, address exchangeContract, address indexed baseToken); event NewDispenser(address dispenserContract); event DispenserCreated( // emited when a dispenser is created address indexed datatokenAddress, address indexed owner, uint256 maxTokens, uint256 maxBalance, address allowedSwapper ); // erc721 transfer event, stored here just for readability event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev constructor * Called on contract deployment. Could not be called with zero address parameters. * @param _template721 refers to the address of ERC721 template * @param _template refers to the address of a deployed datatoken contract. * @param _router router contract address */ constructor( address _template721, address _template, address _router ) { require( _template != address(0) && _router != address(0) && _template721 != address(0), "ERC721DTFactory: Invalid template/router address" ); add721TokenTemplate(_template721); addTokenTemplate(_template); router = _router; } /** * @dev deployERC721Contract * * @param name NFT name * @param symbol NFT Symbol * @param _templateIndex template index we want to use * @param additionalERC20Deployer if != address(0), we will add it with ERC20Deployer role * @param additionalMetaDataUpdater if != address(0), we will add it with updateMetadata role * @param transferable if NFT is transferable. Cannot be changed afterwards * @param owner owner of the NFT */ function deployERC721Contract( string memory name, string memory symbol, uint256 _templateIndex, address additionalERC20Deployer, address additionalMetaDataUpdater, string memory tokenURI, bool transferable, address owner ) public returns (address token) { require( _templateIndex <= nftTemplateCount && _templateIndex != 0, "ERC721DTFactory: Template index doesnt exist" ); Template memory tokenTemplate = nftTemplateList[_templateIndex]; require( tokenTemplate.isActive, "ERC721DTFactory: ERC721Token Template disabled" ); require( owner!=address(0), "ERC721DTFactory: address(0) cannot be owner" ); token = deploy(tokenTemplate.templateAddress); require( token != address(0), "ERC721DTFactory: Failed to perform minimal deploy of a new token" ); erc721List[token] = token; emit NFTCreated(token, tokenTemplate.templateAddress, name, owner, symbol, tokenURI, transferable, msg.sender); currentNFTCount += 1; IERC721Template tokenInstance = IERC721Template(token); require( tokenInstance.initialize( owner, name, symbol, address(this), additionalERC20Deployer, additionalMetaDataUpdater, tokenURI, transferable ), "ERC721DTFactory: Unable to initialize token instance" ); } /** * @dev get the current token count. * @return the current token count */ function getCurrentNFTCount() external view returns (uint256) { return currentNFTCount; } /** * @dev get the token template Object * @param _index template Index * @return the template struct */ function getNFTTemplate(uint256 _index) external view returns (Template memory) { Template memory template = nftTemplateList[_index]; return template; } /** * @dev add a new NFT Template. Only Factory Owner can call it * @param _templateAddress new template address * @return the actual template count */ function add721TokenTemplate(address _templateAddress) public onlyOwner returns (uint256) { require( _templateAddress != address(0), "ERC721DTFactory: ERC721 template address(0) NOT ALLOWED" ); require(_isContract(_templateAddress), "ERC721Factory: NOT CONTRACT"); nftTemplateCount += 1; Template memory template = Template(_templateAddress, true); nftTemplateList[nftTemplateCount] = template; emit Template721Added(_templateAddress,nftTemplateCount); return nftTemplateCount; } /** * @dev reactivate a disabled NFT Template. Only Factory Owner can call it * @param _index index we want to reactivate */ // function to activate a disabled token. function reactivate721TokenTemplate(uint256 _index) external onlyOwner { require( _index <= nftTemplateCount && _index != 0, "ERC721DTFactory: Template index doesnt exist" ); Template storage template = nftTemplateList[_index]; template.isActive = true; } /** * @dev disable an NFT Template. Only Factory Owner can call it * @param _index index we want to disable */ function disable721TokenTemplate(uint256 _index) external onlyOwner { require( _index <= nftTemplateCount && _index != 0, "ERC721DTFactory: Template index doesnt exist" ); Template storage template = nftTemplateList[_index]; template.isActive = false; } function getCurrentNFTTemplateCount() external view returns (uint256) { return nftTemplateCount; } /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function _isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } struct tokenStruct{ string[] strings; address[] addresses; uint256[] uints; bytes[] bytess; address owner; } /** * @dev Deploys new datatoken proxy contract. * This function is not called directly from here. It's called from the NFT contract. An NFT contract can deploy multiple ERC20 tokens. * @param _templateIndex ERC20Template index * @param strings refers to an array of strings * [0] = name * [1] = symbol * @param addresses refers to an array of addresses * [0] = minter account who can mint datatokens (can have multiple minters) * [1] = paymentCollector initial paymentCollector for this DT * [2] = publishing Market Address * [3] = publishing Market Fee Token * @param uints refers to an array of uints * [0] = cap_ the total ERC20 cap * [1] = publishing Market Fee Amount * @param bytess refers to an array of bytes, not in use now, left for future templates * @return token address of a new proxy datatoken contract */ function createToken( uint256 _templateIndex, string[] memory strings, address[] memory addresses, uint256[] memory uints, bytes[] memory bytess ) external returns (address token) { require( erc721List[msg.sender] == msg.sender, "ERC721Factory: ONLY ERC721 INSTANCE FROM ERC721FACTORY" ); token = _createToken(_templateIndex, strings, addresses, uints, bytess, msg.sender); } function _createToken( uint256 _templateIndex, string[] memory strings, address[] memory addresses, uint256[] memory uints, bytes[] memory bytess, address owner ) internal returns (address token) { require(uints[0] != 0, "ERC20Factory: zero cap is not allowed"); require( _templateIndex <= templateCount && _templateIndex != 0, "ERC20Factory: Template index doesnt exist" ); Template memory tokenTemplate = templateList[_templateIndex]; require( tokenTemplate.isActive, "ERC20Factory: ERC721Token Template disabled" ); token = deploy(tokenTemplate.templateAddress); erc20List[token] = true; require( token != address(0), "ERC721Factory: Failed to perform minimal deploy of a new token" ); emit TokenCreated(token, tokenTemplate.templateAddress, strings[0], strings[1], uints[0], owner); currentTokenCount += 1; tokenStruct memory tokenData = tokenStruct(strings,addresses,uints,bytess,owner); // tokenData.strings = strings; // tokenData.addresses = addresses; // tokenData.uints = uints; // tokenData.owner = owner; // tokenData.bytess = bytess; _createTokenStep2(token, tokenData); } function _createTokenStep2(address token, tokenStruct memory tokenData) internal { IERC20Template tokenInstance = IERC20Template(token); address[] memory factoryAddresses = new address[](3); factoryAddresses[0] = tokenData.owner; factoryAddresses[1] = router; require( tokenInstance.initialize( tokenData.strings, tokenData.addresses, factoryAddresses, tokenData.uints, tokenData.bytess ), "ERC20Factory: Unable to initialize token instance" ); } /** * @dev get the current ERC20token deployed count. * @return the current token count */ function getCurrentTokenCount() external view returns (uint256) { return currentTokenCount; } /** * @dev get the current ERC20token template. @param _index template Index * @return the token Template Object */ function getTokenTemplate(uint256 _index) external view returns (Template memory) { Template memory template = templateList[_index]; require( _index <= templateCount && _index != 0, "ERC20Factory: Template index doesnt exist" ); return template; } /** * @dev add a new ERC20Template. Only Factory Owner can call it * @param _templateAddress new template address * @return the actual template count */ function addTokenTemplate(address _templateAddress) public onlyOwner returns (uint256) { require( _templateAddress != address(0), "ERC20Factory: ERC721 template address(0) NOT ALLOWED" ); require(_isContract(_templateAddress), "ERC20Factory: NOT CONTRACT"); templateCount += 1; Template memory template = Template(_templateAddress, true); templateList[templateCount] = template; emit Template20Added(_templateAddress, templateCount); return templateCount; } /** * @dev disable an ERC20Template. Only Factory Owner can call it * @param _index index we want to disable */ function disableTokenTemplate(uint256 _index) external onlyOwner { Template storage template = templateList[_index]; template.isActive = false; } /** * @dev reactivate a disabled ERC20Template. Only Factory Owner can call it * @param _index index we want to reactivate */ // function to activate a disabled token. function reactivateTokenTemplate(uint256 _index) external onlyOwner { require( _index <= templateCount && _index != 0, "ERC20DTFactory: Template index doesnt exist" ); Template storage template = templateList[_index]; template.isActive = true; } // if templateCount is public we could remove it, or set templateCount to private function getCurrentTemplateCount() external view returns (uint256) { return templateCount; } struct tokenOrder { address tokenAddress; address consumer; uint256 serviceIndex; IERC20Template.providerFee _providerFee; IERC20Template.consumeMarketFee _consumeMarketFee; } /** * @dev startMultipleTokenOrder * Used as a proxy to order multiple services * Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract * Requires previous approval of all : * - consumeFeeTokens * - publishMarketFeeTokens * - erc20 datatokens * - providerFees * @param orders an array of struct tokenOrder */ function startMultipleTokenOrder( tokenOrder[] memory orders ) external nonReentrant { // TODO: to avoid DOS attack, we set a limit to maximum order (50 ?) require(orders.length <= 50, 'ERC721Factory: Too Many Orders'); // TO DO. We can do better here , by groupping publishMarketFeeTokens and consumeFeeTokens and have a single // transfer for each one, instead of doing it per dt.. for (uint256 i = 0; i < orders.length; i++) { (address publishMarketFeeAddress, address publishMarketFeeToken, uint256 publishMarketFeeAmount) = IERC20Template(orders[i].tokenAddress).getPublishingMarketFee(); // check if we have publishFees, if so transfer them to us and approve dttemplate to take them if (publishMarketFeeAmount > 0 && publishMarketFeeToken!=address(0) && publishMarketFeeAddress!=address(0)) { _pullUnderlying(publishMarketFeeToken,msg.sender, address(this), publishMarketFeeAmount); IERC20(publishMarketFeeToken).safeIncreaseAllowance(orders[i].tokenAddress, publishMarketFeeAmount); } // check if we have consumeMarketFee, if so transfer them to us and approve dttemplate to take them if (orders[i]._consumeMarketFee.consumeMarketFeeAmount > 0 && orders[i]._consumeMarketFee.consumeMarketFeeAddress!=address(0) && orders[i]._consumeMarketFee.consumeMarketFeeToken!=address(0)) { _pullUnderlying(orders[i]._consumeMarketFee.consumeMarketFeeToken,msg.sender, address(this), orders[i]._consumeMarketFee.consumeMarketFeeAmount); IERC20(orders[i]._consumeMarketFee.consumeMarketFeeToken) .safeIncreaseAllowance(orders[i].tokenAddress, orders[i]._consumeMarketFee.consumeMarketFeeAmount); } // handle provider fees if (orders[i]._providerFee.providerFeeAmount > 0 && orders[i]._providerFee.providerFeeToken!=address(0) && orders[i]._providerFee.providerFeeAddress!=address(0)) { _pullUnderlying(orders[i]._providerFee.providerFeeToken,msg.sender, address(this), orders[i]._providerFee.providerFeeAmount); IERC20(orders[i]._providerFee.providerFeeToken) .safeIncreaseAllowance(orders[i].tokenAddress, orders[i]._providerFee.providerFeeAmount); } // transfer erc20 datatoken from consumer to us _pullUnderlying(orders[i].tokenAddress,msg.sender, address(this), 1e18); IERC20Template(orders[i].tokenAddress).startOrder( orders[i].consumer, orders[i].serviceIndex, orders[i]._providerFee, orders[i]._consumeMarketFee ); } } struct reuseTokenOrder { address tokenAddress; bytes32 orderTxId; IERC20Template.providerFee _providerFee; } /** * @dev reuseMultipleTokenOrder * Used as a proxy to order multiple reuses * Users can have inifinite approvals for fees for factory instead of having one approval/ erc20 contract * Requires previous approval of all : * - consumeFeeTokens * - publishMarketFeeTokens * - erc20 datatokens * - providerFees * @param orders an array of struct tokenOrder */ function reuseMultipleTokenOrder( reuseTokenOrder[] memory orders ) external nonReentrant { // TODO: to avoid DOS attack, we set a limit to maximum order (50 ?) require(orders.length <= 50, 'ERC721Factory: Too Many Orders'); // TO DO. We can do better here , by groupping publishMarketFeeTokens and consumeFeeTokens and have a single // transfer for each one, instead of doing it per dt.. for (uint256 i = 0; i < orders.length; i++) { // handle provider fees if (orders[i]._providerFee.providerFeeAmount > 0 && orders[i]._providerFee.providerFeeToken!=address(0) && orders[i]._providerFee.providerFeeAddress!=address(0)) { _pullUnderlying(orders[i]._providerFee.providerFeeToken,msg.sender, address(this), orders[i]._providerFee.providerFeeAmount); IERC20(orders[i]._providerFee.providerFeeToken) .safeIncreaseAllowance(orders[i].tokenAddress, orders[i]._providerFee.providerFeeAmount); } IERC20Template(orders[i].tokenAddress).reuseOrder( orders[i].orderTxId, orders[i]._providerFee ); } } // helper functions to save number of transactions /** * @dev createNftWithErc20 * Creates a new NFT, then a ERC20,all in one call * @param _NftCreateData input data for nft creation * @param _ErcCreateData input data for erc20 creation */ function createNftWithErc20( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData ) external nonReentrant returns (address erc721Address, address erc20Address){ //we are adding ourselfs as a ERC20 Deployer, because we need it in order to deploy the pool erc721Address = deployERC721Contract( _NftCreateData.name, _NftCreateData.symbol, _NftCreateData.templateIndex, address(this), address(0), _NftCreateData.tokenURI, _NftCreateData.transferable, _NftCreateData.owner ); erc20Address = IERC721Template(erc721Address).createERC20( _ErcCreateData.templateIndex, _ErcCreateData.strings, _ErcCreateData.addresses, _ErcCreateData.uints, _ErcCreateData.bytess ); // remove our selfs from the erc20DeployerRole IERC721Template(erc721Address).removeFromCreateERC20List(address(this)); } /** * @dev createNftWithErc20WithPool * Creates a new NFT, then a ERC20, then a Pool, all in one call * Use this carefully, because if Pool creation fails, you are still going to pay a lot of gas * @param _NftCreateData input data for NFT Creation * @param _ErcCreateData input data for ERC20 Creation * @param _PoolData input data for Pool Creation */ function createNftWithErc20WithPool( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, PoolData calldata _PoolData ) external nonReentrant returns (address erc721Address, address erc20Address, address poolAddress){ _pullUnderlying(_PoolData.addresses[1],msg.sender, address(this), _PoolData.ssParams[4]); //we are adding ourselfs as a ERC20 Deployer, because we need it in order to deploy the pool erc721Address = deployERC721Contract( _NftCreateData.name, _NftCreateData.symbol, _NftCreateData.templateIndex, address(this), address(0), _NftCreateData.tokenURI, _NftCreateData.transferable, _NftCreateData.owner); erc20Address = IERC721Template(erc721Address).createERC20( _ErcCreateData.templateIndex, _ErcCreateData.strings, _ErcCreateData.addresses, _ErcCreateData.uints, _ErcCreateData.bytess ); // allow router to take the liquidity IERC20(_PoolData.addresses[1]).safeIncreaseAllowance(router,_PoolData.ssParams[4]); poolAddress = IERC20Template(erc20Address).deployPool( _PoolData.ssParams, _PoolData.swapFees, _PoolData.addresses ); // remove our selfs from the erc20DeployerRole IERC721Template(erc721Address).removeFromCreateERC20List(address(this)); } /** * @dev createNftWithErc20WithFixedRate * Creates a new NFT, then a ERC20, then a FixedRateExchange, all in one call * Use this carefully, because if Fixed Rate creation fails, you are still going to pay a lot of gas * @param _NftCreateData input data for NFT Creation * @param _ErcCreateData input data for ERC20 Creation * @param _FixedData input data for FixedRate Creation */ function createNftWithErc20WithFixedRate( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, FixedData calldata _FixedData ) external nonReentrant returns (address erc721Address, address erc20Address, bytes32 exchangeId){ //we are adding ourselfs as a ERC20 Deployer, because we need it in order to deploy the fixedrate erc721Address = deployERC721Contract( _NftCreateData.name, _NftCreateData.symbol, _NftCreateData.templateIndex, address(this), address(0), _NftCreateData.tokenURI, _NftCreateData.transferable, _NftCreateData.owner); erc20Address = IERC721Template(erc721Address).createERC20( _ErcCreateData.templateIndex, _ErcCreateData.strings, _ErcCreateData.addresses, _ErcCreateData.uints, _ErcCreateData.bytess ); exchangeId = IERC20Template(erc20Address).createFixedRate( _FixedData.fixedPriceAddress, _FixedData.addresses, _FixedData.uints ); // remove our selfs from the erc20DeployerRole IERC721Template(erc721Address).removeFromCreateERC20List(address(this)); } /** * @dev createNftWithErc20WithDispenser * Creates a new NFT, then a ERC20, then a Dispenser, all in one call * Use this carefully * @param _NftCreateData input data for NFT Creation * @param _ErcCreateData input data for ERC20 Creation * @param _DispenserData input data for Dispenser Creation */ function createNftWithErc20WithDispenser( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, DispenserData calldata _DispenserData ) external nonReentrant returns (address erc721Address, address erc20Address){ //we are adding ourselfs as a ERC20 Deployer, because we need it in order to deploy the fixedrate erc721Address = deployERC721Contract( _NftCreateData.name, _NftCreateData.symbol, _NftCreateData.templateIndex, address(this), address(0), _NftCreateData.tokenURI, _NftCreateData.transferable, _NftCreateData.owner); erc20Address = IERC721Template(erc721Address).createERC20( _ErcCreateData.templateIndex, _ErcCreateData.strings, _ErcCreateData.addresses, _ErcCreateData.uints, _ErcCreateData.bytess ); IERC20Template(erc20Address).createDispenser( _DispenserData.dispenserAddress, _DispenserData.maxTokens, _DispenserData.maxBalance, _DispenserData.withMint, _DispenserData.allowedSwapper ); // remove our selfs from the erc20DeployerRole IERC721Template(erc721Address).removeFromCreateERC20List(address(this)); } struct MetaData { uint8 _metaDataState; string _metaDataDecryptorUrl; string _metaDataDecryptorAddress; bytes flags; bytes data; bytes32 _metaDataHash; IERC721Template.metaDataProof[] _metadataProofs; } /** * @dev createNftWithMetaData * Creates a new NFT, then sets the metadata, all in one call * Use this carefully * @param _NftCreateData input data for NFT Creation * @param _MetaData input metadata */ function createNftWithMetaData( NftCreateData calldata _NftCreateData, MetaData calldata _MetaData ) external nonReentrant returns (address erc721Address){ //we are adding ourselfs as metadataDeployer , because we need it in order to set metadata erc721Address = deployERC721Contract( _NftCreateData.name, _NftCreateData.symbol, _NftCreateData.templateIndex, address(0), address(this), _NftCreateData.tokenURI, _NftCreateData.transferable, _NftCreateData.owner); // set metadata IERC721Template(erc721Address).setMetaData(_MetaData._metaDataState, _MetaData._metaDataDecryptorUrl , _MetaData._metaDataDecryptorAddress, _MetaData.flags, _MetaData.data,_MetaData._metaDataHash, _MetaData._metadataProofs); // remove our selfs from the metadataDeployer role IERC721Template(erc721Address).removeFromMetadataList(address(this)); } function _pullUnderlying( address erc20, address from, address to, uint256 amount ) internal { uint256 balanceBefore = IERC20(erc20).balanceOf(to); IERC20(erc20).safeTransferFrom(from, to, amount); require(IERC20(erc20).balanceOf(to) >= balanceBefore.add(amount), "Transfer amount is too low"); } }
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 /** * @title Deployer Contract * @author Ocean Protocol Team * * @dev Contract Deployer * This contract allowes factory contract * to deploy new contract instances using * the same library pattern in solidity. * the logic it self is deployed only once, but * executed in the context of the new storage * contract (new contract instance) */ contract Deployer { event InstanceDeployed(address instance); // /** // * @dev deploy // * deploy new contract instance // * @param _logic the logic contract address // * @return address of the new instance // */ function deploy( address _logic ) internal returns (address instance) { bytes20 targetBytes = bytes20(_logic); // solhint-disable-next-line max-line-length // Follows OpenZeppelin Implementation https://github.com/OpenZeppelin/openzeppelin-sdk/blob/71c9ad77e0326db079e6a643eca8568ab316d4a9/packages/lib/contracts/upgradeability/ProxyFactory.sol // solhint-disable-next-line max-line-length // Adapted from https://github.com/optionality/clone-factory/blob/32782f82dfc5a00d103a7e61a17a5dedbd1e8e9d/contracts/CloneFactory.sol /* solium-disable-next-line security/no-inline-assembly */ assembly { let clone := mload(0x40) mstore(clone, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(clone, 0x14), targetBytes) mstore(add(clone, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, clone, 0x37) } emit InstanceDeployed(address(instance)); } }
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 interface IFactory { function createToken( uint256 _templateIndex, string[] calldata strings, address[] calldata addresses, uint256[] calldata uints, bytes[] calldata bytess ) external returns (address token); function erc721List(address ERC721address) external returns (address); function erc20List(address erc20dt) external view returns(bool); struct NftCreateData{ string name; string symbol; uint256 templateIndex; string tokenURI; bool transferable; address owner; } struct ErcCreateData{ uint256 templateIndex; string[] strings; address[] addresses; uint256[] uints; bytes[] bytess; } struct PoolData{ uint256[] ssParams; uint256[] swapFees; address[] addresses; } struct FixedData{ address fixedPriceAddress; address[] addresses; uint256[] uints; } struct DispenserData{ address dispenserAddress; uint256 maxTokens; uint256 maxBalance; bool withMint; address allowedSwapper; } function createNftWithErc20( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData ) external returns (address , address); function createNftWithErc20WithPool( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, PoolData calldata _PoolData ) external returns (address, address , address); function createNftWithErc20WithFixedRate( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, FixedData calldata _FixedData ) external returns (address, address , bytes32 ); function createNftWithErc20WithDispenser( NftCreateData calldata _NftCreateData, ErcCreateData calldata _ErcCreateData, DispenserData calldata _DispenserData ) external returns (address, address); }
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Template { enum RolesType { Manager, DeployERC20, UpdateMetadata, Store } /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); event MetadataCreated( address indexed createdBy, uint8 state, string decryptorUrl, bytes flags, bytes data, string metaDataDecryptorAddress, uint256 timestamp, uint256 blockNumber ); event MetadataUpdated( address indexed updatedBy, uint8 state, string decryptorUrl, bytes flags, bytes data, string metaDataDecryptorAddress, uint256 timestamp, uint256 blockNumber ); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); function name() external view returns (string memory); function symbol() external view returns (string memory); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); function isERC20Deployer(address acount) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, * it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, * it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, * it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ // function safeTransferFrom( // address from, // address to, // uint256 tokenId, // bytes calldata data // ) external; function transferFrom(address from, address to) external; function initialize( address admin, string calldata name, string calldata symbol, address erc20Factory, address additionalERC20Deployer, address additionalMetaDataUpdater, string calldata tokenURI, bool transferable ) external returns (bool); struct Roles { bool manager; bool deployERC20; bool updateMetadata; bool store; } struct metaDataProof { address validatorAddress; uint8 v; // v of validator signed message bytes32 r; // r of validator signed message bytes32 s; // s of validator signed message } function getPermissions(address user) external view returns (Roles memory); function setDataERC20(bytes32 _key, bytes calldata _value) external; function setMetaData(uint8 _metaDataState, string calldata _metaDataDecryptorUrl , string calldata _metaDataDecryptorAddress, bytes calldata flags, bytes calldata data,bytes32 _metaDataHash, metaDataProof[] memory _metadataProofs) external; function getMetaData() external view returns (string memory, string memory, uint8, bool); function createERC20( uint256 _templateIndex, string[] calldata strings, address[] calldata addresses, uint256[] calldata uints, bytes[] calldata bytess ) external returns (address); function removeFromCreateERC20List(address _allowedAddress) external; function addToCreateERC20List(address _allowedAddress) external; function addToMetadataList(address _allowedAddress) external; function removeFromMetadataList(address _allowedAddress) external; function getId() pure external returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev 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. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 interface IERC20Template { struct RolesERC20 { bool minter; bool feeManager; } struct providerFee{ address providerFeeAddress; address providerFeeToken; // address of the token marketplace wants to add fee on top uint256 providerFeeAmount; // amount to be transfered to marketFeeCollector uint8 v; // v of provider signed message bytes32 r; // r of provider signed message bytes32 s; // s of provider signed message uint256 validUntil; //validity expresses in unix timestamp bytes providerData; //data encoded by provider } struct consumeMarketFee{ address consumeMarketFeeAddress; address consumeMarketFeeToken; // address of the token marketplace wants to add fee on top uint256 consumeMarketFeeAmount; // amount to be transfered to marketFeeCollector } function initialize( string[] calldata strings_, address[] calldata addresses_, address[] calldata factoryAddresses_, uint256[] calldata uints_, bytes[] calldata bytes_ ) external returns (bool); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function cap() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function mint(address account, uint256 value) external; function isMinter(address account) external view returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permissions(address user) external view returns (RolesERC20 memory); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; function cleanFrom721() external; function deployPool( uint256[] memory ssParams, uint256[] memory swapFees, address[] memory addresses ) external returns (address); function createFixedRate( address fixedPriceAddress, address[] memory addresses, uint[] memory uints ) external returns (bytes32); function createDispenser( address _dispenser, uint256 maxTokens, uint256 maxBalance, bool withMint, address allowedSwapper) external; function getPublishingMarketFee() external view returns (address , address, uint256); function setPublishingMarketFee( address _publishMarketFeeAddress, address _publishMarketFeeToken, uint256 _publishMarketFeeAmount ) external; function startOrder( address consumer, uint256 serviceIndex, providerFee calldata _providerFee, consumeMarketFee calldata _consumeMarketFee ) external; function reuseOrder( bytes32 orderTxId, providerFee calldata _providerFee ) external; function burn(uint256 amount) external; function burnFrom(address account, uint256 amount) external; function getERC721Address() external view returns (address); function isERC20Deployer(address user) external view returns(bool); function getPools() external view returns(address[] memory); struct fixedRate{ address contractAddress; bytes32 id; } function getFixedRates() external view returns(fixedRate[] memory); function getDispensers() external view returns(address[] memory); function getId() pure external returns (uint8); function getPaymentCollector() external view returns (address); }
pragma solidity 0.8.12; // Copyright BigchainDB GmbH and Ocean Protocol contributors // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) // Code is Apache-2.0 and docs are CC-BY-4.0 /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { function decimals() external view returns (uint8); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; import "../interfaces/IERC20.sol"; import "./ERC721/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
pragma solidity 0.8.12; // SPDX-License-Identifier: (Apache-2.0 AND CC-BY-4.0) /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File @openzeppelin/contracts/utils/[email protected]
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_template721","type":"address"},{"internalType":"address","name":"_template","type":"address"},{"internalType":"address","name":"_router","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"datatokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxTokens","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxBalance","type":"uint256"},{"indexed":false,"internalType":"address","name":"allowedSwapper","type":"address"}],"name":"DispenserCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"instance","type":"address"}],"name":"InstanceDeployed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newTokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"templateAddress","type":"address"},{"indexed":false,"internalType":"string","name":"tokenName","type":"string"},{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"string","name":"tokenURI","type":"string"},{"indexed":false,"internalType":"bool","name":"transferable","type":"bool"},{"indexed":true,"internalType":"address","name":"creator","type":"address"}],"name":"NFTCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"dispenserContract","type":"address"}],"name":"NewDispenser","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"exchangeId","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"exchangeContract","type":"address"},{"indexed":true,"internalType":"address","name":"baseToken","type":"address"}],"name":"NewFixedRate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"poolAddress","type":"address"},{"indexed":false,"internalType":"address","name":"ssContract","type":"address"},{"indexed":false,"internalType":"address","name":"baseTokenAddress","type":"address"}],"name":"NewPool","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_templateAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftTemplateCount","type":"uint256"}],"name":"Template20Added","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_templateAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"nftTemplateCount","type":"uint256"}],"name":"Template721Added","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newTokenAddress","type":"address"},{"indexed":true,"internalType":"address","name":"templateAddress","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"},{"indexed":false,"internalType":"uint256","name":"cap","type":"uint256"},{"indexed":false,"internalType":"address","name":"creator","type":"address"}],"name":"TokenCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_templateAddress","type":"address"}],"name":"add721TokenTemplate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_templateAddress","type":"address"}],"name":"addTokenTemplate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct IFactory.NftCreateData","name":"_NftCreateData","type":"tuple"},{"components":[{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string[]","name":"strings","type":"string[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"},{"internalType":"bytes[]","name":"bytess","type":"bytes[]"}],"internalType":"struct IFactory.ErcCreateData","name":"_ErcCreateData","type":"tuple"}],"name":"createNftWithErc20","outputs":[{"internalType":"address","name":"erc721Address","type":"address"},{"internalType":"address","name":"erc20Address","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct IFactory.NftCreateData","name":"_NftCreateData","type":"tuple"},{"components":[{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string[]","name":"strings","type":"string[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"},{"internalType":"bytes[]","name":"bytess","type":"bytes[]"}],"internalType":"struct IFactory.ErcCreateData","name":"_ErcCreateData","type":"tuple"},{"components":[{"internalType":"address","name":"dispenserAddress","type":"address"},{"internalType":"uint256","name":"maxTokens","type":"uint256"},{"internalType":"uint256","name":"maxBalance","type":"uint256"},{"internalType":"bool","name":"withMint","type":"bool"},{"internalType":"address","name":"allowedSwapper","type":"address"}],"internalType":"struct IFactory.DispenserData","name":"_DispenserData","type":"tuple"}],"name":"createNftWithErc20WithDispenser","outputs":[{"internalType":"address","name":"erc721Address","type":"address"},{"internalType":"address","name":"erc20Address","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct IFactory.NftCreateData","name":"_NftCreateData","type":"tuple"},{"components":[{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string[]","name":"strings","type":"string[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"},{"internalType":"bytes[]","name":"bytess","type":"bytes[]"}],"internalType":"struct IFactory.ErcCreateData","name":"_ErcCreateData","type":"tuple"},{"components":[{"internalType":"address","name":"fixedPriceAddress","type":"address"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"}],"internalType":"struct IFactory.FixedData","name":"_FixedData","type":"tuple"}],"name":"createNftWithErc20WithFixedRate","outputs":[{"internalType":"address","name":"erc721Address","type":"address"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"bytes32","name":"exchangeId","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct IFactory.NftCreateData","name":"_NftCreateData","type":"tuple"},{"components":[{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string[]","name":"strings","type":"string[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"},{"internalType":"bytes[]","name":"bytess","type":"bytes[]"}],"internalType":"struct IFactory.ErcCreateData","name":"_ErcCreateData","type":"tuple"},{"components":[{"internalType":"uint256[]","name":"ssParams","type":"uint256[]"},{"internalType":"uint256[]","name":"swapFees","type":"uint256[]"},{"internalType":"address[]","name":"addresses","type":"address[]"}],"internalType":"struct IFactory.PoolData","name":"_PoolData","type":"tuple"}],"name":"createNftWithErc20WithPool","outputs":[{"internalType":"address","name":"erc721Address","type":"address"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"address","name":"poolAddress","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"templateIndex","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"internalType":"struct IFactory.NftCreateData","name":"_NftCreateData","type":"tuple"},{"components":[{"internalType":"uint8","name":"_metaDataState","type":"uint8"},{"internalType":"string","name":"_metaDataDecryptorUrl","type":"string"},{"internalType":"string","name":"_metaDataDecryptorAddress","type":"string"},{"internalType":"bytes","name":"flags","type":"bytes"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"bytes32","name":"_metaDataHash","type":"bytes32"},{"components":[{"internalType":"address","name":"validatorAddress","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct IERC721Template.metaDataProof[]","name":"_metadataProofs","type":"tuple[]"}],"internalType":"struct ERC721Factory.MetaData","name":"_MetaData","type":"tuple"}],"name":"createNftWithMetaData","outputs":[{"internalType":"address","name":"erc721Address","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_templateIndex","type":"uint256"},{"internalType":"string[]","name":"strings","type":"string[]"},{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"uints","type":"uint256[]"},{"internalType":"bytes[]","name":"bytess","type":"bytes[]"}],"name":"createToken","outputs":[{"internalType":"address","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint256","name":"_templateIndex","type":"uint256"},{"internalType":"address","name":"additionalERC20Deployer","type":"address"},{"internalType":"address","name":"additionalMetaDataUpdater","type":"address"},{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"bool","name":"transferable","type":"bool"},{"internalType":"address","name":"owner","type":"address"}],"name":"deployERC721Contract","outputs":[{"internalType":"address","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"disable721TokenTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"disableTokenTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"erc20List","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"erc721List","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentNFTCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentNFTTemplateCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTemplateCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getNFTTemplate","outputs":[{"components":[{"internalType":"address","name":"templateAddress","type":"address"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct ERC721Factory.Template","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"getTokenTemplate","outputs":[{"components":[{"internalType":"address","name":"templateAddress","type":"address"},{"internalType":"bool","name":"isActive","type":"bool"}],"internalType":"struct ERC721Factory.Template","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nftTemplateList","outputs":[{"internalType":"address","name":"templateAddress","type":"address"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"reactivate721TokenTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"reactivateTokenTemplate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"bytes32","name":"orderTxId","type":"bytes32"},{"components":[{"internalType":"address","name":"providerFeeAddress","type":"address"},{"internalType":"address","name":"providerFeeToken","type":"address"},{"internalType":"uint256","name":"providerFeeAmount","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"validUntil","type":"uint256"},{"internalType":"bytes","name":"providerData","type":"bytes"}],"internalType":"struct IERC20Template.providerFee","name":"_providerFee","type":"tuple"}],"internalType":"struct ERC721Factory.reuseTokenOrder[]","name":"orders","type":"tuple[]"}],"name":"reuseMultipleTokenOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"address","name":"consumer","type":"address"},{"internalType":"uint256","name":"serviceIndex","type":"uint256"},{"components":[{"internalType":"address","name":"providerFeeAddress","type":"address"},{"internalType":"address","name":"providerFeeToken","type":"address"},{"internalType":"uint256","name":"providerFeeAmount","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"validUntil","type":"uint256"},{"internalType":"bytes","name":"providerData","type":"bytes"}],"internalType":"struct IERC20Template.providerFee","name":"_providerFee","type":"tuple"},{"components":[{"internalType":"address","name":"consumeMarketFeeAddress","type":"address"},{"internalType":"address","name":"consumeMarketFeeToken","type":"address"},{"internalType":"uint256","name":"consumeMarketFeeAmount","type":"uint256"}],"internalType":"struct IERC20Template.consumeMarketFee","name":"_consumeMarketFee","type":"tuple"}],"internalType":"struct ERC721Factory.tokenOrder[]","name":"orders","type":"tuple[]"}],"name":"startMultipleTokenOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"templateCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"templateList","outputs":[{"internalType":"address","name":"templateAddress","type":"address"},{"internalType":"bool","name":"isActive","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260006009553480156200001657600080fd5b506040516200496038038062004960833981016040819052620000399162000517565b62000044336200012a565b600180556001600160a01b038216158015906200006957506001600160a01b03811615155b80156200007e57506001600160a01b03831615155b620000e95760405162461bcd60e51b815260206004820152603060248201527f4552433732314454466163746f72793a20496e76616c69642074656d706c617460448201526f652f726f75746572206164647265737360801b60648201526084015b60405180910390fd5b620000f4836200017a565b5062000100826200033d565b50600b80546001600160a01b0319166001600160a01b039290921691909117905550620005889050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080546001600160a01b03163314620001c65760405162461bcd60e51b81526020600482018190526024820152600080516020620049408339815191526044820152606401620000e0565b6001600160a01b038216620002445760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f5745440000000000000000006064820152608401620000e0565b813b620002945760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e545241435400000000006044820152606401620000e0565b600160046000828254620002a9919062000561565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260048054600090815260059092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a350506004545b919050565b600080546001600160a01b03163314620003895760405162461bcd60e51b81526020600482018190526024820152600080516020620049408339815191526044820152606401620000e0565b6001600160a01b038216620004075760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c61746520616460448201527f6472657373283029204e4f5420414c4c4f5745440000000000000000000000006064820152608401620000e0565b813b620004575760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e54524143540000000000006044820152606401620000e0565b6001600a60008282546200046c919062000561565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600a8054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600a54919050565b80516001600160a01b03811681146200033857600080fd5b6000806000606084860312156200052d57600080fd5b6200053884620004ff565b92506200054860208501620004ff565b91506200055860408501620004ff565b90509250925092565b600082198211156200058357634e487b7160e01b600052601160045260246000fd5b500190565b6143a880620005986000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806382c4420411610104578063aa897ddc116100a2578063e5fc01f011610071578063e5fc01f01461053b578063f2fde38b14610543578063f86b2bcf14610556578063f887ea401461056957600080fd5b8063aa897ddc146104b4578063bbf8d71f146104e7578063c6cf868a146104fa578063d282aa861461050257600080fd5b806394051699116100de578063940516991461045157806394be0e881461048657806395c6030514610499578063a33ef2a6146104a157600080fd5b806382c44204146103d95780638da5cb5b1461042d5780638f6051af1461043e57600080fd5b80633315efd11161017c578063715018a61161014b578063715018a61461038257806372f670f01461038a5780637b20bccf146103b3578063809d8105146103c657600080fd5b80633315efd1146102cd57806350447fd51461032a578063557fcfb0146103675780635c7059821461037a57600080fd5b80632515422e116101b85780632515422e1461026557806326705c3c1461027857806326f200661461028f5780633147c798146102ba57600080fd5b8063042ab9b3146101df5780630ffda8871461021d578063226e761514610232575b600080fd5b6101f26101ed366004612f0b565b61057c565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61023061022b366004612f0b565b610603565b005b610255610240366004612f44565b60086020526000908152604090205460ff1681565b6040519015158152602001610214565b61023061027336600461315a565b610648565b610281600a5481565b604051908152602001610214565b6102a261029d366004613278565b610915565b6040516001600160a01b039091168152602001610214565b6102a26102c83660046132fb565b610b4d565b6101f26102db366004612f0b565b6040805180820190915260008082526020820152506000908152600560209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b61033d6103383660046133f3565b610ec6565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610214565b6102a26103753660046135c3565b61126d565b600254610281565b61023061130e565b6102a2610398366004612f44565b6007602052600090815260409020546001600160a01b031681565b6102816103c1366004612f44565b611344565b6102306103d4366004612f0b565b6114d7565b61040e6103e7366004612f0b565b6005602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b039093168352901515602083015201610214565b6000546001600160a01b03166102a2565b61028161044c366004612f44565b611549565b61040e61045f366004612f0b565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b6102306104943660046136eb565b6116e4565b600a54610281565b6102306104af366004612f0b565b611c89565b6104c76104c236600461383d565b611d01565b604080516001600160a01b03938416815292909116602083015201610214565b6102306104f5366004612f0b565b611fee565b600954610281565b6105156105103660046133f3565b6120aa565b604080516001600160a01b03948516815293909216602084015290820152606001610214565b600454610281565b610230610551366004612f44565b61222d565b6104c76105643660046138b1565b6122c8565b600b546102a2906001600160a01b031681565b60408051808201909152600080825260208201526000828152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600a5483118015906105d857508215155b6105fd5760405162461bcd60e51b81526004016105f490613914565b60405180910390fd5b92915050565b6000546001600160a01b0316331461062d5760405162461bcd60e51b81526004016105f49061395d565b6000908152600660205260409020805460ff60a01b19169055565b6002600154141561066b5760405162461bcd60e51b81526004016105f490613992565b60026001558051603210156106c25760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105f4565b60005b815181101561090d5760008282815181106106e2576106e26139c9565b60200260200101516040015160400151118015610733575060006001600160a01b0316828281518110610717576107176139c9565b602002602001015160400151602001516001600160a01b031614155b8015610773575060006001600160a01b0316828281518110610757576107576139c9565b602002602001015160400151600001516001600160a01b031614155b15610843576107c682828151811061078d5761078d6139c9565b6020026020010151604001516020015133308585815181106107b1576107b16139c9565b602002602001015160400151604001516124f7565b6108438282815181106107db576107db6139c9565b6020026020010151600001518383815181106107f9576107f96139c9565b6020026020010151604001516040015184848151811061081b5761081b6139c9565b602002602001015160400151602001516001600160a01b03166126459092919063ffffffff16565b818181518110610855576108556139c9565b6020026020010151600001516001600160a01b031663361fef49838381518110610881576108816139c9565b60200260200101516020015184848151811061089f5761089f6139c9565b6020026020010151604001516040518363ffffffff1660e01b81526004016108c8929190613aab565b600060405180830381600087803b1580156108e257600080fd5b505af11580156108f6573d6000803e3d6000fd5b50505050808061090590613ada565b9150506106c5565b505060018055565b60006002600154141561093a5760405162461bcd60e51b81526004016105f490613992565b6002600155610a2c61094c8480613af5565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061098e925050506020860186613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408a0135935091503090506109d760608a018a613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a1c9250505060a08b0160808c01613b42565b6102c860c08c0160a08d01612f44565b90506001600160a01b038116631aa3adf9610a4a6020850185613b5f565b610a576020860186613af5565b610a646040880188613af5565b610a7160608a018a613af5565b610a7e60808c018c613af5565b60a08d0135610a9060c08f018f613b7a565b6040518d63ffffffff1660e01b8152600401610ab79c9b9a99989796959493929190613bec565b600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b50506040516310c414eb60e21b81523060048201526001600160a01b038416925063431053ac9150602401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b50506001805550909392505050565b60006004548711158015610b6057508615155b610b7c5760405162461bcd60e51b81526004016105f490613cd0565b6000878152600560209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610c185760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105f4565b6001600160a01b038316610c825760405162461bcd60e51b815260206004820152602b60248201527f4552433732314454466163746f72793a20616464726573732830292063616e6e60448201526a37ba1031329037bbb732b960a91b60648201526084016105f4565b8051610c8d90612730565b91506001600160a01b038216610d0d576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105f4565b8160076000846001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550336001600160a01b0316836001600160a01b031682600001516001600160a01b03167f8125264ec1d174cb383ea0646ea1e6921ca3b0aba20370c8e18389e7c2d6a571858e8e8b8b604051610db0959493929190613d1c565b60405180910390a4600160026000828254610dcb9190613d7b565b9091555050604051630343aa3d60e31b815282906001600160a01b03821690631a1d51e890610e0c9087908f908f9030908f908f908f908f90600401613d93565b6020604051808303816000875af1158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190613e11565b610eb85760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105f4565b505098975050505050505050565b600080600060026001541415610eee5760405162461bcd60e51b81526004016105f490613992565b6002600155610f52610f036040860186613e2e565b6001818110610f1457610f146139c9565b9050602002016020810190610f299190612f44565b3330610f358880613e2e565b6004818110610f4657610f466139c9565b905060200201356124f7565b611042610f5f8780613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fa1925050506020890189613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408d013593503092509050610fea60608d018d613af5565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061102f9250505060a08e0160808f01613b42565b8d60a00160208101906102c89190612f44565b92506001600160a01b03831663e38d7cad86356110626020890189613e2e565b61106f60408b018b613e2e565b61107c60608d018d613e2e565b61108960808f018f613e2e565b6040518a63ffffffff1660e01b81526004016110ad99989796959493929190613f98565b6020604051808303816000875af11580156110cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f09190614049565b600b5490925061116b906001600160a01b031661110d8680613e2e565b600481811061111e5761111e6139c9565b905060200201358680604001906111359190613e2e565b6001818110611146576111466139c9565b905060200201602081019061115b9190612f44565b6001600160a01b03169190612645565b6001600160a01b038216635bfe4da06111848680613e2e565b6111916020890189613e2e565b61119e60408b018b613e2e565b6040518763ffffffff1660e01b81526004016111bf96959493929190614066565b6020604051808303816000875af11580156111de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112029190614049565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0384169063fe1ec88090602401600060405180830381600087803b15801561124657600080fd5b505af115801561125a573d6000803e3d6000fd5b5050600180555092969195509350915050565b3360008181526007602052604081205490916001600160a01b03909116146112f65760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105f4565b6113048686868686336127c0565b9695505050505050565b6000546001600160a01b031633146113385760405162461bcd60e51b81526004016105f49061395d565b6113426000612aa5565b565b600080546001600160a01b0316331461136f5760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0382166113e25760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105f4565b813b6114305760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105f4565b6001600a60008282546114439190613d7b565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600a8054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600a545b919050565b6000546001600160a01b031633146115015760405162461bcd60e51b81526004016105f49061395d565b600454811115801561151257508015155b61152e5760405162461bcd60e51b81526004016105f490613cd0565b6000908152600560205260409020805460ff60a01b19169055565b600080546001600160a01b031633146115745760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0382166115f05760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105f4565b813b61163e5760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105f4565b6001600460008282546116519190613d7b565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260048054600090815260059092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600454919050565b600260015414156117075760405162461bcd60e51b81526004016105f490613992565b600260015580516032101561175e5760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105f4565b60005b815181101561090d576000806000848481518110611781576117816139c9565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa1580156117ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ee91906140af565b92509250925060008111801561180c57506001600160a01b03821615155b801561182057506001600160a01b03831615155b1561186357611831823330846124f7565b611863858581518110611846576118466139c9565b6020908102919091010151516001600160a01b0384169083612645565b6000858581518110611877576118776139c9565b602002602001015160800151604001511180156118c8575060006001600160a01b03168585815181106118ac576118ac6139c9565b602002602001015160800151600001516001600160a01b031614155b8015611908575060006001600160a01b03168585815181106118ec576118ec6139c9565b602002602001015160800151602001516001600160a01b031614155b156119d85761195b858581518110611922576119226139c9565b602002602001015160800151602001513330888881518110611946576119466139c9565b602002602001015160800151604001516124f7565b6119d8858581518110611970576119706139c9565b60200260200101516000015186868151811061198e5761198e6139c9565b602002602001015160800151604001518787815181106119b0576119b06139c9565b602002602001015160800151602001516001600160a01b03166126459092919063ffffffff16565b60008585815181106119ec576119ec6139c9565b60200260200101516060015160400151118015611a3d575060006001600160a01b0316858581518110611a2157611a216139c9565b602002602001015160600151602001516001600160a01b031614155b8015611a7d575060006001600160a01b0316858581518110611a6157611a616139c9565b602002602001015160600151600001516001600160a01b031614155b15611b4d57611ad0858581518110611a9757611a976139c9565b602002602001015160600151602001513330888881518110611abb57611abb6139c9565b602002602001015160600151604001516124f7565b611b4d858581518110611ae557611ae56139c9565b602002602001015160000151868681518110611b0357611b036139c9565b60200260200101516060015160400151878781518110611b2557611b256139c9565b602002602001015160600151602001516001600160a01b03166126459092919063ffffffff16565b611b7e858581518110611b6257611b626139c9565b6020026020010151600001513330670de0b6b3a76400006124f7565b848481518110611b9057611b906139c9565b6020026020010151600001516001600160a01b03166379d9d7f3868681518110611bbc57611bbc6139c9565b602002602001015160200151878781518110611bda57611bda6139c9565b602002602001015160400151888881518110611bf857611bf86139c9565b602002602001015160600151898981518110611c1657611c166139c9565b6020026020010151608001516040518563ffffffff1660e01b8152600401611c4194939291906140f2565b600060405180830381600087803b158015611c5b57600080fd5b505af1158015611c6f573d6000803e3d6000fd5b505050505050508080611c8190613ada565b915050611761565b6000546001600160a01b03163314611cb35760405162461bcd60e51b81526004016105f49061395d565b6004548111158015611cc457508015155b611ce05760405162461bcd60e51b81526004016105f490613cd0565b6000908152600560205260409020805460ff60a01b1916600160a01b179055565b60008060026001541415611d275760405162461bcd60e51b81526004016105f490613992565b6002600155611e19611d398680613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d7b925050506020880188613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408c013593503092509050611dc460608c018c613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e099250505060a08d0160808e01613b42565b6102c860c08e0160a08f01612f44565b91506001600160a01b03821663e38d7cad8535611e396020880188613e2e565b611e4660408a018a613e2e565b611e5360608c018c613e2e565b611e6060808e018e613e2e565b6040518a63ffffffff1660e01b8152600401611e8499989796959493929190613f98565b6020604051808303816000875af1158015611ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec79190614049565b90506001600160a01b03811663191c918a611ee56020860186612f44565b60208601356040870135611eff6080890160608a01613b42565b611f0f60a08a0160808b01612f44565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611f6f57600080fd5b505af1158015611f83573d6000803e3d6000fd5b50506040516301fc3d9160e71b81523060048201526001600160a01b038516925063fe1ec8809150602401600060405180830381600087803b158015611fc857600080fd5b505af1158015611fdc573d6000803e3d6000fd5b50506001805550919590945092505050565b6000546001600160a01b031633146120185760405162461bcd60e51b81526004016105f49061395d565b600a54811115801561202957508015155b6120895760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105f4565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156120d25760405162461bcd60e51b81526004016105f490613992565b60026001556120e4610f5f8780613af5565b92506001600160a01b03831663e38d7cad86356121046020890189613e2e565b61211160408b018b613e2e565b61211e60608d018d613e2e565b61212b60808f018f613e2e565b6040518a63ffffffff1660e01b815260040161214f99989796959493929190613f98565b6020604051808303816000875af115801561216e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121929190614049565b91506001600160a01b038216638b96412b6121b06020870187612f44565b6121bd6020880188613e2e565b6121ca60408a018a613e2e565b6040518663ffffffff1660e01b81526004016121ea959493929190614145565b6020604051808303816000875af1158015612209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112029190614189565b6000546001600160a01b031633146122575760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0381166122bc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b6122c581612aa5565b50565b600080600260015414156122ee5760405162461bcd60e51b81526004016105f490613992565b60026001556123e06123008580613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612342925050506020870187613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408b01359350309250905061238b60608b018b613af5565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123d09250505060a08c0160808d01613b42565b6102c860c08d0160a08e01612f44565b91506001600160a01b03821663e38d7cad84356124006020870187613e2e565b61240d6040890189613e2e565b61241a60608b018b613e2e565b61242760808d018d613e2e565b6040518a63ffffffff1660e01b815260040161244b99989796959493929190613f98565b6020604051808303816000875af115801561246a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248e9190614049565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0383169063fe1ec88090602401600060405180830381600087803b1580156124d257600080fd5b505af11580156124e6573d6000803e3d6000fd5b505060018055509194909350915050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908616906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614189565b905061257c6001600160a01b038616858585612af5565b6125868183612b2d565b6040516370a0823160e01b81526001600160a01b0385811660048301528716906370a0823190602401602060405180830381865afa1580156125cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f09190614189565b101561263e5760405162461bcd60e51b815260206004820152601a60248201527f5472616e7366657220616d6f756e7420697320746f6f206c6f7700000000000060448201526064016105f4565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015612696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ba9190614189565b6126c49190613d7b565b6040516001600160a01b03851660248201526044810182905290915061272a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b40565b50505050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b6000836000815181106127d5576127d56139c9565b60200260200101516000141561283b5760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105f4565b600a54871115801561284c57508615155b6128685760405162461bcd60e51b81526004016105f490613914565b6000878152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082018190526129015760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105f4565b805161290c90612730565b6001600160a01b0381166000818152600860205260409020805460ff191660011790559092506129a45760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105f4565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b90896000815181106129f0576129f06139c9565b60200260200101518a600181518110612a0b57612a0b6139c9565b602002602001015189600081518110612a2657612a266139c9565b602002602001015188604051612a3f94939291906141a2565b60405180910390a3600160096000828254612a5a9190613d7b565b90915550506040805160a08101825288815260208101889052908101869052606081018590526001600160a01b0384166080820152612a998382612c17565b50509695505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261272a9085906323b872dd60e01b906084016126f3565b6000612b398284613d7b565b9392505050565b6000612b95826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d939092919063ffffffff16565b805190915015612c125780806020019051810190612bb39190613e11565b612c125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f4565b505050565b6040805160038082526080820190925283916000919060208201606080368337019050509050826080015181600081518110612c5557612c556139c9565b6001600160a01b039283166020918202929092010152600b54825191169082906001908110612c8657612c866139c9565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b8152600401612cea95949392919061429a565b6020604051808303816000875af1158015612d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2d9190613e11565b61272a5760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105f4565b6060612da28484600085612daa565b949350505050565b606082471015612e0b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f4565b843b612e595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f4565b600080866001600160a01b03168587604051612e759190614343565b60006040518083038185875af1925050503d8060008114612eb2576040519150601f19603f3d011682016040523d82523d6000602084013e612eb7565b606091505b5091509150612ec7828286612ed2565b979650505050505050565b60608315612ee1575081612b39565b825115612ef15782518084602001fd5b8160405162461bcd60e51b81526004016105f4919061435f565b600060208284031215612f1d57600080fd5b5035919050565b6001600160a01b03811681146122c557600080fd5b80356114d281612f24565b600060208284031215612f5657600080fd5b8135612b3981612f24565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715612f9a57612f9a612f61565b60405290565b604051606081016001600160401b0381118282101715612f9a57612f9a612f61565b60405160a081016001600160401b0381118282101715612f9a57612f9a612f61565b604051601f8201601f191681016001600160401b038111828210171561300c5761300c612f61565b604052919050565b60006001600160401b0382111561302d5761302d612f61565b5060051b60200190565b803560ff811681146114d257600080fd5b600082601f83011261305957600080fd5b81356001600160401b0381111561307257613072612f61565b613085601f8201601f1916602001612fe4565b81815284602083860101111561309a57600080fd5b816020850160208301376000918101602001919091529392505050565b600061010082840312156130ca57600080fd5b6130d2612f77565b90506130dd82612f39565b81526130eb60208301612f39565b60208201526040820135604082015261310660608301613037565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e08201356001600160401b0381111561314257600080fd5b61314e84828501613048565b60e08301525092915050565b6000602080838503121561316d57600080fd5b82356001600160401b038082111561318457600080fd5b818501915085601f83011261319857600080fd5b81356131ab6131a682613014565b612fe4565b81815260059190911b830184019084810190888311156131ca57600080fd5b8585015b83811015613253578035858111156131e65760008081fd5b86016060818c03601f19018113156131fe5760008081fd5b613206612fa0565b8983013561321381612f24565b81526040838101358b8301529183013591888311156132325760008081fd5b6132408e8c858701016130b7565b90820152855250509186019186016131ce565b5098975050505050505050565b600060c0828403121561327257600080fd5b50919050565b6000806040838503121561328b57600080fd5b82356001600160401b03808211156132a257600080fd5b6132ae86838701613260565b935060208501359150808211156132c457600080fd5b50830160e081860312156132d757600080fd5b809150509250929050565b80151581146122c557600080fd5b80356114d2816132e2565b600080600080600080600080610100898b03121561331857600080fd5b88356001600160401b038082111561332f57600080fd5b61333b8c838d01613048565b995060208b013591508082111561335157600080fd5b61335d8c838d01613048565b985060408b0135975061337260608c01612f39565b965061338060808c01612f39565b955060a08b013591508082111561339657600080fd5b506133a38b828c01613048565b9350506133b260c08a016132f0565b91506133c060e08a01612f39565b90509295985092959890939650565b600060a0828403121561327257600080fd5b60006060828403121561327257600080fd5b60008060006060848603121561340857600080fd5b83356001600160401b038082111561341f57600080fd5b61342b87838801613260565b9450602086013591508082111561344157600080fd5b61344d878388016133cf565b9350604086013591508082111561346357600080fd5b50613470868287016133e1565b9150509250925092565b600082601f83011261348b57600080fd5b8135602061349b6131a683613014565b82815260059290921b840181019181810190868411156134ba57600080fd5b8286015b848110156134de5780356134d181612f24565b83529183019183016134be565b509695505050505050565b600082601f8301126134fa57600080fd5b8135602061350a6131a683613014565b82815260059290921b8401810191818101908684111561352957600080fd5b8286015b848110156134de578035835291830191830161352d565b600082601f83011261355557600080fd5b813560206135656131a683613014565b82815260059290921b8401810191818101908684111561358457600080fd5b8286015b848110156134de5780356001600160401b038111156135a75760008081fd5b6135b58986838b0101613048565b845250918301918301613588565b600080600080600060a086880312156135db57600080fd5b853594506020808701356001600160401b03808211156135fa57600080fd5b818901915089601f83011261360e57600080fd5b813561361c6131a682613014565b81815260059190911b8301840190848101908c83111561363b57600080fd5b8585015b83811015613673578035858111156136575760008081fd5b6136658f89838a0101613048565b84525091860191860161363f565b5098505050604089013592508083111561368c57600080fd5b6136988a848b0161347a565b955060608901359250808311156136ae57600080fd5b6136ba8a848b016134e9565b945060808901359250808311156136d057600080fd5b50506136de88828901613544565b9150509295509295909350565b600060208083850312156136fe57600080fd5b82356001600160401b038082111561371557600080fd5b818501915085601f83011261372957600080fd5b81356137376131a682613014565b81815260059190911b8301840190848101908883111561375657600080fd5b8585015b838110156132535780358581111561377157600080fd5b8601808b0360e0601f198201121561378857600080fd5b613790612fc2565b8983013561379d81612f24565b815260408301356137ad81612f24565b818b015260608381013560408301526080840135898111156137ce57600080fd5b6137dc8f8d838801016130b7565b828401525080609f19840112156137f257600080fd5b506137fb612fa0565b915060a083013561380b81612f24565b825260c083013561381b81612f24565b828b015260e0929092013560408201526080820152835291860191860161375a565b600080600060e0848603121561385257600080fd5b83356001600160401b038082111561386957600080fd5b61387587838801613260565b9450602086013591508082111561388b57600080fd5b50613898868287016133cf565b9250506138a885604086016133cf565b90509250925092565b600080604083850312156138c457600080fd5b82356001600160401b03808211156138db57600080fd5b6138e786838701613260565b935060208501359150808211156138fd57600080fd5b5061390a858286016133cf565b9150509250929050565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60005b838110156139fa5781810151838201526020016139e2565b8381111561272a5750506000910152565b60008151808452613a238160208601602086016139df565b601f01601f19169290920160200192915050565b600061010060018060a01b03808451168552806020850151166020860152506040830151604085015260ff60608401511660608501526080830151608085015260a083015160a085015260c083015160c085015260e08301518160e0860152613aa282860182613a0b565b95945050505050565b828152604060208201526000612da26040830184613a37565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613aee57613aee613ac4565b5060010190565b6000808335601e19843603018112613b0c57600080fd5b8301803591506001600160401b03821115613b2657600080fd5b602001915036819003821315613b3b57600080fd5b9250929050565b600060208284031215613b5457600080fd5b8135612b39816132e2565b600060208284031215613b7157600080fd5b612b3982613037565b6000808335601e19843603018112613b9157600080fd5b8301803591506001600160401b03821115613bab57600080fd5b6020019150600781901b3603821315613b3b57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8d16815260e060208201526000613c0960e083018d8f613bc3565b604083820381850152613c1d828d8f613bc3565b9150606084830381860152613c33838c8e613bc3565b9250608085840381870152613c49848b8d613bc3565b60a087018a905286810360c088015287815288945060200160005b88811015613cb6578535613c7781612f24565b6001600160a01b0316825260ff613c9060208801613037565b166020830152858501358583015283860135848301529482019490820190600101613c64565b5080955050505050509d9c50505050505050505050505050565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b6001600160a01b038616815260a060208201819052600090613d4090830187613a0b565b8281036040840152613d528187613a0b565b90508281036060840152613d668186613a0b565b91505082151560808301529695505050505050565b60008219821115613d8e57613d8e613ac4565b500190565b6001600160a01b03898116825261010060208301819052600091613db98483018c613a0b565b91508382036040850152613dcd828b613a0b565b8982166060860152888216608086015290871660a085015283810360c08501529050613df98186613a0b565b91505082151560e08301529998505050505050505050565b600060208284031215613e2357600080fd5b8151612b39816132e2565b6000808335601e19843603018112613e4557600080fd5b8301803591506001600160401b03821115613e5f57600080fd5b6020019150600581901b3603821315613b3b57600080fd5b6000808335601e19843603018112613e8e57600080fd5b83016020810192503590506001600160401b03811115613ead57600080fd5b803603831315613b3b57600080fd5b8183526000602080850194508260005b85811015613efa578135613edf81612f24565b6001600160a01b031687529582019590820190600101613ecc565b509495945050505050565b81835260006001600160fb1b03831115613f1e57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b87811015613f8b578284038952613f6c8288613e77565b613f77868284613bc3565b9a87019a9550505090840190600101613f55565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c811015613ff95785840360bf19018352613fd7828f613e77565b613fe2868284613bc3565b955050506020928301929190910190600101613fbc565b505050828103604084015261400f81898b613ebc565b90508281036060840152614024818789613f05565b90508281036080840152614039818587613f3b565b9c9b505050505050505050505050565b60006020828403121561405b57600080fd5b8151612b3981612f24565b60608152600061407a60608301888a613f05565b828103602084015261408d818789613f05565b905082810360408401526140a2818587613ebc565b9998505050505050505050565b6000806000606084860312156140c457600080fd5b83516140cf81612f24565b60208501519093506140e081612f24565b80925050604084015190509250925092565b600060018060a01b03808716835285602084015260c0604084015261411a60c0840186613a37565b915080845116606084015280602085015116608084015250604083015160a083015295945050505050565b6001600160a01b038616815260606020820181905260009061416a9083018688613ebc565b828103604084015261417d818587613f05565b98975050505050505050565b60006020828403121561419b57600080fd5b5051919050565b6080815260006141b56080830187613a0b565b82810360208401526141c78187613a0b565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b83811015613efa5781516001600160a01b0316875295820195908201906001016141fd565b600081518084526020808501945080840160005b83811015613efa57815187529582019590820190600101614236565b600081518084526020808501808196508360051b8101915082860160005b85811015613f8b578284038952614288848351613a0b565b98850198935090840190600101614270565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156142f15760bf198887030185526142df868351613a0b565b955093820193908201906001016142c3565b50508584038187015250505061430781886141e9565b9050828103604084015261431b81876141e9565b9050828103606084015261432f8186614222565b9050828103608084015261417d8185614252565b600082516143558184602087016139df565b9190910192915050565b602081526000612b396020830184613a0b56fea26469706673582212202957871c723299c02a9ce56af52c92be4847af3e7ebe64299dd09cec227d2dec64736f6c634300080c00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65720000000000000000000000004344d4bc29531db736378e9a3da85bf1eff0cb22000000000000000000000000973e69303259b0c2543a38665122b773d28405fb0000000000000000000000008149276f275eefac110d74afe8afeceaec7d1593
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806382c4420411610104578063aa897ddc116100a2578063e5fc01f011610071578063e5fc01f01461053b578063f2fde38b14610543578063f86b2bcf14610556578063f887ea401461056957600080fd5b8063aa897ddc146104b4578063bbf8d71f146104e7578063c6cf868a146104fa578063d282aa861461050257600080fd5b806394051699116100de578063940516991461045157806394be0e881461048657806395c6030514610499578063a33ef2a6146104a157600080fd5b806382c44204146103d95780638da5cb5b1461042d5780638f6051af1461043e57600080fd5b80633315efd11161017c578063715018a61161014b578063715018a61461038257806372f670f01461038a5780637b20bccf146103b3578063809d8105146103c657600080fd5b80633315efd1146102cd57806350447fd51461032a578063557fcfb0146103675780635c7059821461037a57600080fd5b80632515422e116101b85780632515422e1461026557806326705c3c1461027857806326f200661461028f5780633147c798146102ba57600080fd5b8063042ab9b3146101df5780630ffda8871461021d578063226e761514610232575b600080fd5b6101f26101ed366004612f0b565b61057c565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61023061022b366004612f0b565b610603565b005b610255610240366004612f44565b60086020526000908152604090205460ff1681565b6040519015158152602001610214565b61023061027336600461315a565b610648565b610281600a5481565b604051908152602001610214565b6102a261029d366004613278565b610915565b6040516001600160a01b039091168152602001610214565b6102a26102c83660046132fb565b610b4d565b6101f26102db366004612f0b565b6040805180820190915260008082526020820152506000908152600560209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b61033d6103383660046133f3565b610ec6565b604080516001600160a01b0394851681529284166020840152921691810191909152606001610214565b6102a26103753660046135c3565b61126d565b600254610281565b61023061130e565b6102a2610398366004612f44565b6007602052600090815260409020546001600160a01b031681565b6102816103c1366004612f44565b611344565b6102306103d4366004612f0b565b6114d7565b61040e6103e7366004612f0b565b6005602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b039093168352901515602083015201610214565b6000546001600160a01b03166102a2565b61028161044c366004612f44565b611549565b61040e61045f366004612f0b565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b6102306104943660046136eb565b6116e4565b600a54610281565b6102306104af366004612f0b565b611c89565b6104c76104c236600461383d565b611d01565b604080516001600160a01b03938416815292909116602083015201610214565b6102306104f5366004612f0b565b611fee565b600954610281565b6105156105103660046133f3565b6120aa565b604080516001600160a01b03948516815293909216602084015290820152606001610214565b600454610281565b610230610551366004612f44565b61222d565b6104c76105643660046138b1565b6122c8565b600b546102a2906001600160a01b031681565b60408051808201909152600080825260208201526000828152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600a5483118015906105d857508215155b6105fd5760405162461bcd60e51b81526004016105f490613914565b60405180910390fd5b92915050565b6000546001600160a01b0316331461062d5760405162461bcd60e51b81526004016105f49061395d565b6000908152600660205260409020805460ff60a01b19169055565b6002600154141561066b5760405162461bcd60e51b81526004016105f490613992565b60026001558051603210156106c25760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105f4565b60005b815181101561090d5760008282815181106106e2576106e26139c9565b60200260200101516040015160400151118015610733575060006001600160a01b0316828281518110610717576107176139c9565b602002602001015160400151602001516001600160a01b031614155b8015610773575060006001600160a01b0316828281518110610757576107576139c9565b602002602001015160400151600001516001600160a01b031614155b15610843576107c682828151811061078d5761078d6139c9565b6020026020010151604001516020015133308585815181106107b1576107b16139c9565b602002602001015160400151604001516124f7565b6108438282815181106107db576107db6139c9565b6020026020010151600001518383815181106107f9576107f96139c9565b6020026020010151604001516040015184848151811061081b5761081b6139c9565b602002602001015160400151602001516001600160a01b03166126459092919063ffffffff16565b818181518110610855576108556139c9565b6020026020010151600001516001600160a01b031663361fef49838381518110610881576108816139c9565b60200260200101516020015184848151811061089f5761089f6139c9565b6020026020010151604001516040518363ffffffff1660e01b81526004016108c8929190613aab565b600060405180830381600087803b1580156108e257600080fd5b505af11580156108f6573d6000803e3d6000fd5b50505050808061090590613ada565b9150506106c5565b505060018055565b60006002600154141561093a5760405162461bcd60e51b81526004016105f490613992565b6002600155610a2c61094c8480613af5565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061098e925050506020860186613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408a0135935091503090506109d760608a018a613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610a1c9250505060a08b0160808c01613b42565b6102c860c08c0160a08d01612f44565b90506001600160a01b038116631aa3adf9610a4a6020850185613b5f565b610a576020860186613af5565b610a646040880188613af5565b610a7160608a018a613af5565b610a7e60808c018c613af5565b60a08d0135610a9060c08f018f613b7a565b6040518d63ffffffff1660e01b8152600401610ab79c9b9a99989796959493929190613bec565b600060405180830381600087803b158015610ad157600080fd5b505af1158015610ae5573d6000803e3d6000fd5b50506040516310c414eb60e21b81523060048201526001600160a01b038416925063431053ac9150602401600060405180830381600087803b158015610b2a57600080fd5b505af1158015610b3e573d6000803e3d6000fd5b50506001805550909392505050565b60006004548711158015610b6057508615155b610b7c5760405162461bcd60e51b81526004016105f490613cd0565b6000878152600560209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610c185760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105f4565b6001600160a01b038316610c825760405162461bcd60e51b815260206004820152602b60248201527f4552433732314454466163746f72793a20616464726573732830292063616e6e60448201526a37ba1031329037bbb732b960a91b60648201526084016105f4565b8051610c8d90612730565b91506001600160a01b038216610d0d576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105f4565b8160076000846001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550336001600160a01b0316836001600160a01b031682600001516001600160a01b03167f8125264ec1d174cb383ea0646ea1e6921ca3b0aba20370c8e18389e7c2d6a571858e8e8b8b604051610db0959493929190613d1c565b60405180910390a4600160026000828254610dcb9190613d7b565b9091555050604051630343aa3d60e31b815282906001600160a01b03821690631a1d51e890610e0c9087908f908f9030908f908f908f908f90600401613d93565b6020604051808303816000875af1158015610e2b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e4f9190613e11565b610eb85760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105f4565b505098975050505050505050565b600080600060026001541415610eee5760405162461bcd60e51b81526004016105f490613992565b6002600155610f52610f036040860186613e2e565b6001818110610f1457610f146139c9565b9050602002016020810190610f299190612f44565b3330610f358880613e2e565b6004818110610f4657610f466139c9565b905060200201356124f7565b611042610f5f8780613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610fa1925050506020890189613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408d013593503092509050610fea60608d018d613af5565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061102f9250505060a08e0160808f01613b42565b8d60a00160208101906102c89190612f44565b92506001600160a01b03831663e38d7cad86356110626020890189613e2e565b61106f60408b018b613e2e565b61107c60608d018d613e2e565b61108960808f018f613e2e565b6040518a63ffffffff1660e01b81526004016110ad99989796959493929190613f98565b6020604051808303816000875af11580156110cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f09190614049565b600b5490925061116b906001600160a01b031661110d8680613e2e565b600481811061111e5761111e6139c9565b905060200201358680604001906111359190613e2e565b6001818110611146576111466139c9565b905060200201602081019061115b9190612f44565b6001600160a01b03169190612645565b6001600160a01b038216635bfe4da06111848680613e2e565b6111916020890189613e2e565b61119e60408b018b613e2e565b6040518763ffffffff1660e01b81526004016111bf96959493929190614066565b6020604051808303816000875af11580156111de573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112029190614049565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0384169063fe1ec88090602401600060405180830381600087803b15801561124657600080fd5b505af115801561125a573d6000803e3d6000fd5b5050600180555092969195509350915050565b3360008181526007602052604081205490916001600160a01b03909116146112f65760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105f4565b6113048686868686336127c0565b9695505050505050565b6000546001600160a01b031633146113385760405162461bcd60e51b81526004016105f49061395d565b6113426000612aa5565b565b600080546001600160a01b0316331461136f5760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0382166113e25760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105f4565b813b6114305760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105f4565b6001600a60008282546114439190613d7b565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600a8054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600a545b919050565b6000546001600160a01b031633146115015760405162461bcd60e51b81526004016105f49061395d565b600454811115801561151257508015155b61152e5760405162461bcd60e51b81526004016105f490613cd0565b6000908152600560205260409020805460ff60a01b19169055565b600080546001600160a01b031633146115745760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0382166115f05760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105f4565b813b61163e5760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105f4565b6001600460008282546116519190613d7b565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260048054600090815260059092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600454919050565b600260015414156117075760405162461bcd60e51b81526004016105f490613992565b600260015580516032101561175e5760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105f4565b60005b815181101561090d576000806000848481518110611781576117816139c9565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa1580156117ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ee91906140af565b92509250925060008111801561180c57506001600160a01b03821615155b801561182057506001600160a01b03831615155b1561186357611831823330846124f7565b611863858581518110611846576118466139c9565b6020908102919091010151516001600160a01b0384169083612645565b6000858581518110611877576118776139c9565b602002602001015160800151604001511180156118c8575060006001600160a01b03168585815181106118ac576118ac6139c9565b602002602001015160800151600001516001600160a01b031614155b8015611908575060006001600160a01b03168585815181106118ec576118ec6139c9565b602002602001015160800151602001516001600160a01b031614155b156119d85761195b858581518110611922576119226139c9565b602002602001015160800151602001513330888881518110611946576119466139c9565b602002602001015160800151604001516124f7565b6119d8858581518110611970576119706139c9565b60200260200101516000015186868151811061198e5761198e6139c9565b602002602001015160800151604001518787815181106119b0576119b06139c9565b602002602001015160800151602001516001600160a01b03166126459092919063ffffffff16565b60008585815181106119ec576119ec6139c9565b60200260200101516060015160400151118015611a3d575060006001600160a01b0316858581518110611a2157611a216139c9565b602002602001015160600151602001516001600160a01b031614155b8015611a7d575060006001600160a01b0316858581518110611a6157611a616139c9565b602002602001015160600151600001516001600160a01b031614155b15611b4d57611ad0858581518110611a9757611a976139c9565b602002602001015160600151602001513330888881518110611abb57611abb6139c9565b602002602001015160600151604001516124f7565b611b4d858581518110611ae557611ae56139c9565b602002602001015160000151868681518110611b0357611b036139c9565b60200260200101516060015160400151878781518110611b2557611b256139c9565b602002602001015160600151602001516001600160a01b03166126459092919063ffffffff16565b611b7e858581518110611b6257611b626139c9565b6020026020010151600001513330670de0b6b3a76400006124f7565b848481518110611b9057611b906139c9565b6020026020010151600001516001600160a01b03166379d9d7f3868681518110611bbc57611bbc6139c9565b602002602001015160200151878781518110611bda57611bda6139c9565b602002602001015160400151888881518110611bf857611bf86139c9565b602002602001015160600151898981518110611c1657611c166139c9565b6020026020010151608001516040518563ffffffff1660e01b8152600401611c4194939291906140f2565b600060405180830381600087803b158015611c5b57600080fd5b505af1158015611c6f573d6000803e3d6000fd5b505050505050508080611c8190613ada565b915050611761565b6000546001600160a01b03163314611cb35760405162461bcd60e51b81526004016105f49061395d565b6004548111158015611cc457508015155b611ce05760405162461bcd60e51b81526004016105f490613cd0565b6000908152600560205260409020805460ff60a01b1916600160a01b179055565b60008060026001541415611d275760405162461bcd60e51b81526004016105f490613992565b6002600155611e19611d398680613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611d7b925050506020880188613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408c013593503092509050611dc460608c018c613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611e099250505060a08d0160808e01613b42565b6102c860c08e0160a08f01612f44565b91506001600160a01b03821663e38d7cad8535611e396020880188613e2e565b611e4660408a018a613e2e565b611e5360608c018c613e2e565b611e6060808e018e613e2e565b6040518a63ffffffff1660e01b8152600401611e8499989796959493929190613f98565b6020604051808303816000875af1158015611ea3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ec79190614049565b90506001600160a01b03811663191c918a611ee56020860186612f44565b60208601356040870135611eff6080890160608a01613b42565b611f0f60a08a0160808b01612f44565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611f6f57600080fd5b505af1158015611f83573d6000803e3d6000fd5b50506040516301fc3d9160e71b81523060048201526001600160a01b038516925063fe1ec8809150602401600060405180830381600087803b158015611fc857600080fd5b505af1158015611fdc573d6000803e3d6000fd5b50506001805550919590945092505050565b6000546001600160a01b031633146120185760405162461bcd60e51b81526004016105f49061395d565b600a54811115801561202957508015155b6120895760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105f4565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156120d25760405162461bcd60e51b81526004016105f490613992565b60026001556120e4610f5f8780613af5565b92506001600160a01b03831663e38d7cad86356121046020890189613e2e565b61211160408b018b613e2e565b61211e60608d018d613e2e565b61212b60808f018f613e2e565b6040518a63ffffffff1660e01b815260040161214f99989796959493929190613f98565b6020604051808303816000875af115801561216e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121929190614049565b91506001600160a01b038216638b96412b6121b06020870187612f44565b6121bd6020880188613e2e565b6121ca60408a018a613e2e565b6040518663ffffffff1660e01b81526004016121ea959493929190614145565b6020604051808303816000875af1158015612209573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112029190614189565b6000546001600160a01b031633146122575760405162461bcd60e51b81526004016105f49061395d565b6001600160a01b0381166122bc5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f4565b6122c581612aa5565b50565b600080600260015414156122ee5760405162461bcd60e51b81526004016105f490613992565b60026001556123e06123008580613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612342925050506020870187613af5565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408b01359350309250905061238b60608b018b613af5565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506123d09250505060a08c0160808d01613b42565b6102c860c08d0160a08e01612f44565b91506001600160a01b03821663e38d7cad84356124006020870187613e2e565b61240d6040890189613e2e565b61241a60608b018b613e2e565b61242760808d018d613e2e565b6040518a63ffffffff1660e01b815260040161244b99989796959493929190613f98565b6020604051808303816000875af115801561246a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248e9190614049565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0383169063fe1ec88090602401600060405180830381600087803b1580156124d257600080fd5b505af11580156124e6573d6000803e3d6000fd5b505060018055509194909350915050565b6040516370a0823160e01b81526001600160a01b038381166004830152600091908616906370a0823190602401602060405180830381865afa158015612541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125659190614189565b905061257c6001600160a01b038616858585612af5565b6125868183612b2d565b6040516370a0823160e01b81526001600160a01b0385811660048301528716906370a0823190602401602060405180830381865afa1580156125cc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125f09190614189565b101561263e5760405162461bcd60e51b815260206004820152601a60248201527f5472616e7366657220616d6f756e7420697320746f6f206c6f7700000000000060448201526064016105f4565b5050505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015612696573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126ba9190614189565b6126c49190613d7b565b6040516001600160a01b03851660248201526044810182905290915061272a90859063095ea7b360e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612b40565b50505050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b6000836000815181106127d5576127d56139c9565b60200260200101516000141561283b5760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105f4565b600a54871115801561284c57508615155b6128685760405162461bcd60e51b81526004016105f490613914565b6000878152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082018190526129015760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105f4565b805161290c90612730565b6001600160a01b0381166000818152600860205260409020805460ff191660011790559092506129a45760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105f4565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b90896000815181106129f0576129f06139c9565b60200260200101518a600181518110612a0b57612a0b6139c9565b602002602001015189600081518110612a2657612a266139c9565b602002602001015188604051612a3f94939291906141a2565b60405180910390a3600160096000828254612a5a9190613d7b565b90915550506040805160a08101825288815260208101889052908101869052606081018590526001600160a01b0384166080820152612a998382612c17565b50509695505050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040516001600160a01b038085166024830152831660448201526064810182905261272a9085906323b872dd60e01b906084016126f3565b6000612b398284613d7b565b9392505050565b6000612b95826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d939092919063ffffffff16565b805190915015612c125780806020019051810190612bb39190613e11565b612c125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105f4565b505050565b6040805160038082526080820190925283916000919060208201606080368337019050509050826080015181600081518110612c5557612c556139c9565b6001600160a01b039283166020918202929092010152600b54825191169082906001908110612c8657612c866139c9565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b8152600401612cea95949392919061429a565b6020604051808303816000875af1158015612d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d2d9190613e11565b61272a5760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105f4565b6060612da28484600085612daa565b949350505050565b606082471015612e0b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105f4565b843b612e595760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105f4565b600080866001600160a01b03168587604051612e759190614343565b60006040518083038185875af1925050503d8060008114612eb2576040519150601f19603f3d011682016040523d82523d6000602084013e612eb7565b606091505b5091509150612ec7828286612ed2565b979650505050505050565b60608315612ee1575081612b39565b825115612ef15782518084602001fd5b8160405162461bcd60e51b81526004016105f4919061435f565b600060208284031215612f1d57600080fd5b5035919050565b6001600160a01b03811681146122c557600080fd5b80356114d281612f24565b600060208284031215612f5657600080fd5b8135612b3981612f24565b634e487b7160e01b600052604160045260246000fd5b60405161010081016001600160401b0381118282101715612f9a57612f9a612f61565b60405290565b604051606081016001600160401b0381118282101715612f9a57612f9a612f61565b60405160a081016001600160401b0381118282101715612f9a57612f9a612f61565b604051601f8201601f191681016001600160401b038111828210171561300c5761300c612f61565b604052919050565b60006001600160401b0382111561302d5761302d612f61565b5060051b60200190565b803560ff811681146114d257600080fd5b600082601f83011261305957600080fd5b81356001600160401b0381111561307257613072612f61565b613085601f8201601f1916602001612fe4565b81815284602083860101111561309a57600080fd5b816020850160208301376000918101602001919091529392505050565b600061010082840312156130ca57600080fd5b6130d2612f77565b90506130dd82612f39565b81526130eb60208301612f39565b60208201526040820135604082015261310660608301613037565b60608201526080820135608082015260a082013560a082015260c082013560c082015260e08201356001600160401b0381111561314257600080fd5b61314e84828501613048565b60e08301525092915050565b6000602080838503121561316d57600080fd5b82356001600160401b038082111561318457600080fd5b818501915085601f83011261319857600080fd5b81356131ab6131a682613014565b612fe4565b81815260059190911b830184019084810190888311156131ca57600080fd5b8585015b83811015613253578035858111156131e65760008081fd5b86016060818c03601f19018113156131fe5760008081fd5b613206612fa0565b8983013561321381612f24565b81526040838101358b8301529183013591888311156132325760008081fd5b6132408e8c858701016130b7565b90820152855250509186019186016131ce565b5098975050505050505050565b600060c0828403121561327257600080fd5b50919050565b6000806040838503121561328b57600080fd5b82356001600160401b03808211156132a257600080fd5b6132ae86838701613260565b935060208501359150808211156132c457600080fd5b50830160e081860312156132d757600080fd5b809150509250929050565b80151581146122c557600080fd5b80356114d2816132e2565b600080600080600080600080610100898b03121561331857600080fd5b88356001600160401b038082111561332f57600080fd5b61333b8c838d01613048565b995060208b013591508082111561335157600080fd5b61335d8c838d01613048565b985060408b0135975061337260608c01612f39565b965061338060808c01612f39565b955060a08b013591508082111561339657600080fd5b506133a38b828c01613048565b9350506133b260c08a016132f0565b91506133c060e08a01612f39565b90509295985092959890939650565b600060a0828403121561327257600080fd5b60006060828403121561327257600080fd5b60008060006060848603121561340857600080fd5b83356001600160401b038082111561341f57600080fd5b61342b87838801613260565b9450602086013591508082111561344157600080fd5b61344d878388016133cf565b9350604086013591508082111561346357600080fd5b50613470868287016133e1565b9150509250925092565b600082601f83011261348b57600080fd5b8135602061349b6131a683613014565b82815260059290921b840181019181810190868411156134ba57600080fd5b8286015b848110156134de5780356134d181612f24565b83529183019183016134be565b509695505050505050565b600082601f8301126134fa57600080fd5b8135602061350a6131a683613014565b82815260059290921b8401810191818101908684111561352957600080fd5b8286015b848110156134de578035835291830191830161352d565b600082601f83011261355557600080fd5b813560206135656131a683613014565b82815260059290921b8401810191818101908684111561358457600080fd5b8286015b848110156134de5780356001600160401b038111156135a75760008081fd5b6135b58986838b0101613048565b845250918301918301613588565b600080600080600060a086880312156135db57600080fd5b853594506020808701356001600160401b03808211156135fa57600080fd5b818901915089601f83011261360e57600080fd5b813561361c6131a682613014565b81815260059190911b8301840190848101908c83111561363b57600080fd5b8585015b83811015613673578035858111156136575760008081fd5b6136658f89838a0101613048565b84525091860191860161363f565b5098505050604089013592508083111561368c57600080fd5b6136988a848b0161347a565b955060608901359250808311156136ae57600080fd5b6136ba8a848b016134e9565b945060808901359250808311156136d057600080fd5b50506136de88828901613544565b9150509295509295909350565b600060208083850312156136fe57600080fd5b82356001600160401b038082111561371557600080fd5b818501915085601f83011261372957600080fd5b81356137376131a682613014565b81815260059190911b8301840190848101908883111561375657600080fd5b8585015b838110156132535780358581111561377157600080fd5b8601808b0360e0601f198201121561378857600080fd5b613790612fc2565b8983013561379d81612f24565b815260408301356137ad81612f24565b818b015260608381013560408301526080840135898111156137ce57600080fd5b6137dc8f8d838801016130b7565b828401525080609f19840112156137f257600080fd5b506137fb612fa0565b915060a083013561380b81612f24565b825260c083013561381b81612f24565b828b015260e0929092013560408201526080820152835291860191860161375a565b600080600060e0848603121561385257600080fd5b83356001600160401b038082111561386957600080fd5b61387587838801613260565b9450602086013591508082111561388b57600080fd5b50613898868287016133cf565b9250506138a885604086016133cf565b90509250925092565b600080604083850312156138c457600080fd5b82356001600160401b03808211156138db57600080fd5b6138e786838701613260565b935060208501359150808211156138fd57600080fd5b5061390a858286016133cf565b9150509250929050565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60005b838110156139fa5781810151838201526020016139e2565b8381111561272a5750506000910152565b60008151808452613a238160208601602086016139df565b601f01601f19169290920160200192915050565b600061010060018060a01b03808451168552806020850151166020860152506040830151604085015260ff60608401511660608501526080830151608085015260a083015160a085015260c083015160c085015260e08301518160e0860152613aa282860182613a0b565b95945050505050565b828152604060208201526000612da26040830184613a37565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613aee57613aee613ac4565b5060010190565b6000808335601e19843603018112613b0c57600080fd5b8301803591506001600160401b03821115613b2657600080fd5b602001915036819003821315613b3b57600080fd5b9250929050565b600060208284031215613b5457600080fd5b8135612b39816132e2565b600060208284031215613b7157600080fd5b612b3982613037565b6000808335601e19843603018112613b9157600080fd5b8301803591506001600160401b03821115613bab57600080fd5b6020019150600781901b3603821315613b3b57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8d16815260e060208201526000613c0960e083018d8f613bc3565b604083820381850152613c1d828d8f613bc3565b9150606084830381860152613c33838c8e613bc3565b9250608085840381870152613c49848b8d613bc3565b60a087018a905286810360c088015287815288945060200160005b88811015613cb6578535613c7781612f24565b6001600160a01b0316825260ff613c9060208801613037565b166020830152858501358583015283860135848301529482019490820190600101613c64565b5080955050505050509d9c50505050505050505050505050565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b6001600160a01b038616815260a060208201819052600090613d4090830187613a0b565b8281036040840152613d528187613a0b565b90508281036060840152613d668186613a0b565b91505082151560808301529695505050505050565b60008219821115613d8e57613d8e613ac4565b500190565b6001600160a01b03898116825261010060208301819052600091613db98483018c613a0b565b91508382036040850152613dcd828b613a0b565b8982166060860152888216608086015290871660a085015283810360c08501529050613df98186613a0b565b91505082151560e08301529998505050505050505050565b600060208284031215613e2357600080fd5b8151612b39816132e2565b6000808335601e19843603018112613e4557600080fd5b8301803591506001600160401b03821115613e5f57600080fd5b6020019150600581901b3603821315613b3b57600080fd5b6000808335601e19843603018112613e8e57600080fd5b83016020810192503590506001600160401b03811115613ead57600080fd5b803603831315613b3b57600080fd5b8183526000602080850194508260005b85811015613efa578135613edf81612f24565b6001600160a01b031687529582019590820190600101613ecc565b509495945050505050565b81835260006001600160fb1b03831115613f1e57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b87811015613f8b578284038952613f6c8288613e77565b613f77868284613bc3565b9a87019a9550505090840190600101613f55565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c811015613ff95785840360bf19018352613fd7828f613e77565b613fe2868284613bc3565b955050506020928301929190910190600101613fbc565b505050828103604084015261400f81898b613ebc565b90508281036060840152614024818789613f05565b90508281036080840152614039818587613f3b565b9c9b505050505050505050505050565b60006020828403121561405b57600080fd5b8151612b3981612f24565b60608152600061407a60608301888a613f05565b828103602084015261408d818789613f05565b905082810360408401526140a2818587613ebc565b9998505050505050505050565b6000806000606084860312156140c457600080fd5b83516140cf81612f24565b60208501519093506140e081612f24565b80925050604084015190509250925092565b600060018060a01b03808716835285602084015260c0604084015261411a60c0840186613a37565b915080845116606084015280602085015116608084015250604083015160a083015295945050505050565b6001600160a01b038616815260606020820181905260009061416a9083018688613ebc565b828103604084015261417d818587613f05565b98975050505050505050565b60006020828403121561419b57600080fd5b5051919050565b6080815260006141b56080830187613a0b565b82810360208401526141c78187613a0b565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b83811015613efa5781516001600160a01b0316875295820195908201906001016141fd565b600081518084526020808501945080840160005b83811015613efa57815187529582019590820190600101614236565b600081518084526020808501808196508360051b8101915082860160005b85811015613f8b578284038952614288848351613a0b565b98850198935090840190600101614270565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156142f15760bf198887030185526142df868351613a0b565b955093820193908201906001016142c3565b50508584038187015250505061430781886141e9565b9050828103604084015261431b81876141e9565b9050828103606084015261432f8186614222565b9050828103608084015261417d8185614252565b600082516143558184602087016139df565b9190910192915050565b602081526000612b396020830184613a0b56fea26469706673582212202957871c723299c02a9ce56af52c92be4847af3e7ebe64299dd09cec227d2dec64736f6c634300080c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004344d4bc29531db736378e9a3da85bf1eff0cb22000000000000000000000000973e69303259b0c2543a38665122b773d28405fb0000000000000000000000008149276f275eefac110d74afe8afeceaec7d1593
-----Decoded View---------------
Arg [0] : _template721 (address): 0x4344D4Bc29531DB736378e9A3dA85BF1eff0CB22
Arg [1] : _template (address): 0x973e69303259B0c2543a38665122b773D28405fB
Arg [2] : _router (address): 0x8149276f275EEFAc110D74AFE8AFECEaeC7d1593
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000004344d4bc29531db736378e9a3da85bf1eff0cb22
Arg [1] : 000000000000000000000000973e69303259b0c2543a38665122b773d28405fb
Arg [2] : 0000000000000000000000008149276f275eefac110d74afe8afeceaec7d1593
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
BSC | 100.00% | $0.000596 | 337.8652 | $0.2014 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.