From 479d419c5af18e7a5cb61cf2c94f072936352ce2 Mon Sep 17 00:00:00 2001 From: Denis Date: Tue, 25 Jun 2024 19:22:14 +0100 Subject: [PATCH] Deploy CurveOracle on avax --- README.md | 2 +- deployments/avax/CurveOracle.json | 248 ++++++++++++++++++++---------- 2 files changed, 169 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index b68d852b..e661dc4b 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator * SushiSwap - [0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa](https://snowtrace.io/address/0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa) * UniswapV2 - [0x4C5B9573dE7660c097F1a21050038378CD691066](https://snowtrace.io/address/0x4C5B9573dE7660c097F1a21050038378CD691066) * UniswapV3 - [0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3](https://snowtrace.io/address/0xE85B42805e046D1933EB8e1C543C4da4E5e8fFa3) - * Curve - [0x715C0357F8F29FB7a71acDcaeFdde2B964824B23](https://snowtrace.io/address/0x715C0357F8F29FB7a71acDcaeFdde2B964824B23) + * Curve - [0x8e38ec1f7D3D40ebf3987DaB0fb2aD688D96c3D1](https://snowtrace.io/address/0x8e38ec1f7D3D40ebf3987DaB0fb2aD688D96c3D1) diff --git a/deployments/avax/CurveOracle.json b/deployments/avax/CurveOracle.json index 40e8d2eb..1453b24e 100644 --- a/deployments/avax/CurveOracle.json +++ b/deployments/avax/CurveOracle.json @@ -1,5 +1,5 @@ { - "address": "0x715C0357F8F29FB7a71acDcaeFdde2B964824B23", + "address": "0x8e38ec1f7D3D40ebf3987DaB0fb2aD688D96c3D1", "abi": [ { "inputs": [ @@ -22,6 +22,16 @@ "internalType": "enum CurveOracle.CurveRegistryType[]", "name": "_registryTypes", "type": "uint8[]" + }, + { + "internalType": "address[]", + "name": "initialBlacklist", + "type": "address[]" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" } ], "stateMutability": "nonpayable", @@ -37,6 +47,28 @@ "name": "MathOverflowedMulDiv", "type": "error" }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, { "inputs": [], "name": "PoolNotFound", @@ -47,6 +79,44 @@ "name": "PoolWithConnectorNotFound", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "pool", + "type": "address" + }, + { + "indexed": false, + "internalType": "bool", + "name": "isBlacklisted", + "type": "bool" + } + ], + "name": "BlacklistUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, { "inputs": [], "name": "MAX_POOLS", @@ -73,6 +143,25 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "name": "blacklisted", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -112,6 +201,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -149,23 +251,68 @@ ], "stateMutability": "view", "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pool", + "type": "address" + } + ], + "name": "toggleBlacklistAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" } ], - "transactionHash": "0x9fb72b0d25c3f642d50bf1ca58ba9e28df54b1463abbaeb2453eac79d85ff909", "receipt": { - "to": null, + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", - "contractAddress": "0x715C0357F8F29FB7a71acDcaeFdde2B964824B23", - "transactionIndex": 15, - "gasUsed": "1195004", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x432fc4e7ecc34c7515709b4d6a206be9a2dc0e962a97a75950c1eb32959cb2e9", - "transactionHash": "0x9fb72b0d25c3f642d50bf1ca58ba9e28df54b1463abbaeb2453eac79d85ff909", - "logs": [], - "blockNumber": 44361274, - "cumulativeGasUsed": "2596115", - "status": 1, - "byzantium": true + "contractAddress": null, + "gasUsed": "1507765", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000000000002000004000000000000008000000000000000000000000000000000000000000000000000800001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000200000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x637b2c7619ffbb5c83c0a5a26987013ed132e3c2f277e007b5cae96ee3e09f18", + "logs": [ + { + "_type": "log", + "address": "0x8e38ec1f7D3D40ebf3987DaB0fb2aD688D96c3D1", + "blockHash": "0x637b2c7619ffbb5c83c0a5a26987013ed132e3c2f277e007b5cae96ee3e09f18", + "blockNumber": 47175227, + "data": "0x", + "index": 6, + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000056e44874f624ebde6efcc783efd685f0fbdc6dcf" + ], + "transactionHash": "0xd58330ad1fbe3c48ac3fef8a79bb802f20a99fb8c1fe19c5141a074381b4c1e8", + "transactionIndex": 3 + } + ], + "blockNumber": 47175227, + "cumulativeGasUsed": "1754946", + "status": 1 }, "args": [ "0x0000000022d53366457f9d5e68ec105046fc4383", @@ -179,72 +326,13 @@ 0, 7, 2 - ] + ], + [ + "0xd2acae14ae2ee0f6557ac6c6d0e407a92c36214b" + ], + "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF" ], "numDeployments": 1, - "solcInputHash": "dade1128c03077a5b8f8ad3fc230dfea", - "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ICurveProvider\",\"name\":\"_addressProvider\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_maxPools\",\"type\":\"uint256\"},{\"internalType\":\"uint256[]\",\"name\":\"_registryIds\",\"type\":\"uint256[]\"},{\"internalType\":\"enum CurveOracle.CurveRegistryType[]\",\"name\":\"_registryTypes\",\"type\":\"uint8[]\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"ConnectorShouldBeNone\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MathOverflowedMulDiv\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"PoolWithConnectorNotFound\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MAX_POOLS\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"REGISTRIES_COUNT\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"srcToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"dstToken\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"connector\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"thresholdFilter\",\"type\":\"uint256\"}],\"name\":\"getRate\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"weight\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"registries\",\"outputs\":[{\"internalType\":\"contract ICurveRegistry\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"registryTypes\",\"outputs\":[{\"internalType\":\"enum CurveOracle.CurveRegistryType\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"MathOverflowedMulDiv()\":[{\"details\":\"Muldiv operation overflow.\"}]},\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/CurveOracle.sol\":\"CurveOracle\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/interfaces/draft-IERC6093.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard ERC20 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.\\n */\\ninterface IERC20Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC20InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC20InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `spender`\\u2019s `allowance`. Used in transfers.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n * @param allowance Amount of tokens a `spender` is allowed to operate with.\\n * @param needed Minimum amount required to perform a transfer.\\n */\\n error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC20InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\\n * @param spender Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC20InvalidSpender(address spender);\\n}\\n\\n/**\\n * @dev Standard ERC721 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.\\n */\\ninterface IERC721Errors {\\n /**\\n * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.\\n * Used in balance queries.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721InvalidOwner(address owner);\\n\\n /**\\n * @dev Indicates a `tokenId` whose `owner` is the zero address.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721NonexistentToken(uint256 tokenId);\\n\\n /**\\n * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param tokenId Identifier number of a token.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC721InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC721InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC721InsufficientApproval(address operator, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC721InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC721InvalidOperator(address operator);\\n}\\n\\n/**\\n * @dev Standard ERC1155 Errors\\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.\\n */\\ninterface IERC1155Errors {\\n /**\\n * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n * @param balance Current balance for the interacting account.\\n * @param needed Minimum amount required to perform a transfer.\\n * @param tokenId Identifier number of a token.\\n */\\n error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\\n\\n /**\\n * @dev Indicates a failure with the token `sender`. Used in transfers.\\n * @param sender Address whose tokens are being transferred.\\n */\\n error ERC1155InvalidSender(address sender);\\n\\n /**\\n * @dev Indicates a failure with the token `receiver`. Used in transfers.\\n * @param receiver Address to which tokens are being transferred.\\n */\\n error ERC1155InvalidReceiver(address receiver);\\n\\n /**\\n * @dev Indicates a failure with the `operator`\\u2019s approval. Used in transfers.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n * @param owner Address of the current owner of a token.\\n */\\n error ERC1155MissingApprovalForAll(address operator, address owner);\\n\\n /**\\n * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\\n * @param approver Address initiating an approval operation.\\n */\\n error ERC1155InvalidApprover(address approver);\\n\\n /**\\n * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\\n * @param operator Address that may be allowed to operate on tokens without being their owner.\\n */\\n error ERC1155InvalidOperator(address operator);\\n\\n /**\\n * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\\n * Used in batch transfers.\\n * @param idsLength Length of the array of token identifiers\\n * @param valuesLength Length of the array of token amounts\\n */\\n error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\\n}\\n\",\"keccak256\":\"0x60c65f701957fdd6faea1acb0bb45825791d473693ed9ecb34726fdfaa849dd7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"./IERC20.sol\\\";\\nimport {IERC20Metadata} from \\\"./extensions/IERC20Metadata.sol\\\";\\nimport {Context} from \\\"../../utils/Context.sol\\\";\\nimport {IERC20Errors} from \\\"../../interfaces/draft-IERC6093.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n */\\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\\n mapping(address account => uint256) private _balances;\\n\\n mapping(address account => mapping(address spender => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `value`.\\n */\\n function transfer(address to, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 value) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, value);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `value`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `value`.\\n */\\n function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, value);\\n _transfer(from, to, value);\\n return true;\\n }\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _transfer(address from, address to, uint256 value) internal {\\n if (from == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n if (to == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(from, to, value);\\n }\\n\\n /**\\n * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\\n * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\\n * this function.\\n *\\n * Emits a {Transfer} event.\\n */\\n function _update(address from, address to, uint256 value) internal virtual {\\n if (from == address(0)) {\\n // Overflow check required: The rest of the code assumes that totalSupply never overflows\\n _totalSupply += value;\\n } else {\\n uint256 fromBalance = _balances[from];\\n if (fromBalance < value) {\\n revert ERC20InsufficientBalance(from, fromBalance, value);\\n }\\n unchecked {\\n // Overflow not possible: value <= fromBalance <= totalSupply.\\n _balances[from] = fromBalance - value;\\n }\\n }\\n\\n if (to == address(0)) {\\n unchecked {\\n // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\\n _totalSupply -= value;\\n }\\n } else {\\n unchecked {\\n // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\\n _balances[to] += value;\\n }\\n }\\n\\n emit Transfer(from, to, value);\\n }\\n\\n /**\\n * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\\n * Relies on the `_update` mechanism\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead.\\n */\\n function _mint(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidReceiver(address(0));\\n }\\n _update(address(0), account, value);\\n }\\n\\n /**\\n * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\\n * Relies on the `_update` mechanism.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * NOTE: This function is not virtual, {_update} should be overridden instead\\n */\\n function _burn(address account, uint256 value) internal {\\n if (account == address(0)) {\\n revert ERC20InvalidSender(address(0));\\n }\\n _update(account, address(0), value);\\n }\\n\\n /**\\n * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n *\\n * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\\n */\\n function _approve(address owner, address spender, uint256 value) internal {\\n _approve(owner, spender, value, true);\\n }\\n\\n /**\\n * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\\n *\\n * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\\n * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\\n * `Approval` event during `transferFrom` operations.\\n *\\n * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\\n * true using the following override:\\n * ```\\n * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\\n * super._approve(owner, spender, value, true);\\n * }\\n * ```\\n *\\n * Requirements are the same as {_approve}.\\n */\\n function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\\n if (owner == address(0)) {\\n revert ERC20InvalidApprover(address(0));\\n }\\n if (spender == address(0)) {\\n revert ERC20InvalidSpender(address(0));\\n }\\n _allowances[owner][spender] = value;\\n if (emitEvent) {\\n emit Approval(owner, spender, value);\\n }\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `value`.\\n *\\n * Does not update the allowance value in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Does not emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n if (currentAllowance < value) {\\n revert ERC20InsufficientAllowance(spender, currentAllowance, value);\\n }\\n unchecked {\\n _approve(owner, spender, currentAllowance - value, false);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3e1fa9d1987f8d349dfb4d6fe93bf2ca014b52ba335cfac30bfe71e357e6f80\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the value of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the value of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\\n * caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 value) external returns (bool);\\n\\n /**\\n * @dev Moves a `value` amount of tokens from `from` to `to` using the\\n * allowance mechanism. `value` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(address from, address to, uint256 value) external returns (bool);\\n}\\n\",\"keccak256\":\"0xc6a8ff0ea489379b61faa647490411b80102578440ab9d84e9a957cc12164e70\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xaa761817f6cd7892fcf158b3c776b34551cde36f48ff9703d53898bc45a94ea2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n function _msgSender() internal view virtual returns (address) {\\n return msg.sender;\\n }\\n\\n function _msgData() internal view virtual returns (bytes calldata) {\\n return msg.data;\\n }\\n\\n function _contextSuffixLength() internal view virtual returns (uint256) {\\n return 0;\\n }\\n}\\n\",\"keccak256\":\"0x493033a8d1b176a037b2cc6a04dad01a5c157722049bbecf632ca876224dd4b2\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n /**\\n * @dev Muldiv operation overflow.\\n */\\n error MathOverflowedMulDiv();\\n\\n enum Rounding {\\n Floor, // Toward negative infinity\\n Ceil, // Toward positive infinity\\n Trunc, // Toward zero\\n Expand // Away from zero\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the largest of two numbers.\\n */\\n function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the smallest of two numbers.\\n */\\n function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n /**\\n * @dev Returns the average of two numbers. The result is rounded towards\\n * zero.\\n */\\n function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n // (a + b) / 2 can overflow.\\n return (a & b) + (a ^ b) / 2;\\n }\\n\\n /**\\n * @dev Returns the ceiling of the division of two numbers.\\n *\\n * This differs from standard division with `/` in that it rounds towards infinity instead\\n * of rounding towards zero.\\n */\\n function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n if (b == 0) {\\n // Guarantee the same behavior as in a regular Solidity division.\\n return a / b;\\n }\\n\\n // (a + b - 1) / b can overflow on addition, so we distribute.\\n return a == 0 ? 0 : (a - 1) / b + 1;\\n }\\n\\n /**\\n * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by\\n * Uniswap Labs also under MIT license.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n unchecked {\\n // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2^256 + prod0.\\n uint256 prod0 = x * y; // Least significant 256 bits of the product\\n uint256 prod1; // Most significant 256 bits of the product\\n assembly {\\n let mm := mulmod(x, y, not(0))\\n prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n }\\n\\n // Handle non-overflow cases, 256 by 256 division.\\n if (prod1 == 0) {\\n // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n // The surrounding unchecked block does not change this fact.\\n // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n return prod0 / denominator;\\n }\\n\\n // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n if (denominator <= prod1) {\\n revert MathOverflowedMulDiv();\\n }\\n\\n ///////////////////////////////////////////////\\n // 512 by 256 division.\\n ///////////////////////////////////////////////\\n\\n // Make division exact by subtracting the remainder from [prod1 prod0].\\n uint256 remainder;\\n assembly {\\n // Compute remainder using mulmod.\\n remainder := mulmod(x, y, denominator)\\n\\n // Subtract 256 bit number from 512 bit number.\\n prod1 := sub(prod1, gt(remainder, prod0))\\n prod0 := sub(prod0, remainder)\\n }\\n\\n // Factor powers of two out of denominator and compute largest power of two divisor of denominator.\\n // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.\\n\\n uint256 twos = denominator & (0 - denominator);\\n assembly {\\n // Divide denominator by twos.\\n denominator := div(denominator, twos)\\n\\n // Divide [prod1 prod0] by twos.\\n prod0 := div(prod0, twos)\\n\\n // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n twos := add(div(sub(0, twos), twos), 1)\\n }\\n\\n // Shift in bits from prod1 into prod0.\\n prod0 |= prod1 * twos;\\n\\n // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv = 1 mod 2^4.\\n uint256 inverse = (3 * denominator) ^ 2;\\n\\n // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also\\n // works in modular arithmetic, doubling the correct bits in each step.\\n inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n // is no longer required.\\n result = prod0 * inverse;\\n return result;\\n }\\n }\\n\\n /**\\n * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n */\\n function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n uint256 result = mulDiv(x, y, denominator);\\n if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {\\n result += 1;\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded\\n * towards zero.\\n *\\n * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n if (a == 0) {\\n return 0;\\n }\\n\\n // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n //\\n // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n //\\n // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n //\\n // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n uint256 result = 1 << (log2(a) >> 1);\\n\\n // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n // into the expected uint128 result.\\n unchecked {\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n result = (result + a / result) >> 1;\\n return min(result, a / result);\\n }\\n }\\n\\n /**\\n * @notice Calculates sqrt(a), following the selected rounding direction.\\n */\\n function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = sqrt(a);\\n return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 2 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 128;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 64;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 32;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 16;\\n }\\n if (value >> 8 > 0) {\\n value >>= 8;\\n result += 8;\\n }\\n if (value >> 4 > 0) {\\n value >>= 4;\\n result += 4;\\n }\\n if (value >> 2 > 0) {\\n value >>= 2;\\n result += 2;\\n }\\n if (value >> 1 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log2(value);\\n return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 10 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >= 10 ** 64) {\\n value /= 10 ** 64;\\n result += 64;\\n }\\n if (value >= 10 ** 32) {\\n value /= 10 ** 32;\\n result += 32;\\n }\\n if (value >= 10 ** 16) {\\n value /= 10 ** 16;\\n result += 16;\\n }\\n if (value >= 10 ** 8) {\\n value /= 10 ** 8;\\n result += 8;\\n }\\n if (value >= 10 ** 4) {\\n value /= 10 ** 4;\\n result += 4;\\n }\\n if (value >= 10 ** 2) {\\n value /= 10 ** 2;\\n result += 2;\\n }\\n if (value >= 10 ** 1) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log10(value);\\n return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Return the log in base 256 of a positive value rounded towards zero.\\n * Returns 0 if given 0.\\n *\\n * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n */\\n function log256(uint256 value) internal pure returns (uint256) {\\n uint256 result = 0;\\n unchecked {\\n if (value >> 128 > 0) {\\n value >>= 128;\\n result += 16;\\n }\\n if (value >> 64 > 0) {\\n value >>= 64;\\n result += 8;\\n }\\n if (value >> 32 > 0) {\\n value >>= 32;\\n result += 4;\\n }\\n if (value >> 16 > 0) {\\n value >>= 16;\\n result += 2;\\n }\\n if (value >> 8 > 0) {\\n result += 1;\\n }\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n * Returns 0 if given 0.\\n */\\n function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n unchecked {\\n uint256 result = log256(value);\\n return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);\\n }\\n }\\n\\n /**\\n * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.\\n */\\n function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {\\n return uint8(rounding) % 2 == 1;\\n }\\n}\\n\",\"keccak256\":\"0x005ec64c6313f0555d59e278f9a7a5ab2db5bdc72a027f255a37c327af1ec02d\",\"license\":\"MIT\"},\"contracts/interfaces/ICurveProvider.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\n// solhint-disable func-name-mixedcase\\n\\ninterface ICurveProvider {\\n function get_address (uint256 _id) external view returns (address);\\n}\\n\",\"keccak256\":\"0x301cccb7664ac75198c8731fc44d4e23b1f1f91722d297491364d710209d3f57\",\"license\":\"MIT\"},\"contracts/interfaces/ICurveRegistry.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\n// solhint-disable func-name-mixedcase\\n\\ninterface ICurveRegistry {\\n function pool_count() external view returns (uint256);\\n function pool_list(uint256 index) external view returns (address);\\n\\n // MAIN_REGISTRY, METAPOOL_FACTORY, CRYPTOSWAP_REGISTRY, CRYPTOPOOL_FACTORY, METAREGISTRY, CRVUSD_PLAIN_POOLS, CURVE_TRICRYPTO_FACTORY\\n function find_pool_for_coins(address _srcToken, address _dstToken, uint256 _index) external view returns (address);\\n\\n // MAIN_REGISTRY, METAPOOL_FACTORY, METAREGISTRY, CRVUSD_PLAIN_POOLS\\n function get_coin_indices(address _pool, address _srcToken, address _dstToken) external view returns (int128, int128, bool);\\n // CRYPTOSWAP_REGISTRY, CRYPTOPOOL_FACTORY, CURVE_TRICRYPTO_FACTORY - returns (uint256,uint256);\\n\\n // MAIN_REGISTRY, CRYPTOSWAP_REGISTRY, METAREGISTRY\\n function get_balances(address _pool) external view returns (uint256[8] memory);\\n // METAPOOL_FACTORY, CRVUSD_PLAIN_POOLS - returns (uint256[4]);\\n // CURVE_TRICRYPTO_FACTORY - returns (uint256[3]);\\n // CRYPTOPOOL_FACTORY - returns (uint256[2]);\\n\\n // MAIN_REGISTRY, METAPOOL_FACTORY, METAREGISTRY, CRVUSD_PLAIN_POOLS\\n function get_underlying_balances(address _pool) external view returns (uint256[8] memory);\\n // CRYPTOSWAP_REGISTRY, CRYPTOPOOL_FACTORY - NO METHOD\\n}\\n\",\"keccak256\":\"0xeb7cd00351ab42d736b4e1806b43ca5ff4d0dbfe44b74a5110c79d3abb5e9390\",\"license\":\"MIT\"},\"contracts/interfaces/ICurveSwap.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\n// solhint-disable one-contract-per-file\\n\\npragma solidity 0.8.23;\\n\\n// solhint-disable func-name-mixedcase\\n\\ninterface ICurveSwapInt128 {\\n function get_dy(int128 _from, int128 _to, uint256 _amount) external view returns (uint256);\\n function get_dy_underlying(int128 _from, int128 _to, uint256 _amount) external view returns (uint256);\\n}\\n\\ninterface ICurveSwapUint256 {\\n function get_dy(uint256 _from, uint256 _to, uint256 _amount) external view returns (uint256);\\n function get_dy_underlying(uint256 _from, uint256 _to, uint256 _amount) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9af89bbeb6d6c48a44d08698312a7378400a2fec331b4d4dbccf91f2a915f15b\",\"license\":\"MIT\"},\"contracts/interfaces/IOracle.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IOracle {\\n error ConnectorShouldBeNone();\\n error PoolNotFound();\\n error PoolWithConnectorNotFound();\\n\\n function getRate(IERC20 srcToken, IERC20 dstToken, IERC20 connector, uint256 thresholdFilter) external view returns (uint256 rate, uint256 weight);\\n}\\n\",\"keccak256\":\"0xac06788d609ed5f178e04cc3cffed0607ca444607f4c81abb947bbf1cf91707d\",\"license\":\"MIT\"},\"contracts/libraries/OraclePrices.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\n\\n/**\\n * @title OraclePrices\\n * @notice A library that provides functionalities for processing and analyzing token rate and weight data provided by an oracle.\\n * The library is used when an oracle uses multiple pools to determine a token's price.\\n * It allows to filter out pools with low weight and significantly incorrect price, which could distort the weighted price.\\n * The level of low-weight pool filtering can be managed using the thresholdFilter parameter.\\n */\\nlibrary OraclePrices {\\n using Math for uint256;\\n\\n /**\\n * @title Oracle Price Data Structure\\n * @notice This structure encapsulates the rate and weight information for tokens as provided by an oracle\\n * @dev An array of OraclePrice structures can be used to represent oracle data for multiple pools\\n * @param rate The oracle-provided rate for a token\\n * @param weight The oracle-provided derived weight for a token\\n */\\n struct OraclePrice {\\n uint256 rate;\\n uint256 weight;\\n }\\n\\n /**\\n * @title Oracle Prices Data Structure\\n * @notice This structure encapsulates information about a list of oracles prices and weights\\n * @dev The structure is initialized with a maximum possible length by the `init` function\\n * @param oraclePrices An array of OraclePrice structures, each containing a rate and weight\\n * @param maxOracleWeight The maximum weight among the OraclePrice elements in the oraclePrices array\\n * @param size The number of meaningful OraclePrice elements added to the oraclePrices array\\n */\\n struct Data {\\n uint256 maxOracleWeight;\\n uint256 size;\\n OraclePrice[] oraclePrices;\\n }\\n\\n /**\\n * @notice Initializes an array of OraclePrices with a given maximum length and returns it wrapped inside a Data struct\\n * @dev Uses inline assembly for memory allocation to avoid array zeroing and extra array copy to struct\\n * @param maxArrLength The maximum length of the oraclePrices array\\n * @return data Returns an instance of Data struct containing an OraclePrice array with a specified maximum length\\n */\\n function init(uint256 maxArrLength) internal pure returns (Data memory data) {\\n assembly (\\\"memory-safe\\\") { // solhint-disable-line no-inline-assembly\\n data := mload(0x40)\\n mstore(0x40, add(data, add(0x80, mul(maxArrLength, 0x40))))\\n mstore(add(data, 0x00), 0)\\n mstore(add(data, 0x20), 0)\\n mstore(add(data, 0x40), add(data, 0x60))\\n mstore(add(data, 0x60), maxArrLength)\\n }\\n }\\n\\n /**\\n * @notice Appends an OraclePrice to the oraclePrices array in the provided Data struct if the OraclePrice has a non-zero weight\\n * @dev If the weight of the OraclePrice is greater than the current maxOracleWeight, the maxOracleWeight is updated. The size (number of meaningful elements) of the array is incremented after appending the OraclePrice.\\n * @param data The Data struct that contains the oraclePrices array, maxOracleWeight, and the current size\\n * @param oraclePrice The OraclePrice to be appended to the oraclePrices array\\n * @return isAppended A flag indicating whether the oraclePrice was appended or not\\n */\\n function append(Data memory data, OraclePrice memory oraclePrice) internal pure returns (bool isAppended) {\\n if (oraclePrice.weight > 0) {\\n data.oraclePrices[data.size] = oraclePrice;\\n data.size++;\\n if (oraclePrice.weight > data.maxOracleWeight) {\\n data.maxOracleWeight = oraclePrice.weight;\\n }\\n return true;\\n }\\n return false;\\n }\\n\\n /**\\n * @notice Calculates the weighted rate from the oracle prices data using a threshold filter\\n * @dev Shrinks the `oraclePrices` array to remove any unused space, though it's unclear how this optimizes the code, but it is. Then calculates the weighted rate\\n * considering only the oracle prices whose weight is above the threshold which is percent from max weight\\n * @param data The data structure containing oracle prices, the maximum oracle weight and the size of the used oracle prices array\\n * @param thresholdFilter The threshold to filter oracle prices based on their weight\\n * @return weightedRate The calculated weighted rate\\n * @return totalWeight The total weight of the oracle prices that passed the threshold\\n */\\n function getRateAndWeight(Data memory data, uint256 thresholdFilter) internal pure returns (uint256 weightedRate, uint256 totalWeight) {\\n // shrink oraclePrices array\\n uint256 size = data.size;\\n assembly (\\\"memory-safe\\\") { // solhint-disable-line no-inline-assembly\\n let ptr := mload(add(data, 64))\\n mstore(ptr, size)\\n }\\n\\n // calculate weighted rate\\n for (uint256 i = 0; i < size; i++) {\\n OraclePrice memory p = data.oraclePrices[i];\\n if (p.weight * 100 < data.maxOracleWeight * thresholdFilter) {\\n continue;\\n }\\n weightedRate += p.rate * p.weight;\\n totalWeight += p.weight;\\n }\\n if (totalWeight > 0) {\\n unchecked { weightedRate /= totalWeight; }\\n }\\n }\\n\\n /**\\n * @notice See `getRateAndWeight`. It uses SafeMath to prevent overflows.\\n */\\n function getRateAndWeightWithSafeMath(Data memory data, uint256 thresholdFilter) internal pure returns (uint256 weightedRate, uint256 totalWeight) {\\n // shrink oraclePrices array\\n uint256 size = data.size;\\n assembly (\\\"memory-safe\\\") { // solhint-disable-line no-inline-assembly\\n let ptr := mload(add(data, 64))\\n mstore(ptr, size)\\n }\\n\\n // calculate weighted rate\\n for (uint256 i = 0; i < size; i++) {\\n OraclePrice memory p = data.oraclePrices[i];\\n if (p.weight * 100 < data.maxOracleWeight * thresholdFilter) {\\n continue;\\n }\\n (bool ok, uint256 weightedRateI) = p.rate.tryMul(p.weight);\\n if (ok) {\\n (ok, weightedRate) = _tryAdd(weightedRate, weightedRateI);\\n if (ok) totalWeight += p.weight;\\n }\\n }\\n if (totalWeight > 0) {\\n unchecked { weightedRate /= totalWeight; }\\n }\\n }\\n\\n function _tryAdd(uint256 value, uint256 addition) private pure returns (bool, uint256) {\\n unchecked {\\n uint256 result = value + addition;\\n if (result < value) return (false, value);\\n return (true, result);\\n }\\n }\\n}\\n\",\"keccak256\":\"0x2f2b57376ac6f8b4a594312b5771f514bef4579ef2cb1dcf1b60bd278ae3495a\",\"license\":\"MIT\"},\"contracts/oracles/CurveOracle.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport \\\"../interfaces/IOracle.sol\\\";\\nimport \\\"../interfaces/ICurveProvider.sol\\\";\\nimport \\\"../interfaces/ICurveRegistry.sol\\\";\\nimport \\\"../interfaces/ICurveSwap.sol\\\";\\nimport \\\"../libraries/OraclePrices.sol\\\";\\n\\ncontract CurveOracle is IOracle {\\n using OraclePrices for OraclePrices.Data;\\n using Math for uint256;\\n\\n enum CurveRegistryType {\\n MAIN_REGISTRY,\\n METAPOOL_FACTORY,\\n CRYPTOSWAP_REGISTRY,\\n CRYPTOPOOL_FACTORY,\\n METAREGISTRY,\\n CRVUSD_PLAIN_POOLS,\\n CURVE_TRICRYPTO_FACTORY,\\n STABLESWAP_FACTORY,\\n L2_FACTORY,\\n CRYPTO_FACTORY\\n }\\n\\n struct FunctionSelectorsInfo {\\n bytes4 balanceFunc;\\n bytes4 dyFuncInt128;\\n bytes4 dyFuncUint256;\\n }\\n\\n IERC20 private constant _NONE = IERC20(0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF);\\n\\n uint256 public immutable MAX_POOLS;\\n uint256 public immutable REGISTRIES_COUNT;\\n ICurveRegistry[11] public registries;\\n CurveRegistryType[11] public registryTypes;\\n\\n constructor(ICurveProvider _addressProvider, uint256 _maxPools, uint256[] memory _registryIds, CurveRegistryType[] memory _registryTypes) {\\n MAX_POOLS = _maxPools;\\n REGISTRIES_COUNT = _registryIds.length;\\n unchecked {\\n for (uint256 i = 0; i < REGISTRIES_COUNT; i++) {\\n registries[i] = ICurveRegistry(_addressProvider.get_address(_registryIds[i]));\\n registryTypes[i] = _registryTypes[i];\\n }\\n }\\n }\\n\\n function getRate(IERC20 srcToken, IERC20 dstToken, IERC20 connector, uint256 thresholdFilter) external view override returns (uint256 rate, uint256 weight) {\\n if(connector != _NONE) revert ConnectorShouldBeNone();\\n\\n OraclePrices.Data memory ratesAndWeights = OraclePrices.init(MAX_POOLS);\\n FunctionSelectorsInfo memory info;\\n uint256 index = 0;\\n for (uint256 i = 0; i < REGISTRIES_COUNT && index < MAX_POOLS; i++) {\\n uint256 registryIndex = 0;\\n address pool = registries[i].find_pool_for_coins(address(srcToken), address(dstToken), registryIndex);\\n while (pool != address(0) && index < MAX_POOLS) {\\n index++;\\n // call `get_coin_indices` and set (srcTokenIndex, dstTokenIndex, isUnderlying) variables\\n bool isUnderlying;\\n int128 srcTokenIndex;\\n int128 dstTokenIndex;\\n (bool success, bytes memory data) = address(registries[i]).staticcall(abi.encodeWithSelector(ICurveRegistry.get_coin_indices.selector, pool, address(srcToken), address(dstToken)));\\n if (success && data.length >= 64) {\\n if (\\n registryTypes[i] == CurveRegistryType.CRYPTOSWAP_REGISTRY ||\\n registryTypes[i] == CurveRegistryType.CRYPTOPOOL_FACTORY ||\\n registryTypes[i] == CurveRegistryType.CURVE_TRICRYPTO_FACTORY\\n ) {\\n (srcTokenIndex, dstTokenIndex) = abi.decode(data, (int128, int128));\\n } else {\\n // registryTypes[i] == CurveRegistryType.MAIN_REGISTRY ||\\n // registryTypes[i] == CurveRegistryType.METAPOOL_FACTORY ||\\n // registryTypes[i] == CurveRegistryType.METAREGISTRY ||\\n // registryTypes[i] == CurveRegistryType.CRVUSD_PLAIN_POOLS ||\\n // registryTypes[i] == CurveRegistryType.STABLESWAP_FACTORY ||\\n // registryTypes[i] == CurveRegistryType.L2_FACTORY ||\\n // registryTypes[i] == CurveRegistryType.CRYPTO_FACTORY\\n (srcTokenIndex, dstTokenIndex, isUnderlying) = abi.decode(data, (int128, int128, bool));\\n }\\n } else {\\n pool = registries[i].find_pool_for_coins(address(srcToken), address(dstToken), ++registryIndex);\\n continue;\\n }\\n\\n if (!isUnderlying) {\\n info = FunctionSelectorsInfo({\\n balanceFunc: ICurveRegistry.get_balances.selector,\\n dyFuncInt128: ICurveSwapInt128.get_dy.selector,\\n dyFuncUint256: ICurveSwapUint256.get_dy.selector\\n });\\n } else {\\n info = FunctionSelectorsInfo({\\n balanceFunc: ICurveRegistry.get_underlying_balances.selector,\\n dyFuncInt128: ICurveSwapInt128.get_dy_underlying.selector,\\n dyFuncUint256: ICurveSwapUint256.get_dy_underlying.selector\\n });\\n }\\n\\n // call `balanceFunc` (`get_balances` or `get_underlying_balances`) and decode results\\n uint256[] memory balances;\\n (success, data) = address(registries[i]).staticcall(abi.encodeWithSelector(info.balanceFunc, pool));\\n if (success && data.length >= 64) {\\n // registryTypes[i] == CurveRegistryType.MAIN_REGISTRY ||\\n // registryTypes[i] == CurveRegistryType.CRYPTOSWAP_REGISTRY ||\\n // registryTypes[i] == CurveRegistryType.METAREGISTRY\\n uint256 length = 8;\\n if (!isUnderlying) {\\n if (\\n registryTypes[i] == CurveRegistryType.METAPOOL_FACTORY ||\\n registryTypes[i] == CurveRegistryType.CRVUSD_PLAIN_POOLS ||\\n registryTypes[i] == CurveRegistryType.STABLESWAP_FACTORY ||\\n registryTypes[i] == CurveRegistryType.L2_FACTORY ||\\n registryTypes[i] == CurveRegistryType.CRYPTO_FACTORY\\n ) {\\n length = 4;\\n } else if (registryTypes[i] == CurveRegistryType.CURVE_TRICRYPTO_FACTORY) {\\n length = 3;\\n } else if (registryTypes[i] == CurveRegistryType.CRYPTOPOOL_FACTORY) {\\n length = 2;\\n }\\n }\\n\\n assembly (\\\"memory-safe\\\") { // solhint-disable-line no-inline-assembly\\n balances := data\\n mstore(balances, length)\\n }\\n } else {\\n pool = registries[i].find_pool_for_coins(address(srcToken), address(dstToken), ++registryIndex);\\n continue;\\n }\\n\\n uint256 w = (balances[uint128(srcTokenIndex)] * balances[uint128(dstTokenIndex)]).sqrt();\\n uint256 b0 = balances[uint128(srcTokenIndex)] / 10000;\\n uint256 b1 = balances[uint128(dstTokenIndex)] / 10000;\\n\\n if (b0 != 0 && b1 != 0) {\\n (success, data) = pool.staticcall(abi.encodeWithSelector(info.dyFuncInt128, srcTokenIndex, dstTokenIndex, b0));\\n if (!success || data.length < 32) {\\n (success, data) = pool.staticcall(abi.encodeWithSelector(info.dyFuncUint256, uint128(srcTokenIndex), uint128(dstTokenIndex), b0));\\n }\\n if (success && data.length >= 32) { // vyper could return redundant bytes\\n b1 = abi.decode(data, (uint256));\\n ratesAndWeights.append(OraclePrices.OraclePrice(Math.mulDiv(b1, 1e18, b0), w));\\n }\\n }\\n pool = registries[i].find_pool_for_coins(address(srcToken), address(dstToken), ++registryIndex);\\n }\\n }\\n (rate, weight) = ratesAndWeights.getRateAndWeight(thresholdFilter);\\n }\\n}\\n\",\"keccak256\":\"0x1f236be38241d8df4d3fd117f3be3a8e1e4ae0523a4f2bf079c89ebcbeba5a20\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60c0604081815234620002a757620015ee8038038091620000218286620002bd565b8439820190608083830312620002a75782516001600160a01b03928382169291839003620002a757602085810151838701516001600160401b03969293929190878111620002a75788019683601f89011215620002a757875198620000868a620002f7565b986200009588519a8b620002bd565b8a8a52868a018760059c60051b83010191878311620002a75788809101915b838310620002ac57505050506060810151918211620002a757019280601f85011215620002a7578351620000e881620002f7565b94620000f788519687620002bd565b818652868087019260051b820101928311620002a7578601905b8282106200028d5750505060805285519560a09660a05260005b875181101562000249576200014181836200030f565b51865163124fd3dd60e21b815260049182820152602490878183818d5afa9081156200023e57600091620001fa575b5090600b9182851015620001e65784546001600160a01b0319169087161784556200019c84886200030f565b5192600a841015620001d35750509082916001938c1c0190815460f88460031b169160ff809116831b921b1916179055016200012b565b602190634e487b7160e01b600052526000fd5b50634e487b7160e01b600090815260328452fd5b8881813d831162000236575b620002128183620002bd565b810103126200023257519086821682036200022f57503862000170565b80fd5b5080fd5b503d62000206565b89513d6000823e3d90fd5b85516112b390816200033b8239608051818181610121015281816102cb0152818161030a01528181610cc60152610df7015260a0518181816101d7015261034e0152f35b8151600a811015620002a757815290860190860162000111565b600080fd5b8251815291810191899101620000b4565b601f909101601f19168101906001600160401b03821190821017620002e157604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038111620002e15760051b60200190565b8051821015620003245760209160051b010190565b634e487b7160e01b600052603260045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c9081633d549b32146101fa5750806347400449146101a15780636347c9001461014457806381358498146100eb5763b72529f21461005657600080fd5b346100e65760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e657600435600b8110156100e65761009c60ff91610e45565b90549060031b1c16604051600a8210156100b7576020918152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600080fd5b346100e65760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e65760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346100e65760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e657600435600b8110156100e65773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b346100e65760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e65760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346100e65760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e6576004359073ffffffffffffffffffffffffffffffffffffffff821682036100e6576024359073ffffffffffffffffffffffffffffffffffffffff821682036100e65760443573ffffffffffffffffffffffffffffffffffffffff81168091036100e65773ffffffffffffffffffffffffffffffffffffffff03610e1d57506060604080516102b681610e5d565b600081526000602082015201526040519060807f000000000000000000000000000000000000000000000000000000000000000060061b8301016040526000825260006020830152606082018060408401527f0000000000000000000000000000000000000000000000000000000000000000905260006040805161033a81610e5d565b82815282602082015201526000916000925b7f0000000000000000000000000000000000000000000000000000000000000000841080610df4575b15610d0b57600091600b851015918261078d5773ffffffffffffffffffffffffffffffffffffffff865416936040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8716602482015260006044820152602081606481895afa90811561078157600091610cec575b50915b73ffffffffffffffffffffffffffffffffffffffff8316151580610cc3575b15610cad5761044e90610ed6565b916000908561078d576000808b60405173ffffffffffffffffffffffffffffffffffffffff60208201927feb85226d000000000000000000000000000000000000000000000000000000008452818716602484015216604482015273ffffffffffffffffffffffffffffffffffffffff8c166064820152606481526104d281610e79565b51908a5afa916104e0610f2f565b9280610ca1575b15610c91576104f58a610e45565b905490600a60ff838360031b1c1610156100b75760031b1c60ff166002148015610c6c575b8015610c47575b15610c0c576040838051810103126100e65761054b604061054460208601610f8d565b9401610f8d565b81610b8b5760405161055c81610e5d565b7f92e3cc2d0000000000000000000000000000000000000000000000000000000081527f5e0d443f0000000000000000000000000000000000000000000000000000000060208201527f556d6e9f000000000000000000000000000000000000000000000000000000006040820152925b8861078d576000807fffffffff000000000000000000000000000000000000000000000000000000008651166040516020810191825273ffffffffffffffffffffffffffffffffffffffff851660248201526024815261062c81610e5d565b51908d5afa9261063a610f2f565b9380610b7f575b15610ada57908995949392916008901561096b575b83526fffffffffffffffffffffffffffffffff9161069561069061067c85891687610f9b565b5161068986851688610f9b565b5190610faf565b610ffb565b956127106106b5816106a987851689610f9b565b51049686851690610f9b565b51048515159081610961575b506107bc575b5050505050505061078d576106db90610ed6565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa90811561078157600091610752575b50915b969096610421565b610774915060203d60201161077a575b61076c8183610e95565b810190610f03565b89610747565b503d610762565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000807fffffffff000000000000000000000000000000000000000000000000000000006020890151166040516020810191825284600f0b602482015285600f0b60448201528860648201526064815261081581610e79565b5190865afa93610823610f2f565b9685158015610956575b6108e3575b5050505050806108d7575b61084b575b808080806106c7565b909192506020828051810103126100e657602061086992015161113e565b60405180604081011067ffffffffffffffff6040830111176108a857869261089f92604083016040528252602082015285611214565b50898080610842565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b5060208251101561083d565b600096975086955060407fffffffff0000000000000000000000000000000000000000000000000000000091015116928160405193602085019586521660248401521660448201528560648201526064815261093e81610e79565b51915afa9061094b610f2f565b918d80808080610832565b50602088511061082d565b90501515386106c1565b95506109768d610e45565b96905496600a60ff898360031b1c1610156100b7578b978f9160031b1c60ff166001148015610aae575b8015610a82575b8015610a57575b8015610a2b575b156109c457505060045b610656565b60ff9197506109d290610e45565b90549060031b1c1695600a8710156100b7578d60068c98146000146109fa5750506003610656565b60ff919750610a0890610e45565b90549060031b1c1695600a8710156100b75760038b97036109bf57506002610656565b5060ff919750610a3a90610e45565b90549060031b1c1695600a8710156100b7578d60098c98146109b5565b5060ff919750610a6690610e45565b90549060031b1c1695600a8710156100b7578d818c98146109ae565b5060ff919750610a9190610e45565b90549060031b1c1695600a8710156100b7578d60078c98146109a7565b5060ff919750610abd90610e45565b90549060031b1c1695600a8710156100b7578d60058c98146109a0565b5050505050509250610aed600093610ed6565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa90811561078157600091610b60575b509161074a565b610b79915060203d60201161077a5761076c8183610e95565b89610b59565b50604084511015610641565b604051610b9781610e5d565b7f59f4f3510000000000000000000000000000000000000000000000000000000081527f07211ef70000000000000000000000000000000000000000000000000000000060208201527f85f11d1e000000000000000000000000000000000000000000000000000000006040820152926105cd565b506060828051810103126100e657610c2660208301610f8d565b916060610c3560408301610f8d565b91015180151581036100e6579061054b565b5060ff610c538b610e45565b90549060031b1c16600a8110156100b757600614610521565b5060ff610c788b610e45565b90549060031b1c16600a8110156100b75760031461051a565b5050509250610aed600093610ed6565b506040835110156104e7565b9450505093610cbc9150610ed6565b929061034c565b507f00000000000000000000000000000000000000000000000000000000000000008110610440565b610d05915060203d60201161077a5761076c8183610e95565b8961041e565b506000806020830151806040850151526000905b808210610d4d576040848480610d3c575b82519182526020820152f35b9081610d4791610fc2565b90610d30565b9091610d5d836040870151610f9b565b519360208501948551606481029080820460641490151715610dc557610d866064358951610faf565b11610db95791610da8610db092610da260019551895190610faf565b90611270565b955190611270565b925b0190610d1f565b50935091600190610db2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b507f00000000000000000000000000000000000000000000000000000000000000008110610375565b807fccf7e6f70000000000000000000000000000000000000000000000000000000060049252fd5b90600b82101561078d57601f8260051c600b01921690565b6060810190811067ffffffffffffffff8211176108a857604052565b60a0810190811067ffffffffffffffff8211176108a857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108a857604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610dc55760010190565b908160209103126100e6575173ffffffffffffffffffffffffffffffffffffffff811681036100e65790565b3d15610f88573d9067ffffffffffffffff82116108a85760405191610f7c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610e95565b82523d6000602084013e565b606090565b519081600f0b82036100e657565b805182101561078d5760209160051b010190565b81810292918115918404141715610dc557565b8115610fcc570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8015611138576110c6816000908360801c8061112c575b508060401c8061111f575b508060201c80611112575b508060101c80611105575b508060081c806110f8575b508060041c806110eb575b508060021c806110de575b50600191828092811c6110d7575b1c1b61106e8185610fc2565b01811c61107b8185610fc2565b01811c6110888185610fc2565b01811c6110958185610fc2565b01811c6110a28185610fc2565b01811c6110af8185610fc2565b01811c6110bc8185610fc2565b01901c8092610fc2565b808210156110d2575090565b905090565b0181611062565b6002915091019038611054565b6004915091019038611049565b600891509101903861103e565b6010915091019038611033565b6020915091019038611028565b604091509101903861101d565b91505060809038611012565b50600090565b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8482099383808610950394808603951461120457848311156111da5782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906112119250610fc2565b90565b906020810190815161122857505050600090565b61124960408401519160208501928351916112438383610f9b565b52610f9b565b506112548151610ed6565b9052519080518211611268575b5050600190565b523880611261565b91908201809211610dc55756fea26469706673582212204b098fefe89cf9d8d130bcd1b394a619e7a09613d63db61aba5c4f062b499bff64736f6c63430008170033", - "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c9081633d549b32146101fa5750806347400449146101a15780636347c9001461014457806381358498146100eb5763b72529f21461005657600080fd5b346100e65760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e657600435600b8110156100e65761009c60ff91610e45565b90549060031b1c16604051600a8210156100b7576020918152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b600080fd5b346100e65760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e65760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346100e65760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e657600435600b8110156100e65773ffffffffffffffffffffffffffffffffffffffff6020915416604051908152f35b346100e65760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e65760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346100e65760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100e6576004359073ffffffffffffffffffffffffffffffffffffffff821682036100e6576024359073ffffffffffffffffffffffffffffffffffffffff821682036100e65760443573ffffffffffffffffffffffffffffffffffffffff81168091036100e65773ffffffffffffffffffffffffffffffffffffffff03610e1d57506060604080516102b681610e5d565b600081526000602082015201526040519060807f000000000000000000000000000000000000000000000000000000000000000060061b8301016040526000825260006020830152606082018060408401527f0000000000000000000000000000000000000000000000000000000000000000905260006040805161033a81610e5d565b82815282602082015201526000916000925b7f0000000000000000000000000000000000000000000000000000000000000000841080610df4575b15610d0b57600091600b851015918261078d5773ffffffffffffffffffffffffffffffffffffffff865416936040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8716602482015260006044820152602081606481895afa90811561078157600091610cec575b50915b73ffffffffffffffffffffffffffffffffffffffff8316151580610cc3575b15610cad5761044e90610ed6565b916000908561078d576000808b60405173ffffffffffffffffffffffffffffffffffffffff60208201927feb85226d000000000000000000000000000000000000000000000000000000008452818716602484015216604482015273ffffffffffffffffffffffffffffffffffffffff8c166064820152606481526104d281610e79565b51908a5afa916104e0610f2f565b9280610ca1575b15610c91576104f58a610e45565b905490600a60ff838360031b1c1610156100b75760031b1c60ff166002148015610c6c575b8015610c47575b15610c0c576040838051810103126100e65761054b604061054460208601610f8d565b9401610f8d565b81610b8b5760405161055c81610e5d565b7f92e3cc2d0000000000000000000000000000000000000000000000000000000081527f5e0d443f0000000000000000000000000000000000000000000000000000000060208201527f556d6e9f000000000000000000000000000000000000000000000000000000006040820152925b8861078d576000807fffffffff000000000000000000000000000000000000000000000000000000008651166040516020810191825273ffffffffffffffffffffffffffffffffffffffff851660248201526024815261062c81610e5d565b51908d5afa9261063a610f2f565b9380610b7f575b15610ada57908995949392916008901561096b575b83526fffffffffffffffffffffffffffffffff9161069561069061067c85891687610f9b565b5161068986851688610f9b565b5190610faf565b610ffb565b956127106106b5816106a987851689610f9b565b51049686851690610f9b565b51048515159081610961575b506107bc575b5050505050505061078d576106db90610ed6565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa90811561078157600091610752575b50915b969096610421565b610774915060203d60201161077a575b61076c8183610e95565b810190610f03565b89610747565b503d610762565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000807fffffffff000000000000000000000000000000000000000000000000000000006020890151166040516020810191825284600f0b602482015285600f0b60448201528860648201526064815261081581610e79565b5190865afa93610823610f2f565b9685158015610956575b6108e3575b5050505050806108d7575b61084b575b808080806106c7565b909192506020828051810103126100e657602061086992015161113e565b60405180604081011067ffffffffffffffff6040830111176108a857869261089f92604083016040528252602082015285611214565b50898080610842565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b5060208251101561083d565b600096975086955060407fffffffff0000000000000000000000000000000000000000000000000000000091015116928160405193602085019586521660248401521660448201528560648201526064815261093e81610e79565b51915afa9061094b610f2f565b918d80808080610832565b50602088511061082d565b90501515386106c1565b95506109768d610e45565b96905496600a60ff898360031b1c1610156100b7578b978f9160031b1c60ff166001148015610aae575b8015610a82575b8015610a57575b8015610a2b575b156109c457505060045b610656565b60ff9197506109d290610e45565b90549060031b1c1695600a8710156100b7578d60068c98146000146109fa5750506003610656565b60ff919750610a0890610e45565b90549060031b1c1695600a8710156100b75760038b97036109bf57506002610656565b5060ff919750610a3a90610e45565b90549060031b1c1695600a8710156100b7578d60098c98146109b5565b5060ff919750610a6690610e45565b90549060031b1c1695600a8710156100b7578d818c98146109ae565b5060ff919750610a9190610e45565b90549060031b1c1695600a8710156100b7578d60078c98146109a7565b5060ff919750610abd90610e45565b90549060031b1c1695600a8710156100b7578d60058c98146109a0565b5050505050509250610aed600093610ed6565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa90811561078157600091610b60575b509161074a565b610b79915060203d60201161077a5761076c8183610e95565b89610b59565b50604084511015610641565b604051610b9781610e5d565b7f59f4f3510000000000000000000000000000000000000000000000000000000081527f07211ef70000000000000000000000000000000000000000000000000000000060208201527f85f11d1e000000000000000000000000000000000000000000000000000000006040820152926105cd565b506060828051810103126100e657610c2660208301610f8d565b916060610c3560408301610f8d565b91015180151581036100e6579061054b565b5060ff610c538b610e45565b90549060031b1c16600a8110156100b757600614610521565b5060ff610c788b610e45565b90549060031b1c16600a8110156100b75760031461051a565b5050509250610aed600093610ed6565b506040835110156104e7565b9450505093610cbc9150610ed6565b929061034c565b507f00000000000000000000000000000000000000000000000000000000000000008110610440565b610d05915060203d60201161077a5761076c8183610e95565b8961041e565b506000806020830151806040850151526000905b808210610d4d576040848480610d3c575b82519182526020820152f35b9081610d4791610fc2565b90610d30565b9091610d5d836040870151610f9b565b519360208501948551606481029080820460641490151715610dc557610d866064358951610faf565b11610db95791610da8610db092610da260019551895190610faf565b90611270565b955190611270565b925b0190610d1f565b50935091600190610db2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b507f00000000000000000000000000000000000000000000000000000000000000008110610375565b807fccf7e6f70000000000000000000000000000000000000000000000000000000060049252fd5b90600b82101561078d57601f8260051c600b01921690565b6060810190811067ffffffffffffffff8211176108a857604052565b60a0810190811067ffffffffffffffff8211176108a857604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176108a857604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610dc55760010190565b908160209103126100e6575173ffffffffffffffffffffffffffffffffffffffff811681036100e65790565b3d15610f88573d9067ffffffffffffffff82116108a85760405191610f7c60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184610e95565b82523d6000602084013e565b606090565b519081600f0b82036100e657565b805182101561078d5760209160051b010190565b81810292918115918404141715610dc557565b8115610fcc570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8015611138576110c6816000908360801c8061112c575b508060401c8061111f575b508060201c80611112575b508060101c80611105575b508060081c806110f8575b508060041c806110eb575b508060021c806110de575b50600191828092811c6110d7575b1c1b61106e8185610fc2565b01811c61107b8185610fc2565b01811c6110888185610fc2565b01811c6110958185610fc2565b01811c6110a28185610fc2565b01811c6110af8185610fc2565b01811c6110bc8185610fc2565b01901c8092610fc2565b808210156110d2575090565b905090565b0181611062565b6002915091019038611054565b6004915091019038611049565b600891509101903861103e565b6010915091019038611033565b6020915091019038611028565b604091509101903861101d565b91505060809038611012565b50600090565b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8482099383808610950394808603951461120457848311156111da5782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906112119250610fc2565b90565b906020810190815161122857505050600090565b61124960408401519160208501928351916112438383610f9b565b52610f9b565b506112548151610ed6565b9052519080518211611268575b5050600190565b523880611261565b91908201809211610dc55756fea26469706673582212204b098fefe89cf9d8d130bcd1b394a619e7a09613d63db61aba5c4f062b499bff64736f6c63430008170033", - "devdoc": { - "errors": { - "MathOverflowedMulDiv()": [ - { - "details": "Muldiv operation overflow." - } - ] - }, - "kind": "dev", - "methods": {}, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 8378, - "contract": "contracts/oracles/CurveOracle.sol:CurveOracle", - "label": "registries", - "offset": 0, - "slot": "0", - "type": "t_array(t_contract(ICurveRegistry)7259)11_storage" - }, - { - "astId": 8383, - "contract": "contracts/oracles/CurveOracle.sol:CurveOracle", - "label": "registryTypes", - "offset": 0, - "slot": "11", - "type": "t_array(t_enum(CurveRegistryType)8356)11_storage" - } - ], - "types": { - "t_array(t_contract(ICurveRegistry)7259)11_storage": { - "base": "t_contract(ICurveRegistry)7259", - "encoding": "inplace", - "label": "contract ICurveRegistry[11]", - "numberOfBytes": "352" - }, - "t_array(t_enum(CurveRegistryType)8356)11_storage": { - "base": "t_enum(CurveRegistryType)8356", - "encoding": "inplace", - "label": "enum CurveOracle.CurveRegistryType[11]", - "numberOfBytes": "32" - }, - "t_contract(ICurveRegistry)7259": { - "encoding": "inplace", - "label": "contract ICurveRegistry", - "numberOfBytes": "20" - }, - "t_enum(CurveRegistryType)8356": { - "encoding": "inplace", - "label": "enum CurveOracle.CurveRegistryType", - "numberOfBytes": "1" - } - } - } + "bytecode": "0x60c060409080825234620003ac5762001af58038038091620000228285620003dc565b833981019160c082840312620003ac5781516001600160a01b03919082811690819003620003ac576020848101518386015190959194916001600160401b0391828111620003ac5781019388601f86011215620003ac57845192620000878462000416565b956200009688519788620003dc565b8487528887018960059660051b830101918c8311620003ac578a809101915b838310620003cb57505050506060830151818111620003ac578301908a601f83011215620003ac57815191620000eb8362000416565b92620000fa8a519485620003dc565b8084528a8085019160051b830101918d8311620003ac578b01905b828210620003b1575050506080840151908111620003ac5783019980601f8c011215620003ac578a51620001498162000416565b9b8a808b519e8f906200015d9082620003dc565b848152019260051b820101928311620003ac578a809101915b838310620003915750505050846200019260a08095016200042e565b1680156200037957600080546001600160a01b031980821684178355919891929088167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08a80a3875b8c5181101562000211578088620001f68f9360019462000443565b51168a52818c528a8a20805460ff19168317905501620001db565b5091888892888c958e608052805160a052855b895181101562000335576200023a818362000443565b51855163124fd3dd60e21b81526004808201929092526024908a8183818f5afa9081156200032b578a91620002ea575b50600b841015620002d85785846002019116878254161790556200028f838962000443565b5191600a831015620002c757505090600191818d1c600d0190815460f88460031b169160ff809116831b921b19161790550162000224565b634e487b7160e01b8a526021905288fd5b50634e487b7160e01b89526032825288fd5b90508a81813d831162000323575b620003048183620003dc565b810103126200031f5762000318906200042e565b8e6200026a565b8980fd5b503d620002f8565b88513d8c823e3d90fd5b845161168690816200046f82396080518181816102fa0152818161060c0152818161064b015281816110480152611179015260a051818181610518015261068f0152f35b8751631e4fbdf760e01b815260006004820152602490fd5b81906200039e846200042e565b8152019101908a9062000176565b600080fd5b8151600a811015620003ac578152908b01908b0162000115565b82518152918101918b9101620000b5565b601f909101601f19168101906001600160401b038211908210176200040057604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038111620004005760051b60200190565b51906001600160a01b0382168203620003ac57565b8051821015620004585760209160051b010190565b634e487b7160e01b600052603260045260246000fdfe608080604052600436101561001357600080fd5b60003560e01c9081633d549b321461053b5750806347400449146104e257806361436d6a146104195780636347c900146103b9578063715018a61461031d57806381358498146102c45780638da5cb5b14610272578063b72529f2146101e2578063dbac26e9146101755763f2fde38b1461008d57600080fd5b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff808216809203610170576100e66115ff565b811561013f57600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b600080fd5b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff8116809103610170576000526001602052602060ff604060002054166040519015158152f35b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057600435600b8110156101705761022860ff916111c7565b90549060031b1c16604051600a821015610243576020918152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610170576103546115ff565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057600435600b8110156101705773ffffffffffffffffffffffffffffffffffffffff6020916002015416604051908152f35b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff81168091036101705760407f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac916104956115ff565b8060005260016020527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082600020805460ff808216151692839116179055825191825215156020820152a1005b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101705760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610170576004359073ffffffffffffffffffffffffffffffffffffffff82168203610170576024359073ffffffffffffffffffffffffffffffffffffffff821682036101705760443573ffffffffffffffffffffffffffffffffffffffff81168091036101705773ffffffffffffffffffffffffffffffffffffffff0361119f57506060604080516105f7816111df565b600081526000602082015201526040519060807f000000000000000000000000000000000000000000000000000000000000000060061b8301016040526000825260006020830152606082018060408401527f0000000000000000000000000000000000000000000000000000000000000000905260006040805161067b816111df565b82815282602082015201526000916000925b7f0000000000000000000000000000000000000000000000000000000000000000841080611176575b1561108d57600091600b8510159182610aff5773ffffffffffffffffffffffffffffffffffffffff866002015416936040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8716602482015260006044820152602081606481895afa908115610af35760009161106e575b50915b73ffffffffffffffffffffffffffffffffffffffff8316151580611045575b1561102f5773ffffffffffffffffffffffffffffffffffffffff831660005260016020528460ff6040600020541661101f57506107c090611258565b9160009085610aff576000808b60405173ffffffffffffffffffffffffffffffffffffffff60208201927feb85226d000000000000000000000000000000000000000000000000000000008452818716602484015216604482015273ffffffffffffffffffffffffffffffffffffffff8c16606482015260648152610844816111fb565b51908a5afa916108526112b1565b9280611013575b15611003576108678a6111c7565b905490600a60ff838360031b1c1610156102435760031b1c60ff166002148015610fde575b8015610fb9575b15610f7e57604083805181010312610170576108bd60406108b66020860161130f565b940161130f565b81610efd576040516108ce816111df565b7f92e3cc2d0000000000000000000000000000000000000000000000000000000081527f5e0d443f0000000000000000000000000000000000000000000000000000000060208201527f556d6e9f000000000000000000000000000000000000000000000000000000006040820152925b88610aff576000807fffffffff000000000000000000000000000000000000000000000000000000008651166040516020810191825273ffffffffffffffffffffffffffffffffffffffff851660248201526024815261099e816111df565b51908d5afa926109ac6112b1565b9380610ef1575b15610e4c579089959493929160089015610cdd575b83526fffffffffffffffffffffffffffffffff91610a07610a026109ee8589168761131d565b516109fb8685168861131d565b5190611331565b61137d565b95612710610a2781610a1b8785168961131d565b5104968685169061131d565b51048515159081610cd3575b50610b2e575b50505050505050610aff57610a4d90611258565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa908115610af357600091610ac4575b50915b969096610765565b610ae6915060203d602011610aec575b610ade8183611217565b810190611285565b89610ab9565b503d610ad4565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000807fffffffff000000000000000000000000000000000000000000000000000000006020890151166040516020810191825284600f0b602482015285600f0b604482015288606482015260648152610b87816111fb565b5190865afa93610b956112b1565b9685158015610cc8575b610c55575b505050505080610c49575b610bbd575b80808080610a39565b90919250602082805181010312610170576020610bdb9201516114c0565b60405180604081011067ffffffffffffffff604083011117610c1a578692610c1192604083016040528252602082015285611596565b50898080610bb4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b50602082511015610baf565b600096975086955060407fffffffff00000000000000000000000000000000000000000000000000000000910151169281604051936020850195865216602484015216604482015285606482015260648152610cb0816111fb565b51915afa90610cbd6112b1565b918d80808080610ba4565b506020885110610b9f565b9050151538610a33565b9550610ce88d6111c7565b96905496600a60ff898360031b1c161015610243578b978f9160031b1c60ff166001148015610e20575b8015610df4575b8015610dc9575b8015610d9d575b15610d3657505060045b6109c8565b60ff919750610d44906111c7565b90549060031b1c1695600a871015610243578d60068c9814600014610d6c57505060036109c8565b60ff919750610d7a906111c7565b90549060031b1c1695600a8710156102435760038b9703610d31575060026109c8565b5060ff919750610dac906111c7565b90549060031b1c1695600a871015610243578d60098c9814610d27565b5060ff919750610dd8906111c7565b90549060031b1c1695600a871015610243578d818c9814610d20565b5060ff919750610e03906111c7565b90549060031b1c1695600a871015610243578d60078c9814610d19565b5060ff919750610e2f906111c7565b90549060031b1c1695600a871015610243578d60058c9814610d12565b5050505050509250610e5f600093611258565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa908115610af357600091610ed2575b5091610abc565b610eeb915060203d602011610aec57610ade8183611217565b89610ecb565b506040845110156109b3565b604051610f09816111df565b7f59f4f3510000000000000000000000000000000000000000000000000000000081527f07211ef70000000000000000000000000000000000000000000000000000000060208201527f85f11d1e0000000000000000000000000000000000000000000000000000000060408201529261093f565b5060608280518101031261017057610f986020830161130f565b916060610fa76040830161130f565b910151801515810361017057906108bd565b5060ff610fc58b6111c7565b90549060031b1c16600a81101561024357600614610893565b5060ff610fea8b6111c7565b90549060031b1c16600a8110156102435760031461088c565b5050509250610e5f600093611258565b50604083511015610859565b909250610aff57610e5f90611258565b945050509361103e9150611258565b929061068d565b507f00000000000000000000000000000000000000000000000000000000000000008110610784565b611087915060203d602011610aec57610ade8183611217565b89610762565b506000806020830151806040850151526000905b8082106110cf5760408484806110be575b82519182526020820152f35b90816110c991611344565b906110b2565b90916110df83604087015161131d565b519360208501948551606481029080820460641490151715611147576111086064358951611331565b1161113b579161112a6111329261112460019551895190611331565b906115f2565b9551906115f2565b925b01906110a1565b50935091600190611134565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b507f000000000000000000000000000000000000000000000000000000000000000081106106b6565b807fccf7e6f70000000000000000000000000000000000000000000000000000000060049252fd5b90600b821015610aff57601f8260051c600d01921690565b6060810190811067ffffffffffffffff821117610c1a57604052565b60a0810190811067ffffffffffffffff821117610c1a57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610c1a57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146111475760010190565b90816020910312610170575173ffffffffffffffffffffffffffffffffffffffff811681036101705790565b3d1561130a573d9067ffffffffffffffff8211610c1a57604051916112fe60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184611217565b82523d6000602084013e565b606090565b519081600f0b820361017057565b8051821015610aff5760209160051b010190565b8181029291811591840414171561114757565b811561134e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b80156114ba57611448816000908360801c806114ae575b508060401c806114a1575b508060201c80611494575b508060101c80611487575b508060081c8061147a575b508060041c8061146d575b508060021c80611460575b50600191828092811c611459575b1c1b6113f08185611344565b01811c6113fd8185611344565b01811c61140a8185611344565b01811c6114178185611344565b01811c6114248185611344565b01811c6114318185611344565b01811c61143e8185611344565b01901c8092611344565b80821015611454575090565b905090565b01816113e4565b60029150910190386113d6565b60049150910190386113cb565b60089150910190386113c0565b60109150910190386113b5565b60209150910190386113aa565b604091509101903861139f565b91505060809038611394565b50600090565b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84820993838086109503948086039514611586578483111561155c5782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906115939250611344565b90565b90602081019081516115aa57505050600090565b6115cb60408401519160208501928351916115c5838361131d565b5261131d565b506115d68151611258565b90525190805182116115ea575b5050600190565b5238806115e3565b9190820180921161114757565b73ffffffffffffffffffffffffffffffffffffffff60005416330361162057565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea26469706673582212206b228b06a4ccfb1173e0ddd7aa621ac41ab36fcba9ee33c1b4c338e361264c2264736f6c63430008170033", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c9081633d549b321461053b5750806347400449146104e257806361436d6a146104195780636347c900146103b9578063715018a61461031d57806381358498146102c45780638da5cb5b14610272578063b72529f2146101e2578063dbac26e9146101755763f2fde38b1461008d57600080fd5b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff808216809203610170576100e66115ff565b811561013f57600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b600080fd5b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff8116809103610170576000526001602052602060ff604060002054166040519015158152f35b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057600435600b8110156101705761022860ff916111c7565b90549060031b1c16604051600a821015610243576020918152f35b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610170576103546115ff565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017057600435600b8110156101705773ffffffffffffffffffffffffffffffffffffffff6020916002015416604051908152f35b346101705760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760043573ffffffffffffffffffffffffffffffffffffffff81168091036101705760407f6a12b3df6cba4203bd7fd06b816789f87de8c594299aed5717ae070fac781bac916104956115ff565b8060005260016020527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082600020805460ff808216151692839116179055825191825215156020820152a1005b346101705760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101705760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b346101705760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc360112610170576004359073ffffffffffffffffffffffffffffffffffffffff82168203610170576024359073ffffffffffffffffffffffffffffffffffffffff821682036101705760443573ffffffffffffffffffffffffffffffffffffffff81168091036101705773ffffffffffffffffffffffffffffffffffffffff0361119f57506060604080516105f7816111df565b600081526000602082015201526040519060807f000000000000000000000000000000000000000000000000000000000000000060061b8301016040526000825260006020830152606082018060408401527f0000000000000000000000000000000000000000000000000000000000000000905260006040805161067b816111df565b82815282602082015201526000916000925b7f0000000000000000000000000000000000000000000000000000000000000000841080611176575b1561108d57600091600b8510159182610aff5773ffffffffffffffffffffffffffffffffffffffff866002015416936040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8916600482015273ffffffffffffffffffffffffffffffffffffffff8716602482015260006044820152602081606481895afa908115610af35760009161106e575b50915b73ffffffffffffffffffffffffffffffffffffffff8316151580611045575b1561102f5773ffffffffffffffffffffffffffffffffffffffff831660005260016020528460ff6040600020541661101f57506107c090611258565b9160009085610aff576000808b60405173ffffffffffffffffffffffffffffffffffffffff60208201927feb85226d000000000000000000000000000000000000000000000000000000008452818716602484015216604482015273ffffffffffffffffffffffffffffffffffffffff8c16606482015260648152610844816111fb565b51908a5afa916108526112b1565b9280611013575b15611003576108678a6111c7565b905490600a60ff838360031b1c1610156102435760031b1c60ff166002148015610fde575b8015610fb9575b15610f7e57604083805181010312610170576108bd60406108b66020860161130f565b940161130f565b81610efd576040516108ce816111df565b7f92e3cc2d0000000000000000000000000000000000000000000000000000000081527f5e0d443f0000000000000000000000000000000000000000000000000000000060208201527f556d6e9f000000000000000000000000000000000000000000000000000000006040820152925b88610aff576000807fffffffff000000000000000000000000000000000000000000000000000000008651166040516020810191825273ffffffffffffffffffffffffffffffffffffffff851660248201526024815261099e816111df565b51908d5afa926109ac6112b1565b9380610ef1575b15610e4c579089959493929160089015610cdd575b83526fffffffffffffffffffffffffffffffff91610a07610a026109ee8589168761131d565b516109fb8685168861131d565b5190611331565b61137d565b95612710610a2781610a1b8785168961131d565b5104968685169061131d565b51048515159081610cd3575b50610b2e575b50505050505050610aff57610a4d90611258565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa908115610af357600091610ac4575b50915b969096610765565b610ae6915060203d602011610aec575b610ade8183611217565b810190611285565b89610ab9565b503d610ad4565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000807fffffffff000000000000000000000000000000000000000000000000000000006020890151166040516020810191825284600f0b602482015285600f0b604482015288606482015260648152610b87816111fb565b5190865afa93610b956112b1565b9685158015610cc8575b610c55575b505050505080610c49575b610bbd575b80808080610a39565b90919250602082805181010312610170576020610bdb9201516114c0565b60405180604081011067ffffffffffffffff604083011117610c1a578692610c1192604083016040528252602082015285611596565b50898080610bb4565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b50602082511015610baf565b600096975086955060407fffffffff00000000000000000000000000000000000000000000000000000000910151169281604051936020850195865216602484015216604482015285606482015260648152610cb0816111fb565b51915afa90610cbd6112b1565b918d80808080610ba4565b506020885110610b9f565b9050151538610a33565b9550610ce88d6111c7565b96905496600a60ff898360031b1c161015610243578b978f9160031b1c60ff166001148015610e20575b8015610df4575b8015610dc9575b8015610d9d575b15610d3657505060045b6109c8565b60ff919750610d44906111c7565b90549060031b1c1695600a871015610243578d60068c9814600014610d6c57505060036109c8565b60ff919750610d7a906111c7565b90549060031b1c1695600a8710156102435760038b9703610d31575060026109c8565b5060ff919750610dac906111c7565b90549060031b1c1695600a871015610243578d60098c9814610d27565b5060ff919750610dd8906111c7565b90549060031b1c1695600a871015610243578d818c9814610d20565b5060ff919750610e03906111c7565b90549060031b1c1695600a871015610243578d60078c9814610d19565b5060ff919750610e2f906111c7565b90549060031b1c1695600a871015610243578d60058c9814610d12565b5050505050509250610e5f600093611258565b6040517f6982eb0b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811660048301528716602482015260448101829052909690602081606481895afa908115610af357600091610ed2575b5091610abc565b610eeb915060203d602011610aec57610ade8183611217565b89610ecb565b506040845110156109b3565b604051610f09816111df565b7f59f4f3510000000000000000000000000000000000000000000000000000000081527f07211ef70000000000000000000000000000000000000000000000000000000060208201527f85f11d1e0000000000000000000000000000000000000000000000000000000060408201529261093f565b5060608280518101031261017057610f986020830161130f565b916060610fa76040830161130f565b910151801515810361017057906108bd565b5060ff610fc58b6111c7565b90549060031b1c16600a81101561024357600614610893565b5060ff610fea8b6111c7565b90549060031b1c16600a8110156102435760031461088c565b5050509250610e5f600093611258565b50604083511015610859565b909250610aff57610e5f90611258565b945050509361103e9150611258565b929061068d565b507f00000000000000000000000000000000000000000000000000000000000000008110610784565b611087915060203d602011610aec57610ade8183611217565b89610762565b506000806020830151806040850151526000905b8082106110cf5760408484806110be575b82519182526020820152f35b90816110c991611344565b906110b2565b90916110df83604087015161131d565b519360208501948551606481029080820460641490151715611147576111086064358951611331565b1161113b579161112a6111329261112460019551895190611331565b906115f2565b9551906115f2565b925b01906110a1565b50935091600190611134565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b507f000000000000000000000000000000000000000000000000000000000000000081106106b6565b807fccf7e6f70000000000000000000000000000000000000000000000000000000060049252fd5b90600b821015610aff57601f8260051c600d01921690565b6060810190811067ffffffffffffffff821117610c1a57604052565b60a0810190811067ffffffffffffffff821117610c1a57604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610c1a57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146111475760010190565b90816020910312610170575173ffffffffffffffffffffffffffffffffffffffff811681036101705790565b3d1561130a573d9067ffffffffffffffff8211610c1a57604051916112fe60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160184611217565b82523d6000602084013e565b606090565b519081600f0b820361017057565b8051821015610aff5760209160051b010190565b8181029291811591840414171561114757565b811561134e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b80156114ba57611448816000908360801c806114ae575b508060401c806114a1575b508060201c80611494575b508060101c80611487575b508060081c8061147a575b508060041c8061146d575b508060021c80611460575b50600191828092811c611459575b1c1b6113f08185611344565b01811c6113fd8185611344565b01811c61140a8185611344565b01811c6114178185611344565b01811c6114248185611344565b01811c6114318185611344565b01811c61143e8185611344565b01901c8092611344565b80821015611454575090565b905090565b01816113e4565b60029150910190386113d6565b60049150910190386113cb565b60089150910190386113c0565b60109150910190386113b5565b60209150910190386113aa565b604091509101903861139f565b91505060809038611394565b50600090565b670de0b6b3a764000091828202917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff84820993838086109503948086039514611586578483111561155c5782910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b60046040517f227bc153000000000000000000000000000000000000000000000000000000008152fd5b5050906115939250611344565b90565b90602081019081516115aa57505050600090565b6115cb60408401519160208501928351916115c5838361131d565b5261131d565b506115d68151611258565b90525190805182116115ea575b5050600190565b5238806115e3565b9190820180921161114757565b73ffffffffffffffffffffffffffffffffffffffff60005416330361162057565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fdfea26469706673582212206b228b06a4ccfb1173e0ddd7aa621ac41ab36fcba9ee33c1b4c338e361264c2264736f6c63430008170033" } \ No newline at end of file