From c08873d4145ea23cca36fc7f18b2aac586e6a486 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 18:35:20 +0000 Subject: [PATCH 1/7] Update solidity-utils for support linea network --- package.json | 4 ++-- yarn.lock | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index a18ddf0..1eb4c92 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "@openzeppelin/contracts": "5.1.0" }, "devDependencies": { - "@1inch/solidity-utils": "6.0.0", + "@1inch/solidity-utils": "6.2.0", "@matterlabs/hardhat-zksync-deploy": "1.6.0", "@matterlabs/hardhat-zksync-solc": "1.2.5", "@matterlabs/hardhat-zksync-verify": "1.7.0", @@ -29,7 +29,7 @@ "eslint-plugin-n": "17.13.0", "eslint-plugin-promise": "7.1.0", "ethers": "6.13.4", - "hardhat": "2.22.16", + "hardhat": "2.22.17", "hardhat-dependency-compiler": "1.2.1", "hardhat-deploy": "0.12.4", "hardhat-gas-reporter": "1.0.10", diff --git a/yarn.lock b/yarn.lock index 2f5d682..39a8e99 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -"@1inch/solidity-utils@6.0.0": - version "6.0.0" - resolved "https://registry.yarnpkg.com/@1inch/solidity-utils/-/solidity-utils-6.0.0.tgz#a04cba02078ce83239cc4f6e4f3824bf7fc32a46" - integrity sha512-MvpFE8G0uts8PQI+p2Zdts+md53ycYV968mPtoGC3fMCZ+c2T+sSxwI24RLtIKn3wN/Y4ywzXKTvJZwYZbzJPA== +"@1inch/solidity-utils@6.2.0": + version "6.2.0" + resolved "https://registry.yarnpkg.com/@1inch/solidity-utils/-/solidity-utils-6.2.0.tgz#ac73560516662a671917eec9356dbcd15956d2af" + integrity sha512-5EhIRHmbcw5v5FKWOnxlj4EUeP5W4c+Fu5qr8zfi/0LMYXfoEqT1k65RWTME8xdZlkNMVpcKXhP7ayqVv3pO1A== dependencies: "@metamask/eth-sig-util" "8.0.0" "@nomicfoundation/hardhat-ethers" "3.0.8" @@ -1053,7 +1053,7 @@ resolved "https://registry.yarnpkg.com/@nomicfoundation/edr-win32-x64-msvc/-/edr-win32-x64-msvc-0.6.5.tgz#90d3ac2a6a8a687522bda5ff2e92dd97e68126ea" integrity sha512-B9QD/4DSSCFtWicO8A3BrsnitO1FPv7axB62wq5Q+qeJ50yJlTmyeGY3cw62gWItdvy2mh3fRM6L1LpnHiB77A== -"@nomicfoundation/edr@^0.6.4": +"@nomicfoundation/edr@^0.6.4", "@nomicfoundation/edr@^0.6.5": version "0.6.5" resolved "https://registry.yarnpkg.com/@nomicfoundation/edr/-/edr-0.6.5.tgz#b3b1ebcdd0148cfe67cca128e7ebe8092e200359" integrity sha512-tAqMslLP+/2b2sZP4qe9AuGxG3OkQ5gGgHE4isUuq6dUVjwCRPFhAOhpdFl+OjY5P3yEv3hmq9HjUGRa2VNjng== @@ -3951,14 +3951,14 @@ hardhat@2.22.15: uuid "^8.3.2" ws "^7.4.6" -hardhat@2.22.16: - version "2.22.16" - resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.16.tgz#6cf3413f63b14770f863f35452da891ac2bd50cb" - integrity sha512-d52yQZ09u0roL6GlgJSvtknsBtIuj9JrJ/U8VMzr/wue+gO5v2tQayvOX6llerlR57Zw2EOTQjLAt6RpHvjwHA== +hardhat@2.22.17: + version "2.22.17" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.22.17.tgz#96036bbe6bad8eb6a6b65c54dc5fbc1324541612" + integrity sha512-tDlI475ccz4d/dajnADUTRc1OJ3H8fpP9sWhXhBPpYsQOg8JHq5xrDimo53UhWPl7KJmAeDCm1bFG74xvpGRpg== dependencies: "@ethersproject/abi" "^5.1.2" "@metamask/eth-sig-util" "^4.0.0" - "@nomicfoundation/edr" "^0.6.4" + "@nomicfoundation/edr" "^0.6.5" "@nomicfoundation/ethereumjs-common" "4.0.4" "@nomicfoundation/ethereumjs-tx" "5.0.4" "@nomicfoundation/ethereumjs-util" "9.0.4" From 655432d40e1b7114c9dcc9981b645e9dafb45b7a Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 18:41:57 +0000 Subject: [PATCH 2/7] Deploy DodoV2Oracle on linea --- README.md | 29 ++++++++ deployments/linea/.chainId | 1 + deployments/linea/DodoV2Oracle.json | 104 ++++++++++++++++++++++++++++ 3 files changed, 134 insertions(+) create mode 100644 deployments/linea/.chainId create mode 100644 deployments/linea/DodoV2Oracle.json diff --git a/README.md b/README.md index 4ec1d3a..6ab1412 100644 --- a/README.md +++ b/README.md @@ -664,6 +664,35 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator +### Linea + +#### Oracle [STILL_NOT_DEPLOYED](https://lineascan.build/address/STILL_NOT_DEPLOYED) + +
Supported DEXes + + * DodoV2 - [0x03aA019F3B78110e030c34e9fA98047A1f62859A](https://lineascan.build/address/0x03aA019F3B78110e030c34e9fA98047A1f62859A) + +
+ +
Supported wrappers + + * WETH - [...](...) + +
+ +
Supported connectors + + * NONE - [0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF](https://lineascan.build/address/0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF) + * WETH - [0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f](https://lineascan.build/address/0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f) + +
+ +
Prev oracle versions (legacy) + + * ... + +
+ ## Examples * [Single token-to-ETH price usage](https://github.com/1inch-exchange/offchain-oracle/blob/master/examples/single-price.js) diff --git a/deployments/linea/.chainId b/deployments/linea/.chainId new file mode 100644 index 0000000..c9e6af4 --- /dev/null +++ b/deployments/linea/.chainId @@ -0,0 +1 @@ +59144 \ No newline at end of file diff --git a/deployments/linea/DodoV2Oracle.json b/deployments/linea/DodoV2Oracle.json new file mode 100644 index 0000000..a32fc05 --- /dev/null +++ b/deployments/linea/DodoV2Oracle.json @@ -0,0 +1,104 @@ +{ + "address": "0x03aA019F3B78110e030c34e9fA98047A1f62859A", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IDVMFactory", + "name": "_DVMFactory", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ConnectorShouldBeNone", + "type": "error" + }, + { + "inputs": [], + "name": "PoolNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "PoolWithConnectorNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "FACTORY", + "outputs": [ + { + "internalType": "contract IDVMFactory", + "name": "", + "type": "address" + } + ], + "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" + } + ], + "transactionHash": "0x26f556bff889122a204c1c795c9b37d63faf5d47e847c7122dc3678e11fdad0f", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 4, + "gasUsed": "795004", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x17e6e3b2d9c50d48ebd7576992d1d38fa90760c2487288e48e9b6f687ee025d6", + "transactionHash": "0x26f556bff889122a204c1c795c9b37d63faf5d47e847c7122dc3678e11fdad0f", + "logs": [], + "blockNumber": 13062982, + "cumulativeGasUsed": "1097665", + "status": 1 + }, + "args": [ + "0xc0F9553Df63De5a97Fe64422c8578D0657C360f7" + ], + "numDeployments": 1, + "bytecode": "0x60a03461007157601f610d2438819003918201601f19168301916001600160401b038311848410176100765780849260209460405283398101031261007157516001600160a01b038116810361007157608052604051610c97908161008d82396080518181816103df015261063d0152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608060409080825260048036101561001657600080fd5b600091823560e01c9081632dd31000146103955750633d549b321461003a57600080fd5b3461038d5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038d5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610391576024936024359282841680940361038d576044359383851680950361038957606491606435956100b961048f565b508086036102395750906100cc916105e4565b9490926100d98451610766565b96815b8a865182101561013757906101306101126001936101176101098d8d610102888f610503565b51166107de565b909491946104c1565b610a06565b90519161012383610403565b825260208201528b610be3565b50016100dc565b5097989397509095509093509091505b839584956020916020810151948a8201978689515280985b878a1061018c578c8c8c8061017b575b82519182526020820152f35b908161018691610798565b9061016f565b909192939495969798996101a18b8351610503565b519b878d019c8d51888102908082048a149015171561020e576101c58d89516104c1565b1161020257916101e96101f1928f6101e390600196519051906104c1565b906107d1565b9d51906107d1565b9a5b0198979695949392919061015f565b509b50996001906101f3565b868660118d7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b969895929397949061024e88610256926105e4565b9390986105e4565b9261026c6102678a518451906104c1565b610766565b968a5b8a518c10156103745761028783866101028f8f610503565b9c919990988915801561036c575b61035757835b875181101561033457808f8f8f8f8f8f8f908f9161010260019a6102be94610503565b8093919315801561032c575b61031f576102eb6102ff946102e56103179a6102f9956104c1565b926104c1565b908180821091180218610a06565b92610b3d565b92519261030b84610403565b83526020830152610be3565b505b0161029b565b5050505050505050610319565b5083156102ca565b50949e939d91969c5094985060019197505b019a909b919599939996929661026f565b949e939d91969c509498506001919750610346565b508d15610295565b989b979a509598509395935061014792505050565b8280fd5b5080fd5b8380fd5b83903461038d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038d5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6040810190811067ffffffffffffffff82111761041f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761041f57604052565b604051906060820182811067ffffffffffffffff82111761041f57604052606060408360008152600060208201520152565b818102929181159184041417156104d457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518210156105175760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060209081838203126105df57825167ffffffffffffffff938482116105df570181601f820112156105df57805193841161041f578360051b90604051946105908584018761044e565b855283808601928201019283116105df578301905b8282106105b3575050505090565b815173ffffffffffffffffffffffffffffffffffffffff811681036105df5781529083019083016105a5565b600080fd5b6040517f57a281dc0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff8381166004840152848116602484015291949093909260009290917f0000000000000000000000000000000000000000000000000000000000000000909116908387604481855afa96871561075b57849761073f575b50865115958615966106bb575b505050505082511561069157565b60046040517f76ecffc0000000000000000000000000000000000000000000000000000000008152fd5b60405190815273ffffffffffffffffffffffffffffffffffffffff91821660048201529216602483015292945090918290829060449082905afa918215610733578092610710575b5050913880808080610683565b61072c92503d8091833e610724818361044e565b810190610546565b3880610703565b604051903d90823e3d90fd5b6107549197503d8086833e610724818361044e565b9538610676565b6040513d86823e3d90fd5b9061076f61048f565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b81156107a2570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b919082018092116104d457565b6000926000809373ffffffffffffffffffffffffffffffffffffffff829416906040908151917f7d72150400000000000000000000000000000000000000000000000000000000835260208084600481885afa9384156109fc5786946109cd575b508151947fbbf5ce780000000000000000000000000000000000000000000000000000000086528186600481845afa9586156109c3578796610990575b5084151580610987575b610894575b50505050505050565b909295995060049396985081839295985051938480927fee27c6890000000000000000000000000000000000000000000000000000000082525afa92831561097e5750879261094c575b50508115610903575b9450156108fe57905b90913880808080808061088b565b6108f0565b801561091f576ec097ce7bc90715b34b9f1000000000046108e7565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526012600452fd5b90809250813d8311610977575b610963818361044e565b81010312610973575138806108de565b8580fd5b503d610959565b513d89823e3d90fd5b50851515610886565b9095508181813d83116109bc575b6109a8818361044e565b810103126109b85751943861087c565b8680fd5b503d61099e565b83513d89823e3d90fd5b9080945081813d83116109f5575b6109e5818361044e565b810103126109735751923861083f565b503d6109db565b82513d88823e3d90fd5b600180821115610b3957610ad5908083700100000000000000000000000000000000811015610b22575b80680100000000000000006004921015610b15575b640100000000811015610b08575b62010000811015610afb575b610100811015610aef575b6010811015610ae3575b1015610adc575b600302811c610a8a8185610798565b01811c610a978185610798565b01811c610aa48185610798565b01811c610ab18185610798565b01811c610abe8185610798565b01811c610acb8185610798565b01901c8092610798565b8111900390565b811b610a7b565b811c9160021b91610a74565b60081c91811b91610a6a565b60101c9160081b91610a5f565b60201c9160101b91610a53565b60401c9160201b91610a45565b50680100000000000000009050608084901c610a30565b5090565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610bd257670de0b6b3a76400009082821115610bbf577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b9060208101908151610bf757505050600090565b610c186040840151916020850192835191610c128383610503565b52610503565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104d4576001019052519080518211610c59575b5050600190565b523880610c5256fea2646970667358221220dbca871bfdf17e9f9561d7e4b1750b15aa9735592866a6c133edc8183024dc3b64736f6c63430008170033", + "deployedBytecode": "0x608060409080825260048036101561001657600080fd5b600091823560e01c9081632dd31000146103955750633d549b321461003a57600080fd5b3461038d5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038d5760043573ffffffffffffffffffffffffffffffffffffffff808216809203610391576024936024359282841680940361038d576044359383851680950361038957606491606435956100b961048f565b508086036102395750906100cc916105e4565b9490926100d98451610766565b96815b8a865182101561013757906101306101126001936101176101098d8d610102888f610503565b51166107de565b909491946104c1565b610a06565b90519161012383610403565b825260208201528b610be3565b50016100dc565b5097989397509095509093509091505b839584956020916020810151948a8201978689515280985b878a1061018c578c8c8c8061017b575b82519182526020820152f35b908161018691610798565b9061016f565b909192939495969798996101a18b8351610503565b519b878d019c8d51888102908082048a149015171561020e576101c58d89516104c1565b1161020257916101e96101f1928f6101e390600196519051906104c1565b906107d1565b9d51906107d1565b9a5b0198979695949392919061015f565b509b50996001906101f3565b868660118d7f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b969895929397949061024e88610256926105e4565b9390986105e4565b9261026c6102678a518451906104c1565b610766565b968a5b8a518c10156103745761028783866101028f8f610503565b9c919990988915801561036c575b61035757835b875181101561033457808f8f8f8f8f8f8f908f9161010260019a6102be94610503565b8093919315801561032c575b61031f576102eb6102ff946102e56103179a6102f9956104c1565b926104c1565b908180821091180218610a06565b92610b3d565b92519261030b84610403565b83526020830152610be3565b505b0161029b565b5050505050505050610319565b5083156102ca565b50949e939d91969c5094985060019197505b019a909b919599939996929661026f565b949e939d91969c509498506001919750610346565b508d15610295565b989b979a509598509395935061014792505050565b8280fd5b5080fd5b8380fd5b83903461038d57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038d5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b6040810190811067ffffffffffffffff82111761041f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761041f57604052565b604051906060820182811067ffffffffffffffff82111761041f57604052606060408360008152600060208201520152565b818102929181159184041417156104d457565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b80518210156105175760209160051b010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060209081838203126105df57825167ffffffffffffffff938482116105df570181601f820112156105df57805193841161041f578360051b90604051946105908584018761044e565b855283808601928201019283116105df578301905b8282106105b3575050505090565b815173ffffffffffffffffffffffffffffffffffffffff811681036105df5781529083019083016105a5565b600080fd5b6040517f57a281dc0000000000000000000000000000000000000000000000000000000080825273ffffffffffffffffffffffffffffffffffffffff8381166004840152848116602484015291949093909260009290917f0000000000000000000000000000000000000000000000000000000000000000909116908387604481855afa96871561075b57849761073f575b50865115958615966106bb575b505050505082511561069157565b60046040517f76ecffc0000000000000000000000000000000000000000000000000000000008152fd5b60405190815273ffffffffffffffffffffffffffffffffffffffff91821660048201529216602483015292945090918290829060449082905afa918215610733578092610710575b5050913880808080610683565b61072c92503d8091833e610724818361044e565b810190610546565b3880610703565b604051903d90823e3d90fd5b6107549197503d8086833e610724818361044e565b9538610676565b6040513d86823e3d90fd5b9061076f61048f565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b81156107a2570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b919082018092116104d457565b6000926000809373ffffffffffffffffffffffffffffffffffffffff829416906040908151917f7d72150400000000000000000000000000000000000000000000000000000000835260208084600481885afa9384156109fc5786946109cd575b508151947fbbf5ce780000000000000000000000000000000000000000000000000000000086528186600481845afa9586156109c3578796610990575b5084151580610987575b610894575b50505050505050565b909295995060049396985081839295985051938480927fee27c6890000000000000000000000000000000000000000000000000000000082525afa92831561097e5750879261094c575b50508115610903575b9450156108fe57905b90913880808080808061088b565b6108f0565b801561091f576ec097ce7bc90715b34b9f1000000000046108e7565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526012600452fd5b90809250813d8311610977575b610963818361044e565b81010312610973575138806108de565b8580fd5b503d610959565b513d89823e3d90fd5b50851515610886565b9095508181813d83116109bc575b6109a8818361044e565b810103126109b85751943861087c565b8680fd5b503d61099e565b83513d89823e3d90fd5b9080945081813d83116109f5575b6109e5818361044e565b810103126109735751923861083f565b503d6109db565b82513d88823e3d90fd5b600180821115610b3957610ad5908083700100000000000000000000000000000000811015610b22575b80680100000000000000006004921015610b15575b640100000000811015610b08575b62010000811015610afb575b610100811015610aef575b6010811015610ae3575b1015610adc575b600302811c610a8a8185610798565b01811c610a978185610798565b01811c610aa48185610798565b01811c610ab18185610798565b01811c610abe8185610798565b01811c610acb8185610798565b01901c8092610798565b8111900390565b811b610a7b565b811c9160021b91610a74565b60081c91811b91610a6a565b60101c9160081b91610a5f565b60201c9160101b91610a53565b60401c9160201b91610a45565b50680100000000000000009050608084901c610a30565b5090565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610bd257670de0b6b3a76400009082821115610bbf577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b9060208101908151610bf757505050600090565b610c186040840151916020850192835191610c128383610503565b52610503565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146104d4576001019052519080518211610c59575b5050600190565b523880610c5256fea2646970667358221220dbca871bfdf17e9f9561d7e4b1750b15aa9735592866a6c133edc8183024dc3b64736f6c63430008170033" +} \ No newline at end of file From 89b77c962bc40e6dacac60df2b6bd97736bfd98f Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 19:13:06 +0000 Subject: [PATCH 3/7] Deploy PancakeV3 on linea --- README.md | 1 + .../linea/UniswapV3LikeOracle_Pancake.json | 166 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 deployments/linea/UniswapV3LikeOracle_Pancake.json diff --git a/README.md b/README.md index 6ab1412..89da9e9 100644 --- a/README.md +++ b/README.md @@ -671,6 +671,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
Supported DEXes * DodoV2 - [0x03aA019F3B78110e030c34e9fA98047A1f62859A](https://lineascan.build/address/0x03aA019F3B78110e030c34e9fA98047A1f62859A) + * PancakeV3 - [0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61](https://lineascan.build/address/0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61)
diff --git a/deployments/linea/UniswapV3LikeOracle_Pancake.json b/deployments/linea/UniswapV3LikeOracle_Pancake.json new file mode 100644 index 0000000..dcf15b3 --- /dev/null +++ b/deployments/linea/UniswapV3LikeOracle_Pancake.json @@ -0,0 +1,166 @@ +{ + "address": "0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_initcodeHash", + "type": "bytes32" + }, + { + "internalType": "uint24[]", + "name": "_fees", + "type": "uint24[]" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ConnectorShouldBeNone", + "type": "error" + }, + { + "inputs": [], + "name": "PoolNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "PoolWithConnectorNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "FACTORY", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "INITCODE_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SUPPORTED_FEES_COUNT", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "fees", + "outputs": [ + { + "internalType": "uint24", + "name": "", + "type": "uint24" + } + ], + "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" + } + ], + "transactionHash": "0xcc2010d7f2a6f4e640868038824064df64fc936eecea8727e2b592b03220ddfb", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 46, + "gasUsed": "897109", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0xe305e190dcbe7c5d6dc83242f509e368561b74a687063db2b8f42646d81dea80", + "transactionHash": "0xcc2010d7f2a6f4e640868038824064df64fc936eecea8727e2b592b03220ddfb", + "logs": [], + "blockNumber": 13063919, + "cumulativeGasUsed": "1938938", + "status": 1 + }, + "args": [ + "0x41ff9AA7e16B8B1a8a8dc4f0eFacd93D02d071c9", + "0x6ce8eb472fa82df5469c6ab6d485f17c3ad13c8cd7af59b3d4a8026c5ce0f7e2", + [ + 100, + 500, + 2500, + 10000 + ] + ], + "numDeployments": 1, + "bytecode": "0x60e0604052346200019a5762000fc9803803806200001d81620001b5565b9283398101906060818303126200019a578051916001600160a01b03831683036200019a576020928383015190604084015160018060401b03948582116200019a57019280601f850112156200019a5783519485116200019f576005938560051b9087806200008e818501620001b5565b8099815201928201019283116200019a578701905b8282106200017d5750505060a05260c05281519260809360805260005b845181101562000129578351811015620001135762ffffff90818382861b870101511691600a9283831015620001135783600194840492600380855493870602901b92831b921b191617905501620000c0565b634e487b7160e01b600052603260045260246000fd5b604051610ded9081620001dc823960805181818161018d015281816103030152818161032e0152818161038e01526104ef015260a05181818161049701526107da015260c051818181608c01526108090152f35b815162ffffff811681036200019a578152908701908701620000a3565b600080fd5b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b038111838210176200019f5760405256fe608080604052600436101561001357600080fd5b60003560e01c908163152b8c69146104bb575080632dd310001461044c5780633d549b321461010e5780634acc79ed146100b45763f84618841461005657600080fd5b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b600080fd5b346100af5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af57600435600a8110156100af5762ffffff6100fe602092610512565b9190546040519260031b1c168152f35b346100af5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af5773ffffffffffffffffffffffffffffffffffffffff8060043516600435036100af576024908060243516602435036100af57806044351680604435036100af57610185610600565b50036102fc577f0000000000000000000000000000000000000000000000000000000000000000906101b682610632565b9160005b8181106102b25750505b60208281015160408401805182905260009384938493925b83851061020a5760408787806101f9575b82519182526020820152f35b9081610204916106b6565b906101ed565b909192939461021a868351610d18565b5196838801978851606481029080820460641490151715610284576102426064358c516106ef565b11610278579161026461026c9261025e600195518c51906106ef565b90610daa565b985190610daa565b955b01939291906101dc565b5096509460019061026e565b867f4e487b710000000000000000000000000000000000000000000000000000000060005260116004526000fd5b806102f56102db62ffffff6102c8600195610512565b90549060031b1c16602435600435610731565b604051916102e883610558565b8252602082015286610d2c565b50016101ba565b61032860027f00000000000000000000000000000000000000000000000000000000000000000a610632565b9060005b7f0000000000000000000000000000000000000000000000000000000000000000811061035957506101c4565b61037c62ffffff61036983610512565b90549060031b1c16604435600435610731565b81158015610444575b61043a5760005b7f000000000000000000000000000000000000000000000000000000000000000081106103c0575050506001905b0161032c565b806103e662ffffff6103d3600194610512565b90549060031b1c16602435604435610731565b81158015610432575b61042b576104006104239287610c72565b906040519161040e83610558565b82528086108187180218602082015288610d2c565b505b0161038c565b5050610425565b5080156103ef565b50506001906103ba565b508015610385565b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b90600a821015610529576003600a80840493060290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040810190811067ffffffffffffffff82111761057457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff82111761057457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761057457604052565b604051906060820182811067ffffffffffffffff82111761057457604052606060408360008152600060208201520152565b9061063b610600565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b51906fffffffffffffffffffffffffffffffff821682036100af57565b51908160020b82036100af57565b91908260409103126100af5760206106a683610664565b92015180600f0b81036100af5790565b81156106c0570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8181029291811591840414171561070257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b919073ffffffffffffffffffffffffffffffffffffffff918282168084861610600014610c6757508284925b60405162ffffff602094848684019481891686521660408401521660608201526060815261078a816105a3565b519020604051838101917fff0000000000000000000000000000000000000000000000000000000000000083527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b16602183015260358201527f000000000000000000000000000000000000000000000000000000000000000060558201526055815261083a816105a3565b51902016803b15610c5a576040517f1a6865020000000000000000000000000000000000000000000000000000000081528281600481855afa8015610abc57600090610c16575b6fffffffffffffffffffffffffffffffff915016918215610c0857604051947f3850c7bd000000000000000000000000000000000000000000000000000000008652604086600481865afa8015610abc576000968791610bb8575b506040517fd0c93a7c0000000000000000000000000000000000000000000000000000000081528381600481885afa938415610abc57600094610b80575b505060020b8260020b9081156106c0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82147fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000008214166107025781900560020b0290818060020b0361070257938096819560005b8997600282810b13610afd576040517ff30dba9300000000000000000000000000000000000000000000000000000000815287830260020b8760020b0160020b60048201526040816024818c5afa908115610abc57600091610adc575b50600f0b0193848082109118028418998415610ac8576040517ff30dba9300000000000000000000000000000000000000000000000000000000815287830260020b8760020b0360020b60048201526040816024818c5afa908115610abc57600091610a8b575b50600f0b8091039a8b8082109118028b189814610a785760010160020b96929661098f565b5050505050505050505050600090600090565b610aad915060403d604011610ab5575b610aa581836105bf565b81019061068f565b905038610a53565b503d610a9b565b6040513d6000823e3d90fd5b505050505050505050505050600090600090565b610af5915060403d604011610ab557610aa581836105bf565b9050386109ec565b5050969250965096935084925082915016911614600014610b4657670de0b6b3a76400009080831682029182048184160361070257610b4092169060601c6106ef565b60601c91565b90818116156106c057610b7d91167f0de0b6b3a76400000000000000000000000000000000000000000000000000008190046106b6565b91565b9080929450813d8311610bb1575b610b9881836105bf565b810103126100af57610ba990610681565b91388061091a565b503d610b8e565b90506040813d604011610c00575b81610bd3604093836105bf565b81010312610bfc578051968288168803610bf9575082610bf39101610681565b386108dc565b80fd5b8680fd5b3d9150610bc6565b505050505050600090600090565b508281813d8311610c53575b610c2c81836105bf565b810103126100af57610c4e6fffffffffffffffffffffffffffffffff91610664565b610881565b503d610c22565b5050505050600090600090565b91508284811661075d565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610d0757670de0b6b3a76400009082821115610cf4577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b80518210156105295760209160051b010190565b9060208101908151610d4057505050600090565b610d616040840151916020850192835191610d5b8383610d18565b52610d18565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610702576001019052519080518211610da2575b5050600190565b523880610d9b565b919082018092116107025756fea26469706673582212204beae144ba78c3bffa398710e551bebaeb84d5a0ad6f83613b682c6b39d52b8164736f6c63430008170033", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b60003560e01c908163152b8c69146104bb575080632dd310001461044c5780633d549b321461010e5780634acc79ed146100b45763f84618841461005657600080fd5b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b600080fd5b346100af5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af57600435600a8110156100af5762ffffff6100fe602092610512565b9190546040519260031b1c168152f35b346100af5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af5773ffffffffffffffffffffffffffffffffffffffff8060043516600435036100af576024908060243516602435036100af57806044351680604435036100af57610185610600565b50036102fc577f0000000000000000000000000000000000000000000000000000000000000000906101b682610632565b9160005b8181106102b25750505b60208281015160408401805182905260009384938493925b83851061020a5760408787806101f9575b82519182526020820152f35b9081610204916106b6565b906101ed565b909192939461021a868351610d18565b5196838801978851606481029080820460641490151715610284576102426064358c516106ef565b11610278579161026461026c9261025e600195518c51906106ef565b90610daa565b985190610daa565b955b01939291906101dc565b5096509460019061026e565b867f4e487b710000000000000000000000000000000000000000000000000000000060005260116004526000fd5b806102f56102db62ffffff6102c8600195610512565b90549060031b1c16602435600435610731565b604051916102e883610558565b8252602082015286610d2c565b50016101ba565b61032860027f00000000000000000000000000000000000000000000000000000000000000000a610632565b9060005b7f0000000000000000000000000000000000000000000000000000000000000000811061035957506101c4565b61037c62ffffff61036983610512565b90549060031b1c16604435600435610731565b81158015610444575b61043a5760005b7f000000000000000000000000000000000000000000000000000000000000000081106103c0575050506001905b0161032c565b806103e662ffffff6103d3600194610512565b90549060031b1c16602435604435610731565b81158015610432575b61042b576104006104239287610c72565b906040519161040e83610558565b82528086108187180218602082015288610d2c565b505b0161038c565b5050610425565b5080156103ef565b50506001906103ba565b508015610385565b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b346100af5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100af576020907f00000000000000000000000000000000000000000000000000000000000000008152f35b90600a821015610529576003600a80840493060290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6040810190811067ffffffffffffffff82111761057457604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6080810190811067ffffffffffffffff82111761057457604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761057457604052565b604051906060820182811067ffffffffffffffff82111761057457604052606060408360008152600060208201520152565b9061063b610600565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b51906fffffffffffffffffffffffffffffffff821682036100af57565b51908160020b82036100af57565b91908260409103126100af5760206106a683610664565b92015180600f0b81036100af5790565b81156106c0570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b8181029291811591840414171561070257565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b919073ffffffffffffffffffffffffffffffffffffffff918282168084861610600014610c6757508284925b60405162ffffff602094848684019481891686521660408401521660608201526060815261078a816105a3565b519020604051838101917fff0000000000000000000000000000000000000000000000000000000000000083527fffffffffffffffffffffffffffffffffffffffff0000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000060601b16602183015260358201527f000000000000000000000000000000000000000000000000000000000000000060558201526055815261083a816105a3565b51902016803b15610c5a576040517f1a6865020000000000000000000000000000000000000000000000000000000081528281600481855afa8015610abc57600090610c16575b6fffffffffffffffffffffffffffffffff915016918215610c0857604051947f3850c7bd000000000000000000000000000000000000000000000000000000008652604086600481865afa8015610abc576000968791610bb8575b506040517fd0c93a7c0000000000000000000000000000000000000000000000000000000081528381600481885afa938415610abc57600094610b80575b505060020b8260020b9081156106c0577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82147fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8000008214166107025781900560020b0290818060020b0361070257938096819560005b8997600282810b13610afd576040517ff30dba9300000000000000000000000000000000000000000000000000000000815287830260020b8760020b0160020b60048201526040816024818c5afa908115610abc57600091610adc575b50600f0b0193848082109118028418998415610ac8576040517ff30dba9300000000000000000000000000000000000000000000000000000000815287830260020b8760020b0360020b60048201526040816024818c5afa908115610abc57600091610a8b575b50600f0b8091039a8b8082109118028b189814610a785760010160020b96929661098f565b5050505050505050505050600090600090565b610aad915060403d604011610ab5575b610aa581836105bf565b81019061068f565b905038610a53565b503d610a9b565b6040513d6000823e3d90fd5b505050505050505050505050600090600090565b610af5915060403d604011610ab557610aa581836105bf565b9050386109ec565b5050969250965096935084925082915016911614600014610b4657670de0b6b3a76400009080831682029182048184160361070257610b4092169060601c6106ef565b60601c91565b90818116156106c057610b7d91167f0de0b6b3a76400000000000000000000000000000000000000000000000000008190046106b6565b91565b9080929450813d8311610bb1575b610b9881836105bf565b810103126100af57610ba990610681565b91388061091a565b503d610b8e565b90506040813d604011610c00575b81610bd3604093836105bf565b81010312610bfc578051968288168803610bf9575082610bf39101610681565b386108dc565b80fd5b8680fd5b3d9150610bc6565b505050505050600090600090565b508281813d8311610c53575b610c2c81836105bf565b810103126100af57610c4e6fffffffffffffffffffffffffffffffff91610664565b610881565b503d610c22565b5050505050600090600090565b91508284811661075d565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610d0757670de0b6b3a76400009082821115610cf4577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b80518210156105295760209160051b010190565b9060208101908151610d4057505050600090565b610d616040840151916020850192835191610d5b8383610d18565b52610d18565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114610702576001019052519080518211610da2575b5050600190565b523880610d9b565b919082018092116107025756fea26469706673582212204beae144ba78c3bffa398710e551bebaeb84d5a0ad6f83613b682c6b39d52b8164736f6c63430008170033" +} \ No newline at end of file From 5c7ec9b97641843ccbb49361001db381ca57dd57 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 19:21:47 +0000 Subject: [PATCH 4/7] Deploy SushiSwap Oracle on linea --- README.md | 1 + .../linea/UniswapV2LikeOracle_SushiSwap.json | 123 ++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 deployments/linea/UniswapV2LikeOracle_SushiSwap.json diff --git a/README.md b/README.md index 89da9e9..5b15733 100644 --- a/README.md +++ b/README.md @@ -672,6 +672,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator * DodoV2 - [0x03aA019F3B78110e030c34e9fA98047A1f62859A](https://lineascan.build/address/0x03aA019F3B78110e030c34e9fA98047A1f62859A) * PancakeV3 - [0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61](https://lineascan.build/address/0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61) + * SushiSwap - [0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa](https://lineascan.build/address/0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa) diff --git a/deployments/linea/UniswapV2LikeOracle_SushiSwap.json b/deployments/linea/UniswapV2LikeOracle_SushiSwap.json new file mode 100644 index 0000000..2acda53 --- /dev/null +++ b/deployments/linea/UniswapV2LikeOracle_SushiSwap.json @@ -0,0 +1,123 @@ +{ + "address": "0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa", + "abi": [ + { + "inputs": [ + { + "internalType": "address", + "name": "_factory", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "_initcodeHash", + "type": "bytes32" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ConnectorShouldBeNone", + "type": "error" + }, + { + "inputs": [], + "name": "PoolNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "PoolWithConnectorNotFound", + "type": "error" + }, + { + "inputs": [], + "name": "FACTORY", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "INITCODE_HASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "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": "", + "type": "uint256" + } + ], + "name": "getRate", + "outputs": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x0b40eb315a518f3a50846df8b386a6ae23afbc8e8190bfb3775de3087b3dd9f8", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "552402", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x1e818d25d67f6d37fbeda0d90f8c92da358cb46e6d0f648e133fe6fe94c6d07a", + "transactionHash": "0x0b40eb315a518f3a50846df8b386a6ae23afbc8e8190bfb3775de3087b3dd9f8", + "logs": [], + "blockNumber": 13064144, + "cumulativeGasUsed": "552402", + "status": 1 + }, + "args": [ + "0xFbc12984689e5f15626Bad03Ad60160Fe98B303C", + "0xe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303" + ], + "numDeployments": 1, + "bytecode": "0x60c03461008957601f6108d438819003918201601f19168301916001600160401b0383118484101761008e578084926040948552833981010312610089578051906001600160a01b038216820361008957602001519060805260a05260405161082f90816100a5823960805181818161021b0152610358015260a051818181607701526103860152f35b600080fd5b634e487b7160e01b600052604160045260246000fdfe608080604052600436101561001357600080fd5b600090813560e01c9081632dd31000146101d1575080633d549b321461009d5763f84618841461004257600080fd5b3461009a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261009a5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b80fd5b503461009a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261009a5773ffffffffffffffffffffffffffffffffffffffff60043581811681036101cd576024359180831683036101c957604435908082168083036101c5576040955003610147575061013a91610120916102a5565b919061013461012f8483610243565b6106c2565b92610567565b9082519182526020820152f35b906101558261015f926102a5565b91909384936102a5565b9283828411156101a15750508061019361018c610184856101349561013a989961062e565b945b85610243565b9186610243565b9081808210911802186106c2565b83955061013a945061018c6101bf846101349594966101939461062e565b96610186565b8580fd5b8380fd5b8280fd5b90503461023f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261023f5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5080fd5b8181029291811591840414171561025657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b51906dffffffffffffffffffffffffffff821682036102a057565b600080fd5b73ffffffffffffffffffffffffffffffffffffffff908082169083831680831015610522575092915b60405160208101907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000806060968189891b168552871b1660348301526028825285820167ffffffffffffffff93838210858311176104f357816040528351902060808401927fff0000000000000000000000000000000000000000000000000000000000000084527f0000000000000000000000000000000000000000000000000000000000000000891b16608185015260958401527f000000000000000000000000000000000000000000000000000000000000000060b58401526055815260e0830191818310858411176104f3576004838781938b9583604052519020167f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa9586156104e757600093849761042d575b505050506dffffffffffffffffffffffffffff80911693169316146000146104295791565b9091565b908092939750903d83116104df575b601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016880160e001908111848210176104b25760405286018690031261023f5761048890610285565b906101206104996101008701610285565b95015163ffffffff81160361009a575038808080610404565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b3d915061043c565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b919350509180916102ce565b8115610538570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b90670de0b6b3a764000090818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8185099383808610950394808603951461061e5784831115610605579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b82634e487b71600052156003026011186020526024601cfd5b50509061062b925061052e565b90565b91818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8185099383808610950394808603951461061e5784831115610605579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b6001808211156107f5576107919080837001000000000000000000000000000000008110156107de575b806801000000000000000060049210156107d1575b6401000000008110156107c4575b620100008110156107b7575b6101008110156107ab575b601081101561079f575b1015610798575b600302811c610746818561052e565b01811c610753818561052e565b01811c610760818561052e565b01811c61076d818561052e565b01811c61077a818561052e565b01811c610787818561052e565b01901c809261052e565b8111900390565b811b610737565b811c9160021b91610730565b60081c91811b91610726565b60101c9160081b9161071b565b60201c9160101b9161070f565b60401c9160201b91610701565b50680100000000000000009050608084901c6106ec565b509056fea26469706673582212209ca844d4ad01097c8919ddd42c2cb3efe64be5b8345b3d5c6585916b4f8872e164736f6c63430008170033", + "deployedBytecode": "0x608080604052600436101561001357600080fd5b600090813560e01c9081632dd31000146101d1575080633d549b321461009d5763f84618841461004257600080fd5b3461009a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261009a5760206040517f00000000000000000000000000000000000000000000000000000000000000008152f35b80fd5b503461009a5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261009a5773ffffffffffffffffffffffffffffffffffffffff60043581811681036101cd576024359180831683036101c957604435908082168083036101c5576040955003610147575061013a91610120916102a5565b919061013461012f8483610243565b6106c2565b92610567565b9082519182526020820152f35b906101558261015f926102a5565b91909384936102a5565b9283828411156101a15750508061019361018c610184856101349561013a989961062e565b945b85610243565b9186610243565b9081808210911802186106c2565b83955061013a945061018c6101bf846101349594966101939461062e565b96610186565b8580fd5b8380fd5b8280fd5b90503461023f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261023f5760209073ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5080fd5b8181029291811591840414171561025657565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b51906dffffffffffffffffffffffffffff821682036102a057565b600080fd5b73ffffffffffffffffffffffffffffffffffffffff908082169083831680831015610522575092915b60405160208101907fffffffffffffffffffffffffffffffffffffffff000000000000000000000000806060968189891b168552871b1660348301526028825285820167ffffffffffffffff93838210858311176104f357816040528351902060808401927fff0000000000000000000000000000000000000000000000000000000000000084527f0000000000000000000000000000000000000000000000000000000000000000891b16608185015260958401527f000000000000000000000000000000000000000000000000000000000000000060b58401526055815260e0830191818310858411176104f3576004838781938b9583604052519020167f0902f1ac0000000000000000000000000000000000000000000000000000000082525afa9586156104e757600093849761042d575b505050506dffffffffffffffffffffffffffff80911693169316146000146104295791565b9091565b908092939750903d83116104df575b601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016880160e001908111848210176104b25760405286018690031261023f5761048890610285565b906101206104996101008701610285565b95015163ffffffff81160361009a575038808080610404565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b3d915061043c565b6040513d6000823e3d90fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b919350509180916102ce565b8115610538570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b90670de0b6b3a764000090818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8185099383808610950394808603951461061e5784831115610605579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b82634e487b71600052156003026011186020526024601cfd5b50509061062b925061052e565b90565b91818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8185099383808610950394808603951461061e5784831115610605579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b6001808211156107f5576107919080837001000000000000000000000000000000008110156107de575b806801000000000000000060049210156107d1575b6401000000008110156107c4575b620100008110156107b7575b6101008110156107ab575b601081101561079f575b1015610798575b600302811c610746818561052e565b01811c610753818561052e565b01811c610760818561052e565b01811c61076d818561052e565b01811c61077a818561052e565b01811c610787818561052e565b01901c809261052e565b8111900390565b811b610737565b811c9160021b91610730565b60081c91811b91610726565b60101c9160081b9161071b565b60201c9160101b9161070f565b60401c9160201b91610701565b50680100000000000000009050608084901c6106ec565b509056fea26469706673582212209ca844d4ad01097c8919ddd42c2cb3efe64be5b8345b3d5c6585916b4f8872e164736f6c63430008170033" +} \ No newline at end of file From 746b7000682a476be63ff4807503406488960527 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 19:33:17 +0000 Subject: [PATCH 5/7] Deploy BaseCoinWrapper on linea --- README.md | 2 +- deployments/linea/BaseCoinWrapper.json | 125 +++++++++++++++++++++++++ 2 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 deployments/linea/BaseCoinWrapper.json diff --git a/README.md b/README.md index 5b15733..510b5e7 100644 --- a/README.md +++ b/README.md @@ -678,7 +678,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
Supported wrappers - * WETH - [...](...) + * WETH - [0xCC54299Fc291B261B2bF5552E7F0E5d2F8613E8C](https://lineascan.build/address/0xCC54299Fc291B261B2bF5552E7F0E5d2F8613E8C)
diff --git a/deployments/linea/BaseCoinWrapper.json b/deployments/linea/BaseCoinWrapper.json new file mode 100644 index 0000000..bad0caa --- /dev/null +++ b/deployments/linea/BaseCoinWrapper.json @@ -0,0 +1,125 @@ +{ + "address": "0xCC54299Fc291B261B2bF5552E7F0E5d2F8613E8C", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "base", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "wBase", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "NotAddedMarket", + "type": "error" + }, + { + "inputs": [], + "name": "NotRemovedMarket", + "type": "error" + }, + { + "inputs": [], + "name": "NotSupportedToken", + "type": "error" + }, + { + "inputs": [], + "name": "BASE", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "WBASE", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "wrap", + "outputs": [ + { + "internalType": "contract IERC20", + "name": "wrappedToken", + "type": "address" + }, + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x12e2e8ac5f92703a139d777861345eb3a77a8c58226343b53c3fedf58d403ce9", + "receipt": { + "to": null, + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": "0xCC54299Fc291B261B2bF5552E7F0E5d2F8613E8C", + "transactionIndex": 1, + "gasUsed": "197257", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x15064234f74aeb3b606fa5eab7a6f04b118df89272366e4f545d3b93b08c1591", + "transactionHash": "0x12e2e8ac5f92703a139d777861345eb3a77a8c58226343b53c3fedf58d403ce9", + "logs": [], + "blockNumber": 13064445, + "cumulativeGasUsed": "218257", + "status": 1, + "byzantium": true + }, + "args": [ + "0x0000000000000000000000000000000000000000", + "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f" + ], + "numDeployments": 1, + "solcInputHash": "253d7d12c3173e72e91ece3cb92e0838", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"base\",\"type\":\"address\"},{\"internalType\":\"contract IERC20\",\"name\":\"wBase\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"NotAddedMarket\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotRemovedMarket\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotSupportedToken\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"BASE\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"WBASE\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"wrap\",\"outputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"wrappedToken\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"rate\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/wrappers/BaseCoinWrapper.sol\":\"BaseCoinWrapper\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"license\":\"MIT\"},\"contracts/interfaces/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IWrapper {\\n error NotSupportedToken();\\n error NotAddedMarket();\\n error NotRemovedMarket();\\n\\n function wrap(IERC20 token) external view returns (IERC20 wrappedToken, uint256 rate);\\n}\\n\",\"keccak256\":\"0x1d3cefe7c67b9f9750823be723dd0b00f9894ec4e0cd078eac321a2cff8f7da2\",\"license\":\"MIT\"},\"contracts/wrappers/BaseCoinWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"./Wrapper.sol\\\";\\n\\ncontract BaseCoinWrapper is Wrapper {\\n constructor(IERC20 base, IERC20 wBase) Wrapper(base, wBase) {} // solhint-disable-line no-empty-blocks\\n\\n function _wrap() internal view virtual override returns (IERC20 wrappedToken, uint256 rate) {\\n return (WBASE, 1e18);\\n }\\n\\n function _unwrap() internal view virtual override returns (IERC20 unwrappedToken, uint256 rate) {\\n return (BASE, 1e18);\\n }\\n}\\n\",\"keccak256\":\"0x14ed8197ec69f43f64245d3a1dfabf7e1ff61456e037cf3dc934ed5c31c21fc8\",\"license\":\"MIT\"},\"contracts/wrappers/Wrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"../interfaces/IWrapper.sol\\\";\\n\\nabstract contract Wrapper is IWrapper {\\n IERC20 public immutable BASE;\\n IERC20 public immutable WBASE;\\n\\n constructor(IERC20 base, IERC20 wBase) {\\n BASE = base;\\n WBASE = wBase;\\n }\\n\\n function wrap(IERC20 token) external view override returns (IERC20 wrappedToken, uint256 rate) {\\n if(token == BASE) {\\n return _wrap();\\n } else if (token == WBASE) {\\n return _unwrap();\\n } else {\\n revert NotSupportedToken();\\n }\\n }\\n\\n function _wrap() internal view virtual returns (IERC20 wrappedToken, uint256 rate) {} // solhint-disable-line no-empty-blocks\\n\\n function _unwrap() internal view virtual returns (IERC20 unwrappedToken, uint256 rate) {} // solhint-disable-line no-empty-blocks\\n}\\n\",\"keccak256\":\"0xfcd599a5fd47efb91353766756707072756da2f2682f6e54b2ae525a71fc1ffb\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60c03461008d57601f61035238819003918201601f19168301916001600160401b0383118484101761009257808492604094855283398101031261008d57610052602061004b836100a8565b92016100a8565b9060805260a05260405161029590816100bd82396080518181816088015261018e015260a05181818160fa015281816101d501526102030152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b038216820361008d5756fe6080604052600436101561001257600080fd5b6000803560e01c8063023276f01461011e5780638e0b3bf2146100af5763ec342ad01461003e57600080fd5b346100ac57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b50346100ac57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100ac5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac576004359073ffffffffffffffffffffffffffffffffffffffff9081831683036100ac575061017d60409261018c565b90918351921682526020820152f35b7f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff908116908083168203610201575050507f000000000000000000000000000000000000000000000000000000000000000090670de0b6b3a764000090565b7f000000000000000000000000000000000000000000000000000000000000000016036102355790670de0b6b3a764000090565b60046040517fc8a08d6f000000000000000000000000000000000000000000000000000000008152fdfea2646970667358221220d2a52daa7cac464289c3810d457ca8fd49cecfeba3f64706347b4a53780e2d7964736f6c63430008170033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b6000803560e01c8063023276f01461011e5780638e0b3bf2146100af5763ec342ad01461003e57600080fd5b346100ac57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b80fd5b50346100ac57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac57602060405173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100ac5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100ac576004359073ffffffffffffffffffffffffffffffffffffffff9081831683036100ac575061017d60409261018c565b90918351921682526020820152f35b7f00000000000000000000000000000000000000000000000000000000000000009073ffffffffffffffffffffffffffffffffffffffff908116908083168203610201575050507f000000000000000000000000000000000000000000000000000000000000000090670de0b6b3a764000090565b7f000000000000000000000000000000000000000000000000000000000000000016036102355790670de0b6b3a764000090565b60046040517fc8a08d6f000000000000000000000000000000000000000000000000000000008152fdfea2646970667358221220d2a52daa7cac464289c3810d457ca8fd49cecfeba3f64706347b4a53780e2d7964736f6c63430008170033", + "devdoc": { + "kind": "dev", + "methods": {}, + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": {}, + "version": 1 + }, + "storageLayout": { + "storage": [], + "types": null + } +} \ No newline at end of file From c9546c55862950dc73ca8b6cebd7e81a0f3f5a83 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 19:38:05 +0000 Subject: [PATCH 6/7] Deploy MultiWrapper on linea --- deployments/linea/MultiWrapper.json | 417 ++++++++++++++++++++++++++++ 1 file changed, 417 insertions(+) create mode 100644 deployments/linea/MultiWrapper.json diff --git a/deployments/linea/MultiWrapper.json b/deployments/linea/MultiWrapper.json new file mode 100644 index 0000000..7542ab7 --- /dev/null +++ b/deployments/linea/MultiWrapper.json @@ -0,0 +1,417 @@ +{ + "address": "0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6", + "abi": [ + { + "inputs": [ + { + "internalType": "contract IWrapper[]", + "name": "existingWrappers", + "type": "address[]" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownWrapper", + "type": "error" + }, + { + "inputs": [], + "name": "WrapperAlreadyAdded", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IWrapper", + "name": "connector", + "type": "address" + } + ], + "name": "WrapperAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IWrapper", + "name": "connector", + "type": "address" + } + ], + "name": "WrapperRemoved", + "type": "event" + }, + { + "inputs": [ + { + "internalType": "contract IWrapper", + "name": "wrapper", + "type": "address" + } + ], + "name": "addWrapper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "token", + "type": "address" + } + ], + "name": "getWrappedTokens", + "outputs": [ + { + "internalType": "contract IERC20[]", + "name": "wrappedTokens", + "type": "address[]" + }, + { + "internalType": "uint256[]", + "name": "rates", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IWrapper", + "name": "wrapper", + "type": "address" + } + ], + "name": "removeWrapper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "wrappers", + "outputs": [ + { + "internalType": "contract IWrapper[]", + "name": "allWrappers", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + } + ], + "transactionHash": "0x6ca9de556ea13b310af9eedd818647dbab899ac226e3cf742758ebea2b47b344", + "receipt": { + "to": null, + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": "0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6", + "transactionIndex": 2, + "gasUsed": "932818", + "logsBloom": "0x00000000000000000000000000000000000000000000000000800000000000000000000000000020000000000004000000000000008000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000010000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000080000000000400000000000000000000000020000000000000000000000000000000000000000008000000200000000000000000", + "blockHash": "0x62358e8e8e76d17edf23ef929a261971ccda33828d1f3d478c50cc30c559b1b2", + "transactionHash": "0x6ca9de556ea13b310af9eedd818647dbab899ac226e3cf742758ebea2b47b344", + "logs": [ + { + "transactionIndex": 2, + "blockNumber": 13064604, + "transactionHash": "0x6ca9de556ea13b310af9eedd818647dbab899ac226e3cf742758ebea2b47b344", + "address": "0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6", + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000056e44874f624ebde6efcc783efd685f0fbdc6dcf" + ], + "data": "0x", + "logIndex": 5, + "blockHash": "0x62358e8e8e76d17edf23ef929a261971ccda33828d1f3d478c50cc30c559b1b2" + }, + { + "transactionIndex": 2, + "blockNumber": 13064604, + "transactionHash": "0x6ca9de556ea13b310af9eedd818647dbab899ac226e3cf742758ebea2b47b344", + "address": "0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6", + "topics": [ + "0x9471982c02bc8a0888c85288dcf07501f924fd3b336a516ff0747d9d28b516fd" + ], + "data": "0x000000000000000000000000cc54299fc291b261b2bf5552e7f0e5d2f8613e8c", + "logIndex": 6, + "blockHash": "0x62358e8e8e76d17edf23ef929a261971ccda33828d1f3d478c50cc30c559b1b2" + } + ], + "blockNumber": 13064604, + "cumulativeGasUsed": "1285858", + "status": 1, + "byzantium": true + }, + "args": [ + [ + "0xCC54299Fc291B261B2bF5552E7F0E5d2F8613E8C" + ], + "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF" + ], + "numDeployments": 1, + "solcInputHash": "253d7d12c3173e72e91ece3cb92e0838", + "metadata": "{\"compiler\":{\"version\":\"0.8.23+commit.f704f362\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract IWrapper[]\",\"name\":\"existingWrappers\",\"type\":\"address[]\"},{\"internalType\":\"address\",\"name\":\"owner_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnknownWrapper\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"WrapperAlreadyAdded\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWrapper\",\"name\":\"connector\",\"type\":\"address\"}],\"name\":\"WrapperAdded\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"contract IWrapper\",\"name\":\"connector\",\"type\":\"address\"}],\"name\":\"WrapperRemoved\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"contract IWrapper\",\"name\":\"wrapper\",\"type\":\"address\"}],\"name\":\"addWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IERC20\",\"name\":\"token\",\"type\":\"address\"}],\"name\":\"getWrappedTokens\",\"outputs\":[{\"internalType\":\"contract IERC20[]\",\"name\":\"wrappedTokens\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"rates\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"contract IWrapper\",\"name\":\"wrapper\",\"type\":\"address\"}],\"name\":\"removeWrapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wrappers\",\"outputs\":[{\"internalType\":\"contract IWrapper[]\",\"name\":\"allWrappers\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"errors\":{\"OwnableInvalidOwner(address)\":[{\"details\":\"The owner is not a valid owner account. (eg. `address(0)`)\"}],\"OwnableUnauthorizedAccount(address)\":[{\"details\":\"The caller account is not authorized to perform an operation.\"}]},\"kind\":\"dev\",\"methods\":{\"addWrapper(address)\":{\"params\":{\"wrapper\":\"The address of the wrapper to be added.\"}},\"constructor\":{\"details\":\"Initializes the MultiWrapper with an array of existing `IWrapper` contracts.\",\"params\":{\"existingWrappers\":\"Initial wrappers to be added.\"}},\"getWrappedTokens(address)\":{\"details\":\"Iterates over the wrappers to determine the wrapped tokens and their conversion rates.\",\"params\":{\"token\":\"The token for which to retrieve the wrapped tokens and conversion rates.\"},\"returns\":{\"rates\":\"Conversion rates for the wrapped tokens.\",\"wrappedTokens\":\"Tokens obtainable by wrapping the input token, including the input token and a rate of 1e18 for it.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"removeWrapper(address)\":{\"params\":{\"wrapper\":\"The address of the wrapper to be removed.\"}},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"wrappers()\":{\"returns\":{\"allWrappers\":\"Array of wrapper contracts.\"}}},\"title\":\"MultiWrapper\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addWrapper(address)\":{\"notice\":\"Adds a distinct wrapper contract that cannot be duplicated. Only the owner can add a wrapper.\"},\"constructor\":{\"notice\":\"Adds the provided wrappers to the contract.\"},\"getWrappedTokens(address)\":{\"notice\":\"Retrieves the wrapped tokens and their conversion rates for a given token.\"},\"removeWrapper(address)\":{\"notice\":\"Removes a specified wrapper contract. Only the owner can remove a wrapper.\"},\"wrappers()\":{\"notice\":\"Returns all wrappers currently added to the contract.\"}},\"notice\":\"\\u0421ontract allows for the management of multiple `IWrapper` contracts that can be used to wrap tokens in OffchainOracle's calculations. Wrappers are contracts that enable the conversion of tokens from one protocol to another. The contract provides functions to add and remove wrappers, as well as get information about the wrapped tokens and their conversion rates.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/MultiWrapper.sol\":\"MultiWrapper\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Context} from \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * The initial owner is set to the address provided by the deployer. This can\\n * later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n address private _owner;\\n\\n /**\\n * @dev The caller account is not authorized to perform an operation.\\n */\\n error OwnableUnauthorizedAccount(address account);\\n\\n /**\\n * @dev The owner is not a valid owner account. (eg. `address(0)`)\\n */\\n error OwnableInvalidOwner(address owner);\\n\\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n /**\\n * @dev Initializes the contract setting the address provided by the deployer as the initial owner.\\n */\\n constructor(address initialOwner) {\\n if (initialOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(initialOwner);\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the owner.\\n */\\n modifier onlyOwner() {\\n _checkOwner();\\n _;\\n }\\n\\n /**\\n * @dev Returns the address of the current owner.\\n */\\n function owner() public view virtual returns (address) {\\n return _owner;\\n }\\n\\n /**\\n * @dev Throws if the sender is not the owner.\\n */\\n function _checkOwner() internal view virtual {\\n if (owner() != _msgSender()) {\\n revert OwnableUnauthorizedAccount(_msgSender());\\n }\\n }\\n\\n /**\\n * @dev Leaves the contract without owner. It will not be possible to call\\n * `onlyOwner` functions. Can only be called by the current owner.\\n *\\n * NOTE: Renouncing ownership will leave the contract without an owner,\\n * thereby disabling any functionality that is only available to the owner.\\n */\\n function renounceOwnership() public virtual onlyOwner {\\n _transferOwnership(address(0));\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Can only be called by the current owner.\\n */\\n function transferOwnership(address newOwner) public virtual onlyOwner {\\n if (newOwner == address(0)) {\\n revert OwnableInvalidOwner(address(0));\\n }\\n _transferOwnership(newOwner);\\n }\\n\\n /**\\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n * Internal function without access restriction.\\n */\\n function _transferOwnership(address newOwner) internal virtual {\\n address oldOwner = _owner;\\n _owner = newOwner;\\n emit OwnershipTransferred(oldOwner, newOwner);\\n }\\n}\\n\",\"keccak256\":\"0xff6d0bb2e285473e5311d9d3caacb525ae3538a80758c10649a4d61029b017bb\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Interface of the ERC-20 standard as defined in the ERC.\\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\":\"0xe06a3f08a987af6ad2e1c1e774405d4fe08f1694b67517438b467cecf0da0ef7\",\"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/Panic.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/Panic.sol)\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Helper library for emitting standardized panic codes.\\n *\\n * ```solidity\\n * contract Example {\\n * using Panic for uint256;\\n *\\n * // Use any of the declared internal constants\\n * function foo() { Panic.GENERIC.panic(); }\\n *\\n * // Alternatively\\n * function foo() { Panic.panic(Panic.GENERIC); }\\n * }\\n * ```\\n *\\n * Follows the list from https://github.com/ethereum/solidity/blob/v0.8.24/libsolutil/ErrorCodes.h[libsolutil].\\n *\\n * _Available since v5.1._\\n */\\n// slither-disable-next-line unused-state\\nlibrary Panic {\\n /// @dev generic / unspecified error\\n uint256 internal constant GENERIC = 0x00;\\n /// @dev used by the assert() builtin\\n uint256 internal constant ASSERT = 0x01;\\n /// @dev arithmetic underflow or overflow\\n uint256 internal constant UNDER_OVERFLOW = 0x11;\\n /// @dev division or modulo by zero\\n uint256 internal constant DIVISION_BY_ZERO = 0x12;\\n /// @dev enum conversion error\\n uint256 internal constant ENUM_CONVERSION_ERROR = 0x21;\\n /// @dev invalid encoding in storage\\n uint256 internal constant STORAGE_ENCODING_ERROR = 0x22;\\n /// @dev empty array pop\\n uint256 internal constant EMPTY_ARRAY_POP = 0x31;\\n /// @dev array out of bounds access\\n uint256 internal constant ARRAY_OUT_OF_BOUNDS = 0x32;\\n /// @dev resource error (too large allocation or too large array)\\n uint256 internal constant RESOURCE_ERROR = 0x41;\\n /// @dev calling invalid internal function\\n uint256 internal constant INVALID_INTERNAL_FUNCTION = 0x51;\\n\\n /// @dev Reverts with a panic code. Recommended to use with\\n /// the internal constants with predefined codes.\\n function panic(uint256 code) internal pure {\\n assembly (\\\"memory-safe\\\") {\\n mstore(0x00, 0x4e487b71)\\n mstore(0x20, code)\\n revert(0x1c, 0x24)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xf7fe324703a64fc51702311dc51562d5cb1497734f074e4f483bfb6717572d7a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.20;\\n\\nimport {Panic} from \\\"../Panic.sol\\\";\\nimport {SafeCast} from \\\"./SafeCast.sol\\\";\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\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 success flag (no overflow).\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\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 success flag (no overflow).\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\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 success flag (no overflow).\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\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 success flag (no division by zero).\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\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 success flag (no division by zero).\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Branchless ternary evaluation for `a ? b : c`. Gas costs are constant.\\n *\\n * IMPORTANT: This function may reduce bytecode size and consume less gas when used standalone.\\n * However, the compiler may optimize Solidity ternary operations (i.e. `a ? b : c`) to only compute\\n * one branch when needed, making this function more expensive.\\n */\\n function ternary(bool condition, uint256 a, uint256 b) internal pure returns (uint256) {\\n unchecked {\\n // branchless ternary works because:\\n // b ^ (a ^ b) == a\\n // b ^ 0 == b\\n return b ^ ((a ^ b) * SafeCast.toUint(condition));\\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 ternary(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 ternary(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 Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n\\n // The following calculation ensures accurate ceiling division without overflow.\\n // Since a is non-zero, (a - 1) / b will not overflow.\\n // The largest possible result occurs when (a - 1) / b is type(uint256).max,\\n // but the largest value we can obtain is type(uint256).max - 1, which happens\\n // when a = type(uint256).max and b = 1.\\n unchecked {\\n return SafeCast.toUint(a > 0) * ((a - 1) / b + 1);\\n }\\n }\\n\\n /**\\n * @dev Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or\\n * denominator == 0.\\n *\\n * 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\\u00b2\\u2075\\u2076 and mod 2\\u00b2\\u2075\\u2076 - 1, then use\\n // the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n // variables such that product = prod1 * 2\\u00b2\\u2075\\u2076 + 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\\u00b2\\u2075\\u2076. Also prevents denominator == 0.\\n if (denominator <= prod1) {\\n Panic.panic(ternary(denominator == 0, Panic.DIVISION_BY_ZERO, Panic.UNDER_OVERFLOW));\\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\\u00b2\\u2075\\u2076 / 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\\u00b2\\u2075\\u2076. Now that denominator is an odd number, it has an inverse modulo 2\\u00b2\\u2075\\u2076 such\\n // that denominator * inv \\u2261 1 mod 2\\u00b2\\u2075\\u2076. Compute the inverse by starting with a seed that is correct for\\n // four bits. That is, denominator * inv \\u2261 1 mod 2\\u2074.\\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\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u2076\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b3\\u00b2\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u2076\\u2074\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b9\\u00b2\\u2078\\n inverse *= 2 - denominator * inverse; // inverse mod 2\\u00b2\\u2075\\u2076\\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\\u00b2\\u2075\\u2076. Since the preconditions guarantee that the outcome is\\n // less than 2\\u00b2\\u2075\\u2076, 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 * @dev 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 return mulDiv(x, y, denominator) + SafeCast.toUint(unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0);\\n }\\n\\n /**\\n * @dev Calculate the modular multiplicative inverse of a number in Z/nZ.\\n *\\n * If n is a prime, then Z/nZ is a field. In that case all elements are inversible, except 0.\\n * If n is not a prime, then Z/nZ is not a field, and some elements might not be inversible.\\n *\\n * If the input value is not inversible, 0 is returned.\\n *\\n * NOTE: If you know for sure that n is (big) a prime, it may be cheaper to use Fermat's little theorem and get the\\n * inverse using `Math.modExp(a, n - 2, n)`. See {invModPrime}.\\n */\\n function invMod(uint256 a, uint256 n) internal pure returns (uint256) {\\n unchecked {\\n if (n == 0) return 0;\\n\\n // The inverse modulo is calculated using the Extended Euclidean Algorithm (iterative version)\\n // Used to compute integers x and y such that: ax + ny = gcd(a, n).\\n // When the gcd is 1, then the inverse of a modulo n exists and it's x.\\n // ax + ny = 1\\n // ax = 1 + (-y)n\\n // ax \\u2261 1 (mod n) # x is the inverse of a modulo n\\n\\n // If the remainder is 0 the gcd is n right away.\\n uint256 remainder = a % n;\\n uint256 gcd = n;\\n\\n // Therefore the initial coefficients are:\\n // ax + ny = gcd(a, n) = n\\n // 0a + 1n = n\\n int256 x = 0;\\n int256 y = 1;\\n\\n while (remainder != 0) {\\n uint256 quotient = gcd / remainder;\\n\\n (gcd, remainder) = (\\n // The old remainder is the next gcd to try.\\n remainder,\\n // Compute the next remainder.\\n // Can't overflow given that (a % gcd) * (gcd // (a % gcd)) <= gcd\\n // where gcd is at most n (capped to type(uint256).max)\\n gcd - remainder * quotient\\n );\\n\\n (x, y) = (\\n // Increment the coefficient of a.\\n y,\\n // Decrement the coefficient of n.\\n // Can overflow, but the result is casted to uint256 so that the\\n // next value of y is \\\"wrapped around\\\" to a value between 0 and n - 1.\\n x - y * int256(quotient)\\n );\\n }\\n\\n if (gcd != 1) return 0; // No inverse exists.\\n return ternary(x < 0, n - uint256(-x), uint256(x)); // Wrap the result if it's negative.\\n }\\n }\\n\\n /**\\n * @dev Variant of {invMod}. More efficient, but only works if `p` is known to be a prime greater than `2`.\\n *\\n * From https://en.wikipedia.org/wiki/Fermat%27s_little_theorem[Fermat's little theorem], we know that if p is\\n * prime, then `a**(p-1) \\u2261 1 mod p`. As a consequence, we have `a * a**(p-2) \\u2261 1 mod p`, which means that\\n * `a**(p-2)` is the modular multiplicative inverse of a in Fp.\\n *\\n * NOTE: this function does NOT check that `p` is a prime greater than `2`.\\n */\\n function invModPrime(uint256 a, uint256 p) internal view returns (uint256) {\\n unchecked {\\n return Math.modExp(a, p - 2, p);\\n }\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m)\\n *\\n * Requirements:\\n * - modulus can't be zero\\n * - underlying staticcall to precompile must succeed\\n *\\n * IMPORTANT: The result is only valid if the underlying call succeeds. When using this function, make\\n * sure the chain you're using it on supports the precompiled contract for modular exponentiation\\n * at address 0x05 as specified in https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise,\\n * the underlying function will succeed given the lack of a revert, but the result may be incorrectly\\n * interpreted as 0.\\n */\\n function modExp(uint256 b, uint256 e, uint256 m) internal view returns (uint256) {\\n (bool success, uint256 result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Returns the modular exponentiation of the specified base, exponent and modulus (b ** e % m).\\n * It includes a success flag indicating if the operation succeeded. Operation will be marked as failed if trying\\n * to operate modulo 0 or if the underlying precompile reverted.\\n *\\n * IMPORTANT: The result is only valid if the success flag is true. When using this function, make sure the chain\\n * you're using it on supports the precompiled contract for modular exponentiation at address 0x05 as specified in\\n * https://eips.ethereum.org/EIPS/eip-198[EIP-198]. Otherwise, the underlying function will succeed given the lack\\n * of a revert, but the result may be incorrectly interpreted as 0.\\n */\\n function tryModExp(uint256 b, uint256 e, uint256 m) internal view returns (bool success, uint256 result) {\\n if (m == 0) return (false, 0);\\n assembly (\\\"memory-safe\\\") {\\n let ptr := mload(0x40)\\n // | Offset | Content | Content (Hex) |\\n // |-----------|------------|--------------------------------------------------------------------|\\n // | 0x00:0x1f | size of b | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x20:0x3f | size of e | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x40:0x5f | size of m | 0x0000000000000000000000000000000000000000000000000000000000000020 |\\n // | 0x60:0x7f | value of b | 0x<.............................................................b> |\\n // | 0x80:0x9f | value of e | 0x<.............................................................e> |\\n // | 0xa0:0xbf | value of m | 0x<.............................................................m> |\\n mstore(ptr, 0x20)\\n mstore(add(ptr, 0x20), 0x20)\\n mstore(add(ptr, 0x40), 0x20)\\n mstore(add(ptr, 0x60), b)\\n mstore(add(ptr, 0x80), e)\\n mstore(add(ptr, 0xa0), m)\\n\\n // Given the result < m, it's guaranteed to fit in 32 bytes,\\n // so we can use the memory scratch space located at offset 0.\\n success := staticcall(gas(), 0x05, ptr, 0xc0, 0x00, 0x20)\\n result := mload(0x00)\\n }\\n }\\n\\n /**\\n * @dev Variant of {modExp} that supports inputs of arbitrary length.\\n */\\n function modExp(bytes memory b, bytes memory e, bytes memory m) internal view returns (bytes memory) {\\n (bool success, bytes memory result) = tryModExp(b, e, m);\\n if (!success) {\\n Panic.panic(Panic.DIVISION_BY_ZERO);\\n }\\n return result;\\n }\\n\\n /**\\n * @dev Variant of {tryModExp} that supports inputs of arbitrary length.\\n */\\n function tryModExp(\\n bytes memory b,\\n bytes memory e,\\n bytes memory m\\n ) internal view returns (bool success, bytes memory result) {\\n if (_zeroBytes(m)) return (false, new bytes(0));\\n\\n uint256 mLen = m.length;\\n\\n // Encode call args in result and move the free memory pointer\\n result = abi.encodePacked(b.length, e.length, mLen, b, e, m);\\n\\n assembly (\\\"memory-safe\\\") {\\n let dataPtr := add(result, 0x20)\\n // Write result on top of args to avoid allocating extra memory.\\n success := staticcall(gas(), 0x05, dataPtr, mload(result), dataPtr, mLen)\\n // Overwrite the length.\\n // result.length > returndatasize() is guaranteed because returndatasize() == m.length\\n mstore(result, mLen)\\n // Set the memory pointer after the returned data.\\n mstore(0x40, add(dataPtr, mLen))\\n }\\n }\\n\\n /**\\n * @dev Returns whether the provided byte array is zero.\\n */\\n function _zeroBytes(bytes memory byteArray) private pure returns (bool) {\\n for (uint256 i = 0; i < byteArray.length; ++i) {\\n if (byteArray[i] != 0) {\\n return false;\\n }\\n }\\n return true;\\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 * This method is based on Newton's method for computing square roots; the algorithm is restricted to only\\n * using integer operations.\\n */\\n function sqrt(uint256 a) internal pure returns (uint256) {\\n unchecked {\\n // Take care of easy edge cases when a == 0 or a == 1\\n if (a <= 1) {\\n return a;\\n }\\n\\n // In this function, we use Newton's method to get a root of `f(x) := x\\u00b2 - a`. It involves building a\\n // sequence x_n that converges toward sqrt(a). For each iteration x_n, we also define the error between\\n // the current value as `\\u03b5_n = | x_n - sqrt(a) |`.\\n //\\n // For our first estimation, we consider `e` the smallest power of 2 which is bigger than the square root\\n // of the target. (i.e. `2**(e-1) \\u2264 sqrt(a) < 2**e`). We know that `e \\u2264 128` because `(2\\u00b9\\u00b2\\u2078)\\u00b2 = 2\\u00b2\\u2075\\u2076` is\\n // bigger than any uint256.\\n //\\n // By noticing that\\n // `2**(e-1) \\u2264 sqrt(a) < 2**e \\u2192 (2**(e-1))\\u00b2 \\u2264 a < (2**e)\\u00b2 \\u2192 2**(2*e-2) \\u2264 a < 2**(2*e)`\\n // we can deduce that `e - 1` is `log2(a) / 2`. We can thus compute `x_n = 2**(e-1)` using a method similar\\n // to the msb function.\\n uint256 aa = a;\\n uint256 xn = 1;\\n\\n if (aa >= (1 << 128)) {\\n aa >>= 128;\\n xn <<= 64;\\n }\\n if (aa >= (1 << 64)) {\\n aa >>= 64;\\n xn <<= 32;\\n }\\n if (aa >= (1 << 32)) {\\n aa >>= 32;\\n xn <<= 16;\\n }\\n if (aa >= (1 << 16)) {\\n aa >>= 16;\\n xn <<= 8;\\n }\\n if (aa >= (1 << 8)) {\\n aa >>= 8;\\n xn <<= 4;\\n }\\n if (aa >= (1 << 4)) {\\n aa >>= 4;\\n xn <<= 2;\\n }\\n if (aa >= (1 << 2)) {\\n xn <<= 1;\\n }\\n\\n // We now have x_n such that `x_n = 2**(e-1) \\u2264 sqrt(a) < 2**e = 2 * x_n`. This implies \\u03b5_n \\u2264 2**(e-1).\\n //\\n // We can refine our estimation by noticing that the middle of that interval minimizes the error.\\n // If we move x_n to equal 2**(e-1) + 2**(e-2), then we reduce the error to \\u03b5_n \\u2264 2**(e-2).\\n // This is going to be our x_0 (and \\u03b5_0)\\n xn = (3 * xn) >> 1; // \\u03b5_0 := | x_0 - sqrt(a) | \\u2264 2**(e-2)\\n\\n // From here, Newton's method give us:\\n // x_{n+1} = (x_n + a / x_n) / 2\\n //\\n // One should note that:\\n // x_{n+1}\\u00b2 - a = ((x_n + a / x_n) / 2)\\u00b2 - a\\n // = ((x_n\\u00b2 + a) / (2 * x_n))\\u00b2 - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2) - a\\n // = (x_n\\u2074 + 2 * a * x_n\\u00b2 + a\\u00b2 - 4 * a * x_n\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u2074 - 2 * a * x_n\\u00b2 + a\\u00b2) / (4 * x_n\\u00b2)\\n // = (x_n\\u00b2 - a)\\u00b2 / (2 * x_n)\\u00b2\\n // = ((x_n\\u00b2 - a) / (2 * x_n))\\u00b2\\n // \\u2265 0\\n // Which proves that for all n \\u2265 1, sqrt(a) \\u2264 x_n\\n //\\n // This gives us the proof of quadratic convergence of the sequence:\\n // \\u03b5_{n+1} = | x_{n+1} - sqrt(a) |\\n // = | (x_n + a / x_n) / 2 - sqrt(a) |\\n // = | (x_n\\u00b2 + a - 2*x_n*sqrt(a)) / (2 * x_n) |\\n // = | (x_n - sqrt(a))\\u00b2 / (2 * x_n) |\\n // = | \\u03b5_n\\u00b2 / (2 * x_n) |\\n // = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n //\\n // For the first iteration, we have a special case where x_0 is known:\\n // \\u03b5_1 = \\u03b5_0\\u00b2 / | (2 * x_0) |\\n // \\u2264 (2**(e-2))\\u00b2 / (2 * (2**(e-1) + 2**(e-2)))\\n // \\u2264 2**(2*e-4) / (3 * 2**(e-1))\\n // \\u2264 2**(e-3) / 3\\n // \\u2264 2**(e-3-log2(3))\\n // \\u2264 2**(e-4.5)\\n //\\n // For the following iterations, we use the fact that, 2**(e-1) \\u2264 sqrt(a) \\u2264 x_n:\\n // \\u03b5_{n+1} = \\u03b5_n\\u00b2 / | (2 * x_n) |\\n // \\u2264 (2**(e-k))\\u00b2 / (2 * 2**(e-1))\\n // \\u2264 2**(2*e-2*k) / 2**e\\n // \\u2264 2**(e-2*k)\\n xn = (xn + a / xn) >> 1; // \\u03b5_1 := | x_1 - sqrt(a) | \\u2264 2**(e-4.5) -- special case, see above\\n xn = (xn + a / xn) >> 1; // \\u03b5_2 := | x_2 - sqrt(a) | \\u2264 2**(e-9) -- general case with k = 4.5\\n xn = (xn + a / xn) >> 1; // \\u03b5_3 := | x_3 - sqrt(a) | \\u2264 2**(e-18) -- general case with k = 9\\n xn = (xn + a / xn) >> 1; // \\u03b5_4 := | x_4 - sqrt(a) | \\u2264 2**(e-36) -- general case with k = 18\\n xn = (xn + a / xn) >> 1; // \\u03b5_5 := | x_5 - sqrt(a) | \\u2264 2**(e-72) -- general case with k = 36\\n xn = (xn + a / xn) >> 1; // \\u03b5_6 := | x_6 - sqrt(a) | \\u2264 2**(e-144) -- general case with k = 72\\n\\n // Because e \\u2264 128 (as discussed during the first estimation phase), we know have reached a precision\\n // \\u03b5_6 \\u2264 2**(e-144) < 1. Given we're operating on integers, then we can ensure that xn is now either\\n // sqrt(a) or sqrt(a) + 1.\\n return xn - SafeCast.toUint(xn > a / xn);\\n }\\n }\\n\\n /**\\n * @dev 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 + SafeCast.toUint(unsignedRoundsUp(rounding) && result * result < a);\\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 uint256 exp;\\n unchecked {\\n exp = 128 * SafeCast.toUint(value > (1 << 128) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 64 * SafeCast.toUint(value > (1 << 64) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 32 * SafeCast.toUint(value > (1 << 32) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 16 * SafeCast.toUint(value > (1 << 16) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 8 * SafeCast.toUint(value > (1 << 8) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 4 * SafeCast.toUint(value > (1 << 4) - 1);\\n value >>= exp;\\n result += exp;\\n\\n exp = 2 * SafeCast.toUint(value > (1 << 2) - 1);\\n value >>= exp;\\n result += exp;\\n\\n result += SafeCast.toUint(value > 1);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << result < value);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 10 ** result < value);\\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 uint256 isGt;\\n unchecked {\\n isGt = SafeCast.toUint(value > (1 << 128) - 1);\\n value >>= isGt * 128;\\n result += isGt * 16;\\n\\n isGt = SafeCast.toUint(value > (1 << 64) - 1);\\n value >>= isGt * 64;\\n result += isGt * 8;\\n\\n isGt = SafeCast.toUint(value > (1 << 32) - 1);\\n value >>= isGt * 32;\\n result += isGt * 4;\\n\\n isGt = SafeCast.toUint(value > (1 << 16) - 1);\\n value >>= isGt * 16;\\n result += isGt * 2;\\n\\n result += SafeCast.toUint(value > (1 << 8) - 1);\\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 + SafeCast.toUint(unsignedRoundsUp(rounding) && 1 << (result << 3) < value);\\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\":\"0xa00be322d7db5786750ce0ac7e2f5b633ac30a5ed5fa1ced1e74acfc19acecea\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/math/SafeCast.sol)\\n// This file was procedurally generated from scripts/generate/templates/SafeCast.js.\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX/bool casting operators with added overflow\\n * checks.\\n *\\n * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can\\n * easily result in undesired exploitation or bugs, since developers usually\\n * assume that overflows raise errors. `SafeCast` restores this intuition by\\n * reverting the transaction when such an operation overflows.\\n *\\n * Using this library instead of the unchecked operations eliminates an entire\\n * class of bugs, so it's recommended to use it always.\\n */\\nlibrary SafeCast {\\n /**\\n * @dev Value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);\\n\\n /**\\n * @dev An int value doesn't fit in an uint of `bits` size.\\n */\\n error SafeCastOverflowedIntToUint(int256 value);\\n\\n /**\\n * @dev Value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);\\n\\n /**\\n * @dev An uint value doesn't fit in an int of `bits` size.\\n */\\n error SafeCastOverflowedUintToInt(uint256 value);\\n\\n /**\\n * @dev Returns the downcasted uint248 from uint256, reverting on\\n * overflow (when the input is greater than largest uint248).\\n *\\n * Counterpart to Solidity's `uint248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n */\\n function toUint248(uint256 value) internal pure returns (uint248) {\\n if (value > type(uint248).max) {\\n revert SafeCastOverflowedUintDowncast(248, value);\\n }\\n return uint248(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint240 from uint256, reverting on\\n * overflow (when the input is greater than largest uint240).\\n *\\n * Counterpart to Solidity's `uint240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n */\\n function toUint240(uint256 value) internal pure returns (uint240) {\\n if (value > type(uint240).max) {\\n revert SafeCastOverflowedUintDowncast(240, value);\\n }\\n return uint240(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint232 from uint256, reverting on\\n * overflow (when the input is greater than largest uint232).\\n *\\n * Counterpart to Solidity's `uint232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n */\\n function toUint232(uint256 value) internal pure returns (uint232) {\\n if (value > type(uint232).max) {\\n revert SafeCastOverflowedUintDowncast(232, value);\\n }\\n return uint232(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint224 from uint256, reverting on\\n * overflow (when the input is greater than largest uint224).\\n *\\n * Counterpart to Solidity's `uint224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n */\\n function toUint224(uint256 value) internal pure returns (uint224) {\\n if (value > type(uint224).max) {\\n revert SafeCastOverflowedUintDowncast(224, value);\\n }\\n return uint224(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint216 from uint256, reverting on\\n * overflow (when the input is greater than largest uint216).\\n *\\n * Counterpart to Solidity's `uint216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n */\\n function toUint216(uint256 value) internal pure returns (uint216) {\\n if (value > type(uint216).max) {\\n revert SafeCastOverflowedUintDowncast(216, value);\\n }\\n return uint216(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint208 from uint256, reverting on\\n * overflow (when the input is greater than largest uint208).\\n *\\n * Counterpart to Solidity's `uint208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n */\\n function toUint208(uint256 value) internal pure returns (uint208) {\\n if (value > type(uint208).max) {\\n revert SafeCastOverflowedUintDowncast(208, value);\\n }\\n return uint208(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint200 from uint256, reverting on\\n * overflow (when the input is greater than largest uint200).\\n *\\n * Counterpart to Solidity's `uint200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n */\\n function toUint200(uint256 value) internal pure returns (uint200) {\\n if (value > type(uint200).max) {\\n revert SafeCastOverflowedUintDowncast(200, value);\\n }\\n return uint200(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint192 from uint256, reverting on\\n * overflow (when the input is greater than largest uint192).\\n *\\n * Counterpart to Solidity's `uint192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n */\\n function toUint192(uint256 value) internal pure returns (uint192) {\\n if (value > type(uint192).max) {\\n revert SafeCastOverflowedUintDowncast(192, value);\\n }\\n return uint192(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint184 from uint256, reverting on\\n * overflow (when the input is greater than largest uint184).\\n *\\n * Counterpart to Solidity's `uint184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n */\\n function toUint184(uint256 value) internal pure returns (uint184) {\\n if (value > type(uint184).max) {\\n revert SafeCastOverflowedUintDowncast(184, value);\\n }\\n return uint184(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint176 from uint256, reverting on\\n * overflow (when the input is greater than largest uint176).\\n *\\n * Counterpart to Solidity's `uint176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n */\\n function toUint176(uint256 value) internal pure returns (uint176) {\\n if (value > type(uint176).max) {\\n revert SafeCastOverflowedUintDowncast(176, value);\\n }\\n return uint176(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint168 from uint256, reverting on\\n * overflow (when the input is greater than largest uint168).\\n *\\n * Counterpart to Solidity's `uint168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n */\\n function toUint168(uint256 value) internal pure returns (uint168) {\\n if (value > type(uint168).max) {\\n revert SafeCastOverflowedUintDowncast(168, value);\\n }\\n return uint168(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint160 from uint256, reverting on\\n * overflow (when the input is greater than largest uint160).\\n *\\n * Counterpart to Solidity's `uint160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n */\\n function toUint160(uint256 value) internal pure returns (uint160) {\\n if (value > type(uint160).max) {\\n revert SafeCastOverflowedUintDowncast(160, value);\\n }\\n return uint160(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint152 from uint256, reverting on\\n * overflow (when the input is greater than largest uint152).\\n *\\n * Counterpart to Solidity's `uint152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n */\\n function toUint152(uint256 value) internal pure returns (uint152) {\\n if (value > type(uint152).max) {\\n revert SafeCastOverflowedUintDowncast(152, value);\\n }\\n return uint152(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint144 from uint256, reverting on\\n * overflow (when the input is greater than largest uint144).\\n *\\n * Counterpart to Solidity's `uint144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n */\\n function toUint144(uint256 value) internal pure returns (uint144) {\\n if (value > type(uint144).max) {\\n revert SafeCastOverflowedUintDowncast(144, value);\\n }\\n return uint144(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint136 from uint256, reverting on\\n * overflow (when the input is greater than largest uint136).\\n *\\n * Counterpart to Solidity's `uint136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n */\\n function toUint136(uint256 value) internal pure returns (uint136) {\\n if (value > type(uint136).max) {\\n revert SafeCastOverflowedUintDowncast(136, value);\\n }\\n return uint136(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint128 from uint256, reverting on\\n * overflow (when the input is greater than largest uint128).\\n *\\n * Counterpart to Solidity's `uint128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toUint128(uint256 value) internal pure returns (uint128) {\\n if (value > type(uint128).max) {\\n revert SafeCastOverflowedUintDowncast(128, value);\\n }\\n return uint128(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint120 from uint256, reverting on\\n * overflow (when the input is greater than largest uint120).\\n *\\n * Counterpart to Solidity's `uint120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n */\\n function toUint120(uint256 value) internal pure returns (uint120) {\\n if (value > type(uint120).max) {\\n revert SafeCastOverflowedUintDowncast(120, value);\\n }\\n return uint120(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint112 from uint256, reverting on\\n * overflow (when the input is greater than largest uint112).\\n *\\n * Counterpart to Solidity's `uint112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n */\\n function toUint112(uint256 value) internal pure returns (uint112) {\\n if (value > type(uint112).max) {\\n revert SafeCastOverflowedUintDowncast(112, value);\\n }\\n return uint112(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint104 from uint256, reverting on\\n * overflow (when the input is greater than largest uint104).\\n *\\n * Counterpart to Solidity's `uint104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n */\\n function toUint104(uint256 value) internal pure returns (uint104) {\\n if (value > type(uint104).max) {\\n revert SafeCastOverflowedUintDowncast(104, value);\\n }\\n return uint104(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint96 from uint256, reverting on\\n * overflow (when the input is greater than largest uint96).\\n *\\n * Counterpart to Solidity's `uint96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n */\\n function toUint96(uint256 value) internal pure returns (uint96) {\\n if (value > type(uint96).max) {\\n revert SafeCastOverflowedUintDowncast(96, value);\\n }\\n return uint96(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint88 from uint256, reverting on\\n * overflow (when the input is greater than largest uint88).\\n *\\n * Counterpart to Solidity's `uint88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n */\\n function toUint88(uint256 value) internal pure returns (uint88) {\\n if (value > type(uint88).max) {\\n revert SafeCastOverflowedUintDowncast(88, value);\\n }\\n return uint88(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint80 from uint256, reverting on\\n * overflow (when the input is greater than largest uint80).\\n *\\n * Counterpart to Solidity's `uint80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n */\\n function toUint80(uint256 value) internal pure returns (uint80) {\\n if (value > type(uint80).max) {\\n revert SafeCastOverflowedUintDowncast(80, value);\\n }\\n return uint80(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint72 from uint256, reverting on\\n * overflow (when the input is greater than largest uint72).\\n *\\n * Counterpart to Solidity's `uint72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n */\\n function toUint72(uint256 value) internal pure returns (uint72) {\\n if (value > type(uint72).max) {\\n revert SafeCastOverflowedUintDowncast(72, value);\\n }\\n return uint72(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint64 from uint256, reverting on\\n * overflow (when the input is greater than largest uint64).\\n *\\n * Counterpart to Solidity's `uint64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toUint64(uint256 value) internal pure returns (uint64) {\\n if (value > type(uint64).max) {\\n revert SafeCastOverflowedUintDowncast(64, value);\\n }\\n return uint64(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint56 from uint256, reverting on\\n * overflow (when the input is greater than largest uint56).\\n *\\n * Counterpart to Solidity's `uint56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n */\\n function toUint56(uint256 value) internal pure returns (uint56) {\\n if (value > type(uint56).max) {\\n revert SafeCastOverflowedUintDowncast(56, value);\\n }\\n return uint56(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint48 from uint256, reverting on\\n * overflow (when the input is greater than largest uint48).\\n *\\n * Counterpart to Solidity's `uint48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n */\\n function toUint48(uint256 value) internal pure returns (uint48) {\\n if (value > type(uint48).max) {\\n revert SafeCastOverflowedUintDowncast(48, value);\\n }\\n return uint48(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint40 from uint256, reverting on\\n * overflow (when the input is greater than largest uint40).\\n *\\n * Counterpart to Solidity's `uint40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n */\\n function toUint40(uint256 value) internal pure returns (uint40) {\\n if (value > type(uint40).max) {\\n revert SafeCastOverflowedUintDowncast(40, value);\\n }\\n return uint40(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint32 from uint256, reverting on\\n * overflow (when the input is greater than largest uint32).\\n *\\n * Counterpart to Solidity's `uint32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toUint32(uint256 value) internal pure returns (uint32) {\\n if (value > type(uint32).max) {\\n revert SafeCastOverflowedUintDowncast(32, value);\\n }\\n return uint32(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint24 from uint256, reverting on\\n * overflow (when the input is greater than largest uint24).\\n *\\n * Counterpart to Solidity's `uint24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n */\\n function toUint24(uint256 value) internal pure returns (uint24) {\\n if (value > type(uint24).max) {\\n revert SafeCastOverflowedUintDowncast(24, value);\\n }\\n return uint24(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint16 from uint256, reverting on\\n * overflow (when the input is greater than largest uint16).\\n *\\n * Counterpart to Solidity's `uint16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toUint16(uint256 value) internal pure returns (uint16) {\\n if (value > type(uint16).max) {\\n revert SafeCastOverflowedUintDowncast(16, value);\\n }\\n return uint16(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted uint8 from uint256, reverting on\\n * overflow (when the input is greater than largest uint8).\\n *\\n * Counterpart to Solidity's `uint8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n */\\n function toUint8(uint256 value) internal pure returns (uint8) {\\n if (value > type(uint8).max) {\\n revert SafeCastOverflowedUintDowncast(8, value);\\n }\\n return uint8(value);\\n }\\n\\n /**\\n * @dev Converts a signed int256 into an unsigned uint256.\\n *\\n * Requirements:\\n *\\n * - input must be greater than or equal to 0.\\n */\\n function toUint256(int256 value) internal pure returns (uint256) {\\n if (value < 0) {\\n revert SafeCastOverflowedIntToUint(value);\\n }\\n return uint256(value);\\n }\\n\\n /**\\n * @dev Returns the downcasted int248 from int256, reverting on\\n * overflow (when the input is less than smallest int248 or\\n * greater than largest int248).\\n *\\n * Counterpart to Solidity's `int248` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 248 bits\\n */\\n function toInt248(int256 value) internal pure returns (int248 downcasted) {\\n downcasted = int248(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(248, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int240 from int256, reverting on\\n * overflow (when the input is less than smallest int240 or\\n * greater than largest int240).\\n *\\n * Counterpart to Solidity's `int240` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 240 bits\\n */\\n function toInt240(int256 value) internal pure returns (int240 downcasted) {\\n downcasted = int240(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(240, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int232 from int256, reverting on\\n * overflow (when the input is less than smallest int232 or\\n * greater than largest int232).\\n *\\n * Counterpart to Solidity's `int232` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 232 bits\\n */\\n function toInt232(int256 value) internal pure returns (int232 downcasted) {\\n downcasted = int232(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(232, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int224 from int256, reverting on\\n * overflow (when the input is less than smallest int224 or\\n * greater than largest int224).\\n *\\n * Counterpart to Solidity's `int224` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 224 bits\\n */\\n function toInt224(int256 value) internal pure returns (int224 downcasted) {\\n downcasted = int224(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(224, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int216 from int256, reverting on\\n * overflow (when the input is less than smallest int216 or\\n * greater than largest int216).\\n *\\n * Counterpart to Solidity's `int216` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 216 bits\\n */\\n function toInt216(int256 value) internal pure returns (int216 downcasted) {\\n downcasted = int216(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(216, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int208 from int256, reverting on\\n * overflow (when the input is less than smallest int208 or\\n * greater than largest int208).\\n *\\n * Counterpart to Solidity's `int208` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 208 bits\\n */\\n function toInt208(int256 value) internal pure returns (int208 downcasted) {\\n downcasted = int208(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(208, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int200 from int256, reverting on\\n * overflow (when the input is less than smallest int200 or\\n * greater than largest int200).\\n *\\n * Counterpart to Solidity's `int200` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 200 bits\\n */\\n function toInt200(int256 value) internal pure returns (int200 downcasted) {\\n downcasted = int200(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(200, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int192 from int256, reverting on\\n * overflow (when the input is less than smallest int192 or\\n * greater than largest int192).\\n *\\n * Counterpart to Solidity's `int192` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 192 bits\\n */\\n function toInt192(int256 value) internal pure returns (int192 downcasted) {\\n downcasted = int192(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(192, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int184 from int256, reverting on\\n * overflow (when the input is less than smallest int184 or\\n * greater than largest int184).\\n *\\n * Counterpart to Solidity's `int184` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 184 bits\\n */\\n function toInt184(int256 value) internal pure returns (int184 downcasted) {\\n downcasted = int184(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(184, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int176 from int256, reverting on\\n * overflow (when the input is less than smallest int176 or\\n * greater than largest int176).\\n *\\n * Counterpart to Solidity's `int176` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 176 bits\\n */\\n function toInt176(int256 value) internal pure returns (int176 downcasted) {\\n downcasted = int176(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(176, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int168 from int256, reverting on\\n * overflow (when the input is less than smallest int168 or\\n * greater than largest int168).\\n *\\n * Counterpart to Solidity's `int168` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 168 bits\\n */\\n function toInt168(int256 value) internal pure returns (int168 downcasted) {\\n downcasted = int168(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(168, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int160 from int256, reverting on\\n * overflow (when the input is less than smallest int160 or\\n * greater than largest int160).\\n *\\n * Counterpart to Solidity's `int160` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 160 bits\\n */\\n function toInt160(int256 value) internal pure returns (int160 downcasted) {\\n downcasted = int160(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(160, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int152 from int256, reverting on\\n * overflow (when the input is less than smallest int152 or\\n * greater than largest int152).\\n *\\n * Counterpart to Solidity's `int152` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 152 bits\\n */\\n function toInt152(int256 value) internal pure returns (int152 downcasted) {\\n downcasted = int152(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(152, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int144 from int256, reverting on\\n * overflow (when the input is less than smallest int144 or\\n * greater than largest int144).\\n *\\n * Counterpart to Solidity's `int144` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 144 bits\\n */\\n function toInt144(int256 value) internal pure returns (int144 downcasted) {\\n downcasted = int144(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(144, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int136 from int256, reverting on\\n * overflow (when the input is less than smallest int136 or\\n * greater than largest int136).\\n *\\n * Counterpart to Solidity's `int136` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 136 bits\\n */\\n function toInt136(int256 value) internal pure returns (int136 downcasted) {\\n downcasted = int136(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(136, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int128 from int256, reverting on\\n * overflow (when the input is less than smallest int128 or\\n * greater than largest int128).\\n *\\n * Counterpart to Solidity's `int128` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 128 bits\\n */\\n function toInt128(int256 value) internal pure returns (int128 downcasted) {\\n downcasted = int128(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(128, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int120 from int256, reverting on\\n * overflow (when the input is less than smallest int120 or\\n * greater than largest int120).\\n *\\n * Counterpart to Solidity's `int120` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 120 bits\\n */\\n function toInt120(int256 value) internal pure returns (int120 downcasted) {\\n downcasted = int120(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(120, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int112 from int256, reverting on\\n * overflow (when the input is less than smallest int112 or\\n * greater than largest int112).\\n *\\n * Counterpart to Solidity's `int112` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 112 bits\\n */\\n function toInt112(int256 value) internal pure returns (int112 downcasted) {\\n downcasted = int112(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(112, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int104 from int256, reverting on\\n * overflow (when the input is less than smallest int104 or\\n * greater than largest int104).\\n *\\n * Counterpart to Solidity's `int104` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 104 bits\\n */\\n function toInt104(int256 value) internal pure returns (int104 downcasted) {\\n downcasted = int104(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(104, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int96 from int256, reverting on\\n * overflow (when the input is less than smallest int96 or\\n * greater than largest int96).\\n *\\n * Counterpart to Solidity's `int96` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 96 bits\\n */\\n function toInt96(int256 value) internal pure returns (int96 downcasted) {\\n downcasted = int96(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(96, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int88 from int256, reverting on\\n * overflow (when the input is less than smallest int88 or\\n * greater than largest int88).\\n *\\n * Counterpart to Solidity's `int88` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 88 bits\\n */\\n function toInt88(int256 value) internal pure returns (int88 downcasted) {\\n downcasted = int88(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(88, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int80 from int256, reverting on\\n * overflow (when the input is less than smallest int80 or\\n * greater than largest int80).\\n *\\n * Counterpart to Solidity's `int80` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 80 bits\\n */\\n function toInt80(int256 value) internal pure returns (int80 downcasted) {\\n downcasted = int80(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(80, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int72 from int256, reverting on\\n * overflow (when the input is less than smallest int72 or\\n * greater than largest int72).\\n *\\n * Counterpart to Solidity's `int72` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 72 bits\\n */\\n function toInt72(int256 value) internal pure returns (int72 downcasted) {\\n downcasted = int72(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(72, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int64 from int256, reverting on\\n * overflow (when the input is less than smallest int64 or\\n * greater than largest int64).\\n *\\n * Counterpart to Solidity's `int64` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 64 bits\\n */\\n function toInt64(int256 value) internal pure returns (int64 downcasted) {\\n downcasted = int64(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(64, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int56 from int256, reverting on\\n * overflow (when the input is less than smallest int56 or\\n * greater than largest int56).\\n *\\n * Counterpart to Solidity's `int56` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 56 bits\\n */\\n function toInt56(int256 value) internal pure returns (int56 downcasted) {\\n downcasted = int56(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(56, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int48 from int256, reverting on\\n * overflow (when the input is less than smallest int48 or\\n * greater than largest int48).\\n *\\n * Counterpart to Solidity's `int48` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 48 bits\\n */\\n function toInt48(int256 value) internal pure returns (int48 downcasted) {\\n downcasted = int48(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(48, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int40 from int256, reverting on\\n * overflow (when the input is less than smallest int40 or\\n * greater than largest int40).\\n *\\n * Counterpart to Solidity's `int40` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 40 bits\\n */\\n function toInt40(int256 value) internal pure returns (int40 downcasted) {\\n downcasted = int40(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(40, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int32 from int256, reverting on\\n * overflow (when the input is less than smallest int32 or\\n * greater than largest int32).\\n *\\n * Counterpart to Solidity's `int32` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 32 bits\\n */\\n function toInt32(int256 value) internal pure returns (int32 downcasted) {\\n downcasted = int32(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(32, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int24 from int256, reverting on\\n * overflow (when the input is less than smallest int24 or\\n * greater than largest int24).\\n *\\n * Counterpart to Solidity's `int24` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 24 bits\\n */\\n function toInt24(int256 value) internal pure returns (int24 downcasted) {\\n downcasted = int24(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(24, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int16 from int256, reverting on\\n * overflow (when the input is less than smallest int16 or\\n * greater than largest int16).\\n *\\n * Counterpart to Solidity's `int16` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 16 bits\\n */\\n function toInt16(int256 value) internal pure returns (int16 downcasted) {\\n downcasted = int16(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(16, value);\\n }\\n }\\n\\n /**\\n * @dev Returns the downcasted int8 from int256, reverting on\\n * overflow (when the input is less than smallest int8 or\\n * greater than largest int8).\\n *\\n * Counterpart to Solidity's `int8` operator.\\n *\\n * Requirements:\\n *\\n * - input must fit into 8 bits\\n */\\n function toInt8(int256 value) internal pure returns (int8 downcasted) {\\n downcasted = int8(value);\\n if (downcasted != value) {\\n revert SafeCastOverflowedIntDowncast(8, value);\\n }\\n }\\n\\n /**\\n * @dev Converts an unsigned uint256 into a signed int256.\\n *\\n * Requirements:\\n *\\n * - input must be less than or equal to maxInt256.\\n */\\n function toInt256(uint256 value) internal pure returns (int256) {\\n // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive\\n if (value > uint256(type(int256).max)) {\\n revert SafeCastOverflowedUintToInt(value);\\n }\\n return int256(value);\\n }\\n\\n /**\\n * @dev Cast a boolean (false or true) to a uint256 (0 or 1) with no jump.\\n */\\n function toUint(bool b) internal pure returns (uint256 u) {\\n assembly (\\\"memory-safe\\\") {\\n u := iszero(iszero(b))\\n }\\n }\\n}\\n\",\"keccak256\":\"0x195533c86d0ef72bcc06456a4f66a9b941f38eb403739b00f21fd7c1abd1ae54\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/structs/EnumerableSet.sol)\\n// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.\\n\\npragma solidity ^0.8.20;\\n\\n/**\\n * @dev Library for managing\\n * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive\\n * types.\\n *\\n * Sets have the following properties:\\n *\\n * - Elements are added, removed, and checked for existence in constant time\\n * (O(1)).\\n * - Elements are enumerated in O(n). No guarantees are made on the ordering.\\n *\\n * ```solidity\\n * contract Example {\\n * // Add the library methods\\n * using EnumerableSet for EnumerableSet.AddressSet;\\n *\\n * // Declare a set state variable\\n * EnumerableSet.AddressSet private mySet;\\n * }\\n * ```\\n *\\n * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)\\n * and `uint256` (`UintSet`) are supported.\\n *\\n * [WARNING]\\n * ====\\n * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure\\n * unusable.\\n * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.\\n *\\n * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an\\n * array of EnumerableSet.\\n * ====\\n */\\nlibrary EnumerableSet {\\n // To implement this library for multiple types with as little code\\n // repetition as possible, we write it in terms of a generic Set type with\\n // bytes32 values.\\n // The Set implementation uses private functions, and user-facing\\n // implementations (such as AddressSet) are just wrappers around the\\n // underlying Set.\\n // This means that we can only create new EnumerableSets for types that fit\\n // in bytes32.\\n\\n struct Set {\\n // Storage of set values\\n bytes32[] _values;\\n // Position is the index of the value in the `values` array plus 1.\\n // Position 0 is used to mean a value is not in the set.\\n mapping(bytes32 value => uint256) _positions;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function _add(Set storage set, bytes32 value) private returns (bool) {\\n if (!_contains(set, value)) {\\n set._values.push(value);\\n // The value is stored at length-1, but we add 1 to all indexes\\n // and use 0 as a sentinel value\\n set._positions[value] = set._values.length;\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function _remove(Set storage set, bytes32 value) private returns (bool) {\\n // We cache the value's position to prevent multiple reads from the same storage slot\\n uint256 position = set._positions[value];\\n\\n if (position != 0) {\\n // Equivalent to contains(set, value)\\n // To delete an element from the _values array in O(1), we swap the element to delete with the last one in\\n // the array, and then remove the last element (sometimes called as 'swap and pop').\\n // This modifies the order of the array, as noted in {at}.\\n\\n uint256 valueIndex = position - 1;\\n uint256 lastIndex = set._values.length - 1;\\n\\n if (valueIndex != lastIndex) {\\n bytes32 lastValue = set._values[lastIndex];\\n\\n // Move the lastValue to the index where the value to delete is\\n set._values[valueIndex] = lastValue;\\n // Update the tracked position of the lastValue (that was just moved)\\n set._positions[lastValue] = position;\\n }\\n\\n // Delete the slot where the moved value was stored\\n set._values.pop();\\n\\n // Delete the tracked position for the deleted slot\\n delete set._positions[value];\\n\\n return true;\\n } else {\\n return false;\\n }\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function _contains(Set storage set, bytes32 value) private view returns (bool) {\\n return set._positions[value] != 0;\\n }\\n\\n /**\\n * @dev Returns the number of values on the set. O(1).\\n */\\n function _length(Set storage set) private view returns (uint256) {\\n return set._values.length;\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function _at(Set storage set, uint256 index) private view returns (bytes32) {\\n return set._values[index];\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function _values(Set storage set) private view returns (bytes32[] memory) {\\n return set._values;\\n }\\n\\n // Bytes32Set\\n\\n struct Bytes32Set {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _add(set._inner, value);\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {\\n return _remove(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {\\n return _contains(set._inner, value);\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(Bytes32Set storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {\\n return _at(set._inner, index);\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n bytes32[] memory result;\\n\\n assembly (\\\"memory-safe\\\") {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // AddressSet\\n\\n struct AddressSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(AddressSet storage set, address value) internal returns (bool) {\\n return _add(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(AddressSet storage set, address value) internal returns (bool) {\\n return _remove(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(AddressSet storage set, address value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(uint256(uint160(value))));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(AddressSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(AddressSet storage set, uint256 index) internal view returns (address) {\\n return address(uint160(uint256(_at(set._inner, index))));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(AddressSet storage set) internal view returns (address[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n address[] memory result;\\n\\n assembly (\\\"memory-safe\\\") {\\n result := store\\n }\\n\\n return result;\\n }\\n\\n // UintSet\\n\\n struct UintSet {\\n Set _inner;\\n }\\n\\n /**\\n * @dev Add a value to a set. O(1).\\n *\\n * Returns true if the value was added to the set, that is if it was not\\n * already present.\\n */\\n function add(UintSet storage set, uint256 value) internal returns (bool) {\\n return _add(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Removes a value from a set. O(1).\\n *\\n * Returns true if the value was removed from the set, that is if it was\\n * present.\\n */\\n function remove(UintSet storage set, uint256 value) internal returns (bool) {\\n return _remove(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns true if the value is in the set. O(1).\\n */\\n function contains(UintSet storage set, uint256 value) internal view returns (bool) {\\n return _contains(set._inner, bytes32(value));\\n }\\n\\n /**\\n * @dev Returns the number of values in the set. O(1).\\n */\\n function length(UintSet storage set) internal view returns (uint256) {\\n return _length(set._inner);\\n }\\n\\n /**\\n * @dev Returns the value stored at position `index` in the set. O(1).\\n *\\n * Note that there are no guarantees on the ordering of values inside the\\n * array, and it may change when more values are added or removed.\\n *\\n * Requirements:\\n *\\n * - `index` must be strictly less than {length}.\\n */\\n function at(UintSet storage set, uint256 index) internal view returns (uint256) {\\n return uint256(_at(set._inner, index));\\n }\\n\\n /**\\n * @dev Return the entire set in an array\\n *\\n * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed\\n * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that\\n * this function has an unbounded cost, and using it as part of a state-changing function may render the function\\n * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.\\n */\\n function values(UintSet storage set) internal view returns (uint256[] memory) {\\n bytes32[] memory store = _values(set._inner);\\n uint256[] memory result;\\n\\n assembly (\\\"memory-safe\\\") {\\n result := store\\n }\\n\\n return result;\\n }\\n}\\n\",\"keccak256\":\"0x9b161e97b8967d4bc0c08d25741889a30692cdda4b71910bf1b0e315f1962212\",\"license\":\"MIT\"},\"contracts/MultiWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/Math.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/structs/EnumerableSet.sol\\\";\\nimport \\\"./interfaces/IWrapper.sol\\\";\\n\\n/**\\n * @title MultiWrapper\\n * @notice \\u0421ontract allows for the management of multiple `IWrapper` contracts that can be used to wrap tokens in OffchainOracle's calculations.\\n * Wrappers are contracts that enable the conversion of tokens from one protocol to another.\\n * The contract provides functions to add and remove wrappers, as well as get information about the wrapped tokens and their conversion rates.\\n */\\ncontract MultiWrapper is Ownable {\\n using EnumerableSet for EnumerableSet.AddressSet;\\n\\n error WrapperAlreadyAdded();\\n error UnknownWrapper();\\n\\n event WrapperAdded(IWrapper connector);\\n event WrapperRemoved(IWrapper connector);\\n\\n EnumerableSet.AddressSet private _wrappers;\\n\\n /**\\n * @notice Adds the provided wrappers to the contract.\\n * @dev Initializes the MultiWrapper with an array of existing `IWrapper` contracts.\\n * @param existingWrappers Initial wrappers to be added.\\n */\\n constructor(IWrapper[] memory existingWrappers, address owner_) Ownable(owner_) {\\n unchecked {\\n for (uint256 i = 0; i < existingWrappers.length; i++) {\\n if (!_wrappers.add(address(existingWrappers[i]))) revert WrapperAlreadyAdded();\\n emit WrapperAdded(existingWrappers[i]);\\n }\\n }\\n }\\n\\n /**\\n * @notice Returns all wrappers currently added to the contract.\\n * @return allWrappers Array of wrapper contracts.\\n */\\n function wrappers() external view returns (IWrapper[] memory allWrappers) {\\n allWrappers = new IWrapper[](_wrappers.length());\\n unchecked {\\n for (uint256 i = 0; i < allWrappers.length; i++) {\\n allWrappers[i] = IWrapper(address(uint160(uint256(_wrappers._inner._values[i]))));\\n }\\n }\\n }\\n\\n /**\\n * @notice Adds a distinct wrapper contract that cannot be duplicated. Only the owner can add a wrapper.\\n * @param wrapper The address of the wrapper to be added.\\n */\\n function addWrapper(IWrapper wrapper) external onlyOwner {\\n if (!_wrappers.add(address(wrapper))) revert WrapperAlreadyAdded();\\n emit WrapperAdded(wrapper);\\n }\\n\\n /**\\n * @notice Removes a specified wrapper contract. Only the owner can remove a wrapper.\\n * @param wrapper The address of the wrapper to be removed.\\n */\\n function removeWrapper(IWrapper wrapper) external onlyOwner {\\n if (!_wrappers.remove(address(wrapper))) revert UnknownWrapper();\\n emit WrapperRemoved(wrapper);\\n }\\n\\n /**\\n * @notice Retrieves the wrapped tokens and their conversion rates for a given token.\\n * @dev Iterates over the wrappers to determine the wrapped tokens and their conversion rates.\\n * @param token The token for which to retrieve the wrapped tokens and conversion rates.\\n * @return wrappedTokens Tokens obtainable by wrapping the input token, including the input token and a rate of 1e18 for it.\\n * @return rates Conversion rates for the wrapped tokens.\\n */\\n function getWrappedTokens(IERC20 token) external view returns (IERC20[] memory wrappedTokens, uint256[] memory rates) {\\n unchecked {\\n IERC20[] memory memWrappedTokens = new IERC20[](20);\\n uint256[] memory memRates = new uint256[](20);\\n uint256 len = 0;\\n for (uint256 i = 0; i < _wrappers._inner._values.length; i++) {\\n try IWrapper(address(uint160(uint256(_wrappers._inner._values[i])))).wrap(token) returns (IERC20 wrappedToken, uint256 rate) {\\n memWrappedTokens[len] = wrappedToken;\\n memRates[len] = rate;\\n len += 1;\\n for (uint256 j = 0; j < _wrappers._inner._values.length; j++) {\\n if (i != j) {\\n try IWrapper(address(uint160(uint256(_wrappers._inner._values[j])))).wrap(wrappedToken) returns (IERC20 wrappedToken2, uint256 rate2) {\\n bool used = false;\\n for (uint256 k = 0; k < len; k++) {\\n if (wrappedToken2 == memWrappedTokens[k]) {\\n used = true;\\n break;\\n }\\n }\\n if (!used) {\\n memWrappedTokens[len] = wrappedToken2;\\n memRates[len] = Math.mulDiv(rate, rate2, 1e18);\\n len += 1;\\n }\\n } catch {\\n continue;\\n }\\n }\\n }\\n } catch {\\n continue;\\n }\\n }\\n wrappedTokens = new IERC20[](len + 1);\\n rates = new uint256[](len + 1);\\n for (uint256 i = 0; i < len; i++) {\\n wrappedTokens[i] = memWrappedTokens[i];\\n rates[i] = memRates[i];\\n }\\n wrappedTokens[len] = token;\\n rates[len] = 1e18;\\n }\\n }\\n}\\n\",\"keccak256\":\"0x5290231e2850f1db7dc579f40592168b19479c74bd3e46afd66ac646475ac6a4\",\"license\":\"MIT\"},\"contracts/interfaces/IWrapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.23;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IWrapper {\\n error NotSupportedToken();\\n error NotAddedMarket();\\n error NotRemovedMarket();\\n\\n function wrap(IERC20 token) external view returns (IERC20 wrappedToken, uint256 rate);\\n}\\n\",\"keccak256\":\"0x1d3cefe7c67b9f9750823be723dd0b00f9894ec4e0cd078eac321a2cff8f7da2\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x604060808152346200019457620010d1803803806200001e81620001db565b9283398101908281830312620001945780516001600160401b039190828111620001945781019280601f8501121562000194578351936020938511620001c5578460051b90848062000072818501620001db565b809881520192820101928311620001945790848094939201905b828210620001995750505001516001600160a01b039081811690819003620001945780156200017c57600080546001600160a01b03198116831782558316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a360005b83518110156200016d5762000115826200010d838762000201565b51166200022c565b156200015c57807f9471982c02bc8a0888c85288dcf07501f924fd3b336a516ff0747d9d28b516fd84846200014d6001958962000201565b51168851908152a101620000f2565b845163f105b92b60e01b8152600490fd5b8451610e1d9081620002b48239f35b8451631e4fbdf760e01b815260006004820152602490fd5b600080fd5b815193945091929091906001600160a01b0381168103620001945781528493929184019084016200008c565b634e487b7160e01b600052604160045260246000fd5b6040519190601f01601f191682016001600160401b03811183821017620001c557604052565b8051821015620002165760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b6000908082526002602052604082205415600014620002af576001918254680100000000000000008110156200029b578381018085558110156200028757908260409285835260208320015583549281526002602052205590565b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b509056fe6080604052600436101561001257600080fd5b60003560e01c806326b09c2914610885578063715018a6146107e95780638da5cb5b14610797578063cb991d9414610343578063e914d49414610286578063f2fde38b146101a35763f56d770a1461006957600080fd5b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57600180546100be6100a8826109cf565b916100b6604051938461098e565b8083526109cf565b9160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06020840194013685376000825b610145575b50604051926020840190602085525180915260408401949160005b82811061011c5785870386f35b835173ffffffffffffffffffffffffffffffffffffffff1687529581019592810192840161010f565b9180949284929451811015610193578073ffffffffffffffffffffffffffffffffffffffff6101748493610a36565b90549060031b1c166101868286610ad0565b52019092949391936100ef565b5091939290926100f4565b600080fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff80821680920361019e576101fc610ae4565b811561025557600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff811680910361019e576102de610ae4565b6102e781610c94565b156103195760207f6728138e7d63827e0674bb75cd86127580945caff9813b228967dadf0e5cb57491604051908152a1005b60046040517ff975261f000000000000000000000000000000000000000000000000000000008152fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff8116810361019e5760405161039e81610942565b601481526102809182366020840137604051926103ba84610942565b601484523660208501376000906000600154905b81811061051a57505060018201926103ee6103e8856109e7565b946109e7565b9460005b8481106104c957505050670de0b6b3a76400009173ffffffffffffffffffffffffffffffffffffffff610431921661042a8286610ad0565b5284610ad0565b526040519182916040830160408452815180915260206060850192019060005b81811061049a5750505082810360208401526020808351928381520192019060005b818110610481575050500390f35b8251845285945060209384019390920191600101610473565b825173ffffffffffffffffffffffffffffffffffffffff16845286955060209384019390920191600101610451565b8073ffffffffffffffffffffffffffffffffffffffff6104ee600193869a999a610ad0565b51166104fa828a610ad0565b526105058184610ad0565b516105108289610ad0565b52019594956103f2565b73ffffffffffffffffffffffffffffffffffffffff6040602461053f84999899610a36565b91905491835194859384927f023276f0000000000000000000000000000000000000000000000000000000008452828b16600485015260031b1c165afa80600092600092610773575b5061059c5750506001905b019493946103ce565b9094806105ab6001928a610ad0565b73ffffffffffffffffffffffffffffffffffffffff88169052826105cf828a610ad0565b52019460005b8481106105e757505050600190610593565b8084036105f9575b6001905b016105d5565b6024604073ffffffffffffffffffffffffffffffffffffffff61061b84610a36565b90549060031b1c168151928380927f023276f000000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff881660048301525afa9081600091600093610740575b506106865750506001906105f3565b8a6000805b8b81106106eb575b50156106a2575b5050506105ef565b600193999192849373ffffffffffffffffffffffffffffffffffffffff6106cc856106d695610ad0565b9116905286610b35565b6106e0828c610ad0565b520196908a8a61069a565b909161070c8273ffffffffffffffffffffffffffffffffffffffff92610ad0565b511673ffffffffffffffffffffffffffffffffffffffff84161461073557600101908c9161068b565b50508a60018d610693565b909250610765915060403d60401161076c575b61075d818361098e565b810190610a9c565b918c610677565b503d610753565b90925061078f915060403d60401161076c5761075d818361098e565b909189610588565b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57610820610ae4565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff811680910361019e576108dd610ae4565b6108e681610bdb565b156109185760207f9471982c02bc8a0888c85288dcf07501f924fd3b336a516ff0747d9d28b516fd91604051908152a1005b60046040517ff105b92b000000000000000000000000000000000000000000000000000000008152fd5b6102a0810190811067ffffffffffffffff82111761095f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761095f57604052565b67ffffffffffffffff811161095f5760051b60200190565b906109f1826109cf565b6109fe604051918261098e565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610a2c82946109cf565b0190602036910137565b600154811015610a6d5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919082604091031261019e57815173ffffffffffffffffffffffffffffffffffffffff8116810361019e5760209092015190565b8051821015610a6d5760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff600054163303610b0557565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610bca57670de0b6b3a76400009082821115610bb7577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b600081815260026020526040812054610c8f5760015468010000000000000000811015610c62579082610c4e610c1984600160409601600155610a36565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560015492815260026020522055600190565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b905090565b6000818152600260205260408120549091908015610de2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111610db55760015490838201918211610d8857818103610d54575b5050506001548015610d2757810190610d0682610a36565b909182549160031b1b19169055600155815260026020526040812055600190565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b610d72610d63610c1993610a36565b90549060031b1c928392610a36565b9055845260026020526040842055388080610cee565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b50509056fea26469706673582212207fc74d56fe038ff96862b26989cd2b3a3a5c358fe3d84fc58c45b081eb9d4dc164736f6c63430008170033", + "deployedBytecode": "0x6080604052600436101561001257600080fd5b60003560e01c806326b09c2914610885578063715018a6146107e95780638da5cb5b14610797578063cb991d9414610343578063e914d49414610286578063f2fde38b146101a35763f56d770a1461006957600080fd5b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57600180546100be6100a8826109cf565b916100b6604051938461098e565b8083526109cf565b9160207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe06020840194013685376000825b610145575b50604051926020840190602085525180915260408401949160005b82811061011c5785870386f35b835173ffffffffffffffffffffffffffffffffffffffff1687529581019592810192840161010f565b9180949284929451811015610193578073ffffffffffffffffffffffffffffffffffffffff6101748493610a36565b90549060031b1c166101868286610ad0565b52019092949391936100ef565b5091939290926100f4565b600080fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff80821680920361019e576101fc610ae4565b811561025557600054827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600055167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b60246040517f1e4fbdf700000000000000000000000000000000000000000000000000000000815260006004820152fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff811680910361019e576102de610ae4565b6102e781610c94565b156103195760207f6728138e7d63827e0674bb75cd86127580945caff9813b228967dadf0e5cb57491604051908152a1005b60046040517ff975261f000000000000000000000000000000000000000000000000000000008152fd5b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff8116810361019e5760405161039e81610942565b601481526102809182366020840137604051926103ba84610942565b601484523660208501376000906000600154905b81811061051a57505060018201926103ee6103e8856109e7565b946109e7565b9460005b8481106104c957505050670de0b6b3a76400009173ffffffffffffffffffffffffffffffffffffffff610431921661042a8286610ad0565b5284610ad0565b526040519182916040830160408452815180915260206060850192019060005b81811061049a5750505082810360208401526020808351928381520192019060005b818110610481575050500390f35b8251845285945060209384019390920191600101610473565b825173ffffffffffffffffffffffffffffffffffffffff16845286955060209384019390920191600101610451565b8073ffffffffffffffffffffffffffffffffffffffff6104ee600193869a999a610ad0565b51166104fa828a610ad0565b526105058184610ad0565b516105108289610ad0565b52019594956103f2565b73ffffffffffffffffffffffffffffffffffffffff6040602461053f84999899610a36565b91905491835194859384927f023276f0000000000000000000000000000000000000000000000000000000008452828b16600485015260031b1c165afa80600092600092610773575b5061059c5750506001905b019493946103ce565b9094806105ab6001928a610ad0565b73ffffffffffffffffffffffffffffffffffffffff88169052826105cf828a610ad0565b52019460005b8481106105e757505050600190610593565b8084036105f9575b6001905b016105d5565b6024604073ffffffffffffffffffffffffffffffffffffffff61061b84610a36565b90549060031b1c168151928380927f023276f000000000000000000000000000000000000000000000000000000000825273ffffffffffffffffffffffffffffffffffffffff881660048301525afa9081600091600093610740575b506106865750506001906105f3565b8a6000805b8b81106106eb575b50156106a2575b5050506105ef565b600193999192849373ffffffffffffffffffffffffffffffffffffffff6106cc856106d695610ad0565b9116905286610b35565b6106e0828c610ad0565b520196908a8a61069a565b909161070c8273ffffffffffffffffffffffffffffffffffffffff92610ad0565b511673ffffffffffffffffffffffffffffffffffffffff84161461073557600101908c9161068b565b50508a60018d610693565b909250610765915060403d60401161076c575b61075d818361098e565b810190610a9c565b918c610677565b503d610753565b90925061078f915060403d60401161076c5761075d818361098e565b909189610588565b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b3461019e5760007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e57610820610ae4565b600073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b3461019e5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261019e5760043573ffffffffffffffffffffffffffffffffffffffff811680910361019e576108dd610ae4565b6108e681610bdb565b156109185760207f9471982c02bc8a0888c85288dcf07501f924fd3b336a516ff0747d9d28b516fd91604051908152a1005b60046040517ff105b92b000000000000000000000000000000000000000000000000000000008152fd5b6102a0810190811067ffffffffffffffff82111761095f57604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761095f57604052565b67ffffffffffffffff811161095f5760051b60200190565b906109f1826109cf565b6109fe604051918261098e565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0610a2c82946109cf565b0190602036910137565b600154811015610a6d5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b919082604091031261019e57815173ffffffffffffffffffffffffffffffffffffffff8116810361019e5760209092015190565b8051821015610a6d5760209160051b010190565b73ffffffffffffffffffffffffffffffffffffffff600054163303610b0557565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214610bca57670de0b6b3a76400009082821115610bb7577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b600081815260026020526040812054610c8f5760015468010000000000000000811015610c62579082610c4e610c1984600160409601600155610a36565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b905560015492815260026020522055600190565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b905090565b6000818152600260205260408120549091908015610de2577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111610db55760015490838201918211610d8857818103610d54575b5050506001548015610d2757810190610d0682610a36565b909182549160031b1b19169055600155815260026020526040812055600190565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b610d72610d63610c1993610a36565b90549060031b1c928392610a36565b9055845260026020526040842055388080610cee565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b50509056fea26469706673582212207fc74d56fe038ff96862b26989cd2b3a3a5c358fe3d84fc58c45b081eb9d4dc164736f6c63430008170033", + "devdoc": { + "errors": { + "OwnableInvalidOwner(address)": [ + { + "details": "The owner is not a valid owner account. (eg. `address(0)`)" + } + ], + "OwnableUnauthorizedAccount(address)": [ + { + "details": "The caller account is not authorized to perform an operation." + } + ] + }, + "kind": "dev", + "methods": { + "addWrapper(address)": { + "params": { + "wrapper": "The address of the wrapper to be added." + } + }, + "constructor": { + "details": "Initializes the MultiWrapper with an array of existing `IWrapper` contracts.", + "params": { + "existingWrappers": "Initial wrappers to be added." + } + }, + "getWrappedTokens(address)": { + "details": "Iterates over the wrappers to determine the wrapped tokens and their conversion rates.", + "params": { + "token": "The token for which to retrieve the wrapped tokens and conversion rates." + }, + "returns": { + "rates": "Conversion rates for the wrapped tokens.", + "wrappedTokens": "Tokens obtainable by wrapping the input token, including the input token and a rate of 1e18 for it." + } + }, + "owner()": { + "details": "Returns the address of the current owner." + }, + "removeWrapper(address)": { + "params": { + "wrapper": "The address of the wrapper to be removed." + } + }, + "renounceOwnership()": { + "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner." + }, + "transferOwnership(address)": { + "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner." + }, + "wrappers()": { + "returns": { + "allWrappers": "Array of wrapper contracts." + } + } + }, + "title": "MultiWrapper", + "version": 1 + }, + "userdoc": { + "kind": "user", + "methods": { + "addWrapper(address)": { + "notice": "Adds a distinct wrapper contract that cannot be duplicated. Only the owner can add a wrapper." + }, + "constructor": { + "notice": "Adds the provided wrappers to the contract." + }, + "getWrappedTokens(address)": { + "notice": "Retrieves the wrapped tokens and their conversion rates for a given token." + }, + "removeWrapper(address)": { + "notice": "Removes a specified wrapper contract. Only the owner can remove a wrapper." + }, + "wrappers()": { + "notice": "Returns all wrappers currently added to the contract." + } + }, + "notice": "Сontract allows for the management of multiple `IWrapper` contracts that can be used to wrap tokens in OffchainOracle's calculations. Wrappers are contracts that enable the conversion of tokens from one protocol to another. The contract provides functions to add and remove wrappers, as well as get information about the wrapped tokens and their conversion rates.", + "version": 1 + }, + "storageLayout": { + "storage": [ + { + "astId": 61, + "contract": "contracts/MultiWrapper.sol:MultiWrapper", + "label": "_owner", + "offset": 0, + "slot": "0", + "type": "t_address" + }, + { + "astId": 6257, + "contract": "contracts/MultiWrapper.sol:MultiWrapper", + "label": "_wrappers", + "offset": 0, + "slot": "1", + "type": "t_struct(AddressSet)5897_storage" + } + ], + "types": { + "t_address": { + "encoding": "inplace", + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_bytes32)dyn_storage": { + "base": "t_bytes32", + "encoding": "dynamic_array", + "label": "bytes32[]", + "numberOfBytes": "32" + }, + "t_bytes32": { + "encoding": "inplace", + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_uint256)": { + "encoding": "mapping", + "key": "t_bytes32", + "label": "mapping(bytes32 => uint256)", + "numberOfBytes": "32", + "value": "t_uint256" + }, + "t_struct(AddressSet)5897_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.AddressSet", + "members": [ + { + "astId": 5896, + "contract": "contracts/MultiWrapper.sol:MultiWrapper", + "label": "_inner", + "offset": 0, + "slot": "0", + "type": "t_struct(Set)5582_storage" + } + ], + "numberOfBytes": "64" + }, + "t_struct(Set)5582_storage": { + "encoding": "inplace", + "label": "struct EnumerableSet.Set", + "members": [ + { + "astId": 5577, + "contract": "contracts/MultiWrapper.sol:MultiWrapper", + "label": "_values", + "offset": 0, + "slot": "0", + "type": "t_array(t_bytes32)dyn_storage" + }, + { + "astId": 5581, + "contract": "contracts/MultiWrapper.sol:MultiWrapper", + "label": "_positions", + "offset": 0, + "slot": "1", + "type": "t_mapping(t_bytes32,t_uint256)" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "encoding": "inplace", + "label": "uint256", + "numberOfBytes": "32" + } + } + } +} \ No newline at end of file From 63859272abb05a210a8b5dd9d3433bb1c96038a3 Mon Sep 17 00:00:00 2001 From: Denis Date: Sun, 8 Dec 2024 19:46:51 +0000 Subject: [PATCH 7/7] Deploy OffchainOracle on linea --- README.md | 4 +- deployments/linea/OffchainOracle.json | 812 ++++++++++++++++++++++++++ 2 files changed, 814 insertions(+), 2 deletions(-) create mode 100644 deployments/linea/OffchainOracle.json diff --git a/README.md b/README.md index 510b5e7..cec0912 100644 --- a/README.md +++ b/README.md @@ -666,7 +666,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator ### Linea -#### Oracle [STILL_NOT_DEPLOYED](https://lineascan.build/address/STILL_NOT_DEPLOYED) +#### Oracle [0x00000000000D6FFc74A8feb35aF5827bf57f6786](https://lineascan.build/address/0x00000000000D6FFc74A8feb35aF5827bf57f6786)
Supported DEXes @@ -691,7 +691,7 @@ If no direct liquidity pair exists between two tokens, the spot price aggregator
Prev oracle versions (legacy) - * ... + * Dec-08-2024 - [0x00000000000D6FFc74A8feb35aF5827bf57f6786](https://lineascan.build/address/0x00000000000D6FFc74A8feb35aF5827bf57f6786) - current implementation
diff --git a/deployments/linea/OffchainOracle.json b/deployments/linea/OffchainOracle.json new file mode 100644 index 0000000..699ae25 --- /dev/null +++ b/deployments/linea/OffchainOracle.json @@ -0,0 +1,812 @@ +{ + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "abi": [ + { + "inputs": [ + { + "internalType": "contract MultiWrapper", + "name": "_multiWrapper", + "type": "address" + }, + { + "internalType": "contract IOracle[]", + "name": "existingOracles", + "type": "address[]" + }, + { + "internalType": "enum OffchainOracle.OracleType[]", + "name": "oracleTypes", + "type": "uint8[]" + }, + { + "internalType": "contract IERC20[]", + "name": "existingConnectors", + "type": "address[]" + }, + { + "internalType": "contract IERC20", + "name": "wBase", + "type": "address" + }, + { + "internalType": "address", + "name": "owner_", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "ArraysLengthMismatch", + "type": "error" + }, + { + "inputs": [], + "name": "ConnectorAlreadyAdded", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidOracleTokenKind", + "type": "error" + }, + { + "inputs": [], + "name": "OracleAlreadyAdded", + "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": "SameTokens", + "type": "error" + }, + { + "inputs": [], + "name": "TooBigThreshold", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownConnector", + "type": "error" + }, + { + "inputs": [], + "name": "UnknownOracle", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IERC20", + "name": "connector", + "type": "address" + } + ], + "name": "ConnectorAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IERC20", + "name": "connector", + "type": "address" + } + ], + "name": "ConnectorRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract MultiWrapper", + "name": "multiWrapper", + "type": "address" + } + ], + "name": "MultiWrapperUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum OffchainOracle.OracleType", + "name": "oracleType", + "type": "uint8" + } + ], + "name": "OracleAdded", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "enum OffchainOracle.OracleType", + "name": "oracleType", + "type": "uint8" + } + ], + "name": "OracleRemoved", + "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": [ + { + "internalType": "contract IERC20", + "name": "connector", + "type": "address" + } + ], + "name": "addConnector", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "enum OffchainOracle.OracleType", + "name": "oracleKind", + "type": "uint8" + } + ], + "name": "addOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "connectors", + "outputs": [ + { + "internalType": "contract IERC20[]", + "name": "allConnectors", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useWrappers", + "type": "bool" + } + ], + "name": "getRate", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useSrcWrappers", + "type": "bool" + } + ], + "name": "getRateToEth", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useSrcWrappers", + "type": "bool" + }, + { + "internalType": "contract IERC20[]", + "name": "customConnectors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRateToEthWithCustomConnectors", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useSrcWrappers", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRateToEthWithThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useWrappers", + "type": "bool" + }, + { + "internalType": "contract IERC20[]", + "name": "customConnectors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRateWithCustomConnectors", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useWrappers", + "type": "bool" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRateWithThreshold", + "outputs": [ + { + "internalType": "uint256", + "name": "weightedRate", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useSrcWrappers", + "type": "bool" + }, + { + "internalType": "contract IERC20[]", + "name": "customConnectors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRatesAndWeightsToEthWithCustomConnectors", + "outputs": [ + { + "internalType": "uint256", + "name": "wrappedPrice", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maxOracleWeight", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "internalType": "struct OraclePrices.OraclePrice[]", + "name": "oraclePrices", + "type": "tuple[]" + } + ], + "internalType": "struct OraclePrices.Data", + "name": "ratesAndWeights", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "srcToken", + "type": "address" + }, + { + "internalType": "contract IERC20", + "name": "dstToken", + "type": "address" + }, + { + "internalType": "bool", + "name": "useWrappers", + "type": "bool" + }, + { + "internalType": "contract IERC20[]", + "name": "customConnectors", + "type": "address[]" + }, + { + "internalType": "uint256", + "name": "thresholdFilter", + "type": "uint256" + } + ], + "name": "getRatesAndWeightsWithCustomConnectors", + "outputs": [ + { + "internalType": "uint256", + "name": "wrappedPrice", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "maxOracleWeight", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "size", + "type": "uint256" + }, + { + "components": [ + { + "internalType": "uint256", + "name": "rate", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "weight", + "type": "uint256" + } + ], + "internalType": "struct OraclePrices.OraclePrice[]", + "name": "oraclePrices", + "type": "tuple[]" + } + ], + "internalType": "struct OraclePrices.Data", + "name": "ratesAndWeights", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "multiWrapper", + "outputs": [ + { + "internalType": "contract MultiWrapper", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracles", + "outputs": [ + { + "internalType": "contract IOracle[]", + "name": "allOracles", + "type": "address[]" + }, + { + "internalType": "enum OffchainOracle.OracleType[]", + "name": "oracleTypes", + "type": "uint8[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "connector", + "type": "address" + } + ], + "name": "removeConnector", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IOracle", + "name": "oracle", + "type": "address" + }, + { + "internalType": "enum OffchainOracle.OracleType", + "name": "oracleKind", + "type": "uint8" + } + ], + "name": "removeOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract MultiWrapper", + "name": "_multiWrapper", + "type": "address" + } + ], + "name": "setMultiWrapper", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "receipt": { + "to": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "from": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "3157075", + "logsBloom": "0x00210000040000000000000000000000400000000000000000800000000000000400000000000000000000000004000008000000008000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000200200000000000040000000000000000002001000000000000000000000000000000002000000000000002000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "logs": [ + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x", + "index": 0, + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x00000000000000000000000056e44874f624ebde6efcc783efd685f0fbdc6dcf" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x0000000000000000000000003ce81621e674db129033548cbb9ff31aedcc1bf6", + "index": 1, + "topics": [ + "0x1030152fe2062b574a830e6b9f13c65995990df31e4dc708d142533bb3ad0f52" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x00000000000000000000000003aa019f3b78110e030c34e9fa98047a1f62859a0000000000000000000000000000000000000000000000000000000000000000", + "index": 2, + "topics": [ + "0x5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f622" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x0000000000000000000000007e72b1e0e6dd6f71e3b98f768e814613c2097e610000000000000000000000000000000000000000000000000000000000000000", + "index": 3, + "topics": [ + "0x5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f622" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x0000000000000000000000002a45d538f460ddbeea3a899b0674da3dfe318faa0000000000000000000000000000000000000000000000000000000000000000", + "index": 4, + "topics": [ + "0x5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f622" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x000000000000000000000000ffffffffffffffffffffffffffffffffffffffff", + "index": 5, + "topics": [ + "0xff88af5d962d47fd25d87755e8267a029fad5a91740c67d0dade2bdbe5268a1d" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + }, + { + "_type": "log", + "address": "0x00000000000D6FFc74A8feb35aF5827bf57f6786", + "blockHash": "0x6e9a4cf9b4102c1218091b32e1cf29eb6f4561c9e8174f8cd1fab932184dc09b", + "blockNumber": 13064821, + "data": "0x000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f", + "index": 6, + "topics": [ + "0xff88af5d962d47fd25d87755e8267a029fad5a91740c67d0dade2bdbe5268a1d" + ], + "transactionHash": "0xc1181551f5033cb001e802648b085092c93c20912bc2bd3e8a2e3d4fbb171383", + "transactionIndex": 0 + } + ], + "blockNumber": 13064821, + "cumulativeGasUsed": "3157075", + "status": 1 + }, + "args": [ + "0x3Ce81621e674Db129033548CbB9FF31AEDCc1BF6", + [ + "0x03aA019F3B78110e030c34e9fA98047A1f62859A", + "0x7e72b1e0e6DD6F71e3b98f768E814613C2097e61", + "0x2A45d538f460DDBEeA3a899b0674dA3DFE318faa" + ], + [ + 0, + 0, + 0 + ], + [ + "0xFFfFfFffFFfffFFfFFfFFFFFffFFFffffFfFFFfF", + "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f" + ], + "0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f", + "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF" + ], + "numDeployments": 1, + "bytecode": "0x604060a08152346200044e57620037bb803803806200001e81620004a2565b92833981019060c0818303126200044e5780516001600160a01b039190828116908190036200044e576020828101516001600160401b0394919291908581116200044e5784019386601f860112156200044e57845194620000896200008387620004de565b620004a2565b95858088838152019160051b830101918983116200044e578601905b8282106200048857505050878101518681116200044e5781019587601f880112156200044e57865196620000dd6200008389620004de565b9786808a838152019160051b830101918a83116200044e578701905b8282106200046e5750505060608201519081116200044e5781019680601f890112156200044e578751620001316200008382620004de565b9886808b848152019260051b8201019283116200044e5786809101915b83831062000453575050505060a06200016a60808301620004f6565b910151928284168094036200044e5783156200043657600080546001600160a01b0319808216871783558b51929690929186167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08880a38751895103620004275750817f1030152fe2062b574a830e6b9f13c65995990df31e4dc708d142533bb3ad0f5292879260075416176007558a51908152a1825b85518110156200038257620002216200021b82896200050b565b62000536565b60039081811015620002b357620002d8576200024b8462000243848a6200050b565b51166200055a565b15620002c7575b836200025f83896200050b565b511690620002726200021b848b6200050b565b908b51928352811015620002b3578a827f5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f6229289600196950152a10162000201565b634e487b7160e01b86526021600452602486fd5b8951633295224f60e11b8152600490fd5b620002e86200021b838a6200050b565b81811015620002b357600103620003285762000312846200030a848a6200050b565b5116620005e1565b62000252578951633295224f60e11b8152600490fd5b620003386200021b838a6200050b565b81811015620002b35760020362000371576200035a8462000243848a6200050b565b15620002c75762000312846200030a848a6200050b565b89516398420d9360e01b8152600490fd5b5083889288855b81518110156200040457620003ac83620003a483856200050b565b511662000659565b15620003f357807fff88af5d962d47fd25d87755e8267a029fad5a91740c67d0dade2bdbe5268a1d8585620003e4600195876200050b565b51168951908152a10162000389565b8551630a606b6760e41b8152600490fd5b8585608052516130ee9081620006cd823960805181818161116d01526115920152f35b6307e11acb60e51b8152600490fd5b8851631e4fbdf760e01b815260006004820152602490fd5b600080fd5b81906200046084620004f6565b81520191019086906200014e565b815160038110156200044e578152908701908701620000f9565b815185811681036200044e578152908601908601620000a5565b6040519190601f01601f191682016001600160401b03811183821017620004c857604052565b634e487b7160e01b600052604160045260246000fd5b6001600160401b038111620004c85760051b60200190565b51906001600160a01b03821682036200044e57565b8051821015620005205760209160051b010190565b634e487b7160e01b600052603260045260246000fd5b516003811015620005445790565b634e487b7160e01b600052602160045260246000fd5b6000908082526002602052604082205415600014620005dd57600191825468010000000000000000811015620005c957838101808555811015620005b557908260409285835260208320015583549281526002602052205590565b634e487b7160e01b82526032600452602482fd5b634e487b7160e01b82526041600452602482fd5b5090565b600081815260046020526040812054620006545760035468010000000000000000811015620005c9576001810180600355811015620005b5577fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0182905560035491815260046020526040902055600190565b905090565b600081815260066020526040812054620006545760055468010000000000000000811015620005c9576001810180600555811015620005b5577f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0018290556005549181526006602052604090205560019056fe60406080815260048036101561001457600080fd5b600091823560e01c80630550679014610c4c5780631a6c6a9814610b925780632857373a14610aba57806365050a68146109945780636744d6c71461092c5780636f9293b91461090d578063715018a61461086e57806378159aae1461080f5780637de4fd10146107b5578063802431fb146107525780638da5cb5b146107015780639d4d7b1c146105a7578063aa16d4c0146104ed578063ade8b048146104c7578063b77910dc14610474578063cc04e00114610443578063d062651814610393578063f0b92e40146101db5763f2fde38b146100f157600080fd5b346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75781359173ffffffffffffffffffffffffffffffffffffffff918284168094036101d35761014b6126ae565b83156101a45750508254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b8280fd5b5091903461038f576101ec36610fff565b916101f56126ae565b600383101561036357826102865761022273ffffffffffffffffffffffffffffffffffffffff8316612bcb565b1561025f57506102597f7a7f56716fe703fb190529c336e57df71ab88188ba47e8d786bac684b61ab9a693945b5192839283611bee565b0390a180f35b84517f9444a6da000000000000000000000000000000000000000000000000000000008152fd5b600183036102de576102ad73ffffffffffffffffffffffffffffffffffffffff8316612c92565b1561025f57506102597f7a7f56716fe703fb190529c336e57df71ab88188ba47e8d786bac684b61ab9a6939461024f565b6002830361033c5773ffffffffffffffffffffffffffffffffffffffff821661030681612bcb565b15610314576102ad90612c92565b5084517f9444a6da000000000000000000000000000000000000000000000000000000008152fd5b84517f98420d93000000000000000000000000000000000000000000000000000000008152fd5b8360216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5080fd5b5090346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d757359073ffffffffffffffffffffffffffffffffffffffff82168092036101d7577f1030152fe2062b574a830e6b9f13c65995990df31e4dc708d142533bb3ad0f52916020916104116126ae565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000600754161760075551908152a180f35b83823461038f576104709061046361045a36610f71565b93929092611f74565b9290915192839283610ec8565b0390f35b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b83823461038f576020906104e66104dd36610e4a565b92919091611c28565b9051908152f35b50346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75773ffffffffffffffffffffffffffffffffffffffff61053a610c6c565b6105426126ae565b169161054d83612f06565b1561058057507fff88af5d962d47fd25d87755e8267a029fad5a91740c67d0dade2bdbe5268a1d9160209151908152a180f35b90517fa606b670000000000000000000000000000000000000000000000000000000008152fd5b5091903461038f576105b836610fff565b916105c16126ae565b6003831015610363578261064b576105ee73ffffffffffffffffffffffffffffffffffffffff8316612e30565b1561062457506102597f5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f62293945192839283611bee565b84517f652a449e000000000000000000000000000000000000000000000000000000008152fd5b600183036106a35761067273ffffffffffffffffffffffffffffffffffffffff8316612eb4565b1561062457506102597f5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f622939461024f565b6002830361033c5773ffffffffffffffffffffffffffffffffffffffff82166106cb81612e30565b156106d95761067290612eb4565b5084517f652a449e000000000000000000000000000000000000000000000000000000008152fd5b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b83823461038f5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e6602092610791610c6c565b610799610c94565b6107a1610cb7565b918551936107ae85610d58565b8452611bac565b83823461038f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e66020926107f3610c6c565b6107fb610cc6565b9084519261080884610d58565b8352611c1d565b83823461038f5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e660209261084e610c6c565b90610857610cc6565b84519161086383610d58565b825260443592611c28565b833461090a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261090a576108a56126ae565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b83823461038f576020906104e661092336610f71565b93929092611bcb565b83823461038f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e660209261096b610c6c565b90610974610c94565b61097c610cb7565b9085519261098984610d58565b835260643593611bcb565b50823461090a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261090a5760058054916109d2836118c7565b92815b8451811015610a635781811015610a375760019084845273ffffffffffffffffffffffffffffffffffffffff817f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0015416610a308288611116565b52016109d5565b6024836032897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8551602080825286518183018190528291828a0191818a0191885b828110610a8d57505050500390f35b835173ffffffffffffffffffffffffffffffffffffffff1685528695509381019392810192600101610a7e565b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5790610af36119c7565b9091835193849381850191855280518092526060850191602080920190845b818110610b6557505050848203818601528080855193848152019401925b828110610b3f57505050500390f35b9193839550908082610b55600194839751610f35565b0195019101918594939192610b30565b825173ffffffffffffffffffffffffffffffffffffffff1685528897509383019391830191600101610b12565b50346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75773ffffffffffffffffffffffffffffffffffffffff610bdf610c6c565b610be76126ae565b1691610bf283612aa2565b15610c2557507f6825b26a0827e9c2ceca01d6289ce4a40e629dc074ec48ea4727d1afbff359f59160209151908152a180f35b90517f30bd159a000000000000000000000000000000000000000000000000000000008152fd5b83823461038f5761047090610463610c6336610e4a565b92919091611545565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610c8f57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff82168203610c8f57565b604435908115158203610c8f57565b602435908115158203610c8f57565b6060810190811067ffffffffffffffff821117610cf157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610cf157604052565b60e0810190811067ffffffffffffffff821117610cf157604052565b6020810190811067ffffffffffffffff821117610cf157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610cf157604052565b67ffffffffffffffff8111610cf15760051b60200190565b9080601f83011215610c8f576020908235610de781610db5565b93610df56040519586610d74565b81855260208086019260051b820101928311610c8f57602001905b828210610e1e575050505090565b813573ffffffffffffffffffffffffffffffffffffffff81168103610c8f578152908301908301610e10565b60807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610c8f5760043573ffffffffffffffffffffffffffffffffffffffff81168103610c8f57916024358015158103610c8f57916044359067ffffffffffffffff8211610c8f57610ec191600401610dcd565b9060643590565b91604091835260206040818501528060c0604060a0870194805182890152838101516060890152015195606060808201528651809552019401926000905b838210610f1557505050505090565b845180518752830151868401529485019493820193600190910190610f06565b906003821015610f425752565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830112610c8f5773ffffffffffffffffffffffffffffffffffffffff916004358381168103610c8f57926024359081168103610c8f57916044358015158103610c8f57916064359067ffffffffffffffff8211610c8f57610ff891600401610dcd565b9060843590565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610c8f5760043573ffffffffffffffffffffffffffffffffffffffff81168103610c8f57906024356003811015610c8f5790565b6040519061106682610cd5565b606060408360008152600060208201520152565b8181029291811591840414171561108d57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9060028110156110cd5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190820180921161108d57565b8051156110cd5760200190565b80518210156110cd5760209160051b010190565b92909161114460009360009561113e611059565b50612220565b94906040519061115382610d20565b82825273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660208301526040519261119f84610d20565b604051808160206003549283815201600385527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92855b81811061152c5750506111eb92500382610d74565b8452604051948580966020600154918281520190600185527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690855b8181106115135750505061124d9291611241910388610d74565b6020860196875261241e565b9482518060011b90808204600214901517156114e65761129b91611283611289611296936112838b515160208d015151906110fc565b9061107a565b91885151905151906110fc565b6124be565b92815b83518110156114db57825b600281106112ba575060010161129e565b73ffffffffffffffffffffffffffffffffffffffff6112d98387611116565b511673ffffffffffffffffffffffffffffffffffffffff6112fa83866110bc565b5116146114c257835b6002811061131457506001016112a9565b909a939597869a95979a995b61132a83836110bc565b51518b10156114ae578c9392919073ffffffffffffffffffffffffffffffffffffffff6113618d61135b86866110bc565b51611116565b51169773ffffffffffffffffffffffffffffffffffffffff611383868d611116565b511689148015611485575b611474579d61139f8e918b926110bc565b515181101561145e579d858e9f8f906114508f8f8f908f918f928f9361144a948f61140c8c6114058373ffffffffffffffffffffffffffffffffffffffff60019f8f96826113f5819961135b896113fd966110bc565b51169c611116565b511696611116565b51936110bc565b5116916040519561141c87610d3c565b8652602086015260408501526060840152670de0b6b3a7640000608084015260a083015260c08201526124f0565b90612630565b5001919f9061139f916110bc565b5096509091929b9a996001905b01999a95611320565b9c9b9097506001919293945061146b565b5073ffffffffffffffffffffffffffffffffffffffff6114a587896110bc565b5116891461138e565b99509795939a906001909a97959a01611303565b5095505050509490506114d6929350611116565b519190565b505050509394505050565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b825484528a945060209093019260019283019201611227565b84548352600194850194869450602090930192016111d6565b9391909293600093611555611059565b50606486101561189d5761156891612220565b94906040519061157782610d20565b6000825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166020830152604051926115c484610d20565b60405180816020600354928381520160036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9260005b81811061188457505061161292500382610d74565b845260405194858096602060015491828152019060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69060005b81811061186b5750505061166a9291611241910388610d74565b9482518060011b908082046002149015171561108d576116a091611283611289611296936112838b515160208d015151906110fc565b9260005b83518110156114db5760005b600281106116c157506001016116a4565b73ffffffffffffffffffffffffffffffffffffffff6116e08387611116565b511673ffffffffffffffffffffffffffffffffffffffff61170183866110bc565b5116146114c25760005b6002811061171c57506001016116b0565b909a93959760009a95979a995b61173383836110bc565b51518b1015611857578c9392919073ffffffffffffffffffffffffffffffffffffffff6117648d61135b86866110bc565b51169773ffffffffffffffffffffffffffffffffffffffff611786868d611116565b51168914801561182e575b61181d579d6117a38e916000926110bc565b5151811015611807579d858e9f8f906117f98f8f8f908f918f928f9361144a948f61140c8c6114058373ffffffffffffffffffffffffffffffffffffffff60019f8f96826113f5819961135b896113fd966110bc565b5001919f906117a3916110bc565b5096509091929b9a996001905b01999a95611729565b9c9b90975060019192939450611814565b5073ffffffffffffffffffffffffffffffffffffffff61184e87896110bc565b51168914611791565b99509795939a906001909a97959a0161170b565b825484528a945060209093019260019283019201611650565b84548352600194850194869450602090930192016115fd565b60046040517f215a716b000000000000000000000000000000000000000000000000000000008152fd5b906118d182610db5565b6118de6040519182610d74565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061190c8294610db5565b0190602036910137565b6005548110156110cd5760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b6001548110156110cd5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b6003548110156110cd5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0190600090565b6003821015610f425752565b60018054916003916003546119dd8186016118c7565b936119e885516118c7565b958360005b828110611b4e5750509160005b818110611a83575050611a0c826118c7565b95611a16836118c7565b9560005b848110611a2957505050505050565b73ffffffffffffffffffffffffffffffffffffffff611a488284611116565b5116611a54828b611116565b52611a5f8184611116565b519084821015610f4257611a7d8792611a78838c611116565b6119bb565b01611a1a565b849084918460005273ffffffffffffffffffffffffffffffffffffffff9283837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0154169388806000905b611b12575b50505085821015610f425787938a858414611b09575b91611a7891611afc82611b039695611116565b528c611116565b016119fa565b97850197611ae9565b868d8051831015611b4757611b28838692611116565b511614611b3757810181611ace565b9350505050600290388881611ad3565b5050611ad3565b8160005273ffffffffffffffffffffffffffffffffffffffff817fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6015416611b96828a611116565b526000611ba3828b611116565b520184906119ed565b90611bb8939291611c6d565b81611bc757611bc791506126ff565b5090565b91611bd893918593611f74565b819291611be957611bc792506127de565b505090565b916020611c1b92949373ffffffffffffffffffffffffffffffffffffffff60408201961681520190610f35565b565b90611bb8929161112a565b918391611bd893611545565b8115611c3e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91909392600094611c7c611059565b5073ffffffffffffffffffffffffffffffffffffffff811673ffffffffffffffffffffffffffffffffffffffff851614611f4a5782611cd2611cca611cda95611cc36119c7565b5097612220565b929093612220565b94909361241e565b93611d0b611296611d03611cf1865188519061107a565b61128389515160208b015151906110fc565b88519061107a565b936000985b84518a1015611f3e5760005b8251811015611f335773ffffffffffffffffffffffffffffffffffffffff611d448c88611116565b511673ffffffffffffffffffffffffffffffffffffffff611d658386611116565b511614611efe5760005b60028110611d805750600101611d1c565b60009b929a9b99919394959697985b611d9982826110bc565b51518b1015611ee85773ffffffffffffffffffffffffffffffffffffffff611dc58c61135b85856110bc565b51169b73ffffffffffffffffffffffffffffffffffffffff611de7868c611116565b51168d148015611ebf575b611eb45760005b8451811015611ea45780611e9d8f61144a8f918f908f8f8f8f8f908f611e5f82611e5860019f9573ffffffffffffffffffffffffffffffffffffffff611e508282611e48611e679b829a611116565b51169e611116565b511699611116565b5195611116565b511693611116565b5192604090815196611e7888610d3c565b875260208701528501526060840152608083015260a0820152600060c08201526124f0565b5001611df9565b509a6001919c505b01999a611d8f565b9a6001919c50611eac565b5073ffffffffffffffffffffffffffffffffffffffff611edf8789611116565b51168d14611df2565b9897969594939199506001909b9a929b01611d6f565b945050509350611f2f9450611f289296611f1791611116565b51670de0b6b3a76400000292611116565b5190611c34565b9190565b509860010198611d10565b98505050505092915050565b60046040517f3445e17c000000000000000000000000000000000000000000000000000000008152fd5b9493929092600095611f84611059565b5073ffffffffffffffffffffffffffffffffffffffff851673ffffffffffffffffffffffffffffffffffffffff821614611f4a57606482101561189d5783611fe3611fdb611feb96611fd46119c7565b5094612220565b929097612220565b95909461241e565b9461201c6112966120146120028a5189519061107a565b6112838a515160208c015151906110fc565b85519061107a565b946000995b88518b10156122135760005b82518110156122085773ffffffffffffffffffffffffffffffffffffffff6120558d8c611116565b511673ffffffffffffffffffffffffffffffffffffffff6120768386611116565b5116146121ed5760005b60028110612091575060010161202d565b9a9b91986000969193949596995b6120a98d836110bc565b51518b10156121d9579c8c9d73ffffffffffffffffffffffffffffffffffffffff6120e48e9f8e9f9c9d9e6113f5849161135b8b948a6110bc565b51168a1480156121b0575b6121a15760005b845181101561218e57808f8e61144a8f928f938f948f958f968f978f8f9973ffffffffffffffffffffffffffffffffffffffff611e5f8260019f856121879f611e50612153988761214b611e58968295611116565b51169f611116565b519260409081519761216489610d3c565b885260208801528601526060850152608084015260a083015260c08201526124f0565b50016120f6565b509a9998509c9b9a6001905b019961209f565b9a9998509c9b9a60019061219a565b5073ffffffffffffffffffffffffffffffffffffffff6121d08789611116565b51168a146120ef565b929c9b6001919a5096959493919601612080565b955050509450611f2f9550611f17915096611f289397611116565b509960010199612021565b9950505050505092915050565b919061228d576040519161223383610d20565b600183526020368185013773ffffffffffffffffffffffffffffffffffffffff61225c84611109565b911690526040519061226d82610d20565b6001825260203681840137670de0b6b3a764000061228a83611109565b52565b73ffffffffffffffffffffffffffffffffffffffff809281600754166040519283927fcb991d9400000000000000000000000000000000000000000000000000000000845216600483015281602460009384935afa93841561241157819282956122f9575b5050509190565b91945091503d8085833e61230d8183610d74565b81016040828203126101d357815167ffffffffffffffff908181116123ed5783019282601f850112156123ed5783519360209461234981610db5565b966123576040519889610d74565b818852868089019260051b8401019286841161240d578701915b8383106123f15750505050838101519182116123ed570181601f820112156123e95780519061239f82610db5565b966123ad6040519889610d74565b828852848089019360051b83010193841161090a57508301905b8282106123da57505050503880806122f2565b815181529083019083016123c7565b8580fd5b8680fd5b82518281168103612409578152918701918701612371565b8b80fd5b8a80fd5b50604051903d90823e3d90fd5b906040916040519261242f84610d20565b60005b8181106124b057505082604051806005549081815260208091019160056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0916000905b82821061249957505050509061249381602094930382610d74565b81520152565b835485529384019360019384019390910190612478565b606085820152602001612432565b906124c7611059565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b9060409182519261250084610d20565b6000938481528460208201529373ffffffffffffffffffffffffffffffffffffffff828185511691608481602088015116826060890151169260a0890151169460c0890151855196879586947f3d549b3200000000000000000000000000000000000000000000000000000000865260048601526024850152604484015260648301525afa9384839284966125f9575b5061259d575b5050505050565b83949596506080906125cb939451926125b584610cd5565b86820151845260208401520151848201526128c5565b92836125f15750905b51916125df83610d20565b82526020820152903880808080612596565b9050906125d4565b85809297508194503d8311612629575b6126138183610d74565b810103126101d757602082519201519438612590565b503d612609565b906020810190815161264457505050600090565b612665604084015191602085019283519161265f8383611116565b52611116565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461108d5760010190525190805182116126a6575b5050600190565b52388061269f565b73ffffffffffffffffffffffffffffffffffffffff6000541633036126cf57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b600091600091826020916020810151916040820183815152815b84811061273b575050505050508161272d57565b918161273891611c34565b91565b612746818351611116565b518681019081516064818181020414901517156127b157600186511517156127b15751815161277491612de4565b90612784575b5050600101612719565b61278e919a612e16565b999061279b575b8061277a565b600191986127aa9151906110fc565b9790612795565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b90916000926000809360208082015192604083018481515260005b85811061280e57505050505050508161272d57565b612819818351611116565b518481019081516064908181029181830414901517156128985761283e8a895161107a565b1161288e5751815161284f91612de4565b90612861575b50506001905b016127f9565b61286b919b612e16565b9a90612878575b80612855565b600191996128879151906110fc565b9890612872565b505060019061285b565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b80519081158015612a96575b8015612a8a575b612a83576020810191825190818111612a78575b505080516040820190815190818111612a6d575b50508251815190818111612a62575b5050600092825192612925825185029485611c34565b9151809203612a0c575b50508051820261293f8382611c34565b8251146129d957505182156129c457670de0b6b3a76400005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82840982840280821091030310156129bc576129a392156129a657670de0b6b3a764000091612ffe565b90565b6ec097ce7bc90715b34b9f100000000091612ffe565b505050600090565b6ec097ce7bc90715b34b9f1000000000612958565b9150506129a3916000146129f657670de0b6b3a764000090611c34565b6ec097ce7bc90715b34b9f100000000090611c34565b919350915051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818309818302808210910303670de0b6b3a764000011156129bc57612a5891612f58565b600191388061292f565b82528352388061290f565b825282523880612900565b8352815238806128ec565b5050600090565b506040810151156128d8565b506020810151156128d1565b6000818152600660205260408120549091908015611be9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908181018181116127b1576005549083820191821161289857818103612b62575b5050506005548015612b3557810190612b1482611916565b909182549160031b1b19169055600555815260066020526040812055600190565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b612bb5612b71612b8093611916565b90549060031b1c928392611916565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055845260066020526040842055388080612afc565b6000818152600260205260408120549091908015611be9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908181018181116127b1576001549083820191821161289857818103612c5e575b5050506001548015612b3557810190612c3d8261194d565b909182549160031b1b19169055600155815260026020526040812055600190565b612c7c612c6d612b809361194d565b90549060031b1c92839261194d565b9055845260026020526040842055388080612c25565b600090808252600490816020526040832054801515600014612dde577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111612db25760035490838201918211612d8657818103612d53575b5050506003548015612d2757810190612d0882611984565b909182549160031b1b1916905560035582526020526040812055600190565b6024856031867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b612d71612d62612b8093611984565b90549060031b1c928392611984565b90558552836020526040852055388080612cf0565b6024876011887f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b6024866011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b50505090565b91908215612e0c57612df98184029384611c34565b03612e045760019190565b600091508190565b5060019150600090565b9190820191808310612e29575060019190565b6000925090565b600081815260026020526040812054612eaf5760015468010000000000000000811015612e82579082612e6e612b808460016040960160015561194d565b905560015492815260026020522055600190565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b905090565b600081815260046020526040812054612eaf5760035468010000000000000000811015612e82579082612ef2612b8084600160409601600355611984565b905560035492815260046020522055600190565b600081815260066020526040812054612eaf5760055468010000000000000000811015612e82579082612f44612b8084600160409601600555611916565b905560055492815260066020522055600190565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214612fed57670de0b6b3a76400009082821115612fda577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b91818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818509938380861095039480860395146130ab5784831115613092579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b82634e487b71600052156003026011186020526024601cfd5b5050906129a39250611c3456fea2646970667358221220d87b9ac30d5ec6a6778532b119f885275e5f3c8be9f6c8403b6338bf8d82e73364736f6c63430008170033", + "deployedBytecode": "0x60406080815260048036101561001457600080fd5b600091823560e01c80630550679014610c4c5780631a6c6a9814610b925780632857373a14610aba57806365050a68146109945780636744d6c71461092c5780636f9293b91461090d578063715018a61461086e57806378159aae1461080f5780637de4fd10146107b5578063802431fb146107525780638da5cb5b146107015780639d4d7b1c146105a7578063aa16d4c0146104ed578063ade8b048146104c7578063b77910dc14610474578063cc04e00114610443578063d062651814610393578063f0b92e40146101db5763f2fde38b146100f157600080fd5b346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75781359173ffffffffffffffffffffffffffffffffffffffff918284168094036101d35761014b6126ae565b83156101a45750508254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b908460249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b8480fd5b8280fd5b5091903461038f576101ec36610fff565b916101f56126ae565b600383101561036357826102865761022273ffffffffffffffffffffffffffffffffffffffff8316612bcb565b1561025f57506102597f7a7f56716fe703fb190529c336e57df71ab88188ba47e8d786bac684b61ab9a693945b5192839283611bee565b0390a180f35b84517f9444a6da000000000000000000000000000000000000000000000000000000008152fd5b600183036102de576102ad73ffffffffffffffffffffffffffffffffffffffff8316612c92565b1561025f57506102597f7a7f56716fe703fb190529c336e57df71ab88188ba47e8d786bac684b61ab9a6939461024f565b6002830361033c5773ffffffffffffffffffffffffffffffffffffffff821661030681612bcb565b15610314576102ad90612c92565b5084517f9444a6da000000000000000000000000000000000000000000000000000000008152fd5b84517f98420d93000000000000000000000000000000000000000000000000000000008152fd5b8360216024927f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b5080fd5b5090346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d757359073ffffffffffffffffffffffffffffffffffffffff82168092036101d7577f1030152fe2062b574a830e6b9f13c65995990df31e4dc708d142533bb3ad0f52916020916104116126ae565b817fffffffffffffffffffffffff0000000000000000000000000000000000000000600754161760075551908152a180f35b83823461038f576104709061046361045a36610f71565b93929092611f74565b9290915192839283610ec8565b0390f35b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5760209073ffffffffffffffffffffffffffffffffffffffff600754169051908152f35b83823461038f576020906104e66104dd36610e4a565b92919091611c28565b9051908152f35b50346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75773ffffffffffffffffffffffffffffffffffffffff61053a610c6c565b6105426126ae565b169161054d83612f06565b1561058057507fff88af5d962d47fd25d87755e8267a029fad5a91740c67d0dade2bdbe5268a1d9160209151908152a180f35b90517fa606b670000000000000000000000000000000000000000000000000000000008152fd5b5091903461038f576105b836610fff565b916105c16126ae565b6003831015610363578261064b576105ee73ffffffffffffffffffffffffffffffffffffffff8316612e30565b1561062457506102597f5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f62293945192839283611bee565b84517f652a449e000000000000000000000000000000000000000000000000000000008152fd5b600183036106a35761067273ffffffffffffffffffffffffffffffffffffffff8316612eb4565b1561062457506102597f5874b2072ff37562df54063dd700c59d45f311bdf6f9cabb5a15f0ffb2e9f622939461024f565b6002830361033c5773ffffffffffffffffffffffffffffffffffffffff82166106cb81612e30565b156106d95761067290612eb4565b5084517f652a449e000000000000000000000000000000000000000000000000000000008152fd5b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5773ffffffffffffffffffffffffffffffffffffffff60209254169051908152f35b83823461038f5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e6602092610791610c6c565b610799610c94565b6107a1610cb7565b918551936107ae85610d58565b8452611bac565b83823461038f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e66020926107f3610c6c565b6107fb610cc6565b9084519261080884610d58565b8352611c1d565b83823461038f5760607ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e660209261084e610c6c565b90610857610cc6565b84519161086383610d58565b825260443592611c28565b833461090a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261090a576108a56126ae565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b80fd5b83823461038f576020906104e661092336610f71565b93929092611bcb565b83823461038f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f576104e660209261096b610c6c565b90610974610c94565b61097c610cb7565b9085519261098984610d58565b835260643593611bcb565b50823461090a57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261090a5760058054916109d2836118c7565b92815b8451811015610a635781811015610a375760019084845273ffffffffffffffffffffffffffffffffffffffff817f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0015416610a308288611116565b52016109d5565b6024836032897f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b8551602080825286518183018190528291828a0191818a0191885b828110610a8d57505050500390f35b835173ffffffffffffffffffffffffffffffffffffffff1685528695509381019392810192600101610a7e565b83823461038f57817ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261038f5790610af36119c7565b9091835193849381850191855280518092526060850191602080920190845b818110610b6557505050848203818601528080855193848152019401925b828110610b3f57505050500390f35b9193839550908082610b55600194839751610f35565b0195019101918594939192610b30565b825173ffffffffffffffffffffffffffffffffffffffff1685528897509383019391830191600101610b12565b50346101d75760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126101d75773ffffffffffffffffffffffffffffffffffffffff610bdf610c6c565b610be76126ae565b1691610bf283612aa2565b15610c2557507f6825b26a0827e9c2ceca01d6289ce4a40e629dc074ec48ea4727d1afbff359f59160209151908152a180f35b90517f30bd159a000000000000000000000000000000000000000000000000000000008152fd5b83823461038f5761047090610463610c6336610e4a565b92919091611545565b6004359073ffffffffffffffffffffffffffffffffffffffff82168203610c8f57565b600080fd5b6024359073ffffffffffffffffffffffffffffffffffffffff82168203610c8f57565b604435908115158203610c8f57565b602435908115158203610c8f57565b6060810190811067ffffffffffffffff821117610cf157604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040810190811067ffffffffffffffff821117610cf157604052565b60e0810190811067ffffffffffffffff821117610cf157604052565b6020810190811067ffffffffffffffff821117610cf157604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff821117610cf157604052565b67ffffffffffffffff8111610cf15760051b60200190565b9080601f83011215610c8f576020908235610de781610db5565b93610df56040519586610d74565b81855260208086019260051b820101928311610c8f57602001905b828210610e1e575050505090565b813573ffffffffffffffffffffffffffffffffffffffff81168103610c8f578152908301908301610e10565b60807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc820112610c8f5760043573ffffffffffffffffffffffffffffffffffffffff81168103610c8f57916024358015158103610c8f57916044359067ffffffffffffffff8211610c8f57610ec191600401610dcd565b9060643590565b91604091835260206040818501528060c0604060a0870194805182890152838101516060890152015195606060808201528651809552019401926000905b838210610f1557505050505090565b845180518752830151868401529485019493820193600190910190610f06565b906003821015610f425752565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b9060a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc830112610c8f5773ffffffffffffffffffffffffffffffffffffffff916004358381168103610c8f57926024359081168103610c8f57916044358015158103610c8f57916064359067ffffffffffffffff8211610c8f57610ff891600401610dcd565b9060843590565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc6040910112610c8f5760043573ffffffffffffffffffffffffffffffffffffffff81168103610c8f57906024356003811015610c8f5790565b6040519061106682610cd5565b606060408360008152600060208201520152565b8181029291811591840414171561108d57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b9060028110156110cd5760051b0190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9190820180921161108d57565b8051156110cd5760200190565b80518210156110cd5760209160051b010190565b92909161114460009360009561113e611059565b50612220565b94906040519061115382610d20565b82825273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001660208301526040519261119f84610d20565b604051808160206003549283815201600385527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b92855b81811061152c5750506111eb92500382610d74565b8452604051948580966020600154918281520190600185527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf690855b8181106115135750505061124d9291611241910388610d74565b6020860196875261241e565b9482518060011b90808204600214901517156114e65761129b91611283611289611296936112838b515160208d015151906110fc565b9061107a565b91885151905151906110fc565b6124be565b92815b83518110156114db57825b600281106112ba575060010161129e565b73ffffffffffffffffffffffffffffffffffffffff6112d98387611116565b511673ffffffffffffffffffffffffffffffffffffffff6112fa83866110bc565b5116146114c257835b6002811061131457506001016112a9565b909a939597869a95979a995b61132a83836110bc565b51518b10156114ae578c9392919073ffffffffffffffffffffffffffffffffffffffff6113618d61135b86866110bc565b51611116565b51169773ffffffffffffffffffffffffffffffffffffffff611383868d611116565b511689148015611485575b611474579d61139f8e918b926110bc565b515181101561145e579d858e9f8f906114508f8f8f908f918f928f9361144a948f61140c8c6114058373ffffffffffffffffffffffffffffffffffffffff60019f8f96826113f5819961135b896113fd966110bc565b51169c611116565b511696611116565b51936110bc565b5116916040519561141c87610d3c565b8652602086015260408501526060840152670de0b6b3a7640000608084015260a083015260c08201526124f0565b90612630565b5001919f9061139f916110bc565b5096509091929b9a996001905b01999a95611320565b9c9b9097506001919293945061146b565b5073ffffffffffffffffffffffffffffffffffffffff6114a587896110bc565b5116891461138e565b99509795939a906001909a97959a01611303565b5095505050509490506114d6929350611116565b519190565b505050509394505050565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b825484528a945060209093019260019283019201611227565b84548352600194850194869450602090930192016111d6565b9391909293600093611555611059565b50606486101561189d5761156891612220565b94906040519061157782610d20565b6000825273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166020830152604051926115c484610d20565b60405180816020600354928381520160036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b9260005b81811061188457505061161292500382610d74565b845260405194858096602060015491828152019060016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf69060005b81811061186b5750505061166a9291611241910388610d74565b9482518060011b908082046002149015171561108d576116a091611283611289611296936112838b515160208d015151906110fc565b9260005b83518110156114db5760005b600281106116c157506001016116a4565b73ffffffffffffffffffffffffffffffffffffffff6116e08387611116565b511673ffffffffffffffffffffffffffffffffffffffff61170183866110bc565b5116146114c25760005b6002811061171c57506001016116b0565b909a93959760009a95979a995b61173383836110bc565b51518b1015611857578c9392919073ffffffffffffffffffffffffffffffffffffffff6117648d61135b86866110bc565b51169773ffffffffffffffffffffffffffffffffffffffff611786868d611116565b51168914801561182e575b61181d579d6117a38e916000926110bc565b5151811015611807579d858e9f8f906117f98f8f8f908f918f928f9361144a948f61140c8c6114058373ffffffffffffffffffffffffffffffffffffffff60019f8f96826113f5819961135b896113fd966110bc565b5001919f906117a3916110bc565b5096509091929b9a996001905b01999a95611729565b9c9b90975060019192939450611814565b5073ffffffffffffffffffffffffffffffffffffffff61184e87896110bc565b51168914611791565b99509795939a906001909a97959a0161170b565b825484528a945060209093019260019283019201611650565b84548352600194850194869450602090930192016115fd565b60046040517f215a716b000000000000000000000000000000000000000000000000000000008152fd5b906118d182610db5565b6118de6040519182610d74565b8281527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe061190c8294610db5565b0190602036910137565b6005548110156110cd5760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b6001548110156110cd5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b6003548110156110cd5760036000527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0190600090565b6003821015610f425752565b60018054916003916003546119dd8186016118c7565b936119e885516118c7565b958360005b828110611b4e5750509160005b818110611a83575050611a0c826118c7565b95611a16836118c7565b9560005b848110611a2957505050505050565b73ffffffffffffffffffffffffffffffffffffffff611a488284611116565b5116611a54828b611116565b52611a5f8184611116565b519084821015610f4257611a7d8792611a78838c611116565b6119bb565b01611a1a565b849084918460005273ffffffffffffffffffffffffffffffffffffffff9283837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b0154169388806000905b611b12575b50505085821015610f425787938a858414611b09575b91611a7891611afc82611b039695611116565b528c611116565b016119fa565b97850197611ae9565b868d8051831015611b4757611b28838692611116565b511614611b3757810181611ace565b9350505050600290388881611ad3565b5050611ad3565b8160005273ffffffffffffffffffffffffffffffffffffffff817fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6015416611b96828a611116565b526000611ba3828b611116565b520184906119ed565b90611bb8939291611c6d565b81611bc757611bc791506126ff565b5090565b91611bd893918593611f74565b819291611be957611bc792506127de565b505090565b916020611c1b92949373ffffffffffffffffffffffffffffffffffffffff60408201961681520190610f35565b565b90611bb8929161112a565b918391611bd893611545565b8115611c3e570490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b91909392600094611c7c611059565b5073ffffffffffffffffffffffffffffffffffffffff811673ffffffffffffffffffffffffffffffffffffffff851614611f4a5782611cd2611cca611cda95611cc36119c7565b5097612220565b929093612220565b94909361241e565b93611d0b611296611d03611cf1865188519061107a565b61128389515160208b015151906110fc565b88519061107a565b936000985b84518a1015611f3e5760005b8251811015611f335773ffffffffffffffffffffffffffffffffffffffff611d448c88611116565b511673ffffffffffffffffffffffffffffffffffffffff611d658386611116565b511614611efe5760005b60028110611d805750600101611d1c565b60009b929a9b99919394959697985b611d9982826110bc565b51518b1015611ee85773ffffffffffffffffffffffffffffffffffffffff611dc58c61135b85856110bc565b51169b73ffffffffffffffffffffffffffffffffffffffff611de7868c611116565b51168d148015611ebf575b611eb45760005b8451811015611ea45780611e9d8f61144a8f918f908f8f8f8f8f908f611e5f82611e5860019f9573ffffffffffffffffffffffffffffffffffffffff611e508282611e48611e679b829a611116565b51169e611116565b511699611116565b5195611116565b511693611116565b5192604090815196611e7888610d3c565b875260208701528501526060840152608083015260a0820152600060c08201526124f0565b5001611df9565b509a6001919c505b01999a611d8f565b9a6001919c50611eac565b5073ffffffffffffffffffffffffffffffffffffffff611edf8789611116565b51168d14611df2565b9897969594939199506001909b9a929b01611d6f565b945050509350611f2f9450611f289296611f1791611116565b51670de0b6b3a76400000292611116565b5190611c34565b9190565b509860010198611d10565b98505050505092915050565b60046040517f3445e17c000000000000000000000000000000000000000000000000000000008152fd5b9493929092600095611f84611059565b5073ffffffffffffffffffffffffffffffffffffffff851673ffffffffffffffffffffffffffffffffffffffff821614611f4a57606482101561189d5783611fe3611fdb611feb96611fd46119c7565b5094612220565b929097612220565b95909461241e565b9461201c6112966120146120028a5189519061107a565b6112838a515160208c015151906110fc565b85519061107a565b946000995b88518b10156122135760005b82518110156122085773ffffffffffffffffffffffffffffffffffffffff6120558d8c611116565b511673ffffffffffffffffffffffffffffffffffffffff6120768386611116565b5116146121ed5760005b60028110612091575060010161202d565b9a9b91986000969193949596995b6120a98d836110bc565b51518b10156121d9579c8c9d73ffffffffffffffffffffffffffffffffffffffff6120e48e9f8e9f9c9d9e6113f5849161135b8b948a6110bc565b51168a1480156121b0575b6121a15760005b845181101561218e57808f8e61144a8f928f938f948f958f968f978f8f9973ffffffffffffffffffffffffffffffffffffffff611e5f8260019f856121879f611e50612153988761214b611e58968295611116565b51169f611116565b519260409081519761216489610d3c565b885260208801528601526060850152608084015260a083015260c08201526124f0565b50016120f6565b509a9998509c9b9a6001905b019961209f565b9a9998509c9b9a60019061219a565b5073ffffffffffffffffffffffffffffffffffffffff6121d08789611116565b51168a146120ef565b929c9b6001919a5096959493919601612080565b955050509450611f2f9550611f17915096611f289397611116565b509960010199612021565b9950505050505092915050565b919061228d576040519161223383610d20565b600183526020368185013773ffffffffffffffffffffffffffffffffffffffff61225c84611109565b911690526040519061226d82610d20565b6001825260203681840137670de0b6b3a764000061228a83611109565b52565b73ffffffffffffffffffffffffffffffffffffffff809281600754166040519283927fcb991d9400000000000000000000000000000000000000000000000000000000845216600483015281602460009384935afa93841561241157819282956122f9575b5050509190565b91945091503d8085833e61230d8183610d74565b81016040828203126101d357815167ffffffffffffffff908181116123ed5783019282601f850112156123ed5783519360209461234981610db5565b966123576040519889610d74565b818852868089019260051b8401019286841161240d578701915b8383106123f15750505050838101519182116123ed570181601f820112156123e95780519061239f82610db5565b966123ad6040519889610d74565b828852848089019360051b83010193841161090a57508301905b8282106123da57505050503880806122f2565b815181529083019083016123c7565b8580fd5b8680fd5b82518281168103612409578152918701918701612371565b8b80fd5b8a80fd5b50604051903d90823e3d90fd5b906040916040519261242f84610d20565b60005b8181106124b057505082604051806005549081815260208091019160056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0916000905b82821061249957505050509061249381602094930382610d74565b81520152565b835485529384019360019384019390910190612478565b606085820152602001612432565b906124c7611059565b506040519160808160061b84010160405260008352600060208401526060830180604085015252565b9060409182519261250084610d20565b6000938481528460208201529373ffffffffffffffffffffffffffffffffffffffff828185511691608481602088015116826060890151169260a0890151169460c0890151855196879586947f3d549b3200000000000000000000000000000000000000000000000000000000865260048601526024850152604484015260648301525afa9384839284966125f9575b5061259d575b5050505050565b83949596506080906125cb939451926125b584610cd5565b86820151845260208401520151848201526128c5565b92836125f15750905b51916125df83610d20565b82526020820152903880808080612596565b9050906125d4565b85809297508194503d8311612629575b6126138183610d74565b810103126101d757602082519201519438612590565b503d612609565b906020810190815161264457505050600090565b612665604084015191602085019283519161265f8383611116565b52611116565b5080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461108d5760010190525190805182116126a6575b5050600190565b52388061269f565b73ffffffffffffffffffffffffffffffffffffffff6000541633036126cf57565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b600091600091826020916020810151916040820183815152815b84811061273b575050505050508161272d57565b918161273891611c34565b91565b612746818351611116565b518681019081516064818181020414901517156127b157600186511517156127b15751815161277491612de4565b90612784575b5050600101612719565b61278e919a612e16565b999061279b575b8061277a565b600191986127aa9151906110fc565b9790612795565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b90916000926000809360208082015192604083018481515260005b85811061280e57505050505050508161272d57565b612819818351611116565b518481019081516064908181029181830414901517156128985761283e8a895161107a565b1161288e5751815161284f91612de4565b90612861575b50506001905b016127f9565b61286b919b612e16565b9a90612878575b80612855565b600191996128879151906110fc565b9890612872565b505060019061285b565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b80519081158015612a96575b8015612a8a575b612a83576020810191825190818111612a78575b505080516040820190815190818111612a6d575b50508251815190818111612a62575b5050600092825192612925825185029485611c34565b9151809203612a0c575b50508051820261293f8382611c34565b8251146129d957505182156129c457670de0b6b3a76400005b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82840982840280821091030310156129bc576129a392156129a657670de0b6b3a764000091612ffe565b90565b6ec097ce7bc90715b34b9f100000000091612ffe565b505050600090565b6ec097ce7bc90715b34b9f1000000000612958565b9150506129a3916000146129f657670de0b6b3a764000090611c34565b6ec097ce7bc90715b34b9f100000000090611c34565b919350915051907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818309818302808210910303670de0b6b3a764000011156129bc57612a5891612f58565b600191388061292f565b82528352388061290f565b825282523880612900565b8352815238806128ec565b5050600090565b506040810151156128d8565b506020810151156128d1565b6000818152600660205260408120549091908015611be9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908181018181116127b1576005549083820191821161289857818103612b62575b5050506005548015612b3557810190612b1482611916565b909182549160031b1b19169055600555815260066020526040812055600190565b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526031600452fd5b612bb5612b71612b8093611916565b90549060031b1c928392611916565b81939154907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9060031b92831b921b19161790565b9055845260066020526040842055388080612afc565b6000818152600260205260408120549091908015611be9577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908181018181116127b1576001549083820191821161289857818103612c5e575b5050506001548015612b3557810190612c3d8261194d565b909182549160031b1b19169055600155815260026020526040812055600190565b612c7c612c6d612b809361194d565b90549060031b1c92839261194d565b9055845260026020526040842055388080612c25565b600090808252600490816020526040832054801515600014612dde577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90818101818111612db25760035490838201918211612d8657818103612d53575b5050506003548015612d2757810190612d0882611984565b909182549160031b1b1916905560035582526020526040812055600190565b6024856031867f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b612d71612d62612b8093611984565b90549060031b1c928392611984565b90558552836020526040852055388080612cf0565b6024876011887f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b6024866011877f4e487b7100000000000000000000000000000000000000000000000000000000835252fd5b50505090565b91908215612e0c57612df98184029384611c34565b03612e045760019190565b600091508190565b5060019150600090565b9190820191808310612e29575060019190565b6000925090565b600081815260026020526040812054612eaf5760015468010000000000000000811015612e82579082612e6e612b808460016040960160015561194d565b905560015492815260026020522055600190565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b905090565b600081815260046020526040812054612eaf5760035468010000000000000000811015612e82579082612ef2612b8084600160409601600355611984565b905560035492815260046020522055600190565b600081815260066020526040812054612eaf5760055468010000000000000000811015612e82579082612f44612b8084600160409601600555611916565b905560055492815260066020522055600190565b90808202907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81840990828083109203918083039214612fed57670de0b6b3a76400009082821115612fda577faccb18165bd6fe31ae1cf318dc5b51eee0e1ba569b88cd74c1773b91fac10669940990828211900360ee1b910360121c170290565b634e487b7160005260116020526024601cfd5b5050670de0b6b3a764000091500490565b91818302917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff818509938380861095039480860395146130ab5784831115613092579082910981600003821680920460028082600302188083028203028083028203028083028203028083028203028083028203028092029003029360018380600003040190848311900302920304170290565b82634e487b71600052156003026011186020526024601cfd5b5050906129a39250611c3456fea2646970667358221220d87b9ac30d5ec6a6778532b119f885275e5f3c8be9f6c8403b6338bf8d82e73364736f6c63430008170033" +} \ No newline at end of file