@oceanprotocol/lib 1.0.0-next.2 → 1.0.0-next.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +28 -0
- package/dist/lib.js +1 -1
- package/dist/lib.js.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.js +1 -1
- package/dist/lib.module.js.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/lib.modern.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"bignumber.js";import a from"web3";import t from"cross-fetch";import b from"fs";import n from"save-file";import d from"crypto-js/sha256";import f from"decimal.js";var s;!function(e){e[e.None=-1]="None",e[e.Error=0]="Error",e[e.Warn=1]="Warn",e[e.Log=2]="Log",e[e.Verbose=3]="Verbose"}(s||(s={}));class i{constructor(e=s.Error){this.logLevel=void 0,this.logLevel=e}setLevel(e){this.logLevel=e}bypass(...e){this.dispatch("log",-Infinity,...e)}debug(...e){this.dispatch("debug",s.Verbose,...e)}log(...e){this.dispatch("log",s.Log,...e)}warn(...e){this.dispatch("warn",s.Warn,...e)}error(...e){this.dispatch("error",s.Error,...e)}dispatch(e,a,...t){this.logLevel>=a&&console[e](...t)}}const c=new i;async function r(a){return new e(await a.eth.getGasPrice()).multipliedBy(1.05).integerValue(e.ROUND_DOWN).toString(10)}var o={nouns:["Crab","Fish","Seal","Octopus","Shark","Seahorse","Walrus","Starfish","Whale","Orca","Penguin","Jellyfish","Squid","Lobster","Pelican","Shrimp","Oyster","Clam","Seagull","Dolphin","Shell","Cormorant","Otter","Anemone","Turtle","Coral","Ray","Barracuda","Krill","Anchovy","Angelfish","Barnacle","Clownfish","Cod","Cuttlefish","Eel","Fugu","Herring","Haddock","Ling","Mackerel","Manatee","Narwhal","Nautilus","Plankton","Porpoise","Prawn","Pufferfish","Swordfish","Tuna"],adjectives:["adamant","adroit","amatory","ambitious","amused","animistic","antic","arcadian","artistic","astonishing","astounding","baleful","bellicose","bilious","blissful","boorish","brave","breathtaking","brilliant","calamitous","caustic","cerulean","clever","charming","comely","competent","concomitant","confident","contumacious","corpulent","crapulous","creative","dazzling","dedicated","defamatory","delighted","delightful","determined","didactic","dilatory","dowdy","efficacious","effulgent","egregious","empowered","endemic","enthusiastic","equanimous","exceptional","execrable","fabulous","fantastic","fastidious","feckless","fecund","friable","fulsome","garrulous","generous","gentle","guileless","gustatory","heuristic","histrionic","hubristic","incendiary","incredible","insidious","insolent","inspired","intransigent","inveterate","invidious","invigorated","irksome","jejune","juicy","jocular","joyful","judicious","kind","lachrymose","limpid","loquacious","lovely","luminous","mannered","marvelous","mendacious","meretricious","minatory","mordant","motivated","munificent","nefarious","noxious","obtuse","optimistic","parsimonious","pendulous","pernicious","pervasive","petulant","passionate","phenomenal","platitudinous","pleasant","powerful","precipitate","propitious","puckish","querulous","quiescent","rebarbative","recalcitant","redolent","rhadamanthine","risible","ruminative","sagacious","salubrious","sartorial","sclerotic","serpentine","smart","spasmodic","strident","stunning","stupendous","taciturn","tactful","tasty","tenacious","tremendous","tremulous","trenchant","turbulent","turgid","ubiquitous","uxorious","verdant","vibrant","voluble","voracious","wheedling","withering","wonderful","zealous"]};function p(e){const a=e||o,t=Math.floor(Math.random()*a.adjectives.length),b=Math.floor(Math.random()*a.nouns.length),n=Math.floor(100*Math.random()),d=a.adjectives[t].replace(/^\w/,e=>e.toUpperCase()),f=a.nouns[b].replace(/^\w/,e=>e.toUpperCase());return{name:`${d} ${f} Token`,symbol:`${(d.substring(0,3)+f.substring(0,3)).toUpperCase()}-${n}`}}function y(e){let t,b;return e.name&&e.symbol||({name:t,symbol:b}=p()),{templateIndex:e.templateIndex,strings:[e.name||t,e.symbol||b],addresses:[e.minter,e.feeManager,e.mpFeeAddress,e.feeToken],uints:[a.utils.toWei(e.cap),a.utils.toWei(e.feeAmount)],bytess:[]}}function u(e){return e.allowedConsumer||(e.allowedConsumer="0x0000000000000000000000000000000000000000"),{fixedPriceAddress:e.fixedRateAddress,addresses:[e.baseTokenAddress,e.owner,e.marketFeeCollector,e.allowedConsumer],uints:[e.baseTokenDecimals,e.dataTokenDecimals,e.fixedRate,e.marketFee,e.withMint?1:0]}}function l(e){return{addresses:[e.ssContract,e.basetokenAddress,e.basetokenSender,e.publisherAddress,e.marketFeeCollector,e.poolTemplateAddress],ssParams:[a.utils.toWei(e.rate),e.basetokenDecimals,a.utils.toWei(e.vestingAmount),e.vestedBlocks,a.utils.toWei(e.initialBasetokenLiquidity)],swapFees:[e.swapFeeLiquidityProvider,e.swapFeeMarketRunner]}}async function m(e,a){const b=await t(e,a);if(!b.ok)throw c.error(`Error requesting [${a.method}] ${e}`),c.error(`Response message: \n${await b.text()}`),b;return b}async function h(e,a,d){const f=await t(e);if(!f.ok)throw new Error("Response error.");let s;try{s=f.headers.get("content-disposition").match(/attachment;filename=(.+)/)[1]}catch(a){try{s=e.split("/").pop()}catch(e){s=`file${d}`}}if(a)return b.mkdirSync(a,{recursive:!0}),b.writeFileSync(`${a}/${s}`,await f.text()),a;n(await f.arrayBuffer(),s)}async function T(e){return t(e,{method:"GET",headers:{"Content-type":"application/json"}})}async function w(e,a){return async function(e,a,b){return t(e,null!=a?{method:"POST",body:a,headers:{"Content-type":"application/json"}}:{method:"POST"})}(e,a)}async function g(e,a,b,n){return t(a,{method:e,body:b,headers:n})}function A(){return A=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var b in t)Object.prototype.hasOwnProperty.call(t,b)&&(e[b]=t[b])}return e},A.apply(this,arguments)}var x={rinkeby:{chainId:4,Ocean:"0x8967bcf84170c91b0d24d4302c2376283b0b3a07",OPFCommunityFeeCollector:"0x600ED0935FDA70F2d0b7Cf740723a8b89FCD68A1",startBlock:9928186,poolTemplate:"0xdF0a5F729ad9aa090B1Bcf5F9188639DB0237101",Router:"0xBfe244735B6f578e471a0A70E86ffFE6c2E6f7a3",FixedPrice:"0xd7C8B30cd1d7e8364Cc4B4c2C58D1712551c1C79",Staking:"0x1EFd65ee89ab925b8189d728E56C44732b304E9B",ERC20Template:{1:"0x4b4771b7f4F274D58a5E1afe637bB0333129040A",2:"0x88E3285C839C3E84Ed94efd5CBB83428126ceb72"},ERC721Template:{1:"0xb853d0a5e34c6780349cDd66b1768Dd5772570A7"},Dispenser:"0x0867d17a99459291D399aD58bD4d436dD3F8B387",ERC721Factory:"0xeF6A78E22170817EB97E67e176d41358761F7dEd"}};const v={chainId:null,network:"unknown",metadataCacheUri:"https://aquarius.oceanprotocol.com",nodeUri:"http://localhost:8545",providerUri:"http://127.0.0.1:8030",subgraphUri:null,explorerUri:null,oceanTokenAddress:null,oceanTokenSymbol:"OCEAN",poolTemplateAddress:null,fixedRateExchangeAddress:null,dispenserAddress:null,startBlock:0},M=[A({},v),A({},v,{chainId:8996,network:"development",metadataCacheUri:"http://127.0.0.1:5000"}),A({},v,{chainId:3,network:"ropsten",nodeUri:"https://ropsten.infura.io/v3",providerUri:"https://provider.ropsten.oceanprotocol.com",subgraphUri:"https://subgraph.ropsten.oceanprotocol.com",explorerUri:"https://ropsten.etherscan.io",startBlock:9227563}),A({},v,{chainId:4,network:"rinkeby",nodeUri:"https://rinkeby.infura.io/v3",providerUri:"https://providerv4.rinkeby.oceanprotocol.com",subgraphUri:"https://subgraphv4.rinkeby.oceanprotocol.com",explorerUri:"https://rinkeby.etherscan.io",startBlock:7294090}),A({},v,{chainId:1,network:"mainnet",nodeUri:"https://mainnet.infura.io/v3",providerUri:"https://provider.mainnet.oceanprotocol.com",subgraphUri:"https://subgraph.mainnet.oceanprotocol.com",explorerUri:"https://etherscan.io",startBlock:11105459}),A({},v,{chainId:137,network:"polygon",nodeUri:"https://polygon-mainnet.infura.io/v3",providerUri:"https://provider.polygon.oceanprotocol.com",subgraphUri:"https://subgraph.polygon.oceanprotocol.com",explorerUri:"https://polygonscan.com",oceanTokenSymbol:"mOCEAN",startBlock:11005222}),A({},v,{chainId:1287,network:"moonbeamalpha",nodeUri:"https://rpc.testnet.moonbeam.network",providerUri:"https://provider.moonbeamalpha.oceanprotocol.com",subgraphUri:"https://subgraph.moonbeamalpha.oceanprotocol.com",explorerUri:"https://moonbase-blockscout.testnet.moonbeam.network/",startBlock:90707}),A({},v,{chainId:2021e3,network:"gaiaxtestnet",nodeUri:"https://rpc.gaiaxtestnet.oceanprotocol.com",providerUri:"https://provider.gaiaxtestnet.oceanprotocol.com",subgraphUri:"https://subgraph.gaiaxtestnet.oceanprotocol.com",explorerUri:"https://blockscout.gaiaxtestnet.oceanprotocol.com"}),A({},v,{chainId:2021001,network:"catenaxtestnet",nodeUri:"https://rpc.catenaxtestnet.oceanprotocol.com",providerUri:"https://provider.catenaxtestnet.oceanprotocol.com",subgraphUri:"https://subgraph.catenaxtestnet.oceanprotocol.com",explorerUri:"https://blockscout.catenaxtestnet.oceanprotocol.com",metadataCacheUri:"https://aquarius.catenaxtestnet.oceanprotocol.com"}),A({},v,{chainId:80001,network:"mumbai",nodeUri:"https://polygon-mumbai.infura.io/v3",providerUri:"https://provider.mumbai.oceanprotocol.com",subgraphUri:"https://subgraph.mumbai.oceanprotocol.com",explorerUri:"https://mumbai.polygonscan.com"}),A({},v,{chainId:56,network:"bsc",nodeUri:"https://bsc-dataseed.binance.org",providerUri:"https://provider.bsc.oceanprotocol.com",subgraphUri:"https://subgraph.bsc.oceanprotocol.com",explorerUri:"https://bscscan.com/"}),A({},v,{chainId:44787,network:"celoalfajores",nodeUri:"https://alfajores-forno.celo-testnet.org",providerUri:"https://provider.celoalfajores.oceanprotocol.com",subgraphUri:"https://subgraph.celoalfajores.oceanprotocol.com",explorerUri:"https://alfajores-blockscout.celo-testnet.org"}),A({},v,{chainId:246,network:"energyweb",nodeUri:"https://rpc.energyweb.org",providerUri:"https://provider.energyweb.oceanprotocol.com",subgraphUri:"https://subgraph.energyweb.oceanprotocol.com",explorerUri:"https://explorer.energyweb.org"}),A({},v,{chainId:1285,network:"moonriver",nodeUri:"https://moonriver.api.onfinality.io/public",providerUri:"https://provider.moonriver.oceanprotocol.com",subgraphUri:"https://subgraph.moonriver.oceanprotocol.com",explorerUri:"https://blockscout.moonriver.moonbeam.network"})];class k{getAddressesFromEnv(e){let a;if(x[e]){const{FixedPrice:t,Dispenser:b,Staking:n,poolTemplate:d,OPFCommunityFeeCollector:f,ERC721Factory:s,Ocean:i,chainId:c,startBlock:r}=x[e];a=A({erc721FactoryAddress:s,sideStakingAddress:n,opfCommunityFeeCollector:f,poolTemplateAddress:d,fixedRateExchangeAddress:t,dispenserAddress:b,oceanTokenAddress:i,chainId:c,startBlock:r},process.env.AQUARIUS_URI&&{metadataCacheUri:process.env.AQUARIUS_URI})}if(b&&process.env.ADDRESS_FILE)try{const t=JSON.parse(b.readFileSync(process.env.ADDRESS_FILE,"utf8")),{FixedPrice:n,Dispenser:d,Staking:f,poolTemplate:s,ERC721Factory:i,OPFCommunityFeeCollector:c,Ocean:r,chainId:o,startBlock:p}=t[e];a=A({erc721FactoryAddress:i,sideStakingAddress:f,opfCommunityFeeCollector:c,poolTemplateAddress:s,fixedRateExchangeAddress:n,dispenserAddress:d,oceanTokenAddress:r,chainId:o,startBlock:p},process.env.AQUARIUS_URI&&{metadataCacheUri:process.env.AQUARIUS_URI})}catch(e){}return a}getConfig(e,a){const t="string"==typeof e?"network":"chainId";let b=M.find(a=>a[t]===e);return b?(b=A({},b,this.getAddressesFromEnv(b.network)),A({},b,{nodeUri:a?`${b.nodeUri}/${a}`:b.nodeUri})):(c.error(`No config found for given network '${e}'`),null)}}function E(e,t){return e=a.utils.toChecksumAddress(e),`did:op:${d(e+t.toString(10)).toString()}`}function C(e){return d(e).toString()}const F="0x0000000000000000000000000000000000000000";async function I(e,a,t,b){const n=e&&e.currentProvider&&e.currentProvider.isMetaMask;try{return await e.eth.personal.sign(a,t,b)}catch(b){if(n)throw b;c.warn("Error on personal sign."),c.warn(b);try{return await e.eth.sign(a,t)}catch(e){throw c.error("Error on sign."),c.error(e),new Error("Error executing personal sign")}}}async function R(e,a,t){let b=await e.eth.sign(a,t);b=b.substr(2);const n="0x"+b.slice(0,64),d="0x"+b.slice(64,128);let f="0x"+b.slice(128,130);return"0x00"===f&&(f="0x1b"),"0x01"===f&&(f="0x1c"),{v:f,r:n,s:d}}async function S(e,a,t,b){const n=e.utils.utf8ToHex(a),d=e&&e.currentProvider&&e.currentProvider.isMetaMask;try{return await e.eth.personal.sign(n,t,b)}catch(a){if(d)throw a;c.warn("Error on personal sign."),c.warn(a);try{return await e.eth.sign(n,t)}catch(e){throw c.error("Error on sign."),c.error(e),new Error("Error executing personal sign")}}}var O=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"amt",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"bptAmount",type:"uint256"}],name:"LOG_BPT",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"bptAmount",type:"uint256"}],name:"LOG_BPT_SS",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"sig",type:"bytes4"},{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"LOG_CALL",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_EXIT",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenIn",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_JOIN",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"baseToken",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseTokenWeight",type:"uint256"},{indexed:!0,internalType:"address",name:"dataToken",type:"address"},{indexed:!1,internalType:"uint256",name:"dataTokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dataTokenWeight",type:"uint256"}],name:"LOG_SETUP",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenIn",type:"address"},{indexed:!0,internalType:"address",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_SWAP",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"newMarketCollector",type:"address"}],name:"MarketCollectorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"OPFWallet",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"OPFFee",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"marketAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PublishMarketFee",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"tokenFees",type:"address"}],name:"SWAP_FEES",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"SwapFeeChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"amt",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"BONE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BPOW_PRECISION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXIT_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"INIT_POOL_SUPPLY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_BOUND_TOKENS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_BPOW_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_IN_RATIO",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_OUT_RATIO",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_TOTAL_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BALANCE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BOUND_TOKENS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BPOW_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_opfCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_publishMarketCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_swapPublishMarketFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"whom",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],name:"calcPoolInSingleOut",outputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],name:"calcPoolOutSingleIn",outputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],name:"calcSingleInPoolOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],name:"calcSingleOutPoolIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectOPF",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"communityFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"maxPoolAmountIn",type:"uint256"}],name:"exitswapExternAmountOut",outputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"poolAmountIn",type:"uint256"},{internalType:"uint256",name:"minAmountOut",type:"uint256"}],name:"exitswapPoolAmountIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getAmountInExactOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getAmountOutExactIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBaseTokenAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getController",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentMarketFees",outputs:[{internalType:"address[]",name:"",type:"address[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentOPFFees",outputs:[{internalType:"address[]",name:"",type:"address[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentTokens",outputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDataTokenAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getDenormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFinalTokens",outputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMarketFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getNormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumTokens",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOPFFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getSpotPrice",outputs:[{internalType:"uint256",name:"spotPrice",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalDenormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"controller",type:"address"},{internalType:"address",name:"factory",type:"address"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"bool",name:"publicSwap",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address[2]",name:"tokens",type:"address[2]"},{internalType:"address[2]",name:"feeCollectors",type:"address[2]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"t",type:"address"}],name:"isBound",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isFinalized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isPublicSwap",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"}],name:"joinPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"minPoolAmountOut",type:"uint256"}],name:"joinswapExternAmountIn",outputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"poolAmountOut",type:"uint256"},{internalType:"uint256",name:"maxAmountIn",type:"uint256"}],name:"joinswapPoolAmountOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"publishMarketFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"swapFee",type:"uint256"}],name:"setSwapFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"dataTokenAddress",type:"address"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"dataTokenWeight",type:"uint256"},{internalType:"address",name:"baseTokenAddress",type:"address"},{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenWeight",type:"uint256"}],name:"setup",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[3]",name:"tokenInOutMarket",type:"address[3]"},{internalType:"uint256[4]",name:"amountsInOutMaxFee",type:"uint256[4]"}],name:"swapExactAmountIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"spotPriceAfter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[3]",name:"tokenInOutMarket",type:"address[3]"},{internalType:"uint256[4]",name:"amountsInOutMaxFee",type:"uint256[4]"}],name:"swapExactAmountOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"spotPriceAfter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newCollector",type:"address"}],name:"updateMarketFeeCollector",outputs:[],stateMutability:"nonpayable",type:"function"}],P={_format:"hh-sol-artifact-1",contractName:"ERC20Template",sourceName:"contracts/templates/ERC20Template.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterProposed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"_newPaymentCollector",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"NewPaymentCollector",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"consumer",type:"address"},{indexed:!1,internalType:"address",name:"payer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"serviceIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!0,internalType:"address",name:"publishMarketAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"OrderStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"providerFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"providerFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"providerFeeAmount",type:"uint256"},{indexed:!1,internalType:"bytes",name:"providerData",type:"bytes"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"ProviderFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFeesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BASE_COMMUNITY_FEE_PERCENTAGE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"addMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"addPaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"authERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanFrom721",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_dispenser",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"}],name:"createDispenser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"fixedPriceAddress",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createFixedRate",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"ssParams",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"}],name:"deployPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getERC721Address",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getPaymentCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],internalType:"struct ERC20Roles.RolesERC20",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPublishingMarketFee",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string[]",name:"strings_",type:"string[]"},{internalType:"address[]",name:"addresses_",type:"address[]"},{internalType:"address[]",name:"factoryAddresses_",type:"address[]"},{internalType:"uint256[]",name:"uints_",type:"uint256[]"},{internalType:"bytes[]",name:"bytes_",type:"bytes[]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"deployer",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"permissions",outputs:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"removeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"removePaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_value",type:"bytes"}],name:"setData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPaymentCollector",type:"address"}],name:"setPaymentCollector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_publishMarketFeeAddress",type:"address"},{internalType:"address",name:"_publishMarketFeeToken",type:"address"},{internalType:"uint256",name:"_publishMarketFeeAmount",type:"uint256"}],name:"setPublishingMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],name:"startOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x6080604052600b805460ff60a01b191690553480156200001e57600080fd5b5060408051808201825260048152631d195cdd60e21b60208083019182528351808501909452600a8452691d195cdd14de5b589bdb60b21b9084015281519192916200006d9160039162000091565b5080516200008390600490602084019062000091565b505060016007555062000174565b8280546200009f9062000137565b90600052602060002090601f016020900481019282620000c357600085556200010e565b82601f10620000de57805160ff19168380011785556200010e565b828001600101855582156200010e579182015b828111156200010e578251825591602001919060010190620000f1565b506200011c92915062000120565b5090565b5b808211156200011c576000815560010162000121565b600181811c908216806200014c57607f821691505b602082108114156200016e57634e487b7160e01b600052602260045260246000fd5b50919050565b61428e80620001846000396000f3fe6080604052600436106102725760003560e01c80635d1ca6311161014e578063aa271e1a116100bb578063dd62ed3e11610077578063dd62ed3e14610878578063e086e5ec146108be578063e487c2e8146108c6578063ec342ad0146108db578063ef867ff4146108f7578063f887ea401461091757005b8063aa271e1a146107aa578063aa492ef9146107e3578063ab62f0e114610803578063b2263a5d14610823578063b3998be014610838578063d505accf1461085857005b806395d89b411161010a57806395d89b41146106f557806396fb3eaf1461070a578063983b2d561461072a5780639b4f44b61461074a578063a457c2d71461076a578063a9059cbb1461078a57005b80635d1ca6311461062957806370a082311461063d57806379cc6790146106735780637ecebe001461069357806382c03da5146106c05780638b96412b146106d557005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461057457806342966c68146105945780634f189cb2146105b457806357a3a31b146105c957806357ad5ff6146105e95780635bfe4da01461060957005b8063313ce567146104ac578063355274ea146104ce5780633644e515146104e3578063392e53cd146104f95780633950935114610518578063397b37431461053857005b806318160ddd1161023b57806318160ddd146103d9578063191c918a146103f857806323b872dd1461041857806325b00243146104385780633092afd51461045857806330adf81f1461047857005b80627ffb781461027457806301e88208146102ab57806306fdde03146102fb578063095ea7b31461031d578063160a79251461034d575b005b34801561028057600080fd5b50600c546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b757600080fd5b506102e46102c6366004613569565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102a2565b34801561030757600080fd5b50610310610937565b6040516102a291906135de565b34801561032957600080fd5b5061033d6103383660046135f1565b6109c9565b60405190151581526020016102a2565b34801561035957600080fd5b506103ba610368366004613569565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102a2565b3480156103e557600080fd5b506002545b6040519081526020016102a2565b34801561040457600080fd5b5061027261041336600461362b565b6109df565b34801561042457600080fd5b5061033d61043336600461368a565b610b3a565b34801561044457600080fd5b50610272610453366004613569565b610be6565b34801561046457600080fd5b50610272610473366004613569565b610c80565b34801561048457600080fd5b506103ea7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104b857600080fd5b5060125b60405160ff90911681526020016102a2565b3480156104da57600080fd5b50600a546103ea565b3480156104ef57600080fd5b506103ea60115481565b34801561050557600080fd5b50600b54600160a01b900460ff1661033d565b34801561052457600080fd5b5061033d6105333660046135f1565b610d17565b34801561054457600080fd5b50600e54600f54601054604080516001600160a01b039485168152939092166020840152908201526060016102a2565b34801561058057600080fd5b5061027261058f3660046135f1565b610d53565b3480156105a057600080fd5b506102726105af3660046136cb565b610e24565b3480156105c057600080fd5b50610272610e2e565b3480156105d557600080fd5b506102726105e4366004613569565b610f15565b3480156105f557600080fd5b5061027261060436600461368a565b611057565b34801561061557600080fd5b5061028e61062436600461381e565b6111ab565b34801561063557600080fd5b5060016104bc565b34801561064957600080fd5b506103ea610658366004613569565b6001600160a01b031660009081526020819052604090205490565b34801561067f57600080fd5b5061027261068e3660046135f1565b611491565b34801561069f57600080fd5b506103ea6106ae366004613569565b60126020526000908152604090205481565b3480156106cc57600080fd5b50610272611517565b3480156106e157600080fd5b506103ea6106f03660046138a6565b611571565b34801561070157600080fd5b5061031061173e565b34801561071657600080fd5b5061033d610725366004613569565b61174d565b34801561073657600080fd5b50610272610745366004613569565b6117c8565b34801561075657600080fd5b506102726107653660046139a0565b61185f565b34801561077657600080fd5b5061033d6107853660046135f1565b611d10565b34801561079657600080fd5b5061033d6107a53660046135f1565b611da9565b3480156107b657600080fd5b5061033d6107c5366004613569565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107ef57600080fd5b506102726107fe366004613569565b611db6565b34801561080f57600080fd5b5061027261081e366004613a4d565b611e4d565b34801561082f57600080fd5b506103ea611f7e565b34801561084457600080fd5b5061033d610853366004613b0b565b611f94565b34801561086457600080fd5b50610272610873366004613bfc565b6120ce565b34801561088457600080fd5b506103ea610893366004613c6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102726122e0565b3480156108d257600080fd5b5061028e612320565b3480156108e757600080fd5b506103ea670de0b6b3a764000081565b34801561090357600080fd5b5061028e6109123660046136cb565b6123b5565b34801561092357600080fd5b5060135461028e906001600160a01b031681565b60606008805461094690613ca3565b80601f016020809104026020016040519081016040528092919081815260200182805461097290613ca3565b80156109bf5780601f10610994576101008083540402835291602001916109bf565b820191906000526020600020905b8154815290600101906020018083116109a257829003601f168201915b5050505050905090565b60006109d63384846123df565b50600192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d9190613cde565b60200151610a765760405162461bcd60e51b8152600401610a6d90613d63565b60405180910390fd5b60026007541415610a995760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051636b14d00560e11b81526001600160a01b038781166004830152306024830152604482018790526064820186905233608483015283811660a48301529091169063d629a00a9060c401600060405180830381600087803b158015610b0757600080fd5b505af1158015610b1b573d6000803e3d6000fd5b505050508115610b2e57610b2e85612503565b50506001600755505050565b6000610b47848484612605565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bcc5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610a6d565b610bd985338584036123df565b60019150505b9392505050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190613cde565b60200151610c745760405162461bcd60e51b8152600401610a6d90613d63565b610c7d816127d5565b50565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cee9190613cde565b60200151610d0e5760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612836565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916109d6918590610d4e908690613de5565b6123df565b3360009081526005602052604090205460ff16610db25760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610a6d565b600a54610dc882610dc260025490565b90612896565b1115610e165760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610a6d565b610e2082826128a2565b5050565b610c7d3382612981565b600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190613dfd565b6001600160a01b0316336001600160a01b031614610efb5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610a6d565b610f03612acf565b600d80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610fa65750600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613cde565b602001515b6110065760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610a6d565b61100f81612b7e565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600e546001600160a01b031633146110c45760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610a6d565b6001600160a01b03831661112b5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610a6d565b600e80546001600160a01b038581166001600160a01b03199283168117909355600f80549186169190921681179091556010839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156111f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121a9190613cde565b6020015161123a5760405162461bcd60e51b8152600401610a6d90613d63565b600254156112965760405162461bcd60e51b8152602060048201526024808201527f455243323054656d706c6174653a20746f6b656e7320616c7265616479206d696044820152631b9d195960e21b6064820152608401610a6d565b6112b9826000815181106112ac576112ac613e1a565b6020026020010151612503565b62250490846003815181106112d0576112d0613e1a565b6020026020010151116113375760405162461bcd60e51b815260206004820152602960248201527f455243323054656d706c6174653a206d696e696d756d20626c6f636b73206e6f6044820152681d081c995858da195960ba1b6064820152608401610a6d565b60006040518060400160405280306001600160a01b03166001600160a01b031681526020018460018151811061136f5761136f613e1a565b60209081029190910101516001600160a01b0390811690915260135460405163ee3bc63560e01b8152929350169063ee3bc635906113b7908490899089908990600401613ea4565b6020604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190613dfd565b91507fd02da1bec30f7f750aa0a131745dfb9ce96767c45a192dc26409f5d690e0b967828460008151811061143157611431613e1a565b60200260200101518560018151811061144c5761144c613e1a565b6020026020010151604051611481939291906001600160a01b0393841681529183166020830152909116604082015260600190565b60405180910390a1509392505050565b600061149d8333610893565b9050818110156114fb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610a6d565b61150883338484036123df565b6115128383612981565b505050565b600c546001600160a01b03163314610efb5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610a6d565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190613cde565b602001516116005760405162461bcd60e51b8152600401610a6d90613d63565b600260075414156116235760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051638244937560e01b81526001600160a01b039091169063824493759061165c90879087908790600401613f0f565b6020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190613f4f565b90506000826004815181106116b6576116b6613e1a565b602002602001015111156116cd576116cd84612503565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061170257611702613e1a565b602002602001015160405161172a9291909182526001600160a01b0316602082015260400190565b60405180910390a160016007559392505050565b60606009805461094690613ca3565b600c5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af115801561179a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117be9190613cde565b6020015192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190613cde565b602001516118565760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612503565b600260075414156118825760405162461bcd60e51b8152600401610a6d90613d98565b600260075533600090815260208190526040812054670de0b6b3a764000091908211156118ff5760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610a6d565b600e5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a3600060105411801561197a5750600f546001600160a01b031615155b80156119905750600e546001600160a01b031615155b15611abb57601054600f546119b4916001600160a01b039091169033903090612ba0565b6010546119c2906064612c0b565b600e546010549192506119f8916001600160a01b03909116906119e59084612c17565b600f546001600160a01b03169190612c23565b600f54600e546010546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b490611a3d9085612c17565b60405190815260200160405180910390a38015611abb57600b54600f54611a71916001600160a01b03918216911683612c23565b600f54600b546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c604051602001611b0f9493929190613f68565b60405160208183030381529060405280519060200120604051602001611b36929190613fae565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015611ba1573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b031614611c055760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610a6d565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051611c50959493929190613fd0565b60405180910390a360008a118015611c7057506001600160a01b038b1615155b8015611c8457506001600160a01b038c1615155b15611c9e57611c9e6001600160a01b038c16338e8d612ba0565b611caf611ca9612320565b86611da9565b611cfb5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f2073656e6420445420746f207075626c697368657200006044820152606401610a6d565b50506001600755505050505050505050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611d925760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a6d565b611d9f33858584036123df565b5060019392505050565b60006109d6338484612605565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cde565b60200151611e445760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612c53565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190613cde565b60200151611edb5760405162461bcd60e51b8152600401610a6d90613d63565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600c546301caf8fd60e31b83529092506001600160a01b031690630e57c7e890611f4790849087908790600401614009565b600060405180830381600087803b158015611f6157600080fd5b505af1158015611f75573d6000803e3d6000fd5b50505050505050565b611f916064670de0b6b3a764000061403f565b81565b600b54600090600160a01b900460ff161561200b5760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610a6d565b6120bf6120188b8d614061565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920191909152506120ba92508991508a90506140e9565b612d61565b9b9a5050505050505050505050565b438410156121115760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610a6d565b6011546001600160a01b038816600090815260126020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b91908761216483614151565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e001604051602081830303815290604052805190602001206040516020016121dd92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612248573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061227e5750886001600160a01b0316816001600160a01b0316145b6122ca5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610a6d565b6122d58989896123df565b505050505050505050565b6122e8612320565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c7d573d6000803e3d6000fd5b600d546000906001600160a01b03166123a557600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561237c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a09190613dfd565b905090565b50600d546001600160a01b031690565b600681815481106123c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0383166124415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b6001600160a01b0382166124a25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a6d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0381166000908152600560205260409020805460ff161561256d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610a6d565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166126695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a6d565b6001600160a01b0382166126cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a6d565b6001600160a01b038316600090815260208190526040902054818110156127435760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a6d565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061277a908490613de5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516127c691815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906125f99042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906125f99042904390918252602082015260400190565b6000610bdf8284613de5565b6001600160a01b0382166128f85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a6d565b806002600082825461290a9190613de5565b90915550506001600160a01b03821660009081526020819052604081208054839290612937908490613de5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166129e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a6d565b6001600160a01b03821660009081526020819052604090205481811015612a555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a6d565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612a8490849061416c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612b355760006005600060068481548110612af557612af5613e1a565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612b2d81614151565b915050612ad2565b50612b426006600061349d565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03808516602483015283166044820152606481018290526127cf9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613253565b6000610bdf828461403f565b6000610bdf828461416c565b6040516001600160a01b03831660248201526044810182905261151290849063a9059cbb60e01b90606401612bd4565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612ccd5760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610a6d565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016125f9565b60008084600081518110612d7757612d77613e1a565b60200260200101519050600085600181518110612d9657612d96613e1a565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612e185760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610a6d565b6001600160a01b038116612e945760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610a6d565b84600081518110612ea757612ea7613e1a565b602002602001015160001415612f0b5760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610a6d565b84600081518110612f1e57612f1e613e1a565b6020026020010151600a8190555087600081518110612f3f57612f3f613e1a565b602002602001015160089080519060200190612f5c9291906134bb565b5087600181518110612f7057612f70613e1a565b602002602001015160099080519060200190612f8d9291906134bb565b50600c80546001600160a01b0319166001600160a01b038416179055855186906002908110612fbe57612fbe613e1a565b6020908102919091010151601380546001600160a01b039283166001600160a01b0319909116179055600b80546001600160a81b03191691831691909117600160a01b179055865161301b9088906000906112ac576112ac613e1a565b60006001600160a01b03168760018151811061303957613039613e1a565b60200260200101516001600160a01b0316146130e3576130728760018151811061306557613065613e1a565b6020026020010151612b7e565b8660018151811061308557613085613e1a565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516130da929190918252602082015260400190565b60405180910390a35b866002815181106130f6576130f6613e1a565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061313757613137613e1a565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061317857613178613e1a565b602002602001015160108190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60086040516131bb9190614183565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206011555050600b54600160a01b900460ff16979650505050505050565b60006132a8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133259092919063ffffffff16565b80519091501561151257808060200190518101906132c6919061421f565b6115125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a6d565b6060613334848460008561333c565b949350505050565b60608247101561339d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a6d565b843b6133eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a6d565b600080866001600160a01b03168587604051613407919061423c565b60006040518083038185875af1925050503d8060008114613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5091509150613459828286613464565b979650505050505050565b60608315613473575081610bdf565b8251156134835782518084602001fd5b8160405162461bcd60e51b8152600401610a6d91906135de565b5080546000825590600052602060002090810190610c7d919061353f565b8280546134c790613ca3565b90600052602060002090601f0160209004810192826134e9576000855561352f565b82601f1061350257805160ff191683800117855561352f565b8280016001018555821561352f579182015b8281111561352f578251825591602001919060010190613514565b5061353b92915061353f565b5090565b5b8082111561353b5760008155600101613540565b6001600160a01b0381168114610c7d57600080fd5b60006020828403121561357b57600080fd5b8135610bdf81613554565b60005b838110156135a1578181015183820152602001613589565b838111156127cf5750506000910152565b600081518084526135ca816020860160208601613586565b601f01601f19169290920160200192915050565b602081526000610bdf60208301846135b2565b6000806040838503121561360457600080fd5b823561360f81613554565b946020939093013593505050565b8015158114610c7d57600080fd5b600080600080600060a0868803121561364357600080fd5b853561364e81613554565b94506020860135935060408601359250606086013561366c8161361d565b9150608086013561367c81613554565b809150509295509295909350565b60008060006060848603121561369f57600080fd5b83356136aa81613554565b925060208401356136ba81613554565b929592945050506040919091013590565b6000602082840312156136dd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613723576137236136e4565b604052919050565b600067ffffffffffffffff821115613745576137456136e4565b5060051b60200190565b600082601f83011261376057600080fd5b813560206137756137708361372b565b6136fa565b82815260059290921b8401810191818101908684111561379457600080fd5b8286015b848110156137af5780358352918301918301613798565b509695505050505050565b600082601f8301126137cb57600080fd5b813560206137db6137708361372b565b82815260059290921b840181019181810190868411156137fa57600080fd5b8286015b848110156137af57803561381181613554565b83529183019183016137fe565b60008060006060848603121561383357600080fd5b833567ffffffffffffffff8082111561384b57600080fd5b6138578783880161374f565b9450602086013591508082111561386d57600080fd5b6138798783880161374f565b9350604086013591508082111561388f57600080fd5b5061389c868287016137ba565b9150509250925092565b6000806000606084860312156138bb57600080fd5b83356138c681613554565b9250602084013567ffffffffffffffff808211156138e357600080fd5b6138ef878388016137ba565b9350604086013591508082111561390557600080fd5b5061389c8682870161374f565b803560ff8116811461392357600080fd5b919050565b600067ffffffffffffffff831115613942576139426136e4565b613955601f8401601f19166020016136fa565b905082815283838301111561396957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261399157600080fd5b610bdf83833560208501613928565b60008060008060008060008060006101208a8c0312156139bf57600080fd5b89356139ca81613554565b985060208a0135975060408a01356139e181613554565b965060608a01356139f181613554565b955060808a01359450613a0660a08b01613912565b935060c08a0135925060e08a013591506101008a013567ffffffffffffffff811115613a3157600080fd5b613a3d8c828d01613980565b9150509295985092959850929598565b60008060208385031215613a6057600080fd5b823567ffffffffffffffff80821115613a7857600080fd5b818501915085601f830112613a8c57600080fd5b813581811115613a9b57600080fd5b866020828501011115613aad57600080fd5b60209290920196919550909350505050565b60008083601f840112613ad157600080fd5b50813567ffffffffffffffff811115613ae957600080fd5b6020830191508360208260051b8501011115613b0457600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613b2a57600080fd5b8a3567ffffffffffffffff80821115613b4257600080fd5b613b4e8e838f01613abf565b909c509a5060208d0135915080821115613b6757600080fd5b613b738e838f01613abf565b909a50985060408d0135915080821115613b8c57600080fd5b613b988e838f01613abf565b909850965060608d0135915080821115613bb157600080fd5b613bbd8e838f01613abf565b909650945060808d0135915080821115613bd657600080fd5b50613be38d828e01613abf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613c1757600080fd5b8735613c2281613554565b96506020880135613c3281613554565b95506040880135945060608801359350613c4e60808901613912565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613c7d57600080fd5b8235613c8881613554565b91506020830135613c9881613554565b809150509250929050565b600181811c90821680613cb757607f821691505b60208210811415613cd857634e487b7160e01b600052602260045260246000fd5b50919050565b600060808284031215613cf057600080fd5b6040516080810181811067ffffffffffffffff82111715613d1357613d136136e4565b6040528251613d218161361d565b81526020830151613d318161361d565b60208201526040830151613d448161361d565b60408201526060830151613d578161361d565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613df857613df8613dcf565b500190565b600060208284031215613e0f57600080fd5b8151610bdf81613554565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015613e6057815187529582019590820190600101613e44565b509495945050505050565b600081518084526020808501945080840160005b83811015613e605781516001600160a01b031687529582019590820190600101613e7f565b60008186825b6002811015613ed25781516001600160a01b0316835260209283019290910190600101613eaa565b50505060a06040830152613ee960a0830186613e30565b8281036060840152613efb8186613e30565b905082810360808401526134598185613e6b565b6001600160a01b0384168152606060208201819052600090613f3390830185613e6b565b8281036040840152613f458185613e30565b9695505050505050565b600060208284031215613f6157600080fd5b5051919050565b60008551613f7a818460208a01613586565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b60008351613fc0818460208801613586565b9190910191825250602001919050565b85815260a060208201526000613fe960a08301876135b2565b60ff95909516604083015250606081019290925260809091015292915050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261405c57634e487b7160e01b600052601260045260246000fd5b500490565b600061406f6137708461372b565b80848252602080830192508560051b85013681111561408d57600080fd5b855b818110156140dd57803567ffffffffffffffff8111156140af5760008081fd5b870136601f8201126140c15760008081fd5b6140cf368235868401613928565b86525093820193820161408f565b50919695505050505050565b60006140f76137708461372b565b80848252602080830192508560051b85013681111561411557600080fd5b855b818110156140dd57803567ffffffffffffffff8111156141375760008081fd5b61414336828a01613980565b865250938201938201614117565b600060001982141561416557614165613dcf565b5060010190565b60008282101561417e5761417e613dcf565b500390565b600080835481600182811c91508083168061419f57607f831692505b60208084108214156141bf57634e487b7160e01b86526022600452602486fd5b8180156141d357600181146141e457614211565b60ff19861689528489019650614211565b60008a81526020902060005b868110156142095781548b8201529085019083016141f0565b505084890196505b509498975050505050505050565b60006020828403121561423157600080fd5b8151610bdf8161361d565b6000825161424e818460208701613586565b919091019291505056fea2646970667358221220d238578f5cc11933648d20be9ee5e6703e39313ad340c2b000bb26ac3b3e034564736f6c634300080a0033",deployedBytecode:"0x6080604052600436106102725760003560e01c80635d1ca6311161014e578063aa271e1a116100bb578063dd62ed3e11610077578063dd62ed3e14610878578063e086e5ec146108be578063e487c2e8146108c6578063ec342ad0146108db578063ef867ff4146108f7578063f887ea401461091757005b8063aa271e1a146107aa578063aa492ef9146107e3578063ab62f0e114610803578063b2263a5d14610823578063b3998be014610838578063d505accf1461085857005b806395d89b411161010a57806395d89b41146106f557806396fb3eaf1461070a578063983b2d561461072a5780639b4f44b61461074a578063a457c2d71461076a578063a9059cbb1461078a57005b80635d1ca6311461062957806370a082311461063d57806379cc6790146106735780637ecebe001461069357806382c03da5146106c05780638b96412b146106d557005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461057457806342966c68146105945780634f189cb2146105b457806357a3a31b146105c957806357ad5ff6146105e95780635bfe4da01461060957005b8063313ce567146104ac578063355274ea146104ce5780633644e515146104e3578063392e53cd146104f95780633950935114610518578063397b37431461053857005b806318160ddd1161023b57806318160ddd146103d9578063191c918a146103f857806323b872dd1461041857806325b00243146104385780633092afd51461045857806330adf81f1461047857005b80627ffb781461027457806301e88208146102ab57806306fdde03146102fb578063095ea7b31461031d578063160a79251461034d575b005b34801561028057600080fd5b50600c546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b757600080fd5b506102e46102c6366004613569565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102a2565b34801561030757600080fd5b50610310610937565b6040516102a291906135de565b34801561032957600080fd5b5061033d6103383660046135f1565b6109c9565b60405190151581526020016102a2565b34801561035957600080fd5b506103ba610368366004613569565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102a2565b3480156103e557600080fd5b506002545b6040519081526020016102a2565b34801561040457600080fd5b5061027261041336600461362b565b6109df565b34801561042457600080fd5b5061033d61043336600461368a565b610b3a565b34801561044457600080fd5b50610272610453366004613569565b610be6565b34801561046457600080fd5b50610272610473366004613569565b610c80565b34801561048457600080fd5b506103ea7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104b857600080fd5b5060125b60405160ff90911681526020016102a2565b3480156104da57600080fd5b50600a546103ea565b3480156104ef57600080fd5b506103ea60115481565b34801561050557600080fd5b50600b54600160a01b900460ff1661033d565b34801561052457600080fd5b5061033d6105333660046135f1565b610d17565b34801561054457600080fd5b50600e54600f54601054604080516001600160a01b039485168152939092166020840152908201526060016102a2565b34801561058057600080fd5b5061027261058f3660046135f1565b610d53565b3480156105a057600080fd5b506102726105af3660046136cb565b610e24565b3480156105c057600080fd5b50610272610e2e565b3480156105d557600080fd5b506102726105e4366004613569565b610f15565b3480156105f557600080fd5b5061027261060436600461368a565b611057565b34801561061557600080fd5b5061028e61062436600461381e565b6111ab565b34801561063557600080fd5b5060016104bc565b34801561064957600080fd5b506103ea610658366004613569565b6001600160a01b031660009081526020819052604090205490565b34801561067f57600080fd5b5061027261068e3660046135f1565b611491565b34801561069f57600080fd5b506103ea6106ae366004613569565b60126020526000908152604090205481565b3480156106cc57600080fd5b50610272611517565b3480156106e157600080fd5b506103ea6106f03660046138a6565b611571565b34801561070157600080fd5b5061031061173e565b34801561071657600080fd5b5061033d610725366004613569565b61174d565b34801561073657600080fd5b50610272610745366004613569565b6117c8565b34801561075657600080fd5b506102726107653660046139a0565b61185f565b34801561077657600080fd5b5061033d6107853660046135f1565b611d10565b34801561079657600080fd5b5061033d6107a53660046135f1565b611da9565b3480156107b657600080fd5b5061033d6107c5366004613569565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107ef57600080fd5b506102726107fe366004613569565b611db6565b34801561080f57600080fd5b5061027261081e366004613a4d565b611e4d565b34801561082f57600080fd5b506103ea611f7e565b34801561084457600080fd5b5061033d610853366004613b0b565b611f94565b34801561086457600080fd5b50610272610873366004613bfc565b6120ce565b34801561088457600080fd5b506103ea610893366004613c6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102726122e0565b3480156108d257600080fd5b5061028e612320565b3480156108e757600080fd5b506103ea670de0b6b3a764000081565b34801561090357600080fd5b5061028e6109123660046136cb565b6123b5565b34801561092357600080fd5b5060135461028e906001600160a01b031681565b60606008805461094690613ca3565b80601f016020809104026020016040519081016040528092919081815260200182805461097290613ca3565b80156109bf5780601f10610994576101008083540402835291602001916109bf565b820191906000526020600020905b8154815290600101906020018083116109a257829003601f168201915b5050505050905090565b60006109d63384846123df565b50600192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d9190613cde565b60200151610a765760405162461bcd60e51b8152600401610a6d90613d63565b60405180910390fd5b60026007541415610a995760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051636b14d00560e11b81526001600160a01b038781166004830152306024830152604482018790526064820186905233608483015283811660a48301529091169063d629a00a9060c401600060405180830381600087803b158015610b0757600080fd5b505af1158015610b1b573d6000803e3d6000fd5b505050508115610b2e57610b2e85612503565b50506001600755505050565b6000610b47848484612605565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bcc5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610a6d565b610bd985338584036123df565b60019150505b9392505050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190613cde565b60200151610c745760405162461bcd60e51b8152600401610a6d90613d63565b610c7d816127d5565b50565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cee9190613cde565b60200151610d0e5760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612836565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916109d6918590610d4e908690613de5565b6123df565b3360009081526005602052604090205460ff16610db25760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610a6d565b600a54610dc882610dc260025490565b90612896565b1115610e165760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610a6d565b610e2082826128a2565b5050565b610c7d3382612981565b600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190613dfd565b6001600160a01b0316336001600160a01b031614610efb5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610a6d565b610f03612acf565b600d80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610fa65750600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613cde565b602001515b6110065760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610a6d565b61100f81612b7e565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600e546001600160a01b031633146110c45760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610a6d565b6001600160a01b03831661112b5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610a6d565b600e80546001600160a01b038581166001600160a01b03199283168117909355600f80549186169190921681179091556010839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156111f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121a9190613cde565b6020015161123a5760405162461bcd60e51b8152600401610a6d90613d63565b600254156112965760405162461bcd60e51b8152602060048201526024808201527f455243323054656d706c6174653a20746f6b656e7320616c7265616479206d696044820152631b9d195960e21b6064820152608401610a6d565b6112b9826000815181106112ac576112ac613e1a565b6020026020010151612503565b62250490846003815181106112d0576112d0613e1a565b6020026020010151116113375760405162461bcd60e51b815260206004820152602960248201527f455243323054656d706c6174653a206d696e696d756d20626c6f636b73206e6f6044820152681d081c995858da195960ba1b6064820152608401610a6d565b60006040518060400160405280306001600160a01b03166001600160a01b031681526020018460018151811061136f5761136f613e1a565b60209081029190910101516001600160a01b0390811690915260135460405163ee3bc63560e01b8152929350169063ee3bc635906113b7908490899089908990600401613ea4565b6020604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190613dfd565b91507fd02da1bec30f7f750aa0a131745dfb9ce96767c45a192dc26409f5d690e0b967828460008151811061143157611431613e1a565b60200260200101518560018151811061144c5761144c613e1a565b6020026020010151604051611481939291906001600160a01b0393841681529183166020830152909116604082015260600190565b60405180910390a1509392505050565b600061149d8333610893565b9050818110156114fb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610a6d565b61150883338484036123df565b6115128383612981565b505050565b600c546001600160a01b03163314610efb5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610a6d565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190613cde565b602001516116005760405162461bcd60e51b8152600401610a6d90613d63565b600260075414156116235760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051638244937560e01b81526001600160a01b039091169063824493759061165c90879087908790600401613f0f565b6020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190613f4f565b90506000826004815181106116b6576116b6613e1a565b602002602001015111156116cd576116cd84612503565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061170257611702613e1a565b602002602001015160405161172a9291909182526001600160a01b0316602082015260400190565b60405180910390a160016007559392505050565b60606009805461094690613ca3565b600c5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af115801561179a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117be9190613cde565b6020015192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190613cde565b602001516118565760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612503565b600260075414156118825760405162461bcd60e51b8152600401610a6d90613d98565b600260075533600090815260208190526040812054670de0b6b3a764000091908211156118ff5760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610a6d565b600e5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a3600060105411801561197a5750600f546001600160a01b031615155b80156119905750600e546001600160a01b031615155b15611abb57601054600f546119b4916001600160a01b039091169033903090612ba0565b6010546119c2906064612c0b565b600e546010549192506119f8916001600160a01b03909116906119e59084612c17565b600f546001600160a01b03169190612c23565b600f54600e546010546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b490611a3d9085612c17565b60405190815260200160405180910390a38015611abb57600b54600f54611a71916001600160a01b03918216911683612c23565b600f54600b546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c604051602001611b0f9493929190613f68565b60405160208183030381529060405280519060200120604051602001611b36929190613fae565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015611ba1573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b031614611c055760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610a6d565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051611c50959493929190613fd0565b60405180910390a360008a118015611c7057506001600160a01b038b1615155b8015611c8457506001600160a01b038c1615155b15611c9e57611c9e6001600160a01b038c16338e8d612ba0565b611caf611ca9612320565b86611da9565b611cfb5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f2073656e6420445420746f207075626c697368657200006044820152606401610a6d565b50506001600755505050505050505050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611d925760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a6d565b611d9f33858584036123df565b5060019392505050565b60006109d6338484612605565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cde565b60200151611e445760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612c53565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190613cde565b60200151611edb5760405162461bcd60e51b8152600401610a6d90613d63565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600c546301caf8fd60e31b83529092506001600160a01b031690630e57c7e890611f4790849087908790600401614009565b600060405180830381600087803b158015611f6157600080fd5b505af1158015611f75573d6000803e3d6000fd5b50505050505050565b611f916064670de0b6b3a764000061403f565b81565b600b54600090600160a01b900460ff161561200b5760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610a6d565b6120bf6120188b8d614061565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920191909152506120ba92508991508a90506140e9565b612d61565b9b9a5050505050505050505050565b438410156121115760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610a6d565b6011546001600160a01b038816600090815260126020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b91908761216483614151565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e001604051602081830303815290604052805190602001206040516020016121dd92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612248573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061227e5750886001600160a01b0316816001600160a01b0316145b6122ca5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610a6d565b6122d58989896123df565b505050505050505050565b6122e8612320565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c7d573d6000803e3d6000fd5b600d546000906001600160a01b03166123a557600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561237c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a09190613dfd565b905090565b50600d546001600160a01b031690565b600681815481106123c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0383166124415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b6001600160a01b0382166124a25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a6d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0381166000908152600560205260409020805460ff161561256d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610a6d565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166126695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a6d565b6001600160a01b0382166126cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a6d565b6001600160a01b038316600090815260208190526040902054818110156127435760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a6d565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061277a908490613de5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516127c691815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906125f99042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906125f99042904390918252602082015260400190565b6000610bdf8284613de5565b6001600160a01b0382166128f85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a6d565b806002600082825461290a9190613de5565b90915550506001600160a01b03821660009081526020819052604081208054839290612937908490613de5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166129e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a6d565b6001600160a01b03821660009081526020819052604090205481811015612a555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a6d565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612a8490849061416c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612b355760006005600060068481548110612af557612af5613e1a565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612b2d81614151565b915050612ad2565b50612b426006600061349d565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03808516602483015283166044820152606481018290526127cf9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613253565b6000610bdf828461403f565b6000610bdf828461416c565b6040516001600160a01b03831660248201526044810182905261151290849063a9059cbb60e01b90606401612bd4565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612ccd5760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610a6d565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016125f9565b60008084600081518110612d7757612d77613e1a565b60200260200101519050600085600181518110612d9657612d96613e1a565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612e185760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610a6d565b6001600160a01b038116612e945760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610a6d565b84600081518110612ea757612ea7613e1a565b602002602001015160001415612f0b5760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610a6d565b84600081518110612f1e57612f1e613e1a565b6020026020010151600a8190555087600081518110612f3f57612f3f613e1a565b602002602001015160089080519060200190612f5c9291906134bb565b5087600181518110612f7057612f70613e1a565b602002602001015160099080519060200190612f8d9291906134bb565b50600c80546001600160a01b0319166001600160a01b038416179055855186906002908110612fbe57612fbe613e1a565b6020908102919091010151601380546001600160a01b039283166001600160a01b0319909116179055600b80546001600160a81b03191691831691909117600160a01b179055865161301b9088906000906112ac576112ac613e1a565b60006001600160a01b03168760018151811061303957613039613e1a565b60200260200101516001600160a01b0316146130e3576130728760018151811061306557613065613e1a565b6020026020010151612b7e565b8660018151811061308557613085613e1a565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516130da929190918252602082015260400190565b60405180910390a35b866002815181106130f6576130f6613e1a565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061313757613137613e1a565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061317857613178613e1a565b602002602001015160108190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60086040516131bb9190614183565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206011555050600b54600160a01b900460ff16979650505050505050565b60006132a8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133259092919063ffffffff16565b80519091501561151257808060200190518101906132c6919061421f565b6115125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a6d565b6060613334848460008561333c565b949350505050565b60608247101561339d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a6d565b843b6133eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a6d565b600080866001600160a01b03168587604051613407919061423c565b60006040518083038185875af1925050503d8060008114613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5091509150613459828286613464565b979650505050505050565b60608315613473575081610bdf565b8251156134835782518084602001fd5b8160405162461bcd60e51b8152600401610a6d91906135de565b5080546000825590600052602060002090810190610c7d919061353f565b8280546134c790613ca3565b90600052602060002090601f0160209004810192826134e9576000855561352f565b82601f1061350257805160ff191683800117855561352f565b8280016001018555821561352f579182015b8281111561352f578251825591602001919060010190613514565b5061353b92915061353f565b5090565b5b8082111561353b5760008155600101613540565b6001600160a01b0381168114610c7d57600080fd5b60006020828403121561357b57600080fd5b8135610bdf81613554565b60005b838110156135a1578181015183820152602001613589565b838111156127cf5750506000910152565b600081518084526135ca816020860160208601613586565b601f01601f19169290920160200192915050565b602081526000610bdf60208301846135b2565b6000806040838503121561360457600080fd5b823561360f81613554565b946020939093013593505050565b8015158114610c7d57600080fd5b600080600080600060a0868803121561364357600080fd5b853561364e81613554565b94506020860135935060408601359250606086013561366c8161361d565b9150608086013561367c81613554565b809150509295509295909350565b60008060006060848603121561369f57600080fd5b83356136aa81613554565b925060208401356136ba81613554565b929592945050506040919091013590565b6000602082840312156136dd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613723576137236136e4565b604052919050565b600067ffffffffffffffff821115613745576137456136e4565b5060051b60200190565b600082601f83011261376057600080fd5b813560206137756137708361372b565b6136fa565b82815260059290921b8401810191818101908684111561379457600080fd5b8286015b848110156137af5780358352918301918301613798565b509695505050505050565b600082601f8301126137cb57600080fd5b813560206137db6137708361372b565b82815260059290921b840181019181810190868411156137fa57600080fd5b8286015b848110156137af57803561381181613554565b83529183019183016137fe565b60008060006060848603121561383357600080fd5b833567ffffffffffffffff8082111561384b57600080fd5b6138578783880161374f565b9450602086013591508082111561386d57600080fd5b6138798783880161374f565b9350604086013591508082111561388f57600080fd5b5061389c868287016137ba565b9150509250925092565b6000806000606084860312156138bb57600080fd5b83356138c681613554565b9250602084013567ffffffffffffffff808211156138e357600080fd5b6138ef878388016137ba565b9350604086013591508082111561390557600080fd5b5061389c8682870161374f565b803560ff8116811461392357600080fd5b919050565b600067ffffffffffffffff831115613942576139426136e4565b613955601f8401601f19166020016136fa565b905082815283838301111561396957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261399157600080fd5b610bdf83833560208501613928565b60008060008060008060008060006101208a8c0312156139bf57600080fd5b89356139ca81613554565b985060208a0135975060408a01356139e181613554565b965060608a01356139f181613554565b955060808a01359450613a0660a08b01613912565b935060c08a0135925060e08a013591506101008a013567ffffffffffffffff811115613a3157600080fd5b613a3d8c828d01613980565b9150509295985092959850929598565b60008060208385031215613a6057600080fd5b823567ffffffffffffffff80821115613a7857600080fd5b818501915085601f830112613a8c57600080fd5b813581811115613a9b57600080fd5b866020828501011115613aad57600080fd5b60209290920196919550909350505050565b60008083601f840112613ad157600080fd5b50813567ffffffffffffffff811115613ae957600080fd5b6020830191508360208260051b8501011115613b0457600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613b2a57600080fd5b8a3567ffffffffffffffff80821115613b4257600080fd5b613b4e8e838f01613abf565b909c509a5060208d0135915080821115613b6757600080fd5b613b738e838f01613abf565b909a50985060408d0135915080821115613b8c57600080fd5b613b988e838f01613abf565b909850965060608d0135915080821115613bb157600080fd5b613bbd8e838f01613abf565b909650945060808d0135915080821115613bd657600080fd5b50613be38d828e01613abf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613c1757600080fd5b8735613c2281613554565b96506020880135613c3281613554565b95506040880135945060608801359350613c4e60808901613912565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613c7d57600080fd5b8235613c8881613554565b91506020830135613c9881613554565b809150509250929050565b600181811c90821680613cb757607f821691505b60208210811415613cd857634e487b7160e01b600052602260045260246000fd5b50919050565b600060808284031215613cf057600080fd5b6040516080810181811067ffffffffffffffff82111715613d1357613d136136e4565b6040528251613d218161361d565b81526020830151613d318161361d565b60208201526040830151613d448161361d565b60408201526060830151613d578161361d565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613df857613df8613dcf565b500190565b600060208284031215613e0f57600080fd5b8151610bdf81613554565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015613e6057815187529582019590820190600101613e44565b509495945050505050565b600081518084526020808501945080840160005b83811015613e605781516001600160a01b031687529582019590820190600101613e7f565b60008186825b6002811015613ed25781516001600160a01b0316835260209283019290910190600101613eaa565b50505060a06040830152613ee960a0830186613e30565b8281036060840152613efb8186613e30565b905082810360808401526134598185613e6b565b6001600160a01b0384168152606060208201819052600090613f3390830185613e6b565b8281036040840152613f458185613e30565b9695505050505050565b600060208284031215613f6157600080fd5b5051919050565b60008551613f7a818460208a01613586565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b60008351613fc0818460208801613586565b9190910191825250602001919050565b85815260a060208201526000613fe960a08301876135b2565b60ff95909516604083015250606081019290925260809091015292915050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261405c57634e487b7160e01b600052601260045260246000fd5b500490565b600061406f6137708461372b565b80848252602080830192508560051b85013681111561408d57600080fd5b855b818110156140dd57803567ffffffffffffffff8111156140af5760008081fd5b870136601f8201126140c15760008081fd5b6140cf368235868401613928565b86525093820193820161408f565b50919695505050505050565b60006140f76137708461372b565b80848252602080830192508560051b85013681111561411557600080fd5b855b818110156140dd57803567ffffffffffffffff8111156141375760008081fd5b61414336828a01613980565b865250938201938201614117565b600060001982141561416557614165613dcf565b5060010190565b60008282101561417e5761417e613dcf565b500390565b600080835481600182811c91508083168061419f57607f831692505b60208084108214156141bf57634e487b7160e01b86526022600452602486fd5b8180156141d357600181146141e457614211565b60ff19861689528489019650614211565b60008a81526020902060005b868110156142095781548b8201529085019083016141f0565b505084890196505b509498975050505050505050565b60006020828403121561423157600080fd5b8151610bdf8161361d565b6000825161424e818460208701613586565b919091019291505056fea2646970667358221220d238578f5cc11933648d20be9ee5e6703e39313ad340c2b000bb26ac3b3e034564736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};const D="115792089237316195423570985008687907853269984665640564039457584007913129639934";class G{constructor(e,a,t=null){this.poolAbi=void 0,this.web3=void 0,this.GASLIMIT_DEFAULT=1e6,this.logger=void 0,this.poolAbi=t||O,this.web3=e,this.logger=a}async estApprove(e,a,t,b,n){const d=n||new this.web3.eth.Contract(P.abi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.approve(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f,c.error("estimate gas failed for approve!",e)}return s}async allowance(e,a,t){const b=new this.web3.eth.Contract(P.abi,e),n=await b.methods.allowance(a,t).call();return await this.unitsToAmount(e,n)}async approve(e,a,t,b,n=!1){const d=new this.web3.eth.Contract([{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],a);if(!n){const n=await this.allowance(a,e,t);if(new f(n).greaterThanOrEqualTo(new f(b)))return n}let s=null;const i=await this.amountToUnits(a,b),c=await this.estApprove(e,a,t,i);try{s=await d.methods.approve(t,i).send({from:e,gas:c+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERRPR: Failed to approve spender to spend tokens : ${e.message}`)}return s}async sharesBalance(e,a){let t=null;try{const b=new this.web3.eth.Contract(this.poolAbi,a),n=await b.methods.balanceOf(e).call();t=this.web3.utils.fromWei(n)}catch(e){this.logger.error(`ERROR: Failed to get shares of pool : ${e.message}`)}return t}async estSetSwapFee(e,a,t,b){const n=b||new this.web3.eth.Contract(P.abi,a),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setSwapFee(t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setSwapFee(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,a,{from:e});let n=null;const d=await this.estSetSwapFee(e,a,t);try{n=await b.methods.setSwapFee(this.web3.utils.toWei(t)).send({from:e,gas:d,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to set pool swap fee: ${e.message}`)}return n}async getNumTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getNumTokens().call()}catch(e){this.logger.error(`ERROR: Failed to get number of tokens: ${e.message}`)}return t}async getPoolSharesTotalSupply(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.totalSupply().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get total supply of pool shares: ${e.message}`)}return t}async getCurrentTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getCurrentTokens().call()}catch(e){this.logger.error(`ERROR: Failed to get tokens composing this pool: ${e.message}`)}return t}async getFinalTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getFinalTokens().call()}catch(e){this.logger.error("ERROR: Failed to get the final tokens composing this pool")}return t}async getController(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getController().call()}catch(e){this.logger.error(`ERROR: Failed to get pool controller address: ${e.message}`)}return t}async getBasetoken(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getBaseTokenAddress().call()}catch(e){this.logger.error(`ERROR: Failed to get basetoken address: ${e.message}`)}return t}async getDatatoken(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getDataTokenAddress().call()}catch(e){this.logger.error(`ERROR: Failed to get datatoken address: ${e.message}`)}return t}async getMarketFeeCollector(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods._publishMarketCollector().call()}catch(e){this.logger.error(`ERROR: Failed to get marketFeeCollector address: ${e.message}`)}return t}async getOPFCollector(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods._opfCollector().call()}catch(e){this.logger.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return t}async isBound(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{b=await t.methods.isBound(a).call()}catch(e){this.logger.error(`ERROR: Failed to check whether a token bounded to a pool. ${e.message}`)}return b}async getReserve(e,a){let t=null;try{const b=new this.web3.eth.Contract(this.poolAbi,e),n=await b.methods.getBalance(a).call();t=await this.unitsToAmount(a,n)}catch(e){this.logger.error(`ERROR: Failed to get how many tokens are in the pool: ${e.message}`)}return t.toString()}async isFinalized(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.isFinalized().call()}catch(e){this.logger.error(`ERROR: Failed to check whether pool is finalized: ${e.message}`)}return t}async getSwapFee(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.getSwapFee().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get pool fee: ${e.message}`)}return t}async getNormalizedWeight(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.getNormalizedWeight(a).call();b=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get normalized weight of a token: ${e.message}`)}return b}async getDenormalizedWeight(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.getDenormalizedWeight(a).call();b=this.web3.utils.fromWei(e)}catch(e){this.logger.error("ERROR: Failed to get denormalized weight of a token in pool")}return b}async getTotalDenormalizedWeight(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.getTotalDenormalizedWeight().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error("ERROR: Failed to get total denormalized weight in pool")}return t}async getMarketFees(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.publishMarketFees(a).call();b=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to get market fees for a token: ${e.message}`)}return b}async getCurrentMarketFees(e){const a=new this.web3.eth.Contract(this.poolAbi,e);try{return await a.methods.getCurrentOPFFees().call()}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}}async getCurrentOPFFees(e){const a=new this.web3.eth.Contract(this.poolAbi,e);try{return await a.methods.getCurrentOPFFees().call()}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}}async getCommunityFees(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.communityFees(a).call();b=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}return b}async estCollectOPF(e,a,t){const b=t||new this.web3.eth.Contract(this.poolAbi,a),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectOPF().estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectOPF(e,a){const t=new this.web3.eth.Contract(this.poolAbi,a);let b=null;const n=await this.estCollectOPF(e,a);try{b=await t.methods.collectOPF().send({from:e,gas:n+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return b}async estCollectMarketFee(e,a,t){const b=t||new this.web3.eth.Contract(this.poolAbi,a),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee().estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectMarketFee(e,a){if(await this.getMarketFeeCollector(a)!==e)throw new Error("Caller is not MarketFeeCollector");const t=new this.web3.eth.Contract(this.poolAbi,a);let b=null;const n=await this.estCollectMarketFee(e,a);try{b=await t.methods.collectMarketFee().send({from:e,gas:n+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return b}async estUpdateMarketFeeCollector(e,a,t,b){const n=b||new this.web3.eth.Contract(this.poolAbi,a),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFeeCollector(t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFeeCollector(e,a,t){if(await this.getMarketFeeCollector(a)!==e)throw new Error("Caller is not MarketFeeCollector");const b=new this.web3.eth.Contract(this.poolAbi,a);let n=null;const d=await this.estUpdateMarketFeeCollector(e,a,t);try{n=await b.methods.updateMarketFeeCollector(t).send({from:e,gas:d+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return n}async amountToUnits(a,t){try{const b=new this.web3.eth.Contract(P.abi,a);let n=await b.methods.decimals().call();"0"===n&&(n=18);const d=new e(parseInt(t)*10**n);return e.config({EXPONENTIAL_AT:50}),d.toString()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}}async unitsToAmount(a,t){try{const b=new this.web3.eth.Contract(P.abi,a);let n=await b.methods.decimals().call();return"0"===n&&(n=18),new e(parseInt(t)/10**n).toString()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}}async estSwapExactAmountIn(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D,s=this.GASLIMIT_DEFAULT;let i;try{i=await d.methods.swapExactAmountIn([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.tokenAmountIn,b.minAmountOut,f,this.web3.utils.toWei(b.swapMarketFee)]).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async swapExactAmountIn(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a);b.tokenAmountIn=await this.amountToUnits(t.tokenIn,b.tokenAmountIn),b.minAmountOut=await this.amountToUnits(t.tokenOut,b.minAmountOut);let d=null;const f=await this.estSwapExactAmountIn(e,a,t,b),s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;try{d=await n.methods.swapExactAmountIn([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.tokenAmountIn,b.minAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return d}async estSwapExactAmountOut(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT,s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;let i;try{i=await d.methods.swapExactAmountOut([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.maxAmountIn,b.tokenAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){i=f}return i}async swapExactAmountOut(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a);let d=null;b.maxAmountIn=await this.amountToUnits(t.tokenIn,b.maxAmountIn),b.tokenAmountOut=await this.amountToUnits(t.tokenOut,b.tokenAmountOut);const f=await this.estSwapExactAmountOut(e,a,t,b),s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;try{d=await n.methods.swapExactAmountOut([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.maxAmountIn,b.tokenAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount out: ${e.message}`)}return d}async estJoinPool(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.joinPool(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async joinPool(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a),d=[],f=await this.getFinalTokens(a);for(let e=0;e<2;e++){const a=await this.amountToUnits(f[e],b[e]);d.push(a)}let s=null;const i=await this.estJoinPool(e,a,this.web3.utils.toWei(t),d);try{s=await n.methods.joinPool(this.web3.utils.toWei(t),d).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to join pool: ${e.message}`)}return s}async estExitPool(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.exitPool(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async exitPool(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a),d=[],f=await this.getFinalTokens(a);for(let e=0;e<2;e++){const a=await this.amountToUnits(f[e],b[e]);d.push(a)}let s=null;const i=await this.estExitPool(e,a,this.web3.utils.toWei(t),d);try{s=await n.methods.exitPool(this.web3.utils.toWei(t),d).send({from:e,gas:i,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to exit pool: ${e.message}`)}return s}async estJoinswapExternAmountIn(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.joinswapExternAmountIn(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async joinswapExternAmountIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,b),i=await this.estJoinswapExternAmountIn(e,a,t,s,this.web3.utils.toWei(n));try{f=await d.methods.joinswapExternAmountIn(t,s,this.web3.utils.toWei(n)).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to pay tokens in order to join the pool: ${e.message}`)}return f}async estJoinswapPoolAmountOut(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.joinswapPoolAmountOut(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async joinswapPoolAmountOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,n),i=await this.estJoinswapPoolAmountOut(e,a,t,this.web3.utils.toWei(b),s);try{f=await d.methods.joinswapPoolAmountOut(t,this.web3.utils.toWei(b),s).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error("ERROR: Failed to join swap pool amount out")}return f}async estExitswapPoolAmountIn(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.exitswapPoolAmountIn(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async exitswapPoolAmountIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,n),i=await this.estExitswapPoolAmountIn(e,a,t,this.web3.utils.toWei(b),s);try{f=await d.methods.exitswapPoolAmountIn(t,this.web3.utils.toWei(b),s).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to pay pool shares into the pool: ${e.message}`)}return f}async estExitswapExternAmountOut(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.exitswapExternAmountOut(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async exitswapExternAmountOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.estExitswapExternAmountOut(e,a,t,this.web3.utils.toWei(b),this.web3.utils.toWei(n));try{f=await d.methods.exitswapExternAmountOut(t,this.web3.utils.toWei(b),this.web3.utils.toWei(n)).send({from:e,gas:s+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error("ERROR: Failed to exitswapExternAmountOut")}return f}async getSpotPrice(a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=18,s=18;const i=new this.web3.eth.Contract(P.abi,t),c=new this.web3.eth.Contract(P.abi,b);try{f=await i.methods.decimals().call()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}try{s=await c.methods.decimals().call()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}let r,o=null;try{o=await d.methods.getSpotPrice(t,b,this.web3.utils.toWei(n)).call(),o=new e(o.toString())}catch(e){this.logger.error("ERROR: Failed to get spot price of swapping tokenIn to tokenOut")}return f>s?(r=f-s,o=new e(o/10**r),o/=10**s):(r=s-f,o=new e(o*10**(2*r)),o/=10**s),o.toString()}async getAmountInExactOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,e),f=await this.amountToUnits(t,b);let s=null;try{const e=await d.methods.getAmountInExactOut(a,t,f,this.web3.utils.toWei(n)).call();s=await this.unitsToAmount(a,e)}catch(e){this.logger.error("ERROR: Failed to calcInGivenOut")}return s}async getAmountOutExactIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,e),f=await this.amountToUnits(a,b);let s=null;try{const e=await d.methods.getAmountOutExactIn(a,t,f,this.web3.utils.toWei(n)).call();s=await this.unitsToAmount(t,e)}catch(e){this.logger.error("ERROR: Failed to calcOutGivenIn")}return s}async calcPoolOutGivenSingleIn(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcPoolOutSingleIn(a,await this.amountToUnits(a,t)).call();n=await this.unitsToAmount(e,d)}catch(e){this.logger.error(`ERROR: Failed to calculate PoolOutGivenSingleIn : ${e.message}`)}return n}async calcSingleInGivenPoolOut(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;const d=await this.amountToUnits(e,t);try{const e=await b.methods.calcSingleInPoolOut(a,d).call();n=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to calculate SingleInGivenPoolOut : ${e.message}`)}return n}async calcSingleOutGivenPoolIn(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcSingleOutPoolIn(a,await this.amountToUnits(e,t)).call();n=await this.unitsToAmount(a,d)}catch(e){this.logger.error(`ERROR: Failed to calculate SingleOutGivenPoolIn : ${e}`)}return n}async calcPoolInGivenSingleOut(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcPoolInSingleOut(a,await this.amountToUnits(a,t)).call();n=await this.unitsToAmount(e,d)}catch(e){this.logger.error(`ERROR: Failed to calculate PoolInGivenSingleOut : ${e.message}`)}return n}getSwapEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_SWAP"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}getJoinEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_JOIN"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}getExitEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_EXIT"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}}var U={_format:"hh-sol-artifact-1",contractName:"Dispenser",sourceName:"contracts/pools/dispenser/Dispenser.sol",abi:[{inputs:[{internalType:"address",name:"_router",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"}],name:"DispenserActivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatoken",type:"address"},{indexed:!0,internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"DispenserAllowedSwapperChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"maxTokens",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxBalance",type:"uint256"},{indexed:!1,internalType:"address",name:"allowedSwapper",type:"address"}],name:"DispenserCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"}],name:"DispenserDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatoken",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"OwnerWithdrawed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensDispensed",type:"event"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"}],name:"activate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"allowedSwapper",type:"address"}],name:"create",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"datatokensList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"deactivate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"destination",type:"address"}],name:"dispense",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"ownerWithdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"setAllowedSwapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"status",outputs:[{internalType:"bool",name:"active",type:"bool"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"isMinter",type:"bool"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"address",name:"allowedSwapper",type:"address"}],stateMutability:"view",type:"function"}],bytecode:"0x608060405234801561001057600080fd5b5060405161160938038061160983398101604081905261002f916100b3565b60016000556001600160a01b03811661008e5760405162461bcd60e51b815260206004820152601f60248201527f44697370656e7365723a2057726f6e6720526f75746572206164647265737300604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b03929092169190911790556100e3565b6000602082840312156100c557600080fd5b81516001600160a01b03811681146100dc57600080fd5b9392505050565b611517806100f26000396000f3fe6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b604482015260640161024f565b6107246001600160a01b0387168587610fdf565b836001600160a01b0316866001600160a01b03167f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135438760405161076991815260200190565b60405180910390a35050600160005550505050565b6001546001600160a01b031633146107d15760405162461bcd60e51b81526020600482015260166024820152752234b9b832b739b2b91d1037b7363c903937baba32b960511b604482015260640161024f565b6001600160a01b0385166107f75760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03858116600090815260026020526040902054610100900416158061084457506001600160a01b0385811660009081526002602052604090205461010090048116908316145b6108905760405162461bcd60e51b815260206004820152601960248201527f44617461546f6b656e20616c7265616479206372656174656400000000000000604482015260640161024f565b6001600160a01b038581166000818152600260208181526040808420805489881661010081026001600160a81b031990921691909117600190811783558083018d90559482018b905560039182018054988a166001600160a01b0319998a16811790915582549586018355919095527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90930180549096168517909555845189815290810188905293840152917f7d0aa581e6eb87e15f58588ff20c39ff6622fc796ec9bb664df6ed3eb02442c99060600160405180910390a3806001600160a01b0316856001600160a01b03167fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca560405160405180910390a35050505050565b600381815481106109c157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116610a015760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610a6f5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f393f01061139648745ea000bb047bbe1785bd3a19d3a9c90f6747e1d2357d2b89190a250565b6001600160a01b038216610ade5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038281166000908152600260205260409020546101009004163314610b4c5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b0382811660008181526002602052604080822060030180546001600160a01b0319169486169485179055517fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca59190a35050565b60008080808080806001600160a01b038816610bd45760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b0388811660008181526002602081905260409182902080546001820154919092015492516370a0823160e01b815230600482015260ff83169c506101009092049094169950929650945089916370a0823190602401602060405180830381865afa158015610c4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c719190611402565b6040516355138f0d60e11b81523060048201529093506001600160a01b0382169063aa271e1a90602401602060405180830381865afa158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061141b565b6001600160a01b03998a16600090815260026020526040902060030154989a979990989597949650929490921692915050565b6001600160a01b038316610d355760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038381166000908152600260205260409020546101009004163314610d935760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6001600160a01b0383166000818152600260208190526040808320805460ff191660019081178255818101889055920185905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191684179055517fe9372084cb52c5392afee4b9d79d131e04b1e65676088d50a8f39fffb16a87459190a2505050565b60026000541415610e825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024f565b60026000556001600160a01b038116610ead5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610f0b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611402565b90508015610fd557610f946001600160a01b0384163383610fdf565b60405181815233906001600160a01b038516907f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9060200160405180910390a35b5050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611031908490611036565b505050565b600061108b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111089092919063ffffffff16565b80519091501561103157808060200190518101906110a9919061141b565b6110315760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161024f565b60606111178484600085611121565b90505b9392505050565b6060824710156111825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161024f565b843b6111d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024f565b600080866001600160a01b031685876040516111ec9190611492565b60006040518083038185875af1925050503d8060008114611229576040519150601f19603f3d011682016040523d82523d6000602084013e61122e565b606091505b509150915061123e828286611249565b979650505050505050565b6060831561125857508161111a565b8251156112685782518084602001fd5b8160405162461bcd60e51b815260040161024f91906114ae565b80356001600160a01b038116811461129957600080fd5b919050565b6000806000606084860312156112b357600080fd5b6112bc84611282565b9250602084013591506112d160408501611282565b90509250925092565b600080600080600060a086880312156112f257600080fd5b6112fb86611282565b9450602086013593506040860135925061131760608701611282565b915061132560808701611282565b90509295509295909350565b60006020828403121561134357600080fd5b5035919050565b60006020828403121561135c57600080fd5b61111a82611282565b6000806040838503121561137857600080fd5b61138183611282565b915061138f60208401611282565b90509250929050565b6000806000606084860312156113ad57600080fd5b6113b684611282565b95602085013595506040909401359392505050565b6020808252601e908201527f496e76616c696420746f6b656e20636f6e747261637420616464726573730000604082015260600190565b60006020828403121561141457600080fd5b5051919050565b60006020828403121561142d57600080fd5b8151801515811461111a57600080fd5b60008282101561145d57634e487b7160e01b600052601160045260246000fd5b500390565b60005b8381101561147d578181015183820152602001611465565b8381111561148c576000848401525b50505050565b600082516114a4818460208701611462565b9190910192915050565b60208152600082518060208401526114cd816040850160208701611462565b601f01601f1916919091016040019291505056fea2646970667358221220fb4b6a3a8a2f8ea9e99a8ff393a1aacd46b89c5c97ff6c190118e2b1d031179664736f6c634300080a0033",deployedBytecode:"0x6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b604482015260640161024f565b6107246001600160a01b0387168587610fdf565b836001600160a01b0316866001600160a01b03167f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135438760405161076991815260200190565b60405180910390a35050600160005550505050565b6001546001600160a01b031633146107d15760405162461bcd60e51b81526020600482015260166024820152752234b9b832b739b2b91d1037b7363c903937baba32b960511b604482015260640161024f565b6001600160a01b0385166107f75760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03858116600090815260026020526040902054610100900416158061084457506001600160a01b0385811660009081526002602052604090205461010090048116908316145b6108905760405162461bcd60e51b815260206004820152601960248201527f44617461546f6b656e20616c7265616479206372656174656400000000000000604482015260640161024f565b6001600160a01b038581166000818152600260208181526040808420805489881661010081026001600160a81b031990921691909117600190811783558083018d90559482018b905560039182018054988a166001600160a01b0319998a16811790915582549586018355919095527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90930180549096168517909555845189815290810188905293840152917f7d0aa581e6eb87e15f58588ff20c39ff6622fc796ec9bb664df6ed3eb02442c99060600160405180910390a3806001600160a01b0316856001600160a01b03167fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca560405160405180910390a35050505050565b600381815481106109c157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116610a015760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610a6f5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f393f01061139648745ea000bb047bbe1785bd3a19d3a9c90f6747e1d2357d2b89190a250565b6001600160a01b038216610ade5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038281166000908152600260205260409020546101009004163314610b4c5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b0382811660008181526002602052604080822060030180546001600160a01b0319169486169485179055517fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca59190a35050565b60008080808080806001600160a01b038816610bd45760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b0388811660008181526002602081905260409182902080546001820154919092015492516370a0823160e01b815230600482015260ff83169c506101009092049094169950929650945089916370a0823190602401602060405180830381865afa158015610c4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c719190611402565b6040516355138f0d60e11b81523060048201529093506001600160a01b0382169063aa271e1a90602401602060405180830381865afa158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061141b565b6001600160a01b03998a16600090815260026020526040902060030154989a979990989597949650929490921692915050565b6001600160a01b038316610d355760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038381166000908152600260205260409020546101009004163314610d935760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6001600160a01b0383166000818152600260208190526040808320805460ff191660019081178255818101889055920185905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191684179055517fe9372084cb52c5392afee4b9d79d131e04b1e65676088d50a8f39fffb16a87459190a2505050565b60026000541415610e825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024f565b60026000556001600160a01b038116610ead5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610f0b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611402565b90508015610fd557610f946001600160a01b0384163383610fdf565b60405181815233906001600160a01b038516907f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9060200160405180910390a35b5050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611031908490611036565b505050565b600061108b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111089092919063ffffffff16565b80519091501561103157808060200190518101906110a9919061141b565b6110315760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161024f565b60606111178484600085611121565b90505b9392505050565b6060824710156111825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161024f565b843b6111d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024f565b600080866001600160a01b031685876040516111ec9190611492565b60006040518083038185875af1925050503d8060008114611229576040519150601f19603f3d011682016040523d82523d6000602084013e61122e565b606091505b509150915061123e828286611249565b979650505050505050565b6060831561125857508161111a565b8251156112685782518084602001fd5b8160405162461bcd60e51b815260040161024f91906114ae565b80356001600160a01b038116811461129957600080fd5b919050565b6000806000606084860312156112b357600080fd5b6112bc84611282565b9250602084013591506112d160408501611282565b90509250925092565b600080600080600060a086880312156112f257600080fd5b6112fb86611282565b9450602086013593506040860135925061131760608701611282565b915061132560808701611282565b90509295509295909350565b60006020828403121561134357600080fd5b5035919050565b60006020828403121561135c57600080fd5b61111a82611282565b6000806040838503121561137857600080fd5b61138183611282565b915061138f60208401611282565b90509250929050565b6000806000606084860312156113ad57600080fd5b6113b684611282565b95602085013595506040909401359392505050565b6020808252601e908201527f496e76616c696420746f6b656e20636f6e747261637420616464726573730000604082015260600190565b60006020828403121561141457600080fd5b5051919050565b60006020828403121561142d57600080fd5b8151801515811461111a57600080fd5b60008282101561145d57634e487b7160e01b600052601160045260246000fd5b500390565b60005b8381101561147d578181015183820152602001611465565b8381111561148c576000848401525b50505050565b600082516114a4818460208701611462565b9190910192915050565b60208152600082518060208401526114cd816040850160208701611462565b601f01601f1916919091016040019291505056fea2646970667358221220fb4b6a3a8a2f8ea9e99a8ff393a1aacd46b89c5c97ff6c190118e2b1d031179664736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};class L{constructor(e,a=null,t=null,b){this.GASLIMIT_DEFAULT=1e6,this.web3=null,this.dispenserAddress=void 0,this.startBlock=void 0,this.dispenserAbi=void 0,this.dispenserContract=void 0,this.web3=e,this.dispenserAddress=a,this.startBlock=b||0,this.dispenserAbi=t||U.abi,e&&(this.dispenserContract=new this.web3.eth.Contract(this.dispenserAbi,this.dispenserAddress))}async status(e){try{const a=await this.dispenserContract.methods.status(e).call();return a.maxTokens=this.web3.utils.fromWei(a.maxTokens),a.maxBalance=this.web3.utils.fromWei(a.maxBalance),a.balance=this.web3.utils.fromWei(a.balance),a}catch(a){c.warn(`No dispenser available for data token: ${e}`)}return null}async estGasCreate(e,a,t,b,n){const d=this.GASLIMIT_DEFAULT;let f;try{f=await this.dispenserContract.methods.create(e,this.web3.utils.toWei(t),this.web3.utils.toWei(b),a,n).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async create(e,a,t,b,n){const d=await this.estGasCreate(e,a,t,b,n);return await this.dispenserContract.methods.create(e,this.web3.utils.toWei(t),this.web3.utils.toWei(b),a,n).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async estGasActivate(e,a,t,b){let n;const d=this.GASLIMIT_DEFAULT;try{n=await this.dispenserContract.methods.activate(e,this.web3.utils.toWei(a),this.web3.utils.toWei(t)).estimateGas({from:b},(e,a)=>e?d:a)}catch(e){n=d}return n}async activate(e,a,t,b){try{const n=await this.estGasActivate(e,a,t,b);return await this.dispenserContract.methods.activate(e,this.web3.utils.toWei(a),this.web3.utils.toWei(t)).send({from:b,gas:n+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasDeactivate(e,a){let t;const b=this.GASLIMIT_DEFAULT;try{t=await this.dispenserContract.methods.deactivate(e).estimateGas({from:a},(e,a)=>e?b:a)}catch(e){t=b}return t}async deactivate(e,a){try{const t=await this.estGasDeactivate(e,a);return await this.dispenserContract.methods.deactivate(e).send({from:a,gas:t+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasSetAllowedSwapper(e,a,t){let b;const n=this.GASLIMIT_DEFAULT;try{b=await this.dispenserContract.methods.setAllowedSwapper(e,t).estimateGas({from:a},(e,a)=>e?n:a)}catch(e){b=n}return b}async setAllowedSwapper(e,a,t){try{const b=await this.estGasSetAllowedSwapper(e,a,t);return await this.dispenserContract.methods.setAllowedSwapper(e,t).send({from:a,gas:b+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasDispense(e,a,t="1",b){let n;const d=this.GASLIMIT_DEFAULT;try{n=await this.dispenserContract.methods.dispense(e,this.web3.utils.toWei(t),b).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){n=d}return n}async dispense(e,a,t="1",b){const n=await this.estGasDispense(e,a,t,b);try{return await this.dispenserContract.methods.dispense(e,this.web3.utils.toWei(t),b).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to dispense tokens: ${e.message}`)}return null}async estGasOwnerWithdraw(e,a){let t;const b=this.GASLIMIT_DEFAULT;try{t=await this.dispenserContract.methods.ownerWithdraw(e).estimateGas({from:a},(e,a)=>e?b:a)}catch(e){t=b}return t}async ownerWithdraw(e,a){const t=await this.estGasOwnerWithdraw(e,a);try{return await this.dispenserContract.methods.ownerWithdraw(e).send({from:a,gas:t+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to withdraw tokens: ${e.message}`)}return null}async isDispensable(e,a,t,b="1"){const n=await this.status(e);return!(!n||!1===n.active||new f(await a.balance(e,t)).greaterThanOrEqualTo(n.maxBalance)||new f(String(b)).greaterThan(n.maxTokens)||!new f(n.balance).greaterThanOrEqualTo(b)&&!0!==n.isMinter)}}var _,N={_format:"hh-sol-artifact-1",contractName:"FixedRateExchange",sourceName:"contracts/pools/fixedRate/FixedRateExchange.sol",abi:[{inputs:[{internalType:"address",name:"_router",type:"address"},{internalType:"address",name:"_opfCollector",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"}],name:"ExchangeActivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"allowedSwapper",type:"address"}],name:"ExchangeAllowedSwapperChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"baseToken",type:"address"},{indexed:!0,internalType:"address",name:"dataToken",type:"address"},{indexed:!1,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"uint256",name:"fixedRate",type:"uint256"}],name:"ExchangeCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"}],name:"ExchangeDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"bool",name:"withMint",type:"bool"}],name:"ExchangeMintStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"uint256",name:"newRate",type:"uint256"}],name:"ExchangeRateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"feeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"MarketFeeCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"feeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"OceanFeeCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenSwappedAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dataTokenSwappedAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"tokenOutAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oceanFeeAmount",type:"uint256"}],name:"Swapped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenCollected",type:"event"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"maxBaseTokenAmount",type:"uint256"}],name:"buyDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"}],name:"calcBaseInGivenOutDT",outputs:[{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenAmountBeforeFee",type:"uint256"},{internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"}],name:"calcBaseOutGivenInDT",outputs:[{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenAmountBeforeFee",type:"uint256"},{internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectBT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectOceanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"dataToken",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createWithDecimals",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"baseToken",type:"address"},{internalType:"address",name:"dataToken",type:"address"},{internalType:"address",name:"exchangeOwner",type:"address"}],name:"generateExchangeId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getAllowedSwapper",outputs:[{internalType:"address",name:"allowedSwapper",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getBTSupply",outputs:[{internalType:"uint256",name:"supply",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getDTSupply",outputs:[{internalType:"uint256",name:"supply",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getExchange",outputs:[{internalType:"address",name:"exchangeOwner",type:"address"},{internalType:"address",name:"dataToken",type:"address"},{internalType:"uint256",name:"dtDecimals",type:"uint256"},{internalType:"address",name:"baseToken",type:"address"},{internalType:"uint256",name:"btDecimals",type:"uint256"},{internalType:"uint256",name:"fixedRate",type:"uint256"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"dtSupply",type:"uint256"},{internalType:"uint256",name:"btSupply",type:"uint256"},{internalType:"uint256",name:"dtBalance",type:"uint256"},{internalType:"uint256",name:"btBalance",type:"uint256"},{internalType:"bool",name:"withMint",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getExchanges",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getFeesInfo",outputs:[{internalType:"uint256",name:"marketFee",type:"uint256"},{internalType:"address",name:"marketFeeCollector",type:"address"},{internalType:"uint256",name:"opfFee",type:"uint256"},{internalType:"uint256",name:"marketFeeAvailable",type:"uint256"},{internalType:"uint256",name:"oceanFeeAvailable",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfExchanges",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"basetokenAddress",type:"address"}],name:"getOPFFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"isActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"opfCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"minBaseTokenAmount",type:"uint256"}],name:"sellDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"setAllowedSwapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"newRate",type:"uint256"}],name:"setRate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"toggleExchangeState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"bool",name:"withMint",type:"bool"}],name:"toggleMintState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"_newMarketFee",type:"uint256"}],name:"updateMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"address",name:"_newMarketCollector",type:"address"}],name:"updateMarketFeeCollector",outputs:[],stateMutability:"nonpayable",type:"function"}],bytecode:"0x60806040523480156200001157600080fd5b50604051620031de380380620031de833981016040819052620000349162000158565b60016000556001600160a01b038216620000a55760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a2057726f6e6720526f75746572206044820152666164647265737360c81b60648201526084015b60405180910390fd5b6001600160a01b038116620001095760405162461bcd60e51b8152602060048201526024808201527f46697865645261746545786368616e67653a2057726f6e67204f5046206164646044820152637265737360e01b60648201526084016200009c565b600180546001600160a01b039384166001600160a01b0319918216179091556002805492909316911617905562000190565b80516001600160a01b03811681146200015357600080fd5b919050565b600080604083850312156200016c57600080fd5b62000177836200013b565b915062000187602084016200013b565b90509250929050565b61303e80620001a06000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063825b5cd6116100f9578063b686bcaf11610097578063c99733a711610071578063c99733a714610576578063f532129e14610589578063f8154aee1461059c578063f887ea40146105af57600080fd5b8063b686bcaf1461053d578063c1f6572e14610550578063c66274ea1461056357600080fd5b806388823872116100d357806388823872146104eb578063a28f78f1146104fe578063b32b56f914610511578063b42414291461053557600080fd5b8063825b5cd6146103c5578063855058dd146103d857806385fcbc2f146104d857600080fd5b80635c36901c116101665780636e4c6269116101405780636e4c62691461035957806371dc14b21461036c57806379dd28361461039f5780637c82ebe9146103b257600080fd5b80635c36901c1461030057806360311e9514610333578063680819eb1461034657600080fd5b806324cb477e116101a257806324cb477e14610247578063450dccc31461025c5780634c87087d1461026f5780635acfedc7146102ed57600080fd5b8063012c3275146101c95780630b3b430d146101ef5780631e2e3a6b14610232575b600080fd5b6101dc6101d7366004612a19565b6105c2565b6040519081526020015b60405180910390f35b6102026101fd366004612aeb565b610d37565b604080519586526001600160a01b039094166020860152928401919091526060830152608082015260a0016101e6565b61023a610e41565b6040516101e69190612b04565b61025a610255366004612aeb565b610e99565b005b61025a61026a366004612aeb565b610f78565b61028261027d366004612aeb565b611084565b604080516001600160a01b039d8e1681529b8d1660208d01528b0199909952999096166060890152608088019490945260a0870192909252151560c086015260e0850152610100840152610120830152610140820192909252901515610160820152610180016101e6565b61025a6102fb366004612aeb565b6111ab565b61032361030e366004612aeb565b60009081526003602052604090205460ff1690565b60405190151581526020016101e6565b61025a610341366004612b48565b611266565b61025a610354366004612b74565b611308565b61025a610367366004612b96565b6113f5565b61037f61037a366004612b74565b6116f3565b6040805194855260208501939093529183015260608201526080016101e6565b61025a6103ad366004612bd3565b61185c565b61025a6103c0366004612b48565b6118ee565b61025a6103d3366004612b96565b611981565b6104c06103e6366004612aeb565b60009081526003602081815260409283902083516101e081018552815460ff808216151583526001600160a01b03610100928390048116958401959095526001840154851696830196909652600283015484166060830152938201546080820152600482015460a0820152600582015460c0820152600682015460e0820152600782015484820152600882015461012082015260098201548316610140820152600a820154610160820152600b820154610180820152600c9091015493841615156101a0820152919092049091166101c090910181905290565b6040516001600160a01b0390911681526020016101e6565b6101dc6104e6366004612aeb565b611d83565b61025a6104f9366004612b74565b611f0a565b6002546104c0906001600160a01b031681565b6101dc61051f366004612aeb565b6000908152600360208190526040909120015490565b6004546101dc565b61025a61054b366004612aeb565b611f81565b6101dc61055e366004612c03565b612032565b6101dc610571366004612aeb565b61207e565b61037f610584366004612b74565b612396565b61025a610597366004612aeb565b6124a1565b6101dc6105aa366004612c46565b61259d565b6001546104c0906001600160a01b031681565b6001546000906001600160a01b031633146106245760405162461bcd60e51b815260206004820152601e60248201527f46697865645261746545786368616e67653a206f6e6c7920726f75746572000060448201526064015b60405180910390fd5b60006001600160a01b03168360008151811061064257610642612c61565b60200260200101516001600160a01b031614156106bd5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642062617365746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b6001600160a01b03841661072f5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642064617461746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b836001600160a01b03168360008151811061074c5761074c612c61565b60200260200101516001600160a01b031614156107d15760405162461bcd60e51b815260206004820152603760248201527f46697865645261746545786368616e67653a20496e76616c696420646174617460448201527f6f6b656e2c2020657175616c732062617365746f6b656e000000000000000000606482015260840161061b565b816002815181106107e4576107e4612c61565b6020026020010151600014156108535760405162461bcd60e51b815260206004820152602e60248201527f46697865645261746545786368616e67653a20496e76616c696420657863686160448201526d6e676520726174652076616c756560901b606482015260840161061b565b6108928360008151811061086957610869612c61565b6020026020010151858560018151811061088557610885612c61565b6020026020010151612032565b60008181526003602081905260409091200154909150156109095760405162461bcd60e51b815260206004820152602b60248201527f46697865645261746545786368616e67653a2045786368616e676520616c726560448201526a616479206578697374732160a81b606482015260840161061b565b6000600190508260048151811061092257610922612c61565b602002602001015160001415610936575060005b604051806101e001604052806001151581526020018560018151811061095e5761095e612c61565b60200260200101516001600160a01b03168152602001866001600160a01b031681526020018560008151811061099657610996612c61565b60200260200101516001600160a01b03168152602001846002815181106109bf576109bf612c61565b60200260200101518152602001846001815181106109df576109df612c61565b60200260200101518152602001846000815181106109ff576109ff612c61565b60200260200101518152602001600081526020016000815260200184600381518110610a2d57610a2d612c61565b6020026020010151815260200185600281518110610a4d57610a4d612c61565b60200260200101516001600160a01b031681526020016000815260200160008152602001821515815260200185600381518110610a8c57610a8c612c61565b6020908102919091018101516001600160a01b0390811690925260008581526003808352604080832086518154958801518716610100908102610100600160a81b031992151583166001600160a81b0319988916171783559288015160018084018054928a166001600160a01b031993841617905560608a0151600285018054918b1691841691909117905560808a01519584019590955560a089015160048085019190915560c08a0151600585015560e08a01516006850155848a015160078501556101208a015160088501556101408a0151600985018054918b169190931617909155610160890151600a840155610180890151600b8401556101a0890151600c90930180546101c0909a01518916909402921515909116979095169690961795909517909455815493840182559081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092018490558551908716918691610bfa57610bfa612c61565b60200260200101516001600160a01b0316837feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b1987600181518110610c4057610c40612c61565b602002602001015187600281518110610c5b57610c5b612c61565b6020026020010151604051610c859291906001600160a01b03929092168252602082015260400190565b60405180910390a483600181518110610ca057610ca0612c61565b60200260200101516001600160a01b0316827fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352960405160405180910390a383600381518110610cf157610cf1612c61565b60200260200101516001600160a01b0316827fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c60405160405180910390a3509392505050565b600081815260036020818152604080842081516101e081018352815460ff808216151583526001600160a01b036101009283900481168488015260018501548116958401959095526002840154851660608401819052848801546080850152600485015460a0850152600585015460c0850152600685015460e085015260078501548385015260088501546101208501819052600986015487166101408601819052600a870154610160870152600b870154610180870152600c9096015492831615156101a0860152929091049094166101c0830152878752949093529293918291829190610e259061259d565b9350806101600151925080610180015191505091939590929450565b60606004805480602002602001604051908101604052809291908181526020018280548015610e8f57602002820191906000526020600020905b815481526020019060010190808311610e7b575b5050505050905090565b600081815260036020526040902054819061010090046001600160a01b03163314610ed65760405162461bcd60e51b815260040161061b90612c77565b60008281526003602052604090205460ff1615610f3157600082815260036020526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a35050565b600082815260036020526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35050565b600081815260036020526040902054819061010090046001600160a01b03163314610fb55760405162461bcd60e51b815260040161061b90612c77565b60026000541415610fd85760405162461bcd60e51b815260040161061b90612cc0565b600260009081558281526003602052604081206006810180549290558054600190910154611019916001600160a01b0391821691610100909104168361260c565b6000838152600360209081526040918290206001810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b163691015b60405180910390a45050600160005550565b600081815260036020818152604080842081516101e081018352815460ff80821615158084526001600160a01b036101009384900481169785018890526001860154811696850187905260028601548116606086018190529886015460808601819052600487015460a08701819052600588015460c08801819052600689015460e0890152600789015487890152600889015461012089015260098901548416610140890152600a890154610160890152600b890154610180890152600c9098015494851615156101a088015294909304166101c08501529597949691959194909281908190819081906111778e61207e565b95506111828e611d83565b94508060e0015193508061010001519250806101a0015191505091939597999b5091939597999b565b600260005414156111ce5760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600b8101805492905582549201549091611208916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f457b44fd47c33fc65bfbd58d0202ad97fbed1bbc9881f56441d05fe9ebd58acf91015b60405180910390a350506001600055565b600082815260036020526040902054829061010090046001600160a01b031633146112a35760405162461bcd60e51b815260040161061b90612c77565b600083815260036020526040808220600c018054610100600160a81b0319166101006001600160a01b038716908102919091179091559051909185917fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c9190a3505050565b600082815260036020526040902054829061010090046001600160a01b031633146113455760405162461bcd60e51b815260040161061b90612c77565b8161139e5760405162461bcd60e51b815260206004820152602360248201527f46697865645261746545786368616e67653a20526174696f206d7573742062656044820152620203e360ec1b606482015260840161061b565b6000838152600360208190526040918290200183905551339084907fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c906113e89086815260200190565b60405180910390a3505050565b600083815260036020526040902054839060ff166114255760405162461bcd60e51b815260040161061b90612cf7565b600260005414156114485760405162461bcd60e51b815260040161061b90612cc0565b60026000558261146a5760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b0316156114cd576000848152600360205260409020600c015461010090046001600160a01b031633146114cd5760405162461bcd60e51b815260040161061b90612d8b565b6000806000806114dd88886116f3565b9350935093509350858410156115445760405162461bcd60e51b815260206004820152602660248201527f46697865645261746545786368616e67653a20546f6f20666577206261736520604482015265746f6b656e7360d01b606482015260840161061b565b6000888152600360205260409020600b01546115609083612674565b6000898152600360205260409020600b810191909155600a01546115849082612674565b6000898152600360205260409020600a810191909155600101546115b3906001600160a01b031633308a612680565b6000888152600360205260409020600601546115cf9088612674565b60008981526003602052604090206006810191909155600701548411156116295760008881526003602052604090208054600290910154611624916001600160a01b0391821691610100909104163387612680565b611673565b60008881526003602052604090206007015461164590846126be565b6000898152600360205260409020600781019190915560020154611673906001600160a01b0316338661260c565b6000888152600360209081526040918290206002015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0015b60405180910390a350506001600055505050505050565b600082815260036020526040812054819081908190869060ff166117295760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546117a390670de0b6b3a76400009061179d9061175890600a612edb565b60008b81526003602052604090206005015461179d9061177990600a612edb565b60008d81526003602081905260409091200154611797908d906126ca565b906126ca565b906126d6565b6000888152600360205260409020600201549094506117ca906001600160a01b031661259d565b1561180f5760008781526003602052604090206002015461180c90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b87906126ca565b92505b60008781526003602052604090206008015461183a90670de0b6b3a76400009061179d9087906126ca565b91506118508361184a86856126be565b906126be565b94505092959194509250565b600082815260036020526040902054829061010090046001600160a01b031633146118995760405162461bcd60e51b815260040161061b90612c77565b600083815260036020908152604091829020600c01805460ff19168515159081179091559151918252339185917fe28e899e0f5d6fba0c8d73d1888083bcc62d4d9806d2e26fcf1f607c3ed52f5391016113e8565b6000828152600360205260409020600901546001600160a01b031633146119505760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b600083815260036020526040902054839060ff166119b15760405162461bcd60e51b815260040161061b90612cf7565b600260005414156119d45760405162461bcd60e51b815260040161061b90612cc0565b6002600055826119f65760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b031615611a59576000848152600360205260409020600c015461010090046001600160a01b03163314611a595760405162461bcd60e51b815260040161061b90612d8b565b600080600080611a698888612396565b935093509350935085841115611ad15760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b606482015260840161061b565b6000888152600360205260409020600b0154611aed9083612674565b6000898152600360205260409020600b810191909155600a0154611b119082612674565b6000898152600360205260409020600a81019190915560020154611b40906001600160a01b0316333087612680565b600088815260036020526040902060070154611b5c9084612674565b6000898152600360205260409020600781019190915560060154871115611ccc576000888152600360205260409020600c015460ff168015611c155750600088815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c159190612ee7565b15611c9357600088815260036020526040908190206001015490516340c10f1960e01b8152336004820152602481018990526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015611c7657600080fd5b505af1158015611c8a573d6000803e3d6000fd5b50505050611d16565b60008881526003602052604090208054600190910154611cc7916001600160a01b039182169161010090910416338a612680565b611d16565b600088815260036020526040902060060154611ce890886126be565b6000898152600360205260409020600681019190915560010154611d16906001600160a01b0316338961260c565b6000888152600360209081526040918290206001015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0016116dc565b60008181526003602052604081205460ff16611da157506000919050565b6000828152600360205260408082206002810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e259190612f04565b600084815260036020526040808220600281015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa158015611e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb49190612f04565b905080821015611ee257600084815260036020526040902060070154611edb908390612674565b9250611f02565b600084815260036020526040902060070154611eff908290612674565b92505b50505b919050565b6000828152600360205260409020600901546001600160a01b03163314611f6c5760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060080155565b60026000541415611fa45760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600a8101805492905560098101549201549091611fe1916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f192a3cd95e40313e0e12c28b398e31633936e38d134419161f883c8d640790559101611255565b604080516001600160a01b0380861660208301528085169282019290925290821660608201526000906080016040516020818303038152906040528051906020012090505b9392505050565b60008181526003602052604081205460ff1661209c57506000919050565b6000828152600360205260409020600c015460ff1680156121345750600082815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612ee7565b1561223f576000828152600360209081526040918290206001015482516318160ddd60e01b815292516001600160a01b03909116926318160ddd9260048083019391928290030181865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612f04565b600083815260036020908152604091829020600101548251631aa93a7560e11b815292516001600160a01b039091169263355274ea9260048083019391928290030181865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f9190612f04565b6122399190612f1d565b92915050565b6000828152600360205260408082206001810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190612f04565b600084815260036020526040808220600181015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa15801561232e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123529190612f04565b90508082101561237957600084815260036020526040902060060154611edb908390612674565b600084815260036020526040902060060154611eff908290612674565b600082815260036020526040812054819081908190869060ff166123cc5760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546123fb90670de0b6b3a76400009061179d9061175890600a612edb565b600088815260036020526040902060020154909450612422906001600160a01b031661259d565b156124605760008781526003602052604090206002015461245d90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b92505b60008781526003602052604090206008015461248b90670de0b6b3a76400009061179d9087906126ca565b91506118508361249b8685612674565b90612674565b600081815260036020526040902054819061010090046001600160a01b031633146124de5760405162461bcd60e51b815260040161061b90612c77565b600260005414156125015760405162461bcd60e51b815260040161061b90612cc0565b6002600081815583815260036020526040812060078101805492905580549201549091612540916001600160a01b03908116916101009004168361260c565b6000838152600360209081526040918290206002810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b16369101611072565b600154604051637c0aa57760e11b81526001600160a01b038381166004830152600092169063f8154aee90602401602060405180830381865afa1580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122399190612f04565b6040516001600160a01b03831660248201526044810182905261266f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e2565b505050565b60006120778284612f34565b6040516001600160a01b03808516602483015283166044820152606481018290526126b89085906323b872dd60e01b90608401612638565b50505050565b60006120778284612f1d565b60006120778284612f4c565b60006120778284612f6b565b6000612737826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127b49092919063ffffffff16565b80519091501561266f57808060200190518101906127559190612ee7565b61266f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061b565b60606127c384846000856127cb565b949350505050565b60608247101561282c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061b565b843b61287a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061b565b600080866001600160a01b031685876040516128969190612fb9565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e88282866128f3565b979650505050505050565b60608315612902575081612077565b8251156129125782518084602001fd5b8160405162461bcd60e51b815260040161061b9190612fd5565b80356001600160a01b0381168114611f0557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561298257612982612943565b604052919050565b600067ffffffffffffffff8211156129a4576129a4612943565b5060051b60200190565b600082601f8301126129bf57600080fd5b813560206129d46129cf8361298a565b612959565b82815260059290921b840181019181810190868411156129f357600080fd5b8286015b84811015612a0e57803583529183019183016129f7565b509695505050505050565b600080600060608486031215612a2e57600080fd5b612a378461292c565b925060208085013567ffffffffffffffff80821115612a5557600080fd5b818701915087601f830112612a6957600080fd5b8135612a776129cf8261298a565b81815260059190911b8301840190848101908a831115612a9657600080fd5b938501935b82851015612abb57612aac8561292c565b82529385019390850190612a9b565b965050506040870135925080831115612ad357600080fd5b5050612ae1868287016129ae565b9150509250925092565b600060208284031215612afd57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b3c57835183529284019291840191600101612b20565b50909695505050505050565b60008060408385031215612b5b57600080fd5b82359150612b6b6020840161292c565b90509250929050565b60008060408385031215612b8757600080fd5b50508035926020909101359150565b600080600060608486031215612bab57600080fd5b505081359360208301359350604090920135919050565b8015158114612bd057600080fd5b50565b60008060408385031215612be657600080fd5b823591506020830135612bf881612bc2565b809150509250929050565b600080600060608486031215612c1857600080fd5b612c218461292c565b9250612c2f6020850161292c565b9150612c3d6040850161292c565b90509250925092565b600060208284031215612c5857600080fd5b6120778261292c565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f46697865645261746545786368616e67653a20696e76616c69642065786368616040820152683733b29037bbb732b960b91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f46697865645261746545786368616e67653a2045786368616e676520646f657360408201526a206e6f742065786973742160a81b606082015260800190565b60208082526029908201527f46697865645261746545786368616e67653a207a65726f206461746120746f6b604082015268195b88185b5bdd5b9d60ba1b606082015260800190565b60208082526036908201527f46697865645261746545786368616e67653a205468697320616464726573732060408201527506973206e6f7420616c6c6f77656420746f20737761760541b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115612e32578160001904821115612e1857612e18612de1565b80851615612e2557918102915b93841c9390800290612dfc565b509250929050565b600082612e4957506001612239565b81612e5657506000612239565b8160018114612e6c5760028114612e7657612e92565b6001915050612239565b60ff841115612e8757612e87612de1565b50506001821b612239565b5060208310610133831016604e8410600b8410161715612eb5575081810a612239565b612ebf8383612df7565b8060001904821115612ed357612ed3612de1565b029392505050565b60006120778383612e3a565b600060208284031215612ef957600080fd5b815161207781612bc2565b600060208284031215612f1657600080fd5b5051919050565b600082821015612f2f57612f2f612de1565b500390565b60008219821115612f4757612f47612de1565b500190565b6000816000190483118215151615612f6657612f66612de1565b500290565b600082612f8857634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fa8578181015183820152602001612f90565b838111156126b85750506000910152565b60008251612fcb818460208701612f8d565b9190910192915050565b6020815260008251806020840152612ff4816040850160208701612f8d565b601f01601f1916919091016040019291505056fea2646970667358221220ae3733c86a7fbdeda1e535bdcf4c655711beee316c6fde6e837493eeb818cb9764736f6c634300080a0033",deployedBytecode:"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063825b5cd6116100f9578063b686bcaf11610097578063c99733a711610071578063c99733a714610576578063f532129e14610589578063f8154aee1461059c578063f887ea40146105af57600080fd5b8063b686bcaf1461053d578063c1f6572e14610550578063c66274ea1461056357600080fd5b806388823872116100d357806388823872146104eb578063a28f78f1146104fe578063b32b56f914610511578063b42414291461053557600080fd5b8063825b5cd6146103c5578063855058dd146103d857806385fcbc2f146104d857600080fd5b80635c36901c116101665780636e4c6269116101405780636e4c62691461035957806371dc14b21461036c57806379dd28361461039f5780637c82ebe9146103b257600080fd5b80635c36901c1461030057806360311e9514610333578063680819eb1461034657600080fd5b806324cb477e116101a257806324cb477e14610247578063450dccc31461025c5780634c87087d1461026f5780635acfedc7146102ed57600080fd5b8063012c3275146101c95780630b3b430d146101ef5780631e2e3a6b14610232575b600080fd5b6101dc6101d7366004612a19565b6105c2565b6040519081526020015b60405180910390f35b6102026101fd366004612aeb565b610d37565b604080519586526001600160a01b039094166020860152928401919091526060830152608082015260a0016101e6565b61023a610e41565b6040516101e69190612b04565b61025a610255366004612aeb565b610e99565b005b61025a61026a366004612aeb565b610f78565b61028261027d366004612aeb565b611084565b604080516001600160a01b039d8e1681529b8d1660208d01528b0199909952999096166060890152608088019490945260a0870192909252151560c086015260e0850152610100840152610120830152610140820192909252901515610160820152610180016101e6565b61025a6102fb366004612aeb565b6111ab565b61032361030e366004612aeb565b60009081526003602052604090205460ff1690565b60405190151581526020016101e6565b61025a610341366004612b48565b611266565b61025a610354366004612b74565b611308565b61025a610367366004612b96565b6113f5565b61037f61037a366004612b74565b6116f3565b6040805194855260208501939093529183015260608201526080016101e6565b61025a6103ad366004612bd3565b61185c565b61025a6103c0366004612b48565b6118ee565b61025a6103d3366004612b96565b611981565b6104c06103e6366004612aeb565b60009081526003602081815260409283902083516101e081018552815460ff808216151583526001600160a01b03610100928390048116958401959095526001840154851696830196909652600283015484166060830152938201546080820152600482015460a0820152600582015460c0820152600682015460e0820152600782015484820152600882015461012082015260098201548316610140820152600a820154610160820152600b820154610180820152600c9091015493841615156101a0820152919092049091166101c090910181905290565b6040516001600160a01b0390911681526020016101e6565b6101dc6104e6366004612aeb565b611d83565b61025a6104f9366004612b74565b611f0a565b6002546104c0906001600160a01b031681565b6101dc61051f366004612aeb565b6000908152600360208190526040909120015490565b6004546101dc565b61025a61054b366004612aeb565b611f81565b6101dc61055e366004612c03565b612032565b6101dc610571366004612aeb565b61207e565b61037f610584366004612b74565b612396565b61025a610597366004612aeb565b6124a1565b6101dc6105aa366004612c46565b61259d565b6001546104c0906001600160a01b031681565b6001546000906001600160a01b031633146106245760405162461bcd60e51b815260206004820152601e60248201527f46697865645261746545786368616e67653a206f6e6c7920726f75746572000060448201526064015b60405180910390fd5b60006001600160a01b03168360008151811061064257610642612c61565b60200260200101516001600160a01b031614156106bd5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642062617365746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b6001600160a01b03841661072f5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642064617461746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b836001600160a01b03168360008151811061074c5761074c612c61565b60200260200101516001600160a01b031614156107d15760405162461bcd60e51b815260206004820152603760248201527f46697865645261746545786368616e67653a20496e76616c696420646174617460448201527f6f6b656e2c2020657175616c732062617365746f6b656e000000000000000000606482015260840161061b565b816002815181106107e4576107e4612c61565b6020026020010151600014156108535760405162461bcd60e51b815260206004820152602e60248201527f46697865645261746545786368616e67653a20496e76616c696420657863686160448201526d6e676520726174652076616c756560901b606482015260840161061b565b6108928360008151811061086957610869612c61565b6020026020010151858560018151811061088557610885612c61565b6020026020010151612032565b60008181526003602081905260409091200154909150156109095760405162461bcd60e51b815260206004820152602b60248201527f46697865645261746545786368616e67653a2045786368616e676520616c726560448201526a616479206578697374732160a81b606482015260840161061b565b6000600190508260048151811061092257610922612c61565b602002602001015160001415610936575060005b604051806101e001604052806001151581526020018560018151811061095e5761095e612c61565b60200260200101516001600160a01b03168152602001866001600160a01b031681526020018560008151811061099657610996612c61565b60200260200101516001600160a01b03168152602001846002815181106109bf576109bf612c61565b60200260200101518152602001846001815181106109df576109df612c61565b60200260200101518152602001846000815181106109ff576109ff612c61565b60200260200101518152602001600081526020016000815260200184600381518110610a2d57610a2d612c61565b6020026020010151815260200185600281518110610a4d57610a4d612c61565b60200260200101516001600160a01b031681526020016000815260200160008152602001821515815260200185600381518110610a8c57610a8c612c61565b6020908102919091018101516001600160a01b0390811690925260008581526003808352604080832086518154958801518716610100908102610100600160a81b031992151583166001600160a81b0319988916171783559288015160018084018054928a166001600160a01b031993841617905560608a0151600285018054918b1691841691909117905560808a01519584019590955560a089015160048085019190915560c08a0151600585015560e08a01516006850155848a015160078501556101208a015160088501556101408a0151600985018054918b169190931617909155610160890151600a840155610180890151600b8401556101a0890151600c90930180546101c0909a01518916909402921515909116979095169690961795909517909455815493840182559081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092018490558551908716918691610bfa57610bfa612c61565b60200260200101516001600160a01b0316837feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b1987600181518110610c4057610c40612c61565b602002602001015187600281518110610c5b57610c5b612c61565b6020026020010151604051610c859291906001600160a01b03929092168252602082015260400190565b60405180910390a483600181518110610ca057610ca0612c61565b60200260200101516001600160a01b0316827fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352960405160405180910390a383600381518110610cf157610cf1612c61565b60200260200101516001600160a01b0316827fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c60405160405180910390a3509392505050565b600081815260036020818152604080842081516101e081018352815460ff808216151583526001600160a01b036101009283900481168488015260018501548116958401959095526002840154851660608401819052848801546080850152600485015460a0850152600585015460c0850152600685015460e085015260078501548385015260088501546101208501819052600986015487166101408601819052600a870154610160870152600b870154610180870152600c9096015492831615156101a0860152929091049094166101c0830152878752949093529293918291829190610e259061259d565b9350806101600151925080610180015191505091939590929450565b60606004805480602002602001604051908101604052809291908181526020018280548015610e8f57602002820191906000526020600020905b815481526020019060010190808311610e7b575b5050505050905090565b600081815260036020526040902054819061010090046001600160a01b03163314610ed65760405162461bcd60e51b815260040161061b90612c77565b60008281526003602052604090205460ff1615610f3157600082815260036020526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a35050565b600082815260036020526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35050565b600081815260036020526040902054819061010090046001600160a01b03163314610fb55760405162461bcd60e51b815260040161061b90612c77565b60026000541415610fd85760405162461bcd60e51b815260040161061b90612cc0565b600260009081558281526003602052604081206006810180549290558054600190910154611019916001600160a01b0391821691610100909104168361260c565b6000838152600360209081526040918290206001810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b163691015b60405180910390a45050600160005550565b600081815260036020818152604080842081516101e081018352815460ff80821615158084526001600160a01b036101009384900481169785018890526001860154811696850187905260028601548116606086018190529886015460808601819052600487015460a08701819052600588015460c08801819052600689015460e0890152600789015487890152600889015461012089015260098901548416610140890152600a890154610160890152600b890154610180890152600c9098015494851615156101a088015294909304166101c08501529597949691959194909281908190819081906111778e61207e565b95506111828e611d83565b94508060e0015193508061010001519250806101a0015191505091939597999b5091939597999b565b600260005414156111ce5760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600b8101805492905582549201549091611208916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f457b44fd47c33fc65bfbd58d0202ad97fbed1bbc9881f56441d05fe9ebd58acf91015b60405180910390a350506001600055565b600082815260036020526040902054829061010090046001600160a01b031633146112a35760405162461bcd60e51b815260040161061b90612c77565b600083815260036020526040808220600c018054610100600160a81b0319166101006001600160a01b038716908102919091179091559051909185917fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c9190a3505050565b600082815260036020526040902054829061010090046001600160a01b031633146113455760405162461bcd60e51b815260040161061b90612c77565b8161139e5760405162461bcd60e51b815260206004820152602360248201527f46697865645261746545786368616e67653a20526174696f206d7573742062656044820152620203e360ec1b606482015260840161061b565b6000838152600360208190526040918290200183905551339084907fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c906113e89086815260200190565b60405180910390a3505050565b600083815260036020526040902054839060ff166114255760405162461bcd60e51b815260040161061b90612cf7565b600260005414156114485760405162461bcd60e51b815260040161061b90612cc0565b60026000558261146a5760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b0316156114cd576000848152600360205260409020600c015461010090046001600160a01b031633146114cd5760405162461bcd60e51b815260040161061b90612d8b565b6000806000806114dd88886116f3565b9350935093509350858410156115445760405162461bcd60e51b815260206004820152602660248201527f46697865645261746545786368616e67653a20546f6f20666577206261736520604482015265746f6b656e7360d01b606482015260840161061b565b6000888152600360205260409020600b01546115609083612674565b6000898152600360205260409020600b810191909155600a01546115849082612674565b6000898152600360205260409020600a810191909155600101546115b3906001600160a01b031633308a612680565b6000888152600360205260409020600601546115cf9088612674565b60008981526003602052604090206006810191909155600701548411156116295760008881526003602052604090208054600290910154611624916001600160a01b0391821691610100909104163387612680565b611673565b60008881526003602052604090206007015461164590846126be565b6000898152600360205260409020600781019190915560020154611673906001600160a01b0316338661260c565b6000888152600360209081526040918290206002015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0015b60405180910390a350506001600055505050505050565b600082815260036020526040812054819081908190869060ff166117295760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546117a390670de0b6b3a76400009061179d9061175890600a612edb565b60008b81526003602052604090206005015461179d9061177990600a612edb565b60008d81526003602081905260409091200154611797908d906126ca565b906126ca565b906126d6565b6000888152600360205260409020600201549094506117ca906001600160a01b031661259d565b1561180f5760008781526003602052604090206002015461180c90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b87906126ca565b92505b60008781526003602052604090206008015461183a90670de0b6b3a76400009061179d9087906126ca565b91506118508361184a86856126be565b906126be565b94505092959194509250565b600082815260036020526040902054829061010090046001600160a01b031633146118995760405162461bcd60e51b815260040161061b90612c77565b600083815260036020908152604091829020600c01805460ff19168515159081179091559151918252339185917fe28e899e0f5d6fba0c8d73d1888083bcc62d4d9806d2e26fcf1f607c3ed52f5391016113e8565b6000828152600360205260409020600901546001600160a01b031633146119505760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b600083815260036020526040902054839060ff166119b15760405162461bcd60e51b815260040161061b90612cf7565b600260005414156119d45760405162461bcd60e51b815260040161061b90612cc0565b6002600055826119f65760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b031615611a59576000848152600360205260409020600c015461010090046001600160a01b03163314611a595760405162461bcd60e51b815260040161061b90612d8b565b600080600080611a698888612396565b935093509350935085841115611ad15760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b606482015260840161061b565b6000888152600360205260409020600b0154611aed9083612674565b6000898152600360205260409020600b810191909155600a0154611b119082612674565b6000898152600360205260409020600a81019190915560020154611b40906001600160a01b0316333087612680565b600088815260036020526040902060070154611b5c9084612674565b6000898152600360205260409020600781019190915560060154871115611ccc576000888152600360205260409020600c015460ff168015611c155750600088815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c159190612ee7565b15611c9357600088815260036020526040908190206001015490516340c10f1960e01b8152336004820152602481018990526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015611c7657600080fd5b505af1158015611c8a573d6000803e3d6000fd5b50505050611d16565b60008881526003602052604090208054600190910154611cc7916001600160a01b039182169161010090910416338a612680565b611d16565b600088815260036020526040902060060154611ce890886126be565b6000898152600360205260409020600681019190915560010154611d16906001600160a01b0316338961260c565b6000888152600360209081526040918290206001015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0016116dc565b60008181526003602052604081205460ff16611da157506000919050565b6000828152600360205260408082206002810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e259190612f04565b600084815260036020526040808220600281015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa158015611e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb49190612f04565b905080821015611ee257600084815260036020526040902060070154611edb908390612674565b9250611f02565b600084815260036020526040902060070154611eff908290612674565b92505b50505b919050565b6000828152600360205260409020600901546001600160a01b03163314611f6c5760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060080155565b60026000541415611fa45760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600a8101805492905560098101549201549091611fe1916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f192a3cd95e40313e0e12c28b398e31633936e38d134419161f883c8d640790559101611255565b604080516001600160a01b0380861660208301528085169282019290925290821660608201526000906080016040516020818303038152906040528051906020012090505b9392505050565b60008181526003602052604081205460ff1661209c57506000919050565b6000828152600360205260409020600c015460ff1680156121345750600082815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612ee7565b1561223f576000828152600360209081526040918290206001015482516318160ddd60e01b815292516001600160a01b03909116926318160ddd9260048083019391928290030181865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612f04565b600083815260036020908152604091829020600101548251631aa93a7560e11b815292516001600160a01b039091169263355274ea9260048083019391928290030181865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f9190612f04565b6122399190612f1d565b92915050565b6000828152600360205260408082206001810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190612f04565b600084815260036020526040808220600181015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa15801561232e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123529190612f04565b90508082101561237957600084815260036020526040902060060154611edb908390612674565b600084815260036020526040902060060154611eff908290612674565b600082815260036020526040812054819081908190869060ff166123cc5760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546123fb90670de0b6b3a76400009061179d9061175890600a612edb565b600088815260036020526040902060020154909450612422906001600160a01b031661259d565b156124605760008781526003602052604090206002015461245d90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b92505b60008781526003602052604090206008015461248b90670de0b6b3a76400009061179d9087906126ca565b91506118508361249b8685612674565b90612674565b600081815260036020526040902054819061010090046001600160a01b031633146124de5760405162461bcd60e51b815260040161061b90612c77565b600260005414156125015760405162461bcd60e51b815260040161061b90612cc0565b6002600081815583815260036020526040812060078101805492905580549201549091612540916001600160a01b03908116916101009004168361260c565b6000838152600360209081526040918290206002810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b16369101611072565b600154604051637c0aa57760e11b81526001600160a01b038381166004830152600092169063f8154aee90602401602060405180830381865afa1580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122399190612f04565b6040516001600160a01b03831660248201526044810182905261266f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e2565b505050565b60006120778284612f34565b6040516001600160a01b03808516602483015283166044820152606481018290526126b89085906323b872dd60e01b90608401612638565b50505050565b60006120778284612f1d565b60006120778284612f4c565b60006120778284612f6b565b6000612737826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127b49092919063ffffffff16565b80519091501561266f57808060200190518101906127559190612ee7565b61266f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061b565b60606127c384846000856127cb565b949350505050565b60608247101561282c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061b565b843b61287a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061b565b600080866001600160a01b031685876040516128969190612fb9565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e88282866128f3565b979650505050505050565b60608315612902575081612077565b8251156129125782518084602001fd5b8160405162461bcd60e51b815260040161061b9190612fd5565b80356001600160a01b0381168114611f0557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561298257612982612943565b604052919050565b600067ffffffffffffffff8211156129a4576129a4612943565b5060051b60200190565b600082601f8301126129bf57600080fd5b813560206129d46129cf8361298a565b612959565b82815260059290921b840181019181810190868411156129f357600080fd5b8286015b84811015612a0e57803583529183019183016129f7565b509695505050505050565b600080600060608486031215612a2e57600080fd5b612a378461292c565b925060208085013567ffffffffffffffff80821115612a5557600080fd5b818701915087601f830112612a6957600080fd5b8135612a776129cf8261298a565b81815260059190911b8301840190848101908a831115612a9657600080fd5b938501935b82851015612abb57612aac8561292c565b82529385019390850190612a9b565b965050506040870135925080831115612ad357600080fd5b5050612ae1868287016129ae565b9150509250925092565b600060208284031215612afd57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b3c57835183529284019291840191600101612b20565b50909695505050505050565b60008060408385031215612b5b57600080fd5b82359150612b6b6020840161292c565b90509250929050565b60008060408385031215612b8757600080fd5b50508035926020909101359150565b600080600060608486031215612bab57600080fd5b505081359360208301359350604090920135919050565b8015158114612bd057600080fd5b50565b60008060408385031215612be657600080fd5b823591506020830135612bf881612bc2565b809150509250929050565b600080600060608486031215612c1857600080fd5b612c218461292c565b9250612c2f6020850161292c565b9150612c3d6040850161292c565b90509250925092565b600060208284031215612c5857600080fd5b6120778261292c565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f46697865645261746545786368616e67653a20696e76616c69642065786368616040820152683733b29037bbb732b960b91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f46697865645261746545786368616e67653a2045786368616e676520646f657360408201526a206e6f742065786973742160a81b606082015260800190565b60208082526029908201527f46697865645261746545786368616e67653a207a65726f206461746120746f6b604082015268195b88185b5bdd5b9d60ba1b606082015260800190565b60208082526036908201527f46697865645261746545786368616e67653a205468697320616464726573732060408201527506973206e6f7420616c6c6f77656420746f20737761760541b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115612e32578160001904821115612e1857612e18612de1565b80851615612e2557918102915b93841c9390800290612dfc565b509250929050565b600082612e4957506001612239565b81612e5657506000612239565b8160018114612e6c5760028114612e7657612e92565b6001915050612239565b60ff841115612e8757612e87612de1565b50506001821b612239565b5060208310610133831016604e8410600b8410161715612eb5575081810a612239565b612ebf8383612df7565b8060001904821115612ed357612ed3612de1565b029392505050565b60006120778383612e3a565b600060208284031215612ef957600080fd5b815161207781612bc2565b600060208284031215612f1657600080fd5b5051919050565b600082821015612f2f57612f2f612de1565b500390565b60008219821115612f4757612f47612de1565b500190565b6000816000190483118215151615612f6657612f66612de1565b500290565b600082612f8857634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fa8578181015183820152602001612f90565b838111156126b85750506000910152565b60008251612fcb818460208701612f8d565b9190910192915050565b6020815260008251806020840152612ff4816040850160208701612f8d565b601f01601f1916919091016040019291505056fea2646970667358221220ae3733c86a7fbdeda1e535bdcf4c655711beee316c6fde6e837493eeb818cb9764736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};!function(e){e[e.CreatingExchange=0]="CreatingExchange",e[e.ApprovingDatatoken=1]="ApprovingDatatoken"}(_||(_={}));class W{constructor(e,a,t=null,b=null,n){this.GASLIMIT_DEFAULT=1e6,this.oceanAddress=null,this.fixedRateAddress=void 0,this.fixedRateExchangeAbi=void 0,this.fixedRateContract=void 0,this.web3=void 0,this.contract=null,this.startBlock=void 0,this.ssAbi=void 0,this.web3=e,this.startBlock=n||0,this.fixedRateExchangeAbi=t||N.abi,this.oceanAddress=b,this.fixedRateAddress=a,this.contract=new this.web3.eth.Contract(this.fixedRateExchangeAbi,this.fixedRateAddress)}async amountToUnits(a,t){let b=18;const n=new this.web3.eth.Contract(P.abi,a);try{b=await n.methods.decimals().call()}catch(e){c.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}return new e(parseInt(t)*10**b).toString()}async unitsToAmount(a,t){let b=18;const n=new this.web3.eth.Contract(P.abi,a);try{b=await n.methods.decimals().call()}catch(e){c.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}return new e(parseInt(t)/10**b).toString()}async generateExchangeId(e,a,t){return await this.contract.methods.generateExchangeId(e,a,t).call()}async estBuyDT(e,a,t,b,n){const d=n||this.fixedRateContract,f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyDT(a,t.toString(),b.toString()).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyDT(e,a,t,b){const n=await this.amountToUnits((await this.getExchange(a)).dataToken,t),d=await this.amountToUnits((await this.getExchange(a)).baseToken,b),f=await this.estBuyDT(e,a,n,d);try{return await this.contract.methods.buyDT(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){return c.error(`ERROR: Failed to buy datatokens: ${e.message}`),null}}async estSellDT(e,a,t,b,n){const d=n||this.fixedRateContract,f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.sellDT(a,t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async sellDT(e,a,t,b){const n=await this.amountToUnits((await this.getExchange(a)).dataToken,t),d=await this.amountToUnits((await this.getExchange(a)).baseToken,b),f=await this.estBuyDT(e,a,n,d);try{return await this.contract.methods.sellDT(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){return c.error(`ERROR: Failed to sell datatokens: ${e.message}`),null}}async getNumberOfExchanges(){return await this.contract.methods.getNumberOfExchanges().call()}async estSetRate(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setRate(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setRate(e,a,t){const b=await this.estSetRate(e,a,this.web3.utils.toWei(String(t)));return await this.contract.methods.setRate(a,this.web3.utils.toWei(t)).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estSetAllowedSwapper(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setRate(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setAllowedSwapper(e,a,t){const b=await this.estSetAllowedSwapper(e,a,t);return await this.contract.methods.setAllowedSwapper(a,t).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estActivate(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleExchangeState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async activate(e,a){const t=await this.getExchange(a);if(!t)return null;if(!0===t.active)return null;const b=await this.estActivate(e,a);return await this.contract.methods.toggleExchangeState(a).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estDeactivate(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleExchangeState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async deactivate(e,a){const t=await this.getExchange(a);if(!t)return null;if(!1===t.active)return null;const b=await this.estDeactivate(e,a);return await this.contract.methods.toggleExchangeState(a).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async getRate(e){const a=await this.contract.methods.getRate(e).call();return this.web3.utils.fromWei(a)}async getDTSupply(e){const a=await this.contract.methods.getDTSupply(e).call();return await this.unitsToAmount((await this.getExchange(e)).dataToken,a)}async getBTSupply(e){const a=await this.contract.methods.getBTSupply(e).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,a)}async getAllowedSwapper(e){return await this.contract.methods.getAllowedSwapper(e).call()}async getAmountBTIn(e,a){const t=await this.contract.methods.calcBaseInGivenOutDT(e,await this.amountToUnits((await this.getExchange(e)).dataToken,a)).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,t.baseTokenAmount)}async getAmountBTOut(e,a){const t=await this.contract.methods.calcBaseOutGivenInDT(e,await this.amountToUnits((await this.getExchange(e)).dataToken,a)).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,t.baseTokenAmount)}async getExchange(e){const a=await this.contract.methods.getExchange(e).call();return a.dtDecimals=a.dtDecimals.toString(),a.btDecimals=a.btDecimals.toString(),a.dtBalance=await this.unitsToAmount(a.dataToken,a.dtBalance),a.btBalance=await this.unitsToAmount(a.baseToken,a.btBalance),a.dtSupply=await this.unitsToAmount(a.dataToken,a.dtSupply),a.btSupply=await this.unitsToAmount(a.baseToken,a.btSupply),a.fixedRate=this.web3.utils.fromWei(a.fixedRate),a.exchangeId=e,a}async getFeesInfo(e){const a=await this.contract.methods.getFeesInfo(e).call();return a.opfFee=this.web3.utils.fromWei(a.opfFee.toString()),a.marketFee=this.web3.utils.fromWei(a.marketFee.toString()),a.marketFeeAvailable=await this.unitsToAmount((await this.getExchange(e)).baseToken,a.marketFeeAvailable),a.oceanFeeAvailable=await this.unitsToAmount((await this.getExchange(e)).baseToken,a.oceanFeeAvailable),a.exchangeId=e,a}async getExchanges(){return await this.contract.methods.getExchanges().call()}async isActive(e){return await this.contract.methods.isActive(e).call()}async estActivateMint(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleMintState(a,!0).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async activateMint(e,a){const t=await this.getExchange(a);if(!t)return null;if(!0===t.withMint)return null;const b=await this.estActivateMint(e,a);return await this.contract.methods.toggleMintState(a,!0).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estDeactivateMint(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleMintState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async deactivateMint(e,a){const t=await this.getExchange(a);if(!t)return null;if(!1===t.withMint)return null;const b=await this.estDeactivate(e,a);return await this.contract.methods.toggleMintState(a,!1).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estCollectBT(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectBT(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectBT(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectBT(e,a);return await this.contract.methods.collectBT(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectDT(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectDT(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectDT(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectDT(e,a);return await this.contract.methods.collectDT(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectMarketFee(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectMarketFee(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectMarketFee(e,a);return await this.contract.methods.collectMarketFee(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectOceanFee(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectOceanFee(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectOceanFee(e,a);return await this.contract.methods.collectOceanFee(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async getOPFCollector(){let e=null;try{e=await this.contract.methods.opfCollector().call()}catch(e){c.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return e}async getRouter(){let e=null;try{e=await this.contract.methods.router().call()}catch(e){c.error(`ERROR: Failed to get Router address: ${e.message}`)}return e}async getExchangeOwner(e){let a=null;try{a=await(await this.getExchange(e)).exchangeOwner}catch(e){c.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return a}async estUpdateMarketFee(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFee(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFee(e,a,t){const b=await this.estSetRate(e,a,this.web3.utils.toWei(t));return await this.contract.methods.updateMarketFee(a,this.web3.utils.toWei(t)).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estUpdateMarketFeeCollector(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFeeCollector(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFeeCollector(e,a,t){const b=await this.estUpdateMarketFeeCollector(e,a,t);return await this.contract.methods.updateMarketFeeCollector(a,t).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}}var B={_format:"hh-sol-artifact-1",contractName:"ERC20TemplateEnterprise",sourceName:"contracts/templates/ERC20TemplateEnterprise.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],name:"BuyAndOrder",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterProposed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"_newPaymentCollector",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"NewPaymentCollector",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"consumer",type:"address"},{indexed:!1,internalType:"address",name:"payer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"serviceIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!0,internalType:"address",name:"publishMarketAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"OrderStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"providerFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"providerFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"providerFeeAmount",type:"uint256"},{indexed:!1,internalType:"bytes",name:"providerData",type:"bytes"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"ProviderFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFeesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BASE_COMMUNITY_FEE_PERCENTAGE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"addMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"addPaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"authERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],internalType:"struct ERC20TemplateEnterprise.OrderParams",name:"_orderParams",type:"tuple"},{internalType:"address",name:"dispenserContract",type:"address"}],name:"buyFromDispenserAndOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],internalType:"struct ERC20TemplateEnterprise.OrderParams",name:"_orderParams",type:"tuple"},{components:[{internalType:"address",name:"exchangeContract",type:"address"},{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"maxBaseTokenAmount",type:"uint256"},{internalType:"uint256",name:"swapMarketFee",type:"uint256"},{internalType:"address",name:"marketFeeAddress",type:"address"}],internalType:"struct ERC20TemplateEnterprise.FreParams",name:"_freParams",type:"tuple"}],name:"buyFromFreAndOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanFrom721",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_dispenser",type:"address"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"},{internalType:"bool",name:"withMint",type:"bool"}],name:"createDispenser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"fixedPriceAddress",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createFixedRate",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getERC721Address",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getPaymentCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],internalType:"struct ERC20Roles.RolesERC20",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPublishingMarketFee",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string[]",name:"strings_",type:"string[]"},{internalType:"address[]",name:"addresses_",type:"address[]"},{internalType:"address[]",name:"factoryAddresses_",type:"address[]"},{internalType:"uint256[]",name:"uints_",type:"uint256[]"},{internalType:"bytes[]",name:"bytes_",type:"bytes[]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"deployer",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"permissions",outputs:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"removeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"removePaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_value",type:"bytes"}],name:"setData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPaymentCollector",type:"address"}],name:"setPaymentCollector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_publishMarketFeeAddress",type:"address"},{internalType:"address",name:"_publishMarketFeeToken",type:"address"},{internalType:"uint256",name:"_publishMarketFeeAmount",type:"uint256"}],name:"setPublishingMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],name:"startOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x6080604052600a805460ff60a01b191690553480156200001e57600080fd5b5060408051808201825260048152631d195cdd60e21b60208083019182528351808501909452600a8452691d195cdd14de5b589bdb60b21b9084015281519192916200006d916003916200008c565b508051620000839060049060208401906200008c565b5050506200016f565b8280546200009a9062000132565b90600052602060002090601f016020900481019282620000be576000855562000109565b82601f10620000d957805160ff191683800117855562000109565b8280016001018555821562000109579182015b8281111562000109578251825591602001919060010190620000ec565b50620001179291506200011b565b5090565b5b808211156200011757600081556001016200011c565b600181811c908216806200014757607f821691505b602082108114156200016957634e487b7160e01b600052602260045260246000fd5b50919050565b61466c806200017f6000396000f3fe60806040526004361061027d5760003560e01c806379cc67901161014e578063ab62f0e1116100bb578063e487c2e811610077578063e487c2e8146108b1578063ec342ad0146108c6578063ee88ade1146108e2578063ef867ff414610902578063f887ea4014610922578063f94bb4211461094257005b8063ab62f0e1146107ee578063b2263a5d1461080e578063b3998be014610823578063d505accf14610843578063dd62ed3e14610863578063e086e5ec146108a957005b8063983b2d561161010a578063983b2d56146107155780639b4f44b614610735578063a457c2d714610755578063a9059cbb14610775578063aa271e1a14610795578063aa492ef9146107ce57005b806379cc67901461065e5780637ecebe001461067e57806382c03da5146106ab5780638b96412b146106c057806395d89b41146106e057806396fb3eaf146106f557005b8063355274ea116101ec57806342966c68116101a857806342966c681461059f5780634f189cb2146105bf57806357a3a31b146105d457806357ad5ff6146105f45780635d1ca6311461061457806370a082311461062857005b8063355274ea146104d95780633644e515146104ee578063392e53cd146105045780633950935114610523578063397b37431461054357806340c10f191461057f57005b806318636d3c1161023b57806318636d3c1461040357806323b872dd1461042357806325b00243146104435780633092afd51461046357806330adf81f14610483578063313ce567146104b757005b80627ffb781461027f57806301e88208146102b657806306fdde0314610306578063095ea7b314610328578063160a79251461035857806318160ddd146103e4575b005b34801561028b57600080fd5b50600b546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102c257600080fd5b506102ef6102d13660046137b5565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102ad565b34801561031257600080fd5b5061031b610962565b6040516102ad919061382a565b34801561033457600080fd5b5061034861034336600461383d565b6109f4565b60405190151581526020016102ad565b34801561036457600080fd5b506103c56103733660046137b5565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102ad565b3480156103f057600080fd5b506002545b6040519081526020016102ad565b34801561040f57600080fd5b5061027d61041e366004613a38565b610a0a565b34801561042f57600080fd5b5061034861043e366004613a89565b610b1b565b34801561044f57600080fd5b5061027d61045e3660046137b5565b610bc7565b34801561046f57600080fd5b5061027d61047e3660046137b5565b610c61565b34801561048f57600080fd5b506103f57f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104c357600080fd5b5060125b60405160ff90911681526020016102ad565b3480156104e557600080fd5b506009546103f5565b3480156104fa57600080fd5b506103f560105481565b34801561051057600080fd5b50600a54600160a01b900460ff16610348565b34801561052f57600080fd5b5061034861053e36600461383d565b610cf8565b34801561054f57600080fd5b50600d54600e54600f54604080516001600160a01b039485168152939092166020840152908201526060016102ad565b34801561058b57600080fd5b5061027d61059a36600461383d565b610d34565b3480156105ab57600080fd5b5061027d6105ba366004613aca565b610e05565b3480156105cb57600080fd5b5061027d610e0f565b3480156105e057600080fd5b5061027d6105ef3660046137b5565b610ef6565b34801561060057600080fd5b5061027d61060f366004613a89565b611038565b34801561062057600080fd5b5060026104c7565b34801561063457600080fd5b506103f56106433660046137b5565b6001600160a01b031660009081526020819052604090205490565b34801561066a57600080fd5b5061027d61067936600461383d565b61118c565b34801561068a57600080fd5b506103f56106993660046137b5565b60116020526000908152604090205481565b3480156106b757600080fd5b5061027d61120d565b3480156106cc57600080fd5b506103f56106db366004613b71565b611267565b3480156106ec57600080fd5b5061031b611428565b34801561070157600080fd5b506103486107103660046137b5565b611437565b34801561072157600080fd5b5061027d6107303660046137b5565b6114b2565b34801561074157600080fd5b5061027d610750366004613c46565b611549565b34801561076157600080fd5b5061034861077036600461383d565b611565565b34801561078157600080fd5b5061034861079036600461383d565b6115fe565b3480156107a157600080fd5b506103486107b03660046137b5565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107da57600080fd5b5061027d6107e93660046137b5565b61160b565b3480156107fa57600080fd5b5061027d610809366004613cf2565b6116a2565b34801561081a57600080fd5b506103f56117d3565b34801561082f57600080fd5b5061034861083e366004613dae565b6117e9565b34801561084f57600080fd5b5061027d61085e366004613e9e565b611923565b34801561086f57600080fd5b506103f561087e366004613f0c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027d611b2a565b3480156108bd57600080fd5b50610299611b6a565b3480156108d257600080fd5b506103f5670de0b6b3a764000081565b3480156108ee57600080fd5b5061027d6108fd366004613f3a565b611bff565b34801561090e57600080fd5b5061029961091d366004613aca565b611fdd565b34801561092e57600080fd5b50601254610299906001600160a01b031681565b34801561094e57600080fd5b5061027d61095d366004613fea565b612007565b60606007805461097190614034565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614034565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b6000610a0133848461212a565b50600192915050565b604051631d746d8360e01b8152306004820152670de0b6b3a764000060248201819052336044830152906001600160a01b03831690631d746d8390606401600060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b50503360009081526020819052604090205483925090501015610ae05760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206765742044542066726f6d2044697370656e7365720060448201526064015b60405180910390fd5b610b16836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b610100015161224e565b505050565b6000610b2884848461267e565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bad5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ad7565b610bba853385840361212a565b60019150505b9392505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c35919061406f565b60200151610c555760405162461bcd60e51b8152600401610ad7906140f3565b610c5e8161284c565b50565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccf919061406f565b60200151610cef5760405162461bcd60e51b8152600401610ad7906140f3565b610c5e816128b9565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a01918590610d2f90869061413e565b61212a565b3360009081526005602052604090205460ff16610d935760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610ad7565b600954610da982610da360025490565b90612919565b1115610df75760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610ad7565b610e018282612925565b5050565b610c5e3382612a04565b600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7c9190614156565b6001600160a01b0316336001600160a01b031614610edc5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610ad7565b610ee4612b52565b600c80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610f875750600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f82919061406f565b602001515b610fe75760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610ad7565b610ff081612c01565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600d546001600160a01b031633146110a55760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610ad7565b6001600160a01b03831661110c5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610ad7565b600d80546001600160a01b038581166001600160a01b03199283168117909355600e8054918616919092168117909155600f839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b6000611198833361087e565b9050818110156111f65760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610ad7565b611203833384840361212a565b610b168383612a04565b600b546001600160a01b03163314610edc5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610ad7565b600b5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156112b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d6919061406f565b602001516112f65760405162461bcd60e51b8152600401610ad7906140f3565b308360038151811061130a5761130a614173565b6001600160a01b039283166020918202929092010152601254604051638244937560e01b815291169063824493759061134b90879087908790600401614189565b6020604051808303816000875af115801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e919061421d565b90506000826004815181106113a5576113a5614173565b602002602001015111156113bc576113bc84612c23565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e616581846000815181106113f1576113f1614173565b60200260200101516040516114199291909182526001600160a01b0316602082015260400190565b60405180910390a19392505050565b60606008805461097190614034565b600b5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af1158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061406f565b6020015192915050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af11580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611520919061406f565b602001516115405760405162461bcd60e51b8152600401610ad7906140f3565b610c5e81612c23565b61155a89898989898989898961224e565b505050505050505050565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156115e75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ad7565b6115f4338585840361212a565b5060019392505050565b6000610a0133848461267e565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611679919061406f565b602001516116995760405162461bcd60e51b8152600401610ad7906140f3565b610c5e81612d1d565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af11580156116ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611710919061406f565b602001516117305760405162461bcd60e51b8152600401610ad7906140f3565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600b546301caf8fd60e31b83529092506001600160a01b031690630e57c7e89061179c90849087908790600401614236565b600060405180830381600087803b1580156117b657600080fd5b505af11580156117ca573d6000803e3d6000fd5b50505050505050565b6117e66064670de0b6b3a764000061426c565b81565b600a54600090600160a01b900460ff16156118605760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610ad7565b61191461186d8b8d61428e565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525061190f92508991508a9050614315565b612e2b565b9b9a5050505050505050505050565b438410156119665760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610ad7565b6010546001600160a01b038816600090815260116020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b9190876119b98361437c565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611a3292919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611a9d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611ad35750886001600160a01b0316816001600160a01b0316145b611b1f5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610ad7565b61155a89898961212a565b611b32611b6a565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c5e573d6000803e3d6000fd5b600c546000906001600160a01b0316611bef57600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015611bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bea9190614156565b905090565b50600c546001600160a01b031690565b80516020820151604051634c87087d60e01b815260009283926001600160a01b0390911691634c87087d91611c3a9160040190815260200190565b61018060405180830381865afa158015611c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7c9190614397565b5050505050505050935050925050306001600160a01b0316826001600160a01b031614611cfb5760405162461bcd60e51b815260206004820152602760248201527f5468697320466978656452617465206973206e6f742070726f766964696e67206044820152661d1a1a5cc8111560ca1b6064820152608401610ad7565b8251602084015160405163c99733a760e01b81526004810191909152670de0b6b3a7640000602482015260009182916001600160a01b039091169063c99733a790604401608060405180830381865afa158015611d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d809190614454565b5050915091508460400151821115611dea5760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b6064820152608401610ad7565b6000670de0b6b3a7640000866060015183611e05919061448a565b611e0f919061426c565b9050611e1b818461413e565b9250611e326001600160a01b03851633308661332a565b8551611e49906001600160a01b0386169085613395565b8551602087015160405163412dae6b60e11b81526004810191909152670de0b6b3a76400006024820152604481018590526001600160a01b039091169063825b5cd690606401600060405180830381600087803b158015611ea957600080fd5b505af1158015611ebd573d6000803e3d6000fd5b505030600090815260208190526040902054670de0b6b3a7640000925090501015611f2a5760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206275792044542066726f6d20466978656452617465006044820152606401610ad7565b611f3d3033670de0b6b3a764000061267e565b611f738760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f610100015161224e565b8015611f93576080860151611f93906001600160a01b0386169083613447565b60408051338152602081018590529081018290527fe89458a7527f4bf466ab18794ab8b1ca208b478483a1a87bcf0d976d421b4aff9060600160405180910390a150505050505050565b60068181548110611fed57600080fd5b6000918252602090912001546001600160a01b0316905081565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015612051573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612075919061406f565b602001516120955760405162461bcd60e51b8152600401610ad7906140f3565b601254604051636b14d00560e11b81526001600160a01b0386811660048301523060248301819052604483018790526064830186905233608484015260a48301529091169063d629a00a9060c401600060405180830381600087803b1580156120fd57600080fd5b505af1158015612111573d6000803e3d6000fd5b5050505080156121245761212484612c23565b50505050565b6001600160a01b03831661218c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ad7565b6001600160a01b0382166121ed5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ad7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b33600090815260208190526040812054670de0b6b3a764000091908211156122c65760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610ad7565b600d5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a36000600f541180156123415750600e546001600160a01b031615155b80156123575750600d546001600160a01b031615155b1561248257600f54600e5461237b916001600160a01b03909116903390309061332a565b600f54612389906064613477565b600d54600f549192506123bf916001600160a01b03909116906123ac9084613483565b600e546001600160a01b03169190613447565b600e54600d54600f546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b4906124049085613483565b60405190815260200160405180910390a3801561248257600a54600e54612438916001600160a01b03918216911683613447565b600e54600a546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c6040516020016124d694939291906144a9565b604051602081830303815290604052805190602001206040516020016124fd9291906144ef565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015612568573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b0316146125cc5760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610ad7565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051612617959493929190614511565b60405180910390a360008a11801561263757506001600160a01b038b1615155b801561264b57506001600160a01b038c1615155b15612665576126656001600160a01b038c16338e8d61332a565b61266e85610e05565b5050505050505050505050505050565b6001600160a01b0383166126e25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ad7565b6001600160a01b0382166127445760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ad7565b6001600160a01b038316600090815260208190526040902054818110156127bc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ad7565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906127f390849061413e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161283f91815260200190565b60405180910390a3612124565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906128ad9042904390918252602082015260400190565b60405180910390a35050565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906128ad9042904390918252602082015260400190565b6000610bc0828461413e565b6001600160a01b03821661297b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ad7565b806002600082825461298d919061413e565b90915550506001600160a01b038216600090815260208190526040812080548392906129ba90849061413e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216612a645760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ad7565b6001600160a01b03821660009081526020819052604090205481811015612ad85760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ad7565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612b0790849061454a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612bb85760006005600060068481548110612b7857612b78614173565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612bb08161437c565b915050612b55565b50612bc5600660006136d9565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600560205260409020805460ff1615612c8d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610ad7565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591016128ad565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612d975760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610ad7565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016128ad565b60008084600081518110612e4157612e41614173565b60200260200101519050600085600181518110612e6057612e60614173565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612ee25760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610ad7565b6001600160a01b038116612f5e5760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610ad7565b84600081518110612f7157612f71614173565b602002602001015160001415612fd55760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610ad7565b84600081518110612fe857612fe8614173565b60200260200101516009819055508760008151811061300957613009614173565b6020026020010151600790805190602001906130269291906136f7565b508760018151811061303a5761303a614173565b6020026020010151600890805190602001906130579291906136f7565b50600b80546001600160a01b0319166001600160a01b03841617905585518690600290811061308857613088614173565b6020908102919091010151601280546001600160a01b039283166001600160a01b0319909116179055600a80546001600160a81b03191691831691909117600160a01b17905586516130f29088906000906130e5576130e5614173565b6020026020010151612c23565b60006001600160a01b03168760018151811061311057613110614173565b60200260200101516001600160a01b0316146131ba576131498760018151811061313c5761313c614173565b6020026020010151612c01565b8660018151811061315c5761315c614173565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516131b1929190918252602082015260400190565b60405180910390a35b866002815181106131cd576131cd614173565b6020026020010151600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061320e5761320e614173565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061324f5761324f614173565b6020026020010151600f8190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60076040516132929190614561565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206010555050600a54600160a01b900460ff16979650505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526121249085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261348f565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156133e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061340a919061421d565b613414919061413e565b6040516001600160a01b03851660248201526044810182905290915061212490859063095ea7b360e01b9060640161335e565b6040516001600160a01b038316602482015260448101829052610b1690849063a9059cbb60e01b9060640161335e565b6000610bc0828461426c565b6000610bc0828461454a565b60006134e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135619092919063ffffffff16565b805190915015610b16578080602001905181019061350291906145fd565b610b165760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ad7565b60606135708484600085613578565b949350505050565b6060824710156135d95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ad7565b843b6136275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad7565b600080866001600160a01b03168587604051613643919061461a565b60006040518083038185875af1925050503d8060008114613680576040519150601f19603f3d011682016040523d82523d6000602084013e613685565b606091505b50915091506136958282866136a0565b979650505050505050565b606083156136af575081610bc0565b8251156136bf5782518084602001fd5b8160405162461bcd60e51b8152600401610ad7919061382a565b5080546000825590600052602060002090810190610c5e919061377b565b82805461370390614034565b90600052602060002090601f016020900481019282613725576000855561376b565b82601f1061373e57805160ff191683800117855561376b565b8280016001018555821561376b579182015b8281111561376b578251825591602001919060010190613750565b5061377792915061377b565b5090565b5b80821115613777576000815560010161377c565b6001600160a01b0381168114610c5e57600080fd5b80356137b081613790565b919050565b6000602082840312156137c757600080fd5b8135610bc081613790565b60005b838110156137ed5781810151838201526020016137d5565b838111156121245750506000910152565b600081518084526138168160208601602086016137d2565b601f01601f19169290920160200192915050565b602081526000610bc060208301846137fe565b6000806040838503121561385057600080fd5b823561385b81613790565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b03811182821017156138a2576138a2613869565b60405290565b60405160a081016001600160401b03811182821017156138a2576138a2613869565b604051601f8201601f191681016001600160401b03811182821017156138f2576138f2613869565b604052919050565b803560ff811681146137b057600080fd5b60006001600160401b0383111561392457613924613869565b613937601f8401601f19166020016138ca565b905082815283838301111561394b57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261397357600080fd5b610bc08383356020850161390b565b6000610120828403121561399557600080fd5b61399d61387f565b90506139a8826137a5565b8152602082013560208201526139c0604083016137a5565b60408201526139d1606083016137a5565b6060820152608082013560808201526139ec60a083016138fa565b60a082015260c082013560c082015260e082013560e0820152610100808301356001600160401b03811115613a2057600080fd5b613a2c85828601613962565b82840152505092915050565b60008060408385031215613a4b57600080fd5b82356001600160401b03811115613a6157600080fd5b613a6d85828601613982565b9250506020830135613a7e81613790565b809150509250929050565b600080600060608486031215613a9e57600080fd5b8335613aa981613790565b92506020840135613ab981613790565b929592945050506040919091013590565b600060208284031215613adc57600080fd5b5035919050565b60006001600160401b03821115613afc57613afc613869565b5060051b60200190565b600082601f830112613b1757600080fd5b81356020613b2c613b2783613ae3565b6138ca565b82815260059290921b84018101918181019086841115613b4b57600080fd5b8286015b84811015613b665780358352918301918301613b4f565b509695505050505050565b600080600060608486031215613b8657600080fd5b8335613b9181613790565b92506020848101356001600160401b0380821115613bae57600080fd5b818701915087601f830112613bc257600080fd5b8135613bd0613b2782613ae3565b81815260059190911b8301840190848101908a831115613bef57600080fd5b938501935b82851015613c16578435613c0781613790565b82529385019390850190613bf4565b965050506040870135925080831115613c2e57600080fd5b5050613c3c86828701613b06565b9150509250925092565b60008060008060008060008060006101208a8c031215613c6557600080fd5b8935613c7081613790565b985060208a0135975060408a0135613c8781613790565b965060608a0135613c9781613790565b955060808a01359450613cac60a08b016138fa565b935060c08a0135925060e08a013591506101008a01356001600160401b03811115613cd657600080fd5b613ce28c828d01613962565b9150509295985092959850929598565b60008060208385031215613d0557600080fd5b82356001600160401b0380821115613d1c57600080fd5b818501915085601f830112613d3057600080fd5b813581811115613d3f57600080fd5b866020828501011115613d5157600080fd5b60209290920196919550909350505050565b60008083601f840112613d7557600080fd5b5081356001600160401b03811115613d8c57600080fd5b6020830191508360208260051b8501011115613da757600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613dcd57600080fd5b8a356001600160401b0380821115613de457600080fd5b613df08e838f01613d63565b909c509a5060208d0135915080821115613e0957600080fd5b613e158e838f01613d63565b909a50985060408d0135915080821115613e2e57600080fd5b613e3a8e838f01613d63565b909850965060608d0135915080821115613e5357600080fd5b613e5f8e838f01613d63565b909650945060808d0135915080821115613e7857600080fd5b50613e858d828e01613d63565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613eb957600080fd5b8735613ec481613790565b96506020880135613ed481613790565b95506040880135945060608801359350613ef0608089016138fa565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613f1f57600080fd5b8235613f2a81613790565b91506020830135613a7e81613790565b60008082840360c0811215613f4e57600080fd5b83356001600160401b03811115613f6457600080fd5b613f7086828701613982565b93505060a0601f1982011215613f8557600080fd5b50613f8e6138a8565b6020840135613f9c81613790565b8082525060408401356020820152606084013560408201526080840135606082015260a0840135613fcc81613790565b6080820152919491935090915050565b8015158114610c5e57600080fd5b6000806000806080858703121561400057600080fd5b843561400b81613790565b93506020850135925060408501359150606085013561402981613fdc565b939692955090935050565b600181811c9082168061404857607f821691505b6020821081141561406957634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561408157600080fd5b604051608081018181106001600160401b03821117156140a3576140a3613869565b60405282516140b181613fdc565b815260208301516140c181613fdc565b602082015260408301516140d481613fdc565b604082015260608301516140e781613fdc565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561415157614151614128565b500190565b60006020828403121561416857600080fd5b8151610bc081613790565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038481168252606060208084018290528551918401829052600092868201929091906080860190855b818110156141d75785518516835294830194918301916001016141b9565b5050858103604087015286518082529082019350915080860160005b8381101561420f578151855293820193908201906001016141f3565b509298975050505050505050565b60006020828403121561422f57600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261428957634e487b7160e01b600052601260045260246000fd5b500490565b600061429c613b2784613ae3565b80848252602080830192508560051b8501368111156142ba57600080fd5b855b818110156143095780356001600160401b038111156142db5760008081fd5b870136601f8201126142ed5760008081fd5b6142fb36823586840161390b565b8652509382019382016142bc565b50919695505050505050565b6000614323613b2784613ae3565b80848252602080830192508560051b85013681111561434157600080fd5b855b818110156143095780356001600160401b038111156143625760008081fd5b61436e36828a01613962565b865250938201938201614343565b600060001982141561439057614390614128565b5060010190565b6000806000806000806000806000806000806101808d8f0312156143ba57600080fd5b8c516143c581613790565b60208e0151909c506143d681613790565b60408e015160608f0151919c509a506143ee81613790565b8099505060808d0151975060a08d0151965060c08d015161440e81613fdc565b8096505060e08d015194506101008d015193506101208d015192506101408d015191506101608d015161444081613fdc565b809150509295989b509295989b509295989b565b6000806000806080858703121561446a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008160001904831182151516156144a4576144a4614128565b500290565b600085516144bb818460208a016137d2565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b600083516145018184602088016137d2565b9190910191825250602001919050565b85815260a06020820152600061452a60a08301876137fe565b60ff95909516604083015250606081019290925260809091015292915050565b60008282101561455c5761455c614128565b500390565b600080835481600182811c91508083168061457d57607f831692505b602080841082141561459d57634e487b7160e01b86526022600452602486fd5b8180156145b157600181146145c2576145ef565b60ff198616895284890196506145ef565b60008a81526020902060005b868110156145e75781548b8201529085019083016145ce565b505084890196505b509498975050505050505050565b60006020828403121561460f57600080fd5b8151610bc081613fdc565b6000825161462c8184602087016137d2565b919091019291505056fea26469706673582212209041cd5099503a2e31e599b01c0c938b713c90fa811d0e03aacc28d1251e8ce164736f6c634300080a0033",deployedBytecode:"0x60806040526004361061027d5760003560e01c806379cc67901161014e578063ab62f0e1116100bb578063e487c2e811610077578063e487c2e8146108b1578063ec342ad0146108c6578063ee88ade1146108e2578063ef867ff414610902578063f887ea4014610922578063f94bb4211461094257005b8063ab62f0e1146107ee578063b2263a5d1461080e578063b3998be014610823578063d505accf14610843578063dd62ed3e14610863578063e086e5ec146108a957005b8063983b2d561161010a578063983b2d56146107155780639b4f44b614610735578063a457c2d714610755578063a9059cbb14610775578063aa271e1a14610795578063aa492ef9146107ce57005b806379cc67901461065e5780637ecebe001461067e57806382c03da5146106ab5780638b96412b146106c057806395d89b41146106e057806396fb3eaf146106f557005b8063355274ea116101ec57806342966c68116101a857806342966c681461059f5780634f189cb2146105bf57806357a3a31b146105d457806357ad5ff6146105f45780635d1ca6311461061457806370a082311461062857005b8063355274ea146104d95780633644e515146104ee578063392e53cd146105045780633950935114610523578063397b37431461054357806340c10f191461057f57005b806318636d3c1161023b57806318636d3c1461040357806323b872dd1461042357806325b00243146104435780633092afd51461046357806330adf81f14610483578063313ce567146104b757005b80627ffb781461027f57806301e88208146102b657806306fdde0314610306578063095ea7b314610328578063160a79251461035857806318160ddd146103e4575b005b34801561028b57600080fd5b50600b546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102c257600080fd5b506102ef6102d13660046137b5565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102ad565b34801561031257600080fd5b5061031b610962565b6040516102ad919061382a565b34801561033457600080fd5b5061034861034336600461383d565b6109f4565b60405190151581526020016102ad565b34801561036457600080fd5b506103c56103733660046137b5565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102ad565b3480156103f057600080fd5b506002545b6040519081526020016102ad565b34801561040f57600080fd5b5061027d61041e366004613a38565b610a0a565b34801561042f57600080fd5b5061034861043e366004613a89565b610b1b565b34801561044f57600080fd5b5061027d61045e3660046137b5565b610bc7565b34801561046f57600080fd5b5061027d61047e3660046137b5565b610c61565b34801561048f57600080fd5b506103f57f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104c357600080fd5b5060125b60405160ff90911681526020016102ad565b3480156104e557600080fd5b506009546103f5565b3480156104fa57600080fd5b506103f560105481565b34801561051057600080fd5b50600a54600160a01b900460ff16610348565b34801561052f57600080fd5b5061034861053e36600461383d565b610cf8565b34801561054f57600080fd5b50600d54600e54600f54604080516001600160a01b039485168152939092166020840152908201526060016102ad565b34801561058b57600080fd5b5061027d61059a36600461383d565b610d34565b3480156105ab57600080fd5b5061027d6105ba366004613aca565b610e05565b3480156105cb57600080fd5b5061027d610e0f565b3480156105e057600080fd5b5061027d6105ef3660046137b5565b610ef6565b34801561060057600080fd5b5061027d61060f366004613a89565b611038565b34801561062057600080fd5b5060026104c7565b34801561063457600080fd5b506103f56106433660046137b5565b6001600160a01b031660009081526020819052604090205490565b34801561066a57600080fd5b5061027d61067936600461383d565b61118c565b34801561068a57600080fd5b506103f56106993660046137b5565b60116020526000908152604090205481565b3480156106b757600080fd5b5061027d61120d565b3480156106cc57600080fd5b506103f56106db366004613b71565b611267565b3480156106ec57600080fd5b5061031b611428565b34801561070157600080fd5b506103486107103660046137b5565b611437565b34801561072157600080fd5b5061027d6107303660046137b5565b6114b2565b34801561074157600080fd5b5061027d610750366004613c46565b611549565b34801561076157600080fd5b5061034861077036600461383d565b611565565b34801561078157600080fd5b5061034861079036600461383d565b6115fe565b3480156107a157600080fd5b506103486107b03660046137b5565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107da57600080fd5b5061027d6107e93660046137b5565b61160b565b3480156107fa57600080fd5b5061027d610809366004613cf2565b6116a2565b34801561081a57600080fd5b506103f56117d3565b34801561082f57600080fd5b5061034861083e366004613dae565b6117e9565b34801561084f57600080fd5b5061027d61085e366004613e9e565b611923565b34801561086f57600080fd5b506103f561087e366004613f0c565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027d611b2a565b3480156108bd57600080fd5b50610299611b6a565b3480156108d257600080fd5b506103f5670de0b6b3a764000081565b3480156108ee57600080fd5b5061027d6108fd366004613f3a565b611bff565b34801561090e57600080fd5b5061029961091d366004613aca565b611fdd565b34801561092e57600080fd5b50601254610299906001600160a01b031681565b34801561094e57600080fd5b5061027d61095d366004613fea565b612007565b60606007805461097190614034565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614034565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b6000610a0133848461212a565b50600192915050565b604051631d746d8360e01b8152306004820152670de0b6b3a764000060248201819052336044830152906001600160a01b03831690631d746d8390606401600060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b50503360009081526020819052604090205483925090501015610ae05760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206765742044542066726f6d2044697370656e7365720060448201526064015b60405180910390fd5b610b16836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b610100015161224e565b505050565b6000610b2884848461267e565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bad5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ad7565b610bba853385840361212a565b60019150505b9392505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c11573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c35919061406f565b60200151610c555760405162461bcd60e51b8152600401610ad7906140f3565b610c5e8161284c565b50565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cab573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ccf919061406f565b60200151610cef5760405162461bcd60e51b8152600401610ad7906140f3565b610c5e816128b9565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a01918590610d2f90869061413e565b61212a565b3360009081526005602052604090205460ff16610d935760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610ad7565b600954610da982610da360025490565b90612919565b1115610df75760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610ad7565b610e018282612925565b5050565b610c5e3382612a04565b600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7c9190614156565b6001600160a01b0316336001600160a01b031614610edc5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610ad7565b610ee4612b52565b600c80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610f875750600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f5e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f82919061406f565b602001515b610fe75760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610ad7565b610ff081612c01565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600d546001600160a01b031633146110a55760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610ad7565b6001600160a01b03831661110c5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610ad7565b600d80546001600160a01b038581166001600160a01b03199283168117909355600e8054918616919092168117909155600f839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b6000611198833361087e565b9050818110156111f65760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610ad7565b611203833384840361212a565b610b168383612a04565b600b546001600160a01b03163314610edc5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610ad7565b600b5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156112b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112d6919061406f565b602001516112f65760405162461bcd60e51b8152600401610ad7906140f3565b308360038151811061130a5761130a614173565b6001600160a01b039283166020918202929092010152601254604051638244937560e01b815291169063824493759061134b90879087908790600401614189565b6020604051808303816000875af115801561136a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061138e919061421d565b90506000826004815181106113a5576113a5614173565b602002602001015111156113bc576113bc84612c23565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e616581846000815181106113f1576113f1614173565b60200260200101516040516114199291909182526001600160a01b0316602082015260400190565b60405180910390a19392505050565b60606008805461097190614034565b600b5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af1158015611484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a8919061406f565b6020015192915050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af11580156114fc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611520919061406f565b602001516115405760405162461bcd60e51b8152600401610ad7906140f3565b610c5e81612c23565b61155a89898989898989898961224e565b505050505050505050565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156115e75760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ad7565b6115f4338585840361212a565b5060019392505050565b6000610a0133848461267e565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611655573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611679919061406f565b602001516116995760405162461bcd60e51b8152600401610ad7906140f3565b610c5e81612d1d565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af11580156116ec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611710919061406f565b602001516117305760405162461bcd60e51b8152600401610ad7906140f3565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600b546301caf8fd60e31b83529092506001600160a01b031690630e57c7e89061179c90849087908790600401614236565b600060405180830381600087803b1580156117b657600080fd5b505af11580156117ca573d6000803e3d6000fd5b50505050505050565b6117e66064670de0b6b3a764000061426c565b81565b600a54600090600160a01b900460ff16156118605760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610ad7565b61191461186d8b8d61428e565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b91829185019084908082843760009201919091525061190f92508991508a9050614315565b612e2b565b9b9a5050505050505050505050565b438410156119665760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610ad7565b6010546001600160a01b038816600090815260116020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b9190876119b98361437c565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611a3292919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611a9d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611ad35750886001600160a01b0316816001600160a01b0316145b611b1f5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610ad7565b61155a89898961212a565b611b32611b6a565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c5e573d6000803e3d6000fd5b600c546000906001600160a01b0316611bef57600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015611bc6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bea9190614156565b905090565b50600c546001600160a01b031690565b80516020820151604051634c87087d60e01b815260009283926001600160a01b0390911691634c87087d91611c3a9160040190815260200190565b61018060405180830381865afa158015611c58573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7c9190614397565b5050505050505050935050925050306001600160a01b0316826001600160a01b031614611cfb5760405162461bcd60e51b815260206004820152602760248201527f5468697320466978656452617465206973206e6f742070726f766964696e67206044820152661d1a1a5cc8111560ca1b6064820152608401610ad7565b8251602084015160405163c99733a760e01b81526004810191909152670de0b6b3a7640000602482015260009182916001600160a01b039091169063c99733a790604401608060405180830381865afa158015611d5c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d809190614454565b5050915091508460400151821115611dea5760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b6064820152608401610ad7565b6000670de0b6b3a7640000866060015183611e05919061448a565b611e0f919061426c565b9050611e1b818461413e565b9250611e326001600160a01b03851633308661332a565b8551611e49906001600160a01b0386169085613395565b8551602087015160405163412dae6b60e11b81526004810191909152670de0b6b3a76400006024820152604481018590526001600160a01b039091169063825b5cd690606401600060405180830381600087803b158015611ea957600080fd5b505af1158015611ebd573d6000803e3d6000fd5b505030600090815260208190526040902054670de0b6b3a7640000925090501015611f2a5760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206275792044542066726f6d20466978656452617465006044820152606401610ad7565b611f3d3033670de0b6b3a764000061267e565b611f738760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f610100015161224e565b8015611f93576080860151611f93906001600160a01b0386169083613447565b60408051338152602081018590529081018290527fe89458a7527f4bf466ab18794ab8b1ca208b478483a1a87bcf0d976d421b4aff9060600160405180910390a150505050505050565b60068181548110611fed57600080fd5b6000918252602090912001546001600160a01b0316905081565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015612051573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612075919061406f565b602001516120955760405162461bcd60e51b8152600401610ad7906140f3565b601254604051636b14d00560e11b81526001600160a01b0386811660048301523060248301819052604483018790526064830186905233608484015260a48301529091169063d629a00a9060c401600060405180830381600087803b1580156120fd57600080fd5b505af1158015612111573d6000803e3d6000fd5b5050505080156121245761212484612c23565b50505050565b6001600160a01b03831661218c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ad7565b6001600160a01b0382166121ed5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ad7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b33600090815260208190526040812054670de0b6b3a764000091908211156122c65760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610ad7565b600d5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a36000600f541180156123415750600e546001600160a01b031615155b80156123575750600d546001600160a01b031615155b1561248257600f54600e5461237b916001600160a01b03909116903390309061332a565b600f54612389906064613477565b600d54600f549192506123bf916001600160a01b03909116906123ac9084613483565b600e546001600160a01b03169190613447565b600e54600d54600f546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b4906124049085613483565b60405190815260200160405180910390a3801561248257600a54600e54612438916001600160a01b03918216911683613447565b600e54600a546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c6040516020016124d694939291906144a9565b604051602081830303815290604052805190602001206040516020016124fd9291906144ef565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015612568573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b0316146125cc5760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610ad7565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051612617959493929190614511565b60405180910390a360008a11801561263757506001600160a01b038b1615155b801561264b57506001600160a01b038c1615155b15612665576126656001600160a01b038c16338e8d61332a565b61266e85610e05565b5050505050505050505050505050565b6001600160a01b0383166126e25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ad7565b6001600160a01b0382166127445760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ad7565b6001600160a01b038316600090815260208190526040902054818110156127bc5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ad7565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906127f390849061413e565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161283f91815260200190565b60405180910390a3612124565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906128ad9042904390918252602082015260400190565b60405180910390a35050565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906128ad9042904390918252602082015260400190565b6000610bc0828461413e565b6001600160a01b03821661297b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ad7565b806002600082825461298d919061413e565b90915550506001600160a01b038216600090815260208190526040812080548392906129ba90849061413e565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216612a645760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ad7565b6001600160a01b03821660009081526020819052604090205481811015612ad85760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ad7565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612b0790849061454a565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612bb85760006005600060068481548110612b7857612b78614173565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612bb08161437c565b915050612b55565b50612bc5600660006136d9565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600560205260409020805460ff1615612c8d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610ad7565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591016128ad565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612d975760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610ad7565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016128ad565b60008084600081518110612e4157612e41614173565b60200260200101519050600085600181518110612e6057612e60614173565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612ee25760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610ad7565b6001600160a01b038116612f5e5760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610ad7565b84600081518110612f7157612f71614173565b602002602001015160001415612fd55760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610ad7565b84600081518110612fe857612fe8614173565b60200260200101516009819055508760008151811061300957613009614173565b6020026020010151600790805190602001906130269291906136f7565b508760018151811061303a5761303a614173565b6020026020010151600890805190602001906130579291906136f7565b50600b80546001600160a01b0319166001600160a01b03841617905585518690600290811061308857613088614173565b6020908102919091010151601280546001600160a01b039283166001600160a01b0319909116179055600a80546001600160a81b03191691831691909117600160a01b17905586516130f29088906000906130e5576130e5614173565b6020026020010151612c23565b60006001600160a01b03168760018151811061311057613110614173565b60200260200101516001600160a01b0316146131ba576131498760018151811061313c5761313c614173565b6020026020010151612c01565b8660018151811061315c5761315c614173565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516131b1929190918252602082015260400190565b60405180910390a35b866002815181106131cd576131cd614173565b6020026020010151600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061320e5761320e614173565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061324f5761324f614173565b6020026020010151600f8190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60076040516132929190614561565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206010555050600a54600160a01b900460ff16979650505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526121249085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261348f565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156133e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061340a919061421d565b613414919061413e565b6040516001600160a01b03851660248201526044810182905290915061212490859063095ea7b360e01b9060640161335e565b6040516001600160a01b038316602482015260448101829052610b1690849063a9059cbb60e01b9060640161335e565b6000610bc0828461426c565b6000610bc0828461454a565b60006134e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135619092919063ffffffff16565b805190915015610b16578080602001905181019061350291906145fd565b610b165760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ad7565b60606135708484600085613578565b949350505050565b6060824710156135d95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ad7565b843b6136275760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad7565b600080866001600160a01b03168587604051613643919061461a565b60006040518083038185875af1925050503d8060008114613680576040519150601f19603f3d011682016040523d82523d6000602084013e613685565b606091505b50915091506136958282866136a0565b979650505050505050565b606083156136af575081610bc0565b8251156136bf5782518084602001fd5b8160405162461bcd60e51b8152600401610ad7919061382a565b5080546000825590600052602060002090810190610c5e919061377b565b82805461370390614034565b90600052602060002090601f016020900481019282613725576000855561376b565b82601f1061373e57805160ff191683800117855561376b565b8280016001018555821561376b579182015b8281111561376b578251825591602001919060010190613750565b5061377792915061377b565b5090565b5b80821115613777576000815560010161377c565b6001600160a01b0381168114610c5e57600080fd5b80356137b081613790565b919050565b6000602082840312156137c757600080fd5b8135610bc081613790565b60005b838110156137ed5781810151838201526020016137d5565b838111156121245750506000910152565b600081518084526138168160208601602086016137d2565b601f01601f19169290920160200192915050565b602081526000610bc060208301846137fe565b6000806040838503121561385057600080fd5b823561385b81613790565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b03811182821017156138a2576138a2613869565b60405290565b60405160a081016001600160401b03811182821017156138a2576138a2613869565b604051601f8201601f191681016001600160401b03811182821017156138f2576138f2613869565b604052919050565b803560ff811681146137b057600080fd5b60006001600160401b0383111561392457613924613869565b613937601f8401601f19166020016138ca565b905082815283838301111561394b57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261397357600080fd5b610bc08383356020850161390b565b6000610120828403121561399557600080fd5b61399d61387f565b90506139a8826137a5565b8152602082013560208201526139c0604083016137a5565b60408201526139d1606083016137a5565b6060820152608082013560808201526139ec60a083016138fa565b60a082015260c082013560c082015260e082013560e0820152610100808301356001600160401b03811115613a2057600080fd5b613a2c85828601613962565b82840152505092915050565b60008060408385031215613a4b57600080fd5b82356001600160401b03811115613a6157600080fd5b613a6d85828601613982565b9250506020830135613a7e81613790565b809150509250929050565b600080600060608486031215613a9e57600080fd5b8335613aa981613790565b92506020840135613ab981613790565b929592945050506040919091013590565b600060208284031215613adc57600080fd5b5035919050565b60006001600160401b03821115613afc57613afc613869565b5060051b60200190565b600082601f830112613b1757600080fd5b81356020613b2c613b2783613ae3565b6138ca565b82815260059290921b84018101918181019086841115613b4b57600080fd5b8286015b84811015613b665780358352918301918301613b4f565b509695505050505050565b600080600060608486031215613b8657600080fd5b8335613b9181613790565b92506020848101356001600160401b0380821115613bae57600080fd5b818701915087601f830112613bc257600080fd5b8135613bd0613b2782613ae3565b81815260059190911b8301840190848101908a831115613bef57600080fd5b938501935b82851015613c16578435613c0781613790565b82529385019390850190613bf4565b965050506040870135925080831115613c2e57600080fd5b5050613c3c86828701613b06565b9150509250925092565b60008060008060008060008060006101208a8c031215613c6557600080fd5b8935613c7081613790565b985060208a0135975060408a0135613c8781613790565b965060608a0135613c9781613790565b955060808a01359450613cac60a08b016138fa565b935060c08a0135925060e08a013591506101008a01356001600160401b03811115613cd657600080fd5b613ce28c828d01613962565b9150509295985092959850929598565b60008060208385031215613d0557600080fd5b82356001600160401b0380821115613d1c57600080fd5b818501915085601f830112613d3057600080fd5b813581811115613d3f57600080fd5b866020828501011115613d5157600080fd5b60209290920196919550909350505050565b60008083601f840112613d7557600080fd5b5081356001600160401b03811115613d8c57600080fd5b6020830191508360208260051b8501011115613da757600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613dcd57600080fd5b8a356001600160401b0380821115613de457600080fd5b613df08e838f01613d63565b909c509a5060208d0135915080821115613e0957600080fd5b613e158e838f01613d63565b909a50985060408d0135915080821115613e2e57600080fd5b613e3a8e838f01613d63565b909850965060608d0135915080821115613e5357600080fd5b613e5f8e838f01613d63565b909650945060808d0135915080821115613e7857600080fd5b50613e858d828e01613d63565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613eb957600080fd5b8735613ec481613790565b96506020880135613ed481613790565b95506040880135945060608801359350613ef0608089016138fa565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613f1f57600080fd5b8235613f2a81613790565b91506020830135613a7e81613790565b60008082840360c0811215613f4e57600080fd5b83356001600160401b03811115613f6457600080fd5b613f7086828701613982565b93505060a0601f1982011215613f8557600080fd5b50613f8e6138a8565b6020840135613f9c81613790565b8082525060408401356020820152606084013560408201526080840135606082015260a0840135613fcc81613790565b6080820152919491935090915050565b8015158114610c5e57600080fd5b6000806000806080858703121561400057600080fd5b843561400b81613790565b93506020850135925060408501359150606085013561402981613fdc565b939692955090935050565b600181811c9082168061404857607f821691505b6020821081141561406957634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561408157600080fd5b604051608081018181106001600160401b03821117156140a3576140a3613869565b60405282516140b181613fdc565b815260208301516140c181613fdc565b602082015260408301516140d481613fdc565b604082015260608301516140e781613fdc565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000821982111561415157614151614128565b500190565b60006020828403121561416857600080fd5b8151610bc081613790565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038481168252606060208084018290528551918401829052600092868201929091906080860190855b818110156141d75785518516835294830194918301916001016141b9565b5050858103604087015286518082529082019350915080860160005b8381101561420f578151855293820193908201906001016141f3565b509298975050505050505050565b60006020828403121561422f57600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261428957634e487b7160e01b600052601260045260246000fd5b500490565b600061429c613b2784613ae3565b80848252602080830192508560051b8501368111156142ba57600080fd5b855b818110156143095780356001600160401b038111156142db5760008081fd5b870136601f8201126142ed5760008081fd5b6142fb36823586840161390b565b8652509382019382016142bc565b50919695505050505050565b6000614323613b2784613ae3565b80848252602080830192508560051b85013681111561434157600080fd5b855b818110156143095780356001600160401b038111156143625760008081fd5b61436e36828a01613962565b865250938201938201614343565b600060001982141561439057614390614128565b5060010190565b6000806000806000806000806000806000806101808d8f0312156143ba57600080fd5b8c516143c581613790565b60208e0151909c506143d681613790565b60408e015160608f0151919c509a506143ee81613790565b8099505060808d0151975060a08d0151965060c08d015161440e81613fdc565b8096505060e08d015194506101008d015193506101208d015192506101408d015191506101608d015161444081613fdc565b809150509295989b509295989b509295989b565b6000806000806080858703121561446a57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008160001904831182151516156144a4576144a4614128565b500290565b600085516144bb818460208a016137d2565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b600083516145018184602088016137d2565b9190910191825250602001919050565b85815260a06020820152600061452a60a08301876137fe565b60ff95909516604083015250606081019290925260809091015292915050565b60008282101561455c5761455c614128565b500390565b600080835481600182811c91508083168061457d57607f831692505b602080841082141561459d57634e487b7160e01b86526022600452602486fd5b8180156145b157600181146145c2576145ef565b60ff198616895284890196506145ef565b60008a81526020902060005b868110156145e75781548b8201529085019083016145ce565b505084890196505b509498975050505050505050565b60006020828403121561460f57600080fd5b8151610bc081613fdc565b6000825161462c8184602087016137d2565b919091019291505056fea26469706673582212209041cd5099503a2e31e599b01c0c938b713c90fa811d0e03aacc28d1251e8ce164736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}},$={_format:"hh-sol-artifact-1",contractName:"ERC721Template",sourceName:"contracts/templates/ERC721Template.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedTo725StoreList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedToCreateERC20List",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedToMetadataList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"contractAddress",type:"address"}],name:"ContractCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"key",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"value",type:"bytes"}],name:"DataChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_operation",type:"uint256"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!0,internalType:"uint256",name:"_value",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_data",type:"bytes"}],name:"Executed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"createdBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"string",name:"decryptorUrl",type:"string"},{indexed:!1,internalType:"bytes",name:"flags",type:"bytes"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataState",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"string",name:"decryptorUrl",type:"string"},{indexed:!1,internalType:"bytes",name:"flags",type:"bytes"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"validator",type:"address"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"MetadataValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFrom725StoreList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFromCreateERC20List",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFromMetadataList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"uint256",name:"cap",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"}],name:"TokenCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"string",name:"tokenURI",type:"string"},{indexed:!1,internalType:"uint256",name:"tokenID",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"TokenURIUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[{internalType:"address",name:"_managerAddress",type:"address"}],name:"addManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addTo725StoreList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addToCreateERC20List",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addToMetadataList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"auth",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],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:"createERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_operation",type:"uint256"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"}],name:"getData",outputs:[{internalType:"bytes",name:"_value",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMetaData",outputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint8",name:"",type:"uint8"},{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"manager",type:"bool"},{internalType:"bool",name:"deployERC20",type:"bool"},{internalType:"bool",name:"updateMetadata",type:"bool"},{internalType:"bool",name:"store",type:"bool"}],internalType:"struct ERC721RolesAddress.Roles",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokensList",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"hasMetaData",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"tokenFactory",type:"address"},{internalType:"address",name:"additionalERC20Deployer",type:"address"},{internalType:"string",name:"tokenURI",type:"string"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"isDeployed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataDecryptorAddress",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataDecryptorUrl",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataState",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFrom725StoreList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFromCreateERC20List",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFromMetadataList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_managerAddress",type:"address"}],name:"removeManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_baseURI",type:"string"}],name:"setBaseURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"},{internalType:"bytes",name:"_value",type:"bytes"}],name:"setDataERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{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 ERC721Template.metaDataProof[]",name:"_metadataProofs",type:"tuple[]"}],name:"setMetaData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_metaDataState",type:"uint8"}],name:"setMetaDataState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"},{internalType:"bytes",name:"_value",type:"bytes"}],name:"setNewData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"}],name:"setTokenURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ssContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x60806040523480156200001157600080fd5b50604080518082018252600881526754656d706c61746560c01b60208083019182528351808501909452600e84526d15195b5c1b185d1954de5b589bdb60921b908401528151919291620000689160009162000136565b5080516200007e90600190602084019062000136565b50620000959150632260147f60e11b9050620000b2565b620000a7632bd57b7360e01b620000b2565b6001600c5562000219565b6001600160e01b03198082161415620001115760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152600a60205260409020805460ff19166001179055565b8280546200014490620001dc565b90600052602060002090601f016020900481019282620001685760008555620001b3565b82601f106200018357805160ff1916838001178555620001b3565b82800160010185558215620001b3579182015b82811115620001b357825182559160200191906001019062000196565b50620001c1929150620001c5565b5090565b5b80821115620001c15760008155600101620001c6565b600181811c90821680620001f157607f821691505b602082108114156200021357634e487b7160e01b600052602260045260246000fd5b50919050565b6143cc80620002296000396000f3fe60806040526004361061025d5760003560e01c806354f6127f11610143578063a22cb465116100bb578063d2786ba411610077578063d2786ba41461082d578063d8053ad314610852578063e086e5ec14610871578063e38d7cad14610879578063e985e9c514610899578063fe1ec880146108e257005b8063a22cb46514610780578063ac18de43146107a0578063b0c41ead146107c0578063c55f8126146107e0578063c87b56dd146107f3578063ccd7d4761461081357005b806370a082311161010a57806370a082311461069157806370c166d7146106bf57806382cf129d146106df57806390184b02146106f457806395d89b411461072d57806396fb3eaf1461074257005b806354f6127f146105ef57806355f804b31461060f5780635d1ca6311461062f5780636352211e1461065157806367530a611461067157005b806323b872dd116101d6578063431053ac1161019d578063431053ac14610538578063466bca0214610558578063467c97f51461057a5780634a63740a1461059a5780634b2ee5e9146105ba5780634f189cb2146105da57005b806323b872dd146104a0578063273e06b3146104c05780632d06177a146104e0578063392e53cd1461050057806342842e0e1461051857005b80630e57c7e8116102255780630e57c7e81461032357806310c558bf14610343578063160a792514610363578063162094c41461044057806319c186e5146104605780631aa3adf91461048057005b806301ffc9a71461025f57806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee5780630e05662e1461030e575b005b34801561026b57600080fd5b5061027f61027a366004613545565b610902565b60405190151581526020015b60405180910390f35b3480156102a057600080fd5b506102a9610942565b60405161028b91906135c1565b3480156102c257600080fd5b506102d66102d13660046135d4565b6109d4565b6040516001600160a01b03909116815260200161028b565b3480156102fa57600080fd5b5061025d610309366004613602565b610a6e565b34801561031a57600080fd5b506102a9610b84565b34801561032f57600080fd5b5061025d61033e366004613676565b610c12565b34801561034f57600080fd5b5061025d61035e3660046136c1565b610c87565b34801561036f57600080fd5b5061040561037e3660046136c1565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b03166000908152600860209081526040918290208251608081018452905460ff808216151583526101008204811615159383019390935262010000810483161515938201939093526301000000909204161515606082015290565b60405161028b919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561044c57600080fd5b5061025d61045b3660046137bb565b610d5a565b34801561046c57600080fd5b5061025d61047b3660046136c1565b610de9565b34801561048c57600080fd5b5061025d61049b3660046138de565b610eb2565b3480156104ac57600080fd5b5061025d6104bb3660046139e5565b6112f0565b3480156104cc57600080fd5b5061025d6104db3660046136c1565b6113c2565b3480156104ec57600080fd5b5061025d6104fb3660046136c1565b6114fb565b34801561050c57600080fd5b50600f5460ff1661027f565b34801561052457600080fd5b5061025d6105333660046139e5565b61153e565b34801561054457600080fd5b5061025d6105533660046136c1565b6115e4565b34801561056457600080fd5b5061056d611719565b60405161028b9190613a26565b34801561058657600080fd5b5061025d610595366004613a73565b61177a565b3480156105a657600080fd5b5061025d6105b53660046136c1565b611805565b3480156105c657600080fd5b506014546102d6906001600160a01b031681565b3480156105e657600080fd5b5061025d6118ca565b3480156105fb57600080fd5b506102a961060a3660046135d4565b61190e565b34801561061b57600080fd5b5061025d61062a366004613a8e565b6119b0565b34801561063b57600080fd5b5060015b60405160ff909116815260200161028b565b34801561065d57600080fd5b506102d661066c3660046135d4565b611a01565b34801561067d57600080fd5b5061025d61068c366004613676565b611a78565b34801561069d57600080fd5b506106b16106ac3660046136c1565b611ae8565b60405190815260200161028b565b3480156106cb57600080fd5b5061027f6106da366004613ac2565b611b6f565b3480156106eb57600080fd5b506102a9611c8c565b34801561070057600080fd5b5061027f61070f3660046136c1565b6001600160a01b031660009081526015602052604090205460ff1690565b34801561073957600080fd5b506102a9611c99565b34801561074e57600080fd5b5061027f61075d3660046136c1565b6001600160a01b0316600090815260086020526040902054610100900460ff1690565b34801561078c57600080fd5b5061025d61079b366004613b90565b611ca8565b3480156107ac57600080fd5b5061025d6107bb3660046136c1565b611d66565b3480156107cc57600080fd5b506102d66107db3660046135d4565b611da9565b61025d6107ee366004613bce565b611dd3565b3480156107ff57600080fd5b506102a961080e3660046135d4565b611e1b565b34801561081f57600080fd5b5060125461063f9060ff1681565b34801561083957600080fd5b50610842611f79565b60405161028b9493929190613c37565b34801561085e57600080fd5b50600f5461027f90610100900460ff1681565b61025d6120c9565b34801561088557600080fd5b506102d6610894366004613cbc565b61210b565b3480156108a557600080fd5b5061027f6108b4366004613d8b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108ee57600080fd5b5061025d6108fd3660046136c1565b6122db565b60006301ffc9a760e01b6001600160e01b03198316148061093c57506001600160e01b031982166000908152600a602052604090205460ff165b92915050565b6060600d805461095190613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461097d90613db9565b80156109ca5780601f1061099f576101008083540402835291602001916109ca565b820191906000526020600020905b8154815290600101906020018083116109ad57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a7982611a01565b9050806001600160a01b0316836001600160a01b03161415610ae75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a49565b336001600160a01b0382161480610b035750610b0381336108b4565b610b755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a49565b610b7f838361240b565b505050565b60118054610b9190613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90613db9565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b505050505081565b3360009081526015602052604090205460ff16610c7c5760405162461bcd60e51b815260206004820152602260248201527f45524337323154656d706c6174653a204e4f5420455243323020436f6e74726160448201526118dd60f21b6064820152608401610a49565b610b7f838383612479565b3360009081526008602052604090205460ff161515600114610cbb5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805462ff000019166201000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917fc2a42571a74ce1442c8c44d375ba9442e7d55d94b37afeace261c83c62128fa490610d4e9042904390918252602082015260400190565b60405180910390a35050565b610d646001611a01565b6001600160a01b0316336001600160a01b031614610d945760405162461bcd60e51b8152600401610a4990613e2b565b610d9e82826124d2565b336001600160a01b03167f6de6cd3982065cbd31e789e3109106f4d76d1c8a46e85262045cf947fb3fd4ed82844243604051610ddd9493929190613e62565b60405180910390a25050565b3360009081526008602052604090205460ff161515600114610e1d5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805463ff0000001916630100000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917feb09276310ed110a7e565d64966d0ff68a47112d2dd5eeb6cbd7451836ce35ee90610d4e9042904390918252602082015260400190565b3360009081526008602052604090205462010000900460ff16610ee75760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff8d16179055610f0260108b8b613408565b50610f0f60118989613408565b50600f54610100900460ff16610f8657336001600160a01b03167f5463569dcc320958360074a9ab27e809e8a6942c394fb151d139b5f7b4ecb1bd8c8c8c8a8a8a8a8a4243604051610f6a9a99989796959493929190613efb565b60405180910390a2600f805461ff001916610100179055610fd8565b60125460405133917fe5c4cf86b1815151e6f453e1e133d4454ae3b0b07145db39f2e0178685deac8491610fcf9160ff16908e908e908c908c908c908c908c9042904390613efb565b60405180910390a25b60328151111561101c5760405162461bcd60e51b815260206004820152600f60248201526e546f6f204d616e792050726f6f667360881b6044820152606401610a49565b60408051808201909152601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015260005b82518110156112e15760006001600160a01b031683828151811061107957611079613f63565b6020026020010151600001516001600160a01b0316146111fb57600082856040516020016110a8929190613f79565b60405160208183030381529060405280519060200120905060006001828685815181106110d7576110d7613f63565b6020026020010151602001518786815181106110f5576110f5613f63565b60200260200101516040015188878151811061111357611113613f63565b60200260200101516060015160405160008152602001604052604051611155949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611177573d6000803e3d6000fd5b50505060206040510351905084838151811061119557611195613f63565b6020026020010151600001516001600160a01b0316816001600160a01b0316146111f85760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b210383937b7b31039b4b3b732b960611b6044820152606401610a49565b50505b82818151811061120d5761120d613f63565b6020026020010151600001516001600160a01b03167f2819d8badf5cff2c9220b8ee99dacc14d67058e343d7f0c2c444d198507fe9418585848151811061125657611256613f63565b60200260200101516020015186858151811061127457611274613f63565b60200260200101516040015187868151811061129257611292613f63565b6020026020010151606001516040516112c7949392919093845260ff9290921660208401526040830152606082015260800190565b60405180910390a2806112d981613fb1565b915050611053565b50505050505050505050505050565b806001146113105760405162461bcd60e51b8152600401610a4990613fcc565b61137a611375601380548060200260200160405190810160405280929190818152602001828054801561136c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161134e575b50505050505190565b61256c565b6113826125fd565b61138d8383836126ae565b611396826126ef565b506001600160a01b03166000908152600860205260409020805463ffffff001916630101010017905550565b3360009081526008602052604090205460ff161515600114806114135750336001600160a01b0382161480156114135750336000908152600860205260409020546301000000900460ff1615156001145b1561147b576001600160a01b03811660008181526008602052604090819020805463ff000000191681559051909133917fc929b18b08ffea86a1f95e29384dbe8968f2fcbd70cfd735df3aba1cc548cbf390610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604660248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2037323553746f6064820152651c99531a5cdd60d21b608482015260a401610a49565b50565b6115056001611a01565b6001600160a01b0316336001600160a01b0316146115355760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816126ef565b8060011461155e5760405162461bcd60e51b8152600401610a4990613fcc565b6115c1611375601380548060200260200160405190810160405280929190818152602001828054801561136c576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161134e5750505050505190565b6115c96125fd565b61138d83838360405180602001604052806000815250612780565b3360009081526008602052604090205460ff161515600114806116345750336001600160a01b03821614801561163457503360009081526008602052604090205462010000900460ff1615156001145b1561169b576001600160a01b03811660008181526008602052604090819020805462ff0000191681559051909133917f9b41e1311fa819e825bc77fa2568492112e15ea92d173f3f8ee1c8ec3c1c562b90610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604760248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d206d65746164616064820152661d18481b1a5cdd60ca1b608482015260a401610a49565b606060138054806020026020016040519081016040528092919081815260200182805480156109ca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611753575050505050905090565b3360009081526008602052604090205462010000900460ff166117af5760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff831690811790915560408051918252426020830152439082015233907fa8336411cc72db0e5bdc4dff989eeb35879bafaceffb59b54b37645c3395adb99060600160405180910390a250565b3360009081526008602052604090205460ff1615156001146118395760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805461ff00191661010017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917f0572d56343be407a66810f01449212e8545e14ff5049c479d34be944cdfd0d4f90610d4e9042904390918252602082015260400190565b6118d46001611a01565b6001600160a01b0316336001600160a01b0316146119045760405162461bcd60e51b8152600401610a4990613e2b565b61190c6125fd565b565b6000818152600b6020526040902080546060919061192b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461195790613db9565b80156119a45780601f10611979576101008083540402835291602001916119a4565b820191906000526020600020905b81548152906001019060200180831161198757829003601f168201915b50505050509050919050565b6119ba6001611a01565b6001600160a01b0316336001600160a01b0316146119ea5760405162461bcd60e51b8152600401610a4990613e2b565b80516119fd90600290602084019061348c565b5050565b6000818152600360205260408120546001600160a01b03168061093c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a49565b336000908152600860205260409020546301000000900460ff16610c7c5760405162461bcd60e51b815260206004820152602160248201527f45524337323154656d706c6174653a204e4f542053544f5245205550444154456044820152602960f91b6064820152608401610a49565b60006001600160a01b038216611b535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a49565b506001600160a01b031660009081526004602052604090205490565b600f5460009060ff1615611be05760405162461bcd60e51b815260206004820152603260248201527f45524337323154656d706c6174653a20746f6b656e20696e7374616e636520616044820152711b1c9958591e481a5b9a5d1a585b1a5e995960721b6064820152608401610a49565b6000611c5a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b90819084018382808284376000920191909152508b92508991506127b89050565b9050808015611c7157506001600160a01b03841615155b15611c7f57611c7f84611839565b9998505050505050505050565b60108054610b9190613db9565b6060600e805461095190613db9565b6001600160a01b038216331415611d015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a49565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610d4e565b611d706001611a01565b6001600160a01b0316336001600160a01b031614611da05760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816128f8565b60098181548110611db957600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526008602052604090205460ff161515600114611e075760405162461bcd60e51b8152600401610a4990613df4565b611e148585858585612958565b5050505050565b6000818152600360205260409020546060906001600160a01b0316611e9a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a49565b60008281526007602052604081208054611eb390613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611edf90613db9565b8015611f2c5780601f10611f0157610100808354040283529160200191611f2c565b820191906000526020600020905b815481529060010190602001808311611f0f57829003601f168201915b505050505090506000611f3d612b81565b825190915015611f72578082604051602001611f5a929190614018565b60405160208183030381529060405292505050919050565b5092915050565b60608060008060106011601260009054906101000a900460ff16600f60019054906101000a900460ff16838054611faf90613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdb90613db9565b80156120285780601f10611ffd57610100808354040283529160200191612028565b820191906000526020600020905b81548152906001019060200180831161200b57829003601f168201915b5050505050935082805461203b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461206790613db9565b80156120b45780601f10612089576101008083540402835291602001916120b4565b820191906000526020600020905b81548152906001019060200180831161209757829003601f168201915b50505050509250935093509350935090919293565b6120d36001611a01565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156114f8573d6000803e3d6000fd5b60006002600c5414156121605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a49565b6002600c5533600090815260086020526040902054610100900460ff166121d85760405162461bcd60e51b815260206004820152602660248201527f45524337323154656d706c6174653a204e4f542045524332304445504c4f5945604482015265525f524f4c4560d01b6064820152608401610a49565b601254604051630557fcfb60e41b815260009161010090046001600160a01b03169063557fcfb09061221e908e908e908e908e908e908e908e908e908e90600401614168565b6020604051808303816000875af115801561223d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122619190614219565b6001600160a01b0381166000818152601560205260408120805460ff191660019081179091556013805491820181559091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b03191690911790559150506001600c559998505050505050505050565b3360009081526008602052604090205460ff1615156001148061232b5750336001600160a01b03821614801561232b57503360009081526008602052604090205460ff6101009091041615156001145b15612391576001600160a01b03811660008181526008602052604090819020805461ff00191681559051909133917f59bd33f4c27cc16a2d74450e1fa43d7896020be9aecea4bee009db9294de899790610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604360248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2045524332304c6064820152621a5cdd60ea1b608482015260a401610a49565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061244082611a01565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000838152600b60205260409020612492908383613408565b50827fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b283836040516124c5929190614236565b60405180910390a2505050565b6000828152600360205260409020546001600160a01b031661254d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a49565b60008281526007602090815260409091208251610b7f9284019061348c565b60005b818110156119fd576013818154811061258a5761258a613f63565b6000918252602082200154604080516382c03da560e01b815290516001600160a01b03909216926382c03da59260048084019382900301818387803b1580156125d257600080fd5b505af11580156125e6573d6000803e3d6000fd5b5050505080806125f590613fb1565b91505061256f565b60005b600954811015612665576000600860006009848154811061262357612623613f63565b60009182526020808320909101546001600160a01b031683528201929092526040019020805463ffffffff19169055508061265d81613fb1565b915050612600565b5061267260096000613500565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b6126b83382612b90565b6126d45760405162461bcd60e51b8152600401610a499061424a565b610b7f83838360405180602001604052806000815250612780565b6001600160a01b038116600081815260086020526040808220805460ff19166001908117825560098054918201815590935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917faf8fc8b6726138c96881c895390a08e9d91a94c288f06281e7f9821c49c7155b90610d4e9042904390918252602082015260400190565b61278a3383612b90565b6127a65760405162461bcd60e51b8152600401610a499061424a565b6127b284848484612c87565b50505050565b60006001600160a01b0386166128275760405162461bcd60e51b815260206004820152602e60248201527f45524337323154656d706c6174653a3a20496e76616c6964206d696e7465722c60448201526d20207a65726f206164647265737360901b6064820152608401610a49565b845161283a90600d90602088019061348c565b50835161284e90600e90602087019061348c565b5060128054610100600160a81b0319166101006001600160a01b0386160217905560408051602081019182905260009081905261288d9160029161348c565b50600f805461ffff191660019081179091556128aa908790612cba565b6128b3866126ef565b6001600160a01b0386166000908152600860205260409020805463ffffff00191663010101001781556128e76001846124d2565b5050600f5460ff1695945050505050565b6001600160a01b03811660008181526008602052604090819020805460ff191681559051909133917fb572db0e6da4924b771ed1712b980d48b5992b9a1c27aede55fbb3318c48996a90610d4e9042904390918252602082015260400190565b82846001600160a01b0316867f1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b88585604051612995929190614236565b60405180910390a460006109c45a6129ad919061429b565b9050856129fd576129f7858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250612cd4915050565b50612b79565b6003861415612a46576129f78484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612cec92505050565b6002861415612b3a576000612a9d84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9892506020915087905061429b565b612d88565b90506000612aec85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250612ae79150602090508861429b565b612de6565b90506000612afb878484612ef3565b6040519091506001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a2505050612b79565b60405162461bcd60e51b815260206004820152601460248201527357726f6e67206f7065726174696f6e207479706560601b6044820152606401610a49565b505050505050565b60606002805461095190613db9565b6000818152600360205260408120546001600160a01b0316612c095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a49565b6000612c1483611a01565b9050806001600160a01b0316846001600160a01b03161480612c4f5750836001600160a01b0316612c44846109d4565b6001600160a01b0316145b80612c7f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b612c92848484612ff5565b612c9e84848484613195565b6127b25760405162461bcd60e51b8152600401610a49906142b2565b6119fd828260405180602001604052806000815250613293565b6000806000845160208601878987f195945050505050565b600081516020830184f090506001600160a01b038116612d4e5760405162461bcd60e51b815260206004820152601960248201527f436f756c64206e6f74206465706c6f7920636f6e7472616374000000000000006044820152606401610a49565b6040516001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a292915050565b6000612d95826020614304565b83511015612ddd5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a49565b50016020015190565b606081612df481601f614304565b1015612e335760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a49565b612e3d8284614304565b84511015612e815760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a49565b606082158015612ea05760405191506000825260208201604052612eea565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ed9578051835260209283019201612ec1565b5050858452601f01601f1916604052505b50949350505050565b60008084471015612f465760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610a49565b8251612f945760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610a49565b8383516020850187f590506001600160a01b038116612c7f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610a49565b826001600160a01b031661300882611a01565b6001600160a01b0316146130705760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a49565b6001600160a01b0382166130d25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a49565b6130dd60008261240b565b6001600160a01b038316600090815260046020526040812080546001929061310690849061429b565b90915550506001600160a01b0382166000908152600460205260408120805460019290613134908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b1561328857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d990339089908890889060040161431c565b6020604051808303816000875af1925050508015613214575060408051601f3d908101601f1916820190925261321191810190614359565b60015b61326e573d808015613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b5080516132665760405162461bcd60e51b8152600401610a49906142b2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c7f565b506001949350505050565b61329d83836132c6565b6132aa6000848484613195565b610b7f5760405162461bcd60e51b8152600401610a49906142b2565b6001600160a01b03821661331c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a49565b6000818152600360205260409020546001600160a01b0316156133815760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a49565b6001600160a01b03821660009081526004602052604081208054600192906133aa908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461341490613db9565b90600052602060002090601f016020900481019282613436576000855561347c565b82601f1061344f5782800160ff1982351617855561347c565b8280016001018555821561347c579182015b8281111561347c578235825591602001919060010190613461565b5061348892915061351a565b5090565b82805461349890613db9565b90600052602060002090601f0160209004810192826134ba576000855561347c565b82601f106134d357805160ff191683800117855561347c565b8280016001018555821561347c579182015b8281111561347c5782518255916020019190600101906134e5565b50805460008255906000526020600020908101906114f891905b5b80821115613488576000815560010161351b565b6001600160e01b0319811681146114f857600080fd5b60006020828403121561355757600080fd5b81356135628161352f565b9392505050565b60005b8381101561358457818101518382015260200161356c565b838111156127b25750506000910152565b600081518084526135ad816020860160208601613569565b601f01601f19169290920160200192915050565b6020815260006135626020830184613595565b6000602082840312156135e657600080fd5b5035919050565b6001600160a01b03811681146114f857600080fd5b6000806040838503121561361557600080fd5b8235613620816135ed565b946020939093013593505050565b60008083601f84011261364057600080fd5b5081356001600160401b0381111561365757600080fd5b60208301915083602082850101111561366f57600080fd5b9250929050565b60008060006040848603121561368b57600080fd5b8335925060208401356001600160401b038111156136a857600080fd5b6136b48682870161362e565b9497909650939450505050565b6000602082840312156136d357600080fd5b8135613562816135ed565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715613716576137166136de565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613744576137446136de565b604052919050565b600082601f83011261375d57600080fd5b81356001600160401b03811115613776576137766136de565b613789601f8201601f191660200161371c565b81815284602083860101111561379e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137ce57600080fd5b8235915060208301356001600160401b038111156137eb57600080fd5b6137f78582860161374c565b9150509250929050565b803560ff8116811461381257600080fd5b919050565b600082601f83011261382857600080fd5b813560206001600160401b03821115613843576138436136de565b613851818360051b0161371c565b82815260079290921b8401810191818101908684111561387057600080fd5b8286015b848110156138d3576080818903121561388d5760008081fd5b6138956136f4565b81356138a0816135ed565b81526138ad828601613801565b818601526040828101359082015260608083013590820152835291830191608001613874565b509695505050505050565b600080600080600080600080600080600060e08c8e0312156138ff57600080fd5b6139088c613801565b9a506001600160401b038060208e0135111561392357600080fd5b6139338e60208f01358f0161362e565b909b50995060408d013581101561394957600080fd5b6139598e60408f01358f0161362e565b909950975060608d013581101561396f57600080fd5b61397f8e60608f01358f0161362e565b909750955060808d013581101561399557600080fd5b6139a58e60808f01358f0161362e565b909550935060a08d0135925060c08d01358110156139c257600080fd5b506139d38d60c08e01358e01613817565b90509295989b509295989b9093969950565b6000806000606084860312156139fa57600080fd5b8335613a05816135ed565b92506020840135613a15816135ed565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b81811015613a675783516001600160a01b031683529284019291840191600101613a42565b50909695505050505050565b600060208284031215613a8557600080fd5b61356282613801565b600060208284031215613aa057600080fd5b81356001600160401b03811115613ab657600080fd5b612c7f8482850161374c565b60008060008060008060008060c0898b031215613ade57600080fd5b8835613ae9816135ed565b975060208901356001600160401b0380821115613b0557600080fd5b613b118c838d0161362e565b909950975060408b0135915080821115613b2a57600080fd5b613b368c838d0161362e565b909750955060608b01359150613b4b826135ed565b90935060808a013590613b5d826135ed565b90925060a08a01359080821115613b7357600080fd5b50613b808b828c0161374c565b9150509295985092959890939650565b60008060408385031215613ba357600080fd5b8235613bae816135ed565b915060208301358015158114613bc357600080fd5b809150509250929050565b600080600080600060808688031215613be657600080fd5b853594506020860135613bf8816135ed565b93506040860135925060608601356001600160401b03811115613c1a57600080fd5b613c268882890161362e565b969995985093965092949392505050565b608081526000613c4a6080830187613595565b8281036020840152613c5c8187613595565b60ff959095166040840152505090151560609091015292915050565b60008083601f840112613c8a57600080fd5b5081356001600160401b03811115613ca157600080fd5b6020830191508360208260051b850101111561366f57600080fd5b600080600080600080600080600060a08a8c031215613cda57600080fd5b8935985060208a01356001600160401b0380821115613cf857600080fd5b613d048d838e01613c78565b909a50985060408c0135915080821115613d1d57600080fd5b613d298d838e01613c78565b909850965060608c0135915080821115613d4257600080fd5b613d4e8d838e01613c78565b909650945060808c0135915080821115613d6757600080fd5b50613d748c828d01613c78565b915080935050809150509295985092959850929598565b60008060408385031215613d9e57600080fd5b8235613da9816135ed565b91506020830135613bc3816135ed565b600181811c90821680613dcd57607f821691505b60208210811415613dee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f455243373231526f6c6573416464726573733a204e4f54204d414e4147455200604082015260600190565b6020808252601c908201527f45524337323154656d706c6174653a206e6f74204e46544f776e657200000000604082015260600190565b608081526000613e756080830187613595565b6020830195909552506040810192909252606090910152919050565b60208082526021908201527f45524337323154656d706c6174653a204e4f54204d455441444154415f524f4c6040820152604560f81b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8b16815260e060208201526000613f1860e083018b8d613ed2565b8281036040840152613f2b818a8c613ed2565b90508281036060840152613f4081888a613ed2565b6080840196909652505060a081019290925260c090910152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b60008351613f8b818460208801613569565b9190910191825250602001919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fc557613fc5613f9b565b5060010190565b6020808252602c908201527f45524337323154656d706c6174653a2043616e6e6f74207472616e736665722060408201526b1d1a1a5cc81d1bdad95b925960a21b606082015260800190565b6000835161402a818460208801613569565b83519083019061403e818360208801613569565b01949350505050565b6000808335601e1984360301811261405e57600080fd5b83016020810192503590506001600160401b0381111561407d57600080fd5b80360383131561366f57600080fd5b8183526000602080850194508260005b858110156140ca5781356140af816135ed565b6001600160a01b03168752958201959082019060010161409c565b509495945050505050565b81835260006001600160fb1b038311156140ee57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b8781101561415b57828403895261413c8288614047565b614147868284613ed2565b9a87019a9550505090840190600101614125565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156141c95785840360bf190183526141a7828f614047565b6141b2868284613ed2565b95505050602092830192919091019060010161418c565b50505082810360408401526141df81898b61408c565b905082810360608401526141f48187896140d5565b9050828103608084015261420981858761410b565b9c9b505050505050505050505050565b60006020828403121561422b57600080fd5b8151613562816135ed565b602081526000612c7f602083018486613ed2565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000828210156142ad576142ad613f9b565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000821982111561431757614317613f9b565b500190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061434f90830184613595565b9695505050505050565b60006020828403121561436b57600080fd5b81516135628161352f56fe6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afa26469706673582212206d0bc2d2cba31628d81338472b8edc29d561d59a0f52686f6ad9fb78da838a2264736f6c634300080a0033",deployedBytecode:"0x60806040526004361061025d5760003560e01c806354f6127f11610143578063a22cb465116100bb578063d2786ba411610077578063d2786ba41461082d578063d8053ad314610852578063e086e5ec14610871578063e38d7cad14610879578063e985e9c514610899578063fe1ec880146108e257005b8063a22cb46514610780578063ac18de43146107a0578063b0c41ead146107c0578063c55f8126146107e0578063c87b56dd146107f3578063ccd7d4761461081357005b806370a082311161010a57806370a082311461069157806370c166d7146106bf57806382cf129d146106df57806390184b02146106f457806395d89b411461072d57806396fb3eaf1461074257005b806354f6127f146105ef57806355f804b31461060f5780635d1ca6311461062f5780636352211e1461065157806367530a611461067157005b806323b872dd116101d6578063431053ac1161019d578063431053ac14610538578063466bca0214610558578063467c97f51461057a5780634a63740a1461059a5780634b2ee5e9146105ba5780634f189cb2146105da57005b806323b872dd146104a0578063273e06b3146104c05780632d06177a146104e0578063392e53cd1461050057806342842e0e1461051857005b80630e57c7e8116102255780630e57c7e81461032357806310c558bf14610343578063160a792514610363578063162094c41461044057806319c186e5146104605780631aa3adf91461048057005b806301ffc9a71461025f57806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee5780630e05662e1461030e575b005b34801561026b57600080fd5b5061027f61027a366004613545565b610902565b60405190151581526020015b60405180910390f35b3480156102a057600080fd5b506102a9610942565b60405161028b91906135c1565b3480156102c257600080fd5b506102d66102d13660046135d4565b6109d4565b6040516001600160a01b03909116815260200161028b565b3480156102fa57600080fd5b5061025d610309366004613602565b610a6e565b34801561031a57600080fd5b506102a9610b84565b34801561032f57600080fd5b5061025d61033e366004613676565b610c12565b34801561034f57600080fd5b5061025d61035e3660046136c1565b610c87565b34801561036f57600080fd5b5061040561037e3660046136c1565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b03166000908152600860209081526040918290208251608081018452905460ff808216151583526101008204811615159383019390935262010000810483161515938201939093526301000000909204161515606082015290565b60405161028b919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561044c57600080fd5b5061025d61045b3660046137bb565b610d5a565b34801561046c57600080fd5b5061025d61047b3660046136c1565b610de9565b34801561048c57600080fd5b5061025d61049b3660046138de565b610eb2565b3480156104ac57600080fd5b5061025d6104bb3660046139e5565b6112f0565b3480156104cc57600080fd5b5061025d6104db3660046136c1565b6113c2565b3480156104ec57600080fd5b5061025d6104fb3660046136c1565b6114fb565b34801561050c57600080fd5b50600f5460ff1661027f565b34801561052457600080fd5b5061025d6105333660046139e5565b61153e565b34801561054457600080fd5b5061025d6105533660046136c1565b6115e4565b34801561056457600080fd5b5061056d611719565b60405161028b9190613a26565b34801561058657600080fd5b5061025d610595366004613a73565b61177a565b3480156105a657600080fd5b5061025d6105b53660046136c1565b611805565b3480156105c657600080fd5b506014546102d6906001600160a01b031681565b3480156105e657600080fd5b5061025d6118ca565b3480156105fb57600080fd5b506102a961060a3660046135d4565b61190e565b34801561061b57600080fd5b5061025d61062a366004613a8e565b6119b0565b34801561063b57600080fd5b5060015b60405160ff909116815260200161028b565b34801561065d57600080fd5b506102d661066c3660046135d4565b611a01565b34801561067d57600080fd5b5061025d61068c366004613676565b611a78565b34801561069d57600080fd5b506106b16106ac3660046136c1565b611ae8565b60405190815260200161028b565b3480156106cb57600080fd5b5061027f6106da366004613ac2565b611b6f565b3480156106eb57600080fd5b506102a9611c8c565b34801561070057600080fd5b5061027f61070f3660046136c1565b6001600160a01b031660009081526015602052604090205460ff1690565b34801561073957600080fd5b506102a9611c99565b34801561074e57600080fd5b5061027f61075d3660046136c1565b6001600160a01b0316600090815260086020526040902054610100900460ff1690565b34801561078c57600080fd5b5061025d61079b366004613b90565b611ca8565b3480156107ac57600080fd5b5061025d6107bb3660046136c1565b611d66565b3480156107cc57600080fd5b506102d66107db3660046135d4565b611da9565b61025d6107ee366004613bce565b611dd3565b3480156107ff57600080fd5b506102a961080e3660046135d4565b611e1b565b34801561081f57600080fd5b5060125461063f9060ff1681565b34801561083957600080fd5b50610842611f79565b60405161028b9493929190613c37565b34801561085e57600080fd5b50600f5461027f90610100900460ff1681565b61025d6120c9565b34801561088557600080fd5b506102d6610894366004613cbc565b61210b565b3480156108a557600080fd5b5061027f6108b4366004613d8b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108ee57600080fd5b5061025d6108fd3660046136c1565b6122db565b60006301ffc9a760e01b6001600160e01b03198316148061093c57506001600160e01b031982166000908152600a602052604090205460ff165b92915050565b6060600d805461095190613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461097d90613db9565b80156109ca5780601f1061099f576101008083540402835291602001916109ca565b820191906000526020600020905b8154815290600101906020018083116109ad57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a7982611a01565b9050806001600160a01b0316836001600160a01b03161415610ae75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a49565b336001600160a01b0382161480610b035750610b0381336108b4565b610b755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a49565b610b7f838361240b565b505050565b60118054610b9190613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90613db9565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b505050505081565b3360009081526015602052604090205460ff16610c7c5760405162461bcd60e51b815260206004820152602260248201527f45524337323154656d706c6174653a204e4f5420455243323020436f6e74726160448201526118dd60f21b6064820152608401610a49565b610b7f838383612479565b3360009081526008602052604090205460ff161515600114610cbb5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805462ff000019166201000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917fc2a42571a74ce1442c8c44d375ba9442e7d55d94b37afeace261c83c62128fa490610d4e9042904390918252602082015260400190565b60405180910390a35050565b610d646001611a01565b6001600160a01b0316336001600160a01b031614610d945760405162461bcd60e51b8152600401610a4990613e2b565b610d9e82826124d2565b336001600160a01b03167f6de6cd3982065cbd31e789e3109106f4d76d1c8a46e85262045cf947fb3fd4ed82844243604051610ddd9493929190613e62565b60405180910390a25050565b3360009081526008602052604090205460ff161515600114610e1d5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805463ff0000001916630100000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917feb09276310ed110a7e565d64966d0ff68a47112d2dd5eeb6cbd7451836ce35ee90610d4e9042904390918252602082015260400190565b3360009081526008602052604090205462010000900460ff16610ee75760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff8d16179055610f0260108b8b613408565b50610f0f60118989613408565b50600f54610100900460ff16610f8657336001600160a01b03167f5463569dcc320958360074a9ab27e809e8a6942c394fb151d139b5f7b4ecb1bd8c8c8c8a8a8a8a8a4243604051610f6a9a99989796959493929190613efb565b60405180910390a2600f805461ff001916610100179055610fd8565b60125460405133917fe5c4cf86b1815151e6f453e1e133d4454ae3b0b07145db39f2e0178685deac8491610fcf9160ff16908e908e908c908c908c908c908c9042904390613efb565b60405180910390a25b60328151111561101c5760405162461bcd60e51b815260206004820152600f60248201526e546f6f204d616e792050726f6f667360881b6044820152606401610a49565b60408051808201909152601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015260005b82518110156112e15760006001600160a01b031683828151811061107957611079613f63565b6020026020010151600001516001600160a01b0316146111fb57600082856040516020016110a8929190613f79565b60405160208183030381529060405280519060200120905060006001828685815181106110d7576110d7613f63565b6020026020010151602001518786815181106110f5576110f5613f63565b60200260200101516040015188878151811061111357611113613f63565b60200260200101516060015160405160008152602001604052604051611155949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611177573d6000803e3d6000fd5b50505060206040510351905084838151811061119557611195613f63565b6020026020010151600001516001600160a01b0316816001600160a01b0316146111f85760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b210383937b7b31039b4b3b732b960611b6044820152606401610a49565b50505b82818151811061120d5761120d613f63565b6020026020010151600001516001600160a01b03167f2819d8badf5cff2c9220b8ee99dacc14d67058e343d7f0c2c444d198507fe9418585848151811061125657611256613f63565b60200260200101516020015186858151811061127457611274613f63565b60200260200101516040015187868151811061129257611292613f63565b6020026020010151606001516040516112c7949392919093845260ff9290921660208401526040830152606082015260800190565b60405180910390a2806112d981613fb1565b915050611053565b50505050505050505050505050565b806001146113105760405162461bcd60e51b8152600401610a4990613fcc565b61137a611375601380548060200260200160405190810160405280929190818152602001828054801561136c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161134e575b50505050505190565b61256c565b6113826125fd565b61138d8383836126ae565b611396826126ef565b506001600160a01b03166000908152600860205260409020805463ffffff001916630101010017905550565b3360009081526008602052604090205460ff161515600114806114135750336001600160a01b0382161480156114135750336000908152600860205260409020546301000000900460ff1615156001145b1561147b576001600160a01b03811660008181526008602052604090819020805463ff000000191681559051909133917fc929b18b08ffea86a1f95e29384dbe8968f2fcbd70cfd735df3aba1cc548cbf390610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604660248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2037323553746f6064820152651c99531a5cdd60d21b608482015260a401610a49565b50565b6115056001611a01565b6001600160a01b0316336001600160a01b0316146115355760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816126ef565b8060011461155e5760405162461bcd60e51b8152600401610a4990613fcc565b6115c1611375601380548060200260200160405190810160405280929190818152602001828054801561136c576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161134e5750505050505190565b6115c96125fd565b61138d83838360405180602001604052806000815250612780565b3360009081526008602052604090205460ff161515600114806116345750336001600160a01b03821614801561163457503360009081526008602052604090205462010000900460ff1615156001145b1561169b576001600160a01b03811660008181526008602052604090819020805462ff0000191681559051909133917f9b41e1311fa819e825bc77fa2568492112e15ea92d173f3f8ee1c8ec3c1c562b90610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604760248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d206d65746164616064820152661d18481b1a5cdd60ca1b608482015260a401610a49565b606060138054806020026020016040519081016040528092919081815260200182805480156109ca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611753575050505050905090565b3360009081526008602052604090205462010000900460ff166117af5760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff831690811790915560408051918252426020830152439082015233907fa8336411cc72db0e5bdc4dff989eeb35879bafaceffb59b54b37645c3395adb99060600160405180910390a250565b3360009081526008602052604090205460ff1615156001146118395760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805461ff00191661010017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917f0572d56343be407a66810f01449212e8545e14ff5049c479d34be944cdfd0d4f90610d4e9042904390918252602082015260400190565b6118d46001611a01565b6001600160a01b0316336001600160a01b0316146119045760405162461bcd60e51b8152600401610a4990613e2b565b61190c6125fd565b565b6000818152600b6020526040902080546060919061192b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461195790613db9565b80156119a45780601f10611979576101008083540402835291602001916119a4565b820191906000526020600020905b81548152906001019060200180831161198757829003601f168201915b50505050509050919050565b6119ba6001611a01565b6001600160a01b0316336001600160a01b0316146119ea5760405162461bcd60e51b8152600401610a4990613e2b565b80516119fd90600290602084019061348c565b5050565b6000818152600360205260408120546001600160a01b03168061093c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a49565b336000908152600860205260409020546301000000900460ff16610c7c5760405162461bcd60e51b815260206004820152602160248201527f45524337323154656d706c6174653a204e4f542053544f5245205550444154456044820152602960f91b6064820152608401610a49565b60006001600160a01b038216611b535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a49565b506001600160a01b031660009081526004602052604090205490565b600f5460009060ff1615611be05760405162461bcd60e51b815260206004820152603260248201527f45524337323154656d706c6174653a20746f6b656e20696e7374616e636520616044820152711b1c9958591e481a5b9a5d1a585b1a5e995960721b6064820152608401610a49565b6000611c5a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b90819084018382808284376000920191909152508b92508991506127b89050565b9050808015611c7157506001600160a01b03841615155b15611c7f57611c7f84611839565b9998505050505050505050565b60108054610b9190613db9565b6060600e805461095190613db9565b6001600160a01b038216331415611d015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a49565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610d4e565b611d706001611a01565b6001600160a01b0316336001600160a01b031614611da05760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816128f8565b60098181548110611db957600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526008602052604090205460ff161515600114611e075760405162461bcd60e51b8152600401610a4990613df4565b611e148585858585612958565b5050505050565b6000818152600360205260409020546060906001600160a01b0316611e9a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a49565b60008281526007602052604081208054611eb390613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611edf90613db9565b8015611f2c5780601f10611f0157610100808354040283529160200191611f2c565b820191906000526020600020905b815481529060010190602001808311611f0f57829003601f168201915b505050505090506000611f3d612b81565b825190915015611f72578082604051602001611f5a929190614018565b60405160208183030381529060405292505050919050565b5092915050565b60608060008060106011601260009054906101000a900460ff16600f60019054906101000a900460ff16838054611faf90613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdb90613db9565b80156120285780601f10611ffd57610100808354040283529160200191612028565b820191906000526020600020905b81548152906001019060200180831161200b57829003601f168201915b5050505050935082805461203b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461206790613db9565b80156120b45780601f10612089576101008083540402835291602001916120b4565b820191906000526020600020905b81548152906001019060200180831161209757829003601f168201915b50505050509250935093509350935090919293565b6120d36001611a01565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156114f8573d6000803e3d6000fd5b60006002600c5414156121605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a49565b6002600c5533600090815260086020526040902054610100900460ff166121d85760405162461bcd60e51b815260206004820152602660248201527f45524337323154656d706c6174653a204e4f542045524332304445504c4f5945604482015265525f524f4c4560d01b6064820152608401610a49565b601254604051630557fcfb60e41b815260009161010090046001600160a01b03169063557fcfb09061221e908e908e908e908e908e908e908e908e908e90600401614168565b6020604051808303816000875af115801561223d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122619190614219565b6001600160a01b0381166000818152601560205260408120805460ff191660019081179091556013805491820181559091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b03191690911790559150506001600c559998505050505050505050565b3360009081526008602052604090205460ff1615156001148061232b5750336001600160a01b03821614801561232b57503360009081526008602052604090205460ff6101009091041615156001145b15612391576001600160a01b03811660008181526008602052604090819020805461ff00191681559051909133917f59bd33f4c27cc16a2d74450e1fa43d7896020be9aecea4bee009db9294de899790610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604360248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2045524332304c6064820152621a5cdd60ea1b608482015260a401610a49565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061244082611a01565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000838152600b60205260409020612492908383613408565b50827fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b283836040516124c5929190614236565b60405180910390a2505050565b6000828152600360205260409020546001600160a01b031661254d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a49565b60008281526007602090815260409091208251610b7f9284019061348c565b60005b818110156119fd576013818154811061258a5761258a613f63565b6000918252602082200154604080516382c03da560e01b815290516001600160a01b03909216926382c03da59260048084019382900301818387803b1580156125d257600080fd5b505af11580156125e6573d6000803e3d6000fd5b5050505080806125f590613fb1565b91505061256f565b60005b600954811015612665576000600860006009848154811061262357612623613f63565b60009182526020808320909101546001600160a01b031683528201929092526040019020805463ffffffff19169055508061265d81613fb1565b915050612600565b5061267260096000613500565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b6126b83382612b90565b6126d45760405162461bcd60e51b8152600401610a499061424a565b610b7f83838360405180602001604052806000815250612780565b6001600160a01b038116600081815260086020526040808220805460ff19166001908117825560098054918201815590935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917faf8fc8b6726138c96881c895390a08e9d91a94c288f06281e7f9821c49c7155b90610d4e9042904390918252602082015260400190565b61278a3383612b90565b6127a65760405162461bcd60e51b8152600401610a499061424a565b6127b284848484612c87565b50505050565b60006001600160a01b0386166128275760405162461bcd60e51b815260206004820152602e60248201527f45524337323154656d706c6174653a3a20496e76616c6964206d696e7465722c60448201526d20207a65726f206164647265737360901b6064820152608401610a49565b845161283a90600d90602088019061348c565b50835161284e90600e90602087019061348c565b5060128054610100600160a81b0319166101006001600160a01b0386160217905560408051602081019182905260009081905261288d9160029161348c565b50600f805461ffff191660019081179091556128aa908790612cba565b6128b3866126ef565b6001600160a01b0386166000908152600860205260409020805463ffffff00191663010101001781556128e76001846124d2565b5050600f5460ff1695945050505050565b6001600160a01b03811660008181526008602052604090819020805460ff191681559051909133917fb572db0e6da4924b771ed1712b980d48b5992b9a1c27aede55fbb3318c48996a90610d4e9042904390918252602082015260400190565b82846001600160a01b0316867f1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b88585604051612995929190614236565b60405180910390a460006109c45a6129ad919061429b565b9050856129fd576129f7858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250612cd4915050565b50612b79565b6003861415612a46576129f78484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612cec92505050565b6002861415612b3a576000612a9d84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9892506020915087905061429b565b612d88565b90506000612aec85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250612ae79150602090508861429b565b612de6565b90506000612afb878484612ef3565b6040519091506001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a2505050612b79565b60405162461bcd60e51b815260206004820152601460248201527357726f6e67206f7065726174696f6e207479706560601b6044820152606401610a49565b505050505050565b60606002805461095190613db9565b6000818152600360205260408120546001600160a01b0316612c095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a49565b6000612c1483611a01565b9050806001600160a01b0316846001600160a01b03161480612c4f5750836001600160a01b0316612c44846109d4565b6001600160a01b0316145b80612c7f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b612c92848484612ff5565b612c9e84848484613195565b6127b25760405162461bcd60e51b8152600401610a49906142b2565b6119fd828260405180602001604052806000815250613293565b6000806000845160208601878987f195945050505050565b600081516020830184f090506001600160a01b038116612d4e5760405162461bcd60e51b815260206004820152601960248201527f436f756c64206e6f74206465706c6f7920636f6e7472616374000000000000006044820152606401610a49565b6040516001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a292915050565b6000612d95826020614304565b83511015612ddd5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a49565b50016020015190565b606081612df481601f614304565b1015612e335760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a49565b612e3d8284614304565b84511015612e815760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a49565b606082158015612ea05760405191506000825260208201604052612eea565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ed9578051835260209283019201612ec1565b5050858452601f01601f1916604052505b50949350505050565b60008084471015612f465760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610a49565b8251612f945760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610a49565b8383516020850187f590506001600160a01b038116612c7f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610a49565b826001600160a01b031661300882611a01565b6001600160a01b0316146130705760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a49565b6001600160a01b0382166130d25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a49565b6130dd60008261240b565b6001600160a01b038316600090815260046020526040812080546001929061310690849061429b565b90915550506001600160a01b0382166000908152600460205260408120805460019290613134908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b1561328857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d990339089908890889060040161431c565b6020604051808303816000875af1925050508015613214575060408051601f3d908101601f1916820190925261321191810190614359565b60015b61326e573d808015613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b5080516132665760405162461bcd60e51b8152600401610a49906142b2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c7f565b506001949350505050565b61329d83836132c6565b6132aa6000848484613195565b610b7f5760405162461bcd60e51b8152600401610a49906142b2565b6001600160a01b03821661331c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a49565b6000818152600360205260409020546001600160a01b0316156133815760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a49565b6001600160a01b03821660009081526004602052604081208054600192906133aa908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461341490613db9565b90600052602060002090601f016020900481019282613436576000855561347c565b82601f1061344f5782800160ff1982351617855561347c565b8280016001018555821561347c579182015b8281111561347c578235825591602001919060010190613461565b5061348892915061351a565b5090565b82805461349890613db9565b90600052602060002090601f0160209004810192826134ba576000855561347c565b82601f106134d357805160ff191683800117855561347c565b8280016001018555821561347c579182015b8281111561347c5782518255916020019190600101906134e5565b50805460008255906000526020600020908101906114f891905b5b80821115613488576000815560010161351b565b6001600160e01b0319811681146114f857600080fd5b60006020828403121561355757600080fd5b81356135628161352f565b9392505050565b60005b8381101561358457818101518382015260200161356c565b838111156127b25750506000910152565b600081518084526135ad816020860160208601613569565b601f01601f19169290920160200192915050565b6020815260006135626020830184613595565b6000602082840312156135e657600080fd5b5035919050565b6001600160a01b03811681146114f857600080fd5b6000806040838503121561361557600080fd5b8235613620816135ed565b946020939093013593505050565b60008083601f84011261364057600080fd5b5081356001600160401b0381111561365757600080fd5b60208301915083602082850101111561366f57600080fd5b9250929050565b60008060006040848603121561368b57600080fd5b8335925060208401356001600160401b038111156136a857600080fd5b6136b48682870161362e565b9497909650939450505050565b6000602082840312156136d357600080fd5b8135613562816135ed565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715613716576137166136de565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613744576137446136de565b604052919050565b600082601f83011261375d57600080fd5b81356001600160401b03811115613776576137766136de565b613789601f8201601f191660200161371c565b81815284602083860101111561379e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137ce57600080fd5b8235915060208301356001600160401b038111156137eb57600080fd5b6137f78582860161374c565b9150509250929050565b803560ff8116811461381257600080fd5b919050565b600082601f83011261382857600080fd5b813560206001600160401b03821115613843576138436136de565b613851818360051b0161371c565b82815260079290921b8401810191818101908684111561387057600080fd5b8286015b848110156138d3576080818903121561388d5760008081fd5b6138956136f4565b81356138a0816135ed565b81526138ad828601613801565b818601526040828101359082015260608083013590820152835291830191608001613874565b509695505050505050565b600080600080600080600080600080600060e08c8e0312156138ff57600080fd5b6139088c613801565b9a506001600160401b038060208e0135111561392357600080fd5b6139338e60208f01358f0161362e565b909b50995060408d013581101561394957600080fd5b6139598e60408f01358f0161362e565b909950975060608d013581101561396f57600080fd5b61397f8e60608f01358f0161362e565b909750955060808d013581101561399557600080fd5b6139a58e60808f01358f0161362e565b909550935060a08d0135925060c08d01358110156139c257600080fd5b506139d38d60c08e01358e01613817565b90509295989b509295989b9093969950565b6000806000606084860312156139fa57600080fd5b8335613a05816135ed565b92506020840135613a15816135ed565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b81811015613a675783516001600160a01b031683529284019291840191600101613a42565b50909695505050505050565b600060208284031215613a8557600080fd5b61356282613801565b600060208284031215613aa057600080fd5b81356001600160401b03811115613ab657600080fd5b612c7f8482850161374c565b60008060008060008060008060c0898b031215613ade57600080fd5b8835613ae9816135ed565b975060208901356001600160401b0380821115613b0557600080fd5b613b118c838d0161362e565b909950975060408b0135915080821115613b2a57600080fd5b613b368c838d0161362e565b909750955060608b01359150613b4b826135ed565b90935060808a013590613b5d826135ed565b90925060a08a01359080821115613b7357600080fd5b50613b808b828c0161374c565b9150509295985092959890939650565b60008060408385031215613ba357600080fd5b8235613bae816135ed565b915060208301358015158114613bc357600080fd5b809150509250929050565b600080600080600060808688031215613be657600080fd5b853594506020860135613bf8816135ed565b93506040860135925060608601356001600160401b03811115613c1a57600080fd5b613c268882890161362e565b969995985093965092949392505050565b608081526000613c4a6080830187613595565b8281036020840152613c5c8187613595565b60ff959095166040840152505090151560609091015292915050565b60008083601f840112613c8a57600080fd5b5081356001600160401b03811115613ca157600080fd5b6020830191508360208260051b850101111561366f57600080fd5b600080600080600080600080600060a08a8c031215613cda57600080fd5b8935985060208a01356001600160401b0380821115613cf857600080fd5b613d048d838e01613c78565b909a50985060408c0135915080821115613d1d57600080fd5b613d298d838e01613c78565b909850965060608c0135915080821115613d4257600080fd5b613d4e8d838e01613c78565b909650945060808c0135915080821115613d6757600080fd5b50613d748c828d01613c78565b915080935050809150509295985092959850929598565b60008060408385031215613d9e57600080fd5b8235613da9816135ed565b91506020830135613bc3816135ed565b600181811c90821680613dcd57607f821691505b60208210811415613dee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f455243373231526f6c6573416464726573733a204e4f54204d414e4147455200604082015260600190565b6020808252601c908201527f45524337323154656d706c6174653a206e6f74204e46544f776e657200000000604082015260600190565b608081526000613e756080830187613595565b6020830195909552506040810192909252606090910152919050565b60208082526021908201527f45524337323154656d706c6174653a204e4f54204d455441444154415f524f4c6040820152604560f81b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8b16815260e060208201526000613f1860e083018b8d613ed2565b8281036040840152613f2b818a8c613ed2565b90508281036060840152613f4081888a613ed2565b6080840196909652505060a081019290925260c090910152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b60008351613f8b818460208801613569565b9190910191825250602001919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fc557613fc5613f9b565b5060010190565b6020808252602c908201527f45524337323154656d706c6174653a2043616e6e6f74207472616e736665722060408201526b1d1a1a5cc81d1bdad95b925960a21b606082015260800190565b6000835161402a818460208801613569565b83519083019061403e818360208801613569565b01949350505050565b6000808335601e1984360301811261405e57600080fd5b83016020810192503590506001600160401b0381111561407d57600080fd5b80360383131561366f57600080fd5b8183526000602080850194508260005b858110156140ca5781356140af816135ed565b6001600160a01b03168752958201959082019060010161409c565b509495945050505050565b81835260006001600160fb1b038311156140ee57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b8781101561415b57828403895261413c8288614047565b614147868284613ed2565b9a87019a9550505090840190600101614125565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156141c95785840360bf190183526141a7828f614047565b6141b2868284613ed2565b95505050602092830192919091019060010161418c565b50505082810360408401526141df81898b61408c565b905082810360608401526141f48187896140d5565b9050828103608084015261420981858761410b565b9c9b505050505050505050505050565b60006020828403121561422b57600080fd5b8151613562816135ed565b602081526000612c7f602083018486613ed2565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000828210156142ad576142ad613f9b565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000821982111561431757614317613f9b565b500190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061434f90830184613595565b9695505050505050565b60006020828403121561436b57600080fd5b81516135628161352f56fe6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afa26469706673582212206d0bc2d2cba31628d81338472b8edc29d561d59a0f52686f6ad9fb78da838a2264736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};class j{constructor(e,a,t){this.GASLIMIT_DEFAULT=1e6,this.factory721Address=void 0,this.factory721Abi=void 0,this.nftAbi=void 0,this.web3=void 0,this.startBlock=void 0,this.nftAbi=a||$.abi,this.web3=e,this.startBlock=t||0}async estGasCreateErc20(e,a,t,b,n,d,f,s,i,c,r,o){const p=o||new this.web3.eth.Contract(this.nftAbi,e),y=this.GASLIMIT_DEFAULT;let u;try{u=await p.methods.createERC20(r,[i,c],[t,b,n,d],[this.web3.utils.toWei(s),this.web3.utils.toWei(f)],[]).estimateGas({from:a},(e,a)=>e?y:a)}catch(e){u=y}return u}async createErc20(e,a,t,b,n,d,f,s,i,o,y){if(!0!==(await this.getNftPermissions(e,a)).deployERC20)throw new Error("Caller is not ERC20Deployer");y||(y=1),i&&o||({name:i,symbol:o}=p());const u=new this.web3.eth.Contract(this.nftAbi,e),l=await this.estGasCreateErc20(e,a,t,b,n,d,f,s,i,o,y,u),m=await u.methods.createERC20(y,[i,o],[t,b,n,d],[this.web3.utils.toWei(s),this.web3.utils.toWei(f)],[]).send({from:a,gas:l+1,gasPrice:await r(this.web3)});let h=null;try{h=m.events.TokenCreated.returnValues[0]}catch(e){c.error(`ERROR: Failed to create datatoken : ${e.message}`)}return h}async estGasAddManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addManager(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const n=await this.estGasAddManager(e,a,t,b);return await b.methods.addManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeManager(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const n=await this.estGasRemoveManager(e,a,t,b);return await b.methods.removeManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddErc20Deployer(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addToCreateERC20List(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addErc20Deployer(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddErc20Deployer(e,a,t,b);return await b.methods.addToCreateERC20List(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveErc20Deployer(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFromCreateErc20List(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeErc20Deployer(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a===t&&!0!==(await this.getNftPermissions(e,a)).deployERC20)throw new Error("Caller is not Manager nor ERC20Deployer");const n=await this.estGasRemoveErc20Deployer(e,a,t,b);return await b.methods.removeFromCreateERC20List(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddMetadataUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addToMetadataList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addMetadataUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddMetadataUpdater(e,a,t,b);return await b.methods.addToMetadataList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async esGasRemoveMetadataUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFromMetadataList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeMetadataUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a!==t&&!0!==(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Manager nor Metadata Updater");const n=await this.esGasRemoveMetadataUpdater(e,a,t,b);return await b.methods.removeFromMetadataList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddStoreUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addTo725StoreList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addStoreUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddStoreUpdater(e,a,t,b);return await b.methods.addTo725StoreList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveStoreUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFrom725StoreList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeStoreUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a!==t&&!0!==(await this.getNftPermissions(e,a)).store)throw new Error("Caller is not Manager nor storeUpdater");const n=await this.estGasRemoveStoreUpdater(e,a,t,b);return await b.methods.removeFrom725StoreList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasCleanPermissions(e,a,t){const b=t||new this.web3.eth.Contract(this.nftAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.cleanPermissions().estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async cleanPermissions(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const b=await this.estGasCleanPermissions(e,a,t);return await t.methods.cleanPermissions().send({from:a,gas:b+1,gasPrice:await r(this.web3)})}async estGasTransferNft(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.nftAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.transferFrom(a,t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async transferNft(e,a,t,b){const n=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const d=b||1,f=await this.estGasTransferNft(e,a,t,d,n);return await n.methods.transferFrom(a,t,d).send({from:a,gas:f+1,gasPrice:await r(this.web3)})}async estGasSafeTransferNft(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.nftAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.safeTransferFrom(a,t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async safeTransferNft(e,a,t,b){const n=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const d=b||1,f=await this.estGasSafeTransferNft(e,a,t,d,n);return await n.methods.safeTransferFrom(a,t,d).send({from:a,gas:f+1,gasPrice:await r(this.web3)})}async estGasSetMetadata(e,a,t,b,n,d,f,s,i,c){const r=c||new this.web3.eth.Contract(this.nftAbi,e),o=this.GASLIMIT_DEFAULT;let p;try{p=await r.methods.setMetaData(t,b,n,d,f,s,i).estimateGas({from:a},(e,a)=>e?o:a)}catch(e){p=o}return p}async setMetadata(e,a,t,b,n,d,f,s,i){const c=new this.web3.eth.Contract(this.nftAbi,e);if(i||(i=[]),!(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Metadata updater");const o=await this.estGasSetMetadata(e,a,t,b,n,d,f,s,i,c);return await c.methods.setMetaData(t,b,n,d,f,s,i).send({from:a,gas:o+1,gasPrice:await r(this.web3)})}async estGasSetMetadataState(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setMetaDataState(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setMetadataState(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Metadata updater");const n=await this.estGasSetMetadataState(e,a,t);return await b.methods.setMetaDataState(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estSetTokenURI(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.setTokenURI("1",t).estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async setTokenURI(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e),n=await this.estSetTokenURI(e,a,t);return await b.methods.setTokenURI("1",t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async getNftOwner(e){const a=new this.web3.eth.Contract(this.nftAbi,e);return await a.methods.ownerOf(1).call()}async getNftPermissions(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.getPermissions(a).call()}async getMetadata(e){const a=new this.web3.eth.Contract(this.nftAbi,e);return await a.methods.getMetaData().call()}async isErc20Deployer(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.isERC20Deployer(a).call()}async getData(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.getData(a).call()}async getTokenURI(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.tokenURI(a).call()}}class z{constructor(e,a,t,b){this.GASLIMIT_DEFAULT=1e6,this.factoryAddress=void 0,this.factoryABI=void 0,this.datatokensAbi=void 0,this.datatokensEnterpriseAbi=void 0,this.web3=void 0,this.startBlock=void 0,this.nft=void 0,this.web3=e,this.datatokensAbi=a||P.abi,this.datatokensEnterpriseAbi=t||B.abi,this.startBlock=b||0,this.nft=new j(this.web3)}async estGasApprove(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.approve(a,this.web3.utils.toWei(t)).estimateGas({from:b},(e,a)=>e?f:a)}catch(e){s=f}return s}async approve(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e),d=await this.estGasApprove(e,a,t,b,n);return await n.methods.approve(a,this.web3.utils.toWei(t)).send({from:b,gas:d+1,gasPrice:await r(this.web3)})}async estGasMint(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.mint(b||a,this.web3.utils.toWei(t)).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async estGasCreateFixedRate(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;t.allowedConsumer||(t.allowedConsumer="0x0000000000000000000000000000000000000000");const f=t.withMint?1:0;let s;try{s=await n.methods.createFixedRate(t.fixedRateAddress,[t.baseTokenAddress,a,t.marketFeeCollector,t.allowedConsumer],[t.baseTokenDecimals,t.dataTokenDecimals,t.fixedRate,t.marketFee,f]).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){s=d}return s}async createFixedRate(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");t.allowedConsumer||(t.allowedConsumer="0x0000000000000000000000000000000000000000");const n=t.withMint?1:0,d=await this.estGasCreateFixedRate(e,a,t,b);return await b.methods.createFixedRate(t.fixedRateAddress,[t.baseTokenAddress,t.owner,t.marketFeeCollector,t.allowedConsumer],[t.baseTokenDecimals,t.dataTokenDecimals,t.fixedRate,t.marketFee,n]).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async estGasCreateDispenser(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e);b.allowedSwapper||(b.allowedSwapper="0x0000000000000000000000000000000000000000"),b.withMint||(b.withMint=!1);const f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.createDispenser(t,b.maxTokens,b.maxBalance,b.withMint,b.allowedSwapper).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async createDispenser(e,a,t,b){if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");const n=new this.web3.eth.Contract(this.datatokensAbi,e);b.allowedSwapper||(b.allowedSwapper="0x0000000000000000000000000000000000000000"),b.withMint||(b.withMint=!1);const d=await this.estGasCreateDispenser(e,a,t,b,n);return await n.methods.createDispenser(t,b.maxTokens,b.maxBalance,b.withMint,b.allowedSwapper).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async mint(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==(await this.getDTPermissions(e,a)).minter)throw new Error("Caller is not Minter");const d=await this.getCap(e);if(new f(d).gte(t)){const d=await this.estGasMint(e,a,t,b,n);return await n.methods.mint(b||a,this.web3.utils.toWei(t)).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}throw new Error("Mint amount exceeds cap available")}async estGasAddMinter(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addMinter(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addMinter(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasAddMinter(e,a,t,b);return await b.methods.addMinter(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveMinter(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeMinter(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeMinter(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasRemoveMinter(e,a,t,b);return await b.methods.removeMinter(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddPaymentManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addPaymentManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addPaymentManager(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasAddPaymentManager(e,a,t,b);return await b.methods.addPaymentManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemovePaymentManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removePaymentManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removePaymentManager(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasRemovePaymentManager(e,a,t,b);return await b.methods.removePaymentManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasSetPaymentCollector(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setPaymentCollector(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setPaymentCollector(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==(await this.getDTPermissions(e,a)).paymentManager)throw new Error("Caller is not Fee Manager");const n=await this.estGasSetPaymentCollector(e,a,t,b);return await b.methods.setPaymentCollector(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async getPaymentCollector(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.getPaymentCollector().call()}async transfer(e,a,t,b){const n=this.web3.utils.toWei(t);return this.transferWei(e,a,n,b)}async estGasTransfer(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.transfer(a,t).estimateGas({from:b},(e,a)=>e?f:a)}catch(e){s=f}return s}async transferWei(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e);try{const d=await this.estGasTransfer(e,a,t,b,n);return await n.methods.transfer(a,t).send({from:b,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to transfer tokens: ${e.message}`),new Error(`Failed Failed to transfer tokens: ${e.message}`)}}async estGasStartOrder(e,a,t,b,n,d,f,s,i,c,r,o){const p=o||new this.web3.eth.Contract(this.datatokensAbi,e),y=this.GASLIMIT_DEFAULT;let u;try{u=await p.methods.startOrder(t,b,n,d,f,s,i,c,r).estimateGas({from:a},(e,a)=>e?y:a)}catch(e){u=y}return u}async startOrder(e,a,t,b,n,d,f,s,i,o,p){const y=new this.web3.eth.Contract(this.datatokensAbi,e);n||(n="0x0000000000000000000000000000000000000000");try{const c=await this.estGasStartOrder(e,a,t,b,n,d,f,s,i,o,p,y);return await y.methods.startOrder(t,b,n,d,f,s,i,o,p).send({from:a,gas:c+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to start order : ${e.message}`),new Error(`Failed to start order: ${e.message}`)}}async estGasBuyFromFreAndOrder(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyFromFreAndOrder(t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyFromFreAndOrder(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e);try{const d=await this.estGasBuyFromFreAndOrder(e,a,t,b,n);return await n.methods.buyFromFreAndOrder(t,b).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to buy DT From Fre And Order : ${e.message}`),new Error(`Failed to buy DT From Fre And Order: ${e.message}`)}}async estGasBuyFromDispenserAndOrder(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyFromDispenserAndOrder(t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyFromDispenserAndOrder(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e);try{const d=await this.estGasBuyFromDispenserAndOrder(e,a,t,b,n);return await n.methods.buyFromDispenserAndOrder(t,b).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to buy DT From Fre And Order : ${e.message}`),new Error(`Failed to buy DT From Fre And Order: ${e.message}`)}}async estGasSetData(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setData(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setData(e,a,t){if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");const b=new this.web3.eth.Contract(this.datatokensAbi,e),n=await this.estGasSetData(e,a,t,b);return await b.methods.setData(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasCleanPermissions(e,a,t){const b=t||new this.web3.eth.Contract(this.datatokensAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.cleanPermissions().estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async cleanPermissions(e,a){if(await this.nft.getNftOwner(await this.getNFTAddress(e))!==a)throw new Error("Caller is NOT Nft Owner");const t=new this.web3.eth.Contract(this.datatokensAbi,e),b=await this.estGasCleanPermissions(e,a,t);return await t.methods.cleanPermissions().send({from:a,gas:b+1,gasPrice:await r(this.web3)})}async getDTPermissions(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e);return await t.methods.permissions(a).call()}async getCap(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e),t=await a.methods.cap().call();return this.web3.utils.fromWei(t)}async getDecimals(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.decimals().call()}async getNFTAddress(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.getERC721Address().call()}async isERC20Deployer(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e);return await t.methods.isERC20Deployer(a).call()}async balance(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e,{from:a}),b=await t.methods.balanceOf(a).call();return this.web3.utils.fromWei(b)}}var H={_format:"hh-sol-artifact-1",contractName:"ERC721Factory",sourceName:"contracts/ERC721Factory.sol",abi:[{inputs:[{internalType:"address",name:"_template721",type:"address"},{internalType:"address",name:"_template",type:"address"},{internalType:"address",name:"_collector",type:"address"},{internalType:"address",name:"_router",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"maxTokens",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxBalance",type:"uint256"},{indexed:!1,internalType:"address",name:"allowedSwapper",type:"address"}],name:"DispenserCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"instance",type:"address"}],name:"InstanceDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"tokenName",type:"string"},{indexed:!1,internalType:"address",name:"admin",type:"address"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"string",name:"tokenURI",type:"string"}],name:"NFTCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_templateAddress",type:"address"},{indexed:!0,internalType:"uint256",name:"nftTemplateCount",type:"uint256"}],name:"Template20Added",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_templateAddress",type:"address"},{indexed:!0,internalType:"uint256",name:"nftTemplateCount",type:"uint256"}],name:"Template721Added",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"uint256",name:"cap",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"}],name:"TokenCreated",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:"struct ERC721Factory.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 ERC721Factory.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 ERC721Factory.DispenserData",name:"_DispenserData",type:"tuple"}],name:"createNftErcWithDispenser",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:"struct ERC721Factory.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 ERC721Factory.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 ERC721Factory.FixedData",name:"_FixedData",type:"tuple"}],name:"createNftErcWithFixedRate",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:"struct ERC721Factory.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 ERC721Factory.ErcCreateData",name:"_ErcCreateData",type:"tuple"},{components:[{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"ssParams",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"}],internalType:"struct ERC721Factory.PoolData",name:"_PoolData",type:"tuple"}],name:"createNftErcWithPool",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:"struct ERC721Factory.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 ERC721Factory.ErcCreateData",name:"_ErcCreateData",type:"tuple"}],name:"createNftWithErc",outputs:[{internalType:"address",name:"erc721Address",type:"address"},{internalType:"address",name:"erc20Address",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:"string",name:"tokenURI",type:"string"}],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:[],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"},{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:"bytes",name:"providerData",type:"bytes"}],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"}],bytecode:"0x60806040526000600a553480156200001657600080fd5b50604051620039c8380380620039c88339810160408190526200003991620005ab565b6200004433620001be565b600180556001600160a01b038316158015906200006957506001600160a01b03821615155b80156200007e57506001600160a01b03841615155b620001065760405162461bcd60e51b815260206004820152604760248201527f4552433732314454466163746f72793a20496e76616c69642074656d706c617460448201527f6520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f72206064820152666164647265737360c81b608482015260a4015b60405180910390fd5b6001600160a01b0381166200016e5760405162461bcd60e51b815260206004820152602760248201527f4552433732314454466163746f72793a20496e76616c696420726f75746572206044820152666164647265737360c81b6064820152608401620000fd565b62000179846200020e565b506200018583620003d1565b50600c80546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055506200062f9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080546001600160a01b031633146200025a5760405162461bcd60e51b81526020600482018190526024820152600080516020620039a88339815191526044820152606401620000fd565b6001600160a01b038216620002d85760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f5745440000000000000000006064820152608401620000fd565b813b620003285760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e545241435400000000006044820152606401620000fd565b6001600560008282546200033d919062000608565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a350506005545b919050565b600080546001600160a01b031633146200041d5760405162461bcd60e51b81526020600482018190526024820152600080516020620039a88339815191526044820152606401620000fd565b6001600160a01b0382166200049b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c61746520616460448201527f6472657373283029204e4f5420414c4c4f5745440000000000000000000000006064820152608401620000fd565b813b620004eb5760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e54524143540000000000006044820152606401620000fd565b6001600b600082825462000500919062000608565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b54919050565b80516001600160a01b0381168114620003cc57600080fd5b60008060008060808587031215620005c257600080fd5b620005cd8562000593565b9350620005dd6020860162000593565b9250620005ed6040860162000593565b9150620005fd6060860162000593565b905092959194509250565b600082198211156200062a57634e487b7160e01b600052601160045260246000fd5b500190565b613369806200063f6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063c6cf868a11610097578063e5fc01f011610071578063e5fc01f0146104ff578063f2fde38b14610507578063f887ea401461051a578063fd024d6a1461052d57600080fd5b8063c6cf868a14610487578063ca4abc691461048f578063e3491099146104cc57600080fd5b806395c60305116100d357806395c6030514610420578063a33ef2a614610428578063b9cd22641461043b578063bbf8d71f1461047457600080fd5b80638da5cb5b146103c75780638f6051af146103d857806394051699146103eb57600080fd5b80635de329fd116101665780637b20bccf116101405780637b20bccf1461033a578063809d81051461034d57806382c442041461036057806389898869146103b457600080fd5b80635de329fd146102f6578063715018a61461030957806372f670f01461031157600080fd5b806326705c3c116101a257806326705c3c1461024f5780633315efd114610266578063557fcfb0146102c35780635c705982146102ee57600080fd5b8063042ab9b3146101c95780630ffda88714610207578063226e76151461021c575b600080fd5b6101dc6101d73660046124e0565b610540565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61021a6102153660046124e0565b6105c7565b005b61023f61022a366004612519565b60096020526000908152604090205460ff1681565b60405190151581526020016101fe565b610258600b5481565b6040519081526020016101fe565b6101dc6102743660046124e0565b6040805180820190915260008082526020820152506000908152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b6102d66102d1366004612799565b61060c565b6040516001600160a01b0390911681526020016101fe565b600354610258565b61021a610304366004612877565b6106ad565b61021a610b97565b6102d661031f366004612519565b6008602052600090815260409020546001600160a01b031681565b610258610348366004612519565b610bcd565b61021a61035b3660046124e0565b610d60565b61039561036e3660046124e0565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b0390931683529015156020830152016101fe565b6102d66103c23660046129e7565b610dd2565b6000546001600160a01b03166102d6565b6102586103e6366004612519565b6110a3565b6103956103f93660046124e0565b6007602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b600b54610258565b61021a6104363660046124e0565b61123e565b61044e610449366004612abc565b6112b6565b604080516001600160a01b039485168152939092166020840152908201526060016101fe565b61021a6104823660046124e0565b611516565b600a54610258565b6104a261049d366004612abc565b6115d2565b604080516001600160a01b03948516815292841660208401529216918101919091526060016101fe565b6104df6104da366004612b43565b6117a0565b604080516001600160a01b039384168152929091166020830152016101fe565b600554610258565b61021a610515366004612519565b611928565b600c546102d6906001600160a01b031681565b6104df61053b366004612ba6565b6119c3565b60408051808201909152600080825260208201526000828152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600b54831180159061059c57508215155b6105c15760405162461bcd60e51b81526004016105b890612c1a565b60405180910390fd5b92915050565b6000546001600160a01b031633146105f15760405162461bcd60e51b81526004016105b890612c63565b6000908152600760205260409020805460ff60a01b19169055565b3360008181526008602052604081205490916001600160a01b03909116146106955760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105b8565b6106a3868686868633611bfa565b9695505050505050565b600260015414156106d05760405162461bcd60e51b81526004016105b890612c98565b60026001558051603210156107275760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105b8565b60005b8151811015610b8f57600080600084848151811061074a5761074a612ccf565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190612ce5565b9250925092506000811180156107d557506001600160a01b03821615155b80156107e957506001600160a01b03831615155b15610835576108036001600160a01b038316333084611edf565b61083585858151811061081857610818612ccf565b6020908102919091010151516001600160a01b0384169083611f50565b600085858151811061084957610849612ccf565b602002602001015160a00151118015610892575060006001600160a01b031685858151811061087a5761087a612ccf565b6020026020010151608001516001600160a01b031614155b80156108ce575060006001600160a01b03168585815181106108b6576108b6612ccf565b6020026020010151606001516001600160a01b031614155b156109a25761092d33308787815181106108ea576108ea612ccf565b602002602001015160a0015188888151811061090857610908612ccf565b6020026020010151608001516001600160a01b0316611edf909392919063ffffffff16565b6109a285858151811061094257610942612ccf565b60200260200101516000015186868151811061096057610960612ccf565b602002602001015160a0015187878151811061097e5761097e612ccf565b6020026020010151608001516001600160a01b0316611f509092919063ffffffff16565b6109e73330670de0b6b3a76400008888815181106109c2576109c2612ccf565b6020026020010151600001516001600160a01b0316611edf909392919063ffffffff16565b8484815181106109f9576109f9612ccf565b6020026020010151600001516001600160a01b0316639b4f44b6868681518110610a2557610a25612ccf565b602002602001015160200151878781518110610a4357610a43612ccf565b602002602001015160400151888881518110610a6157610a61612ccf565b602002602001015160600151898981518110610a7f57610a7f612ccf565b6020026020010151608001518a8a81518110610a9d57610a9d612ccf565b602002602001015160a001518b8b81518110610abb57610abb612ccf565b602002602001015160c001518c8c81518110610ad957610ad9612ccf565b602002602001015160e001518d8d81518110610af757610af7612ccf565b602002602001015161010001518e8e81518110610b1657610b16612ccf565b602002602001015161012001516040518a63ffffffff1660e01b8152600401610b4799989796959493929190612d80565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050505050508080610b8790612dfc565b91505061072a565b505060018055565b6000546001600160a01b03163314610bc15760405162461bcd60e51b81526004016105b890612c63565b610bcb6000612002565b565b600080546001600160a01b03163314610bf85760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b038216610c6b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105b8565b813b610cb95760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105b8565b6001600b6000828254610ccc9190612e17565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b545b919050565b6000546001600160a01b03163314610d8a5760405162461bcd60e51b81526004016105b890612c63565b6005548111158015610d9b57508015155b610db75760405162461bcd60e51b81526004016105b890612e2f565b6000908152600660205260409020805460ff60a01b19169055565b60006005548411158015610de557508315155b610e015760405162461bcd60e51b81526004016105b890612e2f565b6000848152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610e9d5760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105b8565b8051610ea890612052565b91506001600160a01b038216610f28576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105b8565b6001600160a01b0382166000818152600860205260409081902080546001600160a01b03191683179055516370c166d760e01b81528391906370c166d790610f7e9033908c908c9030908c908c90600401612e7b565b6020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190612eef565b61102a5760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105b8565b81600001516001600160a01b0316836001600160a01b03167f46f5e3cee761854fc3892024ae7aa2c832007dff583603ce093f177ebd9c4c968a338b896040516110779493929190612f0c565b60405180910390a36001600360008282546110929190612e17565b909155509298975050505050505050565b600080546001600160a01b031633146110ce5760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b03821661114a5760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105b8565b813b6111985760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105b8565b6001600560008282546111ab9190612e17565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600554919050565b6000546001600160a01b031633146112685760405162461bcd60e51b81526004016105b890612c63565b600554811115801561127957508015155b6112955760405162461bcd60e51b81526004016105b890612e2f565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156112de5760405162461bcd60e51b81526004016105b890612c98565b60026001556113b36112f08780612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611332925050506020890189612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408901353061137960608c018c612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dd292505050565b925061146a85356113c76020880188612fa1565b6113d091612fea565b6113dd6040890189612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061141c9250505060608a018a612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061145b9250505060808b018b612fa1565b61146491612fea565b88611bfa565b91506001600160a01b038216638b96412b6114886020870187612519565b6114956020880188612fa1565b6114a260408a018a612fa1565b6040518663ffffffff1660e01b81526004016114c2959493929190613076565b6020604051808303816000875af11580156114e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150591906130ba565b600180559296919550919350915050565b6000546001600160a01b031633146115405760405162461bcd60e51b81526004016105b890612c63565b600b54811115801561155157508015155b6115b15760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105b8565b6000908152600760205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156115fa5760405162461bcd60e51b81526004016105b890612c98565b600260015561166d33306116116020880188612fa1565b600481811061162257611622612ccf565b602002919091013590506116368880612fa1565b600181811061164757611647612ccf565b905060200201602081019061165c9190612519565b6001600160a01b0316929190611edf565b61167a6112f08780612f54565b925061168e85356113c76020880188612fa1565b600c54909250611709906001600160a01b03166116ae6020870187612fa1565b60048181106116bf576116bf612ccf565b602002919091013590506116d38780612fa1565b60018181106116e4576116e4612ccf565b90506020020160208101906116f99190612519565b6001600160a01b03169190611f50565b6001600160a01b038216635bfe4da06117256020870187612fa1565b6117326040890189612fa1565b61173c8a80612fa1565b6040518763ffffffff1660e01b815260040161175d969594939291906130d3565b6020604051808303816000875af115801561177c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611505919061311c565b600080600260015414156117c65760405162461bcd60e51b81526004016105b890612c98565b60026001556118626117d88580612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061181a925050506020870187612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408b013593509150611379905060608a018a612f54565b915061191983356118766020860186612fa1565b61187f91612fea565b61188c6040870187612fa1565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506118cb925050506060880188612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061190a925050506080890189612fa1565b61191391612fea565b87611bfa565b60018055919491935090915050565b6000546001600160a01b031633146119525760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b0381166119b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b8565b6119c081612002565b50565b600080600260015414156119e95760405162461bcd60e51b81526004016105b890612c98565b6002600155611a846119fb8680612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3d925050506020880188612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408801353061137960608b018b612f54565b9150611b2c8435611a986020870187612fa1565b611aa191612fea565b611aae6040880188612fa1565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611aed925050506060890189612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061190a9250505060808a018a612fa1565b90506001600160a01b03811663191c918a611b4a6020860186612519565b60208601356040870135611b646080890160608a01613139565b611b7460a08a0160808b01612519565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611bd457600080fd5b505af1158015611be8573d6000803e3d6000fd5b50506001805550919590945092505050565b600083600081518110611c0f57611c0f612ccf565b602002602001015160001415611c755760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105b8565b600b548711158015611c8657508615155b611ca25760405162461bcd60e51b81526004016105b890612c1a565b6000878152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052611d3b5760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105b8565b8051611d4690612052565b6001600160a01b0381166000818152600960205260409020805460ff19166001179055909250611dde5760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105b8565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b9089600081518110611e2a57611e2a612ccf565b60200260200101518a600181518110611e4557611e45612ccf565b602002602001015189600081518110611e6057611e60612ccf565b602002602001015188604051611e799493929190613156565b60405180910390a36001600a6000828254611e949190612e17565b90915550506040805160a081018252888152602081018890529081018690526001600160a01b038416608082015260608101859052611ed383826120e2565b50509695505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611f4a9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228f565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc591906130ba565b611fcf9190612e17565b6040516001600160a01b038516602482015260448101829052909150611f4a90859063095ea7b360e01b90606401611f13565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b604080516003808252608082019092528391600091906020820160608036833701905050905082608001518160008151811061212057612120612ccf565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061215157612151612ccf565b6001600160a01b039283166020918202929092010152600c5482519116908290600290811061218257612182612ccf565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b81526004016121e695949392919061325b565b6020604051808303816000875af1158015612205573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122299190612eef565b611f4a5760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105b8565b60006122e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123669092919063ffffffff16565b80519091501561236157808060200190518101906123029190612eef565b6123615760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b8565b505050565b6060612375848460008561237f565b90505b9392505050565b6060824710156123e05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b8565b843b61242e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b8565b600080866001600160a01b0316858760405161244a9190613304565b60006040518083038185875af1925050503d8060008114612487576040519150601f19603f3d011682016040523d82523d6000602084013e61248c565b606091505b509150915061249c8282866124a7565b979650505050505050565b606083156124b6575081612378565b8251156124c65782518084602001fd5b8160405162461bcd60e51b81526004016105b89190613320565b6000602082840312156124f257600080fd5b5035919050565b6001600160a01b03811681146119c057600080fd5b8035610d5b816124f9565b60006020828403121561252b57600080fd5b8135612378816124f9565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b038111828210171561256f5761256f612536565b60405290565b604051601f8201601f191681016001600160401b038111828210171561259d5761259d612536565b604052919050565b60006001600160401b038211156125be576125be612536565b5060051b60200190565b600082601f8301126125d957600080fd5b81356001600160401b038111156125f2576125f2612536565b612605601f8201601f1916602001612575565b81815284602083860101111561261a57600080fd5b816020850160208301376000918101602001919091529392505050565b600061264a612645846125a5565b612575565b8381529050602080820190600585901b84018681111561266957600080fd5b845b818110156126a45780356001600160401b0381111561268a5760008081fd5b612696898289016125c8565b85525092820192820161266b565b505050509392505050565b600082601f8301126126c057600080fd5b813560206126d0612645836125a5565b82815260059290921b840181019181810190868411156126ef57600080fd5b8286015b84811015612713578035612706816124f9565b83529183019183016126f3565b509695505050505050565b600082601f83011261272f57600080fd5b8135602061273f612645836125a5565b82815260059290921b8401810191818101908684111561275e57600080fd5b8286015b848110156127135780358352918301918301612762565b600082601f83011261278a57600080fd5b61237883833560208501612637565b600080600080600060a086880312156127b157600080fd5b8535945060208601356001600160401b03808211156127cf57600080fd5b818801915088601f8301126127e357600080fd5b6127f289833560208501612637565b9550604088013591508082111561280857600080fd5b61281489838a016126af565b9450606088013591508082111561282a57600080fd5b61283689838a0161271e565b9350608088013591508082111561284c57600080fd5b5061285988828901612779565b9150509295509295909350565b803560ff81168114610d5b57600080fd5b6000602080838503121561288a57600080fd5b82356001600160401b03808211156128a157600080fd5b818501915085601f8301126128b557600080fd5b81356128c3612645826125a5565b81815260059190911b830184019084810190888311156128e257600080fd5b8585015b838110156129da578035858111156128fe5760008081fd5b8601610140818c03601f19018113156129175760008081fd5b61291f61254c565b61292a8a840161250e565b8152604061293981850161250e565b8b830152606080850135828401526080915061295682860161250e565b9083015260a061296785820161250e565b8284015260c0915081850135818401525060e0612985818601612866565b8284015261010091508185013581840152506101208085013582840152838501359350898411156129b857600091508182fd5b6129c68f8d868801016125c8565b9083015250855250509186019186016128e6565b5098975050505050505050565b600080600080600060a086880312156129ff57600080fd5b85356001600160401b0380821115612a1657600080fd5b612a2289838a016125c8565b96506020880135915080821115612a3857600080fd5b612a4489838a016125c8565b95506040880135945060608801359150612a5d826124f9565b90925060808701359080821115612a7357600080fd5b50612859888289016125c8565b600060808284031215612a9257600080fd5b50919050565b600060a08284031215612a9257600080fd5b600060608284031215612a9257600080fd5b600080600060608486031215612ad157600080fd5b83356001600160401b0380821115612ae857600080fd5b612af487838801612a80565b94506020860135915080821115612b0a57600080fd5b612b1687838801612a98565b93506040860135915080821115612b2c57600080fd5b50612b3986828701612aaa565b9150509250925092565b60008060408385031215612b5657600080fd5b82356001600160401b0380821115612b6d57600080fd5b612b7986838701612a80565b93506020850135915080821115612b8f57600080fd5b50612b9c85828601612a98565b9150509250929050565b600080600060e08486031215612bbb57600080fd5b83356001600160401b0380821115612bd257600080fd5b612bde87838801612a80565b94506020860135915080821115612bf457600080fd5b50612c0186828701612a98565b925050612c118560408601612a98565b90509250925092565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600080600060608486031215612cfa57600080fd5b8351612d05816124f9565b6020850151909350612d16816124f9565b80925050604084015190509250925092565b60005b83811015612d43578181015183820152602001612d2b565b83811115611f4a5750506000910152565b60008151808452612d6c816020860160208601612d28565b601f01601f19169290920160200192915050565b600061012060018060a01b03808d1684528b6020850152808b166040850152808a1660608501525087608084015260ff871660a08401528560c08401528460e084015280610100840152612dd681840185612d54565b9c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612e1057612e10612de6565b5060010190565b60008219821115612e2a57612e2a612de6565b500190565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b600060018060a01b03808916835260c06020840152612e9d60c0840189612d54565b8381036040850152612eaf8189612d54565b90508187166060850152818616608085015283810360a0850152612ed38186612d54565b9a9950505050505050505050565b80151581146119c057600080fd5b600060208284031215612f0157600080fd5b815161237881612ee1565b608081526000612f1f6080830187612d54565b6001600160a01b03861660208401528281036040840152612f408186612d54565b9050828103606084015261249c8185612d54565b6000808335601e19843603018112612f6b57600080fd5b8301803591506001600160401b03821115612f8557600080fd5b602001915036819003821315612f9a57600080fd5b9250929050565b6000808335601e19843603018112612fb857600080fd5b8301803591506001600160401b03821115612fd257600080fd5b6020019150600581901b3603821315612f9a57600080fd5b6000612378368484612637565b8183526000602080850194508260005b8581101561303557813561301a816124f9565b6001600160a01b031687529582019590820190600101613007565b509495945050505050565b81835260006001600160fb1b0383111561305957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038616815260606020820181905260009061309b9083018688612ff7565b82810360408401526130ae818587613040565b98975050505050505050565b6000602082840312156130cc57600080fd5b5051919050565b6060815260006130e760608301888a613040565b82810360208401526130fa818789613040565b9050828103604084015261310f818587612ff7565b9998505050505050505050565b60006020828403121561312e57600080fd5b8151612378816124f9565b60006020828403121561314b57600080fd5b813561237881612ee1565b6080815260006131696080830187612d54565b828103602084015261317b8187612d54565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b838110156130355781516001600160a01b0316875295820195908201906001016131b1565b600081518084526020808501945080840160005b83811015613035578151875295820195908201906001016131ea565b600081518084526020808501808196508360051b8101915082860160005b8581101561324e57828403895261323c848351612d54565b98850198935090840190600101613224565b5091979650505050505050565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156132b25760bf198887030185526132a0868351612d54565b95509382019390820190600101613284565b5050858403818701525050506132c8818861319d565b905082810360408401526132dc818761319d565b905082810360608401526132f081866131d6565b905082810360808401526130ae8185613206565b60008251613316818460208701612d28565b9190910192915050565b6020815260006123786020830184612d5456fea2646970667358221220bcb5079a8dfc5ac89d9c8b15c3e22a453d4e07b4f9e047affc6d9f1866d96f7264736f6c634300080a00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",deployedBytecode:"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063c6cf868a11610097578063e5fc01f011610071578063e5fc01f0146104ff578063f2fde38b14610507578063f887ea401461051a578063fd024d6a1461052d57600080fd5b8063c6cf868a14610487578063ca4abc691461048f578063e3491099146104cc57600080fd5b806395c60305116100d357806395c6030514610420578063a33ef2a614610428578063b9cd22641461043b578063bbf8d71f1461047457600080fd5b80638da5cb5b146103c75780638f6051af146103d857806394051699146103eb57600080fd5b80635de329fd116101665780637b20bccf116101405780637b20bccf1461033a578063809d81051461034d57806382c442041461036057806389898869146103b457600080fd5b80635de329fd146102f6578063715018a61461030957806372f670f01461031157600080fd5b806326705c3c116101a257806326705c3c1461024f5780633315efd114610266578063557fcfb0146102c35780635c705982146102ee57600080fd5b8063042ab9b3146101c95780630ffda88714610207578063226e76151461021c575b600080fd5b6101dc6101d73660046124e0565b610540565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61021a6102153660046124e0565b6105c7565b005b61023f61022a366004612519565b60096020526000908152604090205460ff1681565b60405190151581526020016101fe565b610258600b5481565b6040519081526020016101fe565b6101dc6102743660046124e0565b6040805180820190915260008082526020820152506000908152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b6102d66102d1366004612799565b61060c565b6040516001600160a01b0390911681526020016101fe565b600354610258565b61021a610304366004612877565b6106ad565b61021a610b97565b6102d661031f366004612519565b6008602052600090815260409020546001600160a01b031681565b610258610348366004612519565b610bcd565b61021a61035b3660046124e0565b610d60565b61039561036e3660046124e0565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b0390931683529015156020830152016101fe565b6102d66103c23660046129e7565b610dd2565b6000546001600160a01b03166102d6565b6102586103e6366004612519565b6110a3565b6103956103f93660046124e0565b6007602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b600b54610258565b61021a6104363660046124e0565b61123e565b61044e610449366004612abc565b6112b6565b604080516001600160a01b039485168152939092166020840152908201526060016101fe565b61021a6104823660046124e0565b611516565b600a54610258565b6104a261049d366004612abc565b6115d2565b604080516001600160a01b03948516815292841660208401529216918101919091526060016101fe565b6104df6104da366004612b43565b6117a0565b604080516001600160a01b039384168152929091166020830152016101fe565b600554610258565b61021a610515366004612519565b611928565b600c546102d6906001600160a01b031681565b6104df61053b366004612ba6565b6119c3565b60408051808201909152600080825260208201526000828152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600b54831180159061059c57508215155b6105c15760405162461bcd60e51b81526004016105b890612c1a565b60405180910390fd5b92915050565b6000546001600160a01b031633146105f15760405162461bcd60e51b81526004016105b890612c63565b6000908152600760205260409020805460ff60a01b19169055565b3360008181526008602052604081205490916001600160a01b03909116146106955760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105b8565b6106a3868686868633611bfa565b9695505050505050565b600260015414156106d05760405162461bcd60e51b81526004016105b890612c98565b60026001558051603210156107275760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105b8565b60005b8151811015610b8f57600080600084848151811061074a5761074a612ccf565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190612ce5565b9250925092506000811180156107d557506001600160a01b03821615155b80156107e957506001600160a01b03831615155b15610835576108036001600160a01b038316333084611edf565b61083585858151811061081857610818612ccf565b6020908102919091010151516001600160a01b0384169083611f50565b600085858151811061084957610849612ccf565b602002602001015160a00151118015610892575060006001600160a01b031685858151811061087a5761087a612ccf565b6020026020010151608001516001600160a01b031614155b80156108ce575060006001600160a01b03168585815181106108b6576108b6612ccf565b6020026020010151606001516001600160a01b031614155b156109a25761092d33308787815181106108ea576108ea612ccf565b602002602001015160a0015188888151811061090857610908612ccf565b6020026020010151608001516001600160a01b0316611edf909392919063ffffffff16565b6109a285858151811061094257610942612ccf565b60200260200101516000015186868151811061096057610960612ccf565b602002602001015160a0015187878151811061097e5761097e612ccf565b6020026020010151608001516001600160a01b0316611f509092919063ffffffff16565b6109e73330670de0b6b3a76400008888815181106109c2576109c2612ccf565b6020026020010151600001516001600160a01b0316611edf909392919063ffffffff16565b8484815181106109f9576109f9612ccf565b6020026020010151600001516001600160a01b0316639b4f44b6868681518110610a2557610a25612ccf565b602002602001015160200151878781518110610a4357610a43612ccf565b602002602001015160400151888881518110610a6157610a61612ccf565b602002602001015160600151898981518110610a7f57610a7f612ccf565b6020026020010151608001518a8a81518110610a9d57610a9d612ccf565b602002602001015160a001518b8b81518110610abb57610abb612ccf565b602002602001015160c001518c8c81518110610ad957610ad9612ccf565b602002602001015160e001518d8d81518110610af757610af7612ccf565b602002602001015161010001518e8e81518110610b1657610b16612ccf565b602002602001015161012001516040518a63ffffffff1660e01b8152600401610b4799989796959493929190612d80565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050505050508080610b8790612dfc565b91505061072a565b505060018055565b6000546001600160a01b03163314610bc15760405162461bcd60e51b81526004016105b890612c63565b610bcb6000612002565b565b600080546001600160a01b03163314610bf85760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b038216610c6b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105b8565b813b610cb95760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105b8565b6001600b6000828254610ccc9190612e17565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b545b919050565b6000546001600160a01b03163314610d8a5760405162461bcd60e51b81526004016105b890612c63565b6005548111158015610d9b57508015155b610db75760405162461bcd60e51b81526004016105b890612e2f565b6000908152600660205260409020805460ff60a01b19169055565b60006005548411158015610de557508315155b610e015760405162461bcd60e51b81526004016105b890612e2f565b6000848152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610e9d5760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105b8565b8051610ea890612052565b91506001600160a01b038216610f28576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105b8565b6001600160a01b0382166000818152600860205260409081902080546001600160a01b03191683179055516370c166d760e01b81528391906370c166d790610f7e9033908c908c9030908c908c90600401612e7b565b6020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190612eef565b61102a5760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105b8565b81600001516001600160a01b0316836001600160a01b03167f46f5e3cee761854fc3892024ae7aa2c832007dff583603ce093f177ebd9c4c968a338b896040516110779493929190612f0c565b60405180910390a36001600360008282546110929190612e17565b909155509298975050505050505050565b600080546001600160a01b031633146110ce5760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b03821661114a5760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105b8565b813b6111985760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105b8565b6001600560008282546111ab9190612e17565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600554919050565b6000546001600160a01b031633146112685760405162461bcd60e51b81526004016105b890612c63565b600554811115801561127957508015155b6112955760405162461bcd60e51b81526004016105b890612e2f565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156112de5760405162461bcd60e51b81526004016105b890612c98565b60026001556113b36112f08780612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611332925050506020890189612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408901353061137960608c018c612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dd292505050565b925061146a85356113c76020880188612fa1565b6113d091612fea565b6113dd6040890189612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061141c9250505060608a018a612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061145b9250505060808b018b612fa1565b61146491612fea565b88611bfa565b91506001600160a01b038216638b96412b6114886020870187612519565b6114956020880188612fa1565b6114a260408a018a612fa1565b6040518663ffffffff1660e01b81526004016114c2959493929190613076565b6020604051808303816000875af11580156114e1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061150591906130ba565b600180559296919550919350915050565b6000546001600160a01b031633146115405760405162461bcd60e51b81526004016105b890612c63565b600b54811115801561155157508015155b6115b15760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105b8565b6000908152600760205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156115fa5760405162461bcd60e51b81526004016105b890612c98565b600260015561166d33306116116020880188612fa1565b600481811061162257611622612ccf565b602002919091013590506116368880612fa1565b600181811061164757611647612ccf565b905060200201602081019061165c9190612519565b6001600160a01b0316929190611edf565b61167a6112f08780612f54565b925061168e85356113c76020880188612fa1565b600c54909250611709906001600160a01b03166116ae6020870187612fa1565b60048181106116bf576116bf612ccf565b602002919091013590506116d38780612fa1565b60018181106116e4576116e4612ccf565b90506020020160208101906116f99190612519565b6001600160a01b03169190611f50565b6001600160a01b038216635bfe4da06117256020870187612fa1565b6117326040890189612fa1565b61173c8a80612fa1565b6040518763ffffffff1660e01b815260040161175d969594939291906130d3565b6020604051808303816000875af115801561177c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611505919061311c565b600080600260015414156117c65760405162461bcd60e51b81526004016105b890612c98565b60026001556118626117d88580612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061181a925050506020870187612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525060408b013593509150611379905060608a018a612f54565b915061191983356118766020860186612fa1565b61187f91612fea565b61188c6040870187612fa1565b808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506118cb925050506060880188612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061190a925050506080890189612fa1565b61191391612fea565b87611bfa565b60018055919491935090915050565b6000546001600160a01b031633146119525760405162461bcd60e51b81526004016105b890612c63565b6001600160a01b0381166119b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b8565b6119c081612002565b50565b600080600260015414156119e95760405162461bcd60e51b81526004016105b890612c98565b6002600155611a846119fb8680612f54565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a3d925050506020880188612f54565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408801353061137960608b018b612f54565b9150611b2c8435611a986020870187612fa1565b611aa191612fea565b611aae6040880188612fa1565b80806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250611aed925050506060890189612fa1565b8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061190a9250505060808a018a612fa1565b90506001600160a01b03811663191c918a611b4a6020860186612519565b60208601356040870135611b646080890160608a01613139565b611b7460a08a0160808b01612519565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611bd457600080fd5b505af1158015611be8573d6000803e3d6000fd5b50506001805550919590945092505050565b600083600081518110611c0f57611c0f612ccf565b602002602001015160001415611c755760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105b8565b600b548711158015611c8657508615155b611ca25760405162461bcd60e51b81526004016105b890612c1a565b6000878152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052611d3b5760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105b8565b8051611d4690612052565b6001600160a01b0381166000818152600960205260409020805460ff19166001179055909250611dde5760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105b8565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b9089600081518110611e2a57611e2a612ccf565b60200260200101518a600181518110611e4557611e45612ccf565b602002602001015189600081518110611e6057611e60612ccf565b602002602001015188604051611e799493929190613156565b60405180910390a36001600a6000828254611e949190612e17565b90915550506040805160a081018252888152602081018890529081018690526001600160a01b038416608082015260608101859052611ed383826120e2565b50509695505050505050565b6040516001600160a01b0380851660248301528316604482015260648101829052611f4a9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261228f565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa158015611fa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fc591906130ba565b611fcf9190612e17565b6040516001600160a01b038516602482015260448101829052909150611f4a90859063095ea7b360e01b90606401611f13565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b604080516003808252608082019092528391600091906020820160608036833701905050905082608001518160008151811061212057612120612ccf565b6001600160a01b03928316602091820292909201015260025482519116908290600190811061215157612151612ccf565b6001600160a01b039283166020918202929092010152600c5482519116908290600290811061218257612182612ccf565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b81526004016121e695949392919061325b565b6020604051808303816000875af1158015612205573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122299190612eef565b611f4a5760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105b8565b60006122e4826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166123669092919063ffffffff16565b80519091501561236157808060200190518101906123029190612eef565b6123615760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b8565b505050565b6060612375848460008561237f565b90505b9392505050565b6060824710156123e05760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b8565b843b61242e5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b8565b600080866001600160a01b0316858760405161244a9190613304565b60006040518083038185875af1925050503d8060008114612487576040519150601f19603f3d011682016040523d82523d6000602084013e61248c565b606091505b509150915061249c8282866124a7565b979650505050505050565b606083156124b6575081612378565b8251156124c65782518084602001fd5b8160405162461bcd60e51b81526004016105b89190613320565b6000602082840312156124f257600080fd5b5035919050565b6001600160a01b03811681146119c057600080fd5b8035610d5b816124f9565b60006020828403121561252b57600080fd5b8135612378816124f9565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b038111828210171561256f5761256f612536565b60405290565b604051601f8201601f191681016001600160401b038111828210171561259d5761259d612536565b604052919050565b60006001600160401b038211156125be576125be612536565b5060051b60200190565b600082601f8301126125d957600080fd5b81356001600160401b038111156125f2576125f2612536565b612605601f8201601f1916602001612575565b81815284602083860101111561261a57600080fd5b816020850160208301376000918101602001919091529392505050565b600061264a612645846125a5565b612575565b8381529050602080820190600585901b84018681111561266957600080fd5b845b818110156126a45780356001600160401b0381111561268a5760008081fd5b612696898289016125c8565b85525092820192820161266b565b505050509392505050565b600082601f8301126126c057600080fd5b813560206126d0612645836125a5565b82815260059290921b840181019181810190868411156126ef57600080fd5b8286015b84811015612713578035612706816124f9565b83529183019183016126f3565b509695505050505050565b600082601f83011261272f57600080fd5b8135602061273f612645836125a5565b82815260059290921b8401810191818101908684111561275e57600080fd5b8286015b848110156127135780358352918301918301612762565b600082601f83011261278a57600080fd5b61237883833560208501612637565b600080600080600060a086880312156127b157600080fd5b8535945060208601356001600160401b03808211156127cf57600080fd5b818801915088601f8301126127e357600080fd5b6127f289833560208501612637565b9550604088013591508082111561280857600080fd5b61281489838a016126af565b9450606088013591508082111561282a57600080fd5b61283689838a0161271e565b9350608088013591508082111561284c57600080fd5b5061285988828901612779565b9150509295509295909350565b803560ff81168114610d5b57600080fd5b6000602080838503121561288a57600080fd5b82356001600160401b03808211156128a157600080fd5b818501915085601f8301126128b557600080fd5b81356128c3612645826125a5565b81815260059190911b830184019084810190888311156128e257600080fd5b8585015b838110156129da578035858111156128fe5760008081fd5b8601610140818c03601f19018113156129175760008081fd5b61291f61254c565b61292a8a840161250e565b8152604061293981850161250e565b8b830152606080850135828401526080915061295682860161250e565b9083015260a061296785820161250e565b8284015260c0915081850135818401525060e0612985818601612866565b8284015261010091508185013581840152506101208085013582840152838501359350898411156129b857600091508182fd5b6129c68f8d868801016125c8565b9083015250855250509186019186016128e6565b5098975050505050505050565b600080600080600060a086880312156129ff57600080fd5b85356001600160401b0380821115612a1657600080fd5b612a2289838a016125c8565b96506020880135915080821115612a3857600080fd5b612a4489838a016125c8565b95506040880135945060608801359150612a5d826124f9565b90925060808701359080821115612a7357600080fd5b50612859888289016125c8565b600060808284031215612a9257600080fd5b50919050565b600060a08284031215612a9257600080fd5b600060608284031215612a9257600080fd5b600080600060608486031215612ad157600080fd5b83356001600160401b0380821115612ae857600080fd5b612af487838801612a80565b94506020860135915080821115612b0a57600080fd5b612b1687838801612a98565b93506040860135915080821115612b2c57600080fd5b50612b3986828701612aaa565b9150509250925092565b60008060408385031215612b5657600080fd5b82356001600160401b0380821115612b6d57600080fd5b612b7986838701612a80565b93506020850135915080821115612b8f57600080fd5b50612b9c85828601612a98565b9150509250929050565b600080600060e08486031215612bbb57600080fd5b83356001600160401b0380821115612bd257600080fd5b612bde87838801612a80565b94506020860135915080821115612bf457600080fd5b50612c0186828701612a98565b925050612c118560408601612a98565b90509250925092565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600080600060608486031215612cfa57600080fd5b8351612d05816124f9565b6020850151909350612d16816124f9565b80925050604084015190509250925092565b60005b83811015612d43578181015183820152602001612d2b565b83811115611f4a5750506000910152565b60008151808452612d6c816020860160208601612d28565b601f01601f19169290920160200192915050565b600061012060018060a01b03808d1684528b6020850152808b166040850152808a1660608501525087608084015260ff871660a08401528560c08401528460e084015280610100840152612dd681840185612d54565b9c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612e1057612e10612de6565b5060010190565b60008219821115612e2a57612e2a612de6565b500190565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b600060018060a01b03808916835260c06020840152612e9d60c0840189612d54565b8381036040850152612eaf8189612d54565b90508187166060850152818616608085015283810360a0850152612ed38186612d54565b9a9950505050505050505050565b80151581146119c057600080fd5b600060208284031215612f0157600080fd5b815161237881612ee1565b608081526000612f1f6080830187612d54565b6001600160a01b03861660208401528281036040840152612f408186612d54565b9050828103606084015261249c8185612d54565b6000808335601e19843603018112612f6b57600080fd5b8301803591506001600160401b03821115612f8557600080fd5b602001915036819003821315612f9a57600080fd5b9250929050565b6000808335601e19843603018112612fb857600080fd5b8301803591506001600160401b03821115612fd257600080fd5b6020019150600581901b3603821315612f9a57600080fd5b6000612378368484612637565b8183526000602080850194508260005b8581101561303557813561301a816124f9565b6001600160a01b031687529582019590820190600101613007565b509495945050505050565b81835260006001600160fb1b0383111561305957600080fd5b8260051b8083602087013760009401602001938452509192915050565b6001600160a01b038616815260606020820181905260009061309b9083018688612ff7565b82810360408401526130ae818587613040565b98975050505050505050565b6000602082840312156130cc57600080fd5b5051919050565b6060815260006130e760608301888a613040565b82810360208401526130fa818789613040565b9050828103604084015261310f818587612ff7565b9998505050505050505050565b60006020828403121561312e57600080fd5b8151612378816124f9565b60006020828403121561314b57600080fd5b813561237881612ee1565b6080815260006131696080830187612d54565b828103602084015261317b8187612d54565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b838110156130355781516001600160a01b0316875295820195908201906001016131b1565b600081518084526020808501945080840160005b83811015613035578151875295820195908201906001016131ea565b600081518084526020808501808196508360051b8101915082860160005b8581101561324e57828403895261323c848351612d54565b98850198935090840190600101613224565b5091979650505050505050565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156132b25760bf198887030185526132a0868351612d54565b95509382019390820190600101613284565b5050858403818701525050506132c8818861319d565b905082810360408401526132dc818761319d565b905082810360608401526132f081866131d6565b905082810360808401526130ae8185613206565b60008251613316818460208701612d28565b9190910192915050565b6020815260006123786020830184612d5456fea2646970667358221220bcb5079a8dfc5ac89d9c8b15c3e22a453d4e07b4f9e047affc6d9f1866d96f7264736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};const J="0x0000000000000000000000000000000000000000";class q{constructor(e,a,t,b){this.GASLIMIT_DEFAULT=1e6,this.factory721Address=void 0,this.factory721Abi=void 0,this.web3=void 0,this.startBlock=void 0,this.factory721=void 0,this.factory721Address=e,this.factory721Abi=t||H.abi,this.web3=a,this.startBlock=b||0,this.factory721=new this.web3.eth.Contract(this.factory721Abi,this.factory721Address)}async estGasCreateNFT(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.deployERC721Contract(a.name,a.symbol,a.templateIndex,J,a.tokenURI).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async createNFT(e,a){if(a.templateIndex||(a.templateIndex=1),!a.name||!a.symbol){const{name:e,symbol:t}=p();a.name=e,a.symbol=t}if(a.templateIndex>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a.templateIndex)throw new Error("Template index cannot be ZERO");if(!1===(await this.getNFTTemplate(a.templateIndex)).isActive)throw new Error("Template is not active");const t=await this.estGasCreateNFT(e,a),b=await this.factory721.methods.deployERC721Contract(a.name,a.symbol,a.templateIndex,J,a.tokenURI).send({from:e,gas:t+1,gasPrice:await r(this.web3)});let n=null;try{n=b.events.NFTCreated.returnValues[0]}catch(e){c.error(`ERROR: Failed to create datatoken : ${e.message}`)}return n}async getCurrentNFTCount(){return await this.factory721.methods.getCurrentNFTCount().call()}async getCurrentTokenCount(){return await this.factory721.methods.getCurrentTokenCount().call()}async getOwner(){return await this.factory721.methods.owner().call()}async getCurrentNFTTemplateCount(){return await this.factory721.methods.getCurrentNFTTemplateCount().call()}async getCurrentTokenTemplateCount(){return await this.factory721.methods.getCurrentTemplateCount().call()}async getNFTTemplate(e){if(e>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===e)throw new Error("Template index cannot be ZERO");return await this.factory721.methods.getNFTTemplate(e).call()}async getTokenTemplate(e){return await this.factory721.methods.getTokenTemplate(e).call()}async checkDatatoken(e){return await this.factory721.methods.erc20List(e).call()}async checkNFT(e){return await this.factory721.methods.erc721List(e).call()}async estGasAddNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.add721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async addNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a===J)throw new Error("Template cannot be ZERO address");const t=await this.estGasAddNFTTemplate(e,a);return await this.factory721.methods.add721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasDisableNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.disable721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async disableNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");const t=await this.estGasDisableNFTTemplate(e,a);return await this.factory721.methods.disable721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasReactivateNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.reactivate721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async reactivateNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");const t=await this.estGasReactivateNFTTemplate(e,a);return await this.factory721.methods.reactivate721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasAddTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.addTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async addTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a===J)throw new Error("Template cannot be address ZERO");const t=await this.estGasAddTokenTemplate(e,a);return await this.factory721.methods.addTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasDisableTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.disableTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async disableTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");if(!1===(await this.getNFTTemplate(a)).isActive)throw new Error("Template is already disabled");const t=await this.estGasDisableTokenTemplate(e,a);return await this.factory721.methods.disableTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasReactivateTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.reactivateTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async reactivateTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");if(!0===(await this.getTokenTemplate(a)).isActive)throw new Error("Template is already active");const t=await this.estGasReactivateTokenTemplate(e,a);return await this.factory721.methods.reactivateTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasStartMultipleTokenOrder(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.startMultipleTokenOrder(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async startMultipleTokenOrder(e,a){if(a.length>50)throw new Error("Too many orders");const t=await this.estGasStartMultipleTokenOrder(e,a);return await this.factory721.methods.startMultipleTokenOrder(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasCreateNftWithErc(e,a,t){const b=this.GASLIMIT_DEFAULT;let n;try{const d=y(t);n=await this.factory721.methods.createNftWithErc(a,d).estimateGas({from:e},(e,a)=>e?b:a)}catch(e){n=b}return n}async createNftWithErc(e,a,t){const b=y(t),n=await this.estGasCreateNftWithErc(e,a,t);return await this.factory721.methods.createNftWithErc(a,b).send({from:e,gas:n+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithPool(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;try{const f=y(t),s=l(b);d=await this.factory721.methods.createNftErcWithPool(a,f,s).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async createNftErcWithPool(e,a,t,b){const n=await this.estGasCreateNftErcWithPool(e,a,t,b),d=y(t),f=l(b);return await this.factory721.methods.createNftErcWithPool(a,d,f).send({from:e,gas:n+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithFixedRate(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;const f=y(t),s=u(b);try{d=await this.factory721.methods.createNftErcWithFixedRate(a,f,s).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async createNftErcWithFixedRate(e,a,t,b){const n=y(t),d=u(b),f=await this.estGasCreateNftErcWithFixedRate(e,a,t,b);return await this.factory721.methods.createNftErcWithFixedRate(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithDispenser(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;const f=y(t);try{d=await this.factory721.methods.createNftErcWithDispenser(a,f,b).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n,c.error("Failed to estimate gas for createNftErcWithDispenser",e)}return d}async createNftErcWithDispenser(e,a,t,b){const n=y(t),d=await this.estGasCreateNftErcWithDispenser(e,a,t,b);return await this.factory721.methods.createNftErcWithDispenser(a,n,b).send({from:e,gas:d+1,gasPrice:await r(this.web3)})}}class X{constructor(){this.nodeUri=void 0,this.providerAddress=void 0,this.metadataCacheUri=void 0,this.providerUri=void 0,this.web3Provider=void 0,this.oceanTokenAddress=void 0,this.erc721FactoryAddress=void 0,this.erc721FFactoryABI=void 0,this.datatokensABI=void 0,this.poolTemplateAddress=void 0,this.poolFactoryABI=void 0,this.poolABI=void 0,this.fixedRateExchangeAddress=void 0,this.fixedRateExchangeAddressABI=void 0,this.dispenserAddress=void 0,this.dispenserABI=void 0,this.opfCommunityFeeCollector=void 0,this.sideStakingAddress=void 0,this.startBlock=void 0,this.verbose=void 0,this.authMessage=void 0,this.authTokenExpiration=void 0,this.parityUri=void 0,this.threshold=void 0,this.chainId=void 0,this.network=void 0,this.subgraphUri=void 0,this.explorerUri=void 0,this.oceanTokenSymbol=void 0}}const V=e=>function(e="",a){const{valid:t,output:b}=function(e,a,t){if("string"!=typeof e)throw c.debug("Not input string:"),c.debug(e),new Error("[zeroXTransformer] Expected string, input type: "+typeof e);const b=e.match(/^(?:0x)*([a-f0-9]+)$/i);return b?{valid:!0,output:b[1]}:(c.warn("[zeroXTransformer] Input transformation failed."),{valid:!1,output:e})}(e);return(a&&t?"0x":"")+b}(e,!1);class Z{async getEndpoints(e){try{const a=await T(e);return await a.json()}catch(e){return c.error("Finding the service endpoints failed:",e),null}}getEndpointURL(e,a){return e?e.find(e=>e.serviceName===a):null}async getServiceEndpoints(e,a){const t=[];for(const b in a.serviceEndpoints)t.push({serviceName:b,method:a.serviceEndpoints[b][0],urlPath:e+a.serviceEndpoints[b][1]});return t}async getNonce(e,a,t,b,n){b||(b=await this.getEndpoints(e)),n||(n=await this.getServiceEndpoints(e,b));const d=this.getEndpointURL(n,"nonce")?this.getEndpointURL(n,"nonce").urlPath:null;if(!d)return null;try{const e=await t(d+`?userAddress=${a}`);return String((await e.json()).nonce)}catch(e){throw c.error(e),new Error("HTTP request failed")}}async createSignature(e,a,t){return await I(e,V(t),a)}async createHashSignature(e,a,t){return await S(e,t,a)}async encrypt(e,a,t){const b=await this.getEndpoints(a),n=await this.getServiceEndpoints(a,b),d=this.getEndpointURL(n,"encrypt")?this.getEndpointURL(n,"encrypt").urlPath:null;if(!d)return null;try{return await t("POST",d,decodeURI(JSON.stringify(e)),{"Content-Type":"application/octet-stream"})}catch(e){throw c.error(e),new Error("HTTP request failed")}}async checkDidFiles(e,a,t,b){const n=await this.getEndpoints(t),d=await this.getServiceEndpoints(t,n),f={did:e,serviceId:a},s=[],i=this.getEndpointURL(d,"fileinfo")?this.getEndpointURL(d,"fileinfo").urlPath:null;if(!i)return null;try{const e=await b(i,JSON.stringify(f)),a=await e.json();for(const e of a)s.push(e);return s}catch(e){return null}}async checkFileUrl(e,a,t){const b=await this.getEndpoints(a),n=await this.getServiceEndpoints(a,b),d={url:e,type:"url"},f=[],s=this.getEndpointURL(n,"fileinfo")?this.getEndpointURL(n,"fileinfo").urlPath:null;if(!s)return null;try{const e=await t("POST",s,JSON.stringify(d)),a=await e.json();for(const e of a)f.push(e);return f}catch(e){return null}}async initialize(e,a,t,b,n,d,f,s){const i=await this.getEndpoints(n),r=await this.getServiceEndpoints(n,i);let o=this.getEndpointURL(r,"initialize")?this.getEndpointURL(r,"initialize").urlPath:null;if(!o)return null;o+=`?documentId=${e}`,o+=`&serviceId=${a}`,o+=`&fileIndex=${t}`,o+=`&consumerAddress=${b}`,f&&(o+="&userdata="+encodeURI(JSON.stringify(f))),s&&(o+="&computeEnv="+encodeURI(s));try{const e=await d("GET",o);return await e.json()}catch(e){throw c.error(e),new Error("Asset URL not found or not available.")}}async getDownloadUrl(e,a,t,b,n,d,f,s){const i=await this.getEndpoints(d),c=await this.getServiceEndpoints(d,i),r=this.getEndpointURL(c,"download")?this.getEndpointURL(c,"download").urlPath:null;if(!r)return null;const o=Date.now();let p=r;return p+=`?fileIndex=${b}`,p+=`&documentId=${e}`,p+=`&transferTxId=${n}`,p+=`&serviceId=${t}`,p+=`&consumerAddress=${a}`,p+=`&nonce=${o}`,p+=`&signature=${await this.createSignature(f,a,e+o)}`,s&&(p+="&userdata="+encodeURI(JSON.stringify(s))),p}async computeStart(e,a,t,b,n,d,f,s,i){const r=await this.getEndpoints(e),o=await this.getServiceEndpoints(e,r),p=this.getEndpointURL(o,"computeStart")?this.getEndpointURL(o,"computeStart").urlPath:null,y=Date.now();let u=b;u+=d.documentId,u+=y;const l=await this.createHashSignature(a,b,u),m=Object();if(m.consumerAddress=b,m.signature=l,m.nonce=y,m.computeEnv=n,m.dataset=d,m.algorithm=f,m.additionalDatasets&&(m.additionalDatasets=s),i&&(m.output=i),!p)return null;try{const e=await t("POST",p,JSON.stringify(m),{"Content-Type":"application/json"});return null!=e&&e.ok?await e.json():(console.error("Compute start failed:",e.status,e.statusText),c.error("Payload was:",m),null)}catch(e){return c.error("Compute start failed:"),c.error(e),c.error("Payload was:",m),null}}async computeStop(e,a,t,b,n,d){const f=await this.getEndpoints(b),s=await this.getServiceEndpoints(b,f),i=this.getEndpointURL(s,"computeStop")?this.getEndpointURL(s,"computeStop").urlPath:null,r=await this.getNonce(b,a,d,f,s);let o=a;o+=t||"",o+=e&&`${V(e)}`||"",o+=r;const p=await this.createHashSignature(n,a,o),y=Object();if(y.signature=p,y.documentId=V(e),y.consumerAddress=a,t&&(y.jobId=t),!i)return null;try{const e=await d(i,JSON.stringify(y));return null!=e&&e.ok?await e.json():(c.error("Compute stop failed:",e.status,e.statusText),c.error("Payload was:",y),null)}catch(e){return c.error("Compute stop failed:"),c.error(e),c.error("Payload was:",y),null}}async computeStatus(e,a,t,b,n){if(!t&&!b&&!n)throw new Error("You need at least one of jobId, did, consumerAddress");const d=await this.getEndpoints(e),f=await this.getServiceEndpoints(e,d),s=this.getEndpointURL(f,"computeStatus")?this.getEndpointURL(f,"computeStatus").urlPath:null;let i="?documentId="+V(b);if(i+=`&consumerAddress=${n}`,i+=t&&`&jobId=${t}`||"",!s)return null;try{const e=await a("GET",s+i);return null!=e&&e.ok?await e.json():(c.error("Get compute status failed:",e.status,e.statusText),null)}catch(e){return c.error("Get compute status failed"),c.error(e),null}}async computeResult(e,a,t,b,n,d,f){const s=await this.getEndpoints(n),i=await this.getServiceEndpoints(n,s),r=this.getEndpointURL(i,"computeResult")?this.getEndpointURL(i,"computeResult").urlPath:null,o=await this.getNonce(n,b,f,s,i);let p=b;p+=e,p+=String(a),p+=o;const y=await this.createHashSignature(d,b,p);let u=r;if(u+=`?consumerAddress=${b}`,u+=`&jobId=${e}`,u+=`&index=${String(a)}`,u+=y&&`&signature=${y}`||"",!r)return null;try{t?await f.downloadFile(u,t,a):await f.downloadFileBrowser(u)}catch(e){throw c.error("Error getting job result"),c.error(e),e}return t}async computeDelete(e,a,t,b,n,d){const f=await this.getEndpoints(b),s=await this.getServiceEndpoints(b,f),i=this.getEndpointURL(s,"computeDelete")?this.getEndpointURL(s,"computeDelete").urlPath:null,r=await this.getNonce(b,a,d,f,s);let o=a;o+=t||"",o+=e&&`${V(e)}`||"",o+=r;const p=await this.createHashSignature(n,a,o),y=Object();if(y.documentId=V(e),y.consumerAddress=a,y.jobId=t,p&&(y.signature=p),!i)return null;try{const e=await d(i,JSON.stringify(y));return null!=e&&e.ok?await e.json():(c.error("Delete compute job failed:",e.status,e.statusText),c.error("Payload was:",y),null)}catch(e){return c.error("Delete compute job failed:"),c.error(e),c.error("Payload was:",y),null}}async isValidProvider(e,a){try{const t=await a(e);if(null!=t&&t.ok){const e=await t.json();if(e&&e.providerAddress)return!0}return!1}catch(e){return c.error(`Error validating provider: ${e.message}`),!1}}}const Y=new Z;export{X as Config,k as ConfigHelper,z as Datatoken,L as Dispenser,_ as FixedRateCreateProgressStep,W as FixedRateExchange,s as LogLevel,i as Logger,c as LoggerInstance,j as Nft,q as NftFactory,G as Pool,Z as Provider,Y as ProviderInstance,F as ZERO_ADDRESS,M as configHelperNetworks,g as crossFetchGeneric,h as downloadFile,m as fetchData,E as generateDid,p as generateDtName,T as getData,y as getErcCreationParams,r as getFairGasPrice,u as getFreCreationParams,C as getHash,l as getPoolCreationParams,w as postData,R as signHash,I as signText,S as signWithHash};
|
|
1
|
+
import e from"bignumber.js";import a from"web3";import t from"cross-fetch";import b from"fs";import n from"save-file";import d from"crypto-js/sha256";import f from"decimal.js";var s;!function(e){e[e.None=-1]="None",e[e.Error=0]="Error",e[e.Warn=1]="Warn",e[e.Log=2]="Log",e[e.Verbose=3]="Verbose"}(s||(s={}));class i{constructor(e=s.Error){this.logLevel=void 0,this.logLevel=e}setLevel(e){this.logLevel=e}bypass(...e){this.dispatch("log",-Infinity,...e)}debug(...e){this.dispatch("debug",s.Verbose,...e)}log(...e){this.dispatch("log",s.Log,...e)}warn(...e){this.dispatch("warn",s.Warn,...e)}error(...e){this.dispatch("error",s.Error,...e)}dispatch(e,a,...t){this.logLevel>=a&&console[e](...t)}}const c=new i;async function r(a){return new e(await a.eth.getGasPrice()).multipliedBy(1.05).integerValue(e.ROUND_DOWN).toString(10)}var o={nouns:["Crab","Fish","Seal","Octopus","Shark","Seahorse","Walrus","Starfish","Whale","Orca","Penguin","Jellyfish","Squid","Lobster","Pelican","Shrimp","Oyster","Clam","Seagull","Dolphin","Shell","Cormorant","Otter","Anemone","Turtle","Coral","Ray","Barracuda","Krill","Anchovy","Angelfish","Barnacle","Clownfish","Cod","Cuttlefish","Eel","Fugu","Herring","Haddock","Ling","Mackerel","Manatee","Narwhal","Nautilus","Plankton","Porpoise","Prawn","Pufferfish","Swordfish","Tuna"],adjectives:["adamant","adroit","amatory","ambitious","amused","animistic","antic","arcadian","artistic","astonishing","astounding","baleful","bellicose","bilious","blissful","boorish","brave","breathtaking","brilliant","calamitous","caustic","cerulean","clever","charming","comely","competent","concomitant","confident","contumacious","corpulent","crapulous","creative","dazzling","dedicated","defamatory","delighted","delightful","determined","didactic","dilatory","dowdy","efficacious","effulgent","egregious","empowered","endemic","enthusiastic","equanimous","exceptional","execrable","fabulous","fantastic","fastidious","feckless","fecund","friable","fulsome","garrulous","generous","gentle","guileless","gustatory","heuristic","histrionic","hubristic","incendiary","incredible","insidious","insolent","inspired","intransigent","inveterate","invidious","invigorated","irksome","jejune","juicy","jocular","joyful","judicious","kind","lachrymose","limpid","loquacious","lovely","luminous","mannered","marvelous","mendacious","meretricious","minatory","mordant","motivated","munificent","nefarious","noxious","obtuse","optimistic","parsimonious","pendulous","pernicious","pervasive","petulant","passionate","phenomenal","platitudinous","pleasant","powerful","precipitate","propitious","puckish","querulous","quiescent","rebarbative","recalcitant","redolent","rhadamanthine","risible","ruminative","sagacious","salubrious","sartorial","sclerotic","serpentine","smart","spasmodic","strident","stunning","stupendous","taciturn","tactful","tasty","tenacious","tremendous","tremulous","trenchant","turbulent","turgid","ubiquitous","uxorious","verdant","vibrant","voluble","voracious","wheedling","withering","wonderful","zealous"]};function p(e){const a=e||o,t=Math.floor(Math.random()*a.adjectives.length),b=Math.floor(Math.random()*a.nouns.length),n=Math.floor(100*Math.random()),d=a.adjectives[t].replace(/^\w/,e=>e.toUpperCase()),f=a.nouns[b].replace(/^\w/,e=>e.toUpperCase());return{name:`${d} ${f} Token`,symbol:`${(d.substring(0,3)+f.substring(0,3)).toUpperCase()}-${n}`}}function y(e){let t,b;return e.name&&e.symbol||({name:t,symbol:b}=p()),{templateIndex:e.templateIndex,strings:[e.name||t,e.symbol||b],addresses:[e.minter,e.feeManager,e.mpFeeAddress,e.feeToken],uints:[a.utils.toWei(e.cap),a.utils.toWei(e.feeAmount)],bytess:[]}}function u(e){return e.allowedConsumer||(e.allowedConsumer="0x0000000000000000000000000000000000000000"),{fixedPriceAddress:e.fixedRateAddress,addresses:[e.baseTokenAddress,e.owner,e.marketFeeCollector,e.allowedConsumer],uints:[e.baseTokenDecimals,e.dataTokenDecimals,e.fixedRate,e.marketFee,e.withMint?1:0]}}function l(e){return{addresses:[e.ssContract,e.basetokenAddress,e.basetokenSender,e.publisherAddress,e.marketFeeCollector,e.poolTemplateAddress],ssParams:[a.utils.toWei(e.rate),e.basetokenDecimals,a.utils.toWei(e.vestingAmount),e.vestedBlocks,a.utils.toWei(e.initialBasetokenLiquidity)],swapFees:[e.swapFeeLiquidityProvider,e.swapFeeMarketRunner]}}async function m(e,a){const b=await t(e,a);if(!b.ok)throw c.error(`Error requesting [${a.method}] ${e}`),c.error(`Response message: \n${await b.text()}`),b;return b}async function h(e,a,d){const f=await t(e);if(!f.ok)throw new Error("Response error.");let s;try{s=f.headers.get("content-disposition").match(/attachment;filename=(.+)/)[1]}catch(a){try{s=e.split("/").pop()}catch(e){s=`file${d}`}}if(a)return b.mkdirSync(a,{recursive:!0}),b.writeFileSync(`${a}/${s}`,await f.text()),a;n(await f.arrayBuffer(),s)}async function T(e){return t(e,{method:"GET",headers:{"Content-type":"application/json"}})}async function w(e,a){return async function(e,a,b){return t(e,null!=a?{method:"POST",body:a,headers:{"Content-type":"application/json"}}:{method:"POST"})}(e,a)}async function g(e,a,b,n){return t(a,{method:e,body:b,headers:n})}function A(){return A=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var b in t)Object.prototype.hasOwnProperty.call(t,b)&&(e[b]=t[b])}return e},A.apply(this,arguments)}var x={rinkeby:{chainId:4,Ocean:"0x8967bcf84170c91b0d24d4302c2376283b0b3a07",OPFCommunityFeeCollector:"0x7f7df5c45Ad80CF9F217dA3d5cd0C6691f6D0c44",startBlock:9989814,poolTemplate:"0xD956ADbA2210Ae3668feedf61CB9F62Ff5272252",Router:"0x31066E8eFe281C755dC21d828bdF30363D055baB",FixedPrice:"0xB5f34bd0B3E8e59447fD5a750F2dE4262BABE66C",Staking:"0xd9f38Bc400f5b29e62Cc02Fa4c812803E50965A2",ERC20Template:{1:"0xD903a1A494e2708ef35589dA3D76F1110FAc1809",2:"0xe395cdfC729cc9cB8A9a0F9aA14CD5f1C8B44c26"},ERC721Template:{1:"0x97AE6c58E7F8E77B065caf253755adE65eA9259C"},Dispenser:"0x17b1760c20eAc7A2656412412F6020e6c00b78BD",ERC721Factory:"0x15087E3E9eAAAb37d32d9D06Fa4000309BD7Ee6D"}};const v={chainId:null,network:"unknown",metadataCacheUri:"https://aquarius.oceanprotocol.com",nodeUri:"http://localhost:8545",providerUri:"http://127.0.0.1:8030",subgraphUri:null,explorerUri:null,oceanTokenAddress:null,oceanTokenSymbol:"OCEAN",poolTemplateAddress:null,fixedRateExchangeAddress:null,dispenserAddress:null,startBlock:0},M=[A({},v),A({},v,{chainId:8996,network:"development",metadataCacheUri:"http://127.0.0.1:5000"}),A({},v,{chainId:3,network:"ropsten",nodeUri:"https://ropsten.infura.io/v3",providerUri:"https://provider.ropsten.oceanprotocol.com",subgraphUri:"https://subgraph.ropsten.oceanprotocol.com",explorerUri:"https://ropsten.etherscan.io",startBlock:9227563}),A({},v,{chainId:4,network:"rinkeby",nodeUri:"https://rinkeby.infura.io/v3",providerUri:"https://providerv4.rinkeby.oceanprotocol.com",subgraphUri:"https://subgraphv4.rinkeby.oceanprotocol.com",explorerUri:"https://rinkeby.etherscan.io",startBlock:7294090}),A({},v,{chainId:1,network:"mainnet",nodeUri:"https://mainnet.infura.io/v3",providerUri:"https://provider.mainnet.oceanprotocol.com",subgraphUri:"https://subgraph.mainnet.oceanprotocol.com",explorerUri:"https://etherscan.io",startBlock:11105459}),A({},v,{chainId:137,network:"polygon",nodeUri:"https://polygon-mainnet.infura.io/v3",providerUri:"https://provider.polygon.oceanprotocol.com",subgraphUri:"https://subgraph.polygon.oceanprotocol.com",explorerUri:"https://polygonscan.com",oceanTokenSymbol:"mOCEAN",startBlock:11005222}),A({},v,{chainId:1287,network:"moonbeamalpha",nodeUri:"https://rpc.testnet.moonbeam.network",providerUri:"https://provider.moonbeamalpha.oceanprotocol.com",subgraphUri:"https://subgraph.moonbeamalpha.oceanprotocol.com",explorerUri:"https://moonbase-blockscout.testnet.moonbeam.network/",startBlock:90707}),A({},v,{chainId:2021e3,network:"gaiaxtestnet",nodeUri:"https://rpc.gaiaxtestnet.oceanprotocol.com",providerUri:"https://provider.gaiaxtestnet.oceanprotocol.com",subgraphUri:"https://subgraph.gaiaxtestnet.oceanprotocol.com",explorerUri:"https://blockscout.gaiaxtestnet.oceanprotocol.com"}),A({},v,{chainId:2021001,network:"catenaxtestnet",nodeUri:"https://rpc.catenaxtestnet.oceanprotocol.com",providerUri:"https://provider.catenaxtestnet.oceanprotocol.com",subgraphUri:"https://subgraph.catenaxtestnet.oceanprotocol.com",explorerUri:"https://blockscout.catenaxtestnet.oceanprotocol.com",metadataCacheUri:"https://aquarius.catenaxtestnet.oceanprotocol.com"}),A({},v,{chainId:80001,network:"mumbai",nodeUri:"https://polygon-mumbai.infura.io/v3",providerUri:"https://provider.mumbai.oceanprotocol.com",subgraphUri:"https://subgraph.mumbai.oceanprotocol.com",explorerUri:"https://mumbai.polygonscan.com"}),A({},v,{chainId:56,network:"bsc",nodeUri:"https://bsc-dataseed.binance.org",providerUri:"https://provider.bsc.oceanprotocol.com",subgraphUri:"https://subgraph.bsc.oceanprotocol.com",explorerUri:"https://bscscan.com/"}),A({},v,{chainId:44787,network:"celoalfajores",nodeUri:"https://alfajores-forno.celo-testnet.org",providerUri:"https://provider.celoalfajores.oceanprotocol.com",subgraphUri:"https://subgraph.celoalfajores.oceanprotocol.com",explorerUri:"https://alfajores-blockscout.celo-testnet.org"}),A({},v,{chainId:246,network:"energyweb",nodeUri:"https://rpc.energyweb.org",providerUri:"https://provider.energyweb.oceanprotocol.com",subgraphUri:"https://subgraph.energyweb.oceanprotocol.com",explorerUri:"https://explorer.energyweb.org"}),A({},v,{chainId:1285,network:"moonriver",nodeUri:"https://moonriver.api.onfinality.io/public",providerUri:"https://provider.moonriver.oceanprotocol.com",subgraphUri:"https://subgraph.moonriver.oceanprotocol.com",explorerUri:"https://blockscout.moonriver.moonbeam.network"})];class k{getAddressesFromEnv(e){let a;if(x[e]){const{FixedPrice:t,Dispenser:b,Staking:n,poolTemplate:d,OPFCommunityFeeCollector:f,ERC721Factory:s,Ocean:i,chainId:c,startBlock:r}=x[e];a=A({erc721FactoryAddress:s,sideStakingAddress:n,opfCommunityFeeCollector:f,poolTemplateAddress:d,fixedRateExchangeAddress:t,dispenserAddress:b,oceanTokenAddress:i,chainId:c,startBlock:r},process.env.AQUARIUS_URI&&{metadataCacheUri:process.env.AQUARIUS_URI})}if(b&&process.env.ADDRESS_FILE)try{const t=JSON.parse(b.readFileSync(process.env.ADDRESS_FILE,"utf8")),{FixedPrice:n,Dispenser:d,Staking:f,poolTemplate:s,ERC721Factory:i,OPFCommunityFeeCollector:c,Ocean:r,chainId:o,startBlock:p}=t[e];a=A({erc721FactoryAddress:i,sideStakingAddress:f,opfCommunityFeeCollector:c,poolTemplateAddress:s,fixedRateExchangeAddress:n,dispenserAddress:d,oceanTokenAddress:r,chainId:o,startBlock:p},process.env.AQUARIUS_URI&&{metadataCacheUri:process.env.AQUARIUS_URI})}catch(e){}return a}getConfig(e,a){const t="string"==typeof e?"network":"chainId";let b=M.find(a=>a[t]===e);return b?(b=A({},b,this.getAddressesFromEnv(b.network)),A({},b,{nodeUri:a?`${b.nodeUri}/${a}`:b.nodeUri})):(c.error(`No config found for given network '${e}'`),null)}}function E(e,t){return e=a.utils.toChecksumAddress(e),`did:op:${d(e+t.toString(10)).toString()}`}function C(e){return d(e).toString()}const F="0x0000000000000000000000000000000000000000";async function I(e,a,t,b){const n=e&&e.currentProvider&&e.currentProvider.isMetaMask;try{return await e.eth.personal.sign(a,t,b)}catch(b){if(n)throw b;c.warn("Error on personal sign."),c.warn(b);try{return await e.eth.sign(a,t)}catch(e){throw c.error("Error on sign."),c.error(e),new Error("Error executing personal sign")}}}async function R(e,a,t){let b=await e.eth.sign(a,t);b=b.substr(2);const n="0x"+b.slice(0,64),d="0x"+b.slice(64,128);let f="0x"+b.slice(128,130);return"0x00"===f&&(f="0x1b"),"0x01"===f&&(f="0x1c"),{v:f,r:n,s:d}}async function S(e,a,t,b){const n=e.utils.utf8ToHex(a),d=e&&e.currentProvider&&e.currentProvider.isMetaMask;try{return await e.eth.personal.sign(n,t,b)}catch(a){if(d)throw a;c.warn("Error on personal sign."),c.warn(a);try{return await e.eth.sign(n,t)}catch(e){throw c.error("Error on sign."),c.error(e),new Error("Error executing personal sign")}}}var O=[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"amt",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"bptAmount",type:"uint256"}],name:"LOG_BPT",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"bptAmount",type:"uint256"}],name:"LOG_BPT_SS",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes4",name:"sig",type:"bytes4"},{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"}],name:"LOG_CALL",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_EXIT",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenIn",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_JOIN",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"baseToken",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"baseTokenWeight",type:"uint256"},{indexed:!0,internalType:"address",name:"dataToken",type:"address"},{indexed:!1,internalType:"uint256",name:"dataTokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dataTokenWeight",type:"uint256"}],name:"LOG_SETUP",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"tokenIn",type:"address"},{indexed:!0,internalType:"address",name:"tokenOut",type:"address"},{indexed:!1,internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{indexed:!1,internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"}],name:"LOG_SWAP",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"newMarketCollector",type:"address"}],name:"MarketCollectorChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"MarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"OPFWallet",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"OPFFee",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"marketAddress",type:"address"},{indexed:!1,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"PublishMarketFee",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"uint256",name:"swapFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"tokenFees",type:"address"}],name:"SWAP_FEES",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"SwapFeeChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"src",type:"address"},{indexed:!0,internalType:"address",name:"dst",type:"address"},{indexed:!1,internalType:"uint256",name:"amt",type:"uint256"}],name:"Transfer",type:"event"},{inputs:[],name:"BONE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BPOW_PRECISION",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"EXIT_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"INIT_POOL_SUPPLY",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_BOUND_TOKENS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_BPOW_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_IN_RATIO",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_OUT_RATIO",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_TOTAL_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MAX_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BALANCE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BOUND_TOKENS",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_BPOW_BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_FEE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"MIN_WEIGHT",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"_opfCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_publishMarketCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"_swapPublishMarketFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"whom",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],name:"calcPoolInSingleOut",outputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],name:"calcPoolOutSingleIn",outputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],name:"calcSingleInPoolOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],name:"calcSingleOutPoolIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"collectMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"collectOPF",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"communityFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"decreaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"},{internalType:"uint256[]",name:"minAmountsOut",type:"uint256[]"}],name:"exitPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"maxPoolAmountIn",type:"uint256"}],name:"exitswapExternAmountOut",outputs:[{internalType:"uint256",name:"poolAmountIn",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"poolAmountIn",type:"uint256"},{internalType:"uint256",name:"minAmountOut",type:"uint256"}],name:"exitswapPoolAmountIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getAmountInExactOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getAmountOutExactIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getBalance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBaseTokenAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getController",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentMarketFees",outputs:[{internalType:"address[]",name:"",type:"address[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentOPFFees",outputs:[{internalType:"address[]",name:"",type:"address[]"},{internalType:"uint256[]",name:"",type:"uint256[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentTokens",outputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getDataTokenAddress",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getDenormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getFinalTokens",outputs:[{internalType:"address[]",name:"tokens",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"getMarketFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"token",type:"address"}],name:"getNormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumTokens",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getOPFFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"address",name:"tokenOut",type:"address"},{internalType:"uint256",name:"_swapMarketFee",type:"uint256"}],name:"getSpotPrice",outputs:[{internalType:"uint256",name:"spotPrice",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getSwapFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTotalDenormalizedWeight",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"increaseApproval",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"controller",type:"address"},{internalType:"address",name:"factory",type:"address"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"bool",name:"publicSwap",type:"bool"},{internalType:"bool",name:"finalized",type:"bool"},{internalType:"address[2]",name:"tokens",type:"address[2]"},{internalType:"address[2]",name:"feeCollectors",type:"address[2]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"t",type:"address"}],name:"isBound",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isFinalized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isPublicSwap",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"},{internalType:"uint256[]",name:"maxAmountsIn",type:"uint256[]"}],name:"joinPool",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"minPoolAmountOut",type:"uint256"}],name:"joinswapExternAmountIn",outputs:[{internalType:"uint256",name:"poolAmountOut",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"tokenIn",type:"address"},{internalType:"uint256",name:"poolAmountOut",type:"uint256"},{internalType:"uint256",name:"maxAmountIn",type:"uint256"}],name:"joinswapPoolAmountOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"publishMarketFees",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"swapFee",type:"uint256"}],name:"setSwapFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"dataTokenAddress",type:"address"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"dataTokenWeight",type:"uint256"},{internalType:"address",name:"baseTokenAddress",type:"address"},{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenWeight",type:"uint256"}],name:"setup",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[3]",name:"tokenInOutMarket",type:"address[3]"},{internalType:"uint256[4]",name:"amountsInOutMaxFee",type:"uint256[4]"}],name:"swapExactAmountIn",outputs:[{internalType:"uint256",name:"tokenAmountOut",type:"uint256"},{internalType:"uint256",name:"spotPriceAfter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address[3]",name:"tokenInOutMarket",type:"address[3]"},{internalType:"uint256[4]",name:"amountsInOutMaxFee",type:"uint256[4]"}],name:"swapExactAmountOut",outputs:[{internalType:"uint256",name:"tokenAmountIn",type:"uint256"},{internalType:"uint256",name:"spotPriceAfter",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"src",type:"address"},{internalType:"address",name:"dst",type:"address"},{internalType:"uint256",name:"amt",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newCollector",type:"address"}],name:"updateMarketFeeCollector",outputs:[],stateMutability:"nonpayable",type:"function"}],P={_format:"hh-sol-artifact-1",contractName:"ERC20Template",sourceName:"contracts/templates/ERC20Template.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterProposed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"_newPaymentCollector",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"NewPaymentCollector",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"consumer",type:"address"},{indexed:!1,internalType:"address",name:"payer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"serviceIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!0,internalType:"address",name:"publishMarketAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"OrderStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"providerFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"providerFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"providerFeeAmount",type:"uint256"},{indexed:!1,internalType:"bytes",name:"providerData",type:"bytes"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"ProviderFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFeesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BASE_COMMUNITY_FEE_PERCENTAGE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"addMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"addPaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"authERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanFrom721",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_dispenser",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"}],name:"createDispenser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"fixedPriceAddress",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createFixedRate",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256[]",name:"ssParams",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"},{internalType:"address[]",name:"addresses",type:"address[]"}],name:"deployPool",outputs:[{internalType:"address",name:"pool",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getERC721Address",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getPaymentCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],internalType:"struct ERC20Roles.RolesERC20",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPublishingMarketFee",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string[]",name:"strings_",type:"string[]"},{internalType:"address[]",name:"addresses_",type:"address[]"},{internalType:"address[]",name:"factoryAddresses_",type:"address[]"},{internalType:"uint256[]",name:"uints_",type:"uint256[]"},{internalType:"bytes[]",name:"bytes_",type:"bytes[]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"deployer",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"permissions",outputs:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"removeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"removePaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_value",type:"bytes"}],name:"setData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPaymentCollector",type:"address"}],name:"setPaymentCollector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_publishMarketFeeAddress",type:"address"},{internalType:"address",name:"_publishMarketFeeToken",type:"address"},{internalType:"uint256",name:"_publishMarketFeeAmount",type:"uint256"}],name:"setPublishingMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],name:"startOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x6080604052600b805460ff60a01b191690553480156200001e57600080fd5b5060408051808201825260048152631d195cdd60e21b60208083019182528351808501909452600a8452691d195cdd14de5b589bdb60b21b9084015281519192916200006d9160039162000091565b5080516200008390600490602084019062000091565b505060016007555062000174565b8280546200009f9062000137565b90600052602060002090601f016020900481019282620000c357600085556200010e565b82601f10620000de57805160ff19168380011785556200010e565b828001600101855582156200010e579182015b828111156200010e578251825591602001919060010190620000f1565b506200011c92915062000120565b5090565b5b808211156200011c576000815560010162000121565b600181811c908216806200014c57607f821691505b602082108114156200016e57634e487b7160e01b600052602260045260246000fd5b50919050565b61428e80620001846000396000f3fe6080604052600436106102725760003560e01c80635d1ca6311161014e578063aa271e1a116100bb578063dd62ed3e11610077578063dd62ed3e14610878578063e086e5ec146108be578063e487c2e8146108c6578063ec342ad0146108db578063ef867ff4146108f7578063f887ea401461091757005b8063aa271e1a146107aa578063aa492ef9146107e3578063ab62f0e114610803578063b2263a5d14610823578063b3998be014610838578063d505accf1461085857005b806395d89b411161010a57806395d89b41146106f557806396fb3eaf1461070a578063983b2d561461072a5780639b4f44b61461074a578063a457c2d71461076a578063a9059cbb1461078a57005b80635d1ca6311461062957806370a082311461063d57806379cc6790146106735780637ecebe001461069357806382c03da5146106c05780638b96412b146106d557005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461057457806342966c68146105945780634f189cb2146105b457806357a3a31b146105c957806357ad5ff6146105e95780635bfe4da01461060957005b8063313ce567146104ac578063355274ea146104ce5780633644e515146104e3578063392e53cd146104f95780633950935114610518578063397b37431461053857005b806318160ddd1161023b57806318160ddd146103d9578063191c918a146103f857806323b872dd1461041857806325b00243146104385780633092afd51461045857806330adf81f1461047857005b80627ffb781461027457806301e88208146102ab57806306fdde03146102fb578063095ea7b31461031d578063160a79251461034d575b005b34801561028057600080fd5b50600c546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b757600080fd5b506102e46102c6366004613569565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102a2565b34801561030757600080fd5b50610310610937565b6040516102a291906135de565b34801561032957600080fd5b5061033d6103383660046135f1565b6109c9565b60405190151581526020016102a2565b34801561035957600080fd5b506103ba610368366004613569565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102a2565b3480156103e557600080fd5b506002545b6040519081526020016102a2565b34801561040457600080fd5b5061027261041336600461362b565b6109df565b34801561042457600080fd5b5061033d61043336600461368a565b610b3a565b34801561044457600080fd5b50610272610453366004613569565b610be6565b34801561046457600080fd5b50610272610473366004613569565b610c80565b34801561048457600080fd5b506103ea7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104b857600080fd5b5060125b60405160ff90911681526020016102a2565b3480156104da57600080fd5b50600a546103ea565b3480156104ef57600080fd5b506103ea60115481565b34801561050557600080fd5b50600b54600160a01b900460ff1661033d565b34801561052457600080fd5b5061033d6105333660046135f1565b610d17565b34801561054457600080fd5b50600e54600f54601054604080516001600160a01b039485168152939092166020840152908201526060016102a2565b34801561058057600080fd5b5061027261058f3660046135f1565b610d53565b3480156105a057600080fd5b506102726105af3660046136cb565b610e24565b3480156105c057600080fd5b50610272610e2e565b3480156105d557600080fd5b506102726105e4366004613569565b610f15565b3480156105f557600080fd5b5061027261060436600461368a565b611057565b34801561061557600080fd5b5061028e61062436600461381e565b6111ab565b34801561063557600080fd5b5060016104bc565b34801561064957600080fd5b506103ea610658366004613569565b6001600160a01b031660009081526020819052604090205490565b34801561067f57600080fd5b5061027261068e3660046135f1565b611491565b34801561069f57600080fd5b506103ea6106ae366004613569565b60126020526000908152604090205481565b3480156106cc57600080fd5b50610272611517565b3480156106e157600080fd5b506103ea6106f03660046138a6565b611571565b34801561070157600080fd5b5061031061173e565b34801561071657600080fd5b5061033d610725366004613569565b61174d565b34801561073657600080fd5b50610272610745366004613569565b6117c8565b34801561075657600080fd5b506102726107653660046139a0565b61185f565b34801561077657600080fd5b5061033d6107853660046135f1565b611d10565b34801561079657600080fd5b5061033d6107a53660046135f1565b611da9565b3480156107b657600080fd5b5061033d6107c5366004613569565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107ef57600080fd5b506102726107fe366004613569565b611db6565b34801561080f57600080fd5b5061027261081e366004613a4d565b611e4d565b34801561082f57600080fd5b506103ea611f7e565b34801561084457600080fd5b5061033d610853366004613b0b565b611f94565b34801561086457600080fd5b50610272610873366004613bfc565b6120ce565b34801561088457600080fd5b506103ea610893366004613c6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102726122e0565b3480156108d257600080fd5b5061028e612320565b3480156108e757600080fd5b506103ea670de0b6b3a764000081565b34801561090357600080fd5b5061028e6109123660046136cb565b6123b5565b34801561092357600080fd5b5060135461028e906001600160a01b031681565b60606008805461094690613ca3565b80601f016020809104026020016040519081016040528092919081815260200182805461097290613ca3565b80156109bf5780601f10610994576101008083540402835291602001916109bf565b820191906000526020600020905b8154815290600101906020018083116109a257829003601f168201915b5050505050905090565b60006109d63384846123df565b50600192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d9190613cde565b60200151610a765760405162461bcd60e51b8152600401610a6d90613d63565b60405180910390fd5b60026007541415610a995760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051636b14d00560e11b81526001600160a01b038781166004830152306024830152604482018790526064820186905233608483015283811660a48301529091169063d629a00a9060c401600060405180830381600087803b158015610b0757600080fd5b505af1158015610b1b573d6000803e3d6000fd5b505050508115610b2e57610b2e85612503565b50506001600755505050565b6000610b47848484612605565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bcc5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610a6d565b610bd985338584036123df565b60019150505b9392505050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190613cde565b60200151610c745760405162461bcd60e51b8152600401610a6d90613d63565b610c7d816127d5565b50565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cee9190613cde565b60200151610d0e5760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612836565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916109d6918590610d4e908690613de5565b6123df565b3360009081526005602052604090205460ff16610db25760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610a6d565b600a54610dc882610dc260025490565b90612896565b1115610e165760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610a6d565b610e2082826128a2565b5050565b610c7d3382612981565b600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190613dfd565b6001600160a01b0316336001600160a01b031614610efb5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610a6d565b610f03612acf565b600d80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610fa65750600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613cde565b602001515b6110065760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610a6d565b61100f81612b7e565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600e546001600160a01b031633146110c45760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610a6d565b6001600160a01b03831661112b5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610a6d565b600e80546001600160a01b038581166001600160a01b03199283168117909355600f80549186169190921681179091556010839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156111f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121a9190613cde565b6020015161123a5760405162461bcd60e51b8152600401610a6d90613d63565b600254156112965760405162461bcd60e51b8152602060048201526024808201527f455243323054656d706c6174653a20746f6b656e7320616c7265616479206d696044820152631b9d195960e21b6064820152608401610a6d565b6112b9826000815181106112ac576112ac613e1a565b6020026020010151612503565b62250490846003815181106112d0576112d0613e1a565b6020026020010151116113375760405162461bcd60e51b815260206004820152602960248201527f455243323054656d706c6174653a206d696e696d756d20626c6f636b73206e6f6044820152681d081c995858da195960ba1b6064820152608401610a6d565b60006040518060400160405280306001600160a01b03166001600160a01b031681526020018460018151811061136f5761136f613e1a565b60209081029190910101516001600160a01b0390811690915260135460405163ee3bc63560e01b8152929350169063ee3bc635906113b7908490899089908990600401613ea4565b6020604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190613dfd565b91507fd02da1bec30f7f750aa0a131745dfb9ce96767c45a192dc26409f5d690e0b967828460008151811061143157611431613e1a565b60200260200101518560018151811061144c5761144c613e1a565b6020026020010151604051611481939291906001600160a01b0393841681529183166020830152909116604082015260600190565b60405180910390a1509392505050565b600061149d8333610893565b9050818110156114fb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610a6d565b61150883338484036123df565b6115128383612981565b505050565b600c546001600160a01b03163314610efb5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610a6d565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190613cde565b602001516116005760405162461bcd60e51b8152600401610a6d90613d63565b600260075414156116235760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051638244937560e01b81526001600160a01b039091169063824493759061165c90879087908790600401613f0f565b6020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190613f4f565b90506000826004815181106116b6576116b6613e1a565b602002602001015111156116cd576116cd84612503565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061170257611702613e1a565b602002602001015160405161172a9291909182526001600160a01b0316602082015260400190565b60405180910390a160016007559392505050565b60606009805461094690613ca3565b600c5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af115801561179a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117be9190613cde565b6020015192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190613cde565b602001516118565760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612503565b600260075414156118825760405162461bcd60e51b8152600401610a6d90613d98565b600260075533600090815260208190526040812054670de0b6b3a764000091908211156118ff5760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610a6d565b600e5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a3600060105411801561197a5750600f546001600160a01b031615155b80156119905750600e546001600160a01b031615155b15611abb57601054600f546119b4916001600160a01b039091169033903090612ba0565b6010546119c2906064612c0b565b600e546010549192506119f8916001600160a01b03909116906119e59084612c17565b600f546001600160a01b03169190612c23565b600f54600e546010546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b490611a3d9085612c17565b60405190815260200160405180910390a38015611abb57600b54600f54611a71916001600160a01b03918216911683612c23565b600f54600b546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c604051602001611b0f9493929190613f68565b60405160208183030381529060405280519060200120604051602001611b36929190613fae565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015611ba1573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b031614611c055760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610a6d565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051611c50959493929190613fd0565b60405180910390a360008a118015611c7057506001600160a01b038b1615155b8015611c8457506001600160a01b038c1615155b15611c9e57611c9e6001600160a01b038c16338e8d612ba0565b611caf611ca9612320565b86611da9565b611cfb5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f2073656e6420445420746f207075626c697368657200006044820152606401610a6d565b50506001600755505050505050505050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611d925760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a6d565b611d9f33858584036123df565b5060019392505050565b60006109d6338484612605565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cde565b60200151611e445760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612c53565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190613cde565b60200151611edb5760405162461bcd60e51b8152600401610a6d90613d63565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600c546301caf8fd60e31b83529092506001600160a01b031690630e57c7e890611f4790849087908790600401614009565b600060405180830381600087803b158015611f6157600080fd5b505af1158015611f75573d6000803e3d6000fd5b50505050505050565b611f916064670de0b6b3a764000061403f565b81565b600b54600090600160a01b900460ff161561200b5760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610a6d565b6120bf6120188b8d614061565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920191909152506120ba92508991508a90506140e9565b612d61565b9b9a5050505050505050505050565b438410156121115760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610a6d565b6011546001600160a01b038816600090815260126020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b91908761216483614151565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e001604051602081830303815290604052805190602001206040516020016121dd92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612248573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061227e5750886001600160a01b0316816001600160a01b0316145b6122ca5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610a6d565b6122d58989896123df565b505050505050505050565b6122e8612320565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c7d573d6000803e3d6000fd5b600d546000906001600160a01b03166123a557600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561237c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a09190613dfd565b905090565b50600d546001600160a01b031690565b600681815481106123c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0383166124415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b6001600160a01b0382166124a25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a6d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0381166000908152600560205260409020805460ff161561256d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610a6d565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166126695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a6d565b6001600160a01b0382166126cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a6d565b6001600160a01b038316600090815260208190526040902054818110156127435760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a6d565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061277a908490613de5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516127c691815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906125f99042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906125f99042904390918252602082015260400190565b6000610bdf8284613de5565b6001600160a01b0382166128f85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a6d565b806002600082825461290a9190613de5565b90915550506001600160a01b03821660009081526020819052604081208054839290612937908490613de5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166129e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a6d565b6001600160a01b03821660009081526020819052604090205481811015612a555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a6d565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612a8490849061416c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612b355760006005600060068481548110612af557612af5613e1a565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612b2d81614151565b915050612ad2565b50612b426006600061349d565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03808516602483015283166044820152606481018290526127cf9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613253565b6000610bdf828461403f565b6000610bdf828461416c565b6040516001600160a01b03831660248201526044810182905261151290849063a9059cbb60e01b90606401612bd4565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612ccd5760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610a6d565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016125f9565b60008084600081518110612d7757612d77613e1a565b60200260200101519050600085600181518110612d9657612d96613e1a565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612e185760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610a6d565b6001600160a01b038116612e945760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610a6d565b84600081518110612ea757612ea7613e1a565b602002602001015160001415612f0b5760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610a6d565b84600081518110612f1e57612f1e613e1a565b6020026020010151600a8190555087600081518110612f3f57612f3f613e1a565b602002602001015160089080519060200190612f5c9291906134bb565b5087600181518110612f7057612f70613e1a565b602002602001015160099080519060200190612f8d9291906134bb565b50600c80546001600160a01b0319166001600160a01b038416179055855186906002908110612fbe57612fbe613e1a565b6020908102919091010151601380546001600160a01b039283166001600160a01b0319909116179055600b80546001600160a81b03191691831691909117600160a01b179055865161301b9088906000906112ac576112ac613e1a565b60006001600160a01b03168760018151811061303957613039613e1a565b60200260200101516001600160a01b0316146130e3576130728760018151811061306557613065613e1a565b6020026020010151612b7e565b8660018151811061308557613085613e1a565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516130da929190918252602082015260400190565b60405180910390a35b866002815181106130f6576130f6613e1a565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061313757613137613e1a565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061317857613178613e1a565b602002602001015160108190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60086040516131bb9190614183565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206011555050600b54600160a01b900460ff16979650505050505050565b60006132a8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133259092919063ffffffff16565b80519091501561151257808060200190518101906132c6919061421f565b6115125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a6d565b6060613334848460008561333c565b949350505050565b60608247101561339d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a6d565b843b6133eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a6d565b600080866001600160a01b03168587604051613407919061423c565b60006040518083038185875af1925050503d8060008114613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5091509150613459828286613464565b979650505050505050565b60608315613473575081610bdf565b8251156134835782518084602001fd5b8160405162461bcd60e51b8152600401610a6d91906135de565b5080546000825590600052602060002090810190610c7d919061353f565b8280546134c790613ca3565b90600052602060002090601f0160209004810192826134e9576000855561352f565b82601f1061350257805160ff191683800117855561352f565b8280016001018555821561352f579182015b8281111561352f578251825591602001919060010190613514565b5061353b92915061353f565b5090565b5b8082111561353b5760008155600101613540565b6001600160a01b0381168114610c7d57600080fd5b60006020828403121561357b57600080fd5b8135610bdf81613554565b60005b838110156135a1578181015183820152602001613589565b838111156127cf5750506000910152565b600081518084526135ca816020860160208601613586565b601f01601f19169290920160200192915050565b602081526000610bdf60208301846135b2565b6000806040838503121561360457600080fd5b823561360f81613554565b946020939093013593505050565b8015158114610c7d57600080fd5b600080600080600060a0868803121561364357600080fd5b853561364e81613554565b94506020860135935060408601359250606086013561366c8161361d565b9150608086013561367c81613554565b809150509295509295909350565b60008060006060848603121561369f57600080fd5b83356136aa81613554565b925060208401356136ba81613554565b929592945050506040919091013590565b6000602082840312156136dd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613723576137236136e4565b604052919050565b600067ffffffffffffffff821115613745576137456136e4565b5060051b60200190565b600082601f83011261376057600080fd5b813560206137756137708361372b565b6136fa565b82815260059290921b8401810191818101908684111561379457600080fd5b8286015b848110156137af5780358352918301918301613798565b509695505050505050565b600082601f8301126137cb57600080fd5b813560206137db6137708361372b565b82815260059290921b840181019181810190868411156137fa57600080fd5b8286015b848110156137af57803561381181613554565b83529183019183016137fe565b60008060006060848603121561383357600080fd5b833567ffffffffffffffff8082111561384b57600080fd5b6138578783880161374f565b9450602086013591508082111561386d57600080fd5b6138798783880161374f565b9350604086013591508082111561388f57600080fd5b5061389c868287016137ba565b9150509250925092565b6000806000606084860312156138bb57600080fd5b83356138c681613554565b9250602084013567ffffffffffffffff808211156138e357600080fd5b6138ef878388016137ba565b9350604086013591508082111561390557600080fd5b5061389c8682870161374f565b803560ff8116811461392357600080fd5b919050565b600067ffffffffffffffff831115613942576139426136e4565b613955601f8401601f19166020016136fa565b905082815283838301111561396957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261399157600080fd5b610bdf83833560208501613928565b60008060008060008060008060006101208a8c0312156139bf57600080fd5b89356139ca81613554565b985060208a0135975060408a01356139e181613554565b965060608a01356139f181613554565b955060808a01359450613a0660a08b01613912565b935060c08a0135925060e08a013591506101008a013567ffffffffffffffff811115613a3157600080fd5b613a3d8c828d01613980565b9150509295985092959850929598565b60008060208385031215613a6057600080fd5b823567ffffffffffffffff80821115613a7857600080fd5b818501915085601f830112613a8c57600080fd5b813581811115613a9b57600080fd5b866020828501011115613aad57600080fd5b60209290920196919550909350505050565b60008083601f840112613ad157600080fd5b50813567ffffffffffffffff811115613ae957600080fd5b6020830191508360208260051b8501011115613b0457600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613b2a57600080fd5b8a3567ffffffffffffffff80821115613b4257600080fd5b613b4e8e838f01613abf565b909c509a5060208d0135915080821115613b6757600080fd5b613b738e838f01613abf565b909a50985060408d0135915080821115613b8c57600080fd5b613b988e838f01613abf565b909850965060608d0135915080821115613bb157600080fd5b613bbd8e838f01613abf565b909650945060808d0135915080821115613bd657600080fd5b50613be38d828e01613abf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613c1757600080fd5b8735613c2281613554565b96506020880135613c3281613554565b95506040880135945060608801359350613c4e60808901613912565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613c7d57600080fd5b8235613c8881613554565b91506020830135613c9881613554565b809150509250929050565b600181811c90821680613cb757607f821691505b60208210811415613cd857634e487b7160e01b600052602260045260246000fd5b50919050565b600060808284031215613cf057600080fd5b6040516080810181811067ffffffffffffffff82111715613d1357613d136136e4565b6040528251613d218161361d565b81526020830151613d318161361d565b60208201526040830151613d448161361d565b60408201526060830151613d578161361d565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613df857613df8613dcf565b500190565b600060208284031215613e0f57600080fd5b8151610bdf81613554565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015613e6057815187529582019590820190600101613e44565b509495945050505050565b600081518084526020808501945080840160005b83811015613e605781516001600160a01b031687529582019590820190600101613e7f565b60008186825b6002811015613ed25781516001600160a01b0316835260209283019290910190600101613eaa565b50505060a06040830152613ee960a0830186613e30565b8281036060840152613efb8186613e30565b905082810360808401526134598185613e6b565b6001600160a01b0384168152606060208201819052600090613f3390830185613e6b565b8281036040840152613f458185613e30565b9695505050505050565b600060208284031215613f6157600080fd5b5051919050565b60008551613f7a818460208a01613586565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b60008351613fc0818460208801613586565b9190910191825250602001919050565b85815260a060208201526000613fe960a08301876135b2565b60ff95909516604083015250606081019290925260809091015292915050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261405c57634e487b7160e01b600052601260045260246000fd5b500490565b600061406f6137708461372b565b80848252602080830192508560051b85013681111561408d57600080fd5b855b818110156140dd57803567ffffffffffffffff8111156140af5760008081fd5b870136601f8201126140c15760008081fd5b6140cf368235868401613928565b86525093820193820161408f565b50919695505050505050565b60006140f76137708461372b565b80848252602080830192508560051b85013681111561411557600080fd5b855b818110156140dd57803567ffffffffffffffff8111156141375760008081fd5b61414336828a01613980565b865250938201938201614117565b600060001982141561416557614165613dcf565b5060010190565b60008282101561417e5761417e613dcf565b500390565b600080835481600182811c91508083168061419f57607f831692505b60208084108214156141bf57634e487b7160e01b86526022600452602486fd5b8180156141d357600181146141e457614211565b60ff19861689528489019650614211565b60008a81526020902060005b868110156142095781548b8201529085019083016141f0565b505084890196505b509498975050505050505050565b60006020828403121561423157600080fd5b8151610bdf8161361d565b6000825161424e818460208701613586565b919091019291505056fea2646970667358221220d238578f5cc11933648d20be9ee5e6703e39313ad340c2b000bb26ac3b3e034564736f6c634300080a0033",deployedBytecode:"0x6080604052600436106102725760003560e01c80635d1ca6311161014e578063aa271e1a116100bb578063dd62ed3e11610077578063dd62ed3e14610878578063e086e5ec146108be578063e487c2e8146108c6578063ec342ad0146108db578063ef867ff4146108f7578063f887ea401461091757005b8063aa271e1a146107aa578063aa492ef9146107e3578063ab62f0e114610803578063b2263a5d14610823578063b3998be014610838578063d505accf1461085857005b806395d89b411161010a57806395d89b41146106f557806396fb3eaf1461070a578063983b2d561461072a5780639b4f44b61461074a578063a457c2d71461076a578063a9059cbb1461078a57005b80635d1ca6311461062957806370a082311461063d57806379cc6790146106735780637ecebe001461069357806382c03da5146106c05780638b96412b146106d557005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461057457806342966c68146105945780634f189cb2146105b457806357a3a31b146105c957806357ad5ff6146105e95780635bfe4da01461060957005b8063313ce567146104ac578063355274ea146104ce5780633644e515146104e3578063392e53cd146104f95780633950935114610518578063397b37431461053857005b806318160ddd1161023b57806318160ddd146103d9578063191c918a146103f857806323b872dd1461041857806325b00243146104385780633092afd51461045857806330adf81f1461047857005b80627ffb781461027457806301e88208146102ab57806306fdde03146102fb578063095ea7b31461031d578063160a79251461034d575b005b34801561028057600080fd5b50600c546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102b757600080fd5b506102e46102c6366004613569565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102a2565b34801561030757600080fd5b50610310610937565b6040516102a291906135de565b34801561032957600080fd5b5061033d6103383660046135f1565b6109c9565b60405190151581526020016102a2565b34801561035957600080fd5b506103ba610368366004613569565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102a2565b3480156103e557600080fd5b506002545b6040519081526020016102a2565b34801561040457600080fd5b5061027261041336600461362b565b6109df565b34801561042457600080fd5b5061033d61043336600461368a565b610b3a565b34801561044457600080fd5b50610272610453366004613569565b610be6565b34801561046457600080fd5b50610272610473366004613569565b610c80565b34801561048457600080fd5b506103ea7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104b857600080fd5b5060125b60405160ff90911681526020016102a2565b3480156104da57600080fd5b50600a546103ea565b3480156104ef57600080fd5b506103ea60115481565b34801561050557600080fd5b50600b54600160a01b900460ff1661033d565b34801561052457600080fd5b5061033d6105333660046135f1565b610d17565b34801561054457600080fd5b50600e54600f54601054604080516001600160a01b039485168152939092166020840152908201526060016102a2565b34801561058057600080fd5b5061027261058f3660046135f1565b610d53565b3480156105a057600080fd5b506102726105af3660046136cb565b610e24565b3480156105c057600080fd5b50610272610e2e565b3480156105d557600080fd5b506102726105e4366004613569565b610f15565b3480156105f557600080fd5b5061027261060436600461368a565b611057565b34801561061557600080fd5b5061028e61062436600461381e565b6111ab565b34801561063557600080fd5b5060016104bc565b34801561064957600080fd5b506103ea610658366004613569565b6001600160a01b031660009081526020819052604090205490565b34801561067f57600080fd5b5061027261068e3660046135f1565b611491565b34801561069f57600080fd5b506103ea6106ae366004613569565b60126020526000908152604090205481565b3480156106cc57600080fd5b50610272611517565b3480156106e157600080fd5b506103ea6106f03660046138a6565b611571565b34801561070157600080fd5b5061031061173e565b34801561071657600080fd5b5061033d610725366004613569565b61174d565b34801561073657600080fd5b50610272610745366004613569565b6117c8565b34801561075657600080fd5b506102726107653660046139a0565b61185f565b34801561077657600080fd5b5061033d6107853660046135f1565b611d10565b34801561079657600080fd5b5061033d6107a53660046135f1565b611da9565b3480156107b657600080fd5b5061033d6107c5366004613569565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107ef57600080fd5b506102726107fe366004613569565b611db6565b34801561080f57600080fd5b5061027261081e366004613a4d565b611e4d565b34801561082f57600080fd5b506103ea611f7e565b34801561084457600080fd5b5061033d610853366004613b0b565b611f94565b34801561086457600080fd5b50610272610873366004613bfc565b6120ce565b34801561088457600080fd5b506103ea610893366004613c6a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102726122e0565b3480156108d257600080fd5b5061028e612320565b3480156108e757600080fd5b506103ea670de0b6b3a764000081565b34801561090357600080fd5b5061028e6109123660046136cb565b6123b5565b34801561092357600080fd5b5060135461028e906001600160a01b031681565b60606008805461094690613ca3565b80601f016020809104026020016040519081016040528092919081815260200182805461097290613ca3565b80156109bf5780601f10610994576101008083540402835291602001916109bf565b820191906000526020600020905b8154815290600101906020018083116109a257829003601f168201915b5050505050905090565b60006109d63384846123df565b50600192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610a29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a4d9190613cde565b60200151610a765760405162461bcd60e51b8152600401610a6d90613d63565b60405180910390fd5b60026007541415610a995760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051636b14d00560e11b81526001600160a01b038781166004830152306024830152604482018790526064820186905233608483015283811660a48301529091169063d629a00a9060c401600060405180830381600087803b158015610b0757600080fd5b505af1158015610b1b573d6000803e3d6000fd5b505050508115610b2e57610b2e85612503565b50506001600755505050565b6000610b47848484612605565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610bcc5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610a6d565b610bd985338584036123df565b60019150505b9392505050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610c30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c549190613cde565b60200151610c745760405162461bcd60e51b8152600401610a6d90613d63565b610c7d816127d5565b50565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610cca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cee9190613cde565b60200151610d0e5760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612836565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916109d6918590610d4e908690613de5565b6123df565b3360009081526005602052604090205460ff16610db25760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610a6d565b600a54610dc882610dc260025490565b90612896565b1115610e165760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610a6d565b610e2082826128a2565b5050565b610c7d3382612981565b600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610e77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e9b9190613dfd565b6001600160a01b0316336001600160a01b031614610efb5760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610a6d565b610f03612acf565b600d80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff1680610fa65750600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610f7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa19190613cde565b602001515b6110065760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610a6d565b61100f81612b7e565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600e546001600160a01b031633146110c45760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610a6d565b6001600160a01b03831661112b5760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610a6d565b600e80546001600160a01b038581166001600160a01b03199283168117909355600f80549186169190921681179091556010839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156111f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061121a9190613cde565b6020015161123a5760405162461bcd60e51b8152600401610a6d90613d63565b600254156112965760405162461bcd60e51b8152602060048201526024808201527f455243323054656d706c6174653a20746f6b656e7320616c7265616479206d696044820152631b9d195960e21b6064820152608401610a6d565b6112b9826000815181106112ac576112ac613e1a565b6020026020010151612503565b62250490846003815181106112d0576112d0613e1a565b6020026020010151116113375760405162461bcd60e51b815260206004820152602960248201527f455243323054656d706c6174653a206d696e696d756d20626c6f636b73206e6f6044820152681d081c995858da195960ba1b6064820152608401610a6d565b60006040518060400160405280306001600160a01b03166001600160a01b031681526020018460018151811061136f5761136f613e1a565b60209081029190910101516001600160a01b0390811690915260135460405163ee3bc63560e01b8152929350169063ee3bc635906113b7908490899089908990600401613ea4565b6020604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190613dfd565b91507fd02da1bec30f7f750aa0a131745dfb9ce96767c45a192dc26409f5d690e0b967828460008151811061143157611431613e1a565b60200260200101518560018151811061144c5761144c613e1a565b6020026020010151604051611481939291906001600160a01b0393841681529183166020830152909116604082015260600190565b60405180910390a1509392505050565b600061149d8333610893565b9050818110156114fb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610a6d565b61150883338484036123df565b6115128383612981565b505050565b600c546001600160a01b03163314610efb5760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610a6d565b600c5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156115bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115e09190613cde565b602001516116005760405162461bcd60e51b8152600401610a6d90613d63565b600260075414156116235760405162461bcd60e51b8152600401610a6d90613d98565b6002600755601354604051638244937560e01b81526001600160a01b039091169063824493759061165c90879087908790600401613f0f565b6020604051808303816000875af115801561167b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061169f9190613f4f565b90506000826004815181106116b6576116b6613e1a565b602002602001015111156116cd576116cd84612503565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061170257611702613e1a565b602002602001015160405161172a9291909182526001600160a01b0316602082015260400190565b60405180910390a160016007559392505050565b60606009805461094690613ca3565b600c5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af115801561179a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117be9190613cde565b6020015192915050565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611812573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118369190613cde565b602001516118565760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612503565b600260075414156118825760405162461bcd60e51b8152600401610a6d90613d98565b600260075533600090815260208190526040812054670de0b6b3a764000091908211156118ff5760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610a6d565b600e5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a3600060105411801561197a5750600f546001600160a01b031615155b80156119905750600e546001600160a01b031615155b15611abb57601054600f546119b4916001600160a01b039091169033903090612ba0565b6010546119c2906064612c0b565b600e546010549192506119f8916001600160a01b03909116906119e59084612c17565b600f546001600160a01b03169190612c23565b600f54600e546010546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b490611a3d9085612c17565b60405190815260200160405180910390a38015611abb57600b54600f54611a71916001600160a01b03918216911683612c23565b600f54600b546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c604051602001611b0f9493929190613f68565b60405160208183030381529060405280519060200120604051602001611b36929190613fae565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015611ba1573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b031614611c055760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610a6d565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051611c50959493929190613fd0565b60405180910390a360008a118015611c7057506001600160a01b038b1615155b8015611c8457506001600160a01b038c1615155b15611c9e57611c9e6001600160a01b038c16338e8d612ba0565b611caf611ca9612320565b86611da9565b611cfb5760405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f2073656e6420445420746f207075626c697368657200006044820152606401610a6d565b50506001600755505050505050505050505050565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015611d925760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610a6d565b611d9f33858584036123df565b5060019392505050565b60006109d6338484612605565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e249190613cde565b60200151611e445760405162461bcd60e51b8152600401610a6d90613d63565b610c7d81612c53565b600c5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611e97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ebb9190613cde565b60200151611edb5760405162461bcd60e51b8152600401610a6d90613d63565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600c546301caf8fd60e31b83529092506001600160a01b031690630e57c7e890611f4790849087908790600401614009565b600060405180830381600087803b158015611f6157600080fd5b505af1158015611f75573d6000803e3d6000fd5b50505050505050565b611f916064670de0b6b3a764000061403f565b81565b600b54600090600160a01b900460ff161561200b5760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610a6d565b6120bf6120188b8d614061565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b9182918501908490808284376000920191909152506120ba92508991508a90506140e9565b612d61565b9b9a5050505050505050505050565b438410156121115760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610a6d565b6011546001600160a01b038816600090815260126020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b91908761216483614151565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e001604051602081830303815290604052805190602001206040516020016121dd92919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612248573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381161580159061227e5750886001600160a01b0316816001600160a01b0316145b6122ca5760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610a6d565b6122d58989896123df565b505050505050505050565b6122e8612320565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610c7d573d6000803e3d6000fd5b600d546000906001600160a01b03166123a557600c546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa15801561237c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123a09190613dfd565b905090565b50600d546001600160a01b031690565b600681815481106123c557600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b0383166124415760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610a6d565b6001600160a01b0382166124a25760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610a6d565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0381166000908152600560205260409020805460ff161561256d5760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610a6d565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166126695760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610a6d565b6001600160a01b0382166126cb5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610a6d565b6001600160a01b038316600090815260208190526040902054818110156127435760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610a6d565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061277a908490613de5565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516127c691815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906125f99042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906125f99042904390918252602082015260400190565b6000610bdf8284613de5565b6001600160a01b0382166128f85760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610a6d565b806002600082825461290a9190613de5565b90915550506001600160a01b03821660009081526020819052604081208054839290612937908490613de5565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0382166129e15760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610a6d565b6001600160a01b03821660009081526020819052604090205481811015612a555760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610a6d565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612a8490849061416c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612b355760006005600060068481548110612af557612af5613e1a565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612b2d81614151565b915050612ad2565b50612b426006600061349d565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6040516001600160a01b03808516602483015283166044820152606481018290526127cf9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613253565b6000610bdf828461403f565b6000610bdf828461416c565b6040516001600160a01b03831660248201526044810182905261151290849063a9059cbb60e01b90606401612bd4565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612ccd5760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610a6d565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a791016125f9565b60008084600081518110612d7757612d77613e1a565b60200260200101519050600085600181518110612d9657612d96613e1a565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612e185760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610a6d565b6001600160a01b038116612e945760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610a6d565b84600081518110612ea757612ea7613e1a565b602002602001015160001415612f0b5760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610a6d565b84600081518110612f1e57612f1e613e1a565b6020026020010151600a8190555087600081518110612f3f57612f3f613e1a565b602002602001015160089080519060200190612f5c9291906134bb565b5087600181518110612f7057612f70613e1a565b602002602001015160099080519060200190612f8d9291906134bb565b50600c80546001600160a01b0319166001600160a01b038416179055855186906002908110612fbe57612fbe613e1a565b6020908102919091010151601380546001600160a01b039283166001600160a01b0319909116179055600b80546001600160a81b03191691831691909117600160a01b179055865161301b9088906000906112ac576112ac613e1a565b60006001600160a01b03168760018151811061303957613039613e1a565b60200260200101516001600160a01b0316146130e3576130728760018151811061306557613065613e1a565b6020026020010151612b7e565b8660018151811061308557613085613e1a565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516130da929190918252602082015260400190565b60405180910390a35b866002815181106130f6576130f6613e1a565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061313757613137613e1a565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061317857613178613e1a565b602002602001015160108190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60086040516131bb9190614183565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206011555050600b54600160a01b900460ff16979650505050505050565b60006132a8826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166133259092919063ffffffff16565b80519091501561151257808060200190518101906132c6919061421f565b6115125760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a6d565b6060613334848460008561333c565b949350505050565b60608247101561339d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a6d565b843b6133eb5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a6d565b600080866001600160a01b03168587604051613407919061423c565b60006040518083038185875af1925050503d8060008114613444576040519150601f19603f3d011682016040523d82523d6000602084013e613449565b606091505b5091509150613459828286613464565b979650505050505050565b60608315613473575081610bdf565b8251156134835782518084602001fd5b8160405162461bcd60e51b8152600401610a6d91906135de565b5080546000825590600052602060002090810190610c7d919061353f565b8280546134c790613ca3565b90600052602060002090601f0160209004810192826134e9576000855561352f565b82601f1061350257805160ff191683800117855561352f565b8280016001018555821561352f579182015b8281111561352f578251825591602001919060010190613514565b5061353b92915061353f565b5090565b5b8082111561353b5760008155600101613540565b6001600160a01b0381168114610c7d57600080fd5b60006020828403121561357b57600080fd5b8135610bdf81613554565b60005b838110156135a1578181015183820152602001613589565b838111156127cf5750506000910152565b600081518084526135ca816020860160208601613586565b601f01601f19169290920160200192915050565b602081526000610bdf60208301846135b2565b6000806040838503121561360457600080fd5b823561360f81613554565b946020939093013593505050565b8015158114610c7d57600080fd5b600080600080600060a0868803121561364357600080fd5b853561364e81613554565b94506020860135935060408601359250606086013561366c8161361d565b9150608086013561367c81613554565b809150509295509295909350565b60008060006060848603121561369f57600080fd5b83356136aa81613554565b925060208401356136ba81613554565b929592945050506040919091013590565b6000602082840312156136dd57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613723576137236136e4565b604052919050565b600067ffffffffffffffff821115613745576137456136e4565b5060051b60200190565b600082601f83011261376057600080fd5b813560206137756137708361372b565b6136fa565b82815260059290921b8401810191818101908684111561379457600080fd5b8286015b848110156137af5780358352918301918301613798565b509695505050505050565b600082601f8301126137cb57600080fd5b813560206137db6137708361372b565b82815260059290921b840181019181810190868411156137fa57600080fd5b8286015b848110156137af57803561381181613554565b83529183019183016137fe565b60008060006060848603121561383357600080fd5b833567ffffffffffffffff8082111561384b57600080fd5b6138578783880161374f565b9450602086013591508082111561386d57600080fd5b6138798783880161374f565b9350604086013591508082111561388f57600080fd5b5061389c868287016137ba565b9150509250925092565b6000806000606084860312156138bb57600080fd5b83356138c681613554565b9250602084013567ffffffffffffffff808211156138e357600080fd5b6138ef878388016137ba565b9350604086013591508082111561390557600080fd5b5061389c8682870161374f565b803560ff8116811461392357600080fd5b919050565b600067ffffffffffffffff831115613942576139426136e4565b613955601f8401601f19166020016136fa565b905082815283838301111561396957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261399157600080fd5b610bdf83833560208501613928565b60008060008060008060008060006101208a8c0312156139bf57600080fd5b89356139ca81613554565b985060208a0135975060408a01356139e181613554565b965060608a01356139f181613554565b955060808a01359450613a0660a08b01613912565b935060c08a0135925060e08a013591506101008a013567ffffffffffffffff811115613a3157600080fd5b613a3d8c828d01613980565b9150509295985092959850929598565b60008060208385031215613a6057600080fd5b823567ffffffffffffffff80821115613a7857600080fd5b818501915085601f830112613a8c57600080fd5b813581811115613a9b57600080fd5b866020828501011115613aad57600080fd5b60209290920196919550909350505050565b60008083601f840112613ad157600080fd5b50813567ffffffffffffffff811115613ae957600080fd5b6020830191508360208260051b8501011115613b0457600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613b2a57600080fd5b8a3567ffffffffffffffff80821115613b4257600080fd5b613b4e8e838f01613abf565b909c509a5060208d0135915080821115613b6757600080fd5b613b738e838f01613abf565b909a50985060408d0135915080821115613b8c57600080fd5b613b988e838f01613abf565b909850965060608d0135915080821115613bb157600080fd5b613bbd8e838f01613abf565b909650945060808d0135915080821115613bd657600080fd5b50613be38d828e01613abf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613c1757600080fd5b8735613c2281613554565b96506020880135613c3281613554565b95506040880135945060608801359350613c4e60808901613912565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613c7d57600080fd5b8235613c8881613554565b91506020830135613c9881613554565b809150509250929050565b600181811c90821680613cb757607f821691505b60208210811415613cd857634e487b7160e01b600052602260045260246000fd5b50919050565b600060808284031215613cf057600080fd5b6040516080810181811067ffffffffffffffff82111715613d1357613d136136e4565b6040528251613d218161361d565b81526020830151613d318161361d565b60208201526040830151613d448161361d565b60408201526060830151613d578161361d565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613df857613df8613dcf565b500190565b600060208284031215613e0f57600080fd5b8151610bdf81613554565b634e487b7160e01b600052603260045260246000fd5b600081518084526020808501945080840160005b83811015613e6057815187529582019590820190600101613e44565b509495945050505050565b600081518084526020808501945080840160005b83811015613e605781516001600160a01b031687529582019590820190600101613e7f565b60008186825b6002811015613ed25781516001600160a01b0316835260209283019290910190600101613eaa565b50505060a06040830152613ee960a0830186613e30565b8281036060840152613efb8186613e30565b905082810360808401526134598185613e6b565b6001600160a01b0384168152606060208201819052600090613f3390830185613e6b565b8281036040840152613f458185613e30565b9695505050505050565b600060208284031215613f6157600080fd5b5051919050565b60008551613f7a818460208a01613586565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b60008351613fc0818460208801613586565b9190910191825250602001919050565b85815260a060208201526000613fe960a08301876135b2565b60ff95909516604083015250606081019290925260809091015292915050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261405c57634e487b7160e01b600052601260045260246000fd5b500490565b600061406f6137708461372b565b80848252602080830192508560051b85013681111561408d57600080fd5b855b818110156140dd57803567ffffffffffffffff8111156140af5760008081fd5b870136601f8201126140c15760008081fd5b6140cf368235868401613928565b86525093820193820161408f565b50919695505050505050565b60006140f76137708461372b565b80848252602080830192508560051b85013681111561411557600080fd5b855b818110156140dd57803567ffffffffffffffff8111156141375760008081fd5b61414336828a01613980565b865250938201938201614117565b600060001982141561416557614165613dcf565b5060010190565b60008282101561417e5761417e613dcf565b500390565b600080835481600182811c91508083168061419f57607f831692505b60208084108214156141bf57634e487b7160e01b86526022600452602486fd5b8180156141d357600181146141e457614211565b60ff19861689528489019650614211565b60008a81526020902060005b868110156142095781548b8201529085019083016141f0565b505084890196505b509498975050505050505050565b60006020828403121561423157600080fd5b8151610bdf8161361d565b6000825161424e818460208701613586565b919091019291505056fea2646970667358221220d238578f5cc11933648d20be9ee5e6703e39313ad340c2b000bb26ac3b3e034564736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};const D="115792089237316195423570985008687907853269984665640564039457584007913129639934";class G{constructor(e,a,t=null){this.poolAbi=void 0,this.web3=void 0,this.GASLIMIT_DEFAULT=1e6,this.logger=void 0,this.poolAbi=t||O,this.web3=e,this.logger=a}async estApprove(e,a,t,b,n){const d=n||new this.web3.eth.Contract(P.abi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.approve(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f,c.error("estimate gas failed for approve!",e)}return s}async allowance(e,a,t){const b=new this.web3.eth.Contract(P.abi,e),n=await b.methods.allowance(a,t).call();return await this.unitsToAmount(e,n)}async approve(e,a,t,b,n=!1){const d=new this.web3.eth.Contract([{constant:!1,inputs:[{name:"_spender",type:"address"},{name:"_value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],a);if(!n){const n=await this.allowance(a,e,t);if(new f(n).greaterThanOrEqualTo(new f(b)))return n}let s=null;const i=await this.amountToUnits(a,b),c=await this.estApprove(e,a,t,i);try{s=await d.methods.approve(t,i).send({from:e,gas:c+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERRPR: Failed to approve spender to spend tokens : ${e.message}`)}return s}async sharesBalance(e,a){let t=null;try{const b=new this.web3.eth.Contract(this.poolAbi,a),n=await b.methods.balanceOf(e).call();t=this.web3.utils.fromWei(n)}catch(e){this.logger.error(`ERROR: Failed to get shares of pool : ${e.message}`)}return t}async estSetSwapFee(e,a,t,b){const n=b||new this.web3.eth.Contract(P.abi,a),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setSwapFee(t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setSwapFee(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,a,{from:e});let n=null;const d=await this.estSetSwapFee(e,a,t);try{n=await b.methods.setSwapFee(this.web3.utils.toWei(t)).send({from:e,gas:d,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to set pool swap fee: ${e.message}`)}return n}async getNumTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getNumTokens().call()}catch(e){this.logger.error(`ERROR: Failed to get number of tokens: ${e.message}`)}return t}async getPoolSharesTotalSupply(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.totalSupply().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get total supply of pool shares: ${e.message}`)}return t}async getCurrentTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getCurrentTokens().call()}catch(e){this.logger.error(`ERROR: Failed to get tokens composing this pool: ${e.message}`)}return t}async getFinalTokens(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getFinalTokens().call()}catch(e){this.logger.error("ERROR: Failed to get the final tokens composing this pool")}return t}async getController(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getController().call()}catch(e){this.logger.error(`ERROR: Failed to get pool controller address: ${e.message}`)}return t}async getBasetoken(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getBaseTokenAddress().call()}catch(e){this.logger.error(`ERROR: Failed to get basetoken address: ${e.message}`)}return t}async getDatatoken(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.getDataTokenAddress().call()}catch(e){this.logger.error(`ERROR: Failed to get datatoken address: ${e.message}`)}return t}async getMarketFeeCollector(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods._publishMarketCollector().call()}catch(e){this.logger.error(`ERROR: Failed to get marketFeeCollector address: ${e.message}`)}return t}async getOPFCollector(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods._opfCollector().call()}catch(e){this.logger.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return t}async isBound(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{b=await t.methods.isBound(a).call()}catch(e){this.logger.error(`ERROR: Failed to check whether a token bounded to a pool. ${e.message}`)}return b}async getReserve(e,a){let t=null;try{const b=new this.web3.eth.Contract(this.poolAbi,e),n=await b.methods.getBalance(a).call();t=await this.unitsToAmount(a,n)}catch(e){this.logger.error(`ERROR: Failed to get how many tokens are in the pool: ${e.message}`)}return t.toString()}async isFinalized(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{t=await a.methods.isFinalized().call()}catch(e){this.logger.error(`ERROR: Failed to check whether pool is finalized: ${e.message}`)}return t}async getSwapFee(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.getSwapFee().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get pool fee: ${e.message}`)}return t}async getNormalizedWeight(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.getNormalizedWeight(a).call();b=this.web3.utils.fromWei(e)}catch(e){this.logger.error(`ERROR: Failed to get normalized weight of a token: ${e.message}`)}return b}async getDenormalizedWeight(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.getDenormalizedWeight(a).call();b=this.web3.utils.fromWei(e)}catch(e){this.logger.error("ERROR: Failed to get denormalized weight of a token in pool")}return b}async getTotalDenormalizedWeight(e){const a=new this.web3.eth.Contract(this.poolAbi,e);let t=null;try{const e=await a.methods.getTotalDenormalizedWeight().call();t=this.web3.utils.fromWei(e)}catch(e){this.logger.error("ERROR: Failed to get total denormalized weight in pool")}return t}async getMarketFees(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.publishMarketFees(a).call();b=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to get market fees for a token: ${e.message}`)}return b}async getCurrentMarketFees(e){const a=new this.web3.eth.Contract(this.poolAbi,e);try{return await a.methods.getCurrentOPFFees().call()}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}}async getCurrentOPFFees(e){const a=new this.web3.eth.Contract(this.poolAbi,e);try{return await a.methods.getCurrentOPFFees().call()}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}}async getCommunityFees(e,a){const t=new this.web3.eth.Contract(this.poolAbi,e);let b=null;try{const e=await t.methods.communityFees(a).call();b=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to get community fees for a token: ${e.message}`)}return b}async estCollectOPF(e,a,t){const b=t||new this.web3.eth.Contract(this.poolAbi,a),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectOPF().estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectOPF(e,a){const t=new this.web3.eth.Contract(this.poolAbi,a);let b=null;const n=await this.estCollectOPF(e,a);try{b=await t.methods.collectOPF().send({from:e,gas:n+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return b}async estCollectMarketFee(e,a,t){const b=t||new this.web3.eth.Contract(this.poolAbi,a),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee().estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectMarketFee(e,a){if(await this.getMarketFeeCollector(a)!==e)throw new Error("Caller is not MarketFeeCollector");const t=new this.web3.eth.Contract(this.poolAbi,a);let b=null;const n=await this.estCollectMarketFee(e,a);try{b=await t.methods.collectMarketFee().send({from:e,gas:n+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return b}async estUpdateMarketFeeCollector(e,a,t,b){const n=b||new this.web3.eth.Contract(this.poolAbi,a),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFeeCollector(t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFeeCollector(e,a,t){if(await this.getMarketFeeCollector(a)!==e)throw new Error("Caller is not MarketFeeCollector");const b=new this.web3.eth.Contract(this.poolAbi,a);let n=null;const d=await this.estUpdateMarketFeeCollector(e,a,t);try{n=await b.methods.updateMarketFeeCollector(t).send({from:e,gas:d+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return n}async amountToUnits(a,t){try{const b=new this.web3.eth.Contract(P.abi,a);let n=await b.methods.decimals().call();"0"===n&&(n=18);const d=new e(parseInt(t)*10**n);return e.config({EXPONENTIAL_AT:50}),d.toString()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}}async unitsToAmount(a,t){try{const b=new this.web3.eth.Contract(P.abi,a);let n=await b.methods.decimals().call();return"0"===n&&(n=18),new e(parseInt(t)/10**n).toString()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}}async estSwapExactAmountIn(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D,s=this.GASLIMIT_DEFAULT;let i;try{i=await d.methods.swapExactAmountIn([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.tokenAmountIn,b.minAmountOut,f,this.web3.utils.toWei(b.swapMarketFee)]).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async swapExactAmountIn(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a);b.tokenAmountIn=await this.amountToUnits(t.tokenIn,b.tokenAmountIn),b.minAmountOut=await this.amountToUnits(t.tokenOut,b.minAmountOut);let d=null;const f=await this.estSwapExactAmountIn(e,a,t,b),s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;try{d=await n.methods.swapExactAmountIn([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.tokenAmountIn,b.minAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount in : ${e.message}`)}return d}async estSwapExactAmountOut(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT,s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;let i;try{i=await d.methods.swapExactAmountOut([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.maxAmountIn,b.tokenAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){i=f}return i}async swapExactAmountOut(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a);let d=null;b.maxAmountIn=await this.amountToUnits(t.tokenIn,b.maxAmountIn),b.tokenAmountOut=await this.amountToUnits(t.tokenOut,b.tokenAmountOut);const f=await this.estSwapExactAmountOut(e,a,t,b),s=b.maxPrice?this.web3.utils.toWei(b.maxPrice):D;try{d=await n.methods.swapExactAmountOut([t.tokenIn,t.tokenOut,t.marketFeeAddress],[b.maxAmountIn,b.tokenAmountOut,s,this.web3.utils.toWei(b.swapMarketFee)]).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to swap exact amount out: ${e.message}`)}return d}async estJoinPool(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.joinPool(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async joinPool(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a),d=[],f=await this.getFinalTokens(a);for(let e=0;e<2;e++){const a=await this.amountToUnits(f[e],b[e]);d.push(a)}let s=null;const i=await this.estJoinPool(e,a,this.web3.utils.toWei(t),d);try{s=await n.methods.joinPool(this.web3.utils.toWei(t),d).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to join pool: ${e.message}`)}return s}async estExitPool(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.poolAbi,a),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.exitPool(t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async exitPool(e,a,t,b){const n=new this.web3.eth.Contract(this.poolAbi,a),d=[],f=await this.getFinalTokens(a);for(let e=0;e<2;e++){const a=await this.amountToUnits(f[e],b[e]);d.push(a)}let s=null;const i=await this.estExitPool(e,a,this.web3.utils.toWei(t),d);try{s=await n.methods.exitPool(this.web3.utils.toWei(t),d).send({from:e,gas:i,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to exit pool: ${e.message}`)}return s}async estJoinswapExternAmountIn(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.joinswapExternAmountIn(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async joinswapExternAmountIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,b),i=await this.estJoinswapExternAmountIn(e,a,t,s,this.web3.utils.toWei(n));try{f=await d.methods.joinswapExternAmountIn(t,s,this.web3.utils.toWei(n)).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to pay tokens in order to join the pool: ${e.message}`)}return f}async estJoinswapPoolAmountOut(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.joinswapPoolAmountOut(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async joinswapPoolAmountOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,n),i=await this.estJoinswapPoolAmountOut(e,a,t,this.web3.utils.toWei(b),s);try{f=await d.methods.joinswapPoolAmountOut(t,this.web3.utils.toWei(b),s).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error("ERROR: Failed to join swap pool amount out")}return f}async estExitswapPoolAmountIn(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.exitswapPoolAmountIn(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async exitswapPoolAmountIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.amountToUnits(t,n),i=await this.estExitswapPoolAmountIn(e,a,t,this.web3.utils.toWei(b),s);try{f=await d.methods.exitswapPoolAmountIn(t,this.web3.utils.toWei(b),s).send({from:e,gas:i+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error(`ERROR: Failed to pay pool shares into the pool: ${e.message}`)}return f}async estExitswapExternAmountOut(e,a,t,b,n,d){const f=d||new this.web3.eth.Contract(this.poolAbi,a),s=this.GASLIMIT_DEFAULT;let i;try{i=await f.methods.exitswapExternAmountOut(t,b,n).estimateGas({from:e},(e,a)=>e?s:a)}catch(e){i=s}return i}async exitswapExternAmountOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=null;const s=await this.estExitswapExternAmountOut(e,a,t,this.web3.utils.toWei(b),this.web3.utils.toWei(n));try{f=await d.methods.exitswapExternAmountOut(t,this.web3.utils.toWei(b),this.web3.utils.toWei(n)).send({from:e,gas:s+1,gasPrice:await r(this.web3)})}catch(e){this.logger.error("ERROR: Failed to exitswapExternAmountOut")}return f}async getSpotPrice(a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,a);let f=18,s=18;const i=new this.web3.eth.Contract(P.abi,t),c=new this.web3.eth.Contract(P.abi,b);try{f=await i.methods.decimals().call()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}try{s=await c.methods.decimals().call()}catch(e){this.logger.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}let r,o=null;try{o=await d.methods.getSpotPrice(t,b,this.web3.utils.toWei(n)).call(),o=new e(o.toString())}catch(e){this.logger.error("ERROR: Failed to get spot price of swapping tokenIn to tokenOut")}return f>s?(r=f-s,o=new e(o/10**r),o/=10**s):(r=s-f,o=new e(o*10**(2*r)),o/=10**s),o.toString()}async getAmountInExactOut(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,e),f=await this.amountToUnits(t,b);let s=null;try{const e=await d.methods.getAmountInExactOut(a,t,f,this.web3.utils.toWei(n)).call();s=await this.unitsToAmount(a,e)}catch(e){this.logger.error("ERROR: Failed to calcInGivenOut")}return s}async getAmountOutExactIn(e,a,t,b,n){const d=new this.web3.eth.Contract(this.poolAbi,e),f=await this.amountToUnits(a,b);let s=null;try{const e=await d.methods.getAmountOutExactIn(a,t,f,this.web3.utils.toWei(n)).call();s=await this.unitsToAmount(t,e)}catch(e){this.logger.error("ERROR: Failed to calcOutGivenIn")}return s}async calcPoolOutGivenSingleIn(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcPoolOutSingleIn(a,await this.amountToUnits(a,t)).call();n=await this.unitsToAmount(e,d)}catch(e){this.logger.error(`ERROR: Failed to calculate PoolOutGivenSingleIn : ${e.message}`)}return n}async calcSingleInGivenPoolOut(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;const d=await this.amountToUnits(e,t);try{const e=await b.methods.calcSingleInPoolOut(a,d).call();n=await this.unitsToAmount(a,e)}catch(e){this.logger.error(`ERROR: Failed to calculate SingleInGivenPoolOut : ${e.message}`)}return n}async calcSingleOutGivenPoolIn(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcSingleOutPoolIn(a,await this.amountToUnits(e,t)).call();n=await this.unitsToAmount(a,d)}catch(e){this.logger.error(`ERROR: Failed to calculate SingleOutGivenPoolIn : ${e}`)}return n}async calcPoolInGivenSingleOut(e,a,t){const b=new this.web3.eth.Contract(this.poolAbi,e);let n=null;try{const d=await b.methods.calcPoolInSingleOut(a,await this.amountToUnits(a,t)).call();n=await this.unitsToAmount(e,d)}catch(e){this.logger.error(`ERROR: Failed to calculate PoolInGivenSingleOut : ${e.message}`)}return n}getSwapEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_SWAP"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}getJoinEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_JOIN"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}getExitEventSignature(){const e=this.poolAbi.find(function(e){if("LOG_EXIT"===e.name&&"event"===e.type)return e});return this.web3.eth.abi.encodeEventSignature(e)}}var U={_format:"hh-sol-artifact-1",contractName:"Dispenser",sourceName:"contracts/pools/dispenser/Dispenser.sol",abi:[{inputs:[{internalType:"address",name:"_router",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"}],name:"DispenserActivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatoken",type:"address"},{indexed:!0,internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"DispenserAllowedSwapperChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"maxTokens",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxBalance",type:"uint256"},{indexed:!1,internalType:"address",name:"allowedSwapper",type:"address"}],name:"DispenserCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"}],name:"DispenserDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatoken",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"OwnerWithdrawed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"userAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokensDispensed",type:"event"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"}],name:"activate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"},{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"allowedSwapper",type:"address"}],name:"create",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"datatokensList",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"deactivate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"},{internalType:"address",name:"destination",type:"address"}],name:"dispense",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"ownerWithdraw",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"},{internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"setAllowedSwapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"status",outputs:[{internalType:"bool",name:"active",type:"bool"},{internalType:"address",name:"owner",type:"address"},{internalType:"bool",name:"isMinter",type:"bool"},{internalType:"uint256",name:"maxTokens",type:"uint256"},{internalType:"uint256",name:"maxBalance",type:"uint256"},{internalType:"uint256",name:"balance",type:"uint256"},{internalType:"address",name:"allowedSwapper",type:"address"}],stateMutability:"view",type:"function"}],bytecode:"0x608060405234801561001057600080fd5b5060405161160938038061160983398101604081905261002f916100b3565b60016000556001600160a01b03811661008e5760405162461bcd60e51b815260206004820152601f60248201527f44697370656e7365723a2057726f6e6720526f75746572206164647265737300604482015260640160405180910390fd5b600180546001600160a01b0319166001600160a01b03929092169190911790556100e3565b6000602082840312156100c557600080fd5b81516001600160a01b03811681146100dc57600080fd5b9392505050565b611517806100f26000396000f3fe6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b604482015260640161024f565b6107246001600160a01b0387168587610fdf565b836001600160a01b0316866001600160a01b03167f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135438760405161076991815260200190565b60405180910390a35050600160005550505050565b6001546001600160a01b031633146107d15760405162461bcd60e51b81526020600482015260166024820152752234b9b832b739b2b91d1037b7363c903937baba32b960511b604482015260640161024f565b6001600160a01b0385166107f75760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03858116600090815260026020526040902054610100900416158061084457506001600160a01b0385811660009081526002602052604090205461010090048116908316145b6108905760405162461bcd60e51b815260206004820152601960248201527f44617461546f6b656e20616c7265616479206372656174656400000000000000604482015260640161024f565b6001600160a01b038581166000818152600260208181526040808420805489881661010081026001600160a81b031990921691909117600190811783558083018d90559482018b905560039182018054988a166001600160a01b0319998a16811790915582549586018355919095527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90930180549096168517909555845189815290810188905293840152917f7d0aa581e6eb87e15f58588ff20c39ff6622fc796ec9bb664df6ed3eb02442c99060600160405180910390a3806001600160a01b0316856001600160a01b03167fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca560405160405180910390a35050505050565b600381815481106109c157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116610a015760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610a6f5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f393f01061139648745ea000bb047bbe1785bd3a19d3a9c90f6747e1d2357d2b89190a250565b6001600160a01b038216610ade5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038281166000908152600260205260409020546101009004163314610b4c5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b0382811660008181526002602052604080822060030180546001600160a01b0319169486169485179055517fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca59190a35050565b60008080808080806001600160a01b038816610bd45760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b0388811660008181526002602081905260409182902080546001820154919092015492516370a0823160e01b815230600482015260ff83169c506101009092049094169950929650945089916370a0823190602401602060405180830381865afa158015610c4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c719190611402565b6040516355138f0d60e11b81523060048201529093506001600160a01b0382169063aa271e1a90602401602060405180830381865afa158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061141b565b6001600160a01b03998a16600090815260026020526040902060030154989a979990989597949650929490921692915050565b6001600160a01b038316610d355760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038381166000908152600260205260409020546101009004163314610d935760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6001600160a01b0383166000818152600260208190526040808320805460ff191660019081178255818101889055920185905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191684179055517fe9372084cb52c5392afee4b9d79d131e04b1e65676088d50a8f39fffb16a87459190a2505050565b60026000541415610e825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024f565b60026000556001600160a01b038116610ead5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610f0b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611402565b90508015610fd557610f946001600160a01b0384163383610fdf565b60405181815233906001600160a01b038516907f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9060200160405180910390a35b5050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611031908490611036565b505050565b600061108b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111089092919063ffffffff16565b80519091501561103157808060200190518101906110a9919061141b565b6110315760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161024f565b60606111178484600085611121565b90505b9392505050565b6060824710156111825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161024f565b843b6111d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024f565b600080866001600160a01b031685876040516111ec9190611492565b60006040518083038185875af1925050503d8060008114611229576040519150601f19603f3d011682016040523d82523d6000602084013e61122e565b606091505b509150915061123e828286611249565b979650505050505050565b6060831561125857508161111a565b8251156112685782518084602001fd5b8160405162461bcd60e51b815260040161024f91906114ae565b80356001600160a01b038116811461129957600080fd5b919050565b6000806000606084860312156112b357600080fd5b6112bc84611282565b9250602084013591506112d160408501611282565b90509250925092565b600080600080600060a086880312156112f257600080fd5b6112fb86611282565b9450602086013593506040860135925061131760608701611282565b915061132560808701611282565b90509295509295909350565b60006020828403121561134357600080fd5b5035919050565b60006020828403121561135c57600080fd5b61111a82611282565b6000806040838503121561137857600080fd5b61138183611282565b915061138f60208401611282565b90509250929050565b6000806000606084860312156113ad57600080fd5b6113b684611282565b95602085013595506040909401359392505050565b6020808252601e908201527f496e76616c696420746f6b656e20636f6e747261637420616464726573730000604082015260600190565b60006020828403121561141457600080fd5b5051919050565b60006020828403121561142d57600080fd5b8151801515811461111a57600080fd5b60008282101561145d57634e487b7160e01b600052601160045260246000fd5b500390565b60005b8381101561147d578181015183820152602001611465565b8381111561148c576000848401525b50505050565b600082516114a4818460208701611462565b9190910192915050565b60208152600082518060208401526114cd816040850160208701611462565b601f01601f1916919091016040019291505056fea2646970667358221220fb4b6a3a8a2f8ea9e99a8ff393a1aacd46b89c5c97ff6c190118e2b1d031179664736f6c634300080a0033",deployedBytecode:"0x6080604052600436106100865760003560e01c806345d6646b1161005957806345d6646b1461011d578063645b8b1b1461013d578063938d71d0146101a0578063f887ea40146101c0578063f9bfaa7d146101e057600080fd5b80631d746d831461008b57806324ce2917146100a05780633398086a146100c05780633ea053eb146100fd575b600080fd5b61009e61009936600461129e565b610200565b005b3480156100ac57600080fd5b5061009e6100bb3660046112da565b61077e565b3480156100cc57600080fd5b506100e06100db366004611331565b6109b1565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561010957600080fd5b5061009e61011836600461134a565b6109db565b34801561012957600080fd5b5061009e610138366004611365565b610ab8565b34801561014957600080fd5b5061015d61015836600461134a565b610ba6565b6040805197151588526001600160a01b039687166020890152941515948701949094526060860192909252608085015260a08401521660c082015260e0016100f4565b3480156101ac57600080fd5b5061009e6101bb366004611398565b610d0f565b3480156101cc57600080fd5b506001546100e0906001600160a01b031681565b3480156101ec57600080fd5b5061009e6101fb36600461134a565b610e2f565b600260005414156102585760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026000556001600160a01b0383166102835760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03831660009081526002602052604090205460ff166102e25760405162461bcd60e51b815260206004820152601460248201527344697370656e736572206e6f742061637469766560601b604482015260640161024f565b600082116103285760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a59081e995c9bc8185b5bdd5b9d606a1b604482015260640161024f565b6001600160a01b0383166000908152600260205260409020600101548211156103855760405162461bcd60e51b815260206004820152600f60248201526e082dadeeadce840e8dede40d0d2ced608b1b604482015260640161024f565b6001600160a01b038381166000908152600260205260409020600301541615610426576001600160a01b038381166000908152600260205260409020600301541633146104265760405162461bcd60e51b815260206004820152602960248201527f546869732061646472657373206973206e6f7420616c6c6f77656420746f2072604482015268195c5d595cdd08111560ba1b606482015260840161024f565b6040516370a0823160e01b81526001600160a01b03828116600483015284916000918316906370a0823190602401602060405180830381865afa158015610471573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104959190611402565b6001600160a01b0386166000908152600260208190526040909120015490915081106105035760405162461bcd60e51b815260206004820152601760248201527f43616c6c65722062616c616e636520746f6f2068696768000000000000000000604482015260640161024f565b6040516370a0823160e01b81523060048201526000906001600160a01b038416906370a0823190602401602060405180830381865afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611402565b905084811080156105e257506040516355138f0d60e11b81523060048201526001600160a01b0384169063aa271e1a90602401602060405180830381865afa1580156105be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105e2919061141b565b156106ca576001600160a01b0383166340c10f1930610601848961143d565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401600060405180830381600087803b15801561064757600080fd5b505af115801561065b573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526001600160a01b03861692506370a082319150602401602060405180830381865afa1580156106a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106c79190611402565b90505b848110156107105760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f75676820726573657276657360681b604482015260640161024f565b6107246001600160a01b0387168587610fdf565b836001600160a01b0316866001600160a01b03167f63e223ff524bd93d4cbff98ef34405b39f63ded87f5a8d85e39ccda966f135438760405161076991815260200190565b60405180910390a35050600160005550505050565b6001546001600160a01b031633146107d15760405162461bcd60e51b81526020600482015260166024820152752234b9b832b739b2b91d1037b7363c903937baba32b960511b604482015260640161024f565b6001600160a01b0385166107f75760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b03858116600090815260026020526040902054610100900416158061084457506001600160a01b0385811660009081526002602052604090205461010090048116908316145b6108905760405162461bcd60e51b815260206004820152601960248201527f44617461546f6b656e20616c7265616479206372656174656400000000000000604482015260640161024f565b6001600160a01b038581166000818152600260208181526040808420805489881661010081026001600160a81b031990921691909117600190811783558083018d90559482018b905560039182018054988a166001600160a01b0319998a16811790915582549586018355919095527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90930180549096168517909555845189815290810188905293840152917f7d0aa581e6eb87e15f58588ff20c39ff6622fc796ec9bb664df6ed3eb02442c99060600160405180910390a3806001600160a01b0316856001600160a01b03167fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca560405160405180910390a35050505050565b600381815481106109c157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b038116610a015760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610a6f5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b038116600081815260026020526040808220805460ff19169055517f393f01061139648745ea000bb047bbe1785bd3a19d3a9c90f6747e1d2357d2b89190a250565b6001600160a01b038216610ade5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038281166000908152600260205260409020546101009004163314610b4c5760405162461bcd60e51b815260206004820152601b60248201527f44617461546f6b656e20616c7265616479206163746976617465640000000000604482015260640161024f565b6001600160a01b0382811660008181526002602052604080822060030180546001600160a01b0319169486169485179055517fac5c7317d52e88de62aff4ba6869a4882a4556557b761158934d2fd32a8b2ca59190a35050565b60008080808080806001600160a01b038816610bd45760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b0388811660008181526002602081905260409182902080546001820154919092015492516370a0823160e01b815230600482015260ff83169c506101009092049094169950929650945089916370a0823190602401602060405180830381865afa158015610c4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c719190611402565b6040516355138f0d60e11b81523060048201529093506001600160a01b0382169063aa271e1a90602401602060405180830381865afa158015610cb8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cdc919061141b565b6001600160a01b03998a16600090815260026020526040902060030154989a979990989597949650929490921692915050565b6001600160a01b038316610d355760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038381166000908152600260205260409020546101009004163314610d935760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6001600160a01b0383166000818152600260208190526040808320805460ff191660019081178255818101889055920185905560038054928301815583527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b90910180546001600160a01b03191684179055517fe9372084cb52c5392afee4b9d79d131e04b1e65676088d50a8f39fffb16a87459190a2505050565b60026000541415610e825760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161024f565b60026000556001600160a01b038116610ead5760405162461bcd60e51b815260040161024f906113cb565b6001600160a01b038181166000908152600260205260409020546101009004163314610f0b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015260640161024f565b6040516370a0823160e01b815230600482015281906000906001600160a01b038316906370a0823190602401602060405180830381865afa158015610f54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f789190611402565b90508015610fd557610f946001600160a01b0384163383610fdf565b60405181815233906001600160a01b038516907f03185212530fcdce6b38fbf62ed27ab29b1b047f59b76b17401388a70a95f41b9060200160405180910390a35b5050600160005550565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611031908490611036565b505050565b600061108b826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166111089092919063ffffffff16565b80519091501561103157808060200190518101906110a9919061141b565b6110315760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161024f565b60606111178484600085611121565b90505b9392505050565b6060824710156111825760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161024f565b843b6111d05760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161024f565b600080866001600160a01b031685876040516111ec9190611492565b60006040518083038185875af1925050503d8060008114611229576040519150601f19603f3d011682016040523d82523d6000602084013e61122e565b606091505b509150915061123e828286611249565b979650505050505050565b6060831561125857508161111a565b8251156112685782518084602001fd5b8160405162461bcd60e51b815260040161024f91906114ae565b80356001600160a01b038116811461129957600080fd5b919050565b6000806000606084860312156112b357600080fd5b6112bc84611282565b9250602084013591506112d160408501611282565b90509250925092565b600080600080600060a086880312156112f257600080fd5b6112fb86611282565b9450602086013593506040860135925061131760608701611282565b915061132560808701611282565b90509295509295909350565b60006020828403121561134357600080fd5b5035919050565b60006020828403121561135c57600080fd5b61111a82611282565b6000806040838503121561137857600080fd5b61138183611282565b915061138f60208401611282565b90509250929050565b6000806000606084860312156113ad57600080fd5b6113b684611282565b95602085013595506040909401359392505050565b6020808252601e908201527f496e76616c696420746f6b656e20636f6e747261637420616464726573730000604082015260600190565b60006020828403121561141457600080fd5b5051919050565b60006020828403121561142d57600080fd5b8151801515811461111a57600080fd5b60008282101561145d57634e487b7160e01b600052601160045260246000fd5b500390565b60005b8381101561147d578181015183820152602001611465565b8381111561148c576000848401525b50505050565b600082516114a4818460208701611462565b9190910192915050565b60208152600082518060208401526114cd816040850160208701611462565b601f01601f1916919091016040019291505056fea2646970667358221220fb4b6a3a8a2f8ea9e99a8ff393a1aacd46b89c5c97ff6c190118e2b1d031179664736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};class L{constructor(e,a=null,t=null,b){this.GASLIMIT_DEFAULT=1e6,this.web3=null,this.dispenserAddress=void 0,this.startBlock=void 0,this.dispenserAbi=void 0,this.dispenserContract=void 0,this.web3=e,this.dispenserAddress=a,this.startBlock=b||0,this.dispenserAbi=t||U.abi,e&&(this.dispenserContract=new this.web3.eth.Contract(this.dispenserAbi,this.dispenserAddress))}async status(e){try{const a=await this.dispenserContract.methods.status(e).call();return a.maxTokens=this.web3.utils.fromWei(a.maxTokens),a.maxBalance=this.web3.utils.fromWei(a.maxBalance),a.balance=this.web3.utils.fromWei(a.balance),a}catch(a){c.warn(`No dispenser available for data token: ${e}`)}return null}async estGasCreate(e,a,t,b,n){const d=this.GASLIMIT_DEFAULT;let f;try{f=await this.dispenserContract.methods.create(e,this.web3.utils.toWei(t),this.web3.utils.toWei(b),a,n).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async create(e,a,t,b,n){const d=await this.estGasCreate(e,a,t,b,n);return await this.dispenserContract.methods.create(e,this.web3.utils.toWei(t),this.web3.utils.toWei(b),a,n).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async estGasActivate(e,a,t,b){let n;const d=this.GASLIMIT_DEFAULT;try{n=await this.dispenserContract.methods.activate(e,this.web3.utils.toWei(a),this.web3.utils.toWei(t)).estimateGas({from:b},(e,a)=>e?d:a)}catch(e){n=d}return n}async activate(e,a,t,b){try{const n=await this.estGasActivate(e,a,t,b);return await this.dispenserContract.methods.activate(e,this.web3.utils.toWei(a),this.web3.utils.toWei(t)).send({from:b,gas:n+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasDeactivate(e,a){let t;const b=this.GASLIMIT_DEFAULT;try{t=await this.dispenserContract.methods.deactivate(e).estimateGas({from:a},(e,a)=>e?b:a)}catch(e){t=b}return t}async deactivate(e,a){try{const t=await this.estGasDeactivate(e,a);return await this.dispenserContract.methods.deactivate(e).send({from:a,gas:t+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasSetAllowedSwapper(e,a,t){let b;const n=this.GASLIMIT_DEFAULT;try{b=await this.dispenserContract.methods.setAllowedSwapper(e,t).estimateGas({from:a},(e,a)=>e?n:a)}catch(e){b=n}return b}async setAllowedSwapper(e,a,t){try{const b=await this.estGasSetAllowedSwapper(e,a,t);return await this.dispenserContract.methods.setAllowedSwapper(e,t).send({from:a,gas:b+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to activate dispenser: ${e.message}`)}return null}async estGasDispense(e,a,t="1",b){let n;const d=this.GASLIMIT_DEFAULT;try{n=await this.dispenserContract.methods.dispense(e,this.web3.utils.toWei(t),b).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){n=d}return n}async dispense(e,a,t="1",b){const n=await this.estGasDispense(e,a,t,b);try{return await this.dispenserContract.methods.dispense(e,this.web3.utils.toWei(t),b).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to dispense tokens: ${e.message}`)}return null}async estGasOwnerWithdraw(e,a){let t;const b=this.GASLIMIT_DEFAULT;try{t=await this.dispenserContract.methods.ownerWithdraw(e).estimateGas({from:a},(e,a)=>e?b:a)}catch(e){t=b}return t}async ownerWithdraw(e,a){const t=await this.estGasOwnerWithdraw(e,a);try{return await this.dispenserContract.methods.ownerWithdraw(e).send({from:a,gas:t+1,gasPrice:await r(this.web3)})}catch(e){c.error(`ERROR: Failed to withdraw tokens: ${e.message}`)}return null}async isDispensable(e,a,t,b="1"){const n=await this.status(e);return!(!n||!1===n.active||new f(await a.balance(e,t)).greaterThanOrEqualTo(n.maxBalance)||new f(String(b)).greaterThan(n.maxTokens)||!new f(n.balance).greaterThanOrEqualTo(b)&&!0!==n.isMinter)}}var _,N={_format:"hh-sol-artifact-1",contractName:"FixedRateExchange",sourceName:"contracts/pools/fixedRate/FixedRateExchange.sol",abi:[{inputs:[{internalType:"address",name:"_router",type:"address"},{internalType:"address",name:"_opfCollector",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"}],name:"ExchangeActivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"allowedSwapper",type:"address"}],name:"ExchangeAllowedSwapperChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"baseToken",type:"address"},{indexed:!0,internalType:"address",name:"dataToken",type:"address"},{indexed:!1,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"uint256",name:"fixedRate",type:"uint256"}],name:"ExchangeCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"}],name:"ExchangeDeactivated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"bool",name:"withMint",type:"bool"}],name:"ExchangeMintStateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"exchangeOwner",type:"address"},{indexed:!1,internalType:"uint256",name:"newRate",type:"uint256"}],name:"ExchangeRateChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"feeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"MarketFeeCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"feeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"feeAmount",type:"uint256"}],name:"OceanFeeCollected",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"by",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenSwappedAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"dataTokenSwappedAmount",type:"uint256"},{indexed:!1,internalType:"address",name:"tokenOutAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"oceanFeeAmount",type:"uint256"}],name:"Swapped",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"address",name:"token",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"}],name:"TokenCollected",type:"event"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"maxBaseTokenAmount",type:"uint256"}],name:"buyDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"}],name:"calcBaseInGivenOutDT",outputs:[{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenAmountBeforeFee",type:"uint256"},{internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"}],name:"calcBaseOutGivenInDT",outputs:[{internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{internalType:"uint256",name:"baseTokenAmountBeforeFee",type:"uint256"},{internalType:"uint256",name:"oceanFeeAmount",type:"uint256"},{internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectBT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"collectOceanFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"dataToken",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createWithDecimals",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"baseToken",type:"address"},{internalType:"address",name:"dataToken",type:"address"},{internalType:"address",name:"exchangeOwner",type:"address"}],name:"generateExchangeId",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getAllowedSwapper",outputs:[{internalType:"address",name:"allowedSwapper",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getBTSupply",outputs:[{internalType:"uint256",name:"supply",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getDTSupply",outputs:[{internalType:"uint256",name:"supply",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getExchange",outputs:[{internalType:"address",name:"exchangeOwner",type:"address"},{internalType:"address",name:"dataToken",type:"address"},{internalType:"uint256",name:"dtDecimals",type:"uint256"},{internalType:"address",name:"baseToken",type:"address"},{internalType:"uint256",name:"btDecimals",type:"uint256"},{internalType:"uint256",name:"fixedRate",type:"uint256"},{internalType:"bool",name:"active",type:"bool"},{internalType:"uint256",name:"dtSupply",type:"uint256"},{internalType:"uint256",name:"btSupply",type:"uint256"},{internalType:"uint256",name:"dtBalance",type:"uint256"},{internalType:"uint256",name:"btBalance",type:"uint256"},{internalType:"bool",name:"withMint",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"getExchanges",outputs:[{internalType:"bytes32[]",name:"",type:"bytes32[]"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getFeesInfo",outputs:[{internalType:"uint256",name:"marketFee",type:"uint256"},{internalType:"address",name:"marketFeeCollector",type:"address"},{internalType:"uint256",name:"opfFee",type:"uint256"},{internalType:"uint256",name:"marketFeeAvailable",type:"uint256"},{internalType:"uint256",name:"oceanFeeAvailable",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getNumberOfExchanges",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"basetokenAddress",type:"address"}],name:"getOPFFee",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"getRate",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"isActive",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"opfCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"dataTokenAmount",type:"uint256"},{internalType:"uint256",name:"minBaseTokenAmount",type:"uint256"}],name:"sellDT",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"address",name:"newAllowedSwapper",type:"address"}],name:"setAllowedSwapper",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"newRate",type:"uint256"}],name:"setRate",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],name:"toggleExchangeState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"bool",name:"withMint",type:"bool"}],name:"toggleMintState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"_newMarketFee",type:"uint256"}],name:"updateMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"address",name:"_newMarketCollector",type:"address"}],name:"updateMarketFeeCollector",outputs:[],stateMutability:"nonpayable",type:"function"}],bytecode:"0x60806040523480156200001157600080fd5b50604051620031de380380620031de833981016040819052620000349162000158565b60016000556001600160a01b038216620000a55760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a2057726f6e6720526f75746572206044820152666164647265737360c81b60648201526084015b60405180910390fd5b6001600160a01b038116620001095760405162461bcd60e51b8152602060048201526024808201527f46697865645261746545786368616e67653a2057726f6e67204f5046206164646044820152637265737360e01b60648201526084016200009c565b600180546001600160a01b039384166001600160a01b0319918216179091556002805492909316911617905562000190565b80516001600160a01b03811681146200015357600080fd5b919050565b600080604083850312156200016c57600080fd5b62000177836200013b565b915062000187602084016200013b565b90509250929050565b61303e80620001a06000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c8063825b5cd6116100f9578063b686bcaf11610097578063c99733a711610071578063c99733a714610576578063f532129e14610589578063f8154aee1461059c578063f887ea40146105af57600080fd5b8063b686bcaf1461053d578063c1f6572e14610550578063c66274ea1461056357600080fd5b806388823872116100d357806388823872146104eb578063a28f78f1146104fe578063b32b56f914610511578063b42414291461053557600080fd5b8063825b5cd6146103c5578063855058dd146103d857806385fcbc2f146104d857600080fd5b80635c36901c116101665780636e4c6269116101405780636e4c62691461035957806371dc14b21461036c57806379dd28361461039f5780637c82ebe9146103b257600080fd5b80635c36901c1461030057806360311e9514610333578063680819eb1461034657600080fd5b806324cb477e116101a257806324cb477e14610247578063450dccc31461025c5780634c87087d1461026f5780635acfedc7146102ed57600080fd5b8063012c3275146101c95780630b3b430d146101ef5780631e2e3a6b14610232575b600080fd5b6101dc6101d7366004612a19565b6105c2565b6040519081526020015b60405180910390f35b6102026101fd366004612aeb565b610d37565b604080519586526001600160a01b039094166020860152928401919091526060830152608082015260a0016101e6565b61023a610e41565b6040516101e69190612b04565b61025a610255366004612aeb565b610e99565b005b61025a61026a366004612aeb565b610f78565b61028261027d366004612aeb565b611084565b604080516001600160a01b039d8e1681529b8d1660208d01528b0199909952999096166060890152608088019490945260a0870192909252151560c086015260e0850152610100840152610120830152610140820192909252901515610160820152610180016101e6565b61025a6102fb366004612aeb565b6111ab565b61032361030e366004612aeb565b60009081526003602052604090205460ff1690565b60405190151581526020016101e6565b61025a610341366004612b48565b611266565b61025a610354366004612b74565b611308565b61025a610367366004612b96565b6113f5565b61037f61037a366004612b74565b6116f3565b6040805194855260208501939093529183015260608201526080016101e6565b61025a6103ad366004612bd3565b61185c565b61025a6103c0366004612b48565b6118ee565b61025a6103d3366004612b96565b611981565b6104c06103e6366004612aeb565b60009081526003602081815260409283902083516101e081018552815460ff808216151583526001600160a01b03610100928390048116958401959095526001840154851696830196909652600283015484166060830152938201546080820152600482015460a0820152600582015460c0820152600682015460e0820152600782015484820152600882015461012082015260098201548316610140820152600a820154610160820152600b820154610180820152600c9091015493841615156101a0820152919092049091166101c090910181905290565b6040516001600160a01b0390911681526020016101e6565b6101dc6104e6366004612aeb565b611d83565b61025a6104f9366004612b74565b611f0a565b6002546104c0906001600160a01b031681565b6101dc61051f366004612aeb565b6000908152600360208190526040909120015490565b6004546101dc565b61025a61054b366004612aeb565b611f81565b6101dc61055e366004612c03565b612032565b6101dc610571366004612aeb565b61207e565b61037f610584366004612b74565b612396565b61025a610597366004612aeb565b6124a1565b6101dc6105aa366004612c46565b61259d565b6001546104c0906001600160a01b031681565b6001546000906001600160a01b031633146106245760405162461bcd60e51b815260206004820152601e60248201527f46697865645261746545786368616e67653a206f6e6c7920726f75746572000060448201526064015b60405180910390fd5b60006001600160a01b03168360008151811061064257610642612c61565b60200260200101516001600160a01b031614156106bd5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642062617365746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b6001600160a01b03841661072f5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642064617461746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b836001600160a01b03168360008151811061074c5761074c612c61565b60200260200101516001600160a01b031614156107d15760405162461bcd60e51b815260206004820152603760248201527f46697865645261746545786368616e67653a20496e76616c696420646174617460448201527f6f6b656e2c2020657175616c732062617365746f6b656e000000000000000000606482015260840161061b565b816002815181106107e4576107e4612c61565b6020026020010151600014156108535760405162461bcd60e51b815260206004820152602e60248201527f46697865645261746545786368616e67653a20496e76616c696420657863686160448201526d6e676520726174652076616c756560901b606482015260840161061b565b6108928360008151811061086957610869612c61565b6020026020010151858560018151811061088557610885612c61565b6020026020010151612032565b60008181526003602081905260409091200154909150156109095760405162461bcd60e51b815260206004820152602b60248201527f46697865645261746545786368616e67653a2045786368616e676520616c726560448201526a616479206578697374732160a81b606482015260840161061b565b6000600190508260048151811061092257610922612c61565b602002602001015160001415610936575060005b604051806101e001604052806001151581526020018560018151811061095e5761095e612c61565b60200260200101516001600160a01b03168152602001866001600160a01b031681526020018560008151811061099657610996612c61565b60200260200101516001600160a01b03168152602001846002815181106109bf576109bf612c61565b60200260200101518152602001846001815181106109df576109df612c61565b60200260200101518152602001846000815181106109ff576109ff612c61565b60200260200101518152602001600081526020016000815260200184600381518110610a2d57610a2d612c61565b6020026020010151815260200185600281518110610a4d57610a4d612c61565b60200260200101516001600160a01b031681526020016000815260200160008152602001821515815260200185600381518110610a8c57610a8c612c61565b6020908102919091018101516001600160a01b0390811690925260008581526003808352604080832086518154958801518716610100908102610100600160a81b031992151583166001600160a81b0319988916171783559288015160018084018054928a166001600160a01b031993841617905560608a0151600285018054918b1691841691909117905560808a01519584019590955560a089015160048085019190915560c08a0151600585015560e08a01516006850155848a015160078501556101208a015160088501556101408a0151600985018054918b169190931617909155610160890151600a840155610180890151600b8401556101a0890151600c90930180546101c0909a01518916909402921515909116979095169690961795909517909455815493840182559081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092018490558551908716918691610bfa57610bfa612c61565b60200260200101516001600160a01b0316837feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b1987600181518110610c4057610c40612c61565b602002602001015187600281518110610c5b57610c5b612c61565b6020026020010151604051610c859291906001600160a01b03929092168252602082015260400190565b60405180910390a483600181518110610ca057610ca0612c61565b60200260200101516001600160a01b0316827fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352960405160405180910390a383600381518110610cf157610cf1612c61565b60200260200101516001600160a01b0316827fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c60405160405180910390a3509392505050565b600081815260036020818152604080842081516101e081018352815460ff808216151583526001600160a01b036101009283900481168488015260018501548116958401959095526002840154851660608401819052848801546080850152600485015460a0850152600585015460c0850152600685015460e085015260078501548385015260088501546101208501819052600986015487166101408601819052600a870154610160870152600b870154610180870152600c9096015492831615156101a0860152929091049094166101c0830152878752949093529293918291829190610e259061259d565b9350806101600151925080610180015191505091939590929450565b60606004805480602002602001604051908101604052809291908181526020018280548015610e8f57602002820191906000526020600020905b815481526020019060010190808311610e7b575b5050505050905090565b600081815260036020526040902054819061010090046001600160a01b03163314610ed65760405162461bcd60e51b815260040161061b90612c77565b60008281526003602052604090205460ff1615610f3157600082815260036020526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a35050565b600082815260036020526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35050565b600081815260036020526040902054819061010090046001600160a01b03163314610fb55760405162461bcd60e51b815260040161061b90612c77565b60026000541415610fd85760405162461bcd60e51b815260040161061b90612cc0565b600260009081558281526003602052604081206006810180549290558054600190910154611019916001600160a01b0391821691610100909104168361260c565b6000838152600360209081526040918290206001810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b163691015b60405180910390a45050600160005550565b600081815260036020818152604080842081516101e081018352815460ff80821615158084526001600160a01b036101009384900481169785018890526001860154811696850187905260028601548116606086018190529886015460808601819052600487015460a08701819052600588015460c08801819052600689015460e0890152600789015487890152600889015461012089015260098901548416610140890152600a890154610160890152600b890154610180890152600c9098015494851615156101a088015294909304166101c08501529597949691959194909281908190819081906111778e61207e565b95506111828e611d83565b94508060e0015193508061010001519250806101a0015191505091939597999b5091939597999b565b600260005414156111ce5760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600b8101805492905582549201549091611208916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f457b44fd47c33fc65bfbd58d0202ad97fbed1bbc9881f56441d05fe9ebd58acf91015b60405180910390a350506001600055565b600082815260036020526040902054829061010090046001600160a01b031633146112a35760405162461bcd60e51b815260040161061b90612c77565b600083815260036020526040808220600c018054610100600160a81b0319166101006001600160a01b038716908102919091179091559051909185917fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c9190a3505050565b600082815260036020526040902054829061010090046001600160a01b031633146113455760405162461bcd60e51b815260040161061b90612c77565b8161139e5760405162461bcd60e51b815260206004820152602360248201527f46697865645261746545786368616e67653a20526174696f206d7573742062656044820152620203e360ec1b606482015260840161061b565b6000838152600360208190526040918290200183905551339084907fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c906113e89086815260200190565b60405180910390a3505050565b600083815260036020526040902054839060ff166114255760405162461bcd60e51b815260040161061b90612cf7565b600260005414156114485760405162461bcd60e51b815260040161061b90612cc0565b60026000558261146a5760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b0316156114cd576000848152600360205260409020600c015461010090046001600160a01b031633146114cd5760405162461bcd60e51b815260040161061b90612d8b565b6000806000806114dd88886116f3565b9350935093509350858410156115445760405162461bcd60e51b815260206004820152602660248201527f46697865645261746545786368616e67653a20546f6f20666577206261736520604482015265746f6b656e7360d01b606482015260840161061b565b6000888152600360205260409020600b01546115609083612674565b6000898152600360205260409020600b810191909155600a01546115849082612674565b6000898152600360205260409020600a810191909155600101546115b3906001600160a01b031633308a612680565b6000888152600360205260409020600601546115cf9088612674565b60008981526003602052604090206006810191909155600701548411156116295760008881526003602052604090208054600290910154611624916001600160a01b0391821691610100909104163387612680565b611673565b60008881526003602052604090206007015461164590846126be565b6000898152600360205260409020600781019190915560020154611673906001600160a01b0316338661260c565b6000888152600360209081526040918290206002015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0015b60405180910390a350506001600055505050505050565b600082815260036020526040812054819081908190869060ff166117295760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546117a390670de0b6b3a76400009061179d9061175890600a612edb565b60008b81526003602052604090206005015461179d9061177990600a612edb565b60008d81526003602081905260409091200154611797908d906126ca565b906126ca565b906126d6565b6000888152600360205260409020600201549094506117ca906001600160a01b031661259d565b1561180f5760008781526003602052604090206002015461180c90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b87906126ca565b92505b60008781526003602052604090206008015461183a90670de0b6b3a76400009061179d9087906126ca565b91506118508361184a86856126be565b906126be565b94505092959194509250565b600082815260036020526040902054829061010090046001600160a01b031633146118995760405162461bcd60e51b815260040161061b90612c77565b600083815260036020908152604091829020600c01805460ff19168515159081179091559151918252339185917fe28e899e0f5d6fba0c8d73d1888083bcc62d4d9806d2e26fcf1f607c3ed52f5391016113e8565b6000828152600360205260409020600901546001600160a01b031633146119505760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b600083815260036020526040902054839060ff166119b15760405162461bcd60e51b815260040161061b90612cf7565b600260005414156119d45760405162461bcd60e51b815260040161061b90612cc0565b6002600055826119f65760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b031615611a59576000848152600360205260409020600c015461010090046001600160a01b03163314611a595760405162461bcd60e51b815260040161061b90612d8b565b600080600080611a698888612396565b935093509350935085841115611ad15760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b606482015260840161061b565b6000888152600360205260409020600b0154611aed9083612674565b6000898152600360205260409020600b810191909155600a0154611b119082612674565b6000898152600360205260409020600a81019190915560020154611b40906001600160a01b0316333087612680565b600088815260036020526040902060070154611b5c9084612674565b6000898152600360205260409020600781019190915560060154871115611ccc576000888152600360205260409020600c015460ff168015611c155750600088815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c159190612ee7565b15611c9357600088815260036020526040908190206001015490516340c10f1960e01b8152336004820152602481018990526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015611c7657600080fd5b505af1158015611c8a573d6000803e3d6000fd5b50505050611d16565b60008881526003602052604090208054600190910154611cc7916001600160a01b039182169161010090910416338a612680565b611d16565b600088815260036020526040902060060154611ce890886126be565b6000898152600360205260409020600681019190915560010154611d16906001600160a01b0316338961260c565b6000888152600360209081526040918290206001015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0016116dc565b60008181526003602052604081205460ff16611da157506000919050565b6000828152600360205260408082206002810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e259190612f04565b600084815260036020526040808220600281015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa158015611e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb49190612f04565b905080821015611ee257600084815260036020526040902060070154611edb908390612674565b9250611f02565b600084815260036020526040902060070154611eff908290612674565b92505b50505b919050565b6000828152600360205260409020600901546001600160a01b03163314611f6c5760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060080155565b60026000541415611fa45760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600a8101805492905560098101549201549091611fe1916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f192a3cd95e40313e0e12c28b398e31633936e38d134419161f883c8d640790559101611255565b604080516001600160a01b0380861660208301528085169282019290925290821660608201526000906080016040516020818303038152906040528051906020012090505b9392505050565b60008181526003602052604081205460ff1661209c57506000919050565b6000828152600360205260409020600c015460ff1680156121345750600082815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612ee7565b1561223f576000828152600360209081526040918290206001015482516318160ddd60e01b815292516001600160a01b03909116926318160ddd9260048083019391928290030181865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612f04565b600083815260036020908152604091829020600101548251631aa93a7560e11b815292516001600160a01b039091169263355274ea9260048083019391928290030181865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f9190612f04565b6122399190612f1d565b92915050565b6000828152600360205260408082206001810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190612f04565b600084815260036020526040808220600181015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa15801561232e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123529190612f04565b90508082101561237957600084815260036020526040902060060154611edb908390612674565b600084815260036020526040902060060154611eff908290612674565b600082815260036020526040812054819081908190869060ff166123cc5760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546123fb90670de0b6b3a76400009061179d9061175890600a612edb565b600088815260036020526040902060020154909450612422906001600160a01b031661259d565b156124605760008781526003602052604090206002015461245d90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b92505b60008781526003602052604090206008015461248b90670de0b6b3a76400009061179d9087906126ca565b91506118508361249b8685612674565b90612674565b600081815260036020526040902054819061010090046001600160a01b031633146124de5760405162461bcd60e51b815260040161061b90612c77565b600260005414156125015760405162461bcd60e51b815260040161061b90612cc0565b6002600081815583815260036020526040812060078101805492905580549201549091612540916001600160a01b03908116916101009004168361260c565b6000838152600360209081526040918290206002810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b16369101611072565b600154604051637c0aa57760e11b81526001600160a01b038381166004830152600092169063f8154aee90602401602060405180830381865afa1580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122399190612f04565b6040516001600160a01b03831660248201526044810182905261266f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e2565b505050565b60006120778284612f34565b6040516001600160a01b03808516602483015283166044820152606481018290526126b89085906323b872dd60e01b90608401612638565b50505050565b60006120778284612f1d565b60006120778284612f4c565b60006120778284612f6b565b6000612737826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127b49092919063ffffffff16565b80519091501561266f57808060200190518101906127559190612ee7565b61266f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061b565b60606127c384846000856127cb565b949350505050565b60608247101561282c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061b565b843b61287a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061b565b600080866001600160a01b031685876040516128969190612fb9565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e88282866128f3565b979650505050505050565b60608315612902575081612077565b8251156129125782518084602001fd5b8160405162461bcd60e51b815260040161061b9190612fd5565b80356001600160a01b0381168114611f0557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561298257612982612943565b604052919050565b600067ffffffffffffffff8211156129a4576129a4612943565b5060051b60200190565b600082601f8301126129bf57600080fd5b813560206129d46129cf8361298a565b612959565b82815260059290921b840181019181810190868411156129f357600080fd5b8286015b84811015612a0e57803583529183019183016129f7565b509695505050505050565b600080600060608486031215612a2e57600080fd5b612a378461292c565b925060208085013567ffffffffffffffff80821115612a5557600080fd5b818701915087601f830112612a6957600080fd5b8135612a776129cf8261298a565b81815260059190911b8301840190848101908a831115612a9657600080fd5b938501935b82851015612abb57612aac8561292c565b82529385019390850190612a9b565b965050506040870135925080831115612ad357600080fd5b5050612ae1868287016129ae565b9150509250925092565b600060208284031215612afd57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b3c57835183529284019291840191600101612b20565b50909695505050505050565b60008060408385031215612b5b57600080fd5b82359150612b6b6020840161292c565b90509250929050565b60008060408385031215612b8757600080fd5b50508035926020909101359150565b600080600060608486031215612bab57600080fd5b505081359360208301359350604090920135919050565b8015158114612bd057600080fd5b50565b60008060408385031215612be657600080fd5b823591506020830135612bf881612bc2565b809150509250929050565b600080600060608486031215612c1857600080fd5b612c218461292c565b9250612c2f6020850161292c565b9150612c3d6040850161292c565b90509250925092565b600060208284031215612c5857600080fd5b6120778261292c565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f46697865645261746545786368616e67653a20696e76616c69642065786368616040820152683733b29037bbb732b960b91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f46697865645261746545786368616e67653a2045786368616e676520646f657360408201526a206e6f742065786973742160a81b606082015260800190565b60208082526029908201527f46697865645261746545786368616e67653a207a65726f206461746120746f6b604082015268195b88185b5bdd5b9d60ba1b606082015260800190565b60208082526036908201527f46697865645261746545786368616e67653a205468697320616464726573732060408201527506973206e6f7420616c6c6f77656420746f20737761760541b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115612e32578160001904821115612e1857612e18612de1565b80851615612e2557918102915b93841c9390800290612dfc565b509250929050565b600082612e4957506001612239565b81612e5657506000612239565b8160018114612e6c5760028114612e7657612e92565b6001915050612239565b60ff841115612e8757612e87612de1565b50506001821b612239565b5060208310610133831016604e8410600b8410161715612eb5575081810a612239565b612ebf8383612df7565b8060001904821115612ed357612ed3612de1565b029392505050565b60006120778383612e3a565b600060208284031215612ef957600080fd5b815161207781612bc2565b600060208284031215612f1657600080fd5b5051919050565b600082821015612f2f57612f2f612de1565b500390565b60008219821115612f4757612f47612de1565b500190565b6000816000190483118215151615612f6657612f66612de1565b500290565b600082612f8857634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fa8578181015183820152602001612f90565b838111156126b85750506000910152565b60008251612fcb818460208701612f8d565b9190910192915050565b6020815260008251806020840152612ff4816040850160208701612f8d565b601f01601f1916919091016040019291505056fea2646970667358221220ae3733c86a7fbdeda1e535bdcf4c655711beee316c6fde6e837493eeb818cb9764736f6c634300080a0033",deployedBytecode:"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c8063825b5cd6116100f9578063b686bcaf11610097578063c99733a711610071578063c99733a714610576578063f532129e14610589578063f8154aee1461059c578063f887ea40146105af57600080fd5b8063b686bcaf1461053d578063c1f6572e14610550578063c66274ea1461056357600080fd5b806388823872116100d357806388823872146104eb578063a28f78f1146104fe578063b32b56f914610511578063b42414291461053557600080fd5b8063825b5cd6146103c5578063855058dd146103d857806385fcbc2f146104d857600080fd5b80635c36901c116101665780636e4c6269116101405780636e4c62691461035957806371dc14b21461036c57806379dd28361461039f5780637c82ebe9146103b257600080fd5b80635c36901c1461030057806360311e9514610333578063680819eb1461034657600080fd5b806324cb477e116101a257806324cb477e14610247578063450dccc31461025c5780634c87087d1461026f5780635acfedc7146102ed57600080fd5b8063012c3275146101c95780630b3b430d146101ef5780631e2e3a6b14610232575b600080fd5b6101dc6101d7366004612a19565b6105c2565b6040519081526020015b60405180910390f35b6102026101fd366004612aeb565b610d37565b604080519586526001600160a01b039094166020860152928401919091526060830152608082015260a0016101e6565b61023a610e41565b6040516101e69190612b04565b61025a610255366004612aeb565b610e99565b005b61025a61026a366004612aeb565b610f78565b61028261027d366004612aeb565b611084565b604080516001600160a01b039d8e1681529b8d1660208d01528b0199909952999096166060890152608088019490945260a0870192909252151560c086015260e0850152610100840152610120830152610140820192909252901515610160820152610180016101e6565b61025a6102fb366004612aeb565b6111ab565b61032361030e366004612aeb565b60009081526003602052604090205460ff1690565b60405190151581526020016101e6565b61025a610341366004612b48565b611266565b61025a610354366004612b74565b611308565b61025a610367366004612b96565b6113f5565b61037f61037a366004612b74565b6116f3565b6040805194855260208501939093529183015260608201526080016101e6565b61025a6103ad366004612bd3565b61185c565b61025a6103c0366004612b48565b6118ee565b61025a6103d3366004612b96565b611981565b6104c06103e6366004612aeb565b60009081526003602081815260409283902083516101e081018552815460ff808216151583526001600160a01b03610100928390048116958401959095526001840154851696830196909652600283015484166060830152938201546080820152600482015460a0820152600582015460c0820152600682015460e0820152600782015484820152600882015461012082015260098201548316610140820152600a820154610160820152600b820154610180820152600c9091015493841615156101a0820152919092049091166101c090910181905290565b6040516001600160a01b0390911681526020016101e6565b6101dc6104e6366004612aeb565b611d83565b61025a6104f9366004612b74565b611f0a565b6002546104c0906001600160a01b031681565b6101dc61051f366004612aeb565b6000908152600360208190526040909120015490565b6004546101dc565b61025a61054b366004612aeb565b611f81565b6101dc61055e366004612c03565b612032565b6101dc610571366004612aeb565b61207e565b61037f610584366004612b74565b612396565b61025a610597366004612aeb565b6124a1565b6101dc6105aa366004612c46565b61259d565b6001546104c0906001600160a01b031681565b6001546000906001600160a01b031633146106245760405162461bcd60e51b815260206004820152601e60248201527f46697865645261746545786368616e67653a206f6e6c7920726f75746572000060448201526064015b60405180910390fd5b60006001600160a01b03168360008151811061064257610642612c61565b60200260200101516001600160a01b031614156106bd5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642062617365746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b6001600160a01b03841661072f5760405162461bcd60e51b815260206004820152603360248201527f46697865645261746545786368616e67653a20496e76616c69642064617461746044820152726f6b656e2c20207a65726f206164647265737360681b606482015260840161061b565b836001600160a01b03168360008151811061074c5761074c612c61565b60200260200101516001600160a01b031614156107d15760405162461bcd60e51b815260206004820152603760248201527f46697865645261746545786368616e67653a20496e76616c696420646174617460448201527f6f6b656e2c2020657175616c732062617365746f6b656e000000000000000000606482015260840161061b565b816002815181106107e4576107e4612c61565b6020026020010151600014156108535760405162461bcd60e51b815260206004820152602e60248201527f46697865645261746545786368616e67653a20496e76616c696420657863686160448201526d6e676520726174652076616c756560901b606482015260840161061b565b6108928360008151811061086957610869612c61565b6020026020010151858560018151811061088557610885612c61565b6020026020010151612032565b60008181526003602081905260409091200154909150156109095760405162461bcd60e51b815260206004820152602b60248201527f46697865645261746545786368616e67653a2045786368616e676520616c726560448201526a616479206578697374732160a81b606482015260840161061b565b6000600190508260048151811061092257610922612c61565b602002602001015160001415610936575060005b604051806101e001604052806001151581526020018560018151811061095e5761095e612c61565b60200260200101516001600160a01b03168152602001866001600160a01b031681526020018560008151811061099657610996612c61565b60200260200101516001600160a01b03168152602001846002815181106109bf576109bf612c61565b60200260200101518152602001846001815181106109df576109df612c61565b60200260200101518152602001846000815181106109ff576109ff612c61565b60200260200101518152602001600081526020016000815260200184600381518110610a2d57610a2d612c61565b6020026020010151815260200185600281518110610a4d57610a4d612c61565b60200260200101516001600160a01b031681526020016000815260200160008152602001821515815260200185600381518110610a8c57610a8c612c61565b6020908102919091018101516001600160a01b0390811690925260008581526003808352604080832086518154958801518716610100908102610100600160a81b031992151583166001600160a81b0319988916171783559288015160018084018054928a166001600160a01b031993841617905560608a0151600285018054918b1691841691909117905560808a01519584019590955560a089015160048085019190915560c08a0151600585015560e08a01516006850155848a015160078501556101208a015160088501556101408a0151600985018054918b169190931617909155610160890151600a840155610180890151600b8401556101a0890151600c90930180546101c0909a01518916909402921515909116979095169690961795909517909455815493840182559081527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092018490558551908716918691610bfa57610bfa612c61565b60200260200101516001600160a01b0316837feb7a353641f7d3cc54b497ef1553fdc292b64d9cc3be8587c23dfba01f310b1987600181518110610c4057610c40612c61565b602002602001015187600281518110610c5b57610c5b612c61565b6020026020010151604051610c859291906001600160a01b03929092168252602082015260400190565b60405180910390a483600181518110610ca057610ca0612c61565b60200260200101516001600160a01b0316827fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a50352960405160405180910390a383600381518110610cf157610cf1612c61565b60200260200101516001600160a01b0316827fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c60405160405180910390a3509392505050565b600081815260036020818152604080842081516101e081018352815460ff808216151583526001600160a01b036101009283900481168488015260018501548116958401959095526002840154851660608401819052848801546080850152600485015460a0850152600585015460c0850152600685015460e085015260078501548385015260088501546101208501819052600986015487166101408601819052600a870154610160870152600b870154610180870152600c9096015492831615156101a0860152929091049094166101c0830152878752949093529293918291829190610e259061259d565b9350806101600151925080610180015191505091939590929450565b60606004805480602002602001604051908101604052809291908181526020018280548015610e8f57602002820191906000526020600020905b815481526020019060010190808311610e7b575b5050505050905090565b600081815260036020526040902054819061010090046001600160a01b03163314610ed65760405162461bcd60e51b815260040161061b90612c77565b60008281526003602052604090205460ff1615610f3157600082815260036020526040808220805460ff1916905551339184917f03da9148e1de78fba22de63c573465562ebf6ef878a1d3ea83790a560229984c9190a35050565b600082815260036020526040808220805460ff1916600117905551339184917fc7344c45124818d1d3a4c24ccb9b86d8b88d3bd05209b2a42b494cb32a5035299190a35050565b600081815260036020526040902054819061010090046001600160a01b03163314610fb55760405162461bcd60e51b815260040161061b90612c77565b60026000541415610fd85760405162461bcd60e51b815260040161061b90612cc0565b600260009081558281526003602052604081206006810180549290558054600190910154611019916001600160a01b0391821691610100909104168361260c565b6000838152600360209081526040918290206001810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b163691015b60405180910390a45050600160005550565b600081815260036020818152604080842081516101e081018352815460ff80821615158084526001600160a01b036101009384900481169785018890526001860154811696850187905260028601548116606086018190529886015460808601819052600487015460a08701819052600588015460c08801819052600689015460e0890152600789015487890152600889015461012089015260098901548416610140890152600a890154610160890152600b890154610180890152600c9098015494851615156101a088015294909304166101c08501529597949691959194909281908190819081906111778e61207e565b95506111828e611d83565b94508060e0015193508061010001519250806101a0015191505091939597999b5091939597999b565b600260005414156111ce5760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600b8101805492905582549201549091611208916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f457b44fd47c33fc65bfbd58d0202ad97fbed1bbc9881f56441d05fe9ebd58acf91015b60405180910390a350506001600055565b600082815260036020526040902054829061010090046001600160a01b031633146112a35760405162461bcd60e51b815260040161061b90612c77565b600083815260036020526040808220600c018054610100600160a81b0319166101006001600160a01b038716908102919091179091559051909185917fcc1b4af8292e6b938f6743c78a62317c9a2d60e0d46b77776a027e53ce617c0c9190a3505050565b600082815260036020526040902054829061010090046001600160a01b031633146113455760405162461bcd60e51b815260040161061b90612c77565b8161139e5760405162461bcd60e51b815260206004820152602360248201527f46697865645261746545786368616e67653a20526174696f206d7573742062656044820152620203e360ec1b606482015260840161061b565b6000838152600360208190526040918290200183905551339084907fe50f9919fdc524004a4ee0cb934f4734f144bec0713a52e5483b753f5de0f08c906113e89086815260200190565b60405180910390a3505050565b600083815260036020526040902054839060ff166114255760405162461bcd60e51b815260040161061b90612cf7565b600260005414156114485760405162461bcd60e51b815260040161061b90612cc0565b60026000558261146a5760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b0316156114cd576000848152600360205260409020600c015461010090046001600160a01b031633146114cd5760405162461bcd60e51b815260040161061b90612d8b565b6000806000806114dd88886116f3565b9350935093509350858410156115445760405162461bcd60e51b815260206004820152602660248201527f46697865645261746545786368616e67653a20546f6f20666577206261736520604482015265746f6b656e7360d01b606482015260840161061b565b6000888152600360205260409020600b01546115609083612674565b6000898152600360205260409020600b810191909155600a01546115849082612674565b6000898152600360205260409020600a810191909155600101546115b3906001600160a01b031633308a612680565b6000888152600360205260409020600601546115cf9088612674565b60008981526003602052604090206006810191909155600701548411156116295760008881526003602052604090208054600290910154611624916001600160a01b0391821691610100909104163387612680565b611673565b60008881526003602052604090206007015461164590846126be565b6000898152600360205260409020600781019190915560020154611673906001600160a01b0316338661260c565b6000888152600360209081526040918290206002015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0015b60405180910390a350506001600055505050505050565b600082815260036020526040812054819081908190869060ff166117295760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546117a390670de0b6b3a76400009061179d9061175890600a612edb565b60008b81526003602052604090206005015461179d9061177990600a612edb565b60008d81526003602081905260409091200154611797908d906126ca565b906126ca565b906126d6565b6000888152600360205260409020600201549094506117ca906001600160a01b031661259d565b1561180f5760008781526003602052604090206002015461180c90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b87906126ca565b92505b60008781526003602052604090206008015461183a90670de0b6b3a76400009061179d9087906126ca565b91506118508361184a86856126be565b906126be565b94505092959194509250565b600082815260036020526040902054829061010090046001600160a01b031633146118995760405162461bcd60e51b815260040161061b90612c77565b600083815260036020908152604091829020600c01805460ff19168515159081179091559151918252339185917fe28e899e0f5d6fba0c8d73d1888083bcc62d4d9806d2e26fcf1f607c3ed52f5391016113e8565b6000828152600360205260409020600901546001600160a01b031633146119505760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060090180546001600160a01b0319166001600160a01b03909216919091179055565b600083815260036020526040902054839060ff166119b15760405162461bcd60e51b815260040161061b90612cf7565b600260005414156119d45760405162461bcd60e51b815260040161061b90612cc0565b6002600055826119f65760405162461bcd60e51b815260040161061b90612d42565b6000848152600360205260409020600c015461010090046001600160a01b031615611a59576000848152600360205260409020600c015461010090046001600160a01b03163314611a595760405162461bcd60e51b815260040161061b90612d8b565b600080600080611a698888612396565b935093509350935085841115611ad15760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b606482015260840161061b565b6000888152600360205260409020600b0154611aed9083612674565b6000898152600360205260409020600b810191909155600a0154611b119082612674565b6000898152600360205260409020600a81019190915560020154611b40906001600160a01b0316333087612680565b600088815260036020526040902060070154611b5c9084612674565b6000898152600360205260409020600781019190915560060154871115611ccc576000888152600360205260409020600c015460ff168015611c155750600088815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015611bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c159190612ee7565b15611c9357600088815260036020526040908190206001015490516340c10f1960e01b8152336004820152602481018990526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015611c7657600080fd5b505af1158015611c8a573d6000803e3d6000fd5b50505050611d16565b60008881526003602052604090208054600190910154611cc7916001600160a01b039182169161010090910416338a612680565b611d16565b600088815260036020526040902060060154611ce890886126be565b6000898152600360205260409020600681019190915560010154611d16906001600160a01b0316338961260c565b6000888152600360209081526040918290206001015482518781529182018a90526001600160a01b0316918101919091526060810182905260808101839052339089907f71999bcde73cf4958b3a13dcbc60ff31366318eb6e67b45c93725aa07f89cbd29060a0016116dc565b60008181526003602052604081205460ff16611da157506000919050565b6000828152600360205260408082206002810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa158015611e01573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e259190612f04565b600084815260036020526040808220600281015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa158015611e90573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eb49190612f04565b905080821015611ee257600084815260036020526040902060070154611edb908390612674565b9250611f02565b600084815260036020526040902060070154611eff908290612674565b92505b50505b919050565b6000828152600360205260409020600901546001600160a01b03163314611f6c5760405162461bcd60e51b81526020600482015260166024820152753737ba1036b0b935b2ba2332b2a1b7b63632b1ba37b960511b604482015260640161061b565b60009182526003602052604090912060080155565b60026000541415611fa45760405162461bcd60e51b815260040161061b90612cc0565b60026000818155828152600360205260408120600a8101805492905560098101549201549091611fe1916001600160a01b0390811691168361260c565b6000828152600360209081526040918290206002015491518381526001600160a01b039092169184917f192a3cd95e40313e0e12c28b398e31633936e38d134419161f883c8d640790559101611255565b604080516001600160a01b0380861660208301528085169282019290925290821660608201526000906080016040516020818303038152906040528051906020012090505b9392505050565b60008181526003602052604081205460ff1661209c57506000919050565b6000828152600360205260409020600c015460ff1680156121345750600082815260036020526040908190206001015490516355138f0d60e11b81523060048201526001600160a01b039091169063aa271e1a90602401602060405180830381865afa158015612110573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121349190612ee7565b1561223f576000828152600360209081526040918290206001015482516318160ddd60e01b815292516001600160a01b03909116926318160ddd9260048083019391928290030181865afa158015612190573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b49190612f04565b600083815260036020908152604091829020600101548251631aa93a7560e11b815292516001600160a01b039091169263355274ea9260048083019391928290030181865afa15801561220b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061222f9190612f04565b6122399190612f1d565b92915050565b6000828152600360205260408082206001810154905491516370a0823160e01b81526101009092046001600160a01b03908116600484015216906370a0823190602401602060405180830381865afa15801561229f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122c39190612f04565b600084815260036020526040808220600181015490549151636eb1769f60e11b81526001600160a01b0361010090930483166004820152306024820152939450919291169063dd62ed3e90604401602060405180830381865afa15801561232e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123529190612f04565b90508082101561237957600084815260036020526040902060060154611edb908390612674565b600084815260036020526040902060060154611eff908290612674565b600082815260036020526040812054819081908190869060ff166123cc5760405162461bcd60e51b815260040161061b90612cf7565b6000878152600360205260409020600401546123fb90670de0b6b3a76400009061179d9061175890600a612edb565b600088815260036020526040902060020154909450612422906001600160a01b031661259d565b156124605760008781526003602052604090206002015461245d90670de0b6b3a76400009061179d90611805906001600160a01b031661259d565b92505b60008781526003602052604090206008015461248b90670de0b6b3a76400009061179d9087906126ca565b91506118508361249b8685612674565b90612674565b600081815260036020526040902054819061010090046001600160a01b031633146124de5760405162461bcd60e51b815260040161061b90612c77565b600260005414156125015760405162461bcd60e51b815260040161061b90612cc0565b6002600081815583815260036020526040812060078101805492905580549201549091612540916001600160a01b03908116916101009004168361260c565b6000838152600360209081526040918290206002810154905492518481526001600160a01b039182169361010090049091169186917fecc75f4464886bee0a1c5eae61c0cb4b99c64c5e9cdebe3696217d266f8b16369101611072565b600154604051637c0aa57760e11b81526001600160a01b038381166004830152600092169063f8154aee90602401602060405180830381865afa1580156125e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122399190612f04565b6040516001600160a01b03831660248201526044810182905261266f90849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526126e2565b505050565b60006120778284612f34565b6040516001600160a01b03808516602483015283166044820152606481018290526126b89085906323b872dd60e01b90608401612638565b50505050565b60006120778284612f1d565b60006120778284612f4c565b60006120778284612f6b565b6000612737826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166127b49092919063ffffffff16565b80519091501561266f57808060200190518101906127559190612ee7565b61266f5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b606482015260840161061b565b60606127c384846000856127cb565b949350505050565b60608247101561282c5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161061b565b843b61287a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161061b565b600080866001600160a01b031685876040516128969190612fb9565b60006040518083038185875af1925050503d80600081146128d3576040519150601f19603f3d011682016040523d82523d6000602084013e6128d8565b606091505b50915091506128e88282866128f3565b979650505050505050565b60608315612902575081612077565b8251156129125782518084602001fd5b8160405162461bcd60e51b815260040161061b9190612fd5565b80356001600160a01b0381168114611f0557600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561298257612982612943565b604052919050565b600067ffffffffffffffff8211156129a4576129a4612943565b5060051b60200190565b600082601f8301126129bf57600080fd5b813560206129d46129cf8361298a565b612959565b82815260059290921b840181019181810190868411156129f357600080fd5b8286015b84811015612a0e57803583529183019183016129f7565b509695505050505050565b600080600060608486031215612a2e57600080fd5b612a378461292c565b925060208085013567ffffffffffffffff80821115612a5557600080fd5b818701915087601f830112612a6957600080fd5b8135612a776129cf8261298a565b81815260059190911b8301840190848101908a831115612a9657600080fd5b938501935b82851015612abb57612aac8561292c565b82529385019390850190612a9b565b965050506040870135925080831115612ad357600080fd5b5050612ae1868287016129ae565b9150509250925092565b600060208284031215612afd57600080fd5b5035919050565b6020808252825182820181905260009190848201906040850190845b81811015612b3c57835183529284019291840191600101612b20565b50909695505050505050565b60008060408385031215612b5b57600080fd5b82359150612b6b6020840161292c565b90509250929050565b60008060408385031215612b8757600080fd5b50508035926020909101359150565b600080600060608486031215612bab57600080fd5b505081359360208301359350604090920135919050565b8015158114612bd057600080fd5b50565b60008060408385031215612be657600080fd5b823591506020830135612bf881612bc2565b809150509250929050565b600080600060608486031215612c1857600080fd5b612c218461292c565b9250612c2f6020850161292c565b9150612c3d6040850161292c565b90509250925092565b600060208284031215612c5857600080fd5b6120778261292c565b634e487b7160e01b600052603260045260246000fd5b60208082526029908201527f46697865645261746545786368616e67653a20696e76616c69642065786368616040820152683733b29037bbb732b960b91b606082015260800190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b6020808252602b908201527f46697865645261746545786368616e67653a2045786368616e676520646f657360408201526a206e6f742065786973742160a81b606082015260800190565b60208082526029908201527f46697865645261746545786368616e67653a207a65726f206461746120746f6b604082015268195b88185b5bdd5b9d60ba1b606082015260800190565b60208082526036908201527f46697865645261746545786368616e67653a205468697320616464726573732060408201527506973206e6f7420616c6c6f77656420746f20737761760541b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115612e32578160001904821115612e1857612e18612de1565b80851615612e2557918102915b93841c9390800290612dfc565b509250929050565b600082612e4957506001612239565b81612e5657506000612239565b8160018114612e6c5760028114612e7657612e92565b6001915050612239565b60ff841115612e8757612e87612de1565b50506001821b612239565b5060208310610133831016604e8410600b8410161715612eb5575081810a612239565b612ebf8383612df7565b8060001904821115612ed357612ed3612de1565b029392505050565b60006120778383612e3a565b600060208284031215612ef957600080fd5b815161207781612bc2565b600060208284031215612f1657600080fd5b5051919050565b600082821015612f2f57612f2f612de1565b500390565b60008219821115612f4757612f47612de1565b500190565b6000816000190483118215151615612f6657612f66612de1565b500290565b600082612f8857634e487b7160e01b600052601260045260246000fd5b500490565b60005b83811015612fa8578181015183820152602001612f90565b838111156126b85750506000910152565b60008251612fcb818460208701612f8d565b9190910192915050565b6020815260008251806020840152612ff4816040850160208701612f8d565b601f01601f1916919091016040019291505056fea2646970667358221220ae3733c86a7fbdeda1e535bdcf4c655711beee316c6fde6e837493eeb818cb9764736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};!function(e){e[e.CreatingExchange=0]="CreatingExchange",e[e.ApprovingDatatoken=1]="ApprovingDatatoken"}(_||(_={}));class W{constructor(e,a,t=null,b=null,n){this.GASLIMIT_DEFAULT=1e6,this.oceanAddress=null,this.fixedRateAddress=void 0,this.fixedRateExchangeAbi=void 0,this.fixedRateContract=void 0,this.web3=void 0,this.contract=null,this.startBlock=void 0,this.ssAbi=void 0,this.web3=e,this.startBlock=n||0,this.fixedRateExchangeAbi=t||N.abi,this.oceanAddress=b,this.fixedRateAddress=a,this.contract=new this.web3.eth.Contract(this.fixedRateExchangeAbi,this.fixedRateAddress)}async amountToUnits(a,t){let b=18;const n=new this.web3.eth.Contract(P.abi,a);try{b=await n.methods.decimals().call()}catch(e){c.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}return new e(parseInt(t)*10**b).toString()}async unitsToAmount(a,t){let b=18;const n=new this.web3.eth.Contract(P.abi,a);try{b=await n.methods.decimals().call()}catch(e){c.error("ERROR: FAILED TO CALL DECIMALS(), USING 18")}return new e(parseInt(t)/10**b).toString()}async generateExchangeId(e,a,t){return await this.contract.methods.generateExchangeId(e,a,t).call()}async estBuyDT(e,a,t,b,n){const d=n||this.fixedRateContract,f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyDT(a,t.toString(),b.toString()).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyDT(e,a,t,b){const n=await this.amountToUnits((await this.getExchange(a)).dataToken,t),d=await this.amountToUnits((await this.getExchange(a)).baseToken,b),f=await this.estBuyDT(e,a,n,d);try{return await this.contract.methods.buyDT(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){return c.error(`ERROR: Failed to buy datatokens: ${e.message}`),null}}async estSellDT(e,a,t,b,n){const d=n||this.fixedRateContract,f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.sellDT(a,t,b).estimateGas({from:e},(e,a)=>e?f:a)}catch(e){s=f}return s}async sellDT(e,a,t,b){const n=await this.amountToUnits((await this.getExchange(a)).dataToken,t),d=await this.amountToUnits((await this.getExchange(a)).baseToken,b),f=await this.estBuyDT(e,a,n,d);try{return await this.contract.methods.sellDT(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}catch(e){return c.error(`ERROR: Failed to sell datatokens: ${e.message}`),null}}async getNumberOfExchanges(){return await this.contract.methods.getNumberOfExchanges().call()}async estSetRate(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setRate(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setRate(e,a,t){const b=await this.estSetRate(e,a,this.web3.utils.toWei(String(t)));return await this.contract.methods.setRate(a,this.web3.utils.toWei(t)).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estSetAllowedSwapper(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setRate(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async setAllowedSwapper(e,a,t){const b=await this.estSetAllowedSwapper(e,a,t);return await this.contract.methods.setAllowedSwapper(a,t).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estActivate(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleExchangeState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async activate(e,a){const t=await this.getExchange(a);if(!t)return null;if(!0===t.active)return null;const b=await this.estActivate(e,a);return await this.contract.methods.toggleExchangeState(a).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estDeactivate(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleExchangeState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async deactivate(e,a){const t=await this.getExchange(a);if(!t)return null;if(!1===t.active)return null;const b=await this.estDeactivate(e,a);return await this.contract.methods.toggleExchangeState(a).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async getRate(e){const a=await this.contract.methods.getRate(e).call();return this.web3.utils.fromWei(a)}async getDTSupply(e){const a=await this.contract.methods.getDTSupply(e).call();return await this.unitsToAmount((await this.getExchange(e)).dataToken,a)}async getBTSupply(e){const a=await this.contract.methods.getBTSupply(e).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,a)}async getAllowedSwapper(e){return await this.contract.methods.getAllowedSwapper(e).call()}async getAmountBTIn(e,a){const t=await this.contract.methods.calcBaseInGivenOutDT(e,await this.amountToUnits((await this.getExchange(e)).dataToken,a)).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,t.baseTokenAmount)}async getAmountBTOut(e,a){const t=await this.contract.methods.calcBaseOutGivenInDT(e,await this.amountToUnits((await this.getExchange(e)).dataToken,a)).call();return await this.unitsToAmount((await this.getExchange(e)).baseToken,t.baseTokenAmount)}async getExchange(e){const a=await this.contract.methods.getExchange(e).call();return a.dtDecimals=a.dtDecimals.toString(),a.btDecimals=a.btDecimals.toString(),a.dtBalance=await this.unitsToAmount(a.dataToken,a.dtBalance),a.btBalance=await this.unitsToAmount(a.baseToken,a.btBalance),a.dtSupply=await this.unitsToAmount(a.dataToken,a.dtSupply),a.btSupply=await this.unitsToAmount(a.baseToken,a.btSupply),a.fixedRate=this.web3.utils.fromWei(a.fixedRate),a.exchangeId=e,a}async getFeesInfo(e){const a=await this.contract.methods.getFeesInfo(e).call();return a.opfFee=this.web3.utils.fromWei(a.opfFee.toString()),a.marketFee=this.web3.utils.fromWei(a.marketFee.toString()),a.marketFeeAvailable=await this.unitsToAmount((await this.getExchange(e)).baseToken,a.marketFeeAvailable),a.oceanFeeAvailable=await this.unitsToAmount((await this.getExchange(e)).baseToken,a.oceanFeeAvailable),a.exchangeId=e,a}async getExchanges(){return await this.contract.methods.getExchanges().call()}async isActive(e){return await this.contract.methods.isActive(e).call()}async estActivateMint(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleMintState(a,!0).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async activateMint(e,a){const t=await this.getExchange(a);if(!t)return null;if(!0===t.withMint)return null;const b=await this.estActivateMint(e,a);return await this.contract.methods.toggleMintState(a,!0).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estDeactivateMint(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.toggleMintState(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async deactivateMint(e,a){const t=await this.getExchange(a);if(!t)return null;if(!1===t.withMint)return null;const b=await this.estDeactivate(e,a);return await this.contract.methods.toggleMintState(a,!1).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estCollectBT(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectBT(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectBT(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectBT(e,a);return await this.contract.methods.collectBT(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectDT(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectDT(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectDT(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectDT(e,a);return await this.contract.methods.collectDT(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectMarketFee(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectMarketFee(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectMarketFee(e,a);return await this.contract.methods.collectMarketFee(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estCollectOceanFee(e,a,t){const b=t||this.fixedRateContract,n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.collectMarketFee(a).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async collectOceanFee(e,a){if(!await this.getExchange(a))return null;const t=await this.estCollectOceanFee(e,a);return await this.contract.methods.collectOceanFee(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async getOPFCollector(){let e=null;try{e=await this.contract.methods.opfCollector().call()}catch(e){c.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return e}async getRouter(){let e=null;try{e=await this.contract.methods.router().call()}catch(e){c.error(`ERROR: Failed to get Router address: ${e.message}`)}return e}async getExchangeOwner(e){let a=null;try{a=await(await this.getExchange(e)).exchangeOwner}catch(e){c.error(`ERROR: Failed to get OPF Collector address: ${e.message}`)}return a}async estUpdateMarketFee(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFee(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFee(e,a,t){const b=await this.estSetRate(e,a,this.web3.utils.toWei(t));return await this.contract.methods.updateMarketFee(a,this.web3.utils.toWei(t)).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}async estUpdateMarketFeeCollector(e,a,t,b){const n=b||this.fixedRateContract,d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.updateMarketFeeCollector(a,t).estimateGas({from:e},(e,a)=>e?d:a)}catch(e){f=d}return f}async updateMarketFeeCollector(e,a,t){const b=await this.estUpdateMarketFeeCollector(e,a,t);return await this.contract.methods.updateMarketFeeCollector(a,t).send({from:e,gas:b+1,gasPrice:await r(this.web3)})}}var B={_format:"hh-sol-artifact-1",contractName:"ERC20TemplateEnterprise",sourceName:"contracts/templates/ERC20TemplateEnterprise.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"buyer",type:"address"},{indexed:!1,internalType:"uint256",name:"baseTokenAmount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"marketFeeAmount",type:"uint256"}],name:"BuyAndOrder",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterApproved",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"currentMinter",type:"address"},{indexed:!1,internalType:"address",name:"newMinter",type:"address"}],name:"MinterProposed",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"caller",type:"address"},{indexed:!0,internalType:"address",name:"_newPaymentCollector",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"NewPaymentCollector",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"consumer",type:"address"},{indexed:!1,internalType:"address",name:"payer",type:"address"},{indexed:!1,internalType:"uint256",name:"amount",type:"uint256"},{indexed:!1,internalType:"uint256",name:"serviceIndex",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!0,internalType:"address",name:"publishMarketAddress",type:"address"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"OrderStarted",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"providerFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"providerFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"providerFeeAmount",type:"uint256"},{indexed:!1,internalType:"bytes",name:"providerData",type:"bytes"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"ProviderFees",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!0,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFees",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"caller",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeAddress",type:"address"},{indexed:!1,internalType:"address",name:"PublishMarketFeeToken",type:"address"},{indexed:!1,internalType:"uint256",name:"PublishMarketFeeAmount",type:"uint256"}],name:"PublishMarketFeesChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedMinter",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedPaymentManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[],name:"BASE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"BASE_COMMUNITY_FEE_PERCENTAGE",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"DOMAIN_SEPARATOR",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"PERMIT_TYPEHASH",outputs:[{internalType:"bytes32",name:"",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"addMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"addPaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"}],name:"allowance",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"approve",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"authERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"amount",type:"uint256"}],name:"burn",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"burnFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],internalType:"struct ERC20TemplateEnterprise.OrderParams",name:"_orderParams",type:"tuple"},{internalType:"address",name:"dispenserContract",type:"address"}],name:"buyFromDispenserAndOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{components:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],internalType:"struct ERC20TemplateEnterprise.OrderParams",name:"_orderParams",type:"tuple"},{components:[{internalType:"address",name:"exchangeContract",type:"address"},{internalType:"bytes32",name:"exchangeId",type:"bytes32"},{internalType:"uint256",name:"maxBaseTokenAmount",type:"uint256"},{internalType:"uint256",name:"swapMarketFee",type:"uint256"},{internalType:"address",name:"marketFeeAddress",type:"address"}],internalType:"struct ERC20TemplateEnterprise.FreParams",name:"_freParams",type:"tuple"}],name:"buyFromFreAndOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cap",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanFrom721",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_dispenser",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"}],name:"createDispenser",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"fixedPriceAddress",type:"address"},{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"uints",type:"uint256[]"}],name:"createFixedRate",outputs:[{internalType:"bytes32",name:"exchangeId",type:"bytes32"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"subtractedValue",type:"uint256"}],name:"decreaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"getERC721Address",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getPaymentCollector",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],internalType:"struct ERC20Roles.RolesERC20",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getPublishingMarketFee",outputs:[{internalType:"address",name:"",type:"address"},{internalType:"address",name:"",type:"address"},{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"addedValue",type:"uint256"}],name:"increaseAllowance",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string[]",name:"strings_",type:"string[]"},{internalType:"address[]",name:"addresses_",type:"address[]"},{internalType:"address[]",name:"factoryAddresses_",type:"address[]"},{internalType:"uint256[]",name:"uints_",type:"uint256[]"},{internalType:"bytes[]",name:"bytes_",type:"bytes[]"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"deployer",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isMinter",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"},{internalType:"uint256",name:"value",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"nonces",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"",type:"address"}],name:"permissions",outputs:[{internalType:"bool",name:"minter",type:"bool"},{internalType:"bool",name:"paymentManager",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"uint256",name:"deadline",type:"uint256"},{internalType:"uint8",name:"v",type:"uint8"},{internalType:"bytes32",name:"r",type:"bytes32"},{internalType:"bytes32",name:"s",type:"bytes32"}],name:"permit",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_minter",type:"address"}],name:"removeMinter",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_paymentManager",type:"address"}],name:"removePaymentManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"router",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes",name:"_value",type:"bytes"}],name:"setData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_newPaymentCollector",type:"address"}],name:"setPaymentCollector",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_publishMarketFeeAddress",type:"address"},{internalType:"address",name:"_publishMarketFeeToken",type:"address"},{internalType:"uint256",name:"_publishMarketFeeAmount",type:"uint256"}],name:"setPublishingMarketFee",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"consumer",type:"address"},{internalType:"uint256",name:"serviceIndex",type:"uint256"},{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:"bytes",name:"providerData",type:"bytes"}],name:"startOrder",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transfer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"sender",type:"address"},{internalType:"address",name:"recipient",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"transferFrom",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x6080604052600a805460ff60a01b191690553480156200001e57600080fd5b5060408051808201825260048152631d195cdd60e21b60208083019182528351808501909452600a8452691d195cdd14de5b589bdb60b21b9084015281519192916200006d916003916200008c565b508051620000839060049060208401906200008c565b5050506200016f565b8280546200009a9062000132565b90600052602060002090601f016020900481019282620000be576000855562000109565b82601f10620000d957805160ff191683800117855562000109565b8280016001018555821562000109579182015b8281111562000109578251825591602001919060010190620000ec565b50620001179291506200011b565b5090565b5b808211156200011757600081556001016200011c565b600181811c908216806200014757607f821691505b602082108114156200016957634e487b7160e01b600052602260045260246000fd5b50919050565b614680806200017f6000396000f3fe60806040526004361061027d5760003560e01c806370a082311161014e578063aa492ef9116100bb578063e086e5ec11610077578063e086e5ec146108c9578063e487c2e8146108d1578063ec342ad0146108e6578063ee88ade114610902578063ef867ff414610922578063f887ea401461094257005b8063aa492ef9146107ee578063ab62f0e11461080e578063b2263a5d1461082e578063b3998be014610843578063d505accf14610863578063dd62ed3e1461088357005b806396fb3eaf1161010a57806396fb3eaf14610715578063983b2d56146107355780639b4f44b614610755578063a457c2d714610775578063a9059cbb14610795578063aa271e1a146107b557005b806370a082311461064857806379cc67901461067e5780637ecebe001461069e57806382c03da5146106cb5780638b96412b146106e057806395d89b411461070057005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461059f57806342966c68146105bf5780634f189cb2146105df57806357a3a31b146105f457806357ad5ff6146106145780635d1ca6311461063457005b8063313ce567146104d7578063355274ea146104f95780633644e5151461050e578063392e53cd146105245780633950935114610543578063397b37431461056357005b806318636d3c1161023b57806318636d3c14610403578063191c918a1461042357806323b872dd1461044357806325b00243146104635780633092afd51461048357806330adf81f146104a357005b80627ffb781461027f57806301e88208146102b657806306fdde0314610306578063095ea7b314610328578063160a79251461035857806318160ddd146103e4575b005b34801561028b57600080fd5b50600b546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102c257600080fd5b506102ef6102d13660046137b4565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102ad565b34801561031257600080fd5b5061031b610962565b6040516102ad9190613829565b34801561033457600080fd5b5061034861034336600461383c565b6109f4565b60405190151581526020016102ad565b34801561036457600080fd5b506103c56103733660046137b4565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102ad565b3480156103f057600080fd5b506002545b6040519081526020016102ad565b34801561040f57600080fd5b5061027d61041e366004613a37565b610a0a565b34801561042f57600080fd5b5061027d61043e366004613a96565b610b1b565b34801561044f57600080fd5b5061034861045e366004613af5565b610c3f565b34801561046f57600080fd5b5061027d61047e3660046137b4565b610ceb565b34801561048f57600080fd5b5061027d61049e3660046137b4565b610d85565b3480156104af57600080fd5b506103f57f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104e357600080fd5b5060125b60405160ff90911681526020016102ad565b34801561050557600080fd5b506009546103f5565b34801561051a57600080fd5b506103f560105481565b34801561053057600080fd5b50600a54600160a01b900460ff16610348565b34801561054f57600080fd5b5061034861055e36600461383c565b610e1c565b34801561056f57600080fd5b50600d54600e54600f54604080516001600160a01b039485168152939092166020840152908201526060016102ad565b3480156105ab57600080fd5b5061027d6105ba36600461383c565b610e58565b3480156105cb57600080fd5b5061027d6105da366004613b36565b610f29565b3480156105eb57600080fd5b5061027d610f33565b34801561060057600080fd5b5061027d61060f3660046137b4565b61101a565b34801561062057600080fd5b5061027d61062f366004613af5565b61115c565b34801561064057600080fd5b5060026104e7565b34801561065457600080fd5b506103f56106633660046137b4565b6001600160a01b031660009081526020819052604090205490565b34801561068a57600080fd5b5061027d61069936600461383c565b6112b0565b3480156106aa57600080fd5b506103f56106b93660046137b4565b60116020526000908152604090205481565b3480156106d757600080fd5b5061027d611331565b3480156106ec57600080fd5b506103f56106fb366004613bdd565b61138b565b34801561070c57600080fd5b5061031b61154c565b34801561072157600080fd5b506103486107303660046137b4565b61155b565b34801561074157600080fd5b5061027d6107503660046137b4565b6115d6565b34801561076157600080fd5b5061027d610770366004613cb2565b61166d565b34801561078157600080fd5b5061034861079036600461383c565b611689565b3480156107a157600080fd5b506103486107b036600461383c565b611722565b3480156107c157600080fd5b506103486107d03660046137b4565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107fa57600080fd5b5061027d6108093660046137b4565b61172f565b34801561081a57600080fd5b5061027d610829366004613d5e565b6117c6565b34801561083a57600080fd5b506103f56118f7565b34801561084f57600080fd5b5061034861085e366004613e1a565b61190d565b34801561086f57600080fd5b5061027d61087e366004613f0a565b611a47565b34801561088f57600080fd5b506103f561089e366004613f78565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027d611c4e565b3480156108dd57600080fd5b50610299611c8e565b3480156108f257600080fd5b506103f5670de0b6b3a764000081565b34801561090e57600080fd5b5061027d61091d366004613fa6565b611d23565b34801561092e57600080fd5b5061029961093d366004613b36565b612101565b34801561094e57600080fd5b50601254610299906001600160a01b031681565b60606007805461097190614048565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614048565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b6000610a0133848461212b565b50600192915050565b604051631d746d8360e01b8152306004820152670de0b6b3a764000060248201819052336044830152906001600160a01b03831690631d746d8390606401600060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b50503360009081526020819052604090205483925090501015610ae05760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206765742044542066726f6d2044697370656e7365720060448201526064015b60405180910390fd5b610b16836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b610100015161224f565b505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610b65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b899190614083565b60200151610ba95760405162461bcd60e51b8152600401610ad790614107565b601254604051636b14d00560e11b81526001600160a01b0387811660048301523060248301819052604483018890526064830187905233608484015260a48301529091169063d629a00a9060c401600060405180830381600087803b158015610c1157600080fd5b505af1158015610c25573d6000803e3d6000fd5b505050508115610c3857610c388561267f565b5050505050565b6000610c4c848484612781565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610cd15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ad7565b610cde853385840361212b565b60019150505b9392505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190614083565b60200151610d795760405162461bcd60e51b8152600401610ad790614107565b610d8281612951565b50565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df39190614083565b60200151610e135760405162461bcd60e51b8152600401610ad790614107565b610d82816129b2565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a01918590610e53908690614152565b61212b565b3360009081526005602052604090205460ff16610eb75760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610ad7565b600954610ecd82610ec760025490565b90612a12565b1115610f1b5760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610ad7565b610f258282612a1e565b5050565b610d823382612afd565b600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa0919061416a565b6001600160a01b0316336001600160a01b0316146110005760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610ad7565b611008612c4b565b600c80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff16806110ab5750600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a69190614083565b602001515b61110b5760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610ad7565b61111481612cfa565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600d546001600160a01b031633146111c95760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610ad7565b6001600160a01b0383166112305760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610ad7565b600d80546001600160a01b038581166001600160a01b03199283168117909355600e8054918616919092168117909155600f839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b60006112bc833361089e565b90508181101561131a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610ad7565b611327833384840361212b565b610b168383612afd565b600b546001600160a01b031633146110005760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610ad7565b600b5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190614083565b6020015161141a5760405162461bcd60e51b8152600401610ad790614107565b308360038151811061142e5761142e614187565b6001600160a01b039283166020918202929092010152601254604051638244937560e01b815291169063824493759061146f9087908790879060040161419d565b6020604051808303816000875af115801561148e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b29190614231565b90506000826004815181106114c9576114c9614187565b602002602001015111156114e0576114e08461267f565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061151557611515614187565b602002602001015160405161153d9291909182526001600160a01b0316602082015260400190565b60405180910390a19392505050565b60606008805461097190614048565b600b5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af11580156115a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cc9190614083565b6020015192915050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116449190614083565b602001516116645760405162461bcd60e51b8152600401610ad790614107565b610d828161267f565b61167e89898989898989898961224f565b505050505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548281101561170b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ad7565b611718338585840361212b565b5060019392505050565b6000610a01338484612781565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611779573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179d9190614083565b602001516117bd5760405162461bcd60e51b8152600401610ad790614107565b610d8281612d1c565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611810573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118349190614083565b602001516118545760405162461bcd60e51b8152600401610ad790614107565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600b546301caf8fd60e31b83529092506001600160a01b031690630e57c7e8906118c09084908790879060040161424a565b600060405180830381600087803b1580156118da57600080fd5b505af11580156118ee573d6000803e3d6000fd5b50505050505050565b61190a6064670de0b6b3a7640000614280565b81565b600a54600090600160a01b900460ff16156119845760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610ad7565b611a386119918b8d6142a2565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250611a3392508991508a9050614329565b612e2a565b9b9a5050505050505050505050565b43841015611a8a5760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610ad7565b6010546001600160a01b038816600090815260116020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611add83614390565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611b5692919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611bc1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611bf75750886001600160a01b0316816001600160a01b0316145b611c435760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610ad7565b61167e89898961212b565b611c56611c8e565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610d82573d6000803e3d6000fd5b600c546000906001600160a01b0316611d1357600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e919061416a565b905090565b50600c546001600160a01b031690565b80516020820151604051634c87087d60e01b815260009283926001600160a01b0390911691634c87087d91611d5e9160040190815260200190565b61018060405180830381865afa158015611d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da091906143ab565b5050505050505050935050925050306001600160a01b0316826001600160a01b031614611e1f5760405162461bcd60e51b815260206004820152602760248201527f5468697320466978656452617465206973206e6f742070726f766964696e67206044820152661d1a1a5cc8111560ca1b6064820152608401610ad7565b8251602084015160405163c99733a760e01b81526004810191909152670de0b6b3a7640000602482015260009182916001600160a01b039091169063c99733a790604401608060405180830381865afa158015611e80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea49190614468565b5050915091508460400151821115611f0e5760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b6064820152608401610ad7565b6000670de0b6b3a7640000866060015183611f29919061449e565b611f339190614280565b9050611f3f8184614152565b9250611f566001600160a01b038516333086613329565b8551611f6d906001600160a01b0386169085613394565b8551602087015160405163412dae6b60e11b81526004810191909152670de0b6b3a76400006024820152604481018590526001600160a01b039091169063825b5cd690606401600060405180830381600087803b158015611fcd57600080fd5b505af1158015611fe1573d6000803e3d6000fd5b505030600090815260208190526040902054670de0b6b3a764000092509050101561204e5760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206275792044542066726f6d20466978656452617465006044820152606401610ad7565b6120613033670de0b6b3a7640000612781565b6120978760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f610100015161224f565b80156120b75760808601516120b7906001600160a01b0386169083613446565b60408051338152602081018590529081018290527fe89458a7527f4bf466ab18794ab8b1ca208b478483a1a87bcf0d976d421b4aff9060600160405180910390a150505050505050565b6006818154811061211157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b03831661218d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ad7565b6001600160a01b0382166121ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ad7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b33600090815260208190526040812054670de0b6b3a764000091908211156122c75760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610ad7565b600d5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a36000600f541180156123425750600e546001600160a01b031615155b80156123585750600d546001600160a01b031615155b1561248357600f54600e5461237c916001600160a01b039091169033903090613329565b600f5461238a906064613476565b600d54600f549192506123c0916001600160a01b03909116906123ad9084613482565b600e546001600160a01b03169190613446565b600e54600d54600f546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b4906124059085613482565b60405190815260200160405180910390a3801561248357600a54600e54612439916001600160a01b03918216911683613446565b600e54600a546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c6040516020016124d794939291906144bd565b604051602081830303815290604052805190602001206040516020016124fe929190614503565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015612569573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b0316146125cd5760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610ad7565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051612618959493929190614525565b60405180910390a360008a11801561263857506001600160a01b038b1615155b801561264c57506001600160a01b038c1615155b15612666576126666001600160a01b038c16338e8d613329565b61266f85610f29565b5050505050505050505050505050565b6001600160a01b0381166000908152600560205260409020805460ff16156126e95760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610ad7565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166127e55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ad7565b6001600160a01b0382166128475760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ad7565b6001600160a01b038316600090815260208190526040902054818110156128bf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ad7565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906128f6908490614152565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161294291815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906127759042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906127759042904390918252602082015260400190565b6000610ce48284614152565b6001600160a01b038216612a745760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ad7565b8060026000828254612a869190614152565b90915550506001600160a01b03821660009081526020819052604081208054839290612ab3908490614152565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216612b5d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ad7565b6001600160a01b03821660009081526020819052604090205481811015612bd15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ad7565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612c0090849061455e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612cb15760006005600060068481548110612c7157612c71614187565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612ca981614390565b915050612c4e565b50612cbe600660006136d8565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612d965760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610ad7565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a79101612775565b60008084600081518110612e4057612e40614187565b60200260200101519050600085600181518110612e5f57612e5f614187565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612ee15760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610ad7565b6001600160a01b038116612f5d5760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610ad7565b84600081518110612f7057612f70614187565b602002602001015160001415612fd45760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610ad7565b84600081518110612fe757612fe7614187565b60200260200101516009819055508760008151811061300857613008614187565b6020026020010151600790805190602001906130259291906136f6565b508760018151811061303957613039614187565b6020026020010151600890805190602001906130569291906136f6565b50600b80546001600160a01b0319166001600160a01b03841617905585518690600290811061308757613087614187565b6020908102919091010151601280546001600160a01b039283166001600160a01b0319909116179055600a80546001600160a81b03191691831691909117600160a01b17905586516130f19088906000906130e4576130e4614187565b602002602001015161267f565b60006001600160a01b03168760018151811061310f5761310f614187565b60200260200101516001600160a01b0316146131b9576131488760018151811061313b5761313b614187565b6020026020010151612cfa565b8660018151811061315b5761315b614187565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516131b0929190918252602082015260400190565b60405180910390a35b866002815181106131cc576131cc614187565b6020026020010151600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061320d5761320d614187565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061324e5761324e614187565b6020026020010151600f8190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60076040516132919190614575565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206010555050600a54600160a01b900460ff16979650505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261294b9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261348e565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156133e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134099190614231565b6134139190614152565b6040516001600160a01b03851660248201526044810182905290915061294b90859063095ea7b360e01b9060640161335d565b6040516001600160a01b038316602482015260448101829052610b1690849063a9059cbb60e01b9060640161335d565b6000610ce48284614280565b6000610ce4828461455e565b60006134e3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135609092919063ffffffff16565b805190915015610b1657808060200190518101906135019190614611565b610b165760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ad7565b606061356f8484600085613577565b949350505050565b6060824710156135d85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ad7565b843b6136265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad7565b600080866001600160a01b03168587604051613642919061462e565b60006040518083038185875af1925050503d806000811461367f576040519150601f19603f3d011682016040523d82523d6000602084013e613684565b606091505b509150915061369482828661369f565b979650505050505050565b606083156136ae575081610ce4565b8251156136be5782518084602001fd5b8160405162461bcd60e51b8152600401610ad79190613829565b5080546000825590600052602060002090810190610d82919061377a565b82805461370290614048565b90600052602060002090601f016020900481019282613724576000855561376a565b82601f1061373d57805160ff191683800117855561376a565b8280016001018555821561376a579182015b8281111561376a57825182559160200191906001019061374f565b5061377692915061377a565b5090565b5b80821115613776576000815560010161377b565b6001600160a01b0381168114610d8257600080fd5b80356137af8161378f565b919050565b6000602082840312156137c657600080fd5b8135610ce48161378f565b60005b838110156137ec5781810151838201526020016137d4565b8381111561294b5750506000910152565b600081518084526138158160208601602086016137d1565b601f01601f19169290920160200192915050565b602081526000610ce460208301846137fd565b6000806040838503121561384f57600080fd5b823561385a8161378f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b03811182821017156138a1576138a1613868565b60405290565b60405160a081016001600160401b03811182821017156138a1576138a1613868565b604051601f8201601f191681016001600160401b03811182821017156138f1576138f1613868565b604052919050565b803560ff811681146137af57600080fd5b60006001600160401b0383111561392357613923613868565b613936601f8401601f19166020016138c9565b905082815283838301111561394a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261397257600080fd5b610ce48383356020850161390a565b6000610120828403121561399457600080fd5b61399c61387e565b90506139a7826137a4565b8152602082013560208201526139bf604083016137a4565b60408201526139d0606083016137a4565b6060820152608082013560808201526139eb60a083016138f9565b60a082015260c082013560c082015260e082013560e0820152610100808301356001600160401b03811115613a1f57600080fd5b613a2b85828601613961565b82840152505092915050565b60008060408385031215613a4a57600080fd5b82356001600160401b03811115613a6057600080fd5b613a6c85828601613981565b9250506020830135613a7d8161378f565b809150509250929050565b8015158114610d8257600080fd5b600080600080600060a08688031215613aae57600080fd5b8535613ab98161378f565b945060208601359350604086013592506060860135613ad781613a88565b91506080860135613ae78161378f565b809150509295509295909350565b600080600060608486031215613b0a57600080fd5b8335613b158161378f565b92506020840135613b258161378f565b929592945050506040919091013590565b600060208284031215613b4857600080fd5b5035919050565b60006001600160401b03821115613b6857613b68613868565b5060051b60200190565b600082601f830112613b8357600080fd5b81356020613b98613b9383613b4f565b6138c9565b82815260059290921b84018101918181019086841115613bb757600080fd5b8286015b84811015613bd25780358352918301918301613bbb565b509695505050505050565b600080600060608486031215613bf257600080fd5b8335613bfd8161378f565b92506020848101356001600160401b0380821115613c1a57600080fd5b818701915087601f830112613c2e57600080fd5b8135613c3c613b9382613b4f565b81815260059190911b8301840190848101908a831115613c5b57600080fd5b938501935b82851015613c82578435613c738161378f565b82529385019390850190613c60565b965050506040870135925080831115613c9a57600080fd5b5050613ca886828701613b72565b9150509250925092565b60008060008060008060008060006101208a8c031215613cd157600080fd5b8935613cdc8161378f565b985060208a0135975060408a0135613cf38161378f565b965060608a0135613d038161378f565b955060808a01359450613d1860a08b016138f9565b935060c08a0135925060e08a013591506101008a01356001600160401b03811115613d4257600080fd5b613d4e8c828d01613961565b9150509295985092959850929598565b60008060208385031215613d7157600080fd5b82356001600160401b0380821115613d8857600080fd5b818501915085601f830112613d9c57600080fd5b813581811115613dab57600080fd5b866020828501011115613dbd57600080fd5b60209290920196919550909350505050565b60008083601f840112613de157600080fd5b5081356001600160401b03811115613df857600080fd5b6020830191508360208260051b8501011115613e1357600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613e3957600080fd5b8a356001600160401b0380821115613e5057600080fd5b613e5c8e838f01613dcf565b909c509a5060208d0135915080821115613e7557600080fd5b613e818e838f01613dcf565b909a50985060408d0135915080821115613e9a57600080fd5b613ea68e838f01613dcf565b909850965060608d0135915080821115613ebf57600080fd5b613ecb8e838f01613dcf565b909650945060808d0135915080821115613ee457600080fd5b50613ef18d828e01613dcf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613f2557600080fd5b8735613f308161378f565b96506020880135613f408161378f565b95506040880135945060608801359350613f5c608089016138f9565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613f8b57600080fd5b8235613f968161378f565b91506020830135613a7d8161378f565b60008082840360c0811215613fba57600080fd5b83356001600160401b03811115613fd057600080fd5b613fdc86828701613981565b93505060a0601f1982011215613ff157600080fd5b50613ffa6138a7565b60208401356140088161378f565b8082525060408401356020820152606084013560408201526080840135606082015260a08401356140388161378f565b6080820152919491935090915050565b600181811c9082168061405c57607f821691505b6020821081141561407d57634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561409557600080fd5b604051608081018181106001600160401b03821117156140b7576140b7613868565b60405282516140c581613a88565b815260208301516140d581613a88565b602082015260408301516140e881613a88565b604082015260608301516140fb81613a88565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156141655761416561413c565b500190565b60006020828403121561417c57600080fd5b8151610ce48161378f565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038481168252606060208084018290528551918401829052600092868201929091906080860190855b818110156141eb5785518516835294830194918301916001016141cd565b5050858103604087015286518082529082019350915080860160005b8381101561422357815185529382019390820190600101614207565b509298975050505050505050565b60006020828403121561424357600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261429d57634e487b7160e01b600052601260045260246000fd5b500490565b60006142b0613b9384613b4f565b80848252602080830192508560051b8501368111156142ce57600080fd5b855b8181101561431d5780356001600160401b038111156142ef5760008081fd5b870136601f8201126143015760008081fd5b61430f36823586840161390a565b8652509382019382016142d0565b50919695505050505050565b6000614337613b9384613b4f565b80848252602080830192508560051b85013681111561435557600080fd5b855b8181101561431d5780356001600160401b038111156143765760008081fd5b61438236828a01613961565b865250938201938201614357565b60006000198214156143a4576143a461413c565b5060010190565b6000806000806000806000806000806000806101808d8f0312156143ce57600080fd5b8c516143d98161378f565b60208e0151909c506143ea8161378f565b60408e015160608f0151919c509a506144028161378f565b8099505060808d0151975060a08d0151965060c08d015161442281613a88565b8096505060e08d015194506101008d015193506101208d015192506101408d015191506101608d015161445481613a88565b809150509295989b509295989b509295989b565b6000806000806080858703121561447e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008160001904831182151516156144b8576144b861413c565b500290565b600085516144cf818460208a016137d1565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b600083516145158184602088016137d1565b9190910191825250602001919050565b85815260a06020820152600061453e60a08301876137fd565b60ff95909516604083015250606081019290925260809091015292915050565b6000828210156145705761457061413c565b500390565b600080835481600182811c91508083168061459157607f831692505b60208084108214156145b157634e487b7160e01b86526022600452602486fd5b8180156145c557600181146145d657614603565b60ff19861689528489019650614603565b60008a81526020902060005b868110156145fb5781548b8201529085019083016145e2565b505084890196505b509498975050505050505050565b60006020828403121561462357600080fd5b8151610ce481613a88565b600082516146408184602087016137d1565b919091019291505056fea2646970667358221220e699977a632305500789a54d95895f0d61fc856504b03a9419a04049ee9031d464736f6c634300080a0033",deployedBytecode:"0x60806040526004361061027d5760003560e01c806370a082311161014e578063aa492ef9116100bb578063e086e5ec11610077578063e086e5ec146108c9578063e487c2e8146108d1578063ec342ad0146108e6578063ee88ade114610902578063ef867ff414610922578063f887ea401461094257005b8063aa492ef9146107ee578063ab62f0e11461080e578063b2263a5d1461082e578063b3998be014610843578063d505accf14610863578063dd62ed3e1461088357005b806396fb3eaf1161010a57806396fb3eaf14610715578063983b2d56146107355780639b4f44b614610755578063a457c2d714610775578063a9059cbb14610795578063aa271e1a146107b557005b806370a082311461064857806379cc67901461067e5780637ecebe001461069e57806382c03da5146106cb5780638b96412b146106e057806395d89b411461070057005b8063313ce567116101ec57806340c10f19116101a857806340c10f191461059f57806342966c68146105bf5780634f189cb2146105df57806357a3a31b146105f457806357ad5ff6146106145780635d1ca6311461063457005b8063313ce567146104d7578063355274ea146104f95780633644e5151461050e578063392e53cd146105245780633950935114610543578063397b37431461056357005b806318636d3c1161023b57806318636d3c14610403578063191c918a1461042357806323b872dd1461044357806325b00243146104635780633092afd51461048357806330adf81f146104a357005b80627ffb781461027f57806301e88208146102b657806306fdde0314610306578063095ea7b314610328578063160a79251461035857806318160ddd146103e4575b005b34801561028b57600080fd5b50600b546001600160a01b03165b6040516001600160a01b0390911681526020015b60405180910390f35b3480156102c257600080fd5b506102ef6102d13660046137b4565b60056020526000908152604090205460ff8082169161010090041682565b6040805192151583529015156020830152016102ad565b34801561031257600080fd5b5061031b610962565b6040516102ad9190613829565b34801561033457600080fd5b5061034861034336600461383c565b6109f4565b60405190151581526020016102ad565b34801561036457600080fd5b506103c56103733660046137b4565b6040805180820190915260008082526020820152506001600160a01b031660009081526005602090815260409182902082518084019093525460ff808216151584526101009091041615159082015290565b60408051825115158152602092830151151592810192909252016102ad565b3480156103f057600080fd5b506002545b6040519081526020016102ad565b34801561040f57600080fd5b5061027d61041e366004613a37565b610a0a565b34801561042f57600080fd5b5061027d61043e366004613a96565b610b1b565b34801561044f57600080fd5b5061034861045e366004613af5565b610c3f565b34801561046f57600080fd5b5061027d61047e3660046137b4565b610ceb565b34801561048f57600080fd5b5061027d61049e3660046137b4565b610d85565b3480156104af57600080fd5b506103f57f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b3480156104e357600080fd5b5060125b60405160ff90911681526020016102ad565b34801561050557600080fd5b506009546103f5565b34801561051a57600080fd5b506103f560105481565b34801561053057600080fd5b50600a54600160a01b900460ff16610348565b34801561054f57600080fd5b5061034861055e36600461383c565b610e1c565b34801561056f57600080fd5b50600d54600e54600f54604080516001600160a01b039485168152939092166020840152908201526060016102ad565b3480156105ab57600080fd5b5061027d6105ba36600461383c565b610e58565b3480156105cb57600080fd5b5061027d6105da366004613b36565b610f29565b3480156105eb57600080fd5b5061027d610f33565b34801561060057600080fd5b5061027d61060f3660046137b4565b61101a565b34801561062057600080fd5b5061027d61062f366004613af5565b61115c565b34801561064057600080fd5b5060026104e7565b34801561065457600080fd5b506103f56106633660046137b4565b6001600160a01b031660009081526020819052604090205490565b34801561068a57600080fd5b5061027d61069936600461383c565b6112b0565b3480156106aa57600080fd5b506103f56106b93660046137b4565b60116020526000908152604090205481565b3480156106d757600080fd5b5061027d611331565b3480156106ec57600080fd5b506103f56106fb366004613bdd565b61138b565b34801561070c57600080fd5b5061031b61154c565b34801561072157600080fd5b506103486107303660046137b4565b61155b565b34801561074157600080fd5b5061027d6107503660046137b4565b6115d6565b34801561076157600080fd5b5061027d610770366004613cb2565b61166d565b34801561078157600080fd5b5061034861079036600461383c565b611689565b3480156107a157600080fd5b506103486107b036600461383c565b611722565b3480156107c157600080fd5b506103486107d03660046137b4565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156107fa57600080fd5b5061027d6108093660046137b4565b61172f565b34801561081a57600080fd5b5061027d610829366004613d5e565b6117c6565b34801561083a57600080fd5b506103f56118f7565b34801561084f57600080fd5b5061034861085e366004613e1a565b61190d565b34801561086f57600080fd5b5061027d61087e366004613f0a565b611a47565b34801561088f57600080fd5b506103f561089e366004613f78565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027d611c4e565b3480156108dd57600080fd5b50610299611c8e565b3480156108f257600080fd5b506103f5670de0b6b3a764000081565b34801561090e57600080fd5b5061027d61091d366004613fa6565b611d23565b34801561092e57600080fd5b5061029961093d366004613b36565b612101565b34801561094e57600080fd5b50601254610299906001600160a01b031681565b60606007805461097190614048565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614048565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b5050505050905090565b6000610a0133848461212b565b50600192915050565b604051631d746d8360e01b8152306004820152670de0b6b3a764000060248201819052336044830152906001600160a01b03831690631d746d8390606401600060405180830381600087803b158015610a6257600080fd5b505af1158015610a76573d6000803e3d6000fd5b50503360009081526020819052604090205483925090501015610ae05760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206765742044542066726f6d2044697370656e7365720060448201526064015b60405180910390fd5b610b16836000015184602001518560400151866060015187608001518860a001518960c001518a60e001518b610100015161224f565b505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610b65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b899190614083565b60200151610ba95760405162461bcd60e51b8152600401610ad790614107565b601254604051636b14d00560e11b81526001600160a01b0387811660048301523060248301819052604483018890526064830187905233608484015260a48301529091169063d629a00a9060c401600060405180830381600087803b158015610c1157600080fd5b505af1158015610c25573d6000803e3d6000fd5b505050508115610c3857610c388561267f565b5050505050565b6000610c4c848484612781565b6001600160a01b038416600090815260016020908152604080832033845290915290205482811015610cd15760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b6064820152608401610ad7565b610cde853385840361212b565b60019150505b9392505050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610d35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d599190614083565b60200151610d795760405162461bcd60e51b8152600401610ad790614107565b610d8281612951565b50565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015610dcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610df39190614083565b60200151610e135760405162461bcd60e51b8152600401610ad790614107565b610d82816129b2565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610a01918590610e53908690614152565b61212b565b3360009081526005602052604090205460ff16610eb75760405162461bcd60e51b815260206004820152601960248201527f455243323054656d706c6174653a204e4f54204d494e544552000000000000006044820152606401610ad7565b600954610ecd82610ec760025490565b90612a12565b1115610f1b5760405162461bcd60e51b815260206004820152601f60248201527f44617461546f6b656e54656d706c6174653a20636170206578636565646564006044820152606401610ad7565b610f258282612a1e565b5050565b610d823382612afd565b600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015610f7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fa0919061416a565b6001600160a01b0316336001600160a01b0316146110005760405162461bcd60e51b815260206004820152601b60248201527f455243323054656d706c6174653a206e6f74204e46544f776e657200000000006044820152606401610ad7565b611008612c4b565b600c80546001600160a01b0319169055565b33600090815260056020526040902054610100900460ff16806110ab5750600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611082573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a69190614083565b602001515b61110b5760405162461bcd60e51b815260206004820152602b60248201527f455243323054656d706c6174653a204e4f54205041594d454e54204d414e414760448201526a22a91037b91027aba722a960a91b6064820152608401610ad7565b61111481612cfa565b604080514281524360208201526001600160a01b0383169133917f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc910160405180910390a350565b600d546001600160a01b031633146111c95760405162461bcd60e51b815260206004820152602a60248201527f455243323054656d706c6174653a206e6f74207075626c6973684d61726b65746044820152694665654164647265737360b01b6064820152608401610ad7565b6001600160a01b0383166112305760405162461bcd60e51b815260206004820152602860248201527f496e76616c6964205f7075626c6973684d61726b657446656541646472657373604482015267206164647265737360c01b6064820152608401610ad7565b600d80546001600160a01b038581166001600160a01b03199283168117909355600e8054918616919092168117909155600f839055604080513381526020810193909352820152606081018290527fe0b85b6f04fa914cf57f6401c5672a83a32b1c388d194c3d78e17f2897d46f439060800160405180910390a1505050565b60006112bc833361089e565b90508181101561131a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b6064820152608401610ad7565b611327833384840361212b565b610b168383612afd565b600b546001600160a01b031633146110005760405162461bcd60e51b815260206004820152601f60248201527f455243323054656d706c6174653a204e4f542037323120436f6e7472616374006044820152606401610ad7565b600b5460405163160a792560e01b81523360048201526000916001600160a01b03169063160a7925906024016080604051808303816000875af11580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa9190614083565b6020015161141a5760405162461bcd60e51b8152600401610ad790614107565b308360038151811061142e5761142e614187565b6001600160a01b039283166020918202929092010152601254604051638244937560e01b815291169063824493759061146f9087908790879060040161419d565b6020604051808303816000875af115801561148e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114b29190614231565b90506000826004815181106114c9576114c9614187565b602002602001015111156114e0576114e08461267f565b7f195d202f33578769e120c3041341554af3193e67ee004175095bc9c06e6e6165818460008151811061151557611515614187565b602002602001015160405161153d9291909182526001600160a01b0316602082015260400190565b60405180910390a19392505050565b60606008805461097190614048565b600b5460405163160a792560e01b81526001600160a01b038381166004830152600092169063160a7925906024016080604051808303816000875af11580156115a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115cc9190614083565b6020015192915050565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116449190614083565b602001516116645760405162461bcd60e51b8152600401610ad790614107565b610d828161267f565b61167e89898989898989898961224f565b505050505050505050565b3360009081526001602090815260408083206001600160a01b03861684529091528120548281101561170b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610ad7565b611718338585840361212b565b5060019392505050565b6000610a01338484612781565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611779573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179d9190614083565b602001516117bd5760405162461bcd60e51b8152600401610ad790614107565b610d8281612d1c565b600b5460405163160a792560e01b81523360048201526001600160a01b039091169063160a7925906024016080604051808303816000875af1158015611810573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118349190614083565b602001516118545760405162461bcd60e51b8152600401610ad790614107565b6040516bffffffffffffffffffffffff193060601b16602082015260009060340160408051601f19818403018152908290528051602090910120600b546301caf8fd60e31b83529092506001600160a01b031690630e57c7e8906118c09084908790879060040161424a565b600060405180830381600087803b1580156118da57600080fd5b505af11580156118ee573d6000803e3d6000fd5b50505050505050565b61190a6064670de0b6b3a7640000614280565b81565b600a54600090600160a01b900460ff16156119845760405162461bcd60e51b815260206004820152603160248201527f455243323054656d706c6174653a20746f6b656e20696e7374616e636520616c6044820152701c9958591e481a5b9a5d1a585b1a5e9959607a1b6064820152608401610ad7565b611a386119918b8d6142a2565b8a8a8080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808e0282810182019093528d82529093508d92508c91829185019084908082843760009201919091525050604080516020808d0282810182019093528c82529093508c92508b918291850190849080828437600092019190915250611a3392508991508a9050614329565b612e2a565b9b9a5050505050505050505050565b43841015611a8a5760405162461bcd60e51b815260206004820152601060248201526f115490cc8c11150e881156141254915160821b6044820152606401610ad7565b6010546001600160a01b038816600090815260116020526040812080549192917f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9918b918b918b919087611add83614390565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e00160405160208183030381529060405280519060200120604051602001611b5692919061190160f01b81526002810192909252602282015260420190565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015611bc1573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611bf75750886001600160a01b0316816001600160a01b0316145b611c435760405162461bcd60e51b815260206004820152601a60248201527f455243323044543a20494e56414c49445f5349474e41545552450000000000006044820152606401610ad7565b61167e89898961212b565b611c56611c8e565b6001600160a01b03166108fc479081150290604051600060405180830381858888f19350505050158015610d82573d6000803e3d6000fd5b600c546000906001600160a01b0316611d1357600b546040516331a9108f60e11b8152600160048201526001600160a01b0390911690636352211e90602401602060405180830381865afa158015611cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d0e919061416a565b905090565b50600c546001600160a01b031690565b80516020820151604051634c87087d60e01b815260009283926001600160a01b0390911691634c87087d91611d5e9160040190815260200190565b61018060405180830381865afa158015611d7c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611da091906143ab565b5050505050505050935050925050306001600160a01b0316826001600160a01b031614611e1f5760405162461bcd60e51b815260206004820152602760248201527f5468697320466978656452617465206973206e6f742070726f766964696e67206044820152661d1a1a5cc8111560ca1b6064820152608401610ad7565b8251602084015160405163c99733a760e01b81526004810191909152670de0b6b3a7640000602482015260009182916001600160a01b039091169063c99733a790604401608060405180830381865afa158015611e80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ea49190614468565b5050915091508460400151821115611f0e5760405162461bcd60e51b815260206004820152602760248201527f46697865645261746545786368616e67653a20546f6f206d616e79206261736560448201526620746f6b656e7360c81b6064820152608401610ad7565b6000670de0b6b3a7640000866060015183611f29919061449e565b611f339190614280565b9050611f3f8184614152565b9250611f566001600160a01b038516333086613329565b8551611f6d906001600160a01b0386169085613394565b8551602087015160405163412dae6b60e11b81526004810191909152670de0b6b3a76400006024820152604481018590526001600160a01b039091169063825b5cd690606401600060405180830381600087803b158015611fcd57600080fd5b505af1158015611fe1573d6000803e3d6000fd5b505030600090815260208190526040902054670de0b6b3a764000092509050101561204e5760405162461bcd60e51b815260206004820152601f60248201527f556e61626c6520746f206275792044542066726f6d20466978656452617465006044820152606401610ad7565b6120613033670de0b6b3a7640000612781565b6120978760000151886020015189604001518a606001518b608001518c60a001518d60c001518e60e001518f610100015161224f565b80156120b75760808601516120b7906001600160a01b0386169083613446565b60408051338152602081018590529081018290527fe89458a7527f4bf466ab18794ab8b1ca208b478483a1a87bcf0d976d421b4aff9060600160405180910390a150505050505050565b6006818154811061211157600080fd5b6000918252602090912001546001600160a01b0316905081565b6001600160a01b03831661218d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ad7565b6001600160a01b0382166121ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ad7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b33600090815260208190526040812054670de0b6b3a764000091908211156122c75760405162461bcd60e51b815260206004820152602560248201527f4e6f7420656e6f756768204461746120546f6b656e7320746f2073746172742060448201526427b93232b960d91b6064820152608401610ad7565b600d5460408051338152602081018590529081018c90524260608201524360808201526001600160a01b03918216918d16907fe1c4fa794edfa8f619b8257a077398950357b9c6398528f94480307352f9afcc9060a00160405180910390a36000600f541180156123425750600e546001600160a01b031615155b80156123585750600d546001600160a01b031615155b1561248357600f54600e5461237c916001600160a01b039091169033903090613329565b600f5461238a906064613476565b600d54600f549192506123c0916001600160a01b03909116906123ad9084613482565b600e546001600160a01b03169190613446565b600e54600d54600f546001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b4906124059085613482565b60405190815260200160405180910390a3801561248357600a54600e54612439916001600160a01b03918216911683613446565b600e54600a546040518381526001600160a01b0392831692909116907ff666b31c81334b6085802ba4149907fa724689d43bc31df6de1a51291ddc55b49060200160405180910390a35b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152509050600081858c8c8c6040516020016124d794939291906144bd565b604051602081830303815290604052805190602001206040516020016124fe929190614503565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8c1692840192909252606083018a9052608083018990529092509060019060a0016020604051602081039080840390855afa158015612569573d6000803e3d6000fd5b5050506020604051035190508b6001600160a01b0316816001600160a01b0316146125cd5760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642070726f76696465722066656560601b6044820152606401610ad7565b8a6001600160a01b03168c6001600160a01b03167f144fc6ed7d0a617ba44a01131b1f724d0370297a3640b6201f343e081ada64468c898d8d8d604051612618959493929190614525565b60405180910390a360008a11801561263857506001600160a01b038b1615155b801561264c57506001600160a01b038c1615155b15612666576126666001600160a01b038c16338e8d613329565b61266f85610f29565b5050505050505050505050505050565b6001600160a01b0381166000908152600560205260409020805460ff16156126e95760405162461bcd60e51b815260206004820152601d60248201527f4552433230526f6c65733a2020414c52454144592041204d494e5445520000006044820152606401610ad7565b8054600160ff19909116811782556006805491820181556000527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b038416908117909155604080514281524360208201523392917f4f7e100eb1ee13e903798bd0d6aa854152e07eb05544f392b9409c12935c809591015b60405180910390a35050565b6001600160a01b0383166127e55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ad7565b6001600160a01b0382166128475760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ad7565b6001600160a01b038316600090815260208190526040902054818110156128bf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ad7565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906128f6908490614152565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161294291815260200190565b60405180910390a35b50505050565b6001600160a01b03811660008181526005602052604090819020805461ff00191681559051909133917faee911eec8b2df8f3ae0464841541b1e5f339519bd5cf51889fe8b07fecff658906127759042904390918252602082015260400190565b6001600160a01b03811660008181526005602052604090819020805460ff191681559051909133917fefa2735987005aaa89c050c0ff8cc9ae7d9079d19382081c429130f98c52d480906127759042904390918252602082015260400190565b6000610ce48284614152565b6001600160a01b038216612a745760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ad7565b8060026000828254612a869190614152565b90915550506001600160a01b03821660009081526020819052604081208054839290612ab3908490614152565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b038216612b5d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ad7565b6001600160a01b03821660009081526020819052604090205481811015612bd15760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ad7565b6001600160a01b0383166000908152602081905260408120838303905560028054849290612c0090849061455e565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b60005b600654811015612cb15760006005600060068481548110612c7157612c71614187565b60009182526020808320909101546001600160a01b031683528201929092526040019020805461ffff191690555080612ca981614390565b915050612c4e565b50612cbe600660006136d8565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811660009081526005602052604090208054610100900460ff1615612d965760405162461bcd60e51b815260206004820152602260248201527f4552433230526f6c65733a2020414c5245414459204120464545204d414e414760448201526122a960f11b6064820152608401610ad7565b805461ff001916610100178155600680546001810182556000919091527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0384166001600160a01b03199091168117909155604080514281524360208201523392917fb17da2e9910b4ba5754e8872385ba315a238bafb5ae221fc85093c33432c40a79101612775565b60008084600081518110612e4057612e40614187565b60200260200101519050600085600181518110612e5f57612e5f614187565b6020026020010151905060006001600160a01b0316826001600160a01b03161415612ee15760405162461bcd60e51b815260206004820152602c60248201527f455243323054656d706c6174653a20496e76616c6964206d696e7465722c202060448201526b7a65726f206164647265737360a01b6064820152608401610ad7565b6001600160a01b038116612f5d5760405162461bcd60e51b815260206004820152603c60248201527f455243323054656d706c6174653a20496e76616c696420636f6d6d756e69747960448201527f2066656520636f6c6c6563746f722c207a65726f2061646472657373000000006064820152608401610ad7565b84600081518110612f7057612f70614187565b602002602001015160001415612fd45760405162461bcd60e51b8152602060048201526024808201527f44617461546f6b656e54656d706c6174653a20496e76616c6964206361702076604482015263616c756560e01b6064820152608401610ad7565b84600081518110612fe757612fe7614187565b60200260200101516009819055508760008151811061300857613008614187565b6020026020010151600790805190602001906130259291906136f6565b508760018151811061303957613039614187565b6020026020010151600890805190602001906130569291906136f6565b50600b80546001600160a01b0319166001600160a01b03841617905585518690600290811061308757613087614187565b6020908102919091010151601280546001600160a01b039283166001600160a01b0319909116179055600a80546001600160a81b03191691831691909117600160a01b17905586516130f19088906000906130e4576130e4614187565b602002602001015161267f565b60006001600160a01b03168760018151811061310f5761310f614187565b60200260200101516001600160a01b0316146131b9576131488760018151811061313b5761313b614187565b6020026020010151612cfa565b8660018151811061315b5761315b614187565b60200260200101516001600160a01b0316336001600160a01b03167f4d7694d695c57cc54947177c8e8a0e61aae664e9223492a798c32fadfc6419cc42436040516131b0929190918252602082015260400190565b60405180910390a35b866002815181106131cc576131cc614187565b6020026020010151600d60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508660038151811061320d5761320d614187565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b031602179055508460018151811061324e5761324e614187565b6020026020010151600f8190555060004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60076040516132919190614575565b60408051918290038220828201825260018352603160f81b6020938401528151928301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018290523060a082015260c00160408051808303601f1901815291905280516020909101206010555050600a54600160a01b900460ff16979650505050505050565b6040516001600160a01b038085166024830152831660448201526064810182905261294b9085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261348e565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa1580156133e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134099190614231565b6134139190614152565b6040516001600160a01b03851660248201526044810182905290915061294b90859063095ea7b360e01b9060640161335d565b6040516001600160a01b038316602482015260448101829052610b1690849063a9059cbb60e01b9060640161335d565b6000610ce48284614280565b6000610ce4828461455e565b60006134e3826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135609092919063ffffffff16565b805190915015610b1657808060200190518101906135019190614611565b610b165760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ad7565b606061356f8484600085613577565b949350505050565b6060824710156135d85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ad7565b843b6136265760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ad7565b600080866001600160a01b03168587604051613642919061462e565b60006040518083038185875af1925050503d806000811461367f576040519150601f19603f3d011682016040523d82523d6000602084013e613684565b606091505b509150915061369482828661369f565b979650505050505050565b606083156136ae575081610ce4565b8251156136be5782518084602001fd5b8160405162461bcd60e51b8152600401610ad79190613829565b5080546000825590600052602060002090810190610d82919061377a565b82805461370290614048565b90600052602060002090601f016020900481019282613724576000855561376a565b82601f1061373d57805160ff191683800117855561376a565b8280016001018555821561376a579182015b8281111561376a57825182559160200191906001019061374f565b5061377692915061377a565b5090565b5b80821115613776576000815560010161377b565b6001600160a01b0381168114610d8257600080fd5b80356137af8161378f565b919050565b6000602082840312156137c657600080fd5b8135610ce48161378f565b60005b838110156137ec5781810151838201526020016137d4565b8381111561294b5750506000910152565b600081518084526138158160208601602086016137d1565b601f01601f19169290920160200192915050565b602081526000610ce460208301846137fd565b6000806040838503121561384f57600080fd5b823561385a8161378f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60405161012081016001600160401b03811182821017156138a1576138a1613868565b60405290565b60405160a081016001600160401b03811182821017156138a1576138a1613868565b604051601f8201601f191681016001600160401b03811182821017156138f1576138f1613868565b604052919050565b803560ff811681146137af57600080fd5b60006001600160401b0383111561392357613923613868565b613936601f8401601f19166020016138c9565b905082815283838301111561394a57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261397257600080fd5b610ce48383356020850161390a565b6000610120828403121561399457600080fd5b61399c61387e565b90506139a7826137a4565b8152602082013560208201526139bf604083016137a4565b60408201526139d0606083016137a4565b6060820152608082013560808201526139eb60a083016138f9565b60a082015260c082013560c082015260e082013560e0820152610100808301356001600160401b03811115613a1f57600080fd5b613a2b85828601613961565b82840152505092915050565b60008060408385031215613a4a57600080fd5b82356001600160401b03811115613a6057600080fd5b613a6c85828601613981565b9250506020830135613a7d8161378f565b809150509250929050565b8015158114610d8257600080fd5b600080600080600060a08688031215613aae57600080fd5b8535613ab98161378f565b945060208601359350604086013592506060860135613ad781613a88565b91506080860135613ae78161378f565b809150509295509295909350565b600080600060608486031215613b0a57600080fd5b8335613b158161378f565b92506020840135613b258161378f565b929592945050506040919091013590565b600060208284031215613b4857600080fd5b5035919050565b60006001600160401b03821115613b6857613b68613868565b5060051b60200190565b600082601f830112613b8357600080fd5b81356020613b98613b9383613b4f565b6138c9565b82815260059290921b84018101918181019086841115613bb757600080fd5b8286015b84811015613bd25780358352918301918301613bbb565b509695505050505050565b600080600060608486031215613bf257600080fd5b8335613bfd8161378f565b92506020848101356001600160401b0380821115613c1a57600080fd5b818701915087601f830112613c2e57600080fd5b8135613c3c613b9382613b4f565b81815260059190911b8301840190848101908a831115613c5b57600080fd5b938501935b82851015613c82578435613c738161378f565b82529385019390850190613c60565b965050506040870135925080831115613c9a57600080fd5b5050613ca886828701613b72565b9150509250925092565b60008060008060008060008060006101208a8c031215613cd157600080fd5b8935613cdc8161378f565b985060208a0135975060408a0135613cf38161378f565b965060608a0135613d038161378f565b955060808a01359450613d1860a08b016138f9565b935060c08a0135925060e08a013591506101008a01356001600160401b03811115613d4257600080fd5b613d4e8c828d01613961565b9150509295985092959850929598565b60008060208385031215613d7157600080fd5b82356001600160401b0380821115613d8857600080fd5b818501915085601f830112613d9c57600080fd5b813581811115613dab57600080fd5b866020828501011115613dbd57600080fd5b60209290920196919550909350505050565b60008083601f840112613de157600080fd5b5081356001600160401b03811115613df857600080fd5b6020830191508360208260051b8501011115613e1357600080fd5b9250929050565b60008060008060008060008060008060a08b8d031215613e3957600080fd5b8a356001600160401b0380821115613e5057600080fd5b613e5c8e838f01613dcf565b909c509a5060208d0135915080821115613e7557600080fd5b613e818e838f01613dcf565b909a50985060408d0135915080821115613e9a57600080fd5b613ea68e838f01613dcf565b909850965060608d0135915080821115613ebf57600080fd5b613ecb8e838f01613dcf565b909650945060808d0135915080821115613ee457600080fd5b50613ef18d828e01613dcf565b915080935050809150509295989b9194979a5092959850565b600080600080600080600060e0888a031215613f2557600080fd5b8735613f308161378f565b96506020880135613f408161378f565b95506040880135945060608801359350613f5c608089016138f9565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215613f8b57600080fd5b8235613f968161378f565b91506020830135613a7d8161378f565b60008082840360c0811215613fba57600080fd5b83356001600160401b03811115613fd057600080fd5b613fdc86828701613981565b93505060a0601f1982011215613ff157600080fd5b50613ffa6138a7565b60208401356140088161378f565b8082525060408401356020820152606084013560408201526080840135606082015260a08401356140388161378f565b6080820152919491935090915050565b600181811c9082168061405c57607f821691505b6020821081141561407d57634e487b7160e01b600052602260045260246000fd5b50919050565b60006080828403121561409557600080fd5b604051608081018181106001600160401b03821117156140b7576140b7613868565b60405282516140c581613a88565b815260208301516140d581613a88565b602082015260408301516140e881613a88565b604082015260608301516140fb81613a88565b60608201529392505050565b6020808252818101527f455243323054656d706c6174653a204e4f54204445504c4f59455220524f4c45604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600082198211156141655761416561413c565b500190565b60006020828403121561417c57600080fd5b8151610ce48161378f565b634e487b7160e01b600052603260045260246000fd5b6001600160a01b038481168252606060208084018290528551918401829052600092868201929091906080860190855b818110156141eb5785518516835294830194918301916001016141cd565b5050858103604087015286518082529082019350915080860160005b8381101561422357815185529382019390820190600101614207565b509298975050505050505050565b60006020828403121561424357600080fd5b5051919050565b83815260406020820152816040820152818360608301376000818301606090810191909152601f909201601f1916010192915050565b60008261429d57634e487b7160e01b600052601260045260246000fd5b500490565b60006142b0613b9384613b4f565b80848252602080830192508560051b8501368111156142ce57600080fd5b855b8181101561431d5780356001600160401b038111156142ef5760008081fd5b870136601f8201126143015760008081fd5b61430f36823586840161390a565b8652509382019382016142d0565b50919695505050505050565b6000614337613b9384613b4f565b80848252602080830192508560051b85013681111561435557600080fd5b855b8181101561431d5780356001600160401b038111156143765760008081fd5b61438236828a01613961565b865250938201938201614357565b60006000198214156143a4576143a461413c565b5060010190565b6000806000806000806000806000806000806101808d8f0312156143ce57600080fd5b8c516143d98161378f565b60208e0151909c506143ea8161378f565b60408e015160608f0151919c509a506144028161378f565b8099505060808d0151975060a08d0151965060c08d015161442281613a88565b8096505060e08d015194506101008d015193506101208d015192506101408d015191506101608d015161445481613a88565b809150509295989b509295989b509295989b565b6000806000806080858703121561447e57600080fd5b505082516020840151604085015160609095015191969095509092509050565b60008160001904831182151516156144b8576144b861413c565b500290565b600085516144cf818460208a016137d1565b6bffffffffffffffffffffffff19606096871b8116919093019081529390941b166014830152602882015260480192915050565b600083516145158184602088016137d1565b9190910191825250602001919050565b85815260a06020820152600061453e60a08301876137fd565b60ff95909516604083015250606081019290925260809091015292915050565b6000828210156145705761457061413c565b500390565b600080835481600182811c91508083168061459157607f831692505b60208084108214156145b157634e487b7160e01b86526022600452602486fd5b8180156145c557600181146145d657614603565b60ff19861689528489019650614603565b60008a81526020902060005b868110156145fb5781548b8201529085019083016145e2565b505084890196505b509498975050505050505050565b60006020828403121561462357600080fd5b8151610ce481613a88565b600082516146408184602087016137d1565b919091019291505056fea2646970667358221220e699977a632305500789a54d95895f0d61fc856504b03a9419a04049ee9031d464736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}},$={_format:"hh-sol-artifact-1",contractName:"ERC721Template",sourceName:"contracts/templates/ERC721Template.sol",abi:[{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedTo725StoreList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedToCreateERC20List",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"AddedToMetadataList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"approved",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"operator",type:"address"},{indexed:!1,internalType:"bool",name:"approved",type:"bool"}],name:"ApprovalForAll",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"CleanedPermissions",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"contractAddress",type:"address"}],name:"ContractCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"bytes32",name:"key",type:"bytes32"},{indexed:!1,internalType:"bytes",name:"value",type:"bytes"}],name:"DataChanged",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"uint256",name:"_operation",type:"uint256"},{indexed:!0,internalType:"address",name:"_to",type:"address"},{indexed:!0,internalType:"uint256",name:"_value",type:"uint256"},{indexed:!1,internalType:"bytes",name:"_data",type:"bytes"}],name:"Executed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"createdBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"string",name:"decryptorUrl",type:"string"},{indexed:!1,internalType:"bytes",name:"flags",type:"bytes"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataState",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"uint8",name:"state",type:"uint8"},{indexed:!1,internalType:"string",name:"decryptorUrl",type:"string"},{indexed:!1,internalType:"bytes",name:"flags",type:"bytes"},{indexed:!1,internalType:"bytes",name:"data",type:"bytes"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"MetadataUpdated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"validator",type:"address"},{indexed:!1,internalType:"bytes32",name:"metaDataHash",type:"bytes32"},{indexed:!1,internalType:"uint8",name:"v",type:"uint8"},{indexed:!1,internalType:"bytes32",name:"r",type:"bytes32"},{indexed:!1,internalType:"bytes32",name:"s",type:"bytes32"}],name:"MetadataValidated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFrom725StoreList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFromCreateERC20List",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedFromMetadataList",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"user",type:"address"},{indexed:!0,internalType:"address",name:"signer",type:"address"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"RemovedManager",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"uint256",name:"cap",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"}],name:"TokenCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"updatedBy",type:"address"},{indexed:!1,internalType:"string",name:"tokenURI",type:"string"},{indexed:!1,internalType:"uint256",name:"tokenID",type:"uint256"},{indexed:!1,internalType:"uint256",name:"timestamp",type:"uint256"},{indexed:!1,internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"TokenURIUpdate",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!0,internalType:"uint256",name:"tokenId",type:"uint256"}],name:"Transfer",type:"event"},{stateMutability:"payable",type:"fallback"},{inputs:[{internalType:"address",name:"_managerAddress",type:"address"}],name:"addManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addTo725StoreList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addToCreateERC20List",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"addToMetadataList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"approve",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"",type:"uint256"}],name:"auth",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"}],name:"balanceOf",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"cleanPermissions",outputs:[],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:"createERC20",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"_operation",type:"uint256"},{internalType:"address",name:"_to",type:"address"},{internalType:"uint256",name:"_value",type:"uint256"},{internalType:"bytes",name:"_data",type:"bytes"}],name:"executeCall",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"getApproved",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"}],name:"getData",outputs:[{internalType:"bytes",name:"_value",type:"bytes"}],stateMutability:"view",type:"function"},{inputs:[],name:"getId",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"pure",type:"function"},{inputs:[],name:"getMetaData",outputs:[{internalType:"string",name:"",type:"string"},{internalType:"string",name:"",type:"string"},{internalType:"uint8",name:"",type:"uint8"},{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"user",type:"address"}],name:"getPermissions",outputs:[{components:[{internalType:"bool",name:"manager",type:"bool"},{internalType:"bool",name:"deployERC20",type:"bool"},{internalType:"bool",name:"updateMetadata",type:"bool"},{internalType:"bool",name:"store",type:"bool"}],internalType:"struct ERC721RolesAddress.Roles",name:"",type:"tuple"}],stateMutability:"view",type:"function"},{inputs:[],name:"getTokensList",outputs:[{internalType:"address[]",name:"",type:"address[]"}],stateMutability:"view",type:"function"},{inputs:[],name:"hasMetaData",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"string",name:"name_",type:"string"},{internalType:"string",name:"symbol_",type:"string"},{internalType:"address",name:"tokenFactory",type:"address"},{internalType:"address",name:"additionalERC20Deployer",type:"address"},{internalType:"string",name:"tokenURI",type:"string"}],name:"initialize",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"owner",type:"address"},{internalType:"address",name:"operator",type:"address"}],name:"isApprovedForAll",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"datatoken",type:"address"}],name:"isDeployed",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"account",type:"address"}],name:"isERC20Deployer",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"isInitialized",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataDecryptorAddress",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataDecryptorUrl",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[],name:"metaDataState",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"name",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"ownerOf",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFrom725StoreList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFromCreateERC20List",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_allowedAddress",type:"address"}],name:"removeFromMetadataList",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"_managerAddress",type:"address"}],name:"removeManager",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"operator",type:"address"},{internalType:"bool",name:"approved",type:"bool"}],name:"setApprovalForAll",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"string",name:"_baseURI",type:"string"}],name:"setBaseURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"},{internalType:"bytes",name:"_value",type:"bytes"}],name:"setDataERC20",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{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 ERC721Template.metaDataProof[]",name:"_metadataProofs",type:"tuple[]"}],name:"setMetaData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint8",name:"_metaDataState",type:"uint8"}],name:"setMetaDataState",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"bytes32",name:"_key",type:"bytes32"},{internalType:"bytes",name:"_value",type:"bytes"}],name:"setNewData",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"tokenURI",type:"string"}],name:"setTokenURI",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"ssContract",outputs:[{internalType:"address",name:"",type:"address"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bytes4",name:"interfaceId",type:"bytes4"}],name:"supportsInterface",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"tokenURI",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"from",type:"address"},{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"transferFrom",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[],name:"withdrawETH",outputs:[],stateMutability:"payable",type:"function"}],bytecode:"0x60806040523480156200001157600080fd5b50604080518082018252600881526754656d706c61746560c01b60208083019182528351808501909452600e84526d15195b5c1b185d1954de5b589bdb60921b908401528151919291620000689160009162000136565b5080516200007e90600190602084019062000136565b50620000959150632260147f60e11b9050620000b2565b620000a7632bd57b7360e01b620000b2565b6001600c5562000219565b6001600160e01b03198082161415620001115760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152600a60205260409020805460ff19166001179055565b8280546200014490620001dc565b90600052602060002090601f016020900481019282620001685760008555620001b3565b82601f106200018357805160ff1916838001178555620001b3565b82800160010185558215620001b3579182015b82811115620001b357825182559160200191906001019062000196565b50620001c1929150620001c5565b5090565b5b80821115620001c15760008155600101620001c6565b600181811c90821680620001f157607f821691505b602082108114156200021357634e487b7160e01b600052602260045260246000fd5b50919050565b6143cc80620002296000396000f3fe60806040526004361061025d5760003560e01c806354f6127f11610143578063a22cb465116100bb578063d2786ba411610077578063d2786ba41461082d578063d8053ad314610852578063e086e5ec14610871578063e38d7cad14610879578063e985e9c514610899578063fe1ec880146108e257005b8063a22cb46514610780578063ac18de43146107a0578063b0c41ead146107c0578063c55f8126146107e0578063c87b56dd146107f3578063ccd7d4761461081357005b806370a082311161010a57806370a082311461069157806370c166d7146106bf57806382cf129d146106df57806390184b02146106f457806395d89b411461072d57806396fb3eaf1461074257005b806354f6127f146105ef57806355f804b31461060f5780635d1ca6311461062f5780636352211e1461065157806367530a611461067157005b806323b872dd116101d6578063431053ac1161019d578063431053ac14610538578063466bca0214610558578063467c97f51461057a5780634a63740a1461059a5780634b2ee5e9146105ba5780634f189cb2146105da57005b806323b872dd146104a0578063273e06b3146104c05780632d06177a146104e0578063392e53cd1461050057806342842e0e1461051857005b80630e57c7e8116102255780630e57c7e81461032357806310c558bf14610343578063160a792514610363578063162094c41461044057806319c186e5146104605780631aa3adf91461048057005b806301ffc9a71461025f57806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee5780630e05662e1461030e575b005b34801561026b57600080fd5b5061027f61027a366004613545565b610902565b60405190151581526020015b60405180910390f35b3480156102a057600080fd5b506102a9610942565b60405161028b91906135c1565b3480156102c257600080fd5b506102d66102d13660046135d4565b6109d4565b6040516001600160a01b03909116815260200161028b565b3480156102fa57600080fd5b5061025d610309366004613602565b610a6e565b34801561031a57600080fd5b506102a9610b84565b34801561032f57600080fd5b5061025d61033e366004613676565b610c12565b34801561034f57600080fd5b5061025d61035e3660046136c1565b610c87565b34801561036f57600080fd5b5061040561037e3660046136c1565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b03166000908152600860209081526040918290208251608081018452905460ff808216151583526101008204811615159383019390935262010000810483161515938201939093526301000000909204161515606082015290565b60405161028b919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561044c57600080fd5b5061025d61045b3660046137bb565b610d5a565b34801561046c57600080fd5b5061025d61047b3660046136c1565b610de9565b34801561048c57600080fd5b5061025d61049b3660046138de565b610eb2565b3480156104ac57600080fd5b5061025d6104bb3660046139e5565b6112f0565b3480156104cc57600080fd5b5061025d6104db3660046136c1565b6113c2565b3480156104ec57600080fd5b5061025d6104fb3660046136c1565b6114fb565b34801561050c57600080fd5b50600f5460ff1661027f565b34801561052457600080fd5b5061025d6105333660046139e5565b61153e565b34801561054457600080fd5b5061025d6105533660046136c1565b6115e4565b34801561056457600080fd5b5061056d611719565b60405161028b9190613a26565b34801561058657600080fd5b5061025d610595366004613a73565b61177a565b3480156105a657600080fd5b5061025d6105b53660046136c1565b611805565b3480156105c657600080fd5b506014546102d6906001600160a01b031681565b3480156105e657600080fd5b5061025d6118ca565b3480156105fb57600080fd5b506102a961060a3660046135d4565b61190e565b34801561061b57600080fd5b5061025d61062a366004613a8e565b6119b0565b34801561063b57600080fd5b5060015b60405160ff909116815260200161028b565b34801561065d57600080fd5b506102d661066c3660046135d4565b611a01565b34801561067d57600080fd5b5061025d61068c366004613676565b611a78565b34801561069d57600080fd5b506106b16106ac3660046136c1565b611ae8565b60405190815260200161028b565b3480156106cb57600080fd5b5061027f6106da366004613ac2565b611b6f565b3480156106eb57600080fd5b506102a9611c8c565b34801561070057600080fd5b5061027f61070f3660046136c1565b6001600160a01b031660009081526015602052604090205460ff1690565b34801561073957600080fd5b506102a9611c99565b34801561074e57600080fd5b5061027f61075d3660046136c1565b6001600160a01b0316600090815260086020526040902054610100900460ff1690565b34801561078c57600080fd5b5061025d61079b366004613b90565b611ca8565b3480156107ac57600080fd5b5061025d6107bb3660046136c1565b611d66565b3480156107cc57600080fd5b506102d66107db3660046135d4565b611da9565b61025d6107ee366004613bce565b611dd3565b3480156107ff57600080fd5b506102a961080e3660046135d4565b611e1b565b34801561081f57600080fd5b5060125461063f9060ff1681565b34801561083957600080fd5b50610842611f79565b60405161028b9493929190613c37565b34801561085e57600080fd5b50600f5461027f90610100900460ff1681565b61025d6120c9565b34801561088557600080fd5b506102d6610894366004613cbc565b61210b565b3480156108a557600080fd5b5061027f6108b4366004613d8b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108ee57600080fd5b5061025d6108fd3660046136c1565b6122db565b60006301ffc9a760e01b6001600160e01b03198316148061093c57506001600160e01b031982166000908152600a602052604090205460ff165b92915050565b6060600d805461095190613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461097d90613db9565b80156109ca5780601f1061099f576101008083540402835291602001916109ca565b820191906000526020600020905b8154815290600101906020018083116109ad57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a7982611a01565b9050806001600160a01b0316836001600160a01b03161415610ae75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a49565b336001600160a01b0382161480610b035750610b0381336108b4565b610b755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a49565b610b7f838361240b565b505050565b60118054610b9190613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90613db9565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b505050505081565b3360009081526015602052604090205460ff16610c7c5760405162461bcd60e51b815260206004820152602260248201527f45524337323154656d706c6174653a204e4f5420455243323020436f6e74726160448201526118dd60f21b6064820152608401610a49565b610b7f838383612479565b3360009081526008602052604090205460ff161515600114610cbb5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805462ff000019166201000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917fc2a42571a74ce1442c8c44d375ba9442e7d55d94b37afeace261c83c62128fa490610d4e9042904390918252602082015260400190565b60405180910390a35050565b610d646001611a01565b6001600160a01b0316336001600160a01b031614610d945760405162461bcd60e51b8152600401610a4990613e2b565b610d9e82826124d2565b336001600160a01b03167f6de6cd3982065cbd31e789e3109106f4d76d1c8a46e85262045cf947fb3fd4ed82844243604051610ddd9493929190613e62565b60405180910390a25050565b3360009081526008602052604090205460ff161515600114610e1d5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805463ff0000001916630100000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917feb09276310ed110a7e565d64966d0ff68a47112d2dd5eeb6cbd7451836ce35ee90610d4e9042904390918252602082015260400190565b3360009081526008602052604090205462010000900460ff16610ee75760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff8d16179055610f0260108b8b613408565b50610f0f60118989613408565b50600f54610100900460ff16610f8657336001600160a01b03167f5463569dcc320958360074a9ab27e809e8a6942c394fb151d139b5f7b4ecb1bd8c8c8c8a8a8a8a8a4243604051610f6a9a99989796959493929190613efb565b60405180910390a2600f805461ff001916610100179055610fd8565b60125460405133917fe5c4cf86b1815151e6f453e1e133d4454ae3b0b07145db39f2e0178685deac8491610fcf9160ff16908e908e908c908c908c908c908c9042904390613efb565b60405180910390a25b60328151111561101c5760405162461bcd60e51b815260206004820152600f60248201526e546f6f204d616e792050726f6f667360881b6044820152606401610a49565b60408051808201909152601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015260005b82518110156112e15760006001600160a01b031683828151811061107957611079613f63565b6020026020010151600001516001600160a01b0316146111fb57600082856040516020016110a8929190613f79565b60405160208183030381529060405280519060200120905060006001828685815181106110d7576110d7613f63565b6020026020010151602001518786815181106110f5576110f5613f63565b60200260200101516040015188878151811061111357611113613f63565b60200260200101516060015160405160008152602001604052604051611155949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611177573d6000803e3d6000fd5b50505060206040510351905084838151811061119557611195613f63565b6020026020010151600001516001600160a01b0316816001600160a01b0316146111f85760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b210383937b7b31039b4b3b732b960611b6044820152606401610a49565b50505b82818151811061120d5761120d613f63565b6020026020010151600001516001600160a01b03167f2819d8badf5cff2c9220b8ee99dacc14d67058e343d7f0c2c444d198507fe9418585848151811061125657611256613f63565b60200260200101516020015186858151811061127457611274613f63565b60200260200101516040015187868151811061129257611292613f63565b6020026020010151606001516040516112c7949392919093845260ff9290921660208401526040830152606082015260800190565b60405180910390a2806112d981613fb1565b915050611053565b50505050505050505050505050565b806001146113105760405162461bcd60e51b8152600401610a4990613fcc565b61137a611375601380548060200260200160405190810160405280929190818152602001828054801561136c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161134e575b50505050505190565b61256c565b6113826125fd565b61138d8383836126ae565b611396826126ef565b506001600160a01b03166000908152600860205260409020805463ffffff001916630101010017905550565b3360009081526008602052604090205460ff161515600114806114135750336001600160a01b0382161480156114135750336000908152600860205260409020546301000000900460ff1615156001145b1561147b576001600160a01b03811660008181526008602052604090819020805463ff000000191681559051909133917fc929b18b08ffea86a1f95e29384dbe8968f2fcbd70cfd735df3aba1cc548cbf390610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604660248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2037323553746f6064820152651c99531a5cdd60d21b608482015260a401610a49565b50565b6115056001611a01565b6001600160a01b0316336001600160a01b0316146115355760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816126ef565b8060011461155e5760405162461bcd60e51b8152600401610a4990613fcc565b6115c1611375601380548060200260200160405190810160405280929190818152602001828054801561136c576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161134e5750505050505190565b6115c96125fd565b61138d83838360405180602001604052806000815250612780565b3360009081526008602052604090205460ff161515600114806116345750336001600160a01b03821614801561163457503360009081526008602052604090205462010000900460ff1615156001145b1561169b576001600160a01b03811660008181526008602052604090819020805462ff0000191681559051909133917f9b41e1311fa819e825bc77fa2568492112e15ea92d173f3f8ee1c8ec3c1c562b90610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604760248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d206d65746164616064820152661d18481b1a5cdd60ca1b608482015260a401610a49565b606060138054806020026020016040519081016040528092919081815260200182805480156109ca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611753575050505050905090565b3360009081526008602052604090205462010000900460ff166117af5760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff831690811790915560408051918252426020830152439082015233907fa8336411cc72db0e5bdc4dff989eeb35879bafaceffb59b54b37645c3395adb99060600160405180910390a250565b3360009081526008602052604090205460ff1615156001146118395760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805461ff00191661010017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917f0572d56343be407a66810f01449212e8545e14ff5049c479d34be944cdfd0d4f90610d4e9042904390918252602082015260400190565b6118d46001611a01565b6001600160a01b0316336001600160a01b0316146119045760405162461bcd60e51b8152600401610a4990613e2b565b61190c6125fd565b565b6000818152600b6020526040902080546060919061192b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461195790613db9565b80156119a45780601f10611979576101008083540402835291602001916119a4565b820191906000526020600020905b81548152906001019060200180831161198757829003601f168201915b50505050509050919050565b6119ba6001611a01565b6001600160a01b0316336001600160a01b0316146119ea5760405162461bcd60e51b8152600401610a4990613e2b565b80516119fd90600290602084019061348c565b5050565b6000818152600360205260408120546001600160a01b03168061093c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a49565b336000908152600860205260409020546301000000900460ff16610c7c5760405162461bcd60e51b815260206004820152602160248201527f45524337323154656d706c6174653a204e4f542053544f5245205550444154456044820152602960f91b6064820152608401610a49565b60006001600160a01b038216611b535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a49565b506001600160a01b031660009081526004602052604090205490565b600f5460009060ff1615611be05760405162461bcd60e51b815260206004820152603260248201527f45524337323154656d706c6174653a20746f6b656e20696e7374616e636520616044820152711b1c9958591e481a5b9a5d1a585b1a5e995960721b6064820152608401610a49565b6000611c5a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b90819084018382808284376000920191909152508b92508991506127b89050565b9050808015611c7157506001600160a01b03841615155b15611c7f57611c7f84611839565b9998505050505050505050565b60108054610b9190613db9565b6060600e805461095190613db9565b6001600160a01b038216331415611d015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a49565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610d4e565b611d706001611a01565b6001600160a01b0316336001600160a01b031614611da05760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816128f8565b60098181548110611db957600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526008602052604090205460ff161515600114611e075760405162461bcd60e51b8152600401610a4990613df4565b611e148585858585612958565b5050505050565b6000818152600360205260409020546060906001600160a01b0316611e9a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a49565b60008281526007602052604081208054611eb390613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611edf90613db9565b8015611f2c5780601f10611f0157610100808354040283529160200191611f2c565b820191906000526020600020905b815481529060010190602001808311611f0f57829003601f168201915b505050505090506000611f3d612b81565b825190915015611f72578082604051602001611f5a929190614018565b60405160208183030381529060405292505050919050565b5092915050565b60608060008060106011601260009054906101000a900460ff16600f60019054906101000a900460ff16838054611faf90613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdb90613db9565b80156120285780601f10611ffd57610100808354040283529160200191612028565b820191906000526020600020905b81548152906001019060200180831161200b57829003601f168201915b5050505050935082805461203b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461206790613db9565b80156120b45780601f10612089576101008083540402835291602001916120b4565b820191906000526020600020905b81548152906001019060200180831161209757829003601f168201915b50505050509250935093509350935090919293565b6120d36001611a01565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156114f8573d6000803e3d6000fd5b60006002600c5414156121605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a49565b6002600c5533600090815260086020526040902054610100900460ff166121d85760405162461bcd60e51b815260206004820152602660248201527f45524337323154656d706c6174653a204e4f542045524332304445504c4f5945604482015265525f524f4c4560d01b6064820152608401610a49565b601254604051630557fcfb60e41b815260009161010090046001600160a01b03169063557fcfb09061221e908e908e908e908e908e908e908e908e908e90600401614168565b6020604051808303816000875af115801561223d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122619190614219565b6001600160a01b0381166000818152601560205260408120805460ff191660019081179091556013805491820181559091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b03191690911790559150506001600c559998505050505050505050565b3360009081526008602052604090205460ff1615156001148061232b5750336001600160a01b03821614801561232b57503360009081526008602052604090205460ff6101009091041615156001145b15612391576001600160a01b03811660008181526008602052604090819020805461ff00191681559051909133917f59bd33f4c27cc16a2d74450e1fa43d7896020be9aecea4bee009db9294de899790610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604360248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2045524332304c6064820152621a5cdd60ea1b608482015260a401610a49565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061244082611a01565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000838152600b60205260409020612492908383613408565b50827fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b283836040516124c5929190614236565b60405180910390a2505050565b6000828152600360205260409020546001600160a01b031661254d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a49565b60008281526007602090815260409091208251610b7f9284019061348c565b60005b818110156119fd576013818154811061258a5761258a613f63565b6000918252602082200154604080516382c03da560e01b815290516001600160a01b03909216926382c03da59260048084019382900301818387803b1580156125d257600080fd5b505af11580156125e6573d6000803e3d6000fd5b5050505080806125f590613fb1565b91505061256f565b60005b600954811015612665576000600860006009848154811061262357612623613f63565b60009182526020808320909101546001600160a01b031683528201929092526040019020805463ffffffff19169055508061265d81613fb1565b915050612600565b5061267260096000613500565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b6126b83382612b90565b6126d45760405162461bcd60e51b8152600401610a499061424a565b610b7f83838360405180602001604052806000815250612780565b6001600160a01b038116600081815260086020526040808220805460ff19166001908117825560098054918201815590935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917faf8fc8b6726138c96881c895390a08e9d91a94c288f06281e7f9821c49c7155b90610d4e9042904390918252602082015260400190565b61278a3383612b90565b6127a65760405162461bcd60e51b8152600401610a499061424a565b6127b284848484612c87565b50505050565b60006001600160a01b0386166128275760405162461bcd60e51b815260206004820152602e60248201527f45524337323154656d706c6174653a3a20496e76616c6964206d696e7465722c60448201526d20207a65726f206164647265737360901b6064820152608401610a49565b845161283a90600d90602088019061348c565b50835161284e90600e90602087019061348c565b5060128054610100600160a81b0319166101006001600160a01b0386160217905560408051602081019182905260009081905261288d9160029161348c565b50600f805461ffff191660019081179091556128aa908790612cba565b6128b3866126ef565b6001600160a01b0386166000908152600860205260409020805463ffffff00191663010101001781556128e76001846124d2565b5050600f5460ff1695945050505050565b6001600160a01b03811660008181526008602052604090819020805460ff191681559051909133917fb572db0e6da4924b771ed1712b980d48b5992b9a1c27aede55fbb3318c48996a90610d4e9042904390918252602082015260400190565b82846001600160a01b0316867f1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b88585604051612995929190614236565b60405180910390a460006109c45a6129ad919061429b565b9050856129fd576129f7858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250612cd4915050565b50612b79565b6003861415612a46576129f78484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612cec92505050565b6002861415612b3a576000612a9d84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9892506020915087905061429b565b612d88565b90506000612aec85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250612ae79150602090508861429b565b612de6565b90506000612afb878484612ef3565b6040519091506001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a2505050612b79565b60405162461bcd60e51b815260206004820152601460248201527357726f6e67206f7065726174696f6e207479706560601b6044820152606401610a49565b505050505050565b60606002805461095190613db9565b6000818152600360205260408120546001600160a01b0316612c095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a49565b6000612c1483611a01565b9050806001600160a01b0316846001600160a01b03161480612c4f5750836001600160a01b0316612c44846109d4565b6001600160a01b0316145b80612c7f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b612c92848484612ff5565b612c9e84848484613195565b6127b25760405162461bcd60e51b8152600401610a49906142b2565b6119fd828260405180602001604052806000815250613293565b6000806000845160208601878987f195945050505050565b600081516020830184f090506001600160a01b038116612d4e5760405162461bcd60e51b815260206004820152601960248201527f436f756c64206e6f74206465706c6f7920636f6e7472616374000000000000006044820152606401610a49565b6040516001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a292915050565b6000612d95826020614304565b83511015612ddd5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a49565b50016020015190565b606081612df481601f614304565b1015612e335760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a49565b612e3d8284614304565b84511015612e815760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a49565b606082158015612ea05760405191506000825260208201604052612eea565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ed9578051835260209283019201612ec1565b5050858452601f01601f1916604052505b50949350505050565b60008084471015612f465760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610a49565b8251612f945760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610a49565b8383516020850187f590506001600160a01b038116612c7f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610a49565b826001600160a01b031661300882611a01565b6001600160a01b0316146130705760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a49565b6001600160a01b0382166130d25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a49565b6130dd60008261240b565b6001600160a01b038316600090815260046020526040812080546001929061310690849061429b565b90915550506001600160a01b0382166000908152600460205260408120805460019290613134908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b1561328857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d990339089908890889060040161431c565b6020604051808303816000875af1925050508015613214575060408051601f3d908101601f1916820190925261321191810190614359565b60015b61326e573d808015613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b5080516132665760405162461bcd60e51b8152600401610a49906142b2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c7f565b506001949350505050565b61329d83836132c6565b6132aa6000848484613195565b610b7f5760405162461bcd60e51b8152600401610a49906142b2565b6001600160a01b03821661331c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a49565b6000818152600360205260409020546001600160a01b0316156133815760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a49565b6001600160a01b03821660009081526004602052604081208054600192906133aa908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461341490613db9565b90600052602060002090601f016020900481019282613436576000855561347c565b82601f1061344f5782800160ff1982351617855561347c565b8280016001018555821561347c579182015b8281111561347c578235825591602001919060010190613461565b5061348892915061351a565b5090565b82805461349890613db9565b90600052602060002090601f0160209004810192826134ba576000855561347c565b82601f106134d357805160ff191683800117855561347c565b8280016001018555821561347c579182015b8281111561347c5782518255916020019190600101906134e5565b50805460008255906000526020600020908101906114f891905b5b80821115613488576000815560010161351b565b6001600160e01b0319811681146114f857600080fd5b60006020828403121561355757600080fd5b81356135628161352f565b9392505050565b60005b8381101561358457818101518382015260200161356c565b838111156127b25750506000910152565b600081518084526135ad816020860160208601613569565b601f01601f19169290920160200192915050565b6020815260006135626020830184613595565b6000602082840312156135e657600080fd5b5035919050565b6001600160a01b03811681146114f857600080fd5b6000806040838503121561361557600080fd5b8235613620816135ed565b946020939093013593505050565b60008083601f84011261364057600080fd5b5081356001600160401b0381111561365757600080fd5b60208301915083602082850101111561366f57600080fd5b9250929050565b60008060006040848603121561368b57600080fd5b8335925060208401356001600160401b038111156136a857600080fd5b6136b48682870161362e565b9497909650939450505050565b6000602082840312156136d357600080fd5b8135613562816135ed565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715613716576137166136de565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613744576137446136de565b604052919050565b600082601f83011261375d57600080fd5b81356001600160401b03811115613776576137766136de565b613789601f8201601f191660200161371c565b81815284602083860101111561379e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137ce57600080fd5b8235915060208301356001600160401b038111156137eb57600080fd5b6137f78582860161374c565b9150509250929050565b803560ff8116811461381257600080fd5b919050565b600082601f83011261382857600080fd5b813560206001600160401b03821115613843576138436136de565b613851818360051b0161371c565b82815260079290921b8401810191818101908684111561387057600080fd5b8286015b848110156138d3576080818903121561388d5760008081fd5b6138956136f4565b81356138a0816135ed565b81526138ad828601613801565b818601526040828101359082015260608083013590820152835291830191608001613874565b509695505050505050565b600080600080600080600080600080600060e08c8e0312156138ff57600080fd5b6139088c613801565b9a506001600160401b038060208e0135111561392357600080fd5b6139338e60208f01358f0161362e565b909b50995060408d013581101561394957600080fd5b6139598e60408f01358f0161362e565b909950975060608d013581101561396f57600080fd5b61397f8e60608f01358f0161362e565b909750955060808d013581101561399557600080fd5b6139a58e60808f01358f0161362e565b909550935060a08d0135925060c08d01358110156139c257600080fd5b506139d38d60c08e01358e01613817565b90509295989b509295989b9093969950565b6000806000606084860312156139fa57600080fd5b8335613a05816135ed565b92506020840135613a15816135ed565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b81811015613a675783516001600160a01b031683529284019291840191600101613a42565b50909695505050505050565b600060208284031215613a8557600080fd5b61356282613801565b600060208284031215613aa057600080fd5b81356001600160401b03811115613ab657600080fd5b612c7f8482850161374c565b60008060008060008060008060c0898b031215613ade57600080fd5b8835613ae9816135ed565b975060208901356001600160401b0380821115613b0557600080fd5b613b118c838d0161362e565b909950975060408b0135915080821115613b2a57600080fd5b613b368c838d0161362e565b909750955060608b01359150613b4b826135ed565b90935060808a013590613b5d826135ed565b90925060a08a01359080821115613b7357600080fd5b50613b808b828c0161374c565b9150509295985092959890939650565b60008060408385031215613ba357600080fd5b8235613bae816135ed565b915060208301358015158114613bc357600080fd5b809150509250929050565b600080600080600060808688031215613be657600080fd5b853594506020860135613bf8816135ed565b93506040860135925060608601356001600160401b03811115613c1a57600080fd5b613c268882890161362e565b969995985093965092949392505050565b608081526000613c4a6080830187613595565b8281036020840152613c5c8187613595565b60ff959095166040840152505090151560609091015292915050565b60008083601f840112613c8a57600080fd5b5081356001600160401b03811115613ca157600080fd5b6020830191508360208260051b850101111561366f57600080fd5b600080600080600080600080600060a08a8c031215613cda57600080fd5b8935985060208a01356001600160401b0380821115613cf857600080fd5b613d048d838e01613c78565b909a50985060408c0135915080821115613d1d57600080fd5b613d298d838e01613c78565b909850965060608c0135915080821115613d4257600080fd5b613d4e8d838e01613c78565b909650945060808c0135915080821115613d6757600080fd5b50613d748c828d01613c78565b915080935050809150509295985092959850929598565b60008060408385031215613d9e57600080fd5b8235613da9816135ed565b91506020830135613bc3816135ed565b600181811c90821680613dcd57607f821691505b60208210811415613dee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f455243373231526f6c6573416464726573733a204e4f54204d414e4147455200604082015260600190565b6020808252601c908201527f45524337323154656d706c6174653a206e6f74204e46544f776e657200000000604082015260600190565b608081526000613e756080830187613595565b6020830195909552506040810192909252606090910152919050565b60208082526021908201527f45524337323154656d706c6174653a204e4f54204d455441444154415f524f4c6040820152604560f81b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8b16815260e060208201526000613f1860e083018b8d613ed2565b8281036040840152613f2b818a8c613ed2565b90508281036060840152613f4081888a613ed2565b6080840196909652505060a081019290925260c090910152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b60008351613f8b818460208801613569565b9190910191825250602001919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fc557613fc5613f9b565b5060010190565b6020808252602c908201527f45524337323154656d706c6174653a2043616e6e6f74207472616e736665722060408201526b1d1a1a5cc81d1bdad95b925960a21b606082015260800190565b6000835161402a818460208801613569565b83519083019061403e818360208801613569565b01949350505050565b6000808335601e1984360301811261405e57600080fd5b83016020810192503590506001600160401b0381111561407d57600080fd5b80360383131561366f57600080fd5b8183526000602080850194508260005b858110156140ca5781356140af816135ed565b6001600160a01b03168752958201959082019060010161409c565b509495945050505050565b81835260006001600160fb1b038311156140ee57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b8781101561415b57828403895261413c8288614047565b614147868284613ed2565b9a87019a9550505090840190600101614125565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156141c95785840360bf190183526141a7828f614047565b6141b2868284613ed2565b95505050602092830192919091019060010161418c565b50505082810360408401526141df81898b61408c565b905082810360608401526141f48187896140d5565b9050828103608084015261420981858761410b565b9c9b505050505050505050505050565b60006020828403121561422b57600080fd5b8151613562816135ed565b602081526000612c7f602083018486613ed2565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000828210156142ad576142ad613f9b565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000821982111561431757614317613f9b565b500190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061434f90830184613595565b9695505050505050565b60006020828403121561436b57600080fd5b81516135628161352f56fe6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afa26469706673582212206d0bc2d2cba31628d81338472b8edc29d561d59a0f52686f6ad9fb78da838a2264736f6c634300080a0033",deployedBytecode:"0x60806040526004361061025d5760003560e01c806354f6127f11610143578063a22cb465116100bb578063d2786ba411610077578063d2786ba41461082d578063d8053ad314610852578063e086e5ec14610871578063e38d7cad14610879578063e985e9c514610899578063fe1ec880146108e257005b8063a22cb46514610780578063ac18de43146107a0578063b0c41ead146107c0578063c55f8126146107e0578063c87b56dd146107f3578063ccd7d4761461081357005b806370a082311161010a57806370a082311461069157806370c166d7146106bf57806382cf129d146106df57806390184b02146106f457806395d89b411461072d57806396fb3eaf1461074257005b806354f6127f146105ef57806355f804b31461060f5780635d1ca6311461062f5780636352211e1461065157806367530a611461067157005b806323b872dd116101d6578063431053ac1161019d578063431053ac14610538578063466bca0214610558578063467c97f51461057a5780634a63740a1461059a5780634b2ee5e9146105ba5780634f189cb2146105da57005b806323b872dd146104a0578063273e06b3146104c05780632d06177a146104e0578063392e53cd1461050057806342842e0e1461051857005b80630e57c7e8116102255780630e57c7e81461032357806310c558bf14610343578063160a792514610363578063162094c41461044057806319c186e5146104605780631aa3adf91461048057005b806301ffc9a71461025f57806306fdde0314610294578063081812fc146102b6578063095ea7b3146102ee5780630e05662e1461030e575b005b34801561026b57600080fd5b5061027f61027a366004613545565b610902565b60405190151581526020015b60405180910390f35b3480156102a057600080fd5b506102a9610942565b60405161028b91906135c1565b3480156102c257600080fd5b506102d66102d13660046135d4565b6109d4565b6040516001600160a01b03909116815260200161028b565b3480156102fa57600080fd5b5061025d610309366004613602565b610a6e565b34801561031a57600080fd5b506102a9610b84565b34801561032f57600080fd5b5061025d61033e366004613676565b610c12565b34801561034f57600080fd5b5061025d61035e3660046136c1565b610c87565b34801561036f57600080fd5b5061040561037e3660046136c1565b604080516080810182526000808252602082018190529181018290526060810191909152506001600160a01b03166000908152600860209081526040918290208251608081018452905460ff808216151583526101008204811615159383019390935262010000810483161515938201939093526301000000909204161515606082015290565b60405161028b919081511515815260208083015115159082015260408083015115159082015260609182015115159181019190915260800190565b34801561044c57600080fd5b5061025d61045b3660046137bb565b610d5a565b34801561046c57600080fd5b5061025d61047b3660046136c1565b610de9565b34801561048c57600080fd5b5061025d61049b3660046138de565b610eb2565b3480156104ac57600080fd5b5061025d6104bb3660046139e5565b6112f0565b3480156104cc57600080fd5b5061025d6104db3660046136c1565b6113c2565b3480156104ec57600080fd5b5061025d6104fb3660046136c1565b6114fb565b34801561050c57600080fd5b50600f5460ff1661027f565b34801561052457600080fd5b5061025d6105333660046139e5565b61153e565b34801561054457600080fd5b5061025d6105533660046136c1565b6115e4565b34801561056457600080fd5b5061056d611719565b60405161028b9190613a26565b34801561058657600080fd5b5061025d610595366004613a73565b61177a565b3480156105a657600080fd5b5061025d6105b53660046136c1565b611805565b3480156105c657600080fd5b506014546102d6906001600160a01b031681565b3480156105e657600080fd5b5061025d6118ca565b3480156105fb57600080fd5b506102a961060a3660046135d4565b61190e565b34801561061b57600080fd5b5061025d61062a366004613a8e565b6119b0565b34801561063b57600080fd5b5060015b60405160ff909116815260200161028b565b34801561065d57600080fd5b506102d661066c3660046135d4565b611a01565b34801561067d57600080fd5b5061025d61068c366004613676565b611a78565b34801561069d57600080fd5b506106b16106ac3660046136c1565b611ae8565b60405190815260200161028b565b3480156106cb57600080fd5b5061027f6106da366004613ac2565b611b6f565b3480156106eb57600080fd5b506102a9611c8c565b34801561070057600080fd5b5061027f61070f3660046136c1565b6001600160a01b031660009081526015602052604090205460ff1690565b34801561073957600080fd5b506102a9611c99565b34801561074e57600080fd5b5061027f61075d3660046136c1565b6001600160a01b0316600090815260086020526040902054610100900460ff1690565b34801561078c57600080fd5b5061025d61079b366004613b90565b611ca8565b3480156107ac57600080fd5b5061025d6107bb3660046136c1565b611d66565b3480156107cc57600080fd5b506102d66107db3660046135d4565b611da9565b61025d6107ee366004613bce565b611dd3565b3480156107ff57600080fd5b506102a961080e3660046135d4565b611e1b565b34801561081f57600080fd5b5060125461063f9060ff1681565b34801561083957600080fd5b50610842611f79565b60405161028b9493929190613c37565b34801561085e57600080fd5b50600f5461027f90610100900460ff1681565b61025d6120c9565b34801561088557600080fd5b506102d6610894366004613cbc565b61210b565b3480156108a557600080fd5b5061027f6108b4366004613d8b565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b3480156108ee57600080fd5b5061025d6108fd3660046136c1565b6122db565b60006301ffc9a760e01b6001600160e01b03198316148061093c57506001600160e01b031982166000908152600a602052604090205460ff165b92915050565b6060600d805461095190613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461097d90613db9565b80156109ca5780601f1061099f576101008083540402835291602001916109ca565b820191906000526020600020905b8154815290600101906020018083116109ad57829003601f168201915b5050505050905090565b6000818152600360205260408120546001600160a01b0316610a525760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600560205260409020546001600160a01b031690565b6000610a7982611a01565b9050806001600160a01b0316836001600160a01b03161415610ae75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a49565b336001600160a01b0382161480610b035750610b0381336108b4565b610b755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a49565b610b7f838361240b565b505050565b60118054610b9190613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054610bbd90613db9565b8015610c0a5780601f10610bdf57610100808354040283529160200191610c0a565b820191906000526020600020905b815481529060010190602001808311610bed57829003601f168201915b505050505081565b3360009081526015602052604090205460ff16610c7c5760405162461bcd60e51b815260206004820152602260248201527f45524337323154656d706c6174653a204e4f5420455243323020436f6e74726160448201526118dd60f21b6064820152608401610a49565b610b7f838383612479565b3360009081526008602052604090205460ff161515600114610cbb5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805462ff000019166201000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917fc2a42571a74ce1442c8c44d375ba9442e7d55d94b37afeace261c83c62128fa490610d4e9042904390918252602082015260400190565b60405180910390a35050565b610d646001611a01565b6001600160a01b0316336001600160a01b031614610d945760405162461bcd60e51b8152600401610a4990613e2b565b610d9e82826124d2565b336001600160a01b03167f6de6cd3982065cbd31e789e3109106f4d76d1c8a46e85262045cf947fb3fd4ed82844243604051610ddd9493929190613e62565b60405180910390a25050565b3360009081526008602052604090205460ff161515600114610e1d5760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805463ff0000001916630100000017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917feb09276310ed110a7e565d64966d0ff68a47112d2dd5eeb6cbd7451836ce35ee90610d4e9042904390918252602082015260400190565b3360009081526008602052604090205462010000900460ff16610ee75760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff8d16179055610f0260108b8b613408565b50610f0f60118989613408565b50600f54610100900460ff16610f8657336001600160a01b03167f5463569dcc320958360074a9ab27e809e8a6942c394fb151d139b5f7b4ecb1bd8c8c8c8a8a8a8a8a4243604051610f6a9a99989796959493929190613efb565b60405180910390a2600f805461ff001916610100179055610fd8565b60125460405133917fe5c4cf86b1815151e6f453e1e133d4454ae3b0b07145db39f2e0178685deac8491610fcf9160ff16908e908e908c908c908c908c908c9042904390613efb565b60405180910390a25b60328151111561101c5760405162461bcd60e51b815260206004820152600f60248201526e546f6f204d616e792050726f6f667360881b6044820152606401610a49565b60408051808201909152601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015260005b82518110156112e15760006001600160a01b031683828151811061107957611079613f63565b6020026020010151600001516001600160a01b0316146111fb57600082856040516020016110a8929190613f79565b60405160208183030381529060405280519060200120905060006001828685815181106110d7576110d7613f63565b6020026020010151602001518786815181106110f5576110f5613f63565b60200260200101516040015188878151811061111357611113613f63565b60200260200101516060015160405160008152602001604052604051611155949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015611177573d6000803e3d6000fd5b50505060206040510351905084838151811061119557611195613f63565b6020026020010151600001516001600160a01b0316816001600160a01b0316146111f85760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b210383937b7b31039b4b3b732b960611b6044820152606401610a49565b50505b82818151811061120d5761120d613f63565b6020026020010151600001516001600160a01b03167f2819d8badf5cff2c9220b8ee99dacc14d67058e343d7f0c2c444d198507fe9418585848151811061125657611256613f63565b60200260200101516020015186858151811061127457611274613f63565b60200260200101516040015187868151811061129257611292613f63565b6020026020010151606001516040516112c7949392919093845260ff9290921660208401526040830152606082015260800190565b60405180910390a2806112d981613fb1565b915050611053565b50505050505050505050505050565b806001146113105760405162461bcd60e51b8152600401610a4990613fcc565b61137a611375601380548060200260200160405190810160405280929190818152602001828054801561136c57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161134e575b50505050505190565b61256c565b6113826125fd565b61138d8383836126ae565b611396826126ef565b506001600160a01b03166000908152600860205260409020805463ffffff001916630101010017905550565b3360009081526008602052604090205460ff161515600114806114135750336001600160a01b0382161480156114135750336000908152600860205260409020546301000000900460ff1615156001145b1561147b576001600160a01b03811660008181526008602052604090819020805463ff000000191681559051909133917fc929b18b08ffea86a1f95e29384dbe8968f2fcbd70cfd735df3aba1cc548cbf390610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604660248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2037323553746f6064820152651c99531a5cdd60d21b608482015260a401610a49565b50565b6115056001611a01565b6001600160a01b0316336001600160a01b0316146115355760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816126ef565b8060011461155e5760405162461bcd60e51b8152600401610a4990613fcc565b6115c1611375601380548060200260200160405190810160405280929190818152602001828054801561136c576020028201919060005260206000209081546001600160a01b0316815260019091019060200180831161134e5750505050505190565b6115c96125fd565b61138d83838360405180602001604052806000815250612780565b3360009081526008602052604090205460ff161515600114806116345750336001600160a01b03821614801561163457503360009081526008602052604090205462010000900460ff1615156001145b1561169b576001600160a01b03811660008181526008602052604090819020805462ff0000191681559051909133917f9b41e1311fa819e825bc77fa2568492112e15ea92d173f3f8ee1c8ec3c1c562b90610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604760248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d206d65746164616064820152661d18481b1a5cdd60ca1b608482015260a401610a49565b606060138054806020026020016040519081016040528092919081815260200182805480156109ca57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611753575050505050905090565b3360009081526008602052604090205462010000900460ff166117af5760405162461bcd60e51b8152600401610a4990613e91565b6012805460ff191660ff831690811790915560408051918252426020830152439082015233907fa8336411cc72db0e5bdc4dff989eeb35879bafaceffb59b54b37645c3395adb99060600160405180910390a250565b3360009081526008602052604090205460ff1615156001146118395760405162461bcd60e51b8152600401610a4990613df4565b6001600160a01b038116600081815260086020526040808220805461ff00191661010017815560098054600181018255935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917f0572d56343be407a66810f01449212e8545e14ff5049c479d34be944cdfd0d4f90610d4e9042904390918252602082015260400190565b6118d46001611a01565b6001600160a01b0316336001600160a01b0316146119045760405162461bcd60e51b8152600401610a4990613e2b565b61190c6125fd565b565b6000818152600b6020526040902080546060919061192b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461195790613db9565b80156119a45780601f10611979576101008083540402835291602001916119a4565b820191906000526020600020905b81548152906001019060200180831161198757829003601f168201915b50505050509050919050565b6119ba6001611a01565b6001600160a01b0316336001600160a01b0316146119ea5760405162461bcd60e51b8152600401610a4990613e2b565b80516119fd90600290602084019061348c565b5050565b6000818152600360205260408120546001600160a01b03168061093c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a49565b336000908152600860205260409020546301000000900460ff16610c7c5760405162461bcd60e51b815260206004820152602160248201527f45524337323154656d706c6174653a204e4f542053544f5245205550444154456044820152602960f91b6064820152608401610a49565b60006001600160a01b038216611b535760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a49565b506001600160a01b031660009081526004602052604090205490565b600f5460009060ff1615611be05760405162461bcd60e51b815260206004820152603260248201527f45524337323154656d706c6174653a20746f6b656e20696e7374616e636520616044820152711b1c9958591e481a5b9a5d1a585b1a5e995960721b6064820152608401610a49565b6000611c5a8a8a8a8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8e018190048102820181019092528c815292508c91508b90819084018382808284376000920191909152508b92508991506127b89050565b9050808015611c7157506001600160a01b03841615155b15611c7f57611c7f84611839565b9998505050505050505050565b60108054610b9190613db9565b6060600e805461095190613db9565b6001600160a01b038216331415611d015760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a49565b3360008181526006602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319101610d4e565b611d706001611a01565b6001600160a01b0316336001600160a01b031614611da05760405162461bcd60e51b8152600401610a4990613e2b565b6114f8816128f8565b60098181548110611db957600080fd5b6000918252602090912001546001600160a01b0316905081565b3360009081526008602052604090205460ff161515600114611e075760405162461bcd60e51b8152600401610a4990613df4565b611e148585858585612958565b5050505050565b6000818152600360205260409020546060906001600160a01b0316611e9a5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a49565b60008281526007602052604081208054611eb390613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611edf90613db9565b8015611f2c5780601f10611f0157610100808354040283529160200191611f2c565b820191906000526020600020905b815481529060010190602001808311611f0f57829003601f168201915b505050505090506000611f3d612b81565b825190915015611f72578082604051602001611f5a929190614018565b60405160208183030381529060405292505050919050565b5092915050565b60608060008060106011601260009054906101000a900460ff16600f60019054906101000a900460ff16838054611faf90613db9565b80601f0160208091040260200160405190810160405280929190818152602001828054611fdb90613db9565b80156120285780601f10611ffd57610100808354040283529160200191612028565b820191906000526020600020905b81548152906001019060200180831161200b57829003601f168201915b5050505050935082805461203b90613db9565b80601f016020809104026020016040519081016040528092919081815260200182805461206790613db9565b80156120b45780601f10612089576101008083540402835291602001916120b4565b820191906000526020600020905b81548152906001019060200180831161209757829003601f168201915b50505050509250935093509350935090919293565b6120d36001611a01565b6001600160a01b03166108fc479081150290604051600060405180830381858888f193505050501580156114f8573d6000803e3d6000fd5b60006002600c5414156121605760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a49565b6002600c5533600090815260086020526040902054610100900460ff166121d85760405162461bcd60e51b815260206004820152602660248201527f45524337323154656d706c6174653a204e4f542045524332304445504c4f5945604482015265525f524f4c4560d01b6064820152608401610a49565b601254604051630557fcfb60e41b815260009161010090046001600160a01b03169063557fcfb09061221e908e908e908e908e908e908e908e908e908e90600401614168565b6020604051808303816000875af115801561223d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122619190614219565b6001600160a01b0381166000818152601560205260408120805460ff191660019081179091556013805491820181559091527f66de8ffda797e3de9c05e8fc57b3bf0ec28a930d40b0d285d93c06501cf6a0900180546001600160a01b03191690911790559150506001600c559998505050505050505050565b3360009081526008602052604090205460ff1615156001148061232b5750336001600160a01b03821614801561232b57503360009081526008602052604090205460ff6101009091041615156001145b15612391576001600160a01b03811660008181526008602052604090819020805461ff00191681559051909133917f59bd33f4c27cc16a2d74450e1fa43d7896020be9aecea4bee009db9294de899790610d4e9042904390918252602082015260400190565b60405162461bcd60e51b815260206004820152604360248201527f455243373231526f6c6573416464726573733a204e6f7420656e6f756768207060448201527f65726d697373696f6e7320746f2072656d6f76652066726f6d2045524332304c6064820152621a5cdd60ea1b608482015260a401610a49565b600081815260056020526040902080546001600160a01b0319166001600160a01b038416908117909155819061244082611a01565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000838152600b60205260409020612492908383613408565b50827fece574603820d07bc9b91f2a932baadf4628aabcb8afba49776529c14a6104b283836040516124c5929190614236565b60405180910390a2505050565b6000828152600360205260409020546001600160a01b031661254d5760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a49565b60008281526007602090815260409091208251610b7f9284019061348c565b60005b818110156119fd576013818154811061258a5761258a613f63565b6000918252602082200154604080516382c03da560e01b815290516001600160a01b03909216926382c03da59260048084019382900301818387803b1580156125d257600080fd5b505af11580156125e6573d6000803e3d6000fd5b5050505080806125f590613fb1565b91505061256f565b60005b600954811015612665576000600860006009848154811061262357612623613f63565b60009182526020808320909101546001600160a01b031683528201929092526040019020805463ffffffff19169055508061265d81613fb1565b915050612600565b5061267260096000613500565b6040805142815243602082015233917f712bc71db81927a76b8bf1ea346247bb0ad58f18e4e5c1bd4aa0ec6573e02a2b910160405180910390a2565b6126b83382612b90565b6126d45760405162461bcd60e51b8152600401610a499061424a565b610b7f83838360405180602001604052806000815250612780565b6001600160a01b038116600081815260086020526040808220805460ff19166001908117825560098054918201815590935260008051602061437783398151915290920180546001600160a01b0319168417905551909133917faf8fc8b6726138c96881c895390a08e9d91a94c288f06281e7f9821c49c7155b90610d4e9042904390918252602082015260400190565b61278a3383612b90565b6127a65760405162461bcd60e51b8152600401610a499061424a565b6127b284848484612c87565b50505050565b60006001600160a01b0386166128275760405162461bcd60e51b815260206004820152602e60248201527f45524337323154656d706c6174653a3a20496e76616c6964206d696e7465722c60448201526d20207a65726f206164647265737360901b6064820152608401610a49565b845161283a90600d90602088019061348c565b50835161284e90600e90602087019061348c565b5060128054610100600160a81b0319166101006001600160a01b0386160217905560408051602081019182905260009081905261288d9160029161348c565b50600f805461ffff191660019081179091556128aa908790612cba565b6128b3866126ef565b6001600160a01b0386166000908152600860205260409020805463ffffff00191663010101001781556128e76001846124d2565b5050600f5460ff1695945050505050565b6001600160a01b03811660008181526008602052604090819020805460ff191681559051909133917fb572db0e6da4924b771ed1712b980d48b5992b9a1c27aede55fbb3318c48996a90610d4e9042904390918252602082015260400190565b82846001600160a01b0316867f1f920dbda597d7bf95035464170fa58d0a4b57f13a1c315ace6793b9f63688b88585604051612995929190614236565b60405180910390a460006109c45a6129ad919061429b565b9050856129fd576129f7858585858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250612cd4915050565b50612b79565b6003861415612a46576129f78484848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612cec92505050565b6002861415612b3a576000612a9d84848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250612a9892506020915087905061429b565b612d88565b90506000612aec85858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201829052509250612ae79150602090508861429b565b612de6565b90506000612afb878484612ef3565b6040519091506001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a2505050612b79565b60405162461bcd60e51b815260206004820152601460248201527357726f6e67206f7065726174696f6e207479706560601b6044820152606401610a49565b505050505050565b60606002805461095190613db9565b6000818152600360205260408120546001600160a01b0316612c095760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a49565b6000612c1483611a01565b9050806001600160a01b0316846001600160a01b03161480612c4f5750836001600160a01b0316612c44846109d4565b6001600160a01b0316145b80612c7f57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b612c92848484612ff5565b612c9e84848484613195565b6127b25760405162461bcd60e51b8152600401610a49906142b2565b6119fd828260405180602001604052806000815250613293565b6000806000845160208601878987f195945050505050565b600081516020830184f090506001600160a01b038116612d4e5760405162461bcd60e51b815260206004820152601960248201527f436f756c64206e6f74206465706c6f7920636f6e7472616374000000000000006044820152606401610a49565b6040516001600160a01b038216907fcf78cf0d6f3d8371e1075c69c492ab4ec5d8cf23a1a239b6a51a1d00be7ca31290600090a292915050565b6000612d95826020614304565b83511015612ddd5760405162461bcd60e51b8152602060048201526015602482015274746f427974657333325f6f75744f66426f756e647360581b6044820152606401610a49565b50016020015190565b606081612df481601f614304565b1015612e335760405162461bcd60e51b815260206004820152600e60248201526d736c6963655f6f766572666c6f7760901b6044820152606401610a49565b612e3d8284614304565b84511015612e815760405162461bcd60e51b8152602060048201526011602482015270736c6963655f6f75744f66426f756e647360781b6044820152606401610a49565b606082158015612ea05760405191506000825260208201604052612eea565b6040519150601f8416801560200281840101858101878315602002848b0101015b81831015612ed9578051835260209283019201612ec1565b5050858452601f01601f1916604052505b50949350505050565b60008084471015612f465760405162461bcd60e51b815260206004820152601d60248201527f437265617465323a20696e73756666696369656e742062616c616e63650000006044820152606401610a49565b8251612f945760405162461bcd60e51b815260206004820181905260248201527f437265617465323a2062797465636f6465206c656e677468206973207a65726f6044820152606401610a49565b8383516020850187f590506001600160a01b038116612c7f5760405162461bcd60e51b815260206004820152601960248201527f437265617465323a204661696c6564206f6e206465706c6f79000000000000006044820152606401610a49565b826001600160a01b031661300882611a01565b6001600160a01b0316146130705760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a49565b6001600160a01b0382166130d25760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a49565b6130dd60008261240b565b6001600160a01b038316600090815260046020526040812080546001929061310690849061429b565b90915550506001600160a01b0382166000908152600460205260408120805460019290613134908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60006001600160a01b0384163b1561328857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906131d990339089908890889060040161431c565b6020604051808303816000875af1925050508015613214575060408051601f3d908101601f1916820190925261321191810190614359565b60015b61326e573d808015613242576040519150601f19603f3d011682016040523d82523d6000602084013e613247565b606091505b5080516132665760405162461bcd60e51b8152600401610a49906142b2565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612c7f565b506001949350505050565b61329d83836132c6565b6132aa6000848484613195565b610b7f5760405162461bcd60e51b8152600401610a49906142b2565b6001600160a01b03821661331c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a49565b6000818152600360205260409020546001600160a01b0316156133815760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a49565b6001600160a01b03821660009081526004602052604081208054600192906133aa908490614304565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461341490613db9565b90600052602060002090601f016020900481019282613436576000855561347c565b82601f1061344f5782800160ff1982351617855561347c565b8280016001018555821561347c579182015b8281111561347c578235825591602001919060010190613461565b5061348892915061351a565b5090565b82805461349890613db9565b90600052602060002090601f0160209004810192826134ba576000855561347c565b82601f106134d357805160ff191683800117855561347c565b8280016001018555821561347c579182015b8281111561347c5782518255916020019190600101906134e5565b50805460008255906000526020600020908101906114f891905b5b80821115613488576000815560010161351b565b6001600160e01b0319811681146114f857600080fd5b60006020828403121561355757600080fd5b81356135628161352f565b9392505050565b60005b8381101561358457818101518382015260200161356c565b838111156127b25750506000910152565b600081518084526135ad816020860160208601613569565b601f01601f19169290920160200192915050565b6020815260006135626020830184613595565b6000602082840312156135e657600080fd5b5035919050565b6001600160a01b03811681146114f857600080fd5b6000806040838503121561361557600080fd5b8235613620816135ed565b946020939093013593505050565b60008083601f84011261364057600080fd5b5081356001600160401b0381111561365757600080fd5b60208301915083602082850101111561366f57600080fd5b9250929050565b60008060006040848603121561368b57600080fd5b8335925060208401356001600160401b038111156136a857600080fd5b6136b48682870161362e565b9497909650939450505050565b6000602082840312156136d357600080fd5b8135613562816135ed565b634e487b7160e01b600052604160045260246000fd5b604051608081016001600160401b0381118282101715613716576137166136de565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613744576137446136de565b604052919050565b600082601f83011261375d57600080fd5b81356001600160401b03811115613776576137766136de565b613789601f8201601f191660200161371c565b81815284602083860101111561379e57600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137ce57600080fd5b8235915060208301356001600160401b038111156137eb57600080fd5b6137f78582860161374c565b9150509250929050565b803560ff8116811461381257600080fd5b919050565b600082601f83011261382857600080fd5b813560206001600160401b03821115613843576138436136de565b613851818360051b0161371c565b82815260079290921b8401810191818101908684111561387057600080fd5b8286015b848110156138d3576080818903121561388d5760008081fd5b6138956136f4565b81356138a0816135ed565b81526138ad828601613801565b818601526040828101359082015260608083013590820152835291830191608001613874565b509695505050505050565b600080600080600080600080600080600060e08c8e0312156138ff57600080fd5b6139088c613801565b9a506001600160401b038060208e0135111561392357600080fd5b6139338e60208f01358f0161362e565b909b50995060408d013581101561394957600080fd5b6139598e60408f01358f0161362e565b909950975060608d013581101561396f57600080fd5b61397f8e60608f01358f0161362e565b909750955060808d013581101561399557600080fd5b6139a58e60808f01358f0161362e565b909550935060a08d0135925060c08d01358110156139c257600080fd5b506139d38d60c08e01358e01613817565b90509295989b509295989b9093969950565b6000806000606084860312156139fa57600080fd5b8335613a05816135ed565b92506020840135613a15816135ed565b929592945050506040919091013590565b6020808252825182820181905260009190848201906040850190845b81811015613a675783516001600160a01b031683529284019291840191600101613a42565b50909695505050505050565b600060208284031215613a8557600080fd5b61356282613801565b600060208284031215613aa057600080fd5b81356001600160401b03811115613ab657600080fd5b612c7f8482850161374c565b60008060008060008060008060c0898b031215613ade57600080fd5b8835613ae9816135ed565b975060208901356001600160401b0380821115613b0557600080fd5b613b118c838d0161362e565b909950975060408b0135915080821115613b2a57600080fd5b613b368c838d0161362e565b909750955060608b01359150613b4b826135ed565b90935060808a013590613b5d826135ed565b90925060a08a01359080821115613b7357600080fd5b50613b808b828c0161374c565b9150509295985092959890939650565b60008060408385031215613ba357600080fd5b8235613bae816135ed565b915060208301358015158114613bc357600080fd5b809150509250929050565b600080600080600060808688031215613be657600080fd5b853594506020860135613bf8816135ed565b93506040860135925060608601356001600160401b03811115613c1a57600080fd5b613c268882890161362e565b969995985093965092949392505050565b608081526000613c4a6080830187613595565b8281036020840152613c5c8187613595565b60ff959095166040840152505090151560609091015292915050565b60008083601f840112613c8a57600080fd5b5081356001600160401b03811115613ca157600080fd5b6020830191508360208260051b850101111561366f57600080fd5b600080600080600080600080600060a08a8c031215613cda57600080fd5b8935985060208a01356001600160401b0380821115613cf857600080fd5b613d048d838e01613c78565b909a50985060408c0135915080821115613d1d57600080fd5b613d298d838e01613c78565b909850965060608c0135915080821115613d4257600080fd5b613d4e8d838e01613c78565b909650945060808c0135915080821115613d6757600080fd5b50613d748c828d01613c78565b915080935050809150509295985092959850929598565b60008060408385031215613d9e57600080fd5b8235613da9816135ed565b91506020830135613bc3816135ed565b600181811c90821680613dcd57607f821691505b60208210811415613dee57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f455243373231526f6c6573416464726573733a204e4f54204d414e4147455200604082015260600190565b6020808252601c908201527f45524337323154656d706c6174653a206e6f74204e46544f776e657200000000604082015260600190565b608081526000613e756080830187613595565b6020830195909552506040810192909252606090910152919050565b60208082526021908201527f45524337323154656d706c6174653a204e4f54204d455441444154415f524f4c6040820152604560f81b606082015260800190565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60ff8b16815260e060208201526000613f1860e083018b8d613ed2565b8281036040840152613f2b818a8c613ed2565b90508281036060840152613f4081888a613ed2565b6080840196909652505060a081019290925260c090910152979650505050505050565b634e487b7160e01b600052603260045260246000fd5b60008351613f8b818460208801613569565b9190910191825250602001919050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fc557613fc5613f9b565b5060010190565b6020808252602c908201527f45524337323154656d706c6174653a2043616e6e6f74207472616e736665722060408201526b1d1a1a5cc81d1bdad95b925960a21b606082015260800190565b6000835161402a818460208801613569565b83519083019061403e818360208801613569565b01949350505050565b6000808335601e1984360301811261405e57600080fd5b83016020810192503590506001600160401b0381111561407d57600080fd5b80360383131561366f57600080fd5b8183526000602080850194508260005b858110156140ca5781356140af816135ed565b6001600160a01b03168752958201959082019060010161409c565b509495945050505050565b81835260006001600160fb1b038311156140ee57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b8781101561415b57828403895261413c8288614047565b614147868284613ed2565b9a87019a9550505090840190600101614125565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156141c95785840360bf190183526141a7828f614047565b6141b2868284613ed2565b95505050602092830192919091019060010161418c565b50505082810360408401526141df81898b61408c565b905082810360608401526141f48187896140d5565b9050828103608084015261420981858761410b565b9c9b505050505050505050505050565b60006020828403121561422b57600080fd5b8151613562816135ed565b602081526000612c7f602083018486613ed2565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000828210156142ad576142ad613f9b565b500390565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000821982111561431757614317613f9b565b500190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061434f90830184613595565b9695505050505050565b60006020828403121561436b57600080fd5b81516135628161352f56fe6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7afa26469706673582212206d0bc2d2cba31628d81338472b8edc29d561d59a0f52686f6ad9fb78da838a2264736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};class j{constructor(e,a,t){this.GASLIMIT_DEFAULT=1e6,this.factory721Address=void 0,this.factory721Abi=void 0,this.nftAbi=void 0,this.web3=void 0,this.startBlock=void 0,this.nftAbi=a||$.abi,this.web3=e,this.startBlock=t||0}async estGasCreateErc20(e,a,t,b,n,d,f,s,i,c,r,o){const p=o||new this.web3.eth.Contract(this.nftAbi,e),y=this.GASLIMIT_DEFAULT;let u;try{u=await p.methods.createERC20(r,[i,c],[t,b,n,d],[this.web3.utils.toWei(s),this.web3.utils.toWei(f)],[]).estimateGas({from:a},(e,a)=>e?y:a)}catch(e){u=y}return u}async createErc20(e,a,t,b,n,d,f,s,i,o,y){if(!0!==(await this.getNftPermissions(e,a)).deployERC20)throw new Error("Caller is not ERC20Deployer");y||(y=1),i&&o||({name:i,symbol:o}=p());const u=new this.web3.eth.Contract(this.nftAbi,e),l=await this.estGasCreateErc20(e,a,t,b,n,d,f,s,i,o,y,u),m=await u.methods.createERC20(y,[i,o],[t,b,n,d],[this.web3.utils.toWei(s),this.web3.utils.toWei(f)],[]).send({from:a,gas:l+1,gasPrice:await r(this.web3)});let h=null;try{h=m.events.TokenCreated.returnValues[0]}catch(e){c.error(`ERROR: Failed to create datatoken : ${e.message}`)}return h}async estGasAddManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addManager(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const n=await this.estGasAddManager(e,a,t,b);return await b.methods.addManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeManager(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const n=await this.estGasRemoveManager(e,a,t,b);return await b.methods.removeManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddErc20Deployer(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addToCreateERC20List(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addErc20Deployer(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddErc20Deployer(e,a,t,b);return await b.methods.addToCreateERC20List(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveErc20Deployer(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFromCreateErc20List(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeErc20Deployer(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a===t&&!0!==(await this.getNftPermissions(e,a)).deployERC20)throw new Error("Caller is not Manager nor ERC20Deployer");const n=await this.estGasRemoveErc20Deployer(e,a,t,b);return await b.methods.removeFromCreateERC20List(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddMetadataUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addToMetadataList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addMetadataUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddMetadataUpdater(e,a,t,b);return await b.methods.addToMetadataList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async esGasRemoveMetadataUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFromMetadataList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeMetadataUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a!==t&&!0!==(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Manager nor Metadata Updater");const n=await this.esGasRemoveMetadataUpdater(e,a,t,b);return await b.methods.removeFromMetadataList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddStoreUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addTo725StoreList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addStoreUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager)throw new Error("Caller is not Manager");const n=await this.estGasAddStoreUpdater(e,a,t,b);return await b.methods.addTo725StoreList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveStoreUpdater(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeFrom725StoreList(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeStoreUpdater(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!0!==(await this.getNftPermissions(e,a)).manager||a!==t&&!0!==(await this.getNftPermissions(e,a)).store)throw new Error("Caller is not Manager nor storeUpdater");const n=await this.estGasRemoveStoreUpdater(e,a,t,b);return await b.methods.removeFrom725StoreList(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasCleanPermissions(e,a,t){const b=t||new this.web3.eth.Contract(this.nftAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.cleanPermissions().estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async cleanPermissions(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const b=await this.estGasCleanPermissions(e,a,t);return await t.methods.cleanPermissions().send({from:a,gas:b+1,gasPrice:await r(this.web3)})}async estGasTransferNft(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.nftAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.transferFrom(a,t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async transferNft(e,a,t,b){const n=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const d=b||1,f=await this.estGasTransferNft(e,a,t,d,n);return await n.methods.transferFrom(a,t,d).send({from:a,gas:f+1,gasPrice:await r(this.web3)})}async estGasSafeTransferNft(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.nftAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.safeTransferFrom(a,t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async safeTransferNft(e,a,t,b){const n=new this.web3.eth.Contract(this.nftAbi,e);if(await this.getNftOwner(e)!==a)throw new Error("Caller is not NFT Owner");const d=b||1,f=await this.estGasSafeTransferNft(e,a,t,d,n);return await n.methods.safeTransferFrom(a,t,d).send({from:a,gas:f+1,gasPrice:await r(this.web3)})}async estGasSetMetadata(e,a,t,b,n,d,f,s,i,c){const r=c||new this.web3.eth.Contract(this.nftAbi,e),o=this.GASLIMIT_DEFAULT;let p;try{p=await r.methods.setMetaData(t,b,n,d,f,s,i).estimateGas({from:a},(e,a)=>e?o:a)}catch(e){p=o}return p}async setMetadata(e,a,t,b,n,d,f,s,i){const c=new this.web3.eth.Contract(this.nftAbi,e);if(i||(i=[]),!(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Metadata updater");const o=await this.estGasSetMetadata(e,a,t,b,n,d,f,s,i,c);return await c.methods.setMetaData(t,b,n,d,f,s,i).send({from:a,gas:o+1,gasPrice:await r(this.web3)})}async estGasSetMetadataState(e,a,t,b){const n=b||new this.web3.eth.Contract(this.nftAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setMetaDataState(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setMetadataState(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e);if(!(await this.getNftPermissions(e,a)).updateMetadata)throw new Error("Caller is not Metadata updater");const n=await this.estGasSetMetadataState(e,a,t);return await b.methods.setMetaDataState(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estSetTokenURI(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.setTokenURI("1",t).estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async setTokenURI(e,a,t){const b=new this.web3.eth.Contract(this.nftAbi,e),n=await this.estSetTokenURI(e,a,t);return await b.methods.setTokenURI("1",t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async getNftOwner(e){const a=new this.web3.eth.Contract(this.nftAbi,e);return await a.methods.ownerOf(1).call()}async getNftPermissions(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.getPermissions(a).call()}async getMetadata(e){const a=new this.web3.eth.Contract(this.nftAbi,e);return await a.methods.getMetaData().call()}async isErc20Deployer(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.isERC20Deployer(a).call()}async getData(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.getData(a).call()}async getTokenURI(e,a){const t=new this.web3.eth.Contract(this.nftAbi,e);return await t.methods.tokenURI(a).call()}}class z{constructor(e,a,t,b){this.GASLIMIT_DEFAULT=1e6,this.factoryAddress=void 0,this.factoryABI=void 0,this.datatokensAbi=void 0,this.datatokensEnterpriseAbi=void 0,this.web3=void 0,this.startBlock=void 0,this.nft=void 0,this.web3=e,this.datatokensAbi=a||P.abi,this.datatokensEnterpriseAbi=t||B.abi,this.startBlock=b||0,this.nft=new j(this.web3)}async estGasApprove(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.approve(a,this.web3.utils.toWei(t)).estimateGas({from:b},(e,a)=>e?f:a)}catch(e){s=f}return s}async approve(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e),d=await this.estGasApprove(e,a,t,b,n);return await n.methods.approve(a,this.web3.utils.toWei(t)).send({from:b,gas:d+1,gasPrice:await r(this.web3)})}async estGasMint(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.mint(b||a,this.web3.utils.toWei(t)).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async estGasCreateFixedRate(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;t.allowedConsumer||(t.allowedConsumer="0x0000000000000000000000000000000000000000");const f=t.withMint?1:0;let s;try{s=await n.methods.createFixedRate(t.fixedRateAddress,[t.baseTokenAddress,a,t.marketFeeCollector,t.allowedConsumer],[t.baseTokenDecimals,t.dataTokenDecimals,t.fixedRate,t.marketFee,f]).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){s=d}return s}async createFixedRate(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");t.allowedConsumer||(t.allowedConsumer="0x0000000000000000000000000000000000000000");const n=t.withMint?1:0,d=await this.estGasCreateFixedRate(e,a,t,b);return await b.methods.createFixedRate(t.fixedRateAddress,[t.baseTokenAddress,t.owner,t.marketFeeCollector,t.allowedConsumer],[t.baseTokenDecimals,t.dataTokenDecimals,t.fixedRate,t.marketFee,n]).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async estGasCreateDispenser(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e);b.allowedSwapper||(b.allowedSwapper="0x0000000000000000000000000000000000000000"),b.withMint||(b.withMint=!1);const f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.createDispenser(t,b.maxTokens,b.maxBalance,b.withMint,b.allowedSwapper).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async createDispenser(e,a,t,b){if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");const n=new this.web3.eth.Contract(this.datatokensAbi,e);b.allowedSwapper||(b.allowedSwapper="0x0000000000000000000000000000000000000000"),b.withMint||(b.withMint=!1);const d=await this.estGasCreateDispenser(e,a,t,b,n);return await n.methods.createDispenser(t,b.maxTokens,b.maxBalance,b.withMint,b.allowedSwapper).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}async mint(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==(await this.getDTPermissions(e,a)).minter)throw new Error("Caller is not Minter");const d=await this.getCap(e);if(new f(d).gte(t)){const d=await this.estGasMint(e,a,t,b,n);return await n.methods.mint(b||a,this.web3.utils.toWei(t)).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}throw new Error("Mint amount exceeds cap available")}async estGasAddMinter(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addMinter(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addMinter(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasAddMinter(e,a,t,b);return await b.methods.addMinter(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemoveMinter(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removeMinter(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removeMinter(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasRemoveMinter(e,a,t,b);return await b.methods.removeMinter(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasAddPaymentManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.addPaymentManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async addPaymentManager(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasAddPaymentManager(e,a,t,b);return await b.methods.addPaymentManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasRemovePaymentManager(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.removePaymentManager(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async removePaymentManager(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==await this.isERC20Deployer(e,a))throw new Error("Caller is not ERC20Deployer");const n=await this.estGasRemovePaymentManager(e,a,t,b);return await b.methods.removePaymentManager(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasSetPaymentCollector(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setPaymentCollector(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setPaymentCollector(e,a,t){const b=new this.web3.eth.Contract(this.datatokensAbi,e);if(!0!==(await this.getDTPermissions(e,a)).paymentManager)throw new Error("Caller is not Fee Manager");const n=await this.estGasSetPaymentCollector(e,a,t,b);return await b.methods.setPaymentCollector(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async getPaymentCollector(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.getPaymentCollector().call()}async transfer(e,a,t,b){const n=this.web3.utils.toWei(t);return this.transferWei(e,a,n,b)}async estGasTransfer(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.transfer(a,t).estimateGas({from:b},(e,a)=>e?f:a)}catch(e){s=f}return s}async transferWei(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensAbi,e);try{const d=await this.estGasTransfer(e,a,t,b,n);return await n.methods.transfer(a,t).send({from:b,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to transfer tokens: ${e.message}`),new Error(`Failed Failed to transfer tokens: ${e.message}`)}}async estGasStartOrder(e,a,t,b,n,d,f,s,i,c,r,o){const p=o||new this.web3.eth.Contract(this.datatokensAbi,e),y=this.GASLIMIT_DEFAULT;let u;try{u=await p.methods.startOrder(t,b,n,d,f,s,i,c,r).estimateGas({from:a},(e,a)=>e?y:a)}catch(e){u=y}return u}async startOrder(e,a,t,b,n,d,f,s,i,o,p){const y=new this.web3.eth.Contract(this.datatokensAbi,e);n||(n="0x0000000000000000000000000000000000000000");try{const c=await this.estGasStartOrder(e,a,t,b,n,d,f,s,i,o,p,y);return await y.methods.startOrder(t,b,n,d,f,s,i,o,p).send({from:a,gas:c+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to start order : ${e.message}`),new Error(`Failed to start order: ${e.message}`)}}async estGasBuyFromFreAndOrder(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyFromFreAndOrder(t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyFromFreAndOrder(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e);try{const d=await this.estGasBuyFromFreAndOrder(e,a,t,b,n);return await n.methods.buyFromFreAndOrder(t,b).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to buy DT From Fre And Order : ${e.message}`),new Error(`Failed to buy DT From Fre And Order: ${e.message}`)}}async estGasBuyFromDispenserAndOrder(e,a,t,b,n){const d=n||new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e),f=this.GASLIMIT_DEFAULT;let s;try{s=await d.methods.buyFromDispenserAndOrder(t,b).estimateGas({from:a},(e,a)=>e?f:a)}catch(e){s=f}return s}async buyFromDispenserAndOrder(e,a,t,b){const n=new this.web3.eth.Contract(this.datatokensEnterpriseAbi,e);try{const d=await this.estGasBuyFromDispenserAndOrder(e,a,t,b,n);return await n.methods.buyFromDispenserAndOrder(t,b).send({from:a,gas:d+1,gasPrice:await r(this.web3)})}catch(e){throw c.error(`ERROR: Failed to buy DT From Fre And Order : ${e.message}`),new Error(`Failed to buy DT From Fre And Order: ${e.message}`)}}async estGasSetData(e,a,t,b){const n=b||new this.web3.eth.Contract(this.datatokensAbi,e),d=this.GASLIMIT_DEFAULT;let f;try{f=await n.methods.setData(t).estimateGas({from:a},(e,a)=>e?d:a)}catch(e){f=d}return f}async setData(e,a,t){if(!await this.isERC20Deployer(e,a))throw new Error("User is not ERC20 Deployer");const b=new this.web3.eth.Contract(this.datatokensAbi,e),n=await this.estGasSetData(e,a,t,b);return await b.methods.setData(t).send({from:a,gas:n+1,gasPrice:await r(this.web3)})}async estGasCleanPermissions(e,a,t){const b=t||new this.web3.eth.Contract(this.datatokensAbi,e),n=this.GASLIMIT_DEFAULT;let d;try{d=await b.methods.cleanPermissions().estimateGas({from:a},(e,a)=>e?n:a)}catch(e){d=n}return d}async cleanPermissions(e,a){if(await this.nft.getNftOwner(await this.getNFTAddress(e))!==a)throw new Error("Caller is NOT Nft Owner");const t=new this.web3.eth.Contract(this.datatokensAbi,e),b=await this.estGasCleanPermissions(e,a,t);return await t.methods.cleanPermissions().send({from:a,gas:b+1,gasPrice:await r(this.web3)})}async getDTPermissions(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e);return await t.methods.permissions(a).call()}async getCap(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e),t=await a.methods.cap().call();return this.web3.utils.fromWei(t)}async getDecimals(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.decimals().call()}async getNFTAddress(e){const a=new this.web3.eth.Contract(this.datatokensAbi,e);return await a.methods.getERC721Address().call()}async isERC20Deployer(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e);return await t.methods.isERC20Deployer(a).call()}async balance(e,a){const t=new this.web3.eth.Contract(this.datatokensAbi,e,{from:a}),b=await t.methods.balanceOf(a).call();return this.web3.utils.fromWei(b)}}var H={_format:"hh-sol-artifact-1",contractName:"ERC721Factory",sourceName:"contracts/ERC721Factory.sol",abi:[{inputs:[{internalType:"address",name:"_template721",type:"address"},{internalType:"address",name:"_template",type:"address"},{internalType:"address",name:"_collector",type:"address"},{internalType:"address",name:"_router",type:"address"}],stateMutability:"nonpayable",type:"constructor"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"datatokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"maxTokens",type:"uint256"},{indexed:!1,internalType:"uint256",name:"maxBalance",type:"uint256"},{indexed:!1,internalType:"address",name:"allowedSwapper",type:"address"}],name:"DispenserCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"instance",type:"address"}],name:"InstanceDeployed",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"tokenName",type:"string"},{indexed:!1,internalType:"address",name:"admin",type:"address"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"string",name:"tokenURI",type:"string"}],name:"NFTCreated",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"bytes32",name:"exchangeId",type:"bytes32"},{indexed:!1,internalType:"address",name:"owner",type:"address"}],name:"NewFixedRate",type:"event"},{anonymous:!1,inputs:[{indexed:!1,internalType:"address",name:"poolAddress",type:"address"},{indexed:!1,internalType:"address",name:"ssContract",type:"address"},{indexed:!1,internalType:"address",name:"basetokenAddress",type:"address"}],name:"NewPool",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"previousOwner",type:"address"},{indexed:!0,internalType:"address",name:"newOwner",type:"address"}],name:"OwnershipTransferred",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_templateAddress",type:"address"},{indexed:!0,internalType:"uint256",name:"nftTemplateCount",type:"uint256"}],name:"Template20Added",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"_templateAddress",type:"address"},{indexed:!0,internalType:"uint256",name:"nftTemplateCount",type:"uint256"}],name:"Template721Added",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"newTokenAddress",type:"address"},{indexed:!0,internalType:"address",name:"templateAddress",type:"address"},{indexed:!1,internalType:"string",name:"name",type:"string"},{indexed:!1,internalType:"string",name:"symbol",type:"string"},{indexed:!1,internalType:"uint256",name:"cap",type:"uint256"},{indexed:!1,internalType:"address",name:"creator",type:"address"}],name:"TokenCreated",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:"struct ERC721Factory.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 ERC721Factory.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 ERC721Factory.DispenserData",name:"_DispenserData",type:"tuple"}],name:"createNftErcWithDispenser",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:"struct ERC721Factory.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 ERC721Factory.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 ERC721Factory.FixedData",name:"_FixedData",type:"tuple"}],name:"createNftErcWithFixedRate",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:"struct ERC721Factory.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 ERC721Factory.ErcCreateData",name:"_ErcCreateData",type:"tuple"},{components:[{internalType:"address[]",name:"addresses",type:"address[]"},{internalType:"uint256[]",name:"ssParams",type:"uint256[]"},{internalType:"uint256[]",name:"swapFees",type:"uint256[]"}],internalType:"struct ERC721Factory.PoolData",name:"_PoolData",type:"tuple"}],name:"createNftErcWithPool",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:"struct ERC721Factory.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 ERC721Factory.ErcCreateData",name:"_ErcCreateData",type:"tuple"}],name:"createNftWithErc",outputs:[{internalType:"address",name:"erc721Address",type:"address"},{internalType:"address",name:"erc20Address",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:"string",name:"tokenURI",type:"string"}],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:[],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"},{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:"bytes",name:"providerData",type:"bytes"}],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"}],bytecode:"0x60806040526000600a553480156200001657600080fd5b5060405162003cfb38038062003cfb8339810160408190526200003991620005ab565b6200004433620001be565b600180556001600160a01b038316158015906200006957506001600160a01b03821615155b80156200007e57506001600160a01b03841615155b620001065760405162461bcd60e51b815260206004820152604760248201527f4552433732314454466163746f72793a20496e76616c69642074656d706c617460448201527f6520746f6b656e2f636f6d6d756e6974792066656520636f6c6c6563746f72206064820152666164647265737360c81b608482015260a4015b60405180910390fd5b6001600160a01b0381166200016e5760405162461bcd60e51b815260206004820152602760248201527f4552433732314454466163746f72793a20496e76616c696420726f75746572206044820152666164647265737360c81b6064820152608401620000fd565b62000179846200020e565b506200018583620003d1565b50600c80546001600160a01b039283166001600160a01b03199182161790915560028054939092169216919091179055506200062f9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080546001600160a01b031633146200025a5760405162461bcd60e51b8152602060048201819052602482015260008051602062003cdb8339815191526044820152606401620000fd565b6001600160a01b038216620002d85760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f5745440000000000000000006064820152608401620000fd565b813b620003285760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e545241435400000000006044820152606401620000fd565b6001600560008282546200033d919062000608565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a350506005545b919050565b600080546001600160a01b031633146200041d5760405162461bcd60e51b8152602060048201819052602482015260008051602062003cdb8339815191526044820152606401620000fd565b6001600160a01b0382166200049b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c61746520616460448201527f6472657373283029204e4f5420414c4c4f5745440000000000000000000000006064820152608401620000fd565b813b620004eb5760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e54524143540000000000006044820152606401620000fd565b6001600b600082825462000500919062000608565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b54919050565b80516001600160a01b0381168114620003cc57600080fd5b60008060008060808587031215620005c257600080fd5b620005cd8562000593565b9350620005dd6020860162000593565b9250620005ed6040860162000593565b9150620005fd6060860162000593565b905092959194509250565b600082198211156200062a57634e487b7160e01b600052601160045260246000fd5b500190565b61369c806200063f6000396000f3fe608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063c6cf868a11610097578063e5fc01f011610071578063e5fc01f0146104ff578063f2fde38b14610507578063f887ea401461051a578063fd024d6a1461052d57600080fd5b8063c6cf868a14610487578063ca4abc691461048f578063e3491099146104cc57600080fd5b806395c60305116100d357806395c6030514610420578063a33ef2a614610428578063b9cd22641461043b578063bbf8d71f1461047457600080fd5b80638da5cb5b146103c75780638f6051af146103d857806394051699146103eb57600080fd5b80635de329fd116101665780637b20bccf116101405780637b20bccf1461033a578063809d81051461034d57806382c442041461036057806389898869146103b457600080fd5b80635de329fd146102f6578063715018a61461030957806372f670f01461031157600080fd5b806326705c3c116101a257806326705c3c1461024f5780633315efd114610266578063557fcfb0146102c35780635c705982146102ee57600080fd5b8063042ab9b3146101c95780630ffda88714610207578063226e76151461021c575b600080fd5b6101dc6101d736600461267a565b610540565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61021a61021536600461267a565b6105c7565b005b61023f61022a3660046126b3565b60096020526000908152604090205460ff1681565b60405190151581526020016101fe565b610258600b5481565b6040519081526020016101fe565b6101dc61027436600461267a565b6040805180820190915260008082526020820152506000908152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b6102d66102d136600461291f565b61060c565b6040516001600160a01b0390911681526020016101fe565b600354610258565b61021a610304366004612a58565b6106ad565b61021a610b97565b6102d661031f3660046126b3565b6008602052600090815260409020546001600160a01b031681565b6102586103483660046126b3565b610bcd565b61021a61035b36600461267a565b610d60565b61039561036e36600461267a565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b0390931683529015156020830152016101fe565b6102d66103c2366004612bc8565b610dd2565b6000546001600160a01b03166102d6565b6102586103e63660046126b3565b6110a3565b6103956103f936600461267a565b6007602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b600b54610258565b61021a61043636600461267a565b61123e565b61044e610449366004612c9d565b6112b6565b604080516001600160a01b039485168152939092166020840152908201526060016101fe565b61021a61048236600461267a565b611567565b600a54610258565b6104a261049d366004612c9d565b611623565b604080516001600160a01b03948516815292841660208401529216918101919091526060016101fe565b6104df6104da366004612d24565b61188b565b604080516001600160a01b039384168152929091166020830152016101fe565b600554610258565b61021a6105153660046126b3565b611a63565b600c546102d6906001600160a01b031681565b6104df61053b366004612d87565b611afe565b60408051808201909152600080825260208201526000828152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600b54831180159061059c57508215155b6105c15760405162461bcd60e51b81526004016105b890612dfb565b60405180910390fd5b92915050565b6000546001600160a01b031633146105f15760405162461bcd60e51b81526004016105b890612e44565b6000908152600760205260409020805460ff60a01b19169055565b3360008181526008602052604081205490916001600160a01b03909116146106955760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105b8565b6106a3868686868633611d94565b9695505050505050565b600260015414156106d05760405162461bcd60e51b81526004016105b890612e79565b60026001558051603210156107275760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105b8565b60005b8151811015610b8f57600080600084848151811061074a5761074a612eb0565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190612ec6565b9250925092506000811180156107d557506001600160a01b03821615155b80156107e957506001600160a01b03831615155b15610835576108036001600160a01b038316333084612079565b61083585858151811061081857610818612eb0565b6020908102919091010151516001600160a01b03841690836120ea565b600085858151811061084957610849612eb0565b602002602001015160a00151118015610892575060006001600160a01b031685858151811061087a5761087a612eb0565b6020026020010151608001516001600160a01b031614155b80156108ce575060006001600160a01b03168585815181106108b6576108b6612eb0565b6020026020010151606001516001600160a01b031614155b156109a25761092d33308787815181106108ea576108ea612eb0565b602002602001015160a0015188888151811061090857610908612eb0565b6020026020010151608001516001600160a01b0316612079909392919063ffffffff16565b6109a285858151811061094257610942612eb0565b60200260200101516000015186868151811061096057610960612eb0565b602002602001015160a0015187878151811061097e5761097e612eb0565b6020026020010151608001516001600160a01b03166120ea9092919063ffffffff16565b6109e73330670de0b6b3a76400008888815181106109c2576109c2612eb0565b6020026020010151600001516001600160a01b0316612079909392919063ffffffff16565b8484815181106109f9576109f9612eb0565b6020026020010151600001516001600160a01b0316639b4f44b6868681518110610a2557610a25612eb0565b602002602001015160200151878781518110610a4357610a43612eb0565b602002602001015160400151888881518110610a6157610a61612eb0565b602002602001015160600151898981518110610a7f57610a7f612eb0565b6020026020010151608001518a8a81518110610a9d57610a9d612eb0565b602002602001015160a001518b8b81518110610abb57610abb612eb0565b602002602001015160c001518c8c81518110610ad957610ad9612eb0565b602002602001015160e001518d8d81518110610af757610af7612eb0565b602002602001015161010001518e8e81518110610b1657610b16612eb0565b602002602001015161012001516040518a63ffffffff1660e01b8152600401610b4799989796959493929190612f61565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050505050508080610b8790612fdd565b91505061072a565b505060018055565b6000546001600160a01b03163314610bc15760405162461bcd60e51b81526004016105b890612e44565b610bcb600061219c565b565b600080546001600160a01b03163314610bf85760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b038216610c6b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105b8565b813b610cb95760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105b8565b6001600b6000828254610ccc9190612ff8565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b545b919050565b6000546001600160a01b03163314610d8a5760405162461bcd60e51b81526004016105b890612e44565b6005548111158015610d9b57508015155b610db75760405162461bcd60e51b81526004016105b890613010565b6000908152600660205260409020805460ff60a01b19169055565b60006005548411158015610de557508315155b610e015760405162461bcd60e51b81526004016105b890613010565b6000848152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610e9d5760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105b8565b8051610ea8906121ec565b91506001600160a01b038216610f28576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105b8565b6001600160a01b0382166000818152600860205260409081902080546001600160a01b03191683179055516370c166d760e01b81528391906370c166d790610f7e9033908c908c9030908c908c9060040161305c565b6020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc191906130d0565b61102a5760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105b8565b81600001516001600160a01b0316836001600160a01b03167f46f5e3cee761854fc3892024ae7aa2c832007dff583603ce093f177ebd9c4c968a338b8960405161107794939291906130ed565b60405180910390a36001600360008282546110929190612ff8565b909155509298975050505050505050565b600080546001600160a01b031633146110ce5760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b03821661114a5760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105b8565b813b6111985760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105b8565b6001600560008282546111ab9190612ff8565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600554919050565b6000546001600160a01b031633146112685760405162461bcd60e51b81526004016105b890612e44565b600554811115801561127957508015155b6112955760405162461bcd60e51b81526004016105b890613010565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156112de5760405162461bcd60e51b81526004016105b890612e79565b60026001556113b36112f08780613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611332925050506020890189613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408901353061137960608c018c613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dd292505050565b92506001600160a01b03831663e38d7cad86356113d36020890189613182565b6113e060408b018b613182565b6113ed60608d018d613182565b6113fa60808f018f613182565b6040518a63ffffffff1660e01b815260040161141e99989796959493929190613315565b6020604051808303816000875af115801561143d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146191906133b6565b91506001600160a01b038216638b96412b61147f60208701876126b3565b61148c6020880188613182565b61149960408a018a613182565b6040518663ffffffff1660e01b81526004016114b99594939291906133d3565b6020604051808303816000875af11580156114d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc9190613417565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0384169063fe1ec88090602401600060405180830381600087803b15801561154057600080fd5b505af1158015611554573d6000803e3d6000fd5b5050600180555092969195509350915050565b6000546001600160a01b031633146115915760405162461bcd60e51b81526004016105b890612e44565b600b5481111580156115a257508015155b6116025760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105b8565b6000908152600760205260409020805460ff60a01b1916600160a01b179055565b60008060006002600154141561164b5760405162461bcd60e51b81526004016105b890612e79565b60026001556116be33306116626020880188613182565b600481811061167357611673612eb0565b602002919091013590506116878880613182565b600181811061169857611698612eb0565b90506020020160208101906116ad91906126b3565b6001600160a01b0316929190612079565b6116cb6112f08780613135565b92506001600160a01b03831663e38d7cad86356116eb6020890189613182565b6116f860408b018b613182565b61170560608d018d613182565b61171260808f018f613182565b6040518a63ffffffff1660e01b815260040161173699989796959493929190613315565b6020604051808303816000875af1158015611755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177991906133b6565b600c549092506117f4906001600160a01b03166117996020870187613182565b60048181106117aa576117aa612eb0565b602002919091013590506117be8780613182565b60018181106117cf576117cf612eb0565b90506020020160208101906117e491906126b3565b6001600160a01b031691906120ea565b6001600160a01b038216635bfe4da06118106020870187613182565b61181d6040890189613182565b6118278a80613182565b6040518763ffffffff1660e01b815260040161184896959493929190613430565b6020604051808303816000875af1158015611867573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc91906133b6565b600080600260015414156118b15760405162461bcd60e51b81526004016105b890612e79565b600260015561194c6118c38580613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611905925050506020870187613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408701353061137960608a018a613135565b91506001600160a01b03821663e38d7cad843561196c6020870187613182565b6119796040890189613182565b61198660608b018b613182565b61199360808d018d613182565b6040518a63ffffffff1660e01b81526004016119b799989796959493929190613315565b6020604051808303816000875af11580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa91906133b6565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0383169063fe1ec88090602401600060405180830381600087803b158015611a3e57600080fd5b505af1158015611a52573d6000803e3d6000fd5b505060018055509194909350915050565b6000546001600160a01b03163314611a8d5760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b038116611af25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b8565b611afb8161219c565b50565b60008060026001541415611b245760405162461bcd60e51b81526004016105b890612e79565b6002600155611bbf611b368680613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b78925050506020880188613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408801353061137960608b018b613135565b91506001600160a01b03821663e38d7cad8535611bdf6020880188613182565b611bec60408a018a613182565b611bf960608c018c613182565b611c0660808e018e613182565b6040518a63ffffffff1660e01b8152600401611c2a99989796959493929190613315565b6020604051808303816000875af1158015611c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6d91906133b6565b90506001600160a01b03811663191c918a611c8b60208601866126b3565b60208601356040870135611ca56080890160608a01613479565b611cb560a08a0160808b016126b3565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611d1557600080fd5b505af1158015611d29573d6000803e3d6000fd5b50506040516301fc3d9160e71b81523060048201526001600160a01b038516925063fe1ec8809150602401600060405180830381600087803b158015611d6e57600080fd5b505af1158015611d82573d6000803e3d6000fd5b50506001805550919590945092505050565b600083600081518110611da957611da9612eb0565b602002602001015160001415611e0f5760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105b8565b600b548711158015611e2057508615155b611e3c5760405162461bcd60e51b81526004016105b890612dfb565b6000878152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052611ed55760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105b8565b8051611ee0906121ec565b6001600160a01b0381166000818152600960205260409020805460ff19166001179055909250611f785760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105b8565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b9089600081518110611fc457611fc4612eb0565b60200260200101518a600181518110611fdf57611fdf612eb0565b602002602001015189600081518110611ffa57611ffa612eb0565b6020026020010151886040516120139493929190613496565b60405180910390a36001600a600082825461202e9190612ff8565b90915550506040805160a081018252888152602081018890529081018690526001600160a01b03841660808201526060810185905261206d838261227c565b50509695505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526120e49085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612429565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561213b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215f9190613417565b6121699190612ff8565b6040516001600160a01b0385166024820152604481018290529091506120e490859063095ea7b360e01b906064016120ad565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b60408051600380825260808201909252839160009190602082016060803683370190505090508260800151816000815181106122ba576122ba612eb0565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106122eb576122eb612eb0565b6001600160a01b039283166020918202929092010152600c5482519116908290600290811061231c5761231c612eb0565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b815260040161238095949392919061358e565b6020604051808303816000875af115801561239f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c391906130d0565b6120e45760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105b8565b600061247e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125009092919063ffffffff16565b8051909150156124fb578080602001905181019061249c91906130d0565b6124fb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b8565b505050565b606061250f8484600085612519565b90505b9392505050565b60608247101561257a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b8565b843b6125c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b8565b600080866001600160a01b031685876040516125e49190613637565b60006040518083038185875af1925050503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b5091509150612636828286612641565b979650505050505050565b60608315612650575081612512565b8251156126605782518084602001fd5b8160405162461bcd60e51b81526004016105b89190613653565b60006020828403121561268c57600080fd5b5035919050565b6001600160a01b0381168114611afb57600080fd5b8035610d5b81612693565b6000602082840312156126c557600080fd5b813561251281612693565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b0381118282101715612709576127096126d0565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612737576127376126d0565b604052919050565b60006001600160401b03821115612758576127586126d0565b5060051b60200190565b600082601f83011261277357600080fd5b81356001600160401b0381111561278c5761278c6126d0565b61279f601f8201601f191660200161270f565b8181528460208386010111156127b457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126127e257600080fd5b813560206127f76127f28361273f565b61270f565b82815260059290921b8401810191818101908684111561281657600080fd5b8286015b8481101561283a57803561282d81612693565b835291830191830161281a565b509695505050505050565b600082601f83011261285657600080fd5b813560206128666127f28361273f565b82815260059290921b8401810191818101908684111561288557600080fd5b8286015b8481101561283a5780358352918301918301612889565b600082601f8301126128b157600080fd5b813560206128c16127f28361273f565b82815260059290921b840181019181810190868411156128e057600080fd5b8286015b8481101561283a5780356001600160401b038111156129035760008081fd5b6129118986838b0101612762565b8452509183019183016128e4565b600080600080600060a0868803121561293757600080fd5b853594506020808701356001600160401b038082111561295657600080fd5b818901915089601f83011261296a57600080fd5b81356129786127f28261273f565b81815260059190911b8301840190848101908c83111561299757600080fd5b8585015b838110156129cf578035858111156129b35760008081fd5b6129c18f89838a0101612762565b84525091860191860161299b565b509850505060408901359250808311156129e857600080fd5b6129f48a848b016127d1565b95506060890135925080831115612a0a57600080fd5b612a168a848b01612845565b94506080890135925080831115612a2c57600080fd5b5050612a3a888289016128a0565b9150509295509295909350565b803560ff81168114610d5b57600080fd5b60006020808385031215612a6b57600080fd5b82356001600160401b0380821115612a8257600080fd5b818501915085601f830112612a9657600080fd5b8135612aa46127f28261273f565b81815260059190911b83018401908481019088831115612ac357600080fd5b8585015b83811015612bbb57803585811115612adf5760008081fd5b8601610140818c03601f1901811315612af85760008081fd5b612b006126e6565b612b0b8a84016126a8565b81526040612b1a8185016126a8565b8b8301526060808501358284015260809150612b378286016126a8565b9083015260a0612b488582016126a8565b8284015260c0915081850135818401525060e0612b66818601612a47565b828401526101009150818501358184015250610120808501358284015283850135935089841115612b9957600091508182fd5b612ba78f8d86880101612762565b908301525085525050918601918601612ac7565b5098975050505050505050565b600080600080600060a08688031215612be057600080fd5b85356001600160401b0380821115612bf757600080fd5b612c0389838a01612762565b96506020880135915080821115612c1957600080fd5b612c2589838a01612762565b95506040880135945060608801359150612c3e82612693565b90925060808701359080821115612c5457600080fd5b50612a3a88828901612762565b600060808284031215612c7357600080fd5b50919050565b600060a08284031215612c7357600080fd5b600060608284031215612c7357600080fd5b600080600060608486031215612cb257600080fd5b83356001600160401b0380821115612cc957600080fd5b612cd587838801612c61565b94506020860135915080821115612ceb57600080fd5b612cf787838801612c79565b93506040860135915080821115612d0d57600080fd5b50612d1a86828701612c8b565b9150509250925092565b60008060408385031215612d3757600080fd5b82356001600160401b0380821115612d4e57600080fd5b612d5a86838701612c61565b93506020850135915080821115612d7057600080fd5b50612d7d85828601612c79565b9150509250929050565b600080600060e08486031215612d9c57600080fd5b83356001600160401b0380821115612db357600080fd5b612dbf87838801612c61565b94506020860135915080821115612dd557600080fd5b50612de286828701612c79565b925050612df28560408601612c79565b90509250925092565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600080600060608486031215612edb57600080fd5b8351612ee681612693565b6020850151909350612ef781612693565b80925050604084015190509250925092565b60005b83811015612f24578181015183820152602001612f0c565b838111156120e45750506000910152565b60008151808452612f4d816020860160208601612f09565b601f01601f19169290920160200192915050565b600061012060018060a01b03808d1684528b6020850152808b166040850152808a1660608501525087608084015260ff871660a08401528560c08401528460e084015280610100840152612fb781840185612f35565b9c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612ff157612ff1612fc7565b5060010190565b6000821982111561300b5761300b612fc7565b500190565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b600060018060a01b03808916835260c0602084015261307e60c0840189612f35565b83810360408501526130908189612f35565b90508187166060850152818616608085015283810360a08501526130b48186612f35565b9a9950505050505050505050565b8015158114611afb57600080fd5b6000602082840312156130e257600080fd5b8151612512816130c2565b6080815260006131006080830187612f35565b6001600160a01b038616602084015282810360408401526131218186612f35565b905082810360608401526126368185612f35565b6000808335601e1984360301811261314c57600080fd5b8301803591506001600160401b0382111561316657600080fd5b60200191503681900382131561317b57600080fd5b9250929050565b6000808335601e1984360301811261319957600080fd5b8301803591506001600160401b038211156131b357600080fd5b6020019150600581901b360382131561317b57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e1984360301811261320b57600080fd5b83016020810192503590506001600160401b0381111561322a57600080fd5b80360383131561317b57600080fd5b8183526000602080850194508260005b8581101561327757813561325c81612693565b6001600160a01b031687529582019590820190600101613249565b509495945050505050565b81835260006001600160fb1b0383111561329b57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b878110156133085782840389526132e982886131f4565b6132f48682846131cb565b9a87019a95505050908401906001016132d2565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156133765785840360bf19018352613354828f6131f4565b61335f8682846131cb565b955050506020928301929190910190600101613339565b505050828103604084015261338c81898b613239565b905082810360608401526133a1818789613282565b90508281036080840152612fb78185876132b8565b6000602082840312156133c857600080fd5b815161251281612693565b6001600160a01b03861681526060602082018190526000906133f89083018688613239565b828103604084015261340b818587613282565b98975050505050505050565b60006020828403121561342957600080fd5b5051919050565b60608152600061344460608301888a613282565b8281036020840152613457818789613282565b9050828103604084015261346c818587613239565b9998505050505050505050565b60006020828403121561348b57600080fd5b8135612512816130c2565b6080815260006134a96080830187612f35565b82810360208401526134bb8187612f35565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b838110156132775781516001600160a01b0316875295820195908201906001016134f1565b600081518084526020808501945080840160005b838110156132775781518752958201959082019060010161352a565b600081518084526020808501808196508360051b8101915082860160005b8581101561330857828403895261357c848351612f35565b98850198935090840190600101613564565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156135e55760bf198887030185526135d3868351612f35565b955093820193908201906001016135b7565b5050858403818701525050506135fb81886134dd565b9050828103604084015261360f81876134dd565b905082810360608401526136238186613516565b9050828103608084015261340b8185613546565b60008251613649818460208701612f09565b9190910192915050565b6020815260006125126020830184612f3556fea2646970667358221220f4abf2a09272c4e73999373d321776187583bec5d10085cc5b62620c7317b4f964736f6c634300080a00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572",deployedBytecode:"0x608060405234801561001057600080fd5b50600436106101c45760003560e01c80638da5cb5b116100f9578063c6cf868a11610097578063e5fc01f011610071578063e5fc01f0146104ff578063f2fde38b14610507578063f887ea401461051a578063fd024d6a1461052d57600080fd5b8063c6cf868a14610487578063ca4abc691461048f578063e3491099146104cc57600080fd5b806395c60305116100d357806395c6030514610420578063a33ef2a614610428578063b9cd22641461043b578063bbf8d71f1461047457600080fd5b80638da5cb5b146103c75780638f6051af146103d857806394051699146103eb57600080fd5b80635de329fd116101665780637b20bccf116101405780637b20bccf1461033a578063809d81051461034d57806382c442041461036057806389898869146103b457600080fd5b80635de329fd146102f6578063715018a61461030957806372f670f01461031157600080fd5b806326705c3c116101a257806326705c3c1461024f5780633315efd114610266578063557fcfb0146102c35780635c705982146102ee57600080fd5b8063042ab9b3146101c95780630ffda88714610207578063226e76151461021c575b600080fd5b6101dc6101d736600461267a565b610540565b6040805182516001600160a01b03168152602092830151151592810192909252015b60405180910390f35b61021a61021536600461267a565b6105c7565b005b61023f61022a3660046126b3565b60096020526000908152604090205460ff1681565b60405190151581526020016101fe565b610258600b5481565b6040519081526020016101fe565b6101dc61027436600461267a565b6040805180820190915260008082526020820152506000908152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff1615159082015290565b6102d66102d136600461291f565b61060c565b6040516001600160a01b0390911681526020016101fe565b600354610258565b61021a610304366004612a58565b6106ad565b61021a610b97565b6102d661031f3660046126b3565b6008602052600090815260409020546001600160a01b031681565b6102586103483660046126b3565b610bcd565b61021a61035b36600461267a565b610d60565b61039561036e36600461267a565b6006602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b604080516001600160a01b0390931683529015156020830152016101fe565b6102d66103c2366004612bc8565b610dd2565b6000546001600160a01b03166102d6565b6102586103e63660046126b3565b6110a3565b6103956103f936600461267a565b6007602052600090815260409020546001600160a01b03811690600160a01b900460ff1682565b600b54610258565b61021a61043636600461267a565b61123e565b61044e610449366004612c9d565b6112b6565b604080516001600160a01b039485168152939092166020840152908201526060016101fe565b61021a61048236600461267a565b611567565b600a54610258565b6104a261049d366004612c9d565b611623565b604080516001600160a01b03948516815292841660208401529216918101919091526060016101fe565b6104df6104da366004612d24565b61188b565b604080516001600160a01b039384168152929091166020830152016101fe565b600554610258565b61021a6105153660046126b3565b611a63565b600c546102d6906001600160a01b031681565b6104df61053b366004612d87565b611afe565b60408051808201909152600080825260208201526000828152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff16151590820152600b54831180159061059c57508215155b6105c15760405162461bcd60e51b81526004016105b890612dfb565b60405180910390fd5b92915050565b6000546001600160a01b031633146105f15760405162461bcd60e51b81526004016105b890612e44565b6000908152600760205260409020805460ff60a01b19169055565b3360008181526008602052604081205490916001600160a01b03909116146106955760405162461bcd60e51b815260206004820152603660248201527f455243373231466163746f72793a204f4e4c592045524337323120494e5354416044820152754e43452046524f4d20455243373231464143544f525960501b60648201526084016105b8565b6106a3868686868633611d94565b9695505050505050565b600260015414156106d05760405162461bcd60e51b81526004016105b890612e79565b60026001558051603210156107275760405162461bcd60e51b815260206004820152601e60248201527f455243373231466163746f72793a20546f6f204d616e79204f7264657273000060448201526064016105b8565b60005b8151811015610b8f57600080600084848151811061074a5761074a612eb0565b6020026020010151600001516001600160a01b031663397b37436040518163ffffffff1660e01b8152600401606060405180830381865afa158015610793573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b79190612ec6565b9250925092506000811180156107d557506001600160a01b03821615155b80156107e957506001600160a01b03831615155b15610835576108036001600160a01b038316333084612079565b61083585858151811061081857610818612eb0565b6020908102919091010151516001600160a01b03841690836120ea565b600085858151811061084957610849612eb0565b602002602001015160a00151118015610892575060006001600160a01b031685858151811061087a5761087a612eb0565b6020026020010151608001516001600160a01b031614155b80156108ce575060006001600160a01b03168585815181106108b6576108b6612eb0565b6020026020010151606001516001600160a01b031614155b156109a25761092d33308787815181106108ea576108ea612eb0565b602002602001015160a0015188888151811061090857610908612eb0565b6020026020010151608001516001600160a01b0316612079909392919063ffffffff16565b6109a285858151811061094257610942612eb0565b60200260200101516000015186868151811061096057610960612eb0565b602002602001015160a0015187878151811061097e5761097e612eb0565b6020026020010151608001516001600160a01b03166120ea9092919063ffffffff16565b6109e73330670de0b6b3a76400008888815181106109c2576109c2612eb0565b6020026020010151600001516001600160a01b0316612079909392919063ffffffff16565b8484815181106109f9576109f9612eb0565b6020026020010151600001516001600160a01b0316639b4f44b6868681518110610a2557610a25612eb0565b602002602001015160200151878781518110610a4357610a43612eb0565b602002602001015160400151888881518110610a6157610a61612eb0565b602002602001015160600151898981518110610a7f57610a7f612eb0565b6020026020010151608001518a8a81518110610a9d57610a9d612eb0565b602002602001015160a001518b8b81518110610abb57610abb612eb0565b602002602001015160c001518c8c81518110610ad957610ad9612eb0565b602002602001015160e001518d8d81518110610af757610af7612eb0565b602002602001015161010001518e8e81518110610b1657610b16612eb0565b602002602001015161012001516040518a63ffffffff1660e01b8152600401610b4799989796959493929190612f61565b600060405180830381600087803b158015610b6157600080fd5b505af1158015610b75573d6000803e3d6000fd5b505050505050508080610b8790612fdd565b91505061072a565b505060018055565b6000546001600160a01b03163314610bc15760405162461bcd60e51b81526004016105b890612e44565b610bcb600061219c565b565b600080546001600160a01b03163314610bf85760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b038216610c6b5760405162461bcd60e51b815260206004820152603460248201527f4552433230466163746f72793a204552433732312074656d706c617465206164604482015273191c995cdcca0c0a481393d50810531313d5d15160621b60648201526084016105b8565b813b610cb95760405162461bcd60e51b815260206004820152601a60248201527f4552433230466163746f72793a204e4f5420434f4e545241435400000000000060448201526064016105b8565b6001600b6000828254610ccc9190612ff8565b90915550506040805180820182526001600160a01b0380851680835260016020808501918252600b8054600090815260079092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fdcd16da87b60cea6dbd55a83f73b8a4bf9a54655db58ae0f35b82a2373fc150d91a35050600b545b919050565b6000546001600160a01b03163314610d8a5760405162461bcd60e51b81526004016105b890612e44565b6005548111158015610d9b57508015155b610db75760405162461bcd60e51b81526004016105b890613010565b6000908152600660205260409020805460ff60a01b19169055565b60006005548411158015610de557508315155b610e015760405162461bcd60e51b81526004016105b890613010565b6000848152600660209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052610e9d5760405162461bcd60e51b815260206004820152602e60248201527f4552433732314454466163746f72793a20455243373231546f6b656e2054656d60448201526d1c1b185d1948191a5cd8589b195960921b60648201526084016105b8565b8051610ea8906121ec565b91506001600160a01b038216610f28576040805162461bcd60e51b81526020600482015260248101919091527f4552433732314454466163746f72793a204661696c656420746f20706572666f60448201527f726d206d696e696d616c206465706c6f79206f662061206e657720746f6b656e60648201526084016105b8565b6001600160a01b0382166000818152600860205260409081902080546001600160a01b03191683179055516370c166d760e01b81528391906370c166d790610f7e9033908c908c9030908c908c9060040161305c565b6020604051808303816000875af1158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc191906130d0565b61102a5760405162461bcd60e51b815260206004820152603460248201527f4552433732314454466163746f72793a20556e61626c6520746f20696e697469604482015273616c697a6520746f6b656e20696e7374616e636560601b60648201526084016105b8565b81600001516001600160a01b0316836001600160a01b03167f46f5e3cee761854fc3892024ae7aa2c832007dff583603ce093f177ebd9c4c968a338b8960405161107794939291906130ed565b60405180910390a36001600360008282546110929190612ff8565b909155509298975050505050505050565b600080546001600160a01b031633146110ce5760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b03821661114a5760405162461bcd60e51b815260206004820152603760248201527f4552433732314454466163746f72793a204552433732312074656d706c61746560448201527f2061646472657373283029204e4f5420414c4c4f57454400000000000000000060648201526084016105b8565b813b6111985760405162461bcd60e51b815260206004820152601b60248201527f455243373231466163746f72793a204e4f5420434f4e5452414354000000000060448201526064016105b8565b6001600560008282546111ab9190612ff8565b90915550506040805180820182526001600160a01b038085168083526001602080850191825260058054600090815260069092528682208651815494511515600160a01b026001600160a81b03199095169616959095179290921790935554935192939290917fc0167b92c8eb4a2bad2c05e0134f076fba5d3cd54671a3e8edf13d2e61443bd991a35050600554919050565b6000546001600160a01b031633146112685760405162461bcd60e51b81526004016105b890612e44565b600554811115801561127957508015155b6112955760405162461bcd60e51b81526004016105b890613010565b6000908152600660205260409020805460ff60a01b1916600160a01b179055565b6000806000600260015414156112de5760405162461bcd60e51b81526004016105b890612e79565b60026001556113b36112f08780613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611332925050506020890189613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408901353061137960608c018c613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610dd292505050565b92506001600160a01b03831663e38d7cad86356113d36020890189613182565b6113e060408b018b613182565b6113ed60608d018d613182565b6113fa60808f018f613182565b6040518a63ffffffff1660e01b815260040161141e99989796959493929190613315565b6020604051808303816000875af115801561143d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061146191906133b6565b91506001600160a01b038216638b96412b61147f60208701876126b3565b61148c6020880188613182565b61149960408a018a613182565b6040518663ffffffff1660e01b81526004016114b99594939291906133d3565b6020604051808303816000875af11580156114d8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc9190613417565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0384169063fe1ec88090602401600060405180830381600087803b15801561154057600080fd5b505af1158015611554573d6000803e3d6000fd5b5050600180555092969195509350915050565b6000546001600160a01b031633146115915760405162461bcd60e51b81526004016105b890612e44565b600b5481111580156115a257508015155b6116025760405162461bcd60e51b815260206004820152602b60248201527f45524332304454466163746f72793a2054656d706c61746520696e646578206460448201526a1bd95cdb9d08195e1a5cdd60aa1b60648201526084016105b8565b6000908152600760205260409020805460ff60a01b1916600160a01b179055565b60008060006002600154141561164b5760405162461bcd60e51b81526004016105b890612e79565b60026001556116be33306116626020880188613182565b600481811061167357611673612eb0565b602002919091013590506116878880613182565b600181811061169857611698612eb0565b90506020020160208101906116ad91906126b3565b6001600160a01b0316929190612079565b6116cb6112f08780613135565b92506001600160a01b03831663e38d7cad86356116eb6020890189613182565b6116f860408b018b613182565b61170560608d018d613182565b61171260808f018f613182565b6040518a63ffffffff1660e01b815260040161173699989796959493929190613315565b6020604051808303816000875af1158015611755573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061177991906133b6565b600c549092506117f4906001600160a01b03166117996020870187613182565b60048181106117aa576117aa612eb0565b602002919091013590506117be8780613182565b60018181106117cf576117cf612eb0565b90506020020160208101906117e491906126b3565b6001600160a01b031691906120ea565b6001600160a01b038216635bfe4da06118106020870187613182565b61181d6040890189613182565b6118278a80613182565b6040518763ffffffff1660e01b815260040161184896959493929190613430565b6020604051808303816000875af1158015611867573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114fc91906133b6565b600080600260015414156118b15760405162461bcd60e51b81526004016105b890612e79565b600260015561194c6118c38580613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611905925050506020870187613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408701353061137960608a018a613135565b91506001600160a01b03821663e38d7cad843561196c6020870187613182565b6119796040890189613182565b61198660608b018b613182565b61199360808d018d613182565b6040518a63ffffffff1660e01b81526004016119b799989796959493929190613315565b6020604051808303816000875af11580156119d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119fa91906133b6565b6040516301fc3d9160e71b81523060048201529091506001600160a01b0383169063fe1ec88090602401600060405180830381600087803b158015611a3e57600080fd5b505af1158015611a52573d6000803e3d6000fd5b505060018055509194909350915050565b6000546001600160a01b03163314611a8d5760405162461bcd60e51b81526004016105b890612e44565b6001600160a01b038116611af25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105b8565b611afb8161219c565b50565b60008060026001541415611b245760405162461bcd60e51b81526004016105b890612e79565b6002600155611bbf611b368680613135565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611b78925050506020880188613135565b8080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050505060408801353061137960608b018b613135565b91506001600160a01b03821663e38d7cad8535611bdf6020880188613182565b611bec60408a018a613182565b611bf960608c018c613182565b611c0660808e018e613182565b6040518a63ffffffff1660e01b8152600401611c2a99989796959493929190613315565b6020604051808303816000875af1158015611c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c6d91906133b6565b90506001600160a01b03811663191c918a611c8b60208601866126b3565b60208601356040870135611ca56080890160608a01613479565b611cb560a08a0160808b016126b3565b60405160e087901b6001600160e01b03191681526001600160a01b0395861660048201526024810194909452604484019290925215156064830152909116608482015260a401600060405180830381600087803b158015611d1557600080fd5b505af1158015611d29573d6000803e3d6000fd5b50506040516301fc3d9160e71b81523060048201526001600160a01b038516925063fe1ec8809150602401600060405180830381600087803b158015611d6e57600080fd5b505af1158015611d82573d6000803e3d6000fd5b50506001805550919590945092505050565b600083600081518110611da957611da9612eb0565b602002602001015160001415611e0f5760405162461bcd60e51b815260206004820152602560248201527f4552433230466163746f72793a207a65726f20636170206973206e6f7420616c6044820152641b1bddd95960da1b60648201526084016105b8565b600b548711158015611e2057508615155b611e3c5760405162461bcd60e51b81526004016105b890612dfb565b6000878152600760209081526040918290208251808401909352546001600160a01b0381168352600160a01b900460ff161515908201819052611ed55760405162461bcd60e51b815260206004820152602b60248201527f4552433230466163746f72793a20455243373231546f6b656e2054656d706c6160448201526a1d1948191a5cd8589b195960aa1b60648201526084016105b8565b8051611ee0906121ec565b6001600160a01b0381166000818152600960205260409020805460ff19166001179055909250611f785760405162461bcd60e51b815260206004820152603e60248201527f455243373231466163746f72793a204661696c656420746f20706572666f726d60448201527f206d696e696d616c206465706c6f79206f662061206e657720746f6b656e000060648201526084016105b8565b80600001516001600160a01b0316826001600160a01b03167f567699dbf7c5f63a51a42fd451f5e065bca0dfc723adf2cc498bbb7cfb780b9089600081518110611fc457611fc4612eb0565b60200260200101518a600181518110611fdf57611fdf612eb0565b602002602001015189600081518110611ffa57611ffa612eb0565b6020026020010151886040516120139493929190613496565b60405180910390a36001600a600082825461202e9190612ff8565b90915550506040805160a081018252888152602081018890529081018690526001600160a01b03841660808201526060810185905261206d838261227c565b50509695505050505050565b6040516001600160a01b03808516602483015283166044820152606481018290526120e49085906323b872dd60e01b906084015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612429565b50505050565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561213b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061215f9190613417565b6121699190612ff8565b6040516001600160a01b0385166024820152604481018290529091506120e490859063095ea7b360e01b906064016120ad565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000808260601b9050604051733d602d80600a3d3981f3363d3d373d3d3d363d7360601b81528160148201526e5af43d82803e903d91602b57fd5bf360881b60288201526037816000f06040516001600160a01b03821681529093507f117c72e6c25f0a072e36e148df71468ce2f3dbe7defec5b2c257a6e3eb65278c915060200160405180910390a150919050565b60408051600380825260808201909252839160009190602082016060803683370190505090508260800151816000815181106122ba576122ba612eb0565b6001600160a01b0392831660209182029290920101526002548251911690829060019081106122eb576122eb612eb0565b6001600160a01b039283166020918202929092010152600c5482519116908290600290811061231c5761231c612eb0565b60200260200101906001600160a01b031690816001600160a01b031681525050816001600160a01b031663b3998be08460000151856020015184876040015188606001516040518663ffffffff1660e01b815260040161238095949392919061358e565b6020604051808303816000875af115801561239f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123c391906130d0565b6120e45760405162461bcd60e51b815260206004820152603160248201527f4552433230466163746f72793a20556e61626c6520746f20696e697469616c696044820152707a6520746f6b656e20696e7374616e636560781b60648201526084016105b8565b600061247e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125009092919063ffffffff16565b8051909150156124fb578080602001905181019061249c91906130d0565b6124fb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105b8565b505050565b606061250f8484600085612519565b90505b9392505050565b60608247101561257a5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105b8565b843b6125c85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b8565b600080866001600160a01b031685876040516125e49190613637565b60006040518083038185875af1925050503d8060008114612621576040519150601f19603f3d011682016040523d82523d6000602084013e612626565b606091505b5091509150612636828286612641565b979650505050505050565b60608315612650575081612512565b8251156126605782518084602001fd5b8160405162461bcd60e51b81526004016105b89190613653565b60006020828403121561268c57600080fd5b5035919050565b6001600160a01b0381168114611afb57600080fd5b8035610d5b81612693565b6000602082840312156126c557600080fd5b813561251281612693565b634e487b7160e01b600052604160045260246000fd5b60405161014081016001600160401b0381118282101715612709576127096126d0565b60405290565b604051601f8201601f191681016001600160401b0381118282101715612737576127376126d0565b604052919050565b60006001600160401b03821115612758576127586126d0565b5060051b60200190565b600082601f83011261277357600080fd5b81356001600160401b0381111561278c5761278c6126d0565b61279f601f8201601f191660200161270f565b8181528460208386010111156127b457600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f8301126127e257600080fd5b813560206127f76127f28361273f565b61270f565b82815260059290921b8401810191818101908684111561281657600080fd5b8286015b8481101561283a57803561282d81612693565b835291830191830161281a565b509695505050505050565b600082601f83011261285657600080fd5b813560206128666127f28361273f565b82815260059290921b8401810191818101908684111561288557600080fd5b8286015b8481101561283a5780358352918301918301612889565b600082601f8301126128b157600080fd5b813560206128c16127f28361273f565b82815260059290921b840181019181810190868411156128e057600080fd5b8286015b8481101561283a5780356001600160401b038111156129035760008081fd5b6129118986838b0101612762565b8452509183019183016128e4565b600080600080600060a0868803121561293757600080fd5b853594506020808701356001600160401b038082111561295657600080fd5b818901915089601f83011261296a57600080fd5b81356129786127f28261273f565b81815260059190911b8301840190848101908c83111561299757600080fd5b8585015b838110156129cf578035858111156129b35760008081fd5b6129c18f89838a0101612762565b84525091860191860161299b565b509850505060408901359250808311156129e857600080fd5b6129f48a848b016127d1565b95506060890135925080831115612a0a57600080fd5b612a168a848b01612845565b94506080890135925080831115612a2c57600080fd5b5050612a3a888289016128a0565b9150509295509295909350565b803560ff81168114610d5b57600080fd5b60006020808385031215612a6b57600080fd5b82356001600160401b0380821115612a8257600080fd5b818501915085601f830112612a9657600080fd5b8135612aa46127f28261273f565b81815260059190911b83018401908481019088831115612ac357600080fd5b8585015b83811015612bbb57803585811115612adf5760008081fd5b8601610140818c03601f1901811315612af85760008081fd5b612b006126e6565b612b0b8a84016126a8565b81526040612b1a8185016126a8565b8b8301526060808501358284015260809150612b378286016126a8565b9083015260a0612b488582016126a8565b8284015260c0915081850135818401525060e0612b66818601612a47565b828401526101009150818501358184015250610120808501358284015283850135935089841115612b9957600091508182fd5b612ba78f8d86880101612762565b908301525085525050918601918601612ac7565b5098975050505050505050565b600080600080600060a08688031215612be057600080fd5b85356001600160401b0380821115612bf757600080fd5b612c0389838a01612762565b96506020880135915080821115612c1957600080fd5b612c2589838a01612762565b95506040880135945060608801359150612c3e82612693565b90925060808701359080821115612c5457600080fd5b50612a3a88828901612762565b600060808284031215612c7357600080fd5b50919050565b600060a08284031215612c7357600080fd5b600060608284031215612c7357600080fd5b600080600060608486031215612cb257600080fd5b83356001600160401b0380821115612cc957600080fd5b612cd587838801612c61565b94506020860135915080821115612ceb57600080fd5b612cf787838801612c79565b93506040860135915080821115612d0d57600080fd5b50612d1a86828701612c8b565b9150509250925092565b60008060408385031215612d3757600080fd5b82356001600160401b0380821115612d4e57600080fd5b612d5a86838701612c61565b93506020850135915080821115612d7057600080fd5b50612d7d85828601612c79565b9150509250929050565b600080600060e08486031215612d9c57600080fd5b83356001600160401b0380821115612db357600080fd5b612dbf87838801612c61565b94506020860135915080821115612dd557600080fd5b50612de286828701612c79565b925050612df28560408601612c79565b90509250925092565b60208082526029908201527f4552433230466163746f72793a2054656d706c61746520696e64657820646f656040820152681cdb9d08195e1a5cdd60ba1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b634e487b7160e01b600052603260045260246000fd5b600080600060608486031215612edb57600080fd5b8351612ee681612693565b6020850151909350612ef781612693565b80925050604084015190509250925092565b60005b83811015612f24578181015183820152602001612f0c565b838111156120e45750506000910152565b60008151808452612f4d816020860160208601612f09565b601f01601f19169290920160200192915050565b600061012060018060a01b03808d1684528b6020850152808b166040850152808a1660608501525087608084015260ff871660a08401528560c08401528460e084015280610100840152612fb781840185612f35565b9c9b505050505050505050505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415612ff157612ff1612fc7565b5060010190565b6000821982111561300b5761300b612fc7565b500190565b6020808252602c908201527f4552433732314454466163746f72793a2054656d706c61746520696e6465782060408201526b191bd95cdb9d08195e1a5cdd60a21b606082015260800190565b600060018060a01b03808916835260c0602084015261307e60c0840189612f35565b83810360408501526130908189612f35565b90508187166060850152818616608085015283810360a08501526130b48186612f35565b9a9950505050505050505050565b8015158114611afb57600080fd5b6000602082840312156130e257600080fd5b8151612512816130c2565b6080815260006131006080830187612f35565b6001600160a01b038616602084015282810360408401526131218186612f35565b905082810360608401526126368185612f35565b6000808335601e1984360301811261314c57600080fd5b8301803591506001600160401b0382111561316657600080fd5b60200191503681900382131561317b57600080fd5b9250929050565b6000808335601e1984360301811261319957600080fd5b8301803591506001600160401b038211156131b357600080fd5b6020019150600581901b360382131561317b57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000808335601e1984360301811261320b57600080fd5b83016020810192503590506001600160401b0381111561322a57600080fd5b80360383131561317b57600080fd5b8183526000602080850194508260005b8581101561327757813561325c81612693565b6001600160a01b031687529582019590820190600101613249565b509495945050505050565b81835260006001600160fb1b0383111561329b57600080fd5b8260051b8083602087013760009401602001938452509192915050565b81835260006020808501808196508560051b810191508460005b878110156133085782840389526132e982886131f4565b6132f48682846131cb565b9a87019a95505050908401906001016132d2565b5091979650505050505050565b89815260a0602082018190528101889052600060c060058a901b830181019083018b835b8c8110156133765785840360bf19018352613354828f6131f4565b61335f8682846131cb565b955050506020928301929190910190600101613339565b505050828103604084015261338c81898b613239565b905082810360608401526133a1818789613282565b90508281036080840152612fb78185876132b8565b6000602082840312156133c857600080fd5b815161251281612693565b6001600160a01b03861681526060602082018190526000906133f89083018688613239565b828103604084015261340b818587613282565b98975050505050505050565b60006020828403121561342957600080fd5b5051919050565b60608152600061344460608301888a613282565b8281036020840152613457818789613282565b9050828103604084015261346c818587613239565b9998505050505050505050565b60006020828403121561348b57600080fd5b8135612512816130c2565b6080815260006134a96080830187612f35565b82810360208401526134bb8187612f35565b604084019590955250506001600160a01b039190911660609091015292915050565b600081518084526020808501945080840160005b838110156132775781516001600160a01b0316875295820195908201906001016134f1565b600081518084526020808501945080840160005b838110156132775781518752958201959082019060010161352a565b600081518084526020808501808196508360051b8101915082860160005b8581101561330857828403895261357c848351612f35565b98850198935090840190600101613564565b600060a0820160a0835280885180835260c08501915060c08160051b86010192506020808b0160005b838110156135e55760bf198887030185526135d3868351612f35565b955093820193908201906001016135b7565b5050858403818701525050506135fb81886134dd565b9050828103604084015261360f81876134dd565b905082810360608401526136238186613516565b9050828103608084015261340b8185613546565b60008251613649818460208701612f09565b9190910192915050565b6020815260006125126020830184612f3556fea2646970667358221220f4abf2a09272c4e73999373d321776187583bec5d10085cc5b62620c7317b4f964736f6c634300080a0033",linkReferences:{},deployedLinkReferences:{}};const J="0x0000000000000000000000000000000000000000";class q{constructor(e,a,t,b){this.GASLIMIT_DEFAULT=1e6,this.factory721Address=void 0,this.factory721Abi=void 0,this.web3=void 0,this.startBlock=void 0,this.factory721=void 0,this.factory721Address=e,this.factory721Abi=t||H.abi,this.web3=a,this.startBlock=b||0,this.factory721=new this.web3.eth.Contract(this.factory721Abi,this.factory721Address)}async estGasCreateNFT(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.deployERC721Contract(a.name,a.symbol,a.templateIndex,J,a.tokenURI).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async createNFT(e,a){if(a.templateIndex||(a.templateIndex=1),!a.name||!a.symbol){const{name:e,symbol:t}=p();a.name=e,a.symbol=t}if(a.templateIndex>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a.templateIndex)throw new Error("Template index cannot be ZERO");if(!1===(await this.getNFTTemplate(a.templateIndex)).isActive)throw new Error("Template is not active");const t=await this.estGasCreateNFT(e,a),b=await this.factory721.methods.deployERC721Contract(a.name,a.symbol,a.templateIndex,J,a.tokenURI).send({from:e,gas:t+1,gasPrice:await r(this.web3)});let n=null;try{n=b.events.NFTCreated.returnValues[0]}catch(e){c.error(`ERROR: Failed to create datatoken : ${e.message}`)}return n}async getCurrentNFTCount(){return await this.factory721.methods.getCurrentNFTCount().call()}async getCurrentTokenCount(){return await this.factory721.methods.getCurrentTokenCount().call()}async getOwner(){return await this.factory721.methods.owner().call()}async getCurrentNFTTemplateCount(){return await this.factory721.methods.getCurrentNFTTemplateCount().call()}async getCurrentTokenTemplateCount(){return await this.factory721.methods.getCurrentTemplateCount().call()}async getNFTTemplate(e){if(e>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===e)throw new Error("Template index cannot be ZERO");return await this.factory721.methods.getNFTTemplate(e).call()}async getTokenTemplate(e){return await this.factory721.methods.getTokenTemplate(e).call()}async checkDatatoken(e){return await this.factory721.methods.erc20List(e).call()}async checkNFT(e){return await this.factory721.methods.erc721List(e).call()}async estGasAddNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.add721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async addNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a===J)throw new Error("Template cannot be ZERO address");const t=await this.estGasAddNFTTemplate(e,a);return await this.factory721.methods.add721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasDisableNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.disable721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async disableNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");const t=await this.estGasDisableNFTTemplate(e,a);return await this.factory721.methods.disable721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasReactivateNFTTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.reactivate721TokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async reactivateNFTTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");const t=await this.estGasReactivateNFTTemplate(e,a);return await this.factory721.methods.reactivate721TokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasAddTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.addTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async addTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a===J)throw new Error("Template cannot be address ZERO");const t=await this.estGasAddTokenTemplate(e,a);return await this.factory721.methods.addTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasDisableTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.disableTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async disableTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");if(!1===(await this.getNFTTemplate(a)).isActive)throw new Error("Template is already disabled");const t=await this.estGasDisableTokenTemplate(e,a);return await this.factory721.methods.disableTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasReactivateTokenTemplate(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.reactivateTokenTemplate(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async reactivateTokenTemplate(e,a){if(await this.getOwner()!==e)throw new Error("Caller is not Factory Owner");if(a>await this.getCurrentNFTTemplateCount())throw new Error("Template index doesnt exist");if(0===a)throw new Error("Template index cannot be ZERO");if(!0===(await this.getTokenTemplate(a)).isActive)throw new Error("Template is already active");const t=await this.estGasReactivateTokenTemplate(e,a);return await this.factory721.methods.reactivateTokenTemplate(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasStartMultipleTokenOrder(e,a){const t=this.GASLIMIT_DEFAULT;let b;try{b=await this.factory721.methods.startMultipleTokenOrder(a).estimateGas({from:e},(e,a)=>e?t:a)}catch(e){b=t}return b}async startMultipleTokenOrder(e,a){if(a.length>50)throw new Error("Too many orders");const t=await this.estGasStartMultipleTokenOrder(e,a);return await this.factory721.methods.startMultipleTokenOrder(a).send({from:e,gas:t+1,gasPrice:await r(this.web3)})}async estGasCreateNftWithErc(e,a,t){const b=this.GASLIMIT_DEFAULT;let n;try{const d=y(t);n=await this.factory721.methods.createNftWithErc(a,d).estimateGas({from:e},(e,a)=>e?b:a)}catch(e){n=b}return n}async createNftWithErc(e,a,t){const b=y(t),n=await this.estGasCreateNftWithErc(e,a,t);return await this.factory721.methods.createNftWithErc(a,b).send({from:e,gas:n+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithPool(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;try{const f=y(t),s=l(b);d=await this.factory721.methods.createNftErcWithPool(a,f,s).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async createNftErcWithPool(e,a,t,b){const n=await this.estGasCreateNftErcWithPool(e,a,t,b),d=y(t),f=l(b);return await this.factory721.methods.createNftErcWithPool(a,d,f).send({from:e,gas:n+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithFixedRate(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;const f=y(t),s=u(b);try{d=await this.factory721.methods.createNftErcWithFixedRate(a,f,s).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n}return d}async createNftErcWithFixedRate(e,a,t,b){const n=y(t),d=u(b),f=await this.estGasCreateNftErcWithFixedRate(e,a,t,b);return await this.factory721.methods.createNftErcWithFixedRate(a,n,d).send({from:e,gas:f+1,gasPrice:await r(this.web3)})}async estGasCreateNftErcWithDispenser(e,a,t,b){const n=this.GASLIMIT_DEFAULT;let d;const f=y(t);try{d=await this.factory721.methods.createNftErcWithDispenser(a,f,b).estimateGas({from:e},(e,a)=>e?n:a)}catch(e){d=n,c.error("Failed to estimate gas for createNftErcWithDispenser",e)}return d}async createNftErcWithDispenser(e,a,t,b){const n=y(t),d=await this.estGasCreateNftErcWithDispenser(e,a,t,b);return await this.factory721.methods.createNftErcWithDispenser(a,n,b).send({from:e,gas:d+1,gasPrice:await r(this.web3)})}}class X{constructor(){this.nodeUri=void 0,this.providerAddress=void 0,this.metadataCacheUri=void 0,this.providerUri=void 0,this.web3Provider=void 0,this.oceanTokenAddress=void 0,this.erc721FactoryAddress=void 0,this.erc721FFactoryABI=void 0,this.datatokensABI=void 0,this.poolTemplateAddress=void 0,this.poolFactoryABI=void 0,this.poolABI=void 0,this.fixedRateExchangeAddress=void 0,this.fixedRateExchangeAddressABI=void 0,this.dispenserAddress=void 0,this.dispenserABI=void 0,this.opfCommunityFeeCollector=void 0,this.sideStakingAddress=void 0,this.startBlock=void 0,this.verbose=void 0,this.authMessage=void 0,this.authTokenExpiration=void 0,this.parityUri=void 0,this.threshold=void 0,this.chainId=void 0,this.network=void 0,this.subgraphUri=void 0,this.explorerUri=void 0,this.oceanTokenSymbol=void 0}}const V=e=>function(e="",a){const{valid:t,output:b}=function(e,a,t){if("string"!=typeof e)throw c.debug("Not input string:"),c.debug(e),new Error("[zeroXTransformer] Expected string, input type: "+typeof e);const b=e.match(/^(?:0x)*([a-f0-9]+)$/i);return b?{valid:!0,output:b[1]}:(c.warn("[zeroXTransformer] Input transformation failed."),{valid:!1,output:e})}(e);return(a&&t?"0x":"")+b}(e,!1);class Z{async getEndpoints(e){try{const a=await T(e);return await a.json()}catch(e){return c.error("Finding the service endpoints failed:",e),null}}getEndpointURL(e,a){return e?e.find(e=>e.serviceName===a):null}async getServiceEndpoints(e,a){const t=[];for(const b in a.serviceEndpoints)t.push({serviceName:b,method:a.serviceEndpoints[b][0],urlPath:e+a.serviceEndpoints[b][1]});return t}async getNonce(e,a,t,b,n){b||(b=await this.getEndpoints(e)),n||(n=await this.getServiceEndpoints(e,b));const d=this.getEndpointURL(n,"nonce")?this.getEndpointURL(n,"nonce").urlPath:null;if(!d)return null;try{const e=await t(d+`?userAddress=${a}`);return String((await e.json()).nonce)}catch(e){throw c.error(e),new Error("HTTP request failed")}}async createSignature(e,a,t){return await I(e,V(t),a)}async createHashSignature(e,a,t){return await S(e,t,a)}async encrypt(e,a,t){const b=await this.getEndpoints(a),n=await this.getServiceEndpoints(a,b),d=this.getEndpointURL(n,"encrypt")?this.getEndpointURL(n,"encrypt").urlPath:null;if(!d)return null;try{return await t("POST",d,decodeURI(JSON.stringify(e)),{"Content-Type":"application/octet-stream"})}catch(e){throw c.error(e),new Error("HTTP request failed")}}async checkDidFiles(e,a,t,b){const n=await this.getEndpoints(t),d=await this.getServiceEndpoints(t,n),f={did:e,serviceId:a},s=[],i=this.getEndpointURL(d,"fileinfo")?this.getEndpointURL(d,"fileinfo").urlPath:null;if(!i)return null;try{const e=await b(i,JSON.stringify(f)),a=await e.json();for(const e of a)s.push(e);return s}catch(e){return null}}async checkFileUrl(e,a,t){const b=await this.getEndpoints(a),n=await this.getServiceEndpoints(a,b),d={url:e,type:"url"},f=[],s=this.getEndpointURL(n,"fileinfo")?this.getEndpointURL(n,"fileinfo").urlPath:null;if(!s)return null;try{const e=await t("POST",s,JSON.stringify(d)),a=await e.json();for(const e of a)f.push(e);return f}catch(e){return null}}async initialize(e,a,t,b,n,d,f,s){const i=await this.getEndpoints(n),r=await this.getServiceEndpoints(n,i);let o=this.getEndpointURL(r,"initialize")?this.getEndpointURL(r,"initialize").urlPath:null;if(!o)return null;o+=`?documentId=${e}`,o+=`&serviceId=${a}`,o+=`&fileIndex=${t}`,o+=`&consumerAddress=${b}`,f&&(o+="&userdata="+encodeURI(JSON.stringify(f))),s&&(o+="&computeEnv="+encodeURI(s));try{const e=await d("GET",o);return await e.json()}catch(e){throw c.error(e),new Error("Asset URL not found or not available.")}}async getDownloadUrl(e,a,t,b,n,d,f,s){const i=await this.getEndpoints(d),c=await this.getServiceEndpoints(d,i),r=this.getEndpointURL(c,"download")?this.getEndpointURL(c,"download").urlPath:null;if(!r)return null;const o=Date.now();let p=r;return p+=`?fileIndex=${b}`,p+=`&documentId=${e}`,p+=`&transferTxId=${n}`,p+=`&serviceId=${t}`,p+=`&consumerAddress=${a}`,p+=`&nonce=${o}`,p+=`&signature=${await this.createSignature(f,a,e+o)}`,s&&(p+="&userdata="+encodeURI(JSON.stringify(s))),p}async computeStart(e,a,t,b,n,d,f,s,i){const r=await this.getEndpoints(e),o=await this.getServiceEndpoints(e,r),p=this.getEndpointURL(o,"computeStart")?this.getEndpointURL(o,"computeStart").urlPath:null,y=Date.now();let u=b;u+=d.documentId,u+=y;const l=await this.createHashSignature(a,b,u),m=Object();if(m.consumerAddress=b,m.signature=l,m.nonce=y,m.computeEnv=n,m.dataset=d,m.algorithm=f,m.additionalDatasets&&(m.additionalDatasets=s),i&&(m.output=i),!p)return null;try{const e=await t("POST",p,JSON.stringify(m),{"Content-Type":"application/json"});return null!=e&&e.ok?await e.json():(console.error("Compute start failed:",e.status,e.statusText),c.error("Payload was:",m),null)}catch(e){return c.error("Compute start failed:"),c.error(e),c.error("Payload was:",m),null}}async computeStop(e,a,t,b,n,d){const f=await this.getEndpoints(b),s=await this.getServiceEndpoints(b,f),i=this.getEndpointURL(s,"computeStop")?this.getEndpointURL(s,"computeStop").urlPath:null,r=await this.getNonce(b,a,d,f,s);let o=a;o+=t||"",o+=e&&`${V(e)}`||"",o+=r;const p=await this.createHashSignature(n,a,o),y=Object();if(y.signature=p,y.documentId=V(e),y.consumerAddress=a,t&&(y.jobId=t),!i)return null;try{const e=await d(i,JSON.stringify(y));return null!=e&&e.ok?await e.json():(c.error("Compute stop failed:",e.status,e.statusText),c.error("Payload was:",y),null)}catch(e){return c.error("Compute stop failed:"),c.error(e),c.error("Payload was:",y),null}}async computeStatus(e,a,t,b,n){if(!t&&!b&&!n)throw new Error("You need at least one of jobId, did, consumerAddress");const d=await this.getEndpoints(e),f=await this.getServiceEndpoints(e,d),s=this.getEndpointURL(f,"computeStatus")?this.getEndpointURL(f,"computeStatus").urlPath:null;let i="?documentId="+V(b);if(i+=`&consumerAddress=${n}`,i+=t&&`&jobId=${t}`||"",!s)return null;try{const e=await a("GET",s+i);return null!=e&&e.ok?await e.json():(c.error("Get compute status failed:",e.status,e.statusText),null)}catch(e){return c.error("Get compute status failed"),c.error(e),null}}async computeResult(e,a,t,b,n,d,f){const s=await this.getEndpoints(n),i=await this.getServiceEndpoints(n,s),r=this.getEndpointURL(i,"computeResult")?this.getEndpointURL(i,"computeResult").urlPath:null,o=await this.getNonce(n,b,f,s,i);let p=b;p+=e,p+=String(a),p+=o;const y=await this.createHashSignature(d,b,p);let u=r;if(u+=`?consumerAddress=${b}`,u+=`&jobId=${e}`,u+=`&index=${String(a)}`,u+=y&&`&signature=${y}`||"",!r)return null;try{t?await f.downloadFile(u,t,a):await f.downloadFileBrowser(u)}catch(e){throw c.error("Error getting job result"),c.error(e),e}return t}async computeDelete(e,a,t,b,n,d){const f=await this.getEndpoints(b),s=await this.getServiceEndpoints(b,f),i=this.getEndpointURL(s,"computeDelete")?this.getEndpointURL(s,"computeDelete").urlPath:null,r=await this.getNonce(b,a,d,f,s);let o=a;o+=t||"",o+=e&&`${V(e)}`||"",o+=r;const p=await this.createHashSignature(n,a,o),y=Object();if(y.documentId=V(e),y.consumerAddress=a,y.jobId=t,p&&(y.signature=p),!i)return null;try{const e=await d(i,JSON.stringify(y));return null!=e&&e.ok?await e.json():(c.error("Delete compute job failed:",e.status,e.statusText),c.error("Payload was:",y),null)}catch(e){return c.error("Delete compute job failed:"),c.error(e),c.error("Payload was:",y),null}}async isValidProvider(e,a){try{const t=await a(e);if(null!=t&&t.ok){const e=await t.json();if(e&&e.providerAddress)return!0}return!1}catch(e){return c.error(`Error validating provider: ${e.message}`),!1}}}const Y=new Z;export{X as Config,k as ConfigHelper,z as Datatoken,L as Dispenser,_ as FixedRateCreateProgressStep,W as FixedRateExchange,s as LogLevel,i as Logger,c as LoggerInstance,j as Nft,q as NftFactory,G as Pool,Z as Provider,Y as ProviderInstance,F as ZERO_ADDRESS,M as configHelperNetworks,g as crossFetchGeneric,h as downloadFile,m as fetchData,E as generateDid,p as generateDtName,T as getData,y as getErcCreationParams,r as getFairGasPrice,u as getFreCreationParams,C as getHash,l as getPoolCreationParams,w as postData,R as signHash,I as signText,S as signWithHash};
|
|
2
2
|
//# sourceMappingURL=lib.modern.js.map
|