├── .gitignore ├── hardhat.config.js ├── README.md ├── package.json ├── contracts └── DEX.sol └── deployArgs.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .env 3 | coverage 4 | coverage.json 5 | typechain 6 | typechain-types 7 | 8 | #Hardhat files 9 | cache 10 | artifacts 11 | 12 | -------------------------------------------------------------------------------- /hardhat.config.js: -------------------------------------------------------------------------------- 1 | /** @type import('hardhat/config').HardhatUserConfig */ 2 | module.exports = { 3 | networks: { 4 | hardhat: { 5 | chainId: 1337, 6 | }, 7 | }, 8 | solidity: { 9 | version: "0.8.9", 10 | settings: { 11 | optimizer: { 12 | enabled: true, 13 | runs: 200, 14 | }, 15 | }, 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DEX contracts 2 | 3 | > **Warning:** This code is not audited. Use at your own risk. 4 | 5 | This contracts in this repository can be used with the [DEX app repository](https://github.com/thirdweb-example/dex-app). 6 | 7 | ## Compiling the contract 8 | 9 | Use the following command to compile the contract: 10 | 11 | ```bash 12 | npx thirdweb build 13 | ``` 14 | 15 | ## Deploying the contract 16 | 17 | Use the following command to deploy the contract to any EVM chain: 18 | 19 | ```bash 20 | npx thirdweb deploy 21 | ``` 22 | 23 | ## Conclusion 24 | 25 | If you need support, feel free to join our [Discord server](https://discord.gg/thirdweb). For any feedback related to thirdweb, please leave them on our [feedback board](https://feedback.thirdweb.com). 26 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "hardhat-javascript-starter", 3 | "scripts": { 4 | "build": "npx thirdweb@latest detect", 5 | "deploy": "npx thirdweb@latest deploy", 6 | "release": "npx thirdweb@latest release" 7 | }, 8 | "devDependencies": { 9 | "@nomicfoundation/hardhat-chai-matchers": "^1.0.6", 10 | "@nomiclabs/hardhat-ethers": "^2.2.3", 11 | "@nomiclabs/hardhat-etherscan": "^3.1.7", 12 | "@typechain/ethers-v5": "^10.2.0", 13 | "@typechain/hardhat": "^6.1.5", 14 | "@types/chai": "^4.3.4", 15 | "@types/mocha": "^10.0.1", 16 | "chai": "^4.3.7", 17 | "hardhat": "^2.10.1", 18 | "hardhat-gas-reporter": "^1.0.9", 19 | "solidity-coverage": "^0.8.2", 20 | "ts-node": "^10.9.1", 21 | "typechain": "^8.1.1", 22 | "typescript": "^5.0.4" 23 | }, 24 | "dependencies": { 25 | "@nomicfoundation/hardhat-network-helpers": "^1.0.8", 26 | "@nomicfoundation/hardhat-toolbox": "^2.0.2", 27 | "@openzeppelin/contracts-upgradeable": "^4.8.2", 28 | "@thirdweb-dev/contracts": "^3" 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /contracts/DEX.sol: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: MIT 2 | pragma solidity ^0.8.7; 3 | 4 | import "@thirdweb-dev/contracts/base/ERC20Base.sol"; 5 | 6 | contract DEX is ERC20Base { 7 | address public token; 8 | 9 | constructor (address _token) ERC20Base(name(), symbol()) { 10 | token = _token; 11 | } 12 | 13 | function getTokensInContract() public view returns (uint256) { 14 | return ERC20Base(token).balanceOf(address(this)); 15 | } 16 | 17 | function addLiquidity(uint256 _amount) public payable returns (uint256) { 18 | uint256 _liquidity; 19 | uint256 balanceInEth = address(this).balance; 20 | uint256 tokenReserve = getTokensInContract(); 21 | ERC20Base _token = ERC20Base(token); 22 | 23 | if (tokenReserve == 0) { 24 | _token.transferFrom(msg.sender, address(this), _amount); 25 | _liquidity = balanceInEth; 26 | _mint(msg.sender, _amount); 27 | } 28 | else { 29 | uint256 reservedEth = balanceInEth - msg.value; 30 | require( 31 | _amount >= (msg.value * tokenReserve) / reservedEth, 32 | "Amount of tokens sent is less than the minimum tokens required" 33 | ); 34 | _token.transferFrom(msg.sender, address(this), _amount); 35 | unchecked { 36 | _liquidity = (totalSupply() * msg.value) / reservedEth; 37 | } 38 | _mint(msg.sender, _liquidity); 39 | } 40 | return _liquidity; 41 | } 42 | 43 | function removeLiquidity(uint256 _amount) public returns (uint256, uint256) { 44 | require( 45 | _amount > 0, "Amount should be greater than zero" 46 | ); 47 | uint256 _reservedEth = address(this).balance; 48 | uint256 _totalSupply = totalSupply(); 49 | 50 | uint256 _ethAmount = (_reservedEth * _amount) / totalSupply(); 51 | uint256 _tokenAmount = (getTokensInContract() * _amount) / _totalSupply; 52 | _burn(msg.sender, _amount); 53 | payable(msg.sender).transfer(_ethAmount); 54 | ERC20Base(token).transfer(msg.sender ,_tokenAmount); 55 | return (_ethAmount, _tokenAmount); 56 | } 57 | 58 | function getAmountOfTokens( 59 | uint256 inputAmount, 60 | uint256 inputReserve, 61 | uint256 outputReserve 62 | ) 63 | public pure returns (uint256) 64 | { 65 | require(inputReserve > 0 && outputReserve > 0, "Invalid Reserves"); 66 | // We are charging a fee of `1%` 67 | // uint256 inputAmountWithFee = inputAmount * 99; 68 | uint256 inputAmountWithFee = inputAmount; 69 | uint256 numerator = inputAmountWithFee * outputReserve; 70 | uint256 denominator = (inputReserve * 100) + inputAmountWithFee; 71 | unchecked { 72 | return numerator / denominator; 73 | } 74 | } 75 | 76 | function swapEthTotoken() public payable { 77 | uint256 _reservedTokens = getTokensInContract(); 78 | uint256 _tokensBought = getAmountOfTokens( 79 | msg.value, 80 | address(this).balance, 81 | _reservedTokens 82 | ); 83 | ERC20Base(token).transfer(msg.sender, _tokensBought); 84 | } 85 | 86 | function swapTokenToEth(uint256 _tokensSold) public { 87 | uint256 _reservedTokens = getTokensInContract(); 88 | uint256 ethBought = getAmountOfTokens( 89 | _tokensSold, 90 | _reservedTokens, 91 | address(this).balance 92 | ); 93 | ERC20Base(token).transferFrom( 94 | msg.sender, 95 | address(this), 96 | _tokensSold 97 | ); 98 | payable(msg.sender).transfer(ethBought); 99 | } 100 | 101 | } -------------------------------------------------------------------------------- /deployArgs.json: -------------------------------------------------------------------------------- 1 | { 2 | "extensions": [ 3 | { 4 | "metadata": { 5 | "name": "DEX", 6 | "metadataURI": "ipfs://QmbBo6i9R2PbuUZVTc4H8SnochJpxw7D79VkuJsrrijuFC", 7 | "implementation": "0x0000000000000000000000000000000000000000" 8 | }, 9 | "functions": [ 10 | { 11 | "functionSelector": "0x3644e515", 12 | "functionSignature": "DOMAIN_SEPARATOR()" 13 | }, 14 | { 15 | "functionSelector": "0x51c6590a", 16 | "functionSignature": "addLiquidity(uint256)" 17 | }, 18 | { 19 | "functionSelector": "0xdd62ed3e", 20 | "functionSignature": "allowance(address,address)" 21 | }, 22 | { 23 | "functionSelector": "0x095ea7b3", 24 | "functionSignature": "approve(address,uint256)" 25 | }, 26 | { 27 | "functionSelector": "0x70a08231", 28 | "functionSignature": "balanceOf(address)" 29 | }, 30 | { 31 | "functionSelector": "0x42966c68", 32 | "functionSignature": "burn(uint256)" 33 | }, 34 | { 35 | "functionSelector": "0xe8a3d485", 36 | "functionSignature": "contractURI()" 37 | }, 38 | { 39 | "functionSelector": "0x313ce567", 40 | "functionSignature": "decimals()" 41 | }, 42 | { 43 | "functionSelector": "0xa457c2d7", 44 | "functionSignature": "decreaseAllowance(address,uint256)" 45 | }, 46 | { 47 | "functionSelector": "0x7386479e", 48 | "functionSignature": "getAmountOfTokens(uint256,uint256,uint256)" 49 | }, 50 | { 51 | "functionSelector": "0x3c2f1806", 52 | "functionSignature": "getTokensInContract()" 53 | }, 54 | { 55 | "functionSelector": "0x39509351", 56 | "functionSignature": "increaseAllowance(address,uint256)" 57 | }, 58 | { 59 | "functionSelector": "0x449a52f8", 60 | "functionSignature": "mintTo(address,uint256)" 61 | }, 62 | { 63 | "functionSelector": "0xac9650d8", 64 | "functionSignature": "multicall(bytes[])" 65 | }, 66 | { 67 | "functionSelector": "0x06fdde03", 68 | "functionSignature": "name()" 69 | }, 70 | { 71 | "functionSelector": "0x7ecebe00", 72 | "functionSignature": "nonces(address)" 73 | }, 74 | { 75 | "functionSelector": "0x8da5cb5b", 76 | "functionSignature": "owner()" 77 | }, 78 | { 79 | "functionSelector": "0xd505accf", 80 | "functionSignature": "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)" 81 | }, 82 | { 83 | "functionSelector": "0x9c8f9f23", 84 | "functionSignature": "removeLiquidity(uint256)" 85 | }, 86 | { 87 | "functionSelector": "0x938e3d7b", 88 | "functionSignature": "setContractURI(string)" 89 | }, 90 | { 91 | "functionSelector": "0x13af4035", 92 | "functionSignature": "setOwner(address)" 93 | }, 94 | { 95 | "functionSelector": "0x3575745d", 96 | "functionSignature": "swapEthTotoken()" 97 | }, 98 | { 99 | "functionSelector": "0xc722ecc4", 100 | "functionSignature": "swapTokenToEth(uint256)" 101 | }, 102 | { 103 | "functionSelector": "0x95d89b41", 104 | "functionSignature": "symbol()" 105 | }, 106 | { 107 | "functionSelector": "0xfc0c546a", 108 | "functionSignature": "token()" 109 | }, 110 | { 111 | "functionSelector": "0x18160ddd", 112 | "functionSignature": "totalSupply()" 113 | }, 114 | { 115 | "functionSelector": "0xa9059cbb", 116 | "functionSignature": "transfer(address,uint256)" 117 | }, 118 | { 119 | "functionSelector": "0x23b872dd", 120 | "functionSignature": "transferFrom(address,address,uint256)" 121 | } 122 | ] 123 | } 124 | ], 125 | "extensionDeployArgs": [ 126 | { 127 | "name": "DEX", 128 | "amount": 0, 129 | "salt": "0x51489d4263e7aff6c512a83666a144c08d740a160db30b26495ddfc5e7f1c21e", 130 | "bytecode": "6101006040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c960e0523480156200003657600080fd5b506040516200287d3803806200287d833981016040819052620000599162000327565b62000063620000ed565b6200006d62000187565b8181818181600590805190602001906200008992919062000281565b5080516200009f90600690602084019062000281565b50504660a052503060c052620000b462000198565b60805250620000c59050336200022f565b5050600880546001600160a01b0319166001600160a01b039290921691909117905562000396565b606060058054620000fe9062000359565b80601f01602080910402602001604051908101604052809291908181526020018280546200012c9062000359565b80156200017d5780601f1062000151576101008083540402835291602001916200017d565b820191906000526020600020905b8154815290600101906020018083116200015f57829003601f168201915b5050505050905090565b606060068054620000fe9062000359565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f620001c5620000ed565b80516020918201206040805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b8280546200028f9062000359565b90600052602060002090601f016020900481019282620002b35760008555620002fe565b82601f10620002ce57805160ff1916838001178555620002fe565b82800160010185558215620002fe579182015b82811115620002fe578251825591602001919060010190620002e1565b506200030c92915062000310565b5090565b5b808211156200030c576000815560010162000311565b6000602082840312156200033a57600080fd5b81516001600160a01b03811681146200035257600080fd5b9392505050565b600181811c908216806200036e57607f821691505b602082108114156200039057634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516124ad620003d06000396000611087015260006107500152600061077a015260006107a401526124ad6000f3fe6080604052600436106101b75760003560e01c80637386479e116100ec578063a9059cbb1161008a578063d505accf11610064578063d505accf146104ee578063dd62ed3e1461050e578063e8a3d48514610554578063fc0c546a1461056957600080fd5b8063a9059cbb14610481578063ac9650d8146104a1578063c722ecc4146104ce57600080fd5b8063938e3d7b116100c6578063938e3d7b146103f757806395d89b41146104175780639c8f9f231461042c578063a457c2d71461046157600080fd5b80637386479e1461036f5780637ecebe001461038f5780638da5cb5b146103c557600080fd5b80633644e5151161015957806342966c681161013357806342966c68146102e6578063449a52f81461030657806351c6590a1461032657806370a082311461033957600080fd5b80633644e5151461029c57806339509351146102b15780633c2f1806146102d157600080fd5b806318160ddd1161019557806318160ddd1461023957806323b872dd14610258578063313ce567146102785780633575745d1461029457600080fd5b806306fdde03146101bc578063095ea7b3146101e757806313af403514610217575b600080fd5b3480156101c857600080fd5b506101d1610589565b6040516101de9190611f2c565b60405180910390f35b3480156101f357600080fd5b50610207610202366004611f5b565b61061b565b60405190151581526020016101de565b34801561022357600080fd5b50610237610232366004611f85565b610633565b005b34801561024557600080fd5b506004545b6040519081526020016101de565b34801561026457600080fd5b50610207610273366004611fa0565b610689565b34801561028457600080fd5b50604051601281526020016101de565b6102376106af565b3480156102a857600080fd5b5061024a610743565b3480156102bd57600080fd5b506102076102cc366004611f5b565b6107d3565b3480156102dd57600080fd5b5061024a610812565b3480156102f257600080fd5b50610237610301366004611fdc565b61087f565b34801561031257600080fd5b50610237610321366004611f5b565b6108dd565b61024a610334366004611fdc565b610983565b34801561034557600080fd5b5061024a610354366004611f85565b6001600160a01b031660009081526002602052604090205490565b34801561037b57600080fd5b5061024a61038a366004611ff5565b610b70565b34801561039b57600080fd5b5061024a6103aa366004611f85565b6001600160a01b031660009081526007602052604090205490565b3480156103d157600080fd5b506001546001600160a01b03165b6040516001600160a01b0390911681526020016101de565b34801561040357600080fd5b50610237610412366004612037565b610c04565b34801561042357600080fd5b506101d1610c52565b34801561043857600080fd5b5061044c610447366004611fdc565b610c61565b604080519283526020830191909152016101de565b34801561046d57600080fd5b5061020761047c366004611f5b565b610dca565b34801561048d57600080fd5b5061020761049c366004611f5b565b610e67565b3480156104ad57600080fd5b506104c16104bc3660046120e8565b610e75565b6040516101de919061215d565b3480156104da57600080fd5b506102376104e9366004611fdc565b610f6a565b3480156104fa57600080fd5b506102376105093660046121bf565b611033565b34801561051a57600080fd5b5061024a610529366004612232565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561056057600080fd5b506101d16111da565b34801561057557600080fd5b506008546103df906001600160a01b031681565b60606005805461059890612265565b80601f01602080910402602001604051908101604052809291908181526020018280546105c490612265565b80156106115780601f106105e657610100808354040283529160200191610611565b820191906000526020600020905b8154815290600101906020018083116105f457829003601f168201915b5050505050905090565b600033610629818585611268565b5060019392505050565b61063b61138c565b61067d5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064015b60405180910390fd5b610686816113b9565b50565b60003361069785828561140b565b6106a2858585611497565b60019150505b9392505050565b60006106b9610812565b905060006106c8344784610b70565b60085460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af115801561071a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073e919061229a565b505050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561079c57507f000000000000000000000000000000000000000000000000000000000000000046145b156107c657507f000000000000000000000000000000000000000000000000000000000000000090565b6107ce611665565b905090565b3360008181526003602090815260408083206001600160a01b0387168452909152812054909190610629908290869061080d9087906122d2565b611268565b6008546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa15801561085b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ce91906122ea565b336000908152600260205260409020548111156108d35760405162461bcd60e51b81526020600482015260126024820152716e6f7420656e6f7567682062616c616e636560701b6044820152606401610674565b61068633826116fa565b6108e561138c565b6109315760405162461bcd60e51b815260206004820152601760248201527f4e6f7420617574686f72697a656420746f206d696e742e0000000000000000006044820152606401610674565b806109755760405162461bcd60e51b815260206004820152601460248201527326b4b73a34b733903d32b937903a37b5b2b7399760611b6044820152606401610674565b61097f8282611848565b5050565b6000804781610990610812565b6008549091506001600160a01b031681610a2e576040516323b872dd60e01b8152336004820152306024820152604481018790526001600160a01b038216906323b872dd906064016020604051808303816000875af11580156109f7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1b919061229a565b50829350610a293387611848565b610b66565b6000610a3a3485612303565b905080610a47843461231a565b610a51919061234f565b871015610ac65760405162461bcd60e51b815260206004820152603e60248201527f416d6f756e74206f6620746f6b656e732073656e74206973206c65737320746860448201527f616e20746865206d696e696d756d20746f6b656e7320726571756972656400006064820152608401610674565b6040516323b872dd60e01b8152336004820152306024820152604481018890526001600160a01b038316906323b872dd906064016020604051808303816000875af1158015610b19573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b3d919061229a565b508034610b4960045490565b0281610b5757610b57612339565b049450610b643386611848565b505b5091949350505050565b60008083118015610b815750600082115b610bc05760405162461bcd60e51b815260206004820152601060248201526f496e76616c696420526573657276657360801b6044820152606401610674565b836000610bcd848361231a565b9050600082610bdd87606461231a565b610be791906122d2565b9050808281610bf857610bf8612339565b04979650505050505050565b610c0c61138c565b610c495760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610674565b61068681611927565b60606006805461059890612265565b60008060008311610cbf5760405162461bcd60e51b815260206004820152602260248201527f416d6f756e742073686f756c642062652067726561746572207468616e207a65604482015261726f60f01b6064820152608401610674565b476000610ccb60045490565b90506000610cd860045490565b610ce2878561231a565b610cec919061234f565b905060008287610cfa610812565b610d04919061231a565b610d0e919061234f565b9050610d1a33886116fa565b604051339083156108fc029084906000818181858888f19350505050158015610d47573d6000803e3d6000fd5b5060085460405163a9059cbb60e01b8152336004820152602481018390526001600160a01b039091169063a9059cbb906044016020604051808303816000875af1158015610d99573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dbd919061229a565b5090969095509350505050565b3360008181526003602090815260408083206001600160a01b038716845290915281205490919083811015610e4f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610674565b610e5c8286868403611268565b506001949350505050565b600033610629818585611497565b60608167ffffffffffffffff811115610e9057610e90612021565b604051908082528060200260200182016040528015610ec357816020015b6060815260200190600190039081610eae5790505b50905060005b82811015610f6357610f3330858584818110610ee757610ee7612371565b9050602002810190610ef99190612387565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250611a0892505050565b828281518110610f4557610f45612371565b60200260200101819052508080610f5b906123d5565b915050610ec9565b5092915050565b6000610f74610812565b90506000610f83838347610b70565b6008546040516323b872dd60e01b8152336004820152306024820152604481018690529192506001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fff919061229a565b50604051339082156108fc029083906000818181858888f1935050505015801561102d573d6000803e3d6000fd5b50505050565b834211156110835760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e650000006044820152606401610674565b60007f00000000000000000000000000000000000000000000000000000000000000008888886110b28c611a2d565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e001604051602081830303815290604052805190602001209050600061115061110f610743565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9050600061116082878787611a55565b9050896001600160a01b0316816001600160a01b0316146111c35760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e617475726500006044820152606401610674565b6111ce8a8a8a611268565b50505050505050505050565b600080546111e790612265565b80601f016020809104026020016040519081016040528092919081815260200182805461121390612265565b80156112605780601f1061123557610100808354040283529160200191611260565b820191906000526020600020905b81548152906001019060200180831161124357829003601f168201915b505050505081565b6001600160a01b0383166112ca5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610674565b6001600160a01b03821661132b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610674565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006113a06001546001600160a01b031690565b6001600160a01b0316336001600160a01b031614905090565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8292fce18fa69edf4db7b94ea2e58241df0ae57f97e0a6c9b29067028bf92d7690600090a35050565b6001600160a01b03838116600090815260036020908152604080832093861683529290522054600019811461102d578181101561148a5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610674565b61102d8484848403611268565b6001600160a01b0383166114fb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610674565b6001600160a01b03821661155d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610674565b6001600160a01b038316600090815260026020526040902054818110156115d55760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610674565b6001600160a01b0380851660009081526002602052604080822085850390559185168152908120805484929061160c9084906122d2565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161165891815260200190565b60405180910390a361102d565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f611690610589565b80516020918201206040805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6001600160a01b03821661175a5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610674565b6001600160a01b038216600090815260026020526040902054818110156117ce5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610674565b6001600160a01b03831660009081526002602052604081208383039055600480548492906117fd908490612303565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6001600160a01b03821661189e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610674565b80600460008282546118b091906122d2565b90915550506001600160a01b038216600090815260026020526040812080548392906118dd9084906122d2565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600080805461193590612265565b80601f016020809104026020016040519081016040528092919081815260200182805461196190612265565b80156119ae5780601f10611983576101008083540402835291602001916119ae565b820191906000526020600020905b81548152906001019060200180831161199157829003601f168201915b505085519394506119ca93600093506020870192509050611e3b565b507fc9c7c3fe08b88b4df9d4d47ef47d2c43d55c025a0ba88ca442580ed9e7348a1681836040516119fc9291906123f0565b60405180910390a15050565b60606106a8838360405180606001604052806027815260200161245160279139611a7d565b6001600160a01b03811660009081526007602052604090208054600181018255905b50919050565b6000806000611a6687878787611b5a565b91509150611a7381611c47565b5095945050505050565b60606001600160a01b0384163b611ae55760405162461bcd60e51b815260206004820152602660248201527f416464726573733a2064656c65676174652063616c6c20746f206e6f6e2d636f6044820152651b9d1c9858dd60d21b6064820152608401610674565b600080856001600160a01b031685604051611b00919061241e565b600060405180830381855af49150503d8060008114611b3b576040519150601f19603f3d011682016040523d82523d6000602084013e611b40565b606091505b5091509150611b50828286611e02565b9695505050505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611b915750600090506003611c3e565b8460ff16601b14158015611ba957508460ff16601c14155b15611bba5750600090506004611c3e565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611c0e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116611c3757600060019250925050611c3e565b9150600090505b94509492505050565b6000816004811115611c5b57611c5b61243a565b1415611c645750565b6001816004811115611c7857611c7861243a565b1415611cc65760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610674565b6002816004811115611cda57611cda61243a565b1415611d285760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610674565b6003816004811115611d3c57611d3c61243a565b1415611d955760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610674565b6004816004811115611da957611da961243a565b14156106865760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610674565b60608315611e115750816106a8565b825115611e215782518084602001fd5b8160405162461bcd60e51b81526004016106749190611f2c565b828054611e4790612265565b90600052602060002090601f016020900481019282611e695760008555611eaf565b82601f10611e8257805160ff1916838001178555611eaf565b82800160010185558215611eaf579182015b82811115611eaf578251825591602001919060010190611e94565b50611ebb929150611ebf565b5090565b5b80821115611ebb5760008155600101611ec0565b60005b83811015611eef578181015183820152602001611ed7565b8381111561102d5750506000910152565b60008151808452611f18816020860160208601611ed4565b601f01601f19169290920160200192915050565b6020815260006106a86020830184611f00565b80356001600160a01b0381168114611f5657600080fd5b919050565b60008060408385031215611f6e57600080fd5b611f7783611f3f565b946020939093013593505050565b600060208284031215611f9757600080fd5b6106a882611f3f565b600080600060608486031215611fb557600080fd5b611fbe84611f3f565b9250611fcc60208501611f3f565b9150604084013590509250925092565b600060208284031215611fee57600080fd5b5035919050565b60008060006060848603121561200a57600080fd5b505081359360208301359350604090920135919050565b634e487b7160e01b600052604160045260246000fd5b60006020828403121561204957600080fd5b813567ffffffffffffffff8082111561206157600080fd5b818401915084601f83011261207557600080fd5b81358181111561208757612087612021565b604051601f8201601f19908116603f011681019083821181831017156120af576120af612021565b816040528281528760208487010111156120c857600080fd5b826020860160208301376000928101602001929092525095945050505050565b600080602083850312156120fb57600080fd5b823567ffffffffffffffff8082111561211357600080fd5b818501915085601f83011261212757600080fd5b81358181111561213657600080fd5b8660208260051b850101111561214b57600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156121b257603f198886030184526121a0858351611f00565b94509285019290850190600101612184565b5092979650505050505050565b600080600080600080600060e0888a0312156121da57600080fd5b6121e388611f3f565b96506121f160208901611f3f565b95506040880135945060608801359350608088013560ff8116811461221557600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561224557600080fd5b61224e83611f3f565b915061225c60208401611f3f565b90509250929050565b600181811c9082168061227957607f821691505b60208210811415611a4f57634e487b7160e01b600052602260045260246000fd5b6000602082840312156122ac57600080fd5b815180151581146106a857600080fd5b634e487b7160e01b600052601160045260246000fd5b600082198211156122e5576122e56122bc565b500190565b6000602082840312156122fc57600080fd5b5051919050565b600082821015612315576123156122bc565b500390565b6000816000190483118215151615612334576123346122bc565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261236c57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261239e57600080fd5b83018035915067ffffffffffffffff8211156123b957600080fd5b6020019150368190038213156123ce57600080fd5b9250929050565b60006000198214156123e9576123e96122bc565b5060010190565b6040815260006124036040830185611f00565b82810360208401526124158185611f00565b95945050505050565b60008251612430818460208701611ed4565b9190910192915050565b634e487b7160e01b600052602160045260246000fdfe416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a2646970667358221220bee330652ec047312cb753bd4ad5b2afcd80162d3e0196850a18768b90fdf88764736f6c634300080b0033" 131 | } 132 | ] 133 | } --------------------------------------------------------------------------------