diff --git a/contracts/deploy/mainnet/112_upgrade_woeth.js b/contracts/deploy/mainnet/112_upgrade_woeth.js deleted file mode 100644 index ec80567530..0000000000 --- a/contracts/deploy/mainnet/112_upgrade_woeth.js +++ /dev/null @@ -1,42 +0,0 @@ -const { deploymentWithGovernanceProposal } = require("../../utils/deploy"); - -module.exports = deploymentWithGovernanceProposal( - { - deployName: "112_upgrade_woeth", - forceDeploy: false, - //forceSkip: true, - reduceQueueTime: true, - deployerIsProposer: false, - // proposalId: - }, - async ({ deployWithConfirmation, ethers }) => { - const cOETHProxy = await ethers.getContract("OETHProxy"); - const cWOETHProxy = await ethers.getContract("WOETHProxy"); - - const dWOETHImpl = await deployWithConfirmation("WOETH", [ - cOETHProxy.address, - ]); - - const cWOETH = await ethers.getContractAt("WOETH", cWOETHProxy.address); - - // Governance Actions - // ---------------- - return { - name: `Upgrade WOETH to a new implementation.`, - actions: [ - // 1. Upgrade WOETH - { - contract: cWOETHProxy, - signature: "upgradeTo(address)", - args: [dWOETHImpl.address], - }, - // 2. Run the second initializer - { - contract: cWOETH, - signature: "initialize2()", - args: [], - }, - ], - }; - } -); diff --git a/contracts/deploy/mainnet/134_vault_woeth_upgrade.js b/contracts/deploy/mainnet/134_vault_woeth_upgrade.js new file mode 100644 index 0000000000..850b9d8267 --- /dev/null +++ b/contracts/deploy/mainnet/134_vault_woeth_upgrade.js @@ -0,0 +1,83 @@ +const { + deploymentWithGovernanceProposal, + deployWithConfirmation, +} = require("../../utils/deploy"); +const { parseUnits } = require("ethers/lib/utils.js"); +const addresses = require("../../utils/addresses"); + +module.exports = deploymentWithGovernanceProposal( + { + deployName: "134_vault_woeth_upgrade", + proposalId: + "49172722703369984622112561793798089212723378488321724356488307408039828925801", + }, + async ({ ethers }) => { + const cOETHVaultProxy = await ethers.getContract("OETHVaultProxy"); + const cwOETHProxy = await ethers.getContract("WOETHProxy"); + const cOETHProxy = await ethers.getContract("OETHProxy"); + + const cOETHVault = await ethers.getContractAt( + "IVault", + cOETHVaultProxy.address + ); + + // Deploy new implementation + const dOETHVaultCore = await deployWithConfirmation("OETHVaultCore", [ + addresses.mainnet.WETH, + ]); + const dOETHVaultAdmin = await deployWithConfirmation("OETHVaultAdmin", [ + addresses.mainnet.WETH, + ]); + + const dwOETH = await deployWithConfirmation("WOETH", [ + cOETHProxy.address, // OETH token + ]); + + const cwOETH = await ethers.getContractAt("WOETH", cwOETHProxy.address); + + // ---------------- + // Governance Actions + // ---------------- + return { + name: "Add rate limiting to Origin Vault and upgrade WOETH", + actions: [ + // 1. Upgrade Vault proxy to VaultCore + { + contract: cOETHVaultProxy, + signature: "upgradeTo(address)", + args: [dOETHVaultCore.address], + }, + // 2. Set the VaultAdmin + { + contract: cOETHVault, + signature: "setAdminImpl(address)", + args: [dOETHVaultAdmin.address], + }, + // 3. Default to a short dripper, since currently we are running zero dripper. + { + contract: cOETHVault, + signature: "setDripDuration(uint256)", + args: [4 * 60 * 60], + }, + // 4. Default to a 20% APR rebase rate cap + { + contract: cOETHVault, + signature: "setRebaseRateMax(uint256)", + args: [parseUnits("20", 18)], + }, + { + // 5. Upgrade wOETHb proxy + contract: cwOETHProxy, + signature: "upgradeTo(address)", + args: [dwOETH.address], + }, + // 6. Run the second initializer + { + contract: cwOETH, + signature: "initialize2()", + args: [], + }, + ], + }; + } +); diff --git a/contracts/deployments/mainnet/.migrations.json b/contracts/deployments/mainnet/.migrations.json index 5a2a079150..ce0ab97d5a 100644 --- a/contracts/deployments/mainnet/.migrations.json +++ b/contracts/deployments/mainnet/.migrations.json @@ -30,5 +30,6 @@ "130_update_votemarket_addresses": 1744018070, "131_ousd_usdc_curve_amo": 1744236000, "133_omnichain_adapter": 1744785062, + "134_vault_woeth_upgrade": 1745347199, "135_vault_wousd_upgrade": 1745403755 } \ No newline at end of file diff --git a/contracts/deployments/mainnet/OETHVaultAdmin.json b/contracts/deployments/mainnet/OETHVaultAdmin.json index 8a1d3ece55..624b144675 100644 --- a/contracts/deployments/mainnet/OETHVaultAdmin.json +++ b/contracts/deployments/mainnet/OETHVaultAdmin.json @@ -1,5 +1,5 @@ { - "address": "0xF026af250757F411512B99eAE2C2244F436fE837", + "address": "0x60C91B985Ac7117765b859d718576b2eD8940d74", "abi": [ { "inputs": [ @@ -107,6 +107,19 @@ "name": "CapitalUnpaused", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "dripDuration", + "type": "uint256" + } + ], + "name": "DripDurationChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -235,6 +248,19 @@ "name": "RebasePaused", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "rebaseRatePerSecond", + "type": "uint256" + } + ], + "name": "RebasePerSecondMaxChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -719,6 +745,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "dripDuration", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "dripper", @@ -777,6 +816,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "lastRebase", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxSupplyDiff", @@ -882,6 +934,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "rebasePerSecondMax", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebasePerSecondTarget", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "rebaseThreshold", @@ -991,6 +1069,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_dripDuration", + "type": "uint256" + } + ], + "name": "setDripDuration", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1074,6 +1165,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "yearlyApr", + "type": "uint256" + } + ], + "name": "setRebaseRateMax", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [ { @@ -1519,30 +1623,30 @@ "type": "function" } ], - "transactionHash": "0x285ad5f48a48225a1fecb1f1cf4373d66d345224c44a9e4762d4eb0f1628302c", + "transactionHash": "0xff263f55d1f481fa9682790706f08806fb2c346918089ca678b742fe549127fa", "receipt": { "to": null, - "from": "0x3Ba227D87c2A7aB89EAaCEFbeD9bfa0D15Ad249A", - "contractAddress": "0xF026af250757F411512B99eAE2C2244F436fE837", - "transactionIndex": 16, - "gasUsed": "3299969", + "from": "0xFD9E6005187F448957a0972a7d0C0A6dA2911236", + "contractAddress": "0x60C91B985Ac7117765b859d718576b2eD8940d74", + "transactionIndex": 39, + "gasUsed": "3477957", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xb125d321d24844fefed508afabbb2e3f5de2659c67f50640daa7d4b10ea1324e", - "transactionHash": "0x285ad5f48a48225a1fecb1f1cf4373d66d345224c44a9e4762d4eb0f1628302c", + "blockHash": "0x765bbd3f9ef05c89f95d04b3e2ac75f81ae95848454b852f1e548a2e321c1470", + "transactionHash": "0xff263f55d1f481fa9682790706f08806fb2c346918089ca678b742fe549127fa", "logs": [], - "blockNumber": 22186440, - "cumulativeGasUsed": "7124447", + "blockNumber": 22325608, + "cumulativeGasUsed": "8522773", "status": 1, "byzantium": true }, "args": [ "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" ], - "numDeployments": 7, - "solcInputHash": "ea5866f942a7edcd1f4e3b18c390601e", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"AllocateThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"AssetAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"AssetDefaultStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetSupported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"DripperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyDiffChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"NetOusdMintForStrategyThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"OusdMetaStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"PriceProviderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebasePaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"RebaseThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebaseUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"RedeemFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"StrategistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyAddedToMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyRemovedFromMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapAllowedUndervalueChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapSlippageChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAssetAmount\",\"type\":\"uint256\"}],\"name\":\"Swapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"SwapperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"TrusteeAddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"TrusteeFeeBpsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"VaultBufferUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newDelay\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_claimable\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newClaimable\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_queued\",\"type\":\"uint256\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_yield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"YieldDistribution\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"strategyAddr\",\"type\":\"address\"}],\"name\":\"addStrategyToMintWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminImplPosition\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowedSwapUndervalue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"approveStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetDefaultStrategies\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"autoAllocateThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"cacheDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"capitalPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyToAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"depositToStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isMintWhitelistedStrategy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyDiff\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintForStrategyThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintedForStrategy\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oUSD\",\"outputs\":[{\"internalType\":\"contract OUSD\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ousdMetaStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseCapital\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseRebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebaseThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"removeAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"removeStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"strategyAddr\",\"type\":\"address\"}],\"name\":\"removeStrategyFromMintWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImpl\",\"type\":\"address\"}],\"name\":\"setAdminImpl\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"setAssetDefaultStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setAutoAllocateThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"setDripper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"setMaxSupplyDiff\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setNetOusdMintForStrategyThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_allowedOracleSlippageBps\",\"type\":\"uint16\"}],\"name\":\"setOracleSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"setOusdMetaStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"setPriceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setRebaseThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"setRedeemFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setStrategistAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_basis\",\"type\":\"uint16\"}],\"name\":\"setSwapAllowedUndervalue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_swapperAddr\",\"type\":\"address\"}],\"name\":\"setSwapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setTrusteeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"setTrusteeFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"setVaultBuffer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_delay\",\"type\":\"uint256\"}],\"name\":\"setWithdrawalClaimDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"strategies\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_deprecated\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_unitConversion\",\"type\":\"uint8\"}],\"name\":\"supportAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minToAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"swapCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"toAssetAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"swapper_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseCapital\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseRebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultBuffer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAllFromStrategies\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyAddr\",\"type\":\"address\"}],\"name\":\"withdrawAllFromStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyFromAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawFromStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalClaimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalQueueMetadata\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimable\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimed\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"nextWithdrawalIndex\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalRequests\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"withdrawer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"},{\"internalType\":\"uint40\",\"name\":\"timestamp\",\"type\":\"uint40\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{\"addStrategyToMintWhitelist(address)\":{\"params\":{\"strategyAddr\":\"Strategy address\"}},\"allowedSwapUndervalue()\":{\"returns\":{\"value\":\"Percentage in basis points.\"}},\"approveStrategy(address)\":{\"params\":{\"_addr\":\"Address of the strategy to add\"}},\"cacheDecimals(address)\":{\"params\":{\"_asset\":\"Address of asset token\"}},\"depositToStrategy(address,address[],uint256[])\":{\"params\":{\"_amounts\":\"Array of amounts of each corresponding asset to deposit.\",\"_assets\":\"Array of asset address that will be deposited into the strategy.\",\"_strategyToAddress\":\"Address of the Strategy to deposit assets into.\"}},\"removeAsset(address)\":{\"params\":{\"_asset\":\"Address of asset\"}},\"removeStrategy(address)\":{\"params\":{\"_addr\":\"Address of the strategy to remove\"}},\"removeStrategyFromMintWhitelist(address)\":{\"params\":{\"strategyAddr\":\"Strategy address\"}},\"setAdminImpl(address)\":{\"params\":{\"newImpl\":\"address of the implementation\"}},\"setAssetDefaultStrategy(address,address)\":{\"params\":{\"_asset\":\"Address of the asset\",\"_strategy\":\"Address of the Strategy\"}},\"setAutoAllocateThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setDripper(address)\":{\"params\":{\"_dripper\":\"Address of the Dripper contract.\"}},\"setNetOusdMintForStrategyThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setOracleSlippage(address,uint16)\":{\"params\":{\"_allowedOracleSlippageBps\":\"allowed slippage from Oracle in basis points. eg 20 = 0.2%. Max 10%.\",\"_asset\":\"Address of the asset token.\"}},\"setOusdMetaStrategy(address)\":{\"params\":{\"_ousdMetaStrategy\":\"Address of OToken metapool strategy\"}},\"setPriceProvider(address)\":{\"params\":{\"_priceProvider\":\"Address of price provider\"}},\"setRebaseThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setRedeemFeeBps(uint256)\":{\"params\":{\"_redeemFeeBps\":\"Basis point fee to be charged\"}},\"setStrategistAddr(address)\":{\"params\":{\"_address\":\"Address of Strategist\"}},\"setSwapAllowedUndervalue(uint16)\":{\"params\":{\"_basis\":\"Percentage in basis points. eg 100 == 1%\"}},\"setSwapper(address)\":{\"params\":{\"_swapperAddr\":\"Address of the Swapper contract that implements the ISwapper interface.\"}},\"setVaultBuffer(uint256)\":{\"params\":{\"_vaultBuffer\":\"Percentage using 18 decimals. 100% = 1e18.\"}},\"setWithdrawalClaimDelay(uint256)\":{\"params\":{\"_delay\":\"Delay period (should be between 10 mins to 7 days). Set to 0 to disable async withdrawals\"}},\"supportAsset(address,uint8)\":{\"params\":{\"_asset\":\"Address of asset\"}},\"swapCollateral(address,address,uint256,uint256,bytes)\":{\"params\":{\"_data\":\"implementation specific data. eg 1Inch swap data\",\"_fromAsset\":\"The token address of the asset being sold by the vault.\",\"_fromAssetAmount\":\"The amount of assets being sold by the vault.\",\"_minToAssetAmount\":\"The minimum amount of assets to be purchased.\",\"_toAsset\":\"The token address of the asset being purchased by the vault.\"},\"returns\":{\"toAssetAmount\":\"The amount of toAssets that was received from the swap\"}},\"transferGovernance(address)\":{\"params\":{\"_newGovernor\":\"Address of the new Governor\"}},\"transferToken(address,uint256)\":{\"params\":{\"_amount\":\"Amount of the asset to transfer\",\"_asset\":\"Address for the asset\"}},\"withdrawAllFromStrategy(address)\":{\"params\":{\"_strategyAddr\":\"Strategy address.\"}},\"withdrawFromStrategy(address,address[],uint256[])\":{\"params\":{\"_amounts\":\"Array of amounts of each corresponding asset to withdraw.\",\"_assets\":\"Array of asset address that will be withdrawn from the strategy.\",\"_strategyFromAddress\":\"Address of the Strategy to withdraw assets from.\"}}},\"title\":\"OETH VaultAdmin Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addStrategyToMintWhitelist(address)\":{\"notice\":\"Adds a strategy to the mint whitelist. Reverts if strategy isn't approved on Vault.\"},\"allowedSwapUndervalue()\":{\"notice\":\"Max allowed percentage the vault total value can drop below the OToken total supply in basis points when executing a collateral swap. For example 100 == 1%\"},\"approveStrategy(address)\":{\"notice\":\"Add a strategy to the Vault.\"},\"assetDefaultStrategies(address)\":{\"notice\":\"Mapping of asset address to the Strategy that they should automatically\"},\"autoAllocateThreshold()\":{\"notice\":\"OToken mints over this amount automatically allocate funds. 18 decimals.\"},\"cacheDecimals(address)\":{\"notice\":\"Cache decimals on OracleRouter for a particular asset. This action is required before that asset's price can be accessed.\"},\"capitalPaused()\":{\"notice\":\"pause operations that change the OToken supply. eg mint, redeem, allocate, mint/burn for strategy\"},\"claimGovernance()\":{\"notice\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"depositToStrategy(address,address[],uint256[])\":{\"notice\":\"Deposit multiple assets from the vault into the strategy.\"},\"dripper()\":{\"notice\":\"Address of the Dripper contract that streams harvested rewards to the Vault\"},\"governor()\":{\"notice\":\"Returns the address of the current Governor.\"},\"isGovernor()\":{\"notice\":\"Returns true if the caller is the current Governor.\"},\"maxSupplyDiff()\":{\"notice\":\"Max difference between total supply and total value of assets. 18 decimals.\"},\"netOusdMintForStrategyThreshold()\":{\"notice\":\"How much net total OTokens are allowed to be minted by all strategies\"},\"netOusdMintedForStrategy()\":{\"notice\":\"How much OTokens are currently minted by the strategy\"},\"ousdMetaStrategy()\":{\"notice\":\"Metapool strategy that is allowed to mint/burn OTokens without changing collateral\"},\"pauseCapital()\":{\"notice\":\"Set the deposit paused flag to true to prevent capital movement.\"},\"pauseRebase()\":{\"notice\":\"Set the deposit paused flag to true to prevent rebasing.\"},\"priceProvider()\":{\"notice\":\"Address of the Oracle price provider contract\"},\"rebasePaused()\":{\"notice\":\"pause rebasing if true\"},\"rebaseThreshold()\":{\"notice\":\"OToken mints over this amount automatically rebase. 18 decimals.\"},\"redeemFeeBps()\":{\"notice\":\"Redemption fee in basis points. eg 50 = 0.5%\"},\"removeAsset(address)\":{\"notice\":\"Remove a supported asset from the Vault\"},\"removeStrategy(address)\":{\"notice\":\"Remove a strategy from the Vault.\"},\"removeStrategyFromMintWhitelist(address)\":{\"notice\":\"Removes a strategy from the mint whitelist.\"},\"setAdminImpl(address)\":{\"notice\":\"set the implementation for the admin, this needs to be in a base class else we cannot set it\"},\"setAssetDefaultStrategy(address,address)\":{\"notice\":\"Set the default Strategy for an asset, i.e. the one which the asset will be automatically allocated to and withdrawn from\"},\"setAutoAllocateThreshold(uint256)\":{\"notice\":\"Sets the minimum amount of OTokens in a mint to trigger an automatic allocation of funds afterwords.\"},\"setDripper(address)\":{\"notice\":\"Set the Dripper contract that streams harvested rewards to the vault.\"},\"setMaxSupplyDiff(uint256)\":{\"notice\":\"Sets the maximum allowable difference between total supply and backing assets' value.\"},\"setNetOusdMintForStrategyThreshold(uint256)\":{\"notice\":\"Set maximum amount of OTokens that can at any point be minted and deployed to strategy (used only by ConvexOUSDMetaStrategy for now).\"},\"setOracleSlippage(address,uint16)\":{\"notice\":\"Set the allowed slippage from the Oracle price for collateral asset swaps.\"},\"setOusdMetaStrategy(address)\":{\"notice\":\"Set OToken Metapool strategy\"},\"setPriceProvider(address)\":{\"notice\":\"Set address of price provider.\"},\"setRebaseThreshold(uint256)\":{\"notice\":\"Set a minimum amount of OTokens in a mint or redeem that triggers a rebase\"},\"setRedeemFeeBps(uint256)\":{\"notice\":\"Set a fee in basis points to be charged for a redeem.\"},\"setStrategistAddr(address)\":{\"notice\":\"Set address of Strategist\"},\"setSwapAllowedUndervalue(uint16)\":{\"notice\":\"Set max allowed percentage the vault total value can drop below the OToken total supply in basis points when executing collateral swaps.\"},\"setSwapper(address)\":{\"notice\":\"Set the contract the performs swaps of collateral assets.\"},\"setTrusteeAddress(address)\":{\"notice\":\"Sets the trusteeAddress that can receive a portion of yield. Setting to the zero address disables this feature.\"},\"setTrusteeFeeBps(uint256)\":{\"notice\":\"Sets the TrusteeFeeBps to the percentage of yield that should be received in basis points.\"},\"setVaultBuffer(uint256)\":{\"notice\":\"Set a buffer of assets to keep in the Vault to handle most redemptions without needing to spend gas unwinding assets from a Strategy.\"},\"setWithdrawalClaimDelay(uint256)\":{\"notice\":\"Changes the async withdrawal claim period for OETH & superOETHb\"},\"strategistAddr()\":{\"notice\":\"Address of the Strategist\"},\"supportAsset(address,uint8)\":{\"notice\":\"Add a supported asset to the contract, i.e. one that can be to mint OTokens.\"},\"swapCollateral(address,address,uint256,uint256,bytes)\":{\"notice\":\"Strategist swaps collateral assets sitting in the vault.\"},\"swapper()\":{\"notice\":\"Contract that swaps the vault's collateral assets\"},\"transferGovernance(address)\":{\"notice\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\"},\"transferToken(address,uint256)\":{\"notice\":\"Transfer token to governor. Intended for recovering tokens stuck in contract, i.e. mistaken sends.\"},\"trusteeAddress()\":{\"notice\":\"Trustee contract that can collect a percentage of yield\"},\"trusteeFeeBps()\":{\"notice\":\"Amount of yield collected in basis points. eg 2000 = 20%\"},\"unpauseCapital()\":{\"notice\":\"Set the deposit paused flag to false to enable capital movement.\"},\"unpauseRebase()\":{\"notice\":\"Set the deposit paused flag to true to allow rebasing.\"},\"vaultBuffer()\":{\"notice\":\"Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\"},\"withdrawAllFromStrategies()\":{\"notice\":\"Withdraws all assets from all the strategies and sends assets to the Vault.\"},\"withdrawAllFromStrategy(address)\":{\"notice\":\"Withdraws all assets from the strategy and sends assets to the Vault.\"},\"withdrawFromStrategy(address,address[],uint256[])\":{\"notice\":\"Withdraw multiple assets from the strategy to the vault.\"},\"withdrawalClaimDelay()\":{\"notice\":\"Sets a minimum delay that is required to elapse between requesting async withdrawals and claiming the request. When set to 0 async withdrawals are disabled.\"},\"withdrawalQueueMetadata()\":{\"notice\":\"Global metadata for the withdrawal queue including: queued - cumulative total of all withdrawal requests included the ones that have already been claimed claimable - cumulative total of all the requests that can be claimed including the ones already claimed claimed - total of all the requests that have been claimed nextWithdrawalIndex - index of the next withdrawal request starting at 0\"},\"withdrawalRequests(uint256)\":{\"notice\":\"Mapping of withdrawal request indices to the user withdrawal request data\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vault/OETHVaultAdmin.sol\":\"OETHVaultAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX 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 *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\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 require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(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 require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(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 require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(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 require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(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 require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(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 require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\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 require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\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 require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\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 * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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 * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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 * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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 * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\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 * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\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 require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base for contracts that are managed by the Origin Protocol's Governor.\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @notice Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @notice Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n emit GovernorshipTransferred(_governor(), newGovernor);\\n\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @notice Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @notice Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0xec8e86e43da98835736de1151b86ca13cd8a1a256adc1382ce7030d825521003\",\"license\":\"MIT\"},\"contracts/interfaces/IBasicToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBasicToken {\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa562062698aa12572123b36dfd2072f1a39e44fed2031cc19c2c9fd522f96ec2\",\"license\":\"MIT\"},\"contracts/interfaces/IOracle.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IOracle {\\n /**\\n * @dev returns the asset price in USD, in 8 decimal digits.\\n *\\n * The version of priceProvider deployed for OETH has 18 decimal digits\\n */\\n function price(address asset) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9eabf152389f145c9c23ed71972af73fb1708cbc4b26e524a9ba29a557b7cfe5\",\"license\":\"MIT\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Platform interface to integrate with lending platform like Compound, AAVE etc.\\n */\\ninterface IStrategy {\\n /**\\n * @dev Deposit the given asset to platform\\n * @param _asset asset address\\n * @param _amount Amount to deposit\\n */\\n function deposit(address _asset, uint256 _amount) external;\\n\\n /**\\n * @dev Deposit the entire balance of all supported assets in the Strategy\\n * to the platform\\n */\\n function depositAll() external;\\n\\n /**\\n * @dev Withdraw given asset from Lending platform\\n */\\n function withdraw(\\n address _recipient,\\n address _asset,\\n uint256 _amount\\n ) external;\\n\\n /**\\n * @dev Liquidate all assets in strategy and return them to Vault.\\n */\\n function withdrawAll() external;\\n\\n /**\\n * @dev Returns the current balance of the given asset.\\n */\\n function checkBalance(address _asset)\\n external\\n view\\n returns (uint256 balance);\\n\\n /**\\n * @dev Returns bool indicating whether strategy supports asset.\\n */\\n function supportsAsset(address _asset) external view returns (bool);\\n\\n /**\\n * @dev Collect reward tokens from the Strategy.\\n */\\n function collectRewardTokens() external;\\n\\n /**\\n * @dev The address array of the reward tokens for the Strategy.\\n */\\n function getRewardTokenAddresses() external view returns (address[] memory);\\n}\\n\",\"keccak256\":\"0xb291e409a9b95527f9ed19cd6bff8eeb9921a21c1f5194a48c0bb9ce6613959a\",\"license\":\"MIT\"},\"contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface ISwapper {\\n /**\\n * @param fromAsset The token address of the asset being sold.\\n * @param toAsset The token address of the asset being purchased.\\n * @param fromAssetAmount The amount of assets being sold.\\n * @param minToAssetAmmount The minimum amount of assets to be purchased.\\n * @param data tx.data returned from 1Inch's /v5.0/1/swap API\\n */\\n function swap(\\n address fromAsset,\\n address toAsset,\\n uint256 fromAssetAmount,\\n uint256 minToAssetAmmount,\\n bytes calldata data\\n ) external returns (uint256 toAssetAmount);\\n}\\n\",\"keccak256\":\"0x56a463cf0d5f2bb4bd629e23522b0c353df4c3d4fb95424828d25fb074faf365\",\"license\":\"MIT\"},\"contracts/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { VaultStorage } from \\\"../vault/VaultStorage.sol\\\";\\n\\ninterface IVault {\\n event AssetSupported(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n\\n // Governable.sol\\n function transferGovernance(address _newGovernor) external;\\n\\n function claimGovernance() external;\\n\\n function governor() external view returns (address);\\n\\n function ADMIN_IMPLEMENTATION() external view returns (address);\\n\\n // VaultAdmin.sol\\n function setPriceProvider(address _priceProvider) external;\\n\\n function priceProvider() external view returns (address);\\n\\n function setRedeemFeeBps(uint256 _redeemFeeBps) external;\\n\\n function redeemFeeBps() external view returns (uint256);\\n\\n function setVaultBuffer(uint256 _vaultBuffer) external;\\n\\n function vaultBuffer() external view returns (uint256);\\n\\n function setAutoAllocateThreshold(uint256 _threshold) external;\\n\\n function autoAllocateThreshold() external view returns (uint256);\\n\\n function setRebaseThreshold(uint256 _threshold) external;\\n\\n function rebaseThreshold() external view returns (uint256);\\n\\n function setStrategistAddr(address _address) external;\\n\\n function strategistAddr() external view returns (address);\\n\\n function setMaxSupplyDiff(uint256 _maxSupplyDiff) external;\\n\\n function maxSupplyDiff() external view returns (uint256);\\n\\n function setTrusteeAddress(address _address) external;\\n\\n function trusteeAddress() external view returns (address);\\n\\n function setTrusteeFeeBps(uint256 _basis) external;\\n\\n function trusteeFeeBps() external view returns (uint256);\\n\\n function ousdMetaStrategy() external view returns (address);\\n\\n function setSwapper(address _swapperAddr) external;\\n\\n function setSwapAllowedUndervalue(uint16 _percentageBps) external;\\n\\n function setOracleSlippage(address _asset, uint16 _allowedOracleSlippageBps)\\n external;\\n\\n function supportAsset(address _asset, uint8 _unitConversion) external;\\n\\n function approveStrategy(address _addr) external;\\n\\n function removeStrategy(address _addr) external;\\n\\n function setAssetDefaultStrategy(address _asset, address _strategy)\\n external;\\n\\n function assetDefaultStrategies(address _asset)\\n external\\n view\\n returns (address);\\n\\n function pauseRebase() external;\\n\\n function unpauseRebase() external;\\n\\n function rebasePaused() external view returns (bool);\\n\\n function pauseCapital() external;\\n\\n function unpauseCapital() external;\\n\\n function capitalPaused() external view returns (bool);\\n\\n function transferToken(address _asset, uint256 _amount) external;\\n\\n function priceUnitMint(address asset) external view returns (uint256);\\n\\n function priceUnitRedeem(address asset) external view returns (uint256);\\n\\n function withdrawAllFromStrategy(address _strategyAddr) external;\\n\\n function withdrawAllFromStrategies() external;\\n\\n function withdrawFromStrategy(\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external;\\n\\n function depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external;\\n\\n // VaultCore.sol\\n function mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) external;\\n\\n function mintForStrategy(uint256 _amount) external;\\n\\n function redeem(uint256 _amount, uint256 _minimumUnitAmount) external;\\n\\n function burnForStrategy(uint256 _amount) external;\\n\\n function allocate() external;\\n\\n function rebase() external;\\n\\n function swapCollateral(\\n address fromAsset,\\n address toAsset,\\n uint256 fromAssetAmount,\\n uint256 minToAssetAmount,\\n bytes calldata data\\n ) external returns (uint256 toAssetAmount);\\n\\n function totalValue() external view returns (uint256 value);\\n\\n function checkBalance(address _asset) external view returns (uint256);\\n\\n function calculateRedeemOutputs(uint256 _amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function getAssetCount() external view returns (uint256);\\n\\n function getAssetConfig(address _asset)\\n external\\n view\\n returns (VaultStorage.Asset memory config);\\n\\n function getAllAssets() external view returns (address[] memory);\\n\\n function getStrategyCount() external view returns (uint256);\\n\\n function swapper() external view returns (address);\\n\\n function allowedSwapUndervalue() external view returns (uint256);\\n\\n function getAllStrategies() external view returns (address[] memory);\\n\\n function isSupportedAsset(address _asset) external view returns (bool);\\n\\n function netOusdMintForStrategyThreshold() external view returns (uint256);\\n\\n function setOusdMetaStrategy(address _ousdMetaStrategy) external;\\n\\n function setNetOusdMintForStrategyThreshold(uint256 _threshold) external;\\n\\n function netOusdMintedForStrategy() external view returns (int256);\\n\\n function setDripper(address _dripper) external;\\n\\n function dripper() external view returns (address);\\n\\n function weth() external view returns (address);\\n\\n function cacheWETHAssetIndex() external;\\n\\n function wethAssetIndex() external view returns (uint256);\\n\\n function initialize(address, address) external;\\n\\n function setAdminImpl(address) external;\\n\\n function removeAsset(address _asset) external;\\n\\n // These are OETH specific functions\\n function addWithdrawalQueueLiquidity() external;\\n\\n function requestWithdrawal(uint256 _amount)\\n external\\n returns (uint256 requestId, uint256 queued);\\n\\n function claimWithdrawal(uint256 requestId)\\n external\\n returns (uint256 amount);\\n\\n function claimWithdrawals(uint256[] memory requestIds)\\n external\\n returns (uint256[] memory amounts, uint256 totalAmount);\\n\\n function withdrawalQueueMetadata()\\n external\\n view\\n returns (VaultStorage.WithdrawalQueueMetadata memory);\\n\\n function withdrawalRequests(uint256 requestId)\\n external\\n view\\n returns (VaultStorage.WithdrawalRequest memory);\\n\\n // OETHb specific functions\\n function addStrategyToMintWhitelist(address strategyAddr) external;\\n\\n function removeStrategyFromMintWhitelist(address strategyAddr) external;\\n\\n function isMintWhitelistedStrategy(address strategyAddr)\\n external\\n view\\n returns (bool);\\n\\n function withdrawalClaimDelay() external view returns (uint256);\\n\\n function setWithdrawalClaimDelay(uint256 newDelay) external;\\n}\\n\",\"keccak256\":\"0x90de40850f126a263dd5a0bf4729c831a536a1f66a232407aab408d1bfb1bb1e\",\"license\":\"MIT\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\ncontract OUSD is Governable {\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n\\n /// @dev Event triggered when the supply changes\\n /// @param totalSupply Updated token total supply\\n /// @param rebasingCredits Updated token rebasing credits\\n /// @param rebasingCreditsPerToken Updated token rebasing credits per token\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n /// @dev Event triggered when an account opts in for rebasing\\n /// @param account Address of the account\\n event AccountRebasingEnabled(address account);\\n /// @dev Event triggered when an account opts out of rebasing\\n /// @param account Address of the account\\n event AccountRebasingDisabled(address account);\\n /// @dev Emitted when `value` tokens are moved from one account `from` to\\n /// another `to`.\\n /// @param from Address of the account tokens are moved from\\n /// @param to Address of the account tokens are moved to\\n /// @param value Amount of tokens transferred\\n event Transfer(address indexed from, address indexed to, uint256 value);\\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 /// @param owner Address of the owner approving allowance\\n /// @param spender Address of the spender allowance is granted to\\n /// @param value Amount of tokens spender can transfer\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n /// @dev Yield resulting from {changeSupply} that a `source` account would\\n /// receive is directed to `target` account.\\n /// @param source Address of the source forwarding the yield\\n /// @param target Address of the target receiving the yield\\n event YieldDelegated(address source, address target);\\n /// @dev Yield delegation from `source` account to the `target` account is\\n /// suspended.\\n /// @param source Address of the source suspending yield forwarding\\n /// @param target Address of the target no longer receiving yield from `source`\\n /// account\\n event YieldUndelegated(address source, address target);\\n\\n enum RebaseOptions {\\n NotSet,\\n StdNonRebasing,\\n StdRebasing,\\n YieldDelegationSource,\\n YieldDelegationTarget\\n }\\n\\n uint256[154] private _gap; // Slots to align with deployed contract\\n uint256 private constant MAX_SUPPLY = type(uint128).max;\\n /// @dev The amount of tokens in existence\\n uint256 public totalSupply;\\n mapping(address => mapping(address => uint256)) private allowances;\\n /// @dev The vault with privileges to execute {mint}, {burn}\\n /// and {changeSupply}\\n address public vaultAddress;\\n mapping(address => uint256) internal creditBalances;\\n // the 2 storage variables below need trailing underscores to not name collide with public functions\\n uint256 private rebasingCredits_; // Sum of all rebasing credits (creditBalances for rebasing accounts)\\n uint256 private rebasingCreditsPerToken_;\\n /// @dev The amount of tokens that are not rebasing - receiving yield\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) internal alternativeCreditsPerToken;\\n /// @dev A map of all addresses and their respective RebaseOptions\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) private __deprecated_isUpgraded;\\n /// @dev A map of addresses that have yields forwarded to. This is an\\n /// inverse mapping of {yieldFrom}\\n /// Key Account forwarding yield\\n /// Value Account receiving yield\\n mapping(address => address) public yieldTo;\\n /// @dev A map of addresses that are receiving the yield. This is an\\n /// inverse mapping of {yieldTo}\\n /// Key Account receiving yield\\n /// Value Account forwarding yield\\n mapping(address => address) public yieldFrom;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n uint256[34] private __gap; // including below gap totals up to 200\\n\\n /// @dev Initializes the contract and sets necessary variables.\\n /// @param _vaultAddress Address of the vault contract\\n /// @param _initialCreditsPerToken The starting rebasing credits per token.\\n function initialize(address _vaultAddress, uint256 _initialCreditsPerToken)\\n external\\n onlyGovernor\\n {\\n require(_vaultAddress != address(0), \\\"Zero vault address\\\");\\n require(vaultAddress == address(0), \\\"Already initialized\\\");\\n\\n rebasingCreditsPerToken_ = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /// @dev Returns the symbol of the token, a shorter version\\n /// of the name.\\n function symbol() external pure virtual returns (string memory) {\\n return \\\"OUSD\\\";\\n }\\n\\n /// @dev Returns the name of the token.\\n function name() external pure virtual returns (string memory) {\\n return \\\"Origin Dollar\\\";\\n }\\n\\n /// @dev Returns the number of decimals used to get its user representation.\\n function decimals() external pure virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() external view returns (uint256) {\\n return rebasingCreditsPerToken_;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() external view returns (uint256) {\\n return rebasingCreditsPerToken_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() external view returns (uint256) {\\n return rebasingCredits_;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() external view returns (uint256) {\\n return rebasingCredits_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @notice Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account) public view returns (uint256) {\\n RebaseOptions state = rebaseState[_account];\\n if (state == RebaseOptions.YieldDelegationSource) {\\n // Saves a slot read when transferring to or from a yield delegating source\\n // since we know creditBalances equals the balance.\\n return creditBalances[_account];\\n }\\n uint256 baseBalance = (creditBalances[_account] * 1e18) /\\n _creditsPerToken(_account);\\n if (state == RebaseOptions.YieldDelegationTarget) {\\n // creditBalances of yieldFrom accounts equals token balances\\n return baseBalance - creditBalances[yieldFrom[_account]];\\n }\\n return baseBalance;\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n external\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (creditBalances[_account], cpt);\\n } else {\\n return (\\n creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n creditBalances[_account],\\n _creditsPerToken(_account),\\n true // all accounts have their resolution \\\"upgraded\\\"\\n );\\n }\\n\\n // Backwards compatible view\\n function nonRebasingCreditsPerToken(address _account)\\n external\\n view\\n returns (uint256)\\n {\\n return alternativeCreditsPerToken[_account];\\n }\\n\\n /**\\n * @notice Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n * @return true on success.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n uint256 userAllowance = allowances[_from][msg.sender];\\n require(_value <= userAllowance, \\\"Allowance exceeded\\\");\\n\\n unchecked {\\n allowances[_from][msg.sender] = userAllowance - _value;\\n }\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n return true;\\n }\\n\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n (\\n int256 fromRebasingCreditsDiff,\\n int256 fromNonRebasingSupplyDiff\\n ) = _adjustAccount(_from, -_value.toInt256());\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_to, _value.toInt256());\\n\\n _adjustGlobals(\\n fromRebasingCreditsDiff + toRebasingCreditsDiff,\\n fromNonRebasingSupplyDiff + toNonRebasingSupplyDiff\\n );\\n }\\n\\n function _adjustAccount(address _account, int256 _balanceChange)\\n internal\\n returns (int256 rebasingCreditsDiff, int256 nonRebasingSupplyDiff)\\n {\\n RebaseOptions state = rebaseState[_account];\\n int256 currentBalance = balanceOf(_account).toInt256();\\n if (currentBalance + _balanceChange < 0) {\\n revert(\\\"Transfer amount exceeds balance\\\");\\n }\\n uint256 newBalance = (currentBalance + _balanceChange).toUint256();\\n\\n if (state == RebaseOptions.YieldDelegationSource) {\\n address target = yieldTo[_account];\\n uint256 targetOldBalance = balanceOf(target);\\n uint256 targetNewCredits = _balanceToRebasingCredits(\\n targetOldBalance + newBalance\\n );\\n rebasingCreditsDiff =\\n targetNewCredits.toInt256() -\\n creditBalances[target].toInt256();\\n\\n creditBalances[_account] = newBalance;\\n creditBalances[target] = targetNewCredits;\\n } else if (state == RebaseOptions.YieldDelegationTarget) {\\n uint256 newCredits = _balanceToRebasingCredits(\\n newBalance + creditBalances[yieldFrom[_account]]\\n );\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n } else {\\n _autoMigrate(_account);\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem > 0) {\\n nonRebasingSupplyDiff = _balanceChange;\\n if (alternativeCreditsPerTokenMem != 1e18) {\\n alternativeCreditsPerToken[_account] = 1e18;\\n }\\n creditBalances[_account] = newBalance;\\n } else {\\n uint256 newCredits = _balanceToRebasingCredits(newBalance);\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n }\\n }\\n }\\n\\n function _adjustGlobals(\\n int256 _rebasingCreditsDiff,\\n int256 _nonRebasingSupplyDiff\\n ) internal {\\n if (_rebasingCreditsDiff != 0) {\\n rebasingCredits_ = (rebasingCredits_.toInt256() +\\n _rebasingCreditsDiff).toUint256();\\n }\\n if (_nonRebasingSupplyDiff != 0) {\\n nonRebasingSupply = (nonRebasingSupply.toInt256() +\\n _nonRebasingSupplyDiff).toUint256();\\n }\\n }\\n\\n /**\\n * @notice Function to check the amount of tokens that _owner has allowed\\n * to `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[_owner][_spender];\\n }\\n\\n /**\\n * @notice Approve the passed address to spend the specified amount of\\n * tokens on behalf of msg.sender.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n * @return true on success.\\n */\\n function approve(address _spender, uint256 _value) external returns (bool) {\\n allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Creates `_amount` tokens and assigns them to `_account`,\\n * increasing the total supply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, _amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply + _amount;\\n\\n require(totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @notice Destroys `_amount` tokens from `_account`,\\n * reducing the total supply.\\n */\\n function burn(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, -_amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem != 0) {\\n return alternativeCreditsPerTokenMem;\\n } else {\\n return rebasingCreditsPerToken_;\\n }\\n }\\n\\n /**\\n * @dev Auto migrate contracts to be non rebasing,\\n * unless they have opted into yield.\\n * @param _account Address of the account.\\n */\\n function _autoMigrate(address _account) internal {\\n bool isContract = _account.code.length > 0;\\n // In previous code versions, contracts would not have had their\\n // rebaseState[_account] set to RebaseOptions.NonRebasing when migrated\\n // therefore we check the actual accounting used on the account instead.\\n if (\\n isContract &&\\n rebaseState[_account] == RebaseOptions.NotSet &&\\n alternativeCreditsPerToken[_account] == 0\\n ) {\\n _rebaseOptOut(_account);\\n }\\n }\\n\\n /**\\n * @dev Calculates credits from contract's global rebasingCreditsPerToken_, and\\n * also balance that corresponds to those credits. The latter is important\\n * when adjusting the contract's global nonRebasingSupply to circumvent any\\n * possible rounding errors.\\n *\\n * @param _balance Balance of the account.\\n */\\n function _balanceToRebasingCredits(uint256 _balance)\\n internal\\n view\\n returns (uint256 rebasingCredits)\\n {\\n // Rounds up, because we need to ensure that accounts always have\\n // at least the balance that they should have.\\n // Note this should always be used on an absolute account value,\\n // not on a possibly negative diff, because then the rounding would be wrong.\\n return ((_balance) * rebasingCreditsPerToken_ + 1e18 - 1) / 1e18;\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n * @param _account Address of the account.\\n */\\n function governanceRebaseOptIn(address _account) external onlyGovernor {\\n require(_account != address(0), \\\"Zero address not allowed\\\");\\n _rebaseOptIn(_account);\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n */\\n function rebaseOptIn() external {\\n _rebaseOptIn(msg.sender);\\n }\\n\\n function _rebaseOptIn(address _account) internal {\\n uint256 balance = balanceOf(_account);\\n\\n // prettier-ignore\\n require(\\n alternativeCreditsPerToken[_account] > 0 ||\\n // Accounts may explicitly `rebaseOptIn` regardless of\\n // accounting if they have a 0 balance.\\n creditBalances[_account] == 0\\n ,\\n \\\"Account must be non-rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n // prettier-ignore\\n require(\\n state == RebaseOptions.StdNonRebasing ||\\n state == RebaseOptions.NotSet,\\n \\\"Only standard non-rebasing accounts can opt in\\\"\\n );\\n\\n uint256 newCredits = _balanceToRebasingCredits(balance);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdRebasing;\\n alternativeCreditsPerToken[_account] = 0;\\n creditBalances[_account] = newCredits;\\n // Globals\\n _adjustGlobals(newCredits.toInt256(), -balance.toInt256());\\n\\n emit AccountRebasingEnabled(_account);\\n }\\n\\n /**\\n * @notice The calling account will no longer receive yield\\n */\\n function rebaseOptOut() external {\\n _rebaseOptOut(msg.sender);\\n }\\n\\n function _rebaseOptOut(address _account) internal {\\n require(\\n alternativeCreditsPerToken[_account] == 0,\\n \\\"Account must be rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n require(\\n state == RebaseOptions.StdRebasing || state == RebaseOptions.NotSet,\\n \\\"Only standard rebasing accounts can opt out\\\"\\n );\\n\\n uint256 oldCredits = creditBalances[_account];\\n uint256 balance = balanceOf(_account);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdNonRebasing;\\n alternativeCreditsPerToken[_account] = 1e18;\\n creditBalances[_account] = balance;\\n // Globals\\n _adjustGlobals(-oldCredits.toInt256(), balance.toInt256());\\n\\n emit AccountRebasingDisabled(_account);\\n }\\n\\n /**\\n * @notice Distribute yield to users. This changes the exchange rate\\n * between \\\"credits\\\" and OUSD tokens to change rebasing user's balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply) external onlyVault {\\n require(totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n return;\\n }\\n\\n totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n uint256 rebasingSupply = totalSupply - nonRebasingSupply;\\n // round up in the favour of the protocol\\n rebasingCreditsPerToken_ =\\n (rebasingCredits_ * 1e18 + rebasingSupply - 1) /\\n rebasingSupply;\\n\\n require(rebasingCreditsPerToken_ > 0, \\\"Invalid change in supply\\\");\\n\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n }\\n\\n /*\\n * @notice Send the yield from one account to another account.\\n * Each account keeps its own balances.\\n */\\n function delegateYield(address _from, address _to) external onlyGovernor {\\n require(_from != address(0), \\\"Zero from address not allowed\\\");\\n require(_to != address(0), \\\"Zero to address not allowed\\\");\\n\\n require(_from != _to, \\\"Cannot delegate to self\\\");\\n require(\\n yieldFrom[_to] == address(0) &&\\n yieldTo[_to] == address(0) &&\\n yieldFrom[_from] == address(0) &&\\n yieldTo[_from] == address(0),\\n \\\"Blocked by existing yield delegation\\\"\\n );\\n RebaseOptions stateFrom = rebaseState[_from];\\n RebaseOptions stateTo = rebaseState[_to];\\n\\n require(\\n stateFrom == RebaseOptions.NotSet ||\\n stateFrom == RebaseOptions.StdNonRebasing ||\\n stateFrom == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState from\\\"\\n );\\n\\n require(\\n stateTo == RebaseOptions.NotSet ||\\n stateTo == RebaseOptions.StdNonRebasing ||\\n stateTo == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState to\\\"\\n );\\n\\n if (alternativeCreditsPerToken[_from] == 0) {\\n _rebaseOptOut(_from);\\n }\\n if (alternativeCreditsPerToken[_to] > 0) {\\n _rebaseOptIn(_to);\\n }\\n\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(_to);\\n uint256 oldToCredits = creditBalances[_to];\\n uint256 newToCredits = _balanceToRebasingCredits(\\n fromBalance + toBalance\\n );\\n\\n // Set up the bidirectional links\\n yieldTo[_from] = _to;\\n yieldFrom[_to] = _from;\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.YieldDelegationSource;\\n alternativeCreditsPerToken[_from] = 1e18;\\n creditBalances[_from] = fromBalance;\\n rebaseState[_to] = RebaseOptions.YieldDelegationTarget;\\n creditBalances[_to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, -(fromBalance).toInt256());\\n emit YieldDelegated(_from, _to);\\n }\\n\\n /*\\n * @notice Stop sending the yield from one account to another account.\\n */\\n function undelegateYield(address _from) external onlyGovernor {\\n // Require a delegation, which will also ensure a valid delegation\\n require(yieldTo[_from] != address(0), \\\"Zero address not allowed\\\");\\n\\n address to = yieldTo[_from];\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(to);\\n uint256 oldToCredits = creditBalances[to];\\n uint256 newToCredits = _balanceToRebasingCredits(toBalance);\\n\\n // Remove the bidirectional links\\n yieldFrom[to] = address(0);\\n yieldTo[_from] = address(0);\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.StdNonRebasing;\\n // alternativeCreditsPerToken[from] already 1e18 from `delegateYield()`\\n creditBalances[_from] = fromBalance;\\n rebaseState[to] = RebaseOptions.StdRebasing;\\n // alternativeCreditsPerToken[to] already 0 from `delegateYield()`\\n creditBalances[to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, fromBalance.toInt256());\\n emit YieldUndelegated(_from, to);\\n }\\n}\\n\",\"keccak256\":\"0x5741d16e48d6031ec92c1e189ea023c78a34956b6bc9642ea9dfc9a6dafe49ca\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBasicToken } from \\\"../interfaces/IBasicToken.sol\\\";\\n\\nlibrary Helpers {\\n /**\\n * @notice Fetch the `symbol()` from an ERC20 token\\n * @dev Grabs the `symbol()` from a contract\\n * @param _token Address of the ERC20 token\\n * @return string Symbol of the ERC20 token\\n */\\n function getSymbol(address _token) internal view returns (string memory) {\\n string memory symbol = IBasicToken(_token).symbol();\\n return symbol;\\n }\\n\\n /**\\n * @notice Fetch the `decimals()` from an ERC20 token\\n * @dev Grabs the `decimals()` from a contract and fails if\\n * the decimal value does not live within a certain range\\n * @param _token Address of the ERC20 token\\n * @return uint256 Decimals of the ERC20 token\\n */\\n function getDecimals(address _token) internal view returns (uint256) {\\n uint256 decimals = IBasicToken(_token).decimals();\\n require(\\n decimals >= 4 && decimals <= 18,\\n \\\"Token must have sufficient decimal places\\\"\\n );\\n\\n return decimals;\\n }\\n}\\n\",\"keccak256\":\"0x108b7a69e0140da0072ca18f90a03a3340574400f81aa6076cd2cccdf13699c2\",\"license\":\"MIT\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base contract any contracts that need to initialize state after deployment.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0xaadbcc138114afed4af4f353c2ced2916e6ee14be91434789187f192caf0d786\",\"license\":\"MIT\"},\"contracts/utils/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n\\n// Based on StableMath from Stability Labs Pty. Ltd.\\n// https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol\\n\\nlibrary StableMath {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Scaling unit for use in specific calculations,\\n * where 1 * 10**18, or 1e18 represents a unit '1'\\n */\\n uint256 private constant FULL_SCALE = 1e18;\\n\\n /***************************************\\n Helpers\\n ****************************************/\\n\\n /**\\n * @dev Adjust the scale of an integer\\n * @param to Decimals to scale to\\n * @param from Decimals to scale from\\n */\\n function scaleBy(\\n uint256 x,\\n uint256 to,\\n uint256 from\\n ) internal pure returns (uint256) {\\n if (to > from) {\\n x = x.mul(10**(to - from));\\n } else if (to < from) {\\n // slither-disable-next-line divide-before-multiply\\n x = x.div(10**(from - to));\\n }\\n return x;\\n }\\n\\n /***************************************\\n Precise Arithmetic\\n ****************************************/\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulTruncateScale(x, y, FULL_SCALE);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the given scale. For example,\\n * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @param scale Scale unit\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncateScale(\\n uint256 x,\\n uint256 y,\\n uint256 scale\\n ) internal pure returns (uint256) {\\n // e.g. assume scale = fullScale\\n // z = 10e18 * 9e17 = 9e36\\n uint256 z = x.mul(y);\\n // return 9e36 / 1e18 = 9e18\\n return z.div(scale);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit, rounded up to the closest base unit.\\n */\\n function mulTruncateCeil(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e17 * 17268172638 = 138145381104e17\\n uint256 scaled = x.mul(y);\\n // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17\\n uint256 ceil = scaled.add(FULL_SCALE.sub(1));\\n // e.g. 13814538111.399...e18 / 1e18 = 13814538111\\n return ceil.div(FULL_SCALE);\\n }\\n\\n /**\\n * @dev Precisely divides two units, by first scaling the left hand operand. Useful\\n * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)\\n * @param x Left hand input to division\\n * @param y Right hand input to division\\n * @return Result after multiplying the left operand by the scale, and\\n * executing the division on the right hand input.\\n */\\n function divPrecisely(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e18 * 1e18 = 8e36\\n uint256 z = x.mul(FULL_SCALE);\\n // e.g. 8e36 / 10e18 = 8e17\\n return z.div(y);\\n }\\n}\\n\",\"keccak256\":\"0x1eb49f6f79045d9e0a8e1dced8e01d9e559e5fac554dcbb53e43140b601b04e7\",\"license\":\"MIT\"},\"contracts/vault/OETHVaultAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { IVault } from \\\"../interfaces/IVault.sol\\\";\\nimport { VaultAdmin } from \\\"./VaultAdmin.sol\\\";\\n\\n/**\\n * @title OETH VaultAdmin Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETHVaultAdmin is VaultAdmin {\\n using SafeERC20 for IERC20;\\n\\n address public immutable weth;\\n\\n constructor(address _weth) {\\n weth = _weth;\\n }\\n\\n /**\\n * @notice Adds a strategy to the mint whitelist.\\n * Reverts if strategy isn't approved on Vault.\\n * @param strategyAddr Strategy address\\n */\\n function addStrategyToMintWhitelist(address strategyAddr)\\n external\\n onlyGovernor\\n {\\n require(strategies[strategyAddr].isSupported, \\\"Strategy not approved\\\");\\n\\n require(\\n !isMintWhitelistedStrategy[strategyAddr],\\n \\\"Already whitelisted\\\"\\n );\\n\\n isMintWhitelistedStrategy[strategyAddr] = true;\\n\\n emit StrategyAddedToMintWhitelist(strategyAddr);\\n }\\n\\n /**\\n * @notice Removes a strategy from the mint whitelist.\\n * @param strategyAddr Strategy address\\n */\\n function removeStrategyFromMintWhitelist(address strategyAddr)\\n external\\n onlyGovernor\\n {\\n // Intentionally skipping `strategies.isSupported` check since\\n // we may wanna remove an address even after removing the strategy\\n\\n require(isMintWhitelistedStrategy[strategyAddr], \\\"Not whitelisted\\\");\\n\\n isMintWhitelistedStrategy[strategyAddr] = false;\\n\\n emit StrategyRemovedFromMintWhitelist(strategyAddr);\\n }\\n\\n /// @dev Simplified version of the deposit function as WETH is the only supported asset.\\n function _depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal override {\\n require(\\n strategies[_strategyToAddress].isSupported,\\n \\\"Invalid to Strategy\\\"\\n );\\n require(\\n _assets.length == 1 && _amounts.length == 1 && _assets[0] == weth,\\n \\\"Only WETH is supported\\\"\\n );\\n\\n // Check the there is enough WETH to transfer once the WETH reserved for the withdrawal queue is accounted for\\n require(_amounts[0] <= _wethAvailable(), \\\"Not enough WETH available\\\");\\n\\n // Send required amount of funds to the strategy\\n IERC20(weth).safeTransfer(_strategyToAddress, _amounts[0]);\\n\\n // Deposit all the funds that have been sent to the strategy\\n IStrategy(_strategyToAddress).depositAll();\\n }\\n\\n function _withdrawFromStrategy(\\n address _recipient,\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal override {\\n super._withdrawFromStrategy(\\n _recipient,\\n _strategyFromAddress,\\n _assets,\\n _amounts\\n );\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n function _withdrawAllFromStrategy(address _strategyAddr) internal override {\\n super._withdrawAllFromStrategy(_strategyAddr);\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n function _withdrawAllFromStrategies() internal override {\\n super._withdrawAllFromStrategies();\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n /// @dev Calculate how much WETH in the vault is not reserved for the withdrawal queue.\\n // That is, it is available to be redeemed or deposited into a strategy.\\n function _wethAvailable() internal view returns (uint256 wethAvailable) {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // The amount of WETH that is still to be claimed in the withdrawal queue\\n uint256 outstandingWithdrawals = queue.queued - queue.claimed;\\n\\n // The amount of sitting in WETH in the vault\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // If there is not enough WETH in the vault to cover the outstanding withdrawals\\n if (wethBalance <= outstandingWithdrawals) {\\n return 0;\\n }\\n\\n return wethBalance - outstandingWithdrawals;\\n }\\n\\n function _swapCollateral(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) internal pure override returns (uint256) {\\n revert(\\\"Collateral swap not supported\\\");\\n }\\n}\\n\",\"keccak256\":\"0x95b093ad61a1c16e52efb2b2f621f12f193066424e2d3ec6d4f9be672ee151b5\",\"license\":\"MIT\"},\"contracts/vault/VaultAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultAdmin contract\\n * @notice The VaultAdmin contract makes configuration and admin calls on the vault.\\n * @author Origin Protocol Inc\\n */\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IOracle } from \\\"../interfaces/IOracle.sol\\\";\\nimport { ISwapper } from \\\"../interfaces/ISwapper.sol\\\";\\nimport { IVault } from \\\"../interfaces/IVault.sol\\\";\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\n\\nimport \\\"./VaultStorage.sol\\\";\\n\\ncontract VaultAdmin is VaultStorage {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n\\n /**\\n * @dev Verifies that the caller is the Governor or Strategist.\\n */\\n modifier onlyGovernorOrStrategist() {\\n require(\\n msg.sender == strategistAddr || isGovernor(),\\n \\\"Caller is not the Strategist or Governor\\\"\\n );\\n _;\\n }\\n\\n /***************************************\\n Configuration\\n ****************************************/\\n\\n /**\\n * @notice Set address of price provider.\\n * @param _priceProvider Address of price provider\\n */\\n function setPriceProvider(address _priceProvider) external onlyGovernor {\\n priceProvider = _priceProvider;\\n emit PriceProviderUpdated(_priceProvider);\\n }\\n\\n /**\\n * @notice Set a fee in basis points to be charged for a redeem.\\n * @param _redeemFeeBps Basis point fee to be charged\\n */\\n function setRedeemFeeBps(uint256 _redeemFeeBps) external onlyGovernor {\\n require(_redeemFeeBps <= 1000, \\\"Redeem fee should not be over 10%\\\");\\n redeemFeeBps = _redeemFeeBps;\\n emit RedeemFeeUpdated(_redeemFeeBps);\\n }\\n\\n /**\\n * @notice Set a buffer of assets to keep in the Vault to handle most\\n * redemptions without needing to spend gas unwinding assets from a Strategy.\\n * @param _vaultBuffer Percentage using 18 decimals. 100% = 1e18.\\n */\\n function setVaultBuffer(uint256 _vaultBuffer)\\n external\\n onlyGovernorOrStrategist\\n {\\n require(_vaultBuffer <= 1e18, \\\"Invalid value\\\");\\n vaultBuffer = _vaultBuffer;\\n emit VaultBufferUpdated(_vaultBuffer);\\n }\\n\\n /**\\n * @notice Sets the minimum amount of OTokens in a mint to trigger an\\n * automatic allocation of funds afterwords.\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setAutoAllocateThreshold(uint256 _threshold)\\n external\\n onlyGovernor\\n {\\n autoAllocateThreshold = _threshold;\\n emit AllocateThresholdUpdated(_threshold);\\n }\\n\\n /**\\n * @notice Set a minimum amount of OTokens in a mint or redeem that triggers a\\n * rebase\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setRebaseThreshold(uint256 _threshold) external onlyGovernor {\\n rebaseThreshold = _threshold;\\n emit RebaseThresholdUpdated(_threshold);\\n }\\n\\n /**\\n * @notice Set address of Strategist\\n * @param _address Address of Strategist\\n */\\n function setStrategistAddr(address _address) external onlyGovernor {\\n strategistAddr = _address;\\n emit StrategistUpdated(_address);\\n }\\n\\n /**\\n * @notice Set the default Strategy for an asset, i.e. the one which the asset\\n will be automatically allocated to and withdrawn from\\n * @param _asset Address of the asset\\n * @param _strategy Address of the Strategy\\n */\\n function setAssetDefaultStrategy(address _asset, address _strategy)\\n external\\n onlyGovernorOrStrategist\\n {\\n emit AssetDefaultStrategyUpdated(_asset, _strategy);\\n // If its a zero address being passed for the strategy we are removing\\n // the default strategy\\n if (_strategy != address(0)) {\\n // Make sure the strategy meets some criteria\\n require(strategies[_strategy].isSupported, \\\"Strategy not approved\\\");\\n IStrategy strategy = IStrategy(_strategy);\\n require(assets[_asset].isSupported, \\\"Asset is not supported\\\");\\n require(\\n strategy.supportsAsset(_asset),\\n \\\"Asset not supported by Strategy\\\"\\n );\\n }\\n assetDefaultStrategies[_asset] = _strategy;\\n }\\n\\n /**\\n * @notice Set maximum amount of OTokens that can at any point be minted and deployed\\n * to strategy (used only by ConvexOUSDMetaStrategy for now).\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setNetOusdMintForStrategyThreshold(uint256 _threshold)\\n external\\n onlyGovernor\\n {\\n /**\\n * Because `netOusdMintedForStrategy` check in vault core works both ways\\n * (positive and negative) the actual impact of the amount of OToken minted\\n * could be double the threshold. E.g.:\\n * - contract has threshold set to 100\\n * - state of netOusdMinted is -90\\n * - in effect it can mint 190 OToken and still be within limits\\n *\\n * We are somewhat mitigating this behaviour by resetting the netOusdMinted\\n * counter whenever new threshold is set. So it can only move one threshold\\n * amount in each direction. This also enables us to reduce the threshold\\n * amount and not have problems with current netOusdMinted being near\\n * limits on either side.\\n */\\n netOusdMintedForStrategy = 0;\\n netOusdMintForStrategyThreshold = _threshold;\\n emit NetOusdMintForStrategyThresholdChanged(_threshold);\\n }\\n\\n /**\\n * @notice Set the Dripper contract that streams harvested rewards to the vault.\\n * @param _dripper Address of the Dripper contract.\\n */\\n function setDripper(address _dripper) external onlyGovernor {\\n dripper = _dripper;\\n emit DripperChanged(_dripper);\\n }\\n\\n /**\\n * @notice Changes the async withdrawal claim period for OETH & superOETHb\\n * @param _delay Delay period (should be between 10 mins to 7 days).\\n * Set to 0 to disable async withdrawals\\n */\\n function setWithdrawalClaimDelay(uint256 _delay) external onlyGovernor {\\n require(\\n _delay == 0 || (_delay >= 10 minutes && _delay <= 15 days),\\n \\\"Invalid claim delay period\\\"\\n );\\n withdrawalClaimDelay = _delay;\\n emit WithdrawalClaimDelayUpdated(_delay);\\n }\\n\\n /***************************************\\n Swaps\\n ****************************************/\\n\\n /**\\n * @notice Strategist swaps collateral assets sitting in the vault.\\n * @param _fromAsset The token address of the asset being sold by the vault.\\n * @param _toAsset The token address of the asset being purchased by the vault.\\n * @param _fromAssetAmount The amount of assets being sold by the vault.\\n * @param _minToAssetAmount The minimum amount of assets to be purchased.\\n * @param _data implementation specific data. eg 1Inch swap data\\n * @return toAssetAmount The amount of toAssets that was received from the swap\\n */\\n function swapCollateral(\\n address _fromAsset,\\n address _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _minToAssetAmount,\\n bytes calldata _data\\n )\\n external\\n nonReentrant\\n onlyGovernorOrStrategist\\n returns (uint256 toAssetAmount)\\n {\\n toAssetAmount = _swapCollateral(\\n _fromAsset,\\n _toAsset,\\n _fromAssetAmount,\\n _minToAssetAmount,\\n _data\\n );\\n }\\n\\n function _swapCollateral(\\n address _fromAsset,\\n address _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _minToAssetAmount,\\n bytes calldata _data\\n ) internal virtual returns (uint256 toAssetAmount) {\\n // Check fromAsset and toAsset are valid\\n Asset memory fromAssetConfig = assets[_fromAsset];\\n Asset memory toAssetConfig = assets[_toAsset];\\n require(fromAssetConfig.isSupported, \\\"From asset is not supported\\\");\\n require(toAssetConfig.isSupported, \\\"To asset is not supported\\\");\\n\\n // Load swap config into memory to avoid separate SLOADs\\n SwapConfig memory config = swapConfig;\\n\\n // Scope a new block to remove toAssetBalBefore from the scope of swapCollateral.\\n // This avoids a stack too deep error.\\n {\\n uint256 toAssetBalBefore = IERC20(_toAsset).balanceOf(\\n address(this)\\n );\\n\\n // Transfer from assets to the swapper contract\\n IERC20(_fromAsset).safeTransfer(config.swapper, _fromAssetAmount);\\n\\n // Call to the Swapper contract to do the actual swap\\n // The -1 is required for stETH which sometimes transfers 1 wei less than what was specified.\\n // slither-disable-next-line unused-return\\n ISwapper(config.swapper).swap(\\n _fromAsset,\\n _toAsset,\\n _fromAssetAmount - 1,\\n _minToAssetAmount,\\n _data\\n );\\n\\n // Compute the change in asset balance held by the Vault\\n toAssetAmount =\\n IERC20(_toAsset).balanceOf(address(this)) -\\n toAssetBalBefore;\\n }\\n\\n // Check the to assets returned is above slippage amount specified by the strategist\\n require(\\n toAssetAmount >= _minToAssetAmount,\\n \\\"Strategist slippage limit\\\"\\n );\\n\\n // Scope a new block to remove minOracleToAssetAmount from the scope of swapCollateral.\\n // This avoids a stack too deep error.\\n {\\n // Check the slippage against the Oracle in case the strategist made a mistake or has become malicious.\\n // to asset amount = from asset amount * from asset price / to asset price\\n uint256 minOracleToAssetAmount = (_fromAssetAmount *\\n (1e4 - fromAssetConfig.allowedOracleSlippageBps) *\\n IOracle(priceProvider).price(_fromAsset)) /\\n (IOracle(priceProvider).price(_toAsset) *\\n (1e4 + toAssetConfig.allowedOracleSlippageBps));\\n\\n // Scale both sides up to 18 decimals to compare\\n require(\\n toAssetAmount.scaleBy(18, toAssetConfig.decimals) >=\\n minOracleToAssetAmount.scaleBy(\\n 18,\\n fromAssetConfig.decimals\\n ),\\n \\\"Oracle slippage limit exceeded\\\"\\n );\\n }\\n\\n // Check the vault's total value hasn't gone below the OToken total supply\\n // by more than the allowed percentage.\\n require(\\n IVault(address(this)).totalValue() >=\\n (oUSD.totalSupply() * ((1e4 - config.allowedUndervalueBps))) /\\n 1e4,\\n \\\"Allowed value < supply\\\"\\n );\\n\\n emit Swapped(_fromAsset, _toAsset, _fromAssetAmount, toAssetAmount);\\n }\\n\\n /***************************************\\n Swap Config\\n ****************************************/\\n\\n /**\\n * @notice Set the contract the performs swaps of collateral assets.\\n * @param _swapperAddr Address of the Swapper contract that implements the ISwapper interface.\\n */\\n function setSwapper(address _swapperAddr) external onlyGovernor {\\n swapConfig.swapper = _swapperAddr;\\n emit SwapperChanged(_swapperAddr);\\n }\\n\\n /// @notice Contract that swaps the vault's collateral assets\\n function swapper() external view returns (address swapper_) {\\n swapper_ = swapConfig.swapper;\\n }\\n\\n /**\\n * @notice Set max allowed percentage the vault total value can drop below the OToken total supply in basis points\\n * when executing collateral swaps.\\n * @param _basis Percentage in basis points. eg 100 == 1%\\n */\\n function setSwapAllowedUndervalue(uint16 _basis) external onlyGovernor {\\n require(_basis < 10001, \\\"Invalid basis points\\\");\\n swapConfig.allowedUndervalueBps = _basis;\\n emit SwapAllowedUndervalueChanged(_basis);\\n }\\n\\n /**\\n * @notice Max allowed percentage the vault total value can drop below the OToken total supply in basis points\\n * when executing a collateral swap.\\n * For example 100 == 1%\\n * @return value Percentage in basis points.\\n */\\n function allowedSwapUndervalue() external view returns (uint256 value) {\\n value = swapConfig.allowedUndervalueBps;\\n }\\n\\n /**\\n * @notice Set the allowed slippage from the Oracle price for collateral asset swaps.\\n * @param _asset Address of the asset token.\\n * @param _allowedOracleSlippageBps allowed slippage from Oracle in basis points. eg 20 = 0.2%. Max 10%.\\n */\\n function setOracleSlippage(address _asset, uint16 _allowedOracleSlippageBps)\\n external\\n onlyGovernor\\n {\\n require(assets[_asset].isSupported, \\\"Asset not supported\\\");\\n require(_allowedOracleSlippageBps < 1000, \\\"Slippage too high\\\");\\n\\n assets[_asset].allowedOracleSlippageBps = _allowedOracleSlippageBps;\\n\\n emit SwapSlippageChanged(_asset, _allowedOracleSlippageBps);\\n }\\n\\n /***************************************\\n Asset Config\\n ****************************************/\\n\\n /**\\n * @notice Add a supported asset to the contract, i.e. one that can be\\n * to mint OTokens.\\n * @param _asset Address of asset\\n */\\n function supportAsset(address _asset, uint8 _unitConversion)\\n external\\n virtual\\n onlyGovernor\\n {\\n require(!assets[_asset].isSupported, \\\"Asset already supported\\\");\\n\\n assets[_asset] = Asset({\\n isSupported: true,\\n unitConversion: UnitConversion(_unitConversion),\\n decimals: 0, // will be overridden in _cacheDecimals\\n allowedOracleSlippageBps: 0 // 0% by default\\n });\\n\\n _cacheDecimals(_asset);\\n allAssets.push(_asset);\\n\\n // Verify that our oracle supports the asset\\n // slither-disable-next-line unused-return\\n IOracle(priceProvider).price(_asset);\\n\\n emit AssetSupported(_asset);\\n }\\n\\n /**\\n * @notice Remove a supported asset from the Vault\\n * @param _asset Address of asset\\n */\\n function removeAsset(address _asset) external onlyGovernor {\\n require(assets[_asset].isSupported, \\\"Asset not supported\\\");\\n\\n // 1e13 for 18 decimals. And 10 for 6 decimals\\n uint256 maxDustBalance = uint256(1e13).scaleBy(\\n assets[_asset].decimals,\\n 18\\n );\\n\\n require(\\n IVault(address(this)).checkBalance(_asset) <= maxDustBalance,\\n \\\"Vault still holds asset\\\"\\n );\\n\\n uint256 assetsCount = allAssets.length;\\n uint256 assetIndex = assetsCount; // initialize at invaid index\\n for (uint256 i = 0; i < assetsCount; ++i) {\\n if (allAssets[i] == _asset) {\\n assetIndex = i;\\n break;\\n }\\n }\\n\\n // Note: If asset is not found in `allAssets`, the following line\\n // will revert with an out-of-bound error. However, there's no\\n // reason why an asset would have `Asset.isSupported = true` but\\n // not exist in `allAssets`.\\n\\n // Update allAssets array\\n allAssets[assetIndex] = allAssets[assetsCount - 1];\\n allAssets.pop();\\n\\n // Reset default strategy\\n assetDefaultStrategies[_asset] = address(0);\\n emit AssetDefaultStrategyUpdated(_asset, address(0));\\n\\n // Remove asset from storage\\n delete assets[_asset];\\n\\n emit AssetRemoved(_asset);\\n }\\n\\n /**\\n * @notice Cache decimals on OracleRouter for a particular asset. This action\\n * is required before that asset's price can be accessed.\\n * @param _asset Address of asset token\\n */\\n function cacheDecimals(address _asset) external onlyGovernor {\\n _cacheDecimals(_asset);\\n }\\n\\n /***************************************\\n Strategy Config\\n ****************************************/\\n\\n /**\\n * @notice Add a strategy to the Vault.\\n * @param _addr Address of the strategy to add\\n */\\n function approveStrategy(address _addr) external onlyGovernor {\\n require(!strategies[_addr].isSupported, \\\"Strategy already approved\\\");\\n strategies[_addr] = Strategy({ isSupported: true, _deprecated: 0 });\\n allStrategies.push(_addr);\\n emit StrategyApproved(_addr);\\n }\\n\\n /**\\n * @notice Remove a strategy from the Vault.\\n * @param _addr Address of the strategy to remove\\n */\\n\\n function removeStrategy(address _addr) external onlyGovernor {\\n require(strategies[_addr].isSupported, \\\"Strategy not approved\\\");\\n\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n require(\\n assetDefaultStrategies[allAssets[i]] != _addr,\\n \\\"Strategy is default for an asset\\\"\\n );\\n }\\n\\n // Initialize strategyIndex with out of bounds result so function will\\n // revert if no valid index found\\n uint256 stratCount = allStrategies.length;\\n uint256 strategyIndex = stratCount;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n if (allStrategies[i] == _addr) {\\n strategyIndex = i;\\n break;\\n }\\n }\\n\\n if (strategyIndex < stratCount) {\\n allStrategies[strategyIndex] = allStrategies[stratCount - 1];\\n allStrategies.pop();\\n\\n // Mark the strategy as not supported\\n strategies[_addr].isSupported = false;\\n\\n // Withdraw all assets\\n IStrategy strategy = IStrategy(_addr);\\n strategy.withdrawAll();\\n\\n emit StrategyRemoved(_addr);\\n }\\n }\\n\\n /***************************************\\n Strategies\\n ****************************************/\\n\\n /**\\n * @notice Deposit multiple assets from the vault into the strategy.\\n * @param _strategyToAddress Address of the Strategy to deposit assets into.\\n * @param _assets Array of asset address that will be deposited into the strategy.\\n * @param _amounts Array of amounts of each corresponding asset to deposit.\\n */\\n function depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external onlyGovernorOrStrategist nonReentrant {\\n _depositToStrategy(_strategyToAddress, _assets, _amounts);\\n }\\n\\n function _depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal virtual {\\n require(\\n strategies[_strategyToAddress].isSupported,\\n \\\"Invalid to Strategy\\\"\\n );\\n require(_assets.length == _amounts.length, \\\"Parameter length mismatch\\\");\\n\\n uint256 assetCount = _assets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n address assetAddr = _assets[i];\\n require(\\n IStrategy(_strategyToAddress).supportsAsset(assetAddr),\\n \\\"Asset unsupported\\\"\\n );\\n // Send required amount of funds to the strategy\\n IERC20(assetAddr).safeTransfer(_strategyToAddress, _amounts[i]);\\n }\\n\\n // Deposit all the funds that have been sent to the strategy\\n IStrategy(_strategyToAddress).depositAll();\\n }\\n\\n /**\\n * @notice Withdraw multiple assets from the strategy to the vault.\\n * @param _strategyFromAddress Address of the Strategy to withdraw assets from.\\n * @param _assets Array of asset address that will be withdrawn from the strategy.\\n * @param _amounts Array of amounts of each corresponding asset to withdraw.\\n */\\n function withdrawFromStrategy(\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external onlyGovernorOrStrategist nonReentrant {\\n _withdrawFromStrategy(\\n address(this),\\n _strategyFromAddress,\\n _assets,\\n _amounts\\n );\\n }\\n\\n /**\\n * @param _recipient can either be a strategy or the Vault\\n */\\n function _withdrawFromStrategy(\\n address _recipient,\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal virtual {\\n require(\\n strategies[_strategyFromAddress].isSupported,\\n \\\"Invalid from Strategy\\\"\\n );\\n require(_assets.length == _amounts.length, \\\"Parameter length mismatch\\\");\\n\\n uint256 assetCount = _assets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n // Withdraw from Strategy to the recipient\\n IStrategy(_strategyFromAddress).withdraw(\\n _recipient,\\n _assets[i],\\n _amounts[i]\\n );\\n }\\n }\\n\\n /**\\n * @notice Sets the maximum allowable difference between\\n * total supply and backing assets' value.\\n */\\n function setMaxSupplyDiff(uint256 _maxSupplyDiff) external onlyGovernor {\\n maxSupplyDiff = _maxSupplyDiff;\\n emit MaxSupplyDiffChanged(_maxSupplyDiff);\\n }\\n\\n /**\\n * @notice Sets the trusteeAddress that can receive a portion of yield.\\n * Setting to the zero address disables this feature.\\n */\\n function setTrusteeAddress(address _address) external onlyGovernor {\\n trusteeAddress = _address;\\n emit TrusteeAddressChanged(_address);\\n }\\n\\n /**\\n * @notice Sets the TrusteeFeeBps to the percentage of yield that should be\\n * received in basis points.\\n */\\n function setTrusteeFeeBps(uint256 _basis) external onlyGovernor {\\n require(_basis <= 5000, \\\"basis cannot exceed 50%\\\");\\n trusteeFeeBps = _basis;\\n emit TrusteeFeeBpsChanged(_basis);\\n }\\n\\n /**\\n * @notice Set OToken Metapool strategy\\n * @param _ousdMetaStrategy Address of OToken metapool strategy\\n */\\n function setOusdMetaStrategy(address _ousdMetaStrategy)\\n external\\n onlyGovernor\\n {\\n ousdMetaStrategy = _ousdMetaStrategy;\\n emit OusdMetaStrategyUpdated(_ousdMetaStrategy);\\n }\\n\\n /***************************************\\n Pause\\n ****************************************/\\n\\n /**\\n * @notice Set the deposit paused flag to true to prevent rebasing.\\n */\\n function pauseRebase() external onlyGovernorOrStrategist {\\n rebasePaused = true;\\n emit RebasePaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to true to allow rebasing.\\n */\\n function unpauseRebase() external onlyGovernorOrStrategist {\\n rebasePaused = false;\\n emit RebaseUnpaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to true to prevent capital movement.\\n */\\n function pauseCapital() external onlyGovernorOrStrategist {\\n capitalPaused = true;\\n emit CapitalPaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to false to enable capital movement.\\n */\\n function unpauseCapital() external onlyGovernorOrStrategist {\\n capitalPaused = false;\\n emit CapitalUnpaused();\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n /**\\n * @notice Transfer token to governor. Intended for recovering tokens stuck in\\n * contract, i.e. mistaken sends.\\n * @param _asset Address for the asset\\n * @param _amount Amount of the asset to transfer\\n */\\n function transferToken(address _asset, uint256 _amount)\\n external\\n onlyGovernor\\n {\\n require(!assets[_asset].isSupported, \\\"Only unsupported assets\\\");\\n IERC20(_asset).safeTransfer(governor(), _amount);\\n }\\n\\n /***************************************\\n Strategies Admin\\n ****************************************/\\n\\n /**\\n * @notice Withdraws all assets from the strategy and sends assets to the Vault.\\n * @param _strategyAddr Strategy address.\\n */\\n function withdrawAllFromStrategy(address _strategyAddr)\\n external\\n onlyGovernorOrStrategist\\n {\\n _withdrawAllFromStrategy(_strategyAddr);\\n }\\n\\n function _withdrawAllFromStrategy(address _strategyAddr) internal virtual {\\n require(\\n strategies[_strategyAddr].isSupported,\\n \\\"Strategy is not supported\\\"\\n );\\n IStrategy strategy = IStrategy(_strategyAddr);\\n strategy.withdrawAll();\\n }\\n\\n /**\\n * @notice Withdraws all assets from all the strategies and sends assets to the Vault.\\n */\\n function withdrawAllFromStrategies() external onlyGovernorOrStrategist {\\n _withdrawAllFromStrategies();\\n }\\n\\n function _withdrawAllFromStrategies() internal virtual {\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n IStrategy(allStrategies[i]).withdrawAll();\\n }\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n function _cacheDecimals(address token) internal {\\n Asset storage tokenAsset = assets[token];\\n if (tokenAsset.decimals != 0) {\\n return;\\n }\\n uint8 decimals = IBasicToken(token).decimals();\\n require(decimals >= 6 && decimals <= 18, \\\"Unexpected precision\\\");\\n tokenAsset.decimals = decimals;\\n }\\n}\\n\",\"keccak256\":\"0xdfa5768332961985a04244a5f498f61cb732d608851096e584aeb9a19af51011\",\"license\":\"MIT\"},\"contracts/vault/VaultStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultStorage contract\\n * @notice The VaultStorage contract defines the storage for the Vault contracts\\n * @author Origin Protocol Inc\\n */\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { OUSD } from \\\"../token/OUSD.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport \\\"../utils/Helpers.sol\\\";\\n\\ncontract VaultStorage is Initializable, Governable {\\n using SafeERC20 for IERC20;\\n\\n event AssetSupported(address _asset);\\n event AssetRemoved(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event OusdMetaStrategyUpdated(address _ousdMetaStrategy);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event NetOusdMintForStrategyThresholdChanged(uint256 _threshold);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n event WithdrawalClaimDelayUpdated(uint256 _newDelay);\\n\\n // Assets supported by the Vault, i.e. Stablecoins\\n enum UnitConversion {\\n DECIMALS,\\n GETEXCHANGERATE\\n }\\n // Changed to fit into a single storage slot so the decimals needs to be recached\\n struct Asset {\\n // Note: OETHVaultCore doesn't use `isSupported` when minting,\\n // redeeming or checking balance of assets.\\n bool isSupported;\\n UnitConversion unitConversion;\\n uint8 decimals;\\n // Max allowed slippage from the Oracle price when swapping collateral assets in basis points.\\n // For example 40 == 0.4% slippage\\n uint16 allowedOracleSlippageBps;\\n }\\n\\n /// @dev mapping of supported vault assets to their configuration\\n // slither-disable-next-line uninitialized-state\\n mapping(address => Asset) internal assets;\\n /// @dev list of all assets supported by the vault.\\n // slither-disable-next-line uninitialized-state\\n address[] internal allAssets;\\n\\n // Strategies approved for use by the Vault\\n struct Strategy {\\n bool isSupported;\\n uint256 _deprecated; // Deprecated storage slot\\n }\\n /// @dev mapping of strategy contracts to their configuration\\n // slither-disable-next-line uninitialized-state\\n mapping(address => Strategy) public strategies;\\n /// @dev list of all vault strategies\\n address[] internal allStrategies;\\n\\n /// @notice Address of the Oracle price provider contract\\n // slither-disable-next-line uninitialized-state\\n address public priceProvider;\\n /// @notice pause rebasing if true\\n bool public rebasePaused = false;\\n /// @notice pause operations that change the OToken supply.\\n /// eg mint, redeem, allocate, mint/burn for strategy\\n bool public capitalPaused = true;\\n /// @notice Redemption fee in basis points. eg 50 = 0.5%\\n uint256 public redeemFeeBps;\\n /// @notice Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\\n uint256 public vaultBuffer;\\n /// @notice OToken mints over this amount automatically allocate funds. 18 decimals.\\n uint256 public autoAllocateThreshold;\\n /// @notice OToken mints over this amount automatically rebase. 18 decimals.\\n uint256 public rebaseThreshold;\\n\\n /// @dev Address of the OToken token. eg OUSD or OETH.\\n // slither-disable-next-line uninitialized-state\\n OUSD public oUSD;\\n\\n /// @dev Storage slot for the address of the VaultAdmin contract that is delegated to\\n // keccak256(\\\"OUSD.vault.governor.admin.impl\\\");\\n bytes32 public constant adminImplPosition =\\n 0xa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd9;\\n\\n /// @dev Address of the contract responsible for post rebase syncs with AMMs\\n // slither-disable-next-line constable-states\\n address private _deprecated_rebaseHooksAddr = address(0);\\n\\n /// @dev Deprecated: Address of Uniswap\\n // slither-disable-next-line constable-states\\n address private _deprecated_uniswapAddr = address(0);\\n\\n /// @notice Address of the Strategist\\n address public strategistAddr = address(0);\\n\\n /// @notice Mapping of asset address to the Strategy that they should automatically\\n // be allocated to\\n // slither-disable-next-line uninitialized-state\\n mapping(address => address) public assetDefaultStrategies;\\n\\n /// @notice Max difference between total supply and total value of assets. 18 decimals.\\n // slither-disable-next-line uninitialized-state\\n uint256 public maxSupplyDiff;\\n\\n /// @notice Trustee contract that can collect a percentage of yield\\n address public trusteeAddress;\\n\\n /// @notice Amount of yield collected in basis points. eg 2000 = 20%\\n uint256 public trusteeFeeBps;\\n\\n /// @dev Deprecated: Tokens that should be swapped for stablecoins\\n address[] private _deprecated_swapTokens;\\n\\n uint256 constant MINT_MINIMUM_UNIT_PRICE = 0.998e18;\\n\\n /// @notice Metapool strategy that is allowed to mint/burn OTokens without changing collateral\\n\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n address public ousdMetaStrategy;\\n\\n /// @notice How much OTokens are currently minted by the strategy\\n // slither-disable-next-line uninitialized-state\\n int256 public netOusdMintedForStrategy;\\n\\n /// @notice How much net total OTokens are allowed to be minted by all strategies\\n // slither-disable-next-line uninitialized-state\\n uint256 public netOusdMintForStrategyThreshold;\\n\\n // slither-disable-end constable-states\\n\\n uint256 constant MIN_UNIT_PRICE_DRIFT = 0.7e18;\\n uint256 constant MAX_UNIT_PRICE_DRIFT = 1.3e18;\\n\\n /// @notice Collateral swap configuration.\\n /// @dev is packed into a single storage slot to save gas.\\n struct SwapConfig {\\n // Contract that swaps the vault's collateral assets\\n address swapper;\\n // Max allowed percentage the total value can drop below the total supply in basis points.\\n // For example 100 == 1%\\n uint16 allowedUndervalueBps;\\n }\\n SwapConfig internal swapConfig = SwapConfig(address(0), 0);\\n\\n // List of strategies that can mint oTokens directly\\n // Used in OETHBaseVaultCore\\n // slither-disable-next-line uninitialized-state\\n mapping(address => bool) public isMintWhitelistedStrategy;\\n\\n /// @notice Address of the Dripper contract that streams harvested rewards to the Vault\\n /// @dev The vault is proxied so needs to be set with setDripper against the proxy contract.\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n address public dripper;\\n // slither-disable-end constable-states\\n\\n /// Withdrawal Queue Storage /////\\n\\n struct WithdrawalQueueMetadata {\\n // cumulative total of all withdrawal requests included the ones that have already been claimed\\n uint128 queued;\\n // cumulative total of all the requests that can be claimed including the ones that have already been claimed\\n uint128 claimable;\\n // total of all the requests that have been claimed\\n uint128 claimed;\\n // index of the next withdrawal request starting at 0\\n uint128 nextWithdrawalIndex;\\n }\\n\\n /// @notice Global metadata for the withdrawal queue including:\\n /// queued - cumulative total of all withdrawal requests included the ones that have already been claimed\\n /// claimable - cumulative total of all the requests that can be claimed including the ones already claimed\\n /// claimed - total of all the requests that have been claimed\\n /// nextWithdrawalIndex - index of the next withdrawal request starting at 0\\n // slither-disable-next-line uninitialized-state\\n WithdrawalQueueMetadata public withdrawalQueueMetadata;\\n\\n struct WithdrawalRequest {\\n address withdrawer;\\n bool claimed;\\n uint40 timestamp; // timestamp of the withdrawal request\\n // Amount of oTokens to redeem. eg OETH\\n uint128 amount;\\n // cumulative total of all withdrawal requests including this one.\\n // this request can be claimed when this queued amount is less than or equal to the queue's claimable amount.\\n uint128 queued;\\n }\\n\\n /// @notice Mapping of withdrawal request indices to the user withdrawal request data\\n mapping(uint256 => WithdrawalRequest) public withdrawalRequests;\\n\\n /// @notice Sets a minimum delay that is required to elapse between\\n /// requesting async withdrawals and claiming the request.\\n /// When set to 0 async withdrawals are disabled.\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n uint256 public withdrawalClaimDelay;\\n // slither-disable-end constable-states\\n\\n // For future use\\n uint256[44] private __gap;\\n\\n /**\\n * @notice set the implementation for the admin, this needs to be in a base class else we cannot set it\\n * @param newImpl address of the implementation\\n */\\n function setAdminImpl(address newImpl) external onlyGovernor {\\n require(\\n Address.isContract(newImpl),\\n \\\"new implementation is not a contract\\\"\\n );\\n bytes32 position = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newImpl)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc96eb2e6b540ccdbf7667dbee2ca78053e0e27d865953608a21f25581ca8e1e8\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6037805461ffff60a01b1916600160a81b179055603d80546001600160a01b0319908116909155603e805482169055603f8054909116905560e0604052600060a081905260c052604880546001600160b01b031916905534801561006257600080fd5b50604051613b0d380380613b0d83398101604081905261008191610092565b6001600160a01b03166080526100c2565b6000602082840312156100a457600080fd5b81516001600160a01b03811681146100bb57600080fd5b9392505050565b608051613a1b6100f2600039600081816105ca01528181612a7001528181612ba00152612f8d0152613a1b6000f3fe608060405234801561001057600080fd5b50600436106103db5760003560e01c80635d36b1901161020a578063a403e4d511610125578063c9919112116100b8578063e6cc543211610087578063e6cc54321461092a578063e829cc161461093e578063eb03654b14610951578063ef08edc214610964578063fc0cfeee1461098b57600080fd5b8063c9919112146108f3578063d38bfff4146108fb578063d58e3b3a1461090e578063e45cc9f01461092157600080fd5b8063b890ebf6116100f4578063b890ebf6146108bd578063bc90106b146108d0578063c5f00841146108e3578063c7af3352146108eb57600080fd5b8063a403e4d51461085b578063ae69f3cb14610884578063b2c9336d14610897578063b888879e146108aa57600080fd5b8063840c4c7a1161019d57806394828ffd1161016c57806394828ffd1461082457806395b166bc1461082c5780639c82f2a41461083f5780639fa1826e1461085257600080fd5b8063840c4c7a1461074d5780638e510b52146107605780638ec489a214610769578063937b25811461077c57600080fd5b80636c7561e8116101d95780636c7561e81461070b578063773540b31461071e5780637a2202f3146107315780637b9a70961461073a57600080fd5b80635d36b190146106ca578063603ea03b146106d2578063636e6c40146106e5578063663e64ce146106f857600080fd5b8063372aa224116102fa5780634a5e42b11161028d57806353ca9f241161025c57806353ca9f241461067d578063570d8e1d146106915780635802a172146106a4578063597c8910146106b757600080fd5b80634a5e42b11461063b5780634bed3bc01461064e57806350ba711c1461066157806352d38e5d1461067457600080fd5b80633fc8cef3116102c95780633fc8cef3146105c55780634530820a146105ec57806345e4213b1461061f57806349c1d54d1461062857600080fd5b8063372aa2241461055357806339ebf823146105665780633b8ae397146105aa5780633dbc911f146105bd57600080fd5b80631cfbe7bc116103725780632da845a8116103415780632da845a8146104bb5780632e9958ab146104ce578063362bd1a3146104e157806336b6d9441461054057600080fd5b80631cfbe7bc146104855780631edfe3da14610498578063207134b0146104a15780632b3297f9146104aa57600080fd5b80631072cbea116103ae5780631072cbea14610439578063175188e81461044c5780631816dd4a1461045f57806318ce56bd1461047257600080fd5b806309f49bf5146103e057806309f6442c146103ea5780630acbda75146104065780630c340a2414610419575b600080fd5b6103e861099e565b005b6103f360385481565b6040519081526020015b60405180910390f35b6103e86104143660046133a9565b610a17565b610421610ac9565b6040516001600160a01b0390911681526020016103fd565b6103e86104473660046133de565b610ae6565b6103e861045a366004613408565b610b93565b6103e861046d366004613408565b610e5a565b604554610421906001600160a01b031681565b6103e86104933660046133a9565b610f61565b6103f360395481565b6103f360435481565b6048546001600160a01b0316610421565b6103e86104c9366004613408565b611023565b6103e86104dc366004613408565b611095565b604b54604c5461050d916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b03958616815293851660208501529184169183019190915290911660608201526080016103fd565b6103e861054e366004613408565b611103565b6103e8610561366004613408565b611133565b610593610574366004613408565b6035602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152016103fd565b6103e86105b8366004613408565b6111a5565b6103e86112e2565b6104217f000000000000000000000000000000000000000000000000000000000000000081565b61060f6105fa366004613408565b60496020526000908152604090205460ff1681565b60405190151581526020016103fd565b6103f3604e5481565b604254610421906001600160a01b031681565b6103e8610649366004613408565b611358565b604854600160a01b900461ffff166103f3565b6103f361066f366004613423565b611680565b6103f3603b5481565b60375461060f90600160a01b900460ff1681565b603f54610421906001600160a01b031681565b603c54610421906001600160a01b031681565b6103e86106c5366004613408565b611723565b6103e8611764565b604a54610421906001600160a01b031681565b6103e86106f33660046133a9565b61180a565b6103e86107063660046133a9565b611868565b6103e86107193660046134db565b6118c1565b6103e861072c366004613408565b611b30565b6103f360475481565b6103e8610748366004613524565b611ba2565b6103e861075b3660046135a3565b611cd8565b6103f360415481565b6103e86107773660046133a9565b611d71565b6107dd61078a3660046133a9565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a0016103fd565b6103e8611e26565b6103e861083a366004613408565b611e96565b6103e861084d366004613408565b611f5d565b6103f3603a5481565b610421610869366004613408565b6040602081905260009182529020546001600160a01b031681565b6103e86108923660046135a3565b611fcf565b6103e86108a53660046133a9565b61205d565b603754610421906001600160a01b031681565b6103e86108cb3660046133a9565b6120b6565b6103e86108de366004613629565b61210f565b6103e861231a565b61060f612390565b6103e86123c1565b6103e8610909366004613408565b612401565b6103e861091c366004613408565b6124a5565b6103f360465481565b60375461060f90600160a81b900460ff1681565b6103e861094c366004613653565b612517565b6103e861095f3660046133a9565b6125d7565b6103f37fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd981565b6103e8610999366004613408565b61268c565b603f546001600160a01b03163314806109ba57506109ba612390565b6109df5760405162461bcd60e51b81526004016109d69061366e565b60405180910390fd5b6037805460ff60a01b191690556040517fbc044409505c95b6b851433df96e1beae715c909d8e7c1d6d7ab783300d4e3b990600090a1565b610a1f612390565b610a3b5760405162461bcd60e51b81526004016109d6906136b6565b611388811115610a8d5760405162461bcd60e51b815260206004820152601760248201527f62617369732063616e6e6f74206578636565642035302500000000000000000060448201526064016109d6565b60438190556040518181527f56287a45051933ea374811b3d5d165033047be5572cac676f7c28b8be4f746c7906020015b60405180910390a150565b6000610ae16000805160206139c68339815191525490565b905090565b610aee612390565b610b0a5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff1615610b735760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920756e737570706f727465642061737365747300000000000000000060448201526064016109d6565b610b8f610b7e610ac9565b6001600160a01b038416908361272e565b5050565b610b9b612390565b610bb75760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16610bef5760405162461bcd60e51b81526004016109d6906136ed565b60345460005b81811015610c9e57826001600160a01b03166040600060348481548110610c1e57610c1e61371c565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541603610c965760405162461bcd60e51b815260206004820181905260248201527f53747261746567792069732064656661756c7420666f7220616e20617373657460448201526064016109d6565b600101610bf5565b506036548060005b82811015610cf557846001600160a01b031660368281548110610ccb57610ccb61371c565b6000918252602090912001546001600160a01b031603610ced57809150610cf5565b600101610ca6565b5081811015610e54576036610d0b600184613748565b81548110610d1b57610d1b61371c565b600091825260209091200154603680546001600160a01b039092169183908110610d4757610d4761371c565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506036805480610d8657610d8661375b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861680835260359091526040808320805460ff19169055805163429c145b60e11b81529051879363853828b6926004808201939182900301818387803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b50506040516001600160a01b03881681527f09a1db4b80c32706328728508c941a6b954f31eb5affd32f236c1fd405f8fea49250602001905060405180910390a1505b50505050565b610e62612390565b610e7e5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16610eb65760405162461bcd60e51b81526004016109d6906136ed565b6001600160a01b03811660009081526049602052604090205460ff1615610f155760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481dda1a5d195b1a5cdd1959606a1b60448201526064016109d6565b6001600160a01b038116600081815260496020526040808220805460ff19166001179055517f47c8c96a5942f094264111c5fe7f6a4fe86efe63254a6fa7afa5fc84f07d58e89190a250565b610f69612390565b610f855760405162461bcd60e51b81526004016109d6906136b6565b801580610fa257506102588110158015610fa257506213c6808111155b610fee5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420636c61696d2064656c617920706572696f6400000000000060448201526064016109d6565b604e8190556040518181527fc59f5e32049abab44ddea11021f5abb89422a2f550837afcf25df9fc8d0db6b090602001610abe565b61102b612390565b6110475760405162461bcd60e51b81526004016109d6906136b6565b604280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e4af5ac389e8cde1bdaa6830881b6c987c62a45cfb3b33d27d805cde3b5775090602001610abe565b61109d612390565b6110b95760405162461bcd60e51b81526004016109d6906136b6565b604a80546001600160a01b0319166001600160a01b0383169081179091556040517faf2910d9759321733de15af1827a49830692912adeb2b3646334861f2cd2eed490600090a250565b61110b612390565b6111275760405162461bcd60e51b81526004016109d6906136b6565b61113081612785565b50565b61113b612390565b6111575760405162461bcd60e51b81526004016109d6906136b6565b603780546001600160a01b0319166001600160a01b0383169081179091556040519081527fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a90602001610abe565b6111ad612390565b6111c95760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16156112325760405162461bcd60e51b815260206004820152601960248201527f537472617465677920616c726561647920617070726f7665640000000000000060448201526064016109d6565b6040805180820182526001808252600060208084018281526001600160a01b038716808452603583528684209551865460ff19169015151786559051948401949094556036805493840181559091527f4a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b890910180546001600160a01b0319168317905591519081527f960dd94cbb79169f09a4e445d58b895df2d9bffa5b31055d0932d801724a20d19101610abe565b603f546001600160a01b03163314806112fe57506112fe612390565b61131a5760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a81b1916600160a81b1790556040517f71f0e5b62f846a22e0b4d159e516e62fa9c2b8eb570be15f83e67d98a2ee51e090600090a1565b611360612390565b61137c5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526033602052604090205460ff166113da5760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016109d6565b6001600160a01b03811660009081526033602052604081205461140f906509184e72a0009062010000900460ff16601261288c565b604051632fa8a91360e11b81526001600160a01b038416600482015290915081903090635f51522690602401602060405180830381865afa158015611458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147c9190613771565b11156114ca5760405162461bcd60e51b815260206004820152601760248201527f5661756c74207374696c6c20686f6c647320617373657400000000000000000060448201526064016109d6565b6034548060005b8281101561152057846001600160a01b0316603482815481106114f6576114f661371c565b6000918252602090912001546001600160a01b03160361151857809150611520565b6001016114d1565b50603461152e600184613748565b8154811061153e5761153e61371c565b600091825260209091200154603480546001600160a01b03909216918390811061156a5761156a61371c565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060348054806115a9576115a961375b565b60008281526020808220600019908401810180546001600160a01b031990811690915593019093556001600160a01b038716808252604080855280832080549094169093558251908152928301527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038416600081815260336020908152604091829020805464ffffffffff1916905590519182527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc910160405180910390a150505050565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546000919060011981016116c85760405162461bcd60e51b81526004016109d69061378a565b60028255603f546001600160a01b03163314806116e857506116e8612390565b6117045760405162461bcd60e51b81526004016109d69061366e565b6117128989898989896128f0565b600190925550979650505050505050565b603f546001600160a01b031633148061173f575061173f612390565b61175b5760405162461bcd60e51b81526004016109d69061366e565b6111308161293b565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146117ff5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016109d6565b6118083361299a565b565b611812612390565b61182e5760405162461bcd60e51b81526004016109d6906136b6565b600060465560478190556040518181527fc29d6fedbc6bdf267a08166c2b976fbd72aca5d6a769528616f8b9224c8f197f90602001610abe565b611870612390565b61188c5760405162461bcd60e51b81526004016109d6906136b6565b60418190556040518181527f95201f9c21f26877223b1ff4073936a6484c35495649e60e55730497aeb60d9390602001610abe565b6118c9612390565b6118e55760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff161561194e5760405162461bcd60e51b815260206004820152601760248201527f417373657420616c726561647920737570706f7274656400000000000000000060448201526064016109d6565b60405180608001604052806001151581526020018260ff166001811115611977576119776137b2565b6001811115611988576119886137b2565b81526000602080830182905260409283018290526001600160a01b0386168252603381529190208251815490151560ff19821681178355928401519192839161ff001990911661ffff19909116176101008360018111156119eb576119eb6137b2565b02179055506040820151815460609093015161ffff1663010000000264ffff0000001960ff90921662010000029190911664ffffff00001990931692909217919091179055611a3982612785565b603480546001810182556000919091527f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c10180546001600160a01b0319166001600160a01b038481169182179092556037546040516315d5220f60e31b815260048101929092529091169063aea9107890602401602060405180830381865afa158015611aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aee9190613771565b506040516001600160a01b03831681527f4f1ac48525e50059cc1cc6e0e1940ece0dd653a4db4841538d6aef036be2fb7b906020015b60405180910390a15050565b611b38612390565b611b545760405162461bcd60e51b81526004016109d6906136b6565b603f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f869e0abd13cc3a975de7b93be3df1cb2255c802b1cead85963cc79d99f131bee90602001610abe565b611baa612390565b611bc65760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff16611c245760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016109d6565b6103e88161ffff1610611c6d5760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b60448201526064016109d6565b6001600160a01b038216600081815260336020908152604091829020805464ffff0000001916630100000061ffff8716908102919091179091558251938452908301527f8d22e9d2cbe8bb65a3c4412bd8970743864512a1a0e004e8d00fb96277b78b949101611b24565b603f546001600160a01b0316331480611cf45750611cf4612390565b611d105760405162461bcd60e51b81526004016109d69061366e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546001198101611d545760405162461bcd60e51b81526004016109d69061378a565b60028255611d6587878787876129f9565b50600190555050505050565b603f546001600160a01b0316331480611d8d5750611d8d612390565b611da95760405162461bcd60e51b81526004016109d69061366e565b670de0b6b3a7640000811115611df15760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b60448201526064016109d6565b60398190556040518181527f41ecb23a0e7865b25f38c268b7c3012220d822929e9edff07326e89d5bb822b590602001610abe565b603f546001600160a01b0316331480611e425750611e42612390565b611e5e5760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a81b191690556040517f891ebab18da80ebeeea06b1b1cede098329c4c008906a98370c2ac7a80b571cb90600090a1565b611e9e612390565b611eba5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526049602052604090205460ff16611f145760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016109d6565b6001600160a01b038116600081815260496020526040808220805460ff19169055517f0ec40967a61509853550658e51d0e4297f7cba244fe4adc8ba18b5631ac20e2f9190a250565b611f65612390565b611f815760405162461bcd60e51b81526004016109d6906136b6565b604880546001600160a01b0319166001600160a01b0383169081179091556040519081527f7d7719313229e558c5a3893cad2eb86a86a049156d1d9ebd5c63a8eedefd1c0390602001610abe565b603f546001600160a01b0316331480611feb5750611feb612390565b6120075760405162461bcd60e51b81526004016109d69061366e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac45358054600119810161204b5760405162461bcd60e51b81526004016109d69061378a565b60028255611d65308888888888612c31565b612065612390565b6120815760405162461bcd60e51b81526004016109d6906136b6565b603a8190556040518181527f2ec5fb5a3d2703edc461252d92ccd2799c3c74f01d97212b20388207fa17ae4590602001610abe565b6120be612390565b6120da5760405162461bcd60e51b81526004016109d6906136b6565b603b8190556040518181527f39367850377ac04920a9a670f2180e7a94d83b15ad302e59875ec58fd10bd37d90602001610abe565b603f546001600160a01b031633148061212b575061212b612390565b6121475760405162461bcd60e51b81526004016109d69061366e565b604080516001600160a01b038085168252831660208201527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038116156122ec576001600160a01b03811660009081526035602052604090205460ff166121d15760405162461bcd60e51b81526004016109d6906136ed565b6001600160a01b038216600090815260336020526040902054819060ff166122345760405162461bcd60e51b8152602060048201526016602482015275105cdcd95d081a5cc81b9bdd081cdd5c1c1bdc9d195960521b60448201526064016109d6565b60405163551c457b60e11b81526001600160a01b03848116600483015282169063aa388af690602401602060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e91906137c8565b6122ea5760405162461bcd60e51b815260206004820152601f60248201527f4173736574206e6f7420737570706f727465642062792053747261746567790060448201526064016109d6565b505b6001600160a01b03918216600090815260406020819052902080546001600160a01b03191691909216179055565b603f546001600160a01b03163314806123365750612336612390565b6123525760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a01b1916600160a01b1790556040517f8cff26a5985614b3d30629cc4ab83824bf115aec971b718d8f2f99562032e97290600090a1565b60006123a86000805160206139c68339815191525490565b6001600160a01b0316336001600160a01b031614905090565b603f546001600160a01b03163314806123dd57506123dd612390565b6123f95760405162461bcd60e51b81526004016109d69061366e565b611808612c9a565b612409612390565b6124255760405162461bcd60e51b81526004016109d6906136b6565b61244d817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b031661246d6000805160206139c68339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6124ad612390565b6124c95760405162461bcd60e51b81526004016109d6906136b6565b604580546001600160a01b0319166001600160a01b0383169081179091556040519081527fa12850fb726e0b2b7b3c9a9342031e1268a8148d0eb06b4bea8613204ffcd2b890602001610abe565b61251f612390565b61253b5760405162461bcd60e51b81526004016109d6906136b6565b6127118161ffff16106125875760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420626173697320706f696e747360601b60448201526064016109d6565b6048805461ffff60a01b1916600160a01b61ffff8416908102919091179091556040519081527ff12c00256bee2b6facb111a88a9b1cff86e79132939b44f1353212d6f746955790602001610abe565b6125df612390565b6125fb5760405162461bcd60e51b81526004016109d6906136b6565b6103e88111156126575760405162461bcd60e51b815260206004820152602160248201527f52656465656d206665652073686f756c64206e6f74206265206f7665722031306044820152602560f81b60648201526084016109d6565b60388190556040518181527fd6c7508d6658ccee36b7b7d7fd72e5cbaeefb40c64eff24e9ae7470e846304ee90602001610abe565b612694612390565b6126b05760405162461bcd60e51b81526004016109d6906136b6565b803b61270a5760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016109d6565b7fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd955565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612780908490612cf1565b505050565b6001600160a01b0381166000908152603360205260409020805462010000900460ff16156127b1575050565b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281591906137ea565b905060068160ff161015801561282f575060128160ff1611155b6128725760405162461bcd60e51b81526020600482015260146024820152732ab732bc3832b1ba32b210383932b1b4b9b4b7b760611b60448201526064016109d6565b815460ff909116620100000262ff00001990911617905550565b6000818311156128bc576128b56128a38385613748565b6128ae90600a6138ee565b8590612dc3565b93506128e6565b818310156128e6576128e36128d18484613748565b6128dc90600a6138ee565b8590612dd8565b93505b50825b9392505050565b60405162461bcd60e51b815260206004820152601d60248201527f436f6c6c61746572616c2073776170206e6f7420737570706f7274656400000060448201526000906064016109d6565b61294481612de4565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561297f57600080fd5b505af1158015612993573d6000803e3d6000fd5b5050505050565b6001600160a01b0381166129f05760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016109d6565b61113081612ea8565b6001600160a01b03851660009081526035602052604090205460ff16612a575760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420746f20537472617465677960681b60448201526064016109d6565b600183148015612a675750600181145b8015612acb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684846000818110612aab57612aab61371c565b9050602002016020810190612ac09190613408565b6001600160a01b0316145b612b105760405162461bcd60e51b815260206004820152601660248201527513db9b1e4815d15512081a5cc81cdd5c1c1bdc9d195960521b60448201526064016109d6565b612b18612f0f565b82826000818110612b2b57612b2b61371c565b905060200201351115612b805760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768205745544820617661696c61626c650000000000000060448201526064016109d6565b612bd78583836000818110612b9757612b9761371c565b905060200201357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661272e9092919063ffffffff16565b846001600160a01b031663de5f62686040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c1257600080fd5b505af1158015612c26573d6000803e3d6000fd5b505050505050505050565b612c3f86868686868661301d565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c7a57600080fd5b505af1158015612c8e573d6000803e3d6000fd5b50505050505050505050565b612ca26131a5565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612cdd57600080fd5b505af1158015610e54573d6000803e3d6000fd5b6000612d46826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132319092919063ffffffff16565b8051909150156127805780806020019051810190612d6491906137c8565b6127805760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109d6565b6000612dcf82846138fa565b90505b92915050565b6000612dcf8284613911565b6001600160a01b03811660009081526035602052604090205460ff16612e4c5760405162461bcd60e51b815260206004820152601960248201527f5374726174656779206973206e6f7420737570706f727465640000000000000060448201526064016109d6565b6000819050806001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612e8c57600080fd5b505af1158015612ea0573d6000803e3d6000fd5b505050505050565b806001600160a01b0316612ec86000805160206139c68339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a36000805160206139c683398151915255565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301526000928391612f5f9190613933565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff89190613771565b905081811161300b576000935050505090565b6130158282613748565b935050505090565b6001600160a01b03851660009081526035602052604090205460ff1661307d5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642066726f6d20537472617465677960581b60448201526064016109d6565b8281146130cc5760405162461bcd60e51b815260206004820152601960248201527f506172616d65746572206c656e677468206d69736d617463680000000000000060448201526064016109d6565b8260005b8181101561319b57866001600160a01b031663d9caed12898888858181106130fa576130fa61371c565b905060200201602081019061310f9190613408565b8787868181106131215761312161371c565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561317857600080fd5b505af115801561318c573d6000803e3d6000fd5b505050508060010190506130d0565b5050505050505050565b60365460005b81811015610b8f57603681815481106131c6576131c661371c565b60009182526020822001546040805163429c145b60e11b815290516001600160a01b039092169263853828b69260048084019382900301818387803b15801561320e57600080fd5b505af1158015613222573d6000803e3d6000fd5b505050508060010190506131ab565b60606132408484600085613248565b949350505050565b6060824710156132a95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109d6565b843b6132f75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109d6565b600080866001600160a01b031685876040516133139190613976565b60006040518083038185875af1925050503d8060008114613350576040519150601f19603f3d011682016040523d82523d6000602084013e613355565b606091505b5091509150613365828286613370565b979650505050505050565b6060831561337f5750816128e9565b82511561338f5782518084602001fd5b8160405162461bcd60e51b81526004016109d69190613992565b6000602082840312156133bb57600080fd5b5035919050565b80356001600160a01b03811681146133d957600080fd5b919050565b600080604083850312156133f157600080fd5b6133fa836133c2565b946020939093013593505050565b60006020828403121561341a57600080fd5b612dcf826133c2565b60008060008060008060a0878903121561343c57600080fd5b613445876133c2565b9550613453602088016133c2565b94506040870135935060608701359250608087013567ffffffffffffffff81111561347d57600080fd5b8701601f8101891361348e57600080fd5b803567ffffffffffffffff8111156134a557600080fd5b8960208284010111156134b757600080fd5b60208201935080925050509295509295509295565b60ff8116811461113057600080fd5b600080604083850312156134ee57600080fd5b6134f7836133c2565b91506020830135613507816134cc565b809150509250929050565b803561ffff811681146133d957600080fd5b6000806040838503121561353757600080fd5b613540836133c2565b915061354e60208401613512565b90509250929050565b60008083601f84011261356957600080fd5b50813567ffffffffffffffff81111561358157600080fd5b6020830191508360208260051b850101111561359c57600080fd5b9250929050565b6000806000806000606086880312156135bb57600080fd5b6135c4866133c2565b9450602086013567ffffffffffffffff8111156135e057600080fd5b6135ec88828901613557565b909550935050604086013567ffffffffffffffff81111561360c57600080fd5b61361888828901613557565b969995985093965092949392505050565b6000806040838503121561363c57600080fd5b613645836133c2565b915061354e602084016133c2565b60006020828403121561366557600080fd5b612dcf82613512565b60208082526028908201527f43616c6c6572206973206e6f74207468652053747261746567697374206f722060408201526723b7bb32b93737b960c11b606082015260800190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60208082526015908201527414dd1c985d1959de481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612dd257612dd2613732565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561378357600080fd5b5051919050565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137da57600080fd5b815180151581146128e957600080fd5b6000602082840312156137fc57600080fd5b81516128e9816134cc565b6001815b60018411156138425780850481111561382657613826613732565b600184161561383457908102905b60019390931c92800261380b565b935093915050565b60008261385957506001612dd2565b8161386657506000612dd2565b816001811461387c5760028114613886576138a2565b6001915050612dd2565b60ff84111561389757613897613732565b50506001821b612dd2565b5060208310610133831016604e8410600b84101617156138c5575081810a612dd2565b6138d26000198484613807565b80600019048211156138e6576138e6613732565b029392505050565b6000612dcf838361384a565b8082028115828204841417612dd257612dd2613732565b60008261392e57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160801b038281168282160390811115612dd257612dd2613732565b60005b8381101561396d578181015183820152602001613955565b50506000910152565b60008251613988818460208701613952565b9190910192915050565b60208152600082518060208401526139b1816040850160208701613952565b601f01601f1916919091016040019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220f3a953b6afb0ee1b1db0613863d2312879b406a56429f6bbb1d935e8d4b6ad8164736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103db5760003560e01c80635d36b1901161020a578063a403e4d511610125578063c9919112116100b8578063e6cc543211610087578063e6cc54321461092a578063e829cc161461093e578063eb03654b14610951578063ef08edc214610964578063fc0cfeee1461098b57600080fd5b8063c9919112146108f3578063d38bfff4146108fb578063d58e3b3a1461090e578063e45cc9f01461092157600080fd5b8063b890ebf6116100f4578063b890ebf6146108bd578063bc90106b146108d0578063c5f00841146108e3578063c7af3352146108eb57600080fd5b8063a403e4d51461085b578063ae69f3cb14610884578063b2c9336d14610897578063b888879e146108aa57600080fd5b8063840c4c7a1161019d57806394828ffd1161016c57806394828ffd1461082457806395b166bc1461082c5780639c82f2a41461083f5780639fa1826e1461085257600080fd5b8063840c4c7a1461074d5780638e510b52146107605780638ec489a214610769578063937b25811461077c57600080fd5b80636c7561e8116101d95780636c7561e81461070b578063773540b31461071e5780637a2202f3146107315780637b9a70961461073a57600080fd5b80635d36b190146106ca578063603ea03b146106d2578063636e6c40146106e5578063663e64ce146106f857600080fd5b8063372aa224116102fa5780634a5e42b11161028d57806353ca9f241161025c57806353ca9f241461067d578063570d8e1d146106915780635802a172146106a4578063597c8910146106b757600080fd5b80634a5e42b11461063b5780634bed3bc01461064e57806350ba711c1461066157806352d38e5d1461067457600080fd5b80633fc8cef3116102c95780633fc8cef3146105c55780634530820a146105ec57806345e4213b1461061f57806349c1d54d1461062857600080fd5b8063372aa2241461055357806339ebf823146105665780633b8ae397146105aa5780633dbc911f146105bd57600080fd5b80631cfbe7bc116103725780632da845a8116103415780632da845a8146104bb5780632e9958ab146104ce578063362bd1a3146104e157806336b6d9441461054057600080fd5b80631cfbe7bc146104855780631edfe3da14610498578063207134b0146104a15780632b3297f9146104aa57600080fd5b80631072cbea116103ae5780631072cbea14610439578063175188e81461044c5780631816dd4a1461045f57806318ce56bd1461047257600080fd5b806309f49bf5146103e057806309f6442c146103ea5780630acbda75146104065780630c340a2414610419575b600080fd5b6103e861099e565b005b6103f360385481565b6040519081526020015b60405180910390f35b6103e86104143660046133a9565b610a17565b610421610ac9565b6040516001600160a01b0390911681526020016103fd565b6103e86104473660046133de565b610ae6565b6103e861045a366004613408565b610b93565b6103e861046d366004613408565b610e5a565b604554610421906001600160a01b031681565b6103e86104933660046133a9565b610f61565b6103f360395481565b6103f360435481565b6048546001600160a01b0316610421565b6103e86104c9366004613408565b611023565b6103e86104dc366004613408565b611095565b604b54604c5461050d916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b03958616815293851660208501529184169183019190915290911660608201526080016103fd565b6103e861054e366004613408565b611103565b6103e8610561366004613408565b611133565b610593610574366004613408565b6035602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152016103fd565b6103e86105b8366004613408565b6111a5565b6103e86112e2565b6104217f000000000000000000000000000000000000000000000000000000000000000081565b61060f6105fa366004613408565b60496020526000908152604090205460ff1681565b60405190151581526020016103fd565b6103f3604e5481565b604254610421906001600160a01b031681565b6103e8610649366004613408565b611358565b604854600160a01b900461ffff166103f3565b6103f361066f366004613423565b611680565b6103f3603b5481565b60375461060f90600160a01b900460ff1681565b603f54610421906001600160a01b031681565b603c54610421906001600160a01b031681565b6103e86106c5366004613408565b611723565b6103e8611764565b604a54610421906001600160a01b031681565b6103e86106f33660046133a9565b61180a565b6103e86107063660046133a9565b611868565b6103e86107193660046134db565b6118c1565b6103e861072c366004613408565b611b30565b6103f360475481565b6103e8610748366004613524565b611ba2565b6103e861075b3660046135a3565b611cd8565b6103f360415481565b6103e86107773660046133a9565b611d71565b6107dd61078a3660046133a9565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a0016103fd565b6103e8611e26565b6103e861083a366004613408565b611e96565b6103e861084d366004613408565b611f5d565b6103f3603a5481565b610421610869366004613408565b6040602081905260009182529020546001600160a01b031681565b6103e86108923660046135a3565b611fcf565b6103e86108a53660046133a9565b61205d565b603754610421906001600160a01b031681565b6103e86108cb3660046133a9565b6120b6565b6103e86108de366004613629565b61210f565b6103e861231a565b61060f612390565b6103e86123c1565b6103e8610909366004613408565b612401565b6103e861091c366004613408565b6124a5565b6103f360465481565b60375461060f90600160a81b900460ff1681565b6103e861094c366004613653565b612517565b6103e861095f3660046133a9565b6125d7565b6103f37fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd981565b6103e8610999366004613408565b61268c565b603f546001600160a01b03163314806109ba57506109ba612390565b6109df5760405162461bcd60e51b81526004016109d69061366e565b60405180910390fd5b6037805460ff60a01b191690556040517fbc044409505c95b6b851433df96e1beae715c909d8e7c1d6d7ab783300d4e3b990600090a1565b610a1f612390565b610a3b5760405162461bcd60e51b81526004016109d6906136b6565b611388811115610a8d5760405162461bcd60e51b815260206004820152601760248201527f62617369732063616e6e6f74206578636565642035302500000000000000000060448201526064016109d6565b60438190556040518181527f56287a45051933ea374811b3d5d165033047be5572cac676f7c28b8be4f746c7906020015b60405180910390a150565b6000610ae16000805160206139c68339815191525490565b905090565b610aee612390565b610b0a5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff1615610b735760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920756e737570706f727465642061737365747300000000000000000060448201526064016109d6565b610b8f610b7e610ac9565b6001600160a01b038416908361272e565b5050565b610b9b612390565b610bb75760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16610bef5760405162461bcd60e51b81526004016109d6906136ed565b60345460005b81811015610c9e57826001600160a01b03166040600060348481548110610c1e57610c1e61371c565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541603610c965760405162461bcd60e51b815260206004820181905260248201527f53747261746567792069732064656661756c7420666f7220616e20617373657460448201526064016109d6565b600101610bf5565b506036548060005b82811015610cf557846001600160a01b031660368281548110610ccb57610ccb61371c565b6000918252602090912001546001600160a01b031603610ced57809150610cf5565b600101610ca6565b5081811015610e54576036610d0b600184613748565b81548110610d1b57610d1b61371c565b600091825260209091200154603680546001600160a01b039092169183908110610d4757610d4761371c565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506036805480610d8657610d8661375b565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861680835260359091526040808320805460ff19169055805163429c145b60e11b81529051879363853828b6926004808201939182900301818387803b158015610dfd57600080fd5b505af1158015610e11573d6000803e3d6000fd5b50506040516001600160a01b03881681527f09a1db4b80c32706328728508c941a6b954f31eb5affd32f236c1fd405f8fea49250602001905060405180910390a1505b50505050565b610e62612390565b610e7e5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16610eb65760405162461bcd60e51b81526004016109d6906136ed565b6001600160a01b03811660009081526049602052604090205460ff1615610f155760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481dda1a5d195b1a5cdd1959606a1b60448201526064016109d6565b6001600160a01b038116600081815260496020526040808220805460ff19166001179055517f47c8c96a5942f094264111c5fe7f6a4fe86efe63254a6fa7afa5fc84f07d58e89190a250565b610f69612390565b610f855760405162461bcd60e51b81526004016109d6906136b6565b801580610fa257506102588110158015610fa257506213c6808111155b610fee5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420636c61696d2064656c617920706572696f6400000000000060448201526064016109d6565b604e8190556040518181527fc59f5e32049abab44ddea11021f5abb89422a2f550837afcf25df9fc8d0db6b090602001610abe565b61102b612390565b6110475760405162461bcd60e51b81526004016109d6906136b6565b604280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e4af5ac389e8cde1bdaa6830881b6c987c62a45cfb3b33d27d805cde3b5775090602001610abe565b61109d612390565b6110b95760405162461bcd60e51b81526004016109d6906136b6565b604a80546001600160a01b0319166001600160a01b0383169081179091556040517faf2910d9759321733de15af1827a49830692912adeb2b3646334861f2cd2eed490600090a250565b61110b612390565b6111275760405162461bcd60e51b81526004016109d6906136b6565b61113081612785565b50565b61113b612390565b6111575760405162461bcd60e51b81526004016109d6906136b6565b603780546001600160a01b0319166001600160a01b0383169081179091556040519081527fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a90602001610abe565b6111ad612390565b6111c95760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526035602052604090205460ff16156112325760405162461bcd60e51b815260206004820152601960248201527f537472617465677920616c726561647920617070726f7665640000000000000060448201526064016109d6565b6040805180820182526001808252600060208084018281526001600160a01b038716808452603583528684209551865460ff19169015151786559051948401949094556036805493840181559091527f4a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b890910180546001600160a01b0319168317905591519081527f960dd94cbb79169f09a4e445d58b895df2d9bffa5b31055d0932d801724a20d19101610abe565b603f546001600160a01b03163314806112fe57506112fe612390565b61131a5760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a81b1916600160a81b1790556040517f71f0e5b62f846a22e0b4d159e516e62fa9c2b8eb570be15f83e67d98a2ee51e090600090a1565b611360612390565b61137c5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526033602052604090205460ff166113da5760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016109d6565b6001600160a01b03811660009081526033602052604081205461140f906509184e72a0009062010000900460ff16601261288c565b604051632fa8a91360e11b81526001600160a01b038416600482015290915081903090635f51522690602401602060405180830381865afa158015611458573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061147c9190613771565b11156114ca5760405162461bcd60e51b815260206004820152601760248201527f5661756c74207374696c6c20686f6c647320617373657400000000000000000060448201526064016109d6565b6034548060005b8281101561152057846001600160a01b0316603482815481106114f6576114f661371c565b6000918252602090912001546001600160a01b03160361151857809150611520565b6001016114d1565b50603461152e600184613748565b8154811061153e5761153e61371c565b600091825260209091200154603480546001600160a01b03909216918390811061156a5761156a61371c565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060348054806115a9576115a961375b565b60008281526020808220600019908401810180546001600160a01b031990811690915593019093556001600160a01b038716808252604080855280832080549094169093558251908152928301527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038416600081815260336020908152604091829020805464ffffffffff1916905590519182527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc910160405180910390a150505050565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546000919060011981016116c85760405162461bcd60e51b81526004016109d69061378a565b60028255603f546001600160a01b03163314806116e857506116e8612390565b6117045760405162461bcd60e51b81526004016109d69061366e565b6117128989898989896128f0565b600190925550979650505050505050565b603f546001600160a01b031633148061173f575061173f612390565b61175b5760405162461bcd60e51b81526004016109d69061366e565b6111308161293b565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146117ff5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016109d6565b6118083361299a565b565b611812612390565b61182e5760405162461bcd60e51b81526004016109d6906136b6565b600060465560478190556040518181527fc29d6fedbc6bdf267a08166c2b976fbd72aca5d6a769528616f8b9224c8f197f90602001610abe565b611870612390565b61188c5760405162461bcd60e51b81526004016109d6906136b6565b60418190556040518181527f95201f9c21f26877223b1ff4073936a6484c35495649e60e55730497aeb60d9390602001610abe565b6118c9612390565b6118e55760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff161561194e5760405162461bcd60e51b815260206004820152601760248201527f417373657420616c726561647920737570706f7274656400000000000000000060448201526064016109d6565b60405180608001604052806001151581526020018260ff166001811115611977576119776137b2565b6001811115611988576119886137b2565b81526000602080830182905260409283018290526001600160a01b0386168252603381529190208251815490151560ff19821681178355928401519192839161ff001990911661ffff19909116176101008360018111156119eb576119eb6137b2565b02179055506040820151815460609093015161ffff1663010000000264ffff0000001960ff90921662010000029190911664ffffff00001990931692909217919091179055611a3982612785565b603480546001810182556000919091527f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c10180546001600160a01b0319166001600160a01b038481169182179092556037546040516315d5220f60e31b815260048101929092529091169063aea9107890602401602060405180830381865afa158015611aca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aee9190613771565b506040516001600160a01b03831681527f4f1ac48525e50059cc1cc6e0e1940ece0dd653a4db4841538d6aef036be2fb7b906020015b60405180910390a15050565b611b38612390565b611b545760405162461bcd60e51b81526004016109d6906136b6565b603f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f869e0abd13cc3a975de7b93be3df1cb2255c802b1cead85963cc79d99f131bee90602001610abe565b611baa612390565b611bc65760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03821660009081526033602052604090205460ff16611c245760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b60448201526064016109d6565b6103e88161ffff1610611c6d5760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b60448201526064016109d6565b6001600160a01b038216600081815260336020908152604091829020805464ffff0000001916630100000061ffff8716908102919091179091558251938452908301527f8d22e9d2cbe8bb65a3c4412bd8970743864512a1a0e004e8d00fb96277b78b949101611b24565b603f546001600160a01b0316331480611cf45750611cf4612390565b611d105760405162461bcd60e51b81526004016109d69061366e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546001198101611d545760405162461bcd60e51b81526004016109d69061378a565b60028255611d6587878787876129f9565b50600190555050505050565b603f546001600160a01b0316331480611d8d5750611d8d612390565b611da95760405162461bcd60e51b81526004016109d69061366e565b670de0b6b3a7640000811115611df15760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b60448201526064016109d6565b60398190556040518181527f41ecb23a0e7865b25f38c268b7c3012220d822929e9edff07326e89d5bb822b590602001610abe565b603f546001600160a01b0316331480611e425750611e42612390565b611e5e5760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a81b191690556040517f891ebab18da80ebeeea06b1b1cede098329c4c008906a98370c2ac7a80b571cb90600090a1565b611e9e612390565b611eba5760405162461bcd60e51b81526004016109d6906136b6565b6001600160a01b03811660009081526049602052604090205460ff16611f145760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016109d6565b6001600160a01b038116600081815260496020526040808220805460ff19169055517f0ec40967a61509853550658e51d0e4297f7cba244fe4adc8ba18b5631ac20e2f9190a250565b611f65612390565b611f815760405162461bcd60e51b81526004016109d6906136b6565b604880546001600160a01b0319166001600160a01b0383169081179091556040519081527f7d7719313229e558c5a3893cad2eb86a86a049156d1d9ebd5c63a8eedefd1c0390602001610abe565b603f546001600160a01b0316331480611feb5750611feb612390565b6120075760405162461bcd60e51b81526004016109d69061366e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac45358054600119810161204b5760405162461bcd60e51b81526004016109d69061378a565b60028255611d65308888888888612c31565b612065612390565b6120815760405162461bcd60e51b81526004016109d6906136b6565b603a8190556040518181527f2ec5fb5a3d2703edc461252d92ccd2799c3c74f01d97212b20388207fa17ae4590602001610abe565b6120be612390565b6120da5760405162461bcd60e51b81526004016109d6906136b6565b603b8190556040518181527f39367850377ac04920a9a670f2180e7a94d83b15ad302e59875ec58fd10bd37d90602001610abe565b603f546001600160a01b031633148061212b575061212b612390565b6121475760405162461bcd60e51b81526004016109d69061366e565b604080516001600160a01b038085168252831660208201527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038116156122ec576001600160a01b03811660009081526035602052604090205460ff166121d15760405162461bcd60e51b81526004016109d6906136ed565b6001600160a01b038216600090815260336020526040902054819060ff166122345760405162461bcd60e51b8152602060048201526016602482015275105cdcd95d081a5cc81b9bdd081cdd5c1c1bdc9d195960521b60448201526064016109d6565b60405163551c457b60e11b81526001600160a01b03848116600483015282169063aa388af690602401602060405180830381865afa15801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e91906137c8565b6122ea5760405162461bcd60e51b815260206004820152601f60248201527f4173736574206e6f7420737570706f727465642062792053747261746567790060448201526064016109d6565b505b6001600160a01b03918216600090815260406020819052902080546001600160a01b03191691909216179055565b603f546001600160a01b03163314806123365750612336612390565b6123525760405162461bcd60e51b81526004016109d69061366e565b6037805460ff60a01b1916600160a01b1790556040517f8cff26a5985614b3d30629cc4ab83824bf115aec971b718d8f2f99562032e97290600090a1565b60006123a86000805160206139c68339815191525490565b6001600160a01b0316336001600160a01b031614905090565b603f546001600160a01b03163314806123dd57506123dd612390565b6123f95760405162461bcd60e51b81526004016109d69061366e565b611808612c9a565b612409612390565b6124255760405162461bcd60e51b81526004016109d6906136b6565b61244d817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b031661246d6000805160206139c68339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6124ad612390565b6124c95760405162461bcd60e51b81526004016109d6906136b6565b604580546001600160a01b0319166001600160a01b0383169081179091556040519081527fa12850fb726e0b2b7b3c9a9342031e1268a8148d0eb06b4bea8613204ffcd2b890602001610abe565b61251f612390565b61253b5760405162461bcd60e51b81526004016109d6906136b6565b6127118161ffff16106125875760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420626173697320706f696e747360601b60448201526064016109d6565b6048805461ffff60a01b1916600160a01b61ffff8416908102919091179091556040519081527ff12c00256bee2b6facb111a88a9b1cff86e79132939b44f1353212d6f746955790602001610abe565b6125df612390565b6125fb5760405162461bcd60e51b81526004016109d6906136b6565b6103e88111156126575760405162461bcd60e51b815260206004820152602160248201527f52656465656d206665652073686f756c64206e6f74206265206f7665722031306044820152602560f81b60648201526084016109d6565b60388190556040518181527fd6c7508d6658ccee36b7b7d7fd72e5cbaeefb40c64eff24e9ae7470e846304ee90602001610abe565b612694612390565b6126b05760405162461bcd60e51b81526004016109d6906136b6565b803b61270a5760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016109d6565b7fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd955565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612780908490612cf1565b505050565b6001600160a01b0381166000908152603360205260409020805462010000900460ff16156127b1575050565b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa1580156127f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061281591906137ea565b905060068160ff161015801561282f575060128160ff1611155b6128725760405162461bcd60e51b81526020600482015260146024820152732ab732bc3832b1ba32b210383932b1b4b9b4b7b760611b60448201526064016109d6565b815460ff909116620100000262ff00001990911617905550565b6000818311156128bc576128b56128a38385613748565b6128ae90600a6138ee565b8590612dc3565b93506128e6565b818310156128e6576128e36128d18484613748565b6128dc90600a6138ee565b8590612dd8565b93505b50825b9392505050565b60405162461bcd60e51b815260206004820152601d60248201527f436f6c6c61746572616c2073776170206e6f7420737570706f7274656400000060448201526000906064016109d6565b61294481612de4565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561297f57600080fd5b505af1158015612993573d6000803e3d6000fd5b5050505050565b6001600160a01b0381166129f05760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016109d6565b61113081612ea8565b6001600160a01b03851660009081526035602052604090205460ff16612a575760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420746f20537472617465677960681b60448201526064016109d6565b600183148015612a675750600181145b8015612acb57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684846000818110612aab57612aab61371c565b9050602002016020810190612ac09190613408565b6001600160a01b0316145b612b105760405162461bcd60e51b815260206004820152601660248201527513db9b1e4815d15512081a5cc81cdd5c1c1bdc9d195960521b60448201526064016109d6565b612b18612f0f565b82826000818110612b2b57612b2b61371c565b905060200201351115612b805760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768205745544820617661696c61626c650000000000000060448201526064016109d6565b612bd78583836000818110612b9757612b9761371c565b905060200201357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031661272e9092919063ffffffff16565b846001600160a01b031663de5f62686040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c1257600080fd5b505af1158015612c26573d6000803e3d6000fd5b505050505050505050565b612c3f86868686868661301d565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612c7a57600080fd5b505af1158015612c8e573d6000803e3d6000fd5b50505050505050505050565b612ca26131a5565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612cdd57600080fd5b505af1158015610e54573d6000803e3d6000fd5b6000612d46826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166132319092919063ffffffff16565b8051909150156127805780806020019051810190612d6491906137c8565b6127805760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109d6565b6000612dcf82846138fa565b90505b92915050565b6000612dcf8284613911565b6001600160a01b03811660009081526035602052604090205460ff16612e4c5760405162461bcd60e51b815260206004820152601960248201527f5374726174656779206973206e6f7420737570706f727465640000000000000060448201526064016109d6565b6000819050806001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612e8c57600080fd5b505af1158015612ea0573d6000803e3d6000fd5b505050505050565b806001600160a01b0316612ec86000805160206139c68339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a36000805160206139c683398151915255565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301526000928391612f5f9190613933565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015612fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ff89190613771565b905081811161300b576000935050505090565b6130158282613748565b935050505090565b6001600160a01b03851660009081526035602052604090205460ff1661307d5760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642066726f6d20537472617465677960581b60448201526064016109d6565b8281146130cc5760405162461bcd60e51b815260206004820152601960248201527f506172616d65746572206c656e677468206d69736d617463680000000000000060448201526064016109d6565b8260005b8181101561319b57866001600160a01b031663d9caed12898888858181106130fa576130fa61371c565b905060200201602081019061310f9190613408565b8787868181106131215761312161371c565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561317857600080fd5b505af115801561318c573d6000803e3d6000fd5b505050508060010190506130d0565b5050505050505050565b60365460005b81811015610b8f57603681815481106131c6576131c661371c565b60009182526020822001546040805163429c145b60e11b815290516001600160a01b039092169263853828b69260048084019382900301818387803b15801561320e57600080fd5b505af1158015613222573d6000803e3d6000fd5b505050508060010190506131ab565b60606132408484600085613248565b949350505050565b6060824710156132a95760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016109d6565b843b6132f75760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109d6565b600080866001600160a01b031685876040516133139190613976565b60006040518083038185875af1925050503d8060008114613350576040519150601f19603f3d011682016040523d82523d6000602084013e613355565b606091505b5091509150613365828286613370565b979650505050505050565b6060831561337f5750816128e9565b82511561338f5782518084602001fd5b8160405162461bcd60e51b81526004016109d69190613992565b6000602082840312156133bb57600080fd5b5035919050565b80356001600160a01b03811681146133d957600080fd5b919050565b600080604083850312156133f157600080fd5b6133fa836133c2565b946020939093013593505050565b60006020828403121561341a57600080fd5b612dcf826133c2565b60008060008060008060a0878903121561343c57600080fd5b613445876133c2565b9550613453602088016133c2565b94506040870135935060608701359250608087013567ffffffffffffffff81111561347d57600080fd5b8701601f8101891361348e57600080fd5b803567ffffffffffffffff8111156134a557600080fd5b8960208284010111156134b757600080fd5b60208201935080925050509295509295509295565b60ff8116811461113057600080fd5b600080604083850312156134ee57600080fd5b6134f7836133c2565b91506020830135613507816134cc565b809150509250929050565b803561ffff811681146133d957600080fd5b6000806040838503121561353757600080fd5b613540836133c2565b915061354e60208401613512565b90509250929050565b60008083601f84011261356957600080fd5b50813567ffffffffffffffff81111561358157600080fd5b6020830191508360208260051b850101111561359c57600080fd5b9250929050565b6000806000806000606086880312156135bb57600080fd5b6135c4866133c2565b9450602086013567ffffffffffffffff8111156135e057600080fd5b6135ec88828901613557565b909550935050604086013567ffffffffffffffff81111561360c57600080fd5b61361888828901613557565b969995985093965092949392505050565b6000806040838503121561363c57600080fd5b613645836133c2565b915061354e602084016133c2565b60006020828403121561366557600080fd5b612dcf82613512565b60208082526028908201527f43616c6c6572206973206e6f74207468652053747261746567697374206f722060408201526723b7bb32b93737b960c11b606082015260800190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60208082526015908201527414dd1c985d1959de481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b81810381811115612dd257612dd2613732565b634e487b7160e01b600052603160045260246000fd5b60006020828403121561378357600080fd5b5051919050565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b6000602082840312156137da57600080fd5b815180151581146128e957600080fd5b6000602082840312156137fc57600080fd5b81516128e9816134cc565b6001815b60018411156138425780850481111561382657613826613732565b600184161561383457908102905b60019390931c92800261380b565b935093915050565b60008261385957506001612dd2565b8161386657506000612dd2565b816001811461387c5760028114613886576138a2565b6001915050612dd2565b60ff84111561389757613897613732565b50506001821b612dd2565b5060208310610133831016604e8410600b84101617156138c5575081810a612dd2565b6138d26000198484613807565b80600019048211156138e6576138e6613732565b029392505050565b6000612dcf838361384a565b8082028115828204841417612dd257612dd2613732565b60008261392e57634e487b7160e01b600052601260045260246000fd5b500490565b6001600160801b038281168282160390811115612dd257612dd2613732565b60005b8381101561396d578181015183820152602001613955565b50506000910152565b60008251613988818460208701613952565b9190910192915050565b60208152600082518060208401526139b1816040850160208701613952565b601f01601f1916919091016040019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220f3a953b6afb0ee1b1db0613863d2312879b406a56429f6bbb1d935e8d4b6ad8164736f6c634300081c0033", + "numDeployments": 8, + "solcInputHash": "3d93c313784f00c00800e6c458e27c1d", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"AllocateThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"AssetAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"AssetDefaultStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetSupported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dripDuration\",\"type\":\"uint256\"}],\"name\":\"DripDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"DripperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyDiffChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"NetOusdMintForStrategyThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"OusdMetaStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"PriceProviderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebasePaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rebaseRatePerSecond\",\"type\":\"uint256\"}],\"name\":\"RebasePerSecondMaxChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"RebaseThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebaseUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"RedeemFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"StrategistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyAddedToMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyRemovedFromMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapAllowedUndervalueChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapSlippageChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAssetAmount\",\"type\":\"uint256\"}],\"name\":\"Swapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"SwapperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"TrusteeAddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"TrusteeFeeBpsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"VaultBufferUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newDelay\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_claimable\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newClaimable\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_queued\",\"type\":\"uint256\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_yield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"YieldDistribution\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"strategyAddr\",\"type\":\"address\"}],\"name\":\"addStrategyToMintWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminImplPosition\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allowedSwapUndervalue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"approveStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetDefaultStrategies\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"autoAllocateThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"cacheDecimals\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"capitalPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyToAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"depositToStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripDuration\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isMintWhitelistedStrategy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRebase\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyDiff\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintForStrategyThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintedForStrategy\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oUSD\",\"outputs\":[{\"internalType\":\"contract OUSD\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ousdMetaStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseCapital\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pauseRebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePerSecondMax\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePerSecondTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebaseThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"removeAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"removeStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"strategyAddr\",\"type\":\"address\"}],\"name\":\"removeStrategyFromMintWhitelist\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImpl\",\"type\":\"address\"}],\"name\":\"setAdminImpl\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"setAssetDefaultStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setAutoAllocateThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_dripDuration\",\"type\":\"uint256\"}],\"name\":\"setDripDuration\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"setDripper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"setMaxSupplyDiff\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setNetOusdMintForStrategyThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint16\",\"name\":\"_allowedOracleSlippageBps\",\"type\":\"uint16\"}],\"name\":\"setOracleSlippage\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"setOusdMetaStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"setPriceProvider\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"yearlyApr\",\"type\":\"uint256\"}],\"name\":\"setRebaseRateMax\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"setRebaseThreshold\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"setRedeemFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setStrategistAddr\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint16\",\"name\":\"_basis\",\"type\":\"uint16\"}],\"name\":\"setSwapAllowedUndervalue\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_swapperAddr\",\"type\":\"address\"}],\"name\":\"setSwapper\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"setTrusteeAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"setTrusteeFeeBps\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"setVaultBuffer\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_delay\",\"type\":\"uint256\"}],\"name\":\"setWithdrawalClaimDelay\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"strategies\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_deprecated\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint8\",\"name\":\"_unitConversion\",\"type\":\"uint8\"}],\"name\":\"supportAsset\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minToAssetAmount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"name\":\"swapCollateral\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"toAssetAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"swapper_\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseCapital\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"unpauseRebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultBuffer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawAllFromStrategies\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyAddr\",\"type\":\"address\"}],\"name\":\"withdrawAllFromStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_strategyFromAddress\",\"type\":\"address\"},{\"internalType\":\"address[]\",\"name\":\"_assets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"_amounts\",\"type\":\"uint256[]\"}],\"name\":\"withdrawFromStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalClaimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalQueueMetadata\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimable\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimed\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"nextWithdrawalIndex\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalRequests\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"withdrawer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"},{\"internalType\":\"uint40\",\"name\":\"timestamp\",\"type\":\"uint40\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{\"addStrategyToMintWhitelist(address)\":{\"params\":{\"strategyAddr\":\"Strategy address\"}},\"allowedSwapUndervalue()\":{\"returns\":{\"value\":\"Percentage in basis points.\"}},\"approveStrategy(address)\":{\"params\":{\"_addr\":\"Address of the strategy to add\"}},\"cacheDecimals(address)\":{\"params\":{\"_asset\":\"Address of asset token\"}},\"depositToStrategy(address,address[],uint256[])\":{\"params\":{\"_amounts\":\"Array of amounts of each corresponding asset to deposit.\",\"_assets\":\"Array of asset address that will be deposited into the strategy.\",\"_strategyToAddress\":\"Address of the Strategy to deposit assets into.\"}},\"removeAsset(address)\":{\"params\":{\"_asset\":\"Address of asset\"}},\"removeStrategy(address)\":{\"params\":{\"_addr\":\"Address of the strategy to remove\"}},\"removeStrategyFromMintWhitelist(address)\":{\"params\":{\"strategyAddr\":\"Strategy address\"}},\"setAdminImpl(address)\":{\"params\":{\"newImpl\":\"address of the implementation\"}},\"setAssetDefaultStrategy(address,address)\":{\"params\":{\"_asset\":\"Address of the asset\",\"_strategy\":\"Address of the Strategy\"}},\"setAutoAllocateThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setDripDuration(uint256)\":{\"params\":{\"_dripDuration\":\"Time in seconds to target a constant yield rate\"}},\"setDripper(address)\":{\"params\":{\"_dripper\":\"Address of the Dripper contract.\"}},\"setNetOusdMintForStrategyThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setOracleSlippage(address,uint16)\":{\"params\":{\"_allowedOracleSlippageBps\":\"allowed slippage from Oracle in basis points. eg 20 = 0.2%. Max 10%.\",\"_asset\":\"Address of the asset token.\"}},\"setOusdMetaStrategy(address)\":{\"params\":{\"_ousdMetaStrategy\":\"Address of OToken metapool strategy\"}},\"setPriceProvider(address)\":{\"params\":{\"_priceProvider\":\"Address of price provider\"}},\"setRebaseRateMax(uint256)\":{\"params\":{\"yearlyApr\":\"in 1e18 notation. 3 * 1e18 = 3% APR\"}},\"setRebaseThreshold(uint256)\":{\"params\":{\"_threshold\":\"OToken amount with 18 fixed decimals.\"}},\"setRedeemFeeBps(uint256)\":{\"params\":{\"_redeemFeeBps\":\"Basis point fee to be charged\"}},\"setStrategistAddr(address)\":{\"params\":{\"_address\":\"Address of Strategist\"}},\"setSwapAllowedUndervalue(uint16)\":{\"params\":{\"_basis\":\"Percentage in basis points. eg 100 == 1%\"}},\"setSwapper(address)\":{\"params\":{\"_swapperAddr\":\"Address of the Swapper contract that implements the ISwapper interface.\"}},\"setVaultBuffer(uint256)\":{\"params\":{\"_vaultBuffer\":\"Percentage using 18 decimals. 100% = 1e18.\"}},\"setWithdrawalClaimDelay(uint256)\":{\"params\":{\"_delay\":\"Delay period (should be between 10 mins to 7 days). Set to 0 to disable async withdrawals\"}},\"supportAsset(address,uint8)\":{\"params\":{\"_asset\":\"Address of asset\"}},\"swapCollateral(address,address,uint256,uint256,bytes)\":{\"params\":{\"_data\":\"implementation specific data. eg 1Inch swap data\",\"_fromAsset\":\"The token address of the asset being sold by the vault.\",\"_fromAssetAmount\":\"The amount of assets being sold by the vault.\",\"_minToAssetAmount\":\"The minimum amount of assets to be purchased.\",\"_toAsset\":\"The token address of the asset being purchased by the vault.\"},\"returns\":{\"toAssetAmount\":\"The amount of toAssets that was received from the swap\"}},\"transferGovernance(address)\":{\"params\":{\"_newGovernor\":\"Address of the new Governor\"}},\"transferToken(address,uint256)\":{\"params\":{\"_amount\":\"Amount of the asset to transfer\",\"_asset\":\"Address for the asset\"}},\"withdrawAllFromStrategy(address)\":{\"params\":{\"_strategyAddr\":\"Strategy address.\"}},\"withdrawFromStrategy(address,address[],uint256[])\":{\"params\":{\"_amounts\":\"Array of amounts of each corresponding asset to withdraw.\",\"_assets\":\"Array of asset address that will be withdrawn from the strategy.\",\"_strategyFromAddress\":\"Address of the Strategy to withdraw assets from.\"}}},\"title\":\"OETH VaultAdmin Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addStrategyToMintWhitelist(address)\":{\"notice\":\"Adds a strategy to the mint whitelist. Reverts if strategy isn't approved on Vault.\"},\"allowedSwapUndervalue()\":{\"notice\":\"Max allowed percentage the vault total value can drop below the OToken total supply in basis points when executing a collateral swap. For example 100 == 1%\"},\"approveStrategy(address)\":{\"notice\":\"Add a strategy to the Vault.\"},\"assetDefaultStrategies(address)\":{\"notice\":\"Mapping of asset address to the Strategy that they should automatically\"},\"autoAllocateThreshold()\":{\"notice\":\"OToken mints over this amount automatically allocate funds. 18 decimals.\"},\"cacheDecimals(address)\":{\"notice\":\"Cache decimals on OracleRouter for a particular asset. This action is required before that asset's price can be accessed.\"},\"capitalPaused()\":{\"notice\":\"pause operations that change the OToken supply. eg mint, redeem, allocate, mint/burn for strategy\"},\"claimGovernance()\":{\"notice\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"depositToStrategy(address,address[],uint256[])\":{\"notice\":\"Deposit multiple assets from the vault into the strategy.\"},\"dripDuration()\":{\"notice\":\"Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable.\"},\"dripper()\":{\"notice\":\"Address of the Dripper contract that streams harvested rewards to the Vault\"},\"governor()\":{\"notice\":\"Returns the address of the current Governor.\"},\"isGovernor()\":{\"notice\":\"Returns true if the caller is the current Governor.\"},\"lastRebase()\":{\"notice\":\"Time in seconds that the vault last rebased yield.\"},\"maxSupplyDiff()\":{\"notice\":\"Max difference between total supply and total value of assets. 18 decimals.\"},\"netOusdMintForStrategyThreshold()\":{\"notice\":\"How much net total OTokens are allowed to be minted by all strategies\"},\"netOusdMintedForStrategy()\":{\"notice\":\"How much OTokens are currently minted by the strategy\"},\"ousdMetaStrategy()\":{\"notice\":\"Metapool strategy that is allowed to mint/burn OTokens without changing collateral\"},\"pauseCapital()\":{\"notice\":\"Set the deposit paused flag to true to prevent capital movement.\"},\"pauseRebase()\":{\"notice\":\"Set the deposit paused flag to true to prevent rebasing.\"},\"priceProvider()\":{\"notice\":\"Address of the Oracle price provider contract\"},\"rebasePaused()\":{\"notice\":\"pause rebasing if true\"},\"rebasePerSecondMax()\":{\"notice\":\"max rebase percentage per second Can be used to set maximum yield of the protocol, spreading out yield over time\"},\"rebasePerSecondTarget()\":{\"notice\":\"target rebase rate limit, based on past rates and funds available.\"},\"rebaseThreshold()\":{\"notice\":\"OToken mints over this amount automatically rebase. 18 decimals.\"},\"redeemFeeBps()\":{\"notice\":\"Redemption fee in basis points. eg 50 = 0.5%\"},\"removeAsset(address)\":{\"notice\":\"Remove a supported asset from the Vault\"},\"removeStrategy(address)\":{\"notice\":\"Remove a strategy from the Vault.\"},\"removeStrategyFromMintWhitelist(address)\":{\"notice\":\"Removes a strategy from the mint whitelist.\"},\"setAdminImpl(address)\":{\"notice\":\"set the implementation for the admin, this needs to be in a base class else we cannot set it\"},\"setAssetDefaultStrategy(address,address)\":{\"notice\":\"Set the default Strategy for an asset, i.e. the one which the asset will be automatically allocated to and withdrawn from\"},\"setAutoAllocateThreshold(uint256)\":{\"notice\":\"Sets the minimum amount of OTokens in a mint to trigger an automatic allocation of funds afterwords.\"},\"setDripDuration(uint256)\":{\"notice\":\"Set the drip duration period\"},\"setDripper(address)\":{\"notice\":\"Set the Dripper contract that streams harvested rewards to the vault.\"},\"setMaxSupplyDiff(uint256)\":{\"notice\":\"Sets the maximum allowable difference between total supply and backing assets' value.\"},\"setNetOusdMintForStrategyThreshold(uint256)\":{\"notice\":\"Set maximum amount of OTokens that can at any point be minted and deployed to strategy (used only by ConvexOUSDMetaStrategy for now).\"},\"setOracleSlippage(address,uint16)\":{\"notice\":\"Set the allowed slippage from the Oracle price for collateral asset swaps.\"},\"setOusdMetaStrategy(address)\":{\"notice\":\"Set OToken Metapool strategy\"},\"setPriceProvider(address)\":{\"notice\":\"Set address of price provider.\"},\"setRebaseRateMax(uint256)\":{\"notice\":\"Set a yield streaming max rate. This spreads yield over time if it is above the max rate.\"},\"setRebaseThreshold(uint256)\":{\"notice\":\"Set a minimum amount of OTokens in a mint or redeem that triggers a rebase\"},\"setRedeemFeeBps(uint256)\":{\"notice\":\"Set a fee in basis points to be charged for a redeem.\"},\"setStrategistAddr(address)\":{\"notice\":\"Set address of Strategist\"},\"setSwapAllowedUndervalue(uint16)\":{\"notice\":\"Set max allowed percentage the vault total value can drop below the OToken total supply in basis points when executing collateral swaps.\"},\"setSwapper(address)\":{\"notice\":\"Set the contract the performs swaps of collateral assets.\"},\"setTrusteeAddress(address)\":{\"notice\":\"Sets the trusteeAddress that can receive a portion of yield. Setting to the zero address disables this feature.\"},\"setTrusteeFeeBps(uint256)\":{\"notice\":\"Sets the TrusteeFeeBps to the percentage of yield that should be received in basis points.\"},\"setVaultBuffer(uint256)\":{\"notice\":\"Set a buffer of assets to keep in the Vault to handle most redemptions without needing to spend gas unwinding assets from a Strategy.\"},\"setWithdrawalClaimDelay(uint256)\":{\"notice\":\"Changes the async withdrawal claim period for OETH & superOETHb\"},\"strategistAddr()\":{\"notice\":\"Address of the Strategist\"},\"supportAsset(address,uint8)\":{\"notice\":\"Add a supported asset to the contract, i.e. one that can be to mint OTokens.\"},\"swapCollateral(address,address,uint256,uint256,bytes)\":{\"notice\":\"Strategist swaps collateral assets sitting in the vault.\"},\"swapper()\":{\"notice\":\"Contract that swaps the vault's collateral assets\"},\"transferGovernance(address)\":{\"notice\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\"},\"transferToken(address,uint256)\":{\"notice\":\"Transfer token to governor. Intended for recovering tokens stuck in contract, i.e. mistaken sends.\"},\"trusteeAddress()\":{\"notice\":\"Trustee contract that can collect a percentage of yield\"},\"trusteeFeeBps()\":{\"notice\":\"Amount of yield collected in basis points. eg 2000 = 20%\"},\"unpauseCapital()\":{\"notice\":\"Set the deposit paused flag to false to enable capital movement.\"},\"unpauseRebase()\":{\"notice\":\"Set the deposit paused flag to true to allow rebasing.\"},\"vaultBuffer()\":{\"notice\":\"Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\"},\"withdrawAllFromStrategies()\":{\"notice\":\"Withdraws all assets from all the strategies and sends assets to the Vault.\"},\"withdrawAllFromStrategy(address)\":{\"notice\":\"Withdraws all assets from the strategy and sends assets to the Vault.\"},\"withdrawFromStrategy(address,address[],uint256[])\":{\"notice\":\"Withdraw multiple assets from the strategy to the vault.\"},\"withdrawalClaimDelay()\":{\"notice\":\"Sets a minimum delay that is required to elapse between requesting async withdrawals and claiming the request. When set to 0 async withdrawals are disabled.\"},\"withdrawalQueueMetadata()\":{\"notice\":\"Global metadata for the withdrawal queue including: queued - cumulative total of all withdrawal requests included the ones that have already been claimed claimable - cumulative total of all the requests that can be claimed including the ones already claimed claimed - total of all the requests that have been claimed nextWithdrawalIndex - index of the next withdrawal request starting at 0\"},\"withdrawalRequests(uint256)\":{\"notice\":\"Mapping of withdrawal request indices to the user withdrawal request data\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vault/OETHVaultAdmin.sol\":\"OETHVaultAdmin\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX 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 *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\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 require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(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 require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(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 require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(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 require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(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 require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(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 require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\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 require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\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 require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\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 * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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 * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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 * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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 * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\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 * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\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 require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base for contracts that are managed by the Origin Protocol's Governor.\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @notice Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @notice Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n emit GovernorshipTransferred(_governor(), newGovernor);\\n\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @notice Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @notice Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0xf32f873c8bfbacf2e5f01d0cf37bc7f54fbd5aa656e95c8a599114229946f107\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IBasicToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBasicToken {\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa562062698aa12572123b36dfd2072f1a39e44fed2031cc19c2c9fd522f96ec2\",\"license\":\"MIT\"},\"contracts/interfaces/IOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\ninterface IOracle {\\n /**\\n * @dev returns the asset price in USD, in 8 decimal digits.\\n *\\n * The version of priceProvider deployed for OETH has 18 decimal digits\\n */\\n function price(address asset) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa5f765f5b22cd5426803b22a7344d4c34c4d4016a0b6e9d799862133253f77b2\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Platform interface to integrate with lending platform like Compound, AAVE etc.\\n */\\ninterface IStrategy {\\n /**\\n * @dev Deposit the given asset to platform\\n * @param _asset asset address\\n * @param _amount Amount to deposit\\n */\\n function deposit(address _asset, uint256 _amount) external;\\n\\n /**\\n * @dev Deposit the entire balance of all supported assets in the Strategy\\n * to the platform\\n */\\n function depositAll() external;\\n\\n /**\\n * @dev Withdraw given asset from Lending platform\\n */\\n function withdraw(\\n address _recipient,\\n address _asset,\\n uint256 _amount\\n ) external;\\n\\n /**\\n * @dev Liquidate all assets in strategy and return them to Vault.\\n */\\n function withdrawAll() external;\\n\\n /**\\n * @dev Returns the current balance of the given asset.\\n */\\n function checkBalance(address _asset)\\n external\\n view\\n returns (uint256 balance);\\n\\n /**\\n * @dev Returns bool indicating whether strategy supports asset.\\n */\\n function supportsAsset(address _asset) external view returns (bool);\\n\\n /**\\n * @dev Collect reward tokens from the Strategy.\\n */\\n function collectRewardTokens() external;\\n\\n /**\\n * @dev The address array of the reward tokens for the Strategy.\\n */\\n function getRewardTokenAddresses() external view returns (address[] memory);\\n\\n function harvesterAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x3e9fcd1bfb6f82fd8e04284d0d728a932ffbb88fe52dd89fdeb45b6b17eedae5\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/ISwapper.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\ninterface ISwapper {\\n /**\\n * @param fromAsset The token address of the asset being sold.\\n * @param toAsset The token address of the asset being purchased.\\n * @param fromAssetAmount The amount of assets being sold.\\n * @param minToAssetAmmount The minimum amount of assets to be purchased.\\n * @param data tx.data returned from 1Inch's /v5.0/1/swap API\\n */\\n function swap(\\n address fromAsset,\\n address toAsset,\\n uint256 fromAssetAmount,\\n uint256 minToAssetAmmount,\\n bytes calldata data\\n ) external returns (uint256 toAssetAmount);\\n}\\n\",\"keccak256\":\"0x70546d5e20c833bcd261ca3a4349c747e3fb3b44e1dd0fce4d2eaec80ff74379\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IVault.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { VaultStorage } from \\\"../vault/VaultStorage.sol\\\";\\n\\ninterface IVault {\\n // slither-disable-start constable-states\\n\\n event AssetSupported(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n\\n // Governable.sol\\n function transferGovernance(address _newGovernor) external;\\n\\n function claimGovernance() external;\\n\\n function governor() external view returns (address);\\n\\n function ADMIN_IMPLEMENTATION() external view returns (address);\\n\\n // VaultAdmin.sol\\n function setPriceProvider(address _priceProvider) external;\\n\\n function priceProvider() external view returns (address);\\n\\n function setRedeemFeeBps(uint256 _redeemFeeBps) external;\\n\\n function redeemFeeBps() external view returns (uint256);\\n\\n function setVaultBuffer(uint256 _vaultBuffer) external;\\n\\n function vaultBuffer() external view returns (uint256);\\n\\n function setAutoAllocateThreshold(uint256 _threshold) external;\\n\\n function autoAllocateThreshold() external view returns (uint256);\\n\\n function setRebaseThreshold(uint256 _threshold) external;\\n\\n function rebaseThreshold() external view returns (uint256);\\n\\n function setStrategistAddr(address _address) external;\\n\\n function strategistAddr() external view returns (address);\\n\\n function setMaxSupplyDiff(uint256 _maxSupplyDiff) external;\\n\\n function maxSupplyDiff() external view returns (uint256);\\n\\n function setTrusteeAddress(address _address) external;\\n\\n function trusteeAddress() external view returns (address);\\n\\n function setTrusteeFeeBps(uint256 _basis) external;\\n\\n function trusteeFeeBps() external view returns (uint256);\\n\\n function ousdMetaStrategy() external view returns (address);\\n\\n function setSwapper(address _swapperAddr) external;\\n\\n function setSwapAllowedUndervalue(uint16 _percentageBps) external;\\n\\n function setOracleSlippage(address _asset, uint16 _allowedOracleSlippageBps)\\n external;\\n\\n function supportAsset(address _asset, uint8 _unitConversion) external;\\n\\n function approveStrategy(address _addr) external;\\n\\n function removeStrategy(address _addr) external;\\n\\n function setAssetDefaultStrategy(address _asset, address _strategy)\\n external;\\n\\n function assetDefaultStrategies(address _asset)\\n external\\n view\\n returns (address);\\n\\n function pauseRebase() external;\\n\\n function unpauseRebase() external;\\n\\n function rebasePaused() external view returns (bool);\\n\\n function pauseCapital() external;\\n\\n function unpauseCapital() external;\\n\\n function capitalPaused() external view returns (bool);\\n\\n function transferToken(address _asset, uint256 _amount) external;\\n\\n function priceUnitMint(address asset) external view returns (uint256);\\n\\n function priceUnitRedeem(address asset) external view returns (uint256);\\n\\n function withdrawAllFromStrategy(address _strategyAddr) external;\\n\\n function withdrawAllFromStrategies() external;\\n\\n function withdrawFromStrategy(\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external;\\n\\n function depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external;\\n\\n // VaultCore.sol\\n function mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) external;\\n\\n function mintForStrategy(uint256 _amount) external;\\n\\n function redeem(uint256 _amount, uint256 _minimumUnitAmount) external;\\n\\n function burnForStrategy(uint256 _amount) external;\\n\\n function allocate() external;\\n\\n function rebase() external;\\n\\n function swapCollateral(\\n address fromAsset,\\n address toAsset,\\n uint256 fromAssetAmount,\\n uint256 minToAssetAmount,\\n bytes calldata data\\n ) external returns (uint256 toAssetAmount);\\n\\n function totalValue() external view returns (uint256 value);\\n\\n function checkBalance(address _asset) external view returns (uint256);\\n\\n function calculateRedeemOutputs(uint256 _amount)\\n external\\n view\\n returns (uint256[] memory);\\n\\n function getAssetCount() external view returns (uint256);\\n\\n function getAssetConfig(address _asset)\\n external\\n view\\n returns (VaultStorage.Asset memory config);\\n\\n function getAllAssets() external view returns (address[] memory);\\n\\n function getStrategyCount() external view returns (uint256);\\n\\n function swapper() external view returns (address);\\n\\n function allowedSwapUndervalue() external view returns (uint256);\\n\\n function getAllStrategies() external view returns (address[] memory);\\n\\n function isSupportedAsset(address _asset) external view returns (bool);\\n\\n function netOusdMintForStrategyThreshold() external view returns (uint256);\\n\\n function setOusdMetaStrategy(address _ousdMetaStrategy) external;\\n\\n function setNetOusdMintForStrategyThreshold(uint256 _threshold) external;\\n\\n function netOusdMintedForStrategy() external view returns (int256);\\n\\n function setDripper(address _dripper) external;\\n\\n function dripper() external view returns (address);\\n\\n function weth() external view returns (address);\\n\\n function cacheWETHAssetIndex() external;\\n\\n function wethAssetIndex() external view returns (uint256);\\n\\n function initialize(address, address) external;\\n\\n function setAdminImpl(address) external;\\n\\n function removeAsset(address _asset) external;\\n\\n // These are OETH specific functions\\n function addWithdrawalQueueLiquidity() external;\\n\\n function requestWithdrawal(uint256 _amount)\\n external\\n returns (uint256 requestId, uint256 queued);\\n\\n function claimWithdrawal(uint256 requestId)\\n external\\n returns (uint256 amount);\\n\\n function claimWithdrawals(uint256[] memory requestIds)\\n external\\n returns (uint256[] memory amounts, uint256 totalAmount);\\n\\n function withdrawalQueueMetadata()\\n external\\n view\\n returns (VaultStorage.WithdrawalQueueMetadata memory);\\n\\n function withdrawalRequests(uint256 requestId)\\n external\\n view\\n returns (VaultStorage.WithdrawalRequest memory);\\n\\n // OETHb specific functions\\n function addStrategyToMintWhitelist(address strategyAddr) external;\\n\\n function removeStrategyFromMintWhitelist(address strategyAddr) external;\\n\\n function isMintWhitelistedStrategy(address strategyAddr)\\n external\\n view\\n returns (bool);\\n\\n function withdrawalClaimDelay() external view returns (uint256);\\n\\n function setWithdrawalClaimDelay(uint256 newDelay) external;\\n\\n function lastRebase() external view returns (uint64);\\n\\n function dripDuration() external view returns (uint64);\\n\\n function setDripDuration(uint256 _dripDuration) external;\\n\\n function rebasePerSecondMax() external view returns (uint64);\\n\\n function setRebaseRateMax(uint256 yearlyApr) external;\\n\\n function rebasePerSecondTarget() external view returns (uint64);\\n\\n function previewYield() external view returns (uint256 yield);\\n\\n // slither-disable-end constable-states\\n}\\n\",\"keccak256\":\"0x8d0a60f594d97578b0513b4da3d8fcafaa601950c6c4c016bf60b1344733269c\",\"license\":\"BUSL-1.1\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\ncontract OUSD is Governable {\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n\\n /// @dev Event triggered when the supply changes\\n /// @param totalSupply Updated token total supply\\n /// @param rebasingCredits Updated token rebasing credits\\n /// @param rebasingCreditsPerToken Updated token rebasing credits per token\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n /// @dev Event triggered when an account opts in for rebasing\\n /// @param account Address of the account\\n event AccountRebasingEnabled(address account);\\n /// @dev Event triggered when an account opts out of rebasing\\n /// @param account Address of the account\\n event AccountRebasingDisabled(address account);\\n /// @dev Emitted when `value` tokens are moved from one account `from` to\\n /// another `to`.\\n /// @param from Address of the account tokens are moved from\\n /// @param to Address of the account tokens are moved to\\n /// @param value Amount of tokens transferred\\n event Transfer(address indexed from, address indexed to, uint256 value);\\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 /// @param owner Address of the owner approving allowance\\n /// @param spender Address of the spender allowance is granted to\\n /// @param value Amount of tokens spender can transfer\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n /// @dev Yield resulting from {changeSupply} that a `source` account would\\n /// receive is directed to `target` account.\\n /// @param source Address of the source forwarding the yield\\n /// @param target Address of the target receiving the yield\\n event YieldDelegated(address source, address target);\\n /// @dev Yield delegation from `source` account to the `target` account is\\n /// suspended.\\n /// @param source Address of the source suspending yield forwarding\\n /// @param target Address of the target no longer receiving yield from `source`\\n /// account\\n event YieldUndelegated(address source, address target);\\n\\n enum RebaseOptions {\\n NotSet,\\n StdNonRebasing,\\n StdRebasing,\\n YieldDelegationSource,\\n YieldDelegationTarget\\n }\\n\\n uint256[154] private _gap; // Slots to align with deployed contract\\n uint256 private constant MAX_SUPPLY = type(uint128).max;\\n /// @dev The amount of tokens in existence\\n uint256 public totalSupply;\\n mapping(address => mapping(address => uint256)) private allowances;\\n /// @dev The vault with privileges to execute {mint}, {burn}\\n /// and {changeSupply}\\n address public vaultAddress;\\n mapping(address => uint256) internal creditBalances;\\n // the 2 storage variables below need trailing underscores to not name collide with public functions\\n uint256 private rebasingCredits_; // Sum of all rebasing credits (creditBalances for rebasing accounts)\\n uint256 private rebasingCreditsPerToken_;\\n /// @dev The amount of tokens that are not rebasing - receiving yield\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) internal alternativeCreditsPerToken;\\n /// @dev A map of all addresses and their respective RebaseOptions\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) private __deprecated_isUpgraded;\\n /// @dev A map of addresses that have yields forwarded to. This is an\\n /// inverse mapping of {yieldFrom}\\n /// Key Account forwarding yield\\n /// Value Account receiving yield\\n mapping(address => address) public yieldTo;\\n /// @dev A map of addresses that are receiving the yield. This is an\\n /// inverse mapping of {yieldTo}\\n /// Key Account receiving yield\\n /// Value Account forwarding yield\\n mapping(address => address) public yieldFrom;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n uint256[34] private __gap; // including below gap totals up to 200\\n\\n /// @dev Initializes the contract and sets necessary variables.\\n /// @param _vaultAddress Address of the vault contract\\n /// @param _initialCreditsPerToken The starting rebasing credits per token.\\n function initialize(address _vaultAddress, uint256 _initialCreditsPerToken)\\n external\\n onlyGovernor\\n {\\n require(_vaultAddress != address(0), \\\"Zero vault address\\\");\\n require(vaultAddress == address(0), \\\"Already initialized\\\");\\n\\n rebasingCreditsPerToken_ = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /// @dev Returns the symbol of the token, a shorter version\\n /// of the name.\\n function symbol() external pure virtual returns (string memory) {\\n return \\\"OUSD\\\";\\n }\\n\\n /// @dev Returns the name of the token.\\n function name() external pure virtual returns (string memory) {\\n return \\\"Origin Dollar\\\";\\n }\\n\\n /// @dev Returns the number of decimals used to get its user representation.\\n function decimals() external pure virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() external view returns (uint256) {\\n return rebasingCreditsPerToken_;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() external view returns (uint256) {\\n return rebasingCreditsPerToken_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() external view returns (uint256) {\\n return rebasingCredits_;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() external view returns (uint256) {\\n return rebasingCredits_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @notice Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account) public view returns (uint256) {\\n RebaseOptions state = rebaseState[_account];\\n if (state == RebaseOptions.YieldDelegationSource) {\\n // Saves a slot read when transferring to or from a yield delegating source\\n // since we know creditBalances equals the balance.\\n return creditBalances[_account];\\n }\\n uint256 baseBalance = (creditBalances[_account] * 1e18) /\\n _creditsPerToken(_account);\\n if (state == RebaseOptions.YieldDelegationTarget) {\\n // creditBalances of yieldFrom accounts equals token balances\\n return baseBalance - creditBalances[yieldFrom[_account]];\\n }\\n return baseBalance;\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n external\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (creditBalances[_account], cpt);\\n } else {\\n return (\\n creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n creditBalances[_account],\\n _creditsPerToken(_account),\\n true // all accounts have their resolution \\\"upgraded\\\"\\n );\\n }\\n\\n // Backwards compatible view\\n function nonRebasingCreditsPerToken(address _account)\\n external\\n view\\n returns (uint256)\\n {\\n return alternativeCreditsPerToken[_account];\\n }\\n\\n /**\\n * @notice Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n * @return true on success.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n uint256 userAllowance = allowances[_from][msg.sender];\\n require(_value <= userAllowance, \\\"Allowance exceeded\\\");\\n\\n unchecked {\\n allowances[_from][msg.sender] = userAllowance - _value;\\n }\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n return true;\\n }\\n\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n (\\n int256 fromRebasingCreditsDiff,\\n int256 fromNonRebasingSupplyDiff\\n ) = _adjustAccount(_from, -_value.toInt256());\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_to, _value.toInt256());\\n\\n _adjustGlobals(\\n fromRebasingCreditsDiff + toRebasingCreditsDiff,\\n fromNonRebasingSupplyDiff + toNonRebasingSupplyDiff\\n );\\n }\\n\\n function _adjustAccount(address _account, int256 _balanceChange)\\n internal\\n returns (int256 rebasingCreditsDiff, int256 nonRebasingSupplyDiff)\\n {\\n RebaseOptions state = rebaseState[_account];\\n int256 currentBalance = balanceOf(_account).toInt256();\\n if (currentBalance + _balanceChange < 0) {\\n revert(\\\"Transfer amount exceeds balance\\\");\\n }\\n uint256 newBalance = (currentBalance + _balanceChange).toUint256();\\n\\n if (state == RebaseOptions.YieldDelegationSource) {\\n address target = yieldTo[_account];\\n uint256 targetOldBalance = balanceOf(target);\\n uint256 targetNewCredits = _balanceToRebasingCredits(\\n targetOldBalance + newBalance\\n );\\n rebasingCreditsDiff =\\n targetNewCredits.toInt256() -\\n creditBalances[target].toInt256();\\n\\n creditBalances[_account] = newBalance;\\n creditBalances[target] = targetNewCredits;\\n } else if (state == RebaseOptions.YieldDelegationTarget) {\\n uint256 newCredits = _balanceToRebasingCredits(\\n newBalance + creditBalances[yieldFrom[_account]]\\n );\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n } else {\\n _autoMigrate(_account);\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem > 0) {\\n nonRebasingSupplyDiff = _balanceChange;\\n if (alternativeCreditsPerTokenMem != 1e18) {\\n alternativeCreditsPerToken[_account] = 1e18;\\n }\\n creditBalances[_account] = newBalance;\\n } else {\\n uint256 newCredits = _balanceToRebasingCredits(newBalance);\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n }\\n }\\n }\\n\\n function _adjustGlobals(\\n int256 _rebasingCreditsDiff,\\n int256 _nonRebasingSupplyDiff\\n ) internal {\\n if (_rebasingCreditsDiff != 0) {\\n rebasingCredits_ = (rebasingCredits_.toInt256() +\\n _rebasingCreditsDiff).toUint256();\\n }\\n if (_nonRebasingSupplyDiff != 0) {\\n nonRebasingSupply = (nonRebasingSupply.toInt256() +\\n _nonRebasingSupplyDiff).toUint256();\\n }\\n }\\n\\n /**\\n * @notice Function to check the amount of tokens that _owner has allowed\\n * to `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[_owner][_spender];\\n }\\n\\n /**\\n * @notice Approve the passed address to spend the specified amount of\\n * tokens on behalf of msg.sender.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n * @return true on success.\\n */\\n function approve(address _spender, uint256 _value) external returns (bool) {\\n allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Creates `_amount` tokens and assigns them to `_account`,\\n * increasing the total supply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, _amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply + _amount;\\n\\n require(totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @notice Destroys `_amount` tokens from `_account`,\\n * reducing the total supply.\\n */\\n function burn(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, -_amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem != 0) {\\n return alternativeCreditsPerTokenMem;\\n } else {\\n return rebasingCreditsPerToken_;\\n }\\n }\\n\\n /**\\n * @dev Auto migrate contracts to be non rebasing,\\n * unless they have opted into yield.\\n * @param _account Address of the account.\\n */\\n function _autoMigrate(address _account) internal {\\n bool isContract = _account.code.length > 0;\\n // In previous code versions, contracts would not have had their\\n // rebaseState[_account] set to RebaseOptions.NonRebasing when migrated\\n // therefore we check the actual accounting used on the account instead.\\n if (\\n isContract &&\\n rebaseState[_account] == RebaseOptions.NotSet &&\\n alternativeCreditsPerToken[_account] == 0\\n ) {\\n _rebaseOptOut(_account);\\n }\\n }\\n\\n /**\\n * @dev Calculates credits from contract's global rebasingCreditsPerToken_, and\\n * also balance that corresponds to those credits. The latter is important\\n * when adjusting the contract's global nonRebasingSupply to circumvent any\\n * possible rounding errors.\\n *\\n * @param _balance Balance of the account.\\n */\\n function _balanceToRebasingCredits(uint256 _balance)\\n internal\\n view\\n returns (uint256 rebasingCredits)\\n {\\n // Rounds up, because we need to ensure that accounts always have\\n // at least the balance that they should have.\\n // Note this should always be used on an absolute account value,\\n // not on a possibly negative diff, because then the rounding would be wrong.\\n return ((_balance) * rebasingCreditsPerToken_ + 1e18 - 1) / 1e18;\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n * @param _account Address of the account.\\n */\\n function governanceRebaseOptIn(address _account) external onlyGovernor {\\n require(_account != address(0), \\\"Zero address not allowed\\\");\\n _rebaseOptIn(_account);\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n */\\n function rebaseOptIn() external {\\n _rebaseOptIn(msg.sender);\\n }\\n\\n function _rebaseOptIn(address _account) internal {\\n uint256 balance = balanceOf(_account);\\n\\n // prettier-ignore\\n require(\\n alternativeCreditsPerToken[_account] > 0 ||\\n // Accounts may explicitly `rebaseOptIn` regardless of\\n // accounting if they have a 0 balance.\\n creditBalances[_account] == 0\\n ,\\n \\\"Account must be non-rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n // prettier-ignore\\n require(\\n state == RebaseOptions.StdNonRebasing ||\\n state == RebaseOptions.NotSet,\\n \\\"Only standard non-rebasing accounts can opt in\\\"\\n );\\n\\n uint256 newCredits = _balanceToRebasingCredits(balance);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdRebasing;\\n alternativeCreditsPerToken[_account] = 0;\\n creditBalances[_account] = newCredits;\\n // Globals\\n _adjustGlobals(newCredits.toInt256(), -balance.toInt256());\\n\\n emit AccountRebasingEnabled(_account);\\n }\\n\\n /**\\n * @notice The calling account will no longer receive yield\\n */\\n function rebaseOptOut() external {\\n _rebaseOptOut(msg.sender);\\n }\\n\\n function _rebaseOptOut(address _account) internal {\\n require(\\n alternativeCreditsPerToken[_account] == 0,\\n \\\"Account must be rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n require(\\n state == RebaseOptions.StdRebasing || state == RebaseOptions.NotSet,\\n \\\"Only standard rebasing accounts can opt out\\\"\\n );\\n\\n uint256 oldCredits = creditBalances[_account];\\n uint256 balance = balanceOf(_account);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdNonRebasing;\\n alternativeCreditsPerToken[_account] = 1e18;\\n creditBalances[_account] = balance;\\n // Globals\\n _adjustGlobals(-oldCredits.toInt256(), balance.toInt256());\\n\\n emit AccountRebasingDisabled(_account);\\n }\\n\\n /**\\n * @notice Distribute yield to users. This changes the exchange rate\\n * between \\\"credits\\\" and OUSD tokens to change rebasing user's balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply) external onlyVault {\\n require(totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n return;\\n }\\n\\n totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n uint256 rebasingSupply = totalSupply - nonRebasingSupply;\\n // round up in the favour of the protocol\\n rebasingCreditsPerToken_ =\\n (rebasingCredits_ * 1e18 + rebasingSupply - 1) /\\n rebasingSupply;\\n\\n require(rebasingCreditsPerToken_ > 0, \\\"Invalid change in supply\\\");\\n\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n }\\n\\n /*\\n * @notice Send the yield from one account to another account.\\n * Each account keeps its own balances.\\n */\\n function delegateYield(address _from, address _to) external onlyGovernor {\\n require(_from != address(0), \\\"Zero from address not allowed\\\");\\n require(_to != address(0), \\\"Zero to address not allowed\\\");\\n\\n require(_from != _to, \\\"Cannot delegate to self\\\");\\n require(\\n yieldFrom[_to] == address(0) &&\\n yieldTo[_to] == address(0) &&\\n yieldFrom[_from] == address(0) &&\\n yieldTo[_from] == address(0),\\n \\\"Blocked by existing yield delegation\\\"\\n );\\n RebaseOptions stateFrom = rebaseState[_from];\\n RebaseOptions stateTo = rebaseState[_to];\\n\\n require(\\n stateFrom == RebaseOptions.NotSet ||\\n stateFrom == RebaseOptions.StdNonRebasing ||\\n stateFrom == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState from\\\"\\n );\\n\\n require(\\n stateTo == RebaseOptions.NotSet ||\\n stateTo == RebaseOptions.StdNonRebasing ||\\n stateTo == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState to\\\"\\n );\\n\\n if (alternativeCreditsPerToken[_from] == 0) {\\n _rebaseOptOut(_from);\\n }\\n if (alternativeCreditsPerToken[_to] > 0) {\\n _rebaseOptIn(_to);\\n }\\n\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(_to);\\n uint256 oldToCredits = creditBalances[_to];\\n uint256 newToCredits = _balanceToRebasingCredits(\\n fromBalance + toBalance\\n );\\n\\n // Set up the bidirectional links\\n yieldTo[_from] = _to;\\n yieldFrom[_to] = _from;\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.YieldDelegationSource;\\n alternativeCreditsPerToken[_from] = 1e18;\\n creditBalances[_from] = fromBalance;\\n rebaseState[_to] = RebaseOptions.YieldDelegationTarget;\\n creditBalances[_to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, -(fromBalance).toInt256());\\n emit YieldDelegated(_from, _to);\\n }\\n\\n /*\\n * @notice Stop sending the yield from one account to another account.\\n */\\n function undelegateYield(address _from) external onlyGovernor {\\n // Require a delegation, which will also ensure a valid delegation\\n require(yieldTo[_from] != address(0), \\\"Zero address not allowed\\\");\\n\\n address to = yieldTo[_from];\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(to);\\n uint256 oldToCredits = creditBalances[to];\\n uint256 newToCredits = _balanceToRebasingCredits(toBalance);\\n\\n // Remove the bidirectional links\\n yieldFrom[to] = address(0);\\n yieldTo[_from] = address(0);\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.StdNonRebasing;\\n // alternativeCreditsPerToken[from] already 1e18 from `delegateYield()`\\n creditBalances[_from] = fromBalance;\\n rebaseState[to] = RebaseOptions.StdRebasing;\\n // alternativeCreditsPerToken[to] already 0 from `delegateYield()`\\n creditBalances[to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, fromBalance.toInt256());\\n emit YieldUndelegated(_from, to);\\n }\\n}\\n\",\"keccak256\":\"0x5741d16e48d6031ec92c1e189ea023c78a34956b6bc9642ea9dfc9a6dafe49ca\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IBasicToken } from \\\"../interfaces/IBasicToken.sol\\\";\\n\\nlibrary Helpers {\\n /**\\n * @notice Fetch the `symbol()` from an ERC20 token\\n * @dev Grabs the `symbol()` from a contract\\n * @param _token Address of the ERC20 token\\n * @return string Symbol of the ERC20 token\\n */\\n function getSymbol(address _token) internal view returns (string memory) {\\n string memory symbol = IBasicToken(_token).symbol();\\n return symbol;\\n }\\n\\n /**\\n * @notice Fetch the `decimals()` from an ERC20 token\\n * @dev Grabs the `decimals()` from a contract and fails if\\n * the decimal value does not live within a certain range\\n * @param _token Address of the ERC20 token\\n * @return uint256 Decimals of the ERC20 token\\n */\\n function getDecimals(address _token) internal view returns (uint256) {\\n uint256 decimals = IBasicToken(_token).decimals();\\n require(\\n decimals >= 4 && decimals <= 18,\\n \\\"Token must have sufficient decimal places\\\"\\n );\\n\\n return decimals;\\n }\\n}\\n\",\"keccak256\":\"0x4366f8d90b34c1eef8bbaaf369b1e5cd59f04027bb3c111f208eaee65bbc0346\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base contract any contracts that need to initialize state after deployment.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0x50d39ebf38a3d3111f2b77a6c75ece1d4ae731552fec4697ab16fcf6c0d4d5e8\",\"license\":\"BUSL-1.1\"},\"contracts/utils/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n\\n// Based on StableMath from Stability Labs Pty. Ltd.\\n// https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol\\n\\nlibrary StableMath {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Scaling unit for use in specific calculations,\\n * where 1 * 10**18, or 1e18 represents a unit '1'\\n */\\n uint256 private constant FULL_SCALE = 1e18;\\n\\n /***************************************\\n Helpers\\n ****************************************/\\n\\n /**\\n * @dev Adjust the scale of an integer\\n * @param to Decimals to scale to\\n * @param from Decimals to scale from\\n */\\n function scaleBy(\\n uint256 x,\\n uint256 to,\\n uint256 from\\n ) internal pure returns (uint256) {\\n if (to > from) {\\n x = x.mul(10**(to - from));\\n } else if (to < from) {\\n // slither-disable-next-line divide-before-multiply\\n x = x.div(10**(from - to));\\n }\\n return x;\\n }\\n\\n /***************************************\\n Precise Arithmetic\\n ****************************************/\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulTruncateScale(x, y, FULL_SCALE);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the given scale. For example,\\n * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @param scale Scale unit\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncateScale(\\n uint256 x,\\n uint256 y,\\n uint256 scale\\n ) internal pure returns (uint256) {\\n // e.g. assume scale = fullScale\\n // z = 10e18 * 9e17 = 9e36\\n uint256 z = x.mul(y);\\n // return 9e36 / 1e18 = 9e18\\n return z.div(scale);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit, rounded up to the closest base unit.\\n */\\n function mulTruncateCeil(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e17 * 17268172638 = 138145381104e17\\n uint256 scaled = x.mul(y);\\n // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17\\n uint256 ceil = scaled.add(FULL_SCALE.sub(1));\\n // e.g. 13814538111.399...e18 / 1e18 = 13814538111\\n return ceil.div(FULL_SCALE);\\n }\\n\\n /**\\n * @dev Precisely divides two units, by first scaling the left hand operand. Useful\\n * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)\\n * @param x Left hand input to division\\n * @param y Right hand input to division\\n * @return Result after multiplying the left operand by the scale, and\\n * executing the division on the right hand input.\\n */\\n function divPrecisely(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e18 * 1e18 = 8e36\\n uint256 z = x.mul(FULL_SCALE);\\n // e.g. 8e36 / 10e18 = 8e17\\n return z.div(y);\\n }\\n}\\n\",\"keccak256\":\"0x71d6ed0053a1e5ef018d27c3b6d024f336d8157ab6f6859e400b3243a50a71b7\",\"license\":\"BUSL-1.1\"},\"contracts/vault/OETHVaultAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { IVault } from \\\"../interfaces/IVault.sol\\\";\\nimport { VaultAdmin } from \\\"./VaultAdmin.sol\\\";\\n\\n/**\\n * @title OETH VaultAdmin Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETHVaultAdmin is VaultAdmin {\\n using SafeERC20 for IERC20;\\n\\n address public immutable weth;\\n\\n constructor(address _weth) {\\n weth = _weth;\\n }\\n\\n /**\\n * @notice Adds a strategy to the mint whitelist.\\n * Reverts if strategy isn't approved on Vault.\\n * @param strategyAddr Strategy address\\n */\\n function addStrategyToMintWhitelist(address strategyAddr)\\n external\\n onlyGovernor\\n {\\n require(strategies[strategyAddr].isSupported, \\\"Strategy not approved\\\");\\n\\n require(\\n !isMintWhitelistedStrategy[strategyAddr],\\n \\\"Already whitelisted\\\"\\n );\\n\\n isMintWhitelistedStrategy[strategyAddr] = true;\\n\\n emit StrategyAddedToMintWhitelist(strategyAddr);\\n }\\n\\n /**\\n * @notice Removes a strategy from the mint whitelist.\\n * @param strategyAddr Strategy address\\n */\\n function removeStrategyFromMintWhitelist(address strategyAddr)\\n external\\n onlyGovernor\\n {\\n // Intentionally skipping `strategies.isSupported` check since\\n // we may wanna remove an address even after removing the strategy\\n\\n require(isMintWhitelistedStrategy[strategyAddr], \\\"Not whitelisted\\\");\\n\\n isMintWhitelistedStrategy[strategyAddr] = false;\\n\\n emit StrategyRemovedFromMintWhitelist(strategyAddr);\\n }\\n\\n /// @dev Simplified version of the deposit function as WETH is the only supported asset.\\n function _depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal override {\\n require(\\n strategies[_strategyToAddress].isSupported,\\n \\\"Invalid to Strategy\\\"\\n );\\n require(\\n _assets.length == 1 && _amounts.length == 1 && _assets[0] == weth,\\n \\\"Only WETH is supported\\\"\\n );\\n\\n // Check the there is enough WETH to transfer once the WETH reserved for the withdrawal queue is accounted for\\n require(_amounts[0] <= _wethAvailable(), \\\"Not enough WETH available\\\");\\n\\n // Send required amount of funds to the strategy\\n IERC20(weth).safeTransfer(_strategyToAddress, _amounts[0]);\\n\\n // Deposit all the funds that have been sent to the strategy\\n IStrategy(_strategyToAddress).depositAll();\\n }\\n\\n function _withdrawFromStrategy(\\n address _recipient,\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal override {\\n super._withdrawFromStrategy(\\n _recipient,\\n _strategyFromAddress,\\n _assets,\\n _amounts\\n );\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n function _withdrawAllFromStrategy(address _strategyAddr) internal override {\\n super._withdrawAllFromStrategy(_strategyAddr);\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n function _withdrawAllFromStrategies() internal override {\\n super._withdrawAllFromStrategies();\\n\\n IVault(address(this)).addWithdrawalQueueLiquidity();\\n }\\n\\n /// @dev Calculate how much WETH in the vault is not reserved for the withdrawal queue.\\n // That is, it is available to be redeemed or deposited into a strategy.\\n function _wethAvailable() internal view returns (uint256 wethAvailable) {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // The amount of WETH that is still to be claimed in the withdrawal queue\\n uint256 outstandingWithdrawals = queue.queued - queue.claimed;\\n\\n // The amount of sitting in WETH in the vault\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // If there is not enough WETH in the vault to cover the outstanding withdrawals\\n if (wethBalance <= outstandingWithdrawals) {\\n return 0;\\n }\\n\\n return wethBalance - outstandingWithdrawals;\\n }\\n\\n function _swapCollateral(\\n address,\\n address,\\n uint256,\\n uint256,\\n bytes calldata\\n ) internal pure override returns (uint256) {\\n revert(\\\"Collateral swap not supported\\\");\\n }\\n}\\n\",\"keccak256\":\"0x3e67589f6ec16a52f4df878cfd44d03753dabd490dcd0868524f1e87c056e545\",\"license\":\"BUSL-1.1\"},\"contracts/vault/VaultAdmin.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultAdmin contract\\n * @notice The VaultAdmin contract makes configuration and admin calls on the vault.\\n * @author Origin Protocol Inc\\n */\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { IOracle } from \\\"../interfaces/IOracle.sol\\\";\\nimport { ISwapper } from \\\"../interfaces/ISwapper.sol\\\";\\nimport { IVault } from \\\"../interfaces/IVault.sol\\\";\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport \\\"./VaultStorage.sol\\\";\\n\\ncontract VaultAdmin is VaultStorage {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n using SafeCast for uint256;\\n\\n /**\\n * @dev Verifies that the caller is the Governor or Strategist.\\n */\\n modifier onlyGovernorOrStrategist() {\\n require(\\n msg.sender == strategistAddr || isGovernor(),\\n \\\"Caller is not the Strategist or Governor\\\"\\n );\\n _;\\n }\\n\\n /***************************************\\n Configuration\\n ****************************************/\\n\\n /**\\n * @notice Set address of price provider.\\n * @param _priceProvider Address of price provider\\n */\\n function setPriceProvider(address _priceProvider) external onlyGovernor {\\n priceProvider = _priceProvider;\\n emit PriceProviderUpdated(_priceProvider);\\n }\\n\\n /**\\n * @notice Set a fee in basis points to be charged for a redeem.\\n * @param _redeemFeeBps Basis point fee to be charged\\n */\\n function setRedeemFeeBps(uint256 _redeemFeeBps) external onlyGovernor {\\n require(_redeemFeeBps <= 1000, \\\"Redeem fee should not be over 10%\\\");\\n redeemFeeBps = _redeemFeeBps;\\n emit RedeemFeeUpdated(_redeemFeeBps);\\n }\\n\\n /**\\n * @notice Set a buffer of assets to keep in the Vault to handle most\\n * redemptions without needing to spend gas unwinding assets from a Strategy.\\n * @param _vaultBuffer Percentage using 18 decimals. 100% = 1e18.\\n */\\n function setVaultBuffer(uint256 _vaultBuffer)\\n external\\n onlyGovernorOrStrategist\\n {\\n require(_vaultBuffer <= 1e18, \\\"Invalid value\\\");\\n vaultBuffer = _vaultBuffer;\\n emit VaultBufferUpdated(_vaultBuffer);\\n }\\n\\n /**\\n * @notice Sets the minimum amount of OTokens in a mint to trigger an\\n * automatic allocation of funds afterwords.\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setAutoAllocateThreshold(uint256 _threshold)\\n external\\n onlyGovernor\\n {\\n autoAllocateThreshold = _threshold;\\n emit AllocateThresholdUpdated(_threshold);\\n }\\n\\n /**\\n * @notice Set a minimum amount of OTokens in a mint or redeem that triggers a\\n * rebase\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setRebaseThreshold(uint256 _threshold) external onlyGovernor {\\n rebaseThreshold = _threshold;\\n emit RebaseThresholdUpdated(_threshold);\\n }\\n\\n /**\\n * @notice Set address of Strategist\\n * @param _address Address of Strategist\\n */\\n function setStrategistAddr(address _address) external onlyGovernor {\\n strategistAddr = _address;\\n emit StrategistUpdated(_address);\\n }\\n\\n /**\\n * @notice Set the default Strategy for an asset, i.e. the one which the asset\\n will be automatically allocated to and withdrawn from\\n * @param _asset Address of the asset\\n * @param _strategy Address of the Strategy\\n */\\n function setAssetDefaultStrategy(address _asset, address _strategy)\\n external\\n onlyGovernorOrStrategist\\n {\\n emit AssetDefaultStrategyUpdated(_asset, _strategy);\\n // If its a zero address being passed for the strategy we are removing\\n // the default strategy\\n if (_strategy != address(0)) {\\n // Make sure the strategy meets some criteria\\n require(strategies[_strategy].isSupported, \\\"Strategy not approved\\\");\\n IStrategy strategy = IStrategy(_strategy);\\n require(assets[_asset].isSupported, \\\"Asset is not supported\\\");\\n require(\\n strategy.supportsAsset(_asset),\\n \\\"Asset not supported by Strategy\\\"\\n );\\n }\\n assetDefaultStrategies[_asset] = _strategy;\\n }\\n\\n /**\\n * @notice Set maximum amount of OTokens that can at any point be minted and deployed\\n * to strategy (used only by ConvexOUSDMetaStrategy for now).\\n * @param _threshold OToken amount with 18 fixed decimals.\\n */\\n function setNetOusdMintForStrategyThreshold(uint256 _threshold)\\n external\\n onlyGovernor\\n {\\n /**\\n * Because `netOusdMintedForStrategy` check in vault core works both ways\\n * (positive and negative) the actual impact of the amount of OToken minted\\n * could be double the threshold. E.g.:\\n * - contract has threshold set to 100\\n * - state of netOusdMinted is -90\\n * - in effect it can mint 190 OToken and still be within limits\\n *\\n * We are somewhat mitigating this behaviour by resetting the netOusdMinted\\n * counter whenever new threshold is set. So it can only move one threshold\\n * amount in each direction. This also enables us to reduce the threshold\\n * amount and not have problems with current netOusdMinted being near\\n * limits on either side.\\n */\\n netOusdMintedForStrategy = 0;\\n netOusdMintForStrategyThreshold = _threshold;\\n emit NetOusdMintForStrategyThresholdChanged(_threshold);\\n }\\n\\n /**\\n * @notice Set the Dripper contract that streams harvested rewards to the vault.\\n * @param _dripper Address of the Dripper contract.\\n */\\n function setDripper(address _dripper) external onlyGovernor {\\n dripper = _dripper;\\n emit DripperChanged(_dripper);\\n }\\n\\n /**\\n * @notice Changes the async withdrawal claim period for OETH & superOETHb\\n * @param _delay Delay period (should be between 10 mins to 7 days).\\n * Set to 0 to disable async withdrawals\\n */\\n function setWithdrawalClaimDelay(uint256 _delay) external onlyGovernor {\\n require(\\n _delay == 0 || (_delay >= 10 minutes && _delay <= 15 days),\\n \\\"Invalid claim delay period\\\"\\n );\\n withdrawalClaimDelay = _delay;\\n emit WithdrawalClaimDelayUpdated(_delay);\\n }\\n\\n /**\\n * @notice Set a yield streaming max rate. This spreads yield over\\n * time if it is above the max rate.\\n * @param yearlyApr in 1e18 notation. 3 * 1e18 = 3% APR\\n */\\n function setRebaseRateMax(uint256 yearlyApr)\\n external\\n onlyGovernorOrStrategist\\n {\\n // The old yield will be at the old rate\\n IVault(address(this)).rebase();\\n // Change the rate\\n uint256 newPerSecond = yearlyApr / 100 / 365 days;\\n require(newPerSecond <= MAX_REBASE_PER_SECOND, \\\"Rate too high\\\");\\n rebasePerSecondMax = newPerSecond.toUint64();\\n emit RebasePerSecondMaxChanged(newPerSecond);\\n }\\n\\n /**\\n * @notice Set the drip duration period\\n * @param _dripDuration Time in seconds to target a constant yield rate\\n */\\n function setDripDuration(uint256 _dripDuration)\\n external\\n onlyGovernorOrStrategist\\n {\\n // The old yield will be at the old rate\\n IVault(address(this)).rebase();\\n dripDuration = _dripDuration.toUint64();\\n emit DripDurationChanged(_dripDuration);\\n }\\n\\n /***************************************\\n Swaps\\n ****************************************/\\n\\n /**\\n * @notice Strategist swaps collateral assets sitting in the vault.\\n * @param _fromAsset The token address of the asset being sold by the vault.\\n * @param _toAsset The token address of the asset being purchased by the vault.\\n * @param _fromAssetAmount The amount of assets being sold by the vault.\\n * @param _minToAssetAmount The minimum amount of assets to be purchased.\\n * @param _data implementation specific data. eg 1Inch swap data\\n * @return toAssetAmount The amount of toAssets that was received from the swap\\n */\\n function swapCollateral(\\n address _fromAsset,\\n address _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _minToAssetAmount,\\n bytes calldata _data\\n )\\n external\\n nonReentrant\\n onlyGovernorOrStrategist\\n returns (uint256 toAssetAmount)\\n {\\n toAssetAmount = _swapCollateral(\\n _fromAsset,\\n _toAsset,\\n _fromAssetAmount,\\n _minToAssetAmount,\\n _data\\n );\\n }\\n\\n function _swapCollateral(\\n address _fromAsset,\\n address _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _minToAssetAmount,\\n bytes calldata _data\\n ) internal virtual returns (uint256 toAssetAmount) {\\n // Check fromAsset and toAsset are valid\\n Asset memory fromAssetConfig = assets[_fromAsset];\\n Asset memory toAssetConfig = assets[_toAsset];\\n require(fromAssetConfig.isSupported, \\\"From asset is not supported\\\");\\n require(toAssetConfig.isSupported, \\\"To asset is not supported\\\");\\n\\n // Load swap config into memory to avoid separate SLOADs\\n SwapConfig memory config = swapConfig;\\n\\n // Scope a new block to remove toAssetBalBefore from the scope of swapCollateral.\\n // This avoids a stack too deep error.\\n {\\n uint256 toAssetBalBefore = IERC20(_toAsset).balanceOf(\\n address(this)\\n );\\n\\n // Transfer from assets to the swapper contract\\n IERC20(_fromAsset).safeTransfer(config.swapper, _fromAssetAmount);\\n\\n // Call to the Swapper contract to do the actual swap\\n // The -1 is required for stETH which sometimes transfers 1 wei less than what was specified.\\n // slither-disable-next-line unused-return\\n ISwapper(config.swapper).swap(\\n _fromAsset,\\n _toAsset,\\n _fromAssetAmount - 1,\\n _minToAssetAmount,\\n _data\\n );\\n\\n // Compute the change in asset balance held by the Vault\\n toAssetAmount =\\n IERC20(_toAsset).balanceOf(address(this)) -\\n toAssetBalBefore;\\n }\\n\\n // Check the to assets returned is above slippage amount specified by the strategist\\n require(\\n toAssetAmount >= _minToAssetAmount,\\n \\\"Strategist slippage limit\\\"\\n );\\n\\n // Scope a new block to remove minOracleToAssetAmount from the scope of swapCollateral.\\n // This avoids a stack too deep error.\\n {\\n // Check the slippage against the Oracle in case the strategist made a mistake or has become malicious.\\n // to asset amount = from asset amount * from asset price / to asset price\\n uint256 minOracleToAssetAmount = (_fromAssetAmount *\\n (1e4 - fromAssetConfig.allowedOracleSlippageBps) *\\n IOracle(priceProvider).price(_fromAsset)) /\\n (IOracle(priceProvider).price(_toAsset) *\\n (1e4 + toAssetConfig.allowedOracleSlippageBps));\\n\\n // Scale both sides up to 18 decimals to compare\\n require(\\n toAssetAmount.scaleBy(18, toAssetConfig.decimals) >=\\n minOracleToAssetAmount.scaleBy(\\n 18,\\n fromAssetConfig.decimals\\n ),\\n \\\"Oracle slippage limit exceeded\\\"\\n );\\n }\\n\\n // Check the vault's total value hasn't gone below the OToken total supply\\n // by more than the allowed percentage.\\n require(\\n IVault(address(this)).totalValue() >=\\n (oUSD.totalSupply() * ((1e4 - config.allowedUndervalueBps))) /\\n 1e4,\\n \\\"Allowed value < supply\\\"\\n );\\n\\n emit Swapped(_fromAsset, _toAsset, _fromAssetAmount, toAssetAmount);\\n }\\n\\n /***************************************\\n Swap Config\\n ****************************************/\\n\\n /**\\n * @notice Set the contract the performs swaps of collateral assets.\\n * @param _swapperAddr Address of the Swapper contract that implements the ISwapper interface.\\n */\\n function setSwapper(address _swapperAddr) external onlyGovernor {\\n swapConfig.swapper = _swapperAddr;\\n emit SwapperChanged(_swapperAddr);\\n }\\n\\n /// @notice Contract that swaps the vault's collateral assets\\n function swapper() external view returns (address swapper_) {\\n swapper_ = swapConfig.swapper;\\n }\\n\\n /**\\n * @notice Set max allowed percentage the vault total value can drop below the OToken total supply in basis points\\n * when executing collateral swaps.\\n * @param _basis Percentage in basis points. eg 100 == 1%\\n */\\n function setSwapAllowedUndervalue(uint16 _basis) external onlyGovernor {\\n require(_basis < 10001, \\\"Invalid basis points\\\");\\n swapConfig.allowedUndervalueBps = _basis;\\n emit SwapAllowedUndervalueChanged(_basis);\\n }\\n\\n /**\\n * @notice Max allowed percentage the vault total value can drop below the OToken total supply in basis points\\n * when executing a collateral swap.\\n * For example 100 == 1%\\n * @return value Percentage in basis points.\\n */\\n function allowedSwapUndervalue() external view returns (uint256 value) {\\n value = swapConfig.allowedUndervalueBps;\\n }\\n\\n /**\\n * @notice Set the allowed slippage from the Oracle price for collateral asset swaps.\\n * @param _asset Address of the asset token.\\n * @param _allowedOracleSlippageBps allowed slippage from Oracle in basis points. eg 20 = 0.2%. Max 10%.\\n */\\n function setOracleSlippage(address _asset, uint16 _allowedOracleSlippageBps)\\n external\\n onlyGovernor\\n {\\n require(assets[_asset].isSupported, \\\"Asset not supported\\\");\\n require(_allowedOracleSlippageBps < 1000, \\\"Slippage too high\\\");\\n\\n assets[_asset].allowedOracleSlippageBps = _allowedOracleSlippageBps;\\n\\n emit SwapSlippageChanged(_asset, _allowedOracleSlippageBps);\\n }\\n\\n /***************************************\\n Asset Config\\n ****************************************/\\n\\n /**\\n * @notice Add a supported asset to the contract, i.e. one that can be\\n * to mint OTokens.\\n * @param _asset Address of asset\\n */\\n function supportAsset(address _asset, uint8 _unitConversion)\\n external\\n virtual\\n onlyGovernor\\n {\\n require(!assets[_asset].isSupported, \\\"Asset already supported\\\");\\n\\n assets[_asset] = Asset({\\n isSupported: true,\\n unitConversion: UnitConversion(_unitConversion),\\n decimals: 0, // will be overridden in _cacheDecimals\\n allowedOracleSlippageBps: 0 // 0% by default\\n });\\n\\n _cacheDecimals(_asset);\\n allAssets.push(_asset);\\n\\n // Verify that our oracle supports the asset\\n // slither-disable-next-line unused-return\\n IOracle(priceProvider).price(_asset);\\n\\n emit AssetSupported(_asset);\\n }\\n\\n /**\\n * @notice Remove a supported asset from the Vault\\n * @param _asset Address of asset\\n */\\n function removeAsset(address _asset) external onlyGovernor {\\n require(assets[_asset].isSupported, \\\"Asset not supported\\\");\\n\\n // 1e13 for 18 decimals. And 10 for 6 decimals\\n uint256 maxDustBalance = uint256(1e13).scaleBy(\\n assets[_asset].decimals,\\n 18\\n );\\n\\n require(\\n IVault(address(this)).checkBalance(_asset) <= maxDustBalance,\\n \\\"Vault still holds asset\\\"\\n );\\n\\n uint256 assetsCount = allAssets.length;\\n uint256 assetIndex = assetsCount; // initialize at invalid index\\n for (uint256 i = 0; i < assetsCount; ++i) {\\n if (allAssets[i] == _asset) {\\n assetIndex = i;\\n break;\\n }\\n }\\n\\n // Note: If asset is not found in `allAssets`, the following line\\n // will revert with an out-of-bound error. However, there's no\\n // reason why an asset would have `Asset.isSupported = true` but\\n // not exist in `allAssets`.\\n\\n // Update allAssets array\\n allAssets[assetIndex] = allAssets[assetsCount - 1];\\n allAssets.pop();\\n\\n // Reset default strategy\\n assetDefaultStrategies[_asset] = address(0);\\n emit AssetDefaultStrategyUpdated(_asset, address(0));\\n\\n // Remove asset from storage\\n delete assets[_asset];\\n\\n emit AssetRemoved(_asset);\\n }\\n\\n /**\\n * @notice Cache decimals on OracleRouter for a particular asset. This action\\n * is required before that asset's price can be accessed.\\n * @param _asset Address of asset token\\n */\\n function cacheDecimals(address _asset) external onlyGovernor {\\n _cacheDecimals(_asset);\\n }\\n\\n /***************************************\\n Strategy Config\\n ****************************************/\\n\\n /**\\n * @notice Add a strategy to the Vault.\\n * @param _addr Address of the strategy to add\\n */\\n function approveStrategy(address _addr) external onlyGovernor {\\n require(!strategies[_addr].isSupported, \\\"Strategy already approved\\\");\\n strategies[_addr] = Strategy({ isSupported: true, _deprecated: 0 });\\n allStrategies.push(_addr);\\n emit StrategyApproved(_addr);\\n }\\n\\n /**\\n * @notice Remove a strategy from the Vault.\\n * @param _addr Address of the strategy to remove\\n */\\n\\n function removeStrategy(address _addr) external onlyGovernor {\\n require(strategies[_addr].isSupported, \\\"Strategy not approved\\\");\\n\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n require(\\n assetDefaultStrategies[allAssets[i]] != _addr,\\n \\\"Strategy is default for an asset\\\"\\n );\\n }\\n\\n // Initialize strategyIndex with out of bounds result so function will\\n // revert if no valid index found\\n uint256 stratCount = allStrategies.length;\\n uint256 strategyIndex = stratCount;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n if (allStrategies[i] == _addr) {\\n strategyIndex = i;\\n break;\\n }\\n }\\n\\n if (strategyIndex < stratCount) {\\n allStrategies[strategyIndex] = allStrategies[stratCount - 1];\\n allStrategies.pop();\\n\\n // Mark the strategy as not supported\\n strategies[_addr].isSupported = false;\\n\\n // Withdraw all assets\\n IStrategy strategy = IStrategy(_addr);\\n strategy.withdrawAll();\\n\\n emit StrategyRemoved(_addr);\\n }\\n }\\n\\n /***************************************\\n Strategies\\n ****************************************/\\n\\n /**\\n * @notice Deposit multiple assets from the vault into the strategy.\\n * @param _strategyToAddress Address of the Strategy to deposit assets into.\\n * @param _assets Array of asset address that will be deposited into the strategy.\\n * @param _amounts Array of amounts of each corresponding asset to deposit.\\n */\\n function depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external onlyGovernorOrStrategist nonReentrant {\\n _depositToStrategy(_strategyToAddress, _assets, _amounts);\\n }\\n\\n function _depositToStrategy(\\n address _strategyToAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal virtual {\\n require(\\n strategies[_strategyToAddress].isSupported,\\n \\\"Invalid to Strategy\\\"\\n );\\n require(_assets.length == _amounts.length, \\\"Parameter length mismatch\\\");\\n\\n uint256 assetCount = _assets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n address assetAddr = _assets[i];\\n require(\\n IStrategy(_strategyToAddress).supportsAsset(assetAddr),\\n \\\"Asset unsupported\\\"\\n );\\n // Send required amount of funds to the strategy\\n IERC20(assetAddr).safeTransfer(_strategyToAddress, _amounts[i]);\\n }\\n\\n // Deposit all the funds that have been sent to the strategy\\n IStrategy(_strategyToAddress).depositAll();\\n }\\n\\n /**\\n * @notice Withdraw multiple assets from the strategy to the vault.\\n * @param _strategyFromAddress Address of the Strategy to withdraw assets from.\\n * @param _assets Array of asset address that will be withdrawn from the strategy.\\n * @param _amounts Array of amounts of each corresponding asset to withdraw.\\n */\\n function withdrawFromStrategy(\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) external onlyGovernorOrStrategist nonReentrant {\\n _withdrawFromStrategy(\\n address(this),\\n _strategyFromAddress,\\n _assets,\\n _amounts\\n );\\n }\\n\\n /**\\n * @param _recipient can either be a strategy or the Vault\\n */\\n function _withdrawFromStrategy(\\n address _recipient,\\n address _strategyFromAddress,\\n address[] calldata _assets,\\n uint256[] calldata _amounts\\n ) internal virtual {\\n require(\\n strategies[_strategyFromAddress].isSupported,\\n \\\"Invalid from Strategy\\\"\\n );\\n require(_assets.length == _amounts.length, \\\"Parameter length mismatch\\\");\\n\\n uint256 assetCount = _assets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n // Withdraw from Strategy to the recipient\\n IStrategy(_strategyFromAddress).withdraw(\\n _recipient,\\n _assets[i],\\n _amounts[i]\\n );\\n }\\n }\\n\\n /**\\n * @notice Sets the maximum allowable difference between\\n * total supply and backing assets' value.\\n */\\n function setMaxSupplyDiff(uint256 _maxSupplyDiff) external onlyGovernor {\\n maxSupplyDiff = _maxSupplyDiff;\\n emit MaxSupplyDiffChanged(_maxSupplyDiff);\\n }\\n\\n /**\\n * @notice Sets the trusteeAddress that can receive a portion of yield.\\n * Setting to the zero address disables this feature.\\n */\\n function setTrusteeAddress(address _address) external onlyGovernor {\\n trusteeAddress = _address;\\n emit TrusteeAddressChanged(_address);\\n }\\n\\n /**\\n * @notice Sets the TrusteeFeeBps to the percentage of yield that should be\\n * received in basis points.\\n */\\n function setTrusteeFeeBps(uint256 _basis) external onlyGovernor {\\n require(_basis <= 5000, \\\"basis cannot exceed 50%\\\");\\n trusteeFeeBps = _basis;\\n emit TrusteeFeeBpsChanged(_basis);\\n }\\n\\n /**\\n * @notice Set OToken Metapool strategy\\n * @param _ousdMetaStrategy Address of OToken metapool strategy\\n */\\n function setOusdMetaStrategy(address _ousdMetaStrategy)\\n external\\n onlyGovernor\\n {\\n ousdMetaStrategy = _ousdMetaStrategy;\\n emit OusdMetaStrategyUpdated(_ousdMetaStrategy);\\n }\\n\\n /***************************************\\n Pause\\n ****************************************/\\n\\n /**\\n * @notice Set the deposit paused flag to true to prevent rebasing.\\n */\\n function pauseRebase() external onlyGovernorOrStrategist {\\n rebasePaused = true;\\n emit RebasePaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to true to allow rebasing.\\n */\\n function unpauseRebase() external onlyGovernorOrStrategist {\\n rebasePaused = false;\\n emit RebaseUnpaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to true to prevent capital movement.\\n */\\n function pauseCapital() external onlyGovernorOrStrategist {\\n capitalPaused = true;\\n emit CapitalPaused();\\n }\\n\\n /**\\n * @notice Set the deposit paused flag to false to enable capital movement.\\n */\\n function unpauseCapital() external onlyGovernorOrStrategist {\\n capitalPaused = false;\\n emit CapitalUnpaused();\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n /**\\n * @notice Transfer token to governor. Intended for recovering tokens stuck in\\n * contract, i.e. mistaken sends.\\n * @param _asset Address for the asset\\n * @param _amount Amount of the asset to transfer\\n */\\n function transferToken(address _asset, uint256 _amount)\\n external\\n onlyGovernor\\n {\\n require(!assets[_asset].isSupported, \\\"Only unsupported assets\\\");\\n IERC20(_asset).safeTransfer(governor(), _amount);\\n }\\n\\n /***************************************\\n Strategies Admin\\n ****************************************/\\n\\n /**\\n * @notice Withdraws all assets from the strategy and sends assets to the Vault.\\n * @param _strategyAddr Strategy address.\\n */\\n function withdrawAllFromStrategy(address _strategyAddr)\\n external\\n onlyGovernorOrStrategist\\n {\\n _withdrawAllFromStrategy(_strategyAddr);\\n }\\n\\n function _withdrawAllFromStrategy(address _strategyAddr) internal virtual {\\n require(\\n strategies[_strategyAddr].isSupported,\\n \\\"Strategy is not supported\\\"\\n );\\n IStrategy strategy = IStrategy(_strategyAddr);\\n strategy.withdrawAll();\\n }\\n\\n /**\\n * @notice Withdraws all assets from all the strategies and sends assets to the Vault.\\n */\\n function withdrawAllFromStrategies() external onlyGovernorOrStrategist {\\n _withdrawAllFromStrategies();\\n }\\n\\n function _withdrawAllFromStrategies() internal virtual {\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n IStrategy(allStrategies[i]).withdrawAll();\\n }\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n function _cacheDecimals(address token) internal {\\n Asset storage tokenAsset = assets[token];\\n if (tokenAsset.decimals != 0) {\\n return;\\n }\\n uint8 decimals = IBasicToken(token).decimals();\\n require(decimals >= 6 && decimals <= 18, \\\"Unexpected precision\\\");\\n tokenAsset.decimals = decimals;\\n }\\n}\\n\",\"keccak256\":\"0xff7cbfd07b4262dad7eaac9bb56ade41e36097feb781b01a55a7982b9d023fd6\",\"license\":\"BUSL-1.1\"},\"contracts/vault/VaultStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultStorage contract\\n * @notice The VaultStorage contract defines the storage for the Vault contracts\\n * @author Origin Protocol Inc\\n */\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { OUSD } from \\\"../token/OUSD.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport \\\"../utils/Helpers.sol\\\";\\n\\ncontract VaultStorage is Initializable, Governable {\\n using SafeERC20 for IERC20;\\n\\n event AssetSupported(address _asset);\\n event AssetRemoved(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event OusdMetaStrategyUpdated(address _ousdMetaStrategy);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event NetOusdMintForStrategyThresholdChanged(uint256 _threshold);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event RebasePerSecondMaxChanged(uint256 rebaseRatePerSecond);\\n event DripDurationChanged(uint256 dripDuration);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n event WithdrawalClaimDelayUpdated(uint256 _newDelay);\\n\\n // Since we are proxy, all state should be uninitalized.\\n // Since this storage contract does not have logic directly on it\\n // we should not be checking for to see if these variables can be constant.\\n // slither-disable-start uninitialized-state\\n // slither-disable-start constable-states\\n\\n // Assets supported by the Vault, i.e. Stablecoins\\n enum UnitConversion {\\n DECIMALS,\\n GETEXCHANGERATE\\n }\\n // Changed to fit into a single storage slot so the decimals needs to be recached\\n struct Asset {\\n // Note: OETHVaultCore doesn't use `isSupported` when minting,\\n // redeeming or checking balance of assets.\\n bool isSupported;\\n UnitConversion unitConversion;\\n uint8 decimals;\\n // Max allowed slippage from the Oracle price when swapping collateral assets in basis points.\\n // For example 40 == 0.4% slippage\\n uint16 allowedOracleSlippageBps;\\n }\\n\\n /// @dev mapping of supported vault assets to their configuration\\n mapping(address => Asset) internal assets;\\n /// @dev list of all assets supported by the vault.\\n address[] internal allAssets;\\n\\n // Strategies approved for use by the Vault\\n struct Strategy {\\n bool isSupported;\\n uint256 _deprecated; // Deprecated storage slot\\n }\\n /// @dev mapping of strategy contracts to their configuration\\n mapping(address => Strategy) public strategies;\\n /// @dev list of all vault strategies\\n address[] internal allStrategies;\\n\\n /// @notice Address of the Oracle price provider contract\\n address public priceProvider;\\n /// @notice pause rebasing if true\\n bool public rebasePaused;\\n /// @notice pause operations that change the OToken supply.\\n /// eg mint, redeem, allocate, mint/burn for strategy\\n bool public capitalPaused;\\n /// @notice Redemption fee in basis points. eg 50 = 0.5%\\n uint256 public redeemFeeBps;\\n /// @notice Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\\n uint256 public vaultBuffer;\\n /// @notice OToken mints over this amount automatically allocate funds. 18 decimals.\\n uint256 public autoAllocateThreshold;\\n /// @notice OToken mints over this amount automatically rebase. 18 decimals.\\n uint256 public rebaseThreshold;\\n\\n /// @dev Address of the OToken token. eg OUSD or OETH.\\n OUSD public oUSD;\\n\\n /// @dev Storage slot for the address of the VaultAdmin contract that is delegated to\\n // keccak256(\\\"OUSD.vault.governor.admin.impl\\\");\\n bytes32 public constant adminImplPosition =\\n 0xa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd9;\\n\\n /// @dev Address of the contract responsible for post rebase syncs with AMMs\\n address private _deprecated_rebaseHooksAddr = address(0);\\n\\n /// @dev Deprecated: Address of Uniswap\\n address private _deprecated_uniswapAddr = address(0);\\n\\n /// @notice Address of the Strategist\\n address public strategistAddr = address(0);\\n\\n /// @notice Mapping of asset address to the Strategy that they should automatically\\n // be allocated to\\n mapping(address => address) public assetDefaultStrategies;\\n\\n /// @notice Max difference between total supply and total value of assets. 18 decimals.\\n uint256 public maxSupplyDiff;\\n\\n /// @notice Trustee contract that can collect a percentage of yield\\n address public trusteeAddress;\\n\\n /// @notice Amount of yield collected in basis points. eg 2000 = 20%\\n uint256 public trusteeFeeBps;\\n\\n /// @dev Deprecated: Tokens that should be swapped for stablecoins\\n address[] private _deprecated_swapTokens;\\n\\n uint256 constant MINT_MINIMUM_UNIT_PRICE = 0.998e18;\\n\\n /// @notice Metapool strategy that is allowed to mint/burn OTokens without changing collateral\\n\\n address public ousdMetaStrategy;\\n\\n /// @notice How much OTokens are currently minted by the strategy\\n int256 public netOusdMintedForStrategy;\\n\\n /// @notice How much net total OTokens are allowed to be minted by all strategies\\n uint256 public netOusdMintForStrategyThreshold;\\n\\n uint256 constant MIN_UNIT_PRICE_DRIFT = 0.7e18;\\n uint256 constant MAX_UNIT_PRICE_DRIFT = 1.3e18;\\n\\n /// @notice Collateral swap configuration.\\n /// @dev is packed into a single storage slot to save gas.\\n struct SwapConfig {\\n // Contract that swaps the vault's collateral assets\\n address swapper;\\n // Max allowed percentage the total value can drop below the total supply in basis points.\\n // For example 100 == 1%\\n uint16 allowedUndervalueBps;\\n }\\n SwapConfig internal swapConfig = SwapConfig(address(0), 0);\\n\\n // List of strategies that can mint oTokens directly\\n // Used in OETHBaseVaultCore\\n mapping(address => bool) public isMintWhitelistedStrategy;\\n\\n /// @notice Address of the Dripper contract that streams harvested rewards to the Vault\\n /// @dev The vault is proxied so needs to be set with setDripper against the proxy contract.\\n address public dripper;\\n\\n /// Withdrawal Queue Storage /////\\n\\n struct WithdrawalQueueMetadata {\\n // cumulative total of all withdrawal requests included the ones that have already been claimed\\n uint128 queued;\\n // cumulative total of all the requests that can be claimed including the ones that have already been claimed\\n uint128 claimable;\\n // total of all the requests that have been claimed\\n uint128 claimed;\\n // index of the next withdrawal request starting at 0\\n uint128 nextWithdrawalIndex;\\n }\\n\\n /// @notice Global metadata for the withdrawal queue including:\\n /// queued - cumulative total of all withdrawal requests included the ones that have already been claimed\\n /// claimable - cumulative total of all the requests that can be claimed including the ones already claimed\\n /// claimed - total of all the requests that have been claimed\\n /// nextWithdrawalIndex - index of the next withdrawal request starting at 0\\n WithdrawalQueueMetadata public withdrawalQueueMetadata;\\n\\n struct WithdrawalRequest {\\n address withdrawer;\\n bool claimed;\\n uint40 timestamp; // timestamp of the withdrawal request\\n // Amount of oTokens to redeem. eg OETH\\n uint128 amount;\\n // cumulative total of all withdrawal requests including this one.\\n // this request can be claimed when this queued amount is less than or equal to the queue's claimable amount.\\n uint128 queued;\\n }\\n\\n /// @notice Mapping of withdrawal request indices to the user withdrawal request data\\n mapping(uint256 => WithdrawalRequest) public withdrawalRequests;\\n\\n /// @notice Sets a minimum delay that is required to elapse between\\n /// requesting async withdrawals and claiming the request.\\n /// When set to 0 async withdrawals are disabled.\\n uint256 public withdrawalClaimDelay;\\n\\n /// @notice Time in seconds that the vault last rebased yield.\\n uint64 public lastRebase;\\n\\n /// @notice Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable.\\n uint64 public dripDuration;\\n\\n /// @notice max rebase percentage per second\\n /// Can be used to set maximum yield of the protocol,\\n /// spreading out yield over time\\n uint64 public rebasePerSecondMax;\\n\\n /// @notice target rebase rate limit, based on past rates and funds available.\\n uint64 public rebasePerSecondTarget;\\n\\n uint256 internal constant MAX_REBASE = 0.02 ether;\\n uint256 internal constant MAX_REBASE_PER_SECOND =\\n uint256(0.05 ether) / 1 days;\\n\\n // For future use\\n uint256[43] private __gap;\\n\\n // slither-disable-end constable-states\\n // slither-disable-end uninitialized-state\\n\\n /**\\n * @notice set the implementation for the admin, this needs to be in a base class else we cannot set it\\n * @param newImpl address of the implementation\\n */\\n function setAdminImpl(address newImpl) external onlyGovernor {\\n require(\\n Address.isContract(newImpl),\\n \\\"new implementation is not a contract\\\"\\n );\\n bytes32 position = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newImpl)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58f3046a1b219fd43d234f5374a4ce6ec1d8cb51a837e06eafb5532e05b0f6c1\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x603d80546001600160a01b0319908116909155603e805482169055603f8054909116905560e0604052600060a081905260c052604880546001600160b01b031916905534801561004e57600080fd5b50604051613e99380380613e9983398101604081905261006d9161007e565b6001600160a01b03166080526100ae565b60006020828403121561009057600080fd5b81516001600160a01b03811681146100a757600080fd5b9392505050565b608051613dbb6100de6000396000818161061f01528181612e1501528181612f4501526133320152613dbb6000f3fe608060405234801561001057600080fd5b506004361061041d5760003560e01c80635d36b1901161022b578063ae69f3cb11610130578063c9919112116100b8578063e6cc543211610087578063e6cc543214610a0b578063e829cc1614610a1f578063eb03654b14610a32578063ef08edc214610a45578063fc0cfeee14610a6c57600080fd5b8063c9919112146109d4578063d38bfff4146109dc578063d58e3b3a146109ef578063e45cc9f014610a0257600080fd5b8063b890ebf6116100ff578063b890ebf614610984578063bb7a632e14610997578063bc90106b146109b1578063c5f00841146109c4578063c7af3352146109cc57600080fd5b8063ae69f3cb14610938578063b2c9336d1461094b578063b4925a201461095e578063b888879e1461097157600080fd5b8063840c4c7a116101b357806394828ffd1161018257806394828ffd146108d857806395b166bc146108e05780639c82f2a4146108f35780639fa1826e14610906578063a403e4d51461090f57600080fd5b8063840c4c7a146108015780638e510b52146108145780638ec489a21461081d578063937b25811461083057600080fd5b80636c7561e8116101fa5780636c7561e8146107ac578063773540b3146107bf57806378f353a1146107d25780637a2202f3146107e55780637b9a7096146107ee57600080fd5b80635d36b1901461076b578063603ea03b14610773578063636e6c4014610786578063663e64ce1461079957600080fd5b8063372aa224116103315780634bed3bc0116102b957806352d38e5d1161028857806352d38e5d1461071557806353ca9f241461071e578063570d8e1d146107325780635802a17214610745578063597c89101461075857600080fd5b80634bed3bc0146106a35780634d5f4629146106b657806350ba711c146106e8578063527e83a8146106fb57600080fd5b80633fc8cef3116103005780633fc8cef31461061a5780634530820a1461064157806345e4213b1461067457806349c1d54d1461067d5780634a5e42b11461069057600080fd5b8063372aa224146105a857806339ebf823146105bb5780633b8ae397146105ff5780633dbc911f1461061257600080fd5b806318ce56bd116103b45780632b3297f9116103835780632b3297f9146104ff5780632da845a8146105105780632e9958ab14610523578063362bd1a31461053657806336b6d9441461059557600080fd5b806318ce56bd146104c75780631cfbe7bc146104da5780631edfe3da146104ed578063207134b0146104f657600080fd5b80630c340a24116103f05780630c340a241461046e5780631072cbea1461048e578063175188e8146104a15780631816dd4a146104b457600080fd5b80630493a0fa1461042257806309f49bf51461043757806309f6442c1461043f5780630acbda751461045b575b600080fd5b61043561043036600461374e565b610a7f565b005b610435610b84565b61044860385481565b6040519081526020015b60405180910390f35b61043561046936600461374e565b610bf4565b610476610c9f565b6040516001600160a01b039091168152602001610452565b61043561049c366004613783565b610cbc565b6104356104af3660046137ad565b610d69565b6104356104c23660046137ad565b611030565b604554610476906001600160a01b031681565b6104356104e836600461374e565b611137565b61044860395481565b61044860435481565b6048546001600160a01b0316610476565b61043561051e3660046137ad565b6111f9565b6104356105313660046137ad565b61126b565b604b54604c54610562916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b0395861681529385166020850152918416918301919091529091166060820152608001610452565b6104356105a33660046137ad565b6112d9565b6104356105b63660046137ad565b611309565b6105e86105c93660046137ad565b6035602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610452565b61043561060d3660046137ad565b61137b565b6104356114b8565b6104767f000000000000000000000000000000000000000000000000000000000000000081565b61066461064f3660046137ad565b60496020526000908152604090205460ff1681565b6040519015158152602001610452565b610448604e5481565b604254610476906001600160a01b031681565b61043561069e3660046137ad565b61152e565b604854600160a01b900461ffff16610448565b604f546106d090600160c01b90046001600160401b031681565b6040516001600160401b039091168152602001610452565b6104486106f63660046137c8565b611856565b604f546106d090600160801b90046001600160401b031681565b610448603b5481565b60375461066490600160a01b900460ff1681565b603f54610476906001600160a01b031681565b603c54610476906001600160a01b031681565b6104356107663660046137ad565b6118f9565b61043561193a565b604a54610476906001600160a01b031681565b61043561079436600461374e565b6119e0565b6104356107a736600461374e565b611a3e565b6104356107ba36600461387e565b611a97565b6104356107cd3660046137ad565b611d06565b604f546106d0906001600160401b031681565b61044860475481565b6104356107fc3660046138c7565b611d78565b61043561080f366004613945565b611eae565b61044860415481565b61043561082b36600461374e565b611f47565b61089161083e36600461374e565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a001610452565b610435611ffc565b6104356108ee3660046137ad565b61206c565b6104356109013660046137ad565b612133565b610448603a5481565b61047661091d3660046137ad565b6040602081905260009182529020546001600160a01b031681565b610435610946366004613945565b6121a5565b61043561095936600461374e565b612233565b61043561096c36600461374e565b61228c565b603754610476906001600160a01b031681565b61043561099236600461374e565b6123ef565b604f546106d090600160401b90046001600160401b031681565b6104356109bf3660046139c9565b612448565b610435612653565b6106646126c9565b6104356126fa565b6104356109ea3660046137ad565b61273a565b6104356109fd3660046137ad565b6127de565b61044860465481565b60375461066490600160a81b900460ff1681565b610435610a2d3660046139f3565b612850565b610435610a4036600461374e565b612910565b6104487fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd981565b610435610a7a3660046137ad565b6129c5565b603f546001600160a01b0316331480610a9b5750610a9b6126c9565b610ac05760405162461bcd60e51b8152600401610ab790613a0e565b60405180910390fd5b306001600160a01b031663af14052c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b50505050610b1c81612a67565b604f80546001600160401b0392909216600160401b026fffffffffffffffff0000000000000000199092169190911790556040518181527f406e15fbca1d8ded2dbb06765fea3a54f18395c54125a4c9916dd00ea14ee15e906020015b60405180910390a150565b603f546001600160a01b0316331480610ba05750610ba06126c9565b610bbc5760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a01b191690556040517fbc044409505c95b6b851433df96e1beae715c909d8e7c1d6d7ab783300d4e3b990600090a1565b610bfc6126c9565b610c185760405162461bcd60e51b8152600401610ab790613a56565b611388811115610c6a5760405162461bcd60e51b815260206004820152601760248201527f62617369732063616e6e6f7420657863656564203530250000000000000000006044820152606401610ab7565b60438190556040518181527f56287a45051933ea374811b3d5d165033047be5572cac676f7c28b8be4f746c790602001610b79565b6000610cb7600080516020613d668339815191525490565b905090565b610cc46126c9565b610ce05760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff1615610d495760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920756e737570706f72746564206173736574730000000000000000006044820152606401610ab7565b610d65610d54610c9f565b6001600160a01b0384169083612ad3565b5050565b610d716126c9565b610d8d5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff16610dc55760405162461bcd60e51b8152600401610ab790613a8d565b60345460005b81811015610e7457826001600160a01b03166040600060348481548110610df457610df4613abc565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541603610e6c5760405162461bcd60e51b815260206004820181905260248201527f53747261746567792069732064656661756c7420666f7220616e2061737365746044820152606401610ab7565b600101610dcb565b506036548060005b82811015610ecb57846001600160a01b031660368281548110610ea157610ea1613abc565b6000918252602090912001546001600160a01b031603610ec357809150610ecb565b600101610e7c565b508181101561102a576036610ee1600184613ae8565b81548110610ef157610ef1613abc565b600091825260209091200154603680546001600160a01b039092169183908110610f1d57610f1d613abc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506036805480610f5c57610f5c613afb565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861680835260359091526040808320805460ff19169055805163429c145b60e11b81529051879363853828b6926004808201939182900301818387803b158015610fd357600080fd5b505af1158015610fe7573d6000803e3d6000fd5b50506040516001600160a01b03881681527f09a1db4b80c32706328728508c941a6b954f31eb5affd32f236c1fd405f8fea49250602001905060405180910390a1505b50505050565b6110386126c9565b6110545760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff1661108c5760405162461bcd60e51b8152600401610ab790613a8d565b6001600160a01b03811660009081526049602052604090205460ff16156110eb5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481dda1a5d195b1a5cdd1959606a1b6044820152606401610ab7565b6001600160a01b038116600081815260496020526040808220805460ff19166001179055517f47c8c96a5942f094264111c5fe7f6a4fe86efe63254a6fa7afa5fc84f07d58e89190a250565b61113f6126c9565b61115b5760405162461bcd60e51b8152600401610ab790613a56565b8015806111785750610258811015801561117857506213c6808111155b6111c45760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420636c61696d2064656c617920706572696f640000000000006044820152606401610ab7565b604e8190556040518181527fc59f5e32049abab44ddea11021f5abb89422a2f550837afcf25df9fc8d0db6b090602001610b79565b6112016126c9565b61121d5760405162461bcd60e51b8152600401610ab790613a56565b604280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e4af5ac389e8cde1bdaa6830881b6c987c62a45cfb3b33d27d805cde3b5775090602001610b79565b6112736126c9565b61128f5760405162461bcd60e51b8152600401610ab790613a56565b604a80546001600160a01b0319166001600160a01b0383169081179091556040517faf2910d9759321733de15af1827a49830692912adeb2b3646334861f2cd2eed490600090a250565b6112e16126c9565b6112fd5760405162461bcd60e51b8152600401610ab790613a56565b61130681612b2a565b50565b6113116126c9565b61132d5760405162461bcd60e51b8152600401610ab790613a56565b603780546001600160a01b0319166001600160a01b0383169081179091556040519081527fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a90602001610b79565b6113836126c9565b61139f5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff16156114085760405162461bcd60e51b815260206004820152601960248201527f537472617465677920616c726561647920617070726f766564000000000000006044820152606401610ab7565b6040805180820182526001808252600060208084018281526001600160a01b038716808452603583528684209551865460ff19169015151786559051948401949094556036805493840181559091527f4a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b890910180546001600160a01b0319168317905591519081527f960dd94cbb79169f09a4e445d58b895df2d9bffa5b31055d0932d801724a20d19101610b79565b603f546001600160a01b03163314806114d457506114d46126c9565b6114f05760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a81b1916600160a81b1790556040517f71f0e5b62f846a22e0b4d159e516e62fa9c2b8eb570be15f83e67d98a2ee51e090600090a1565b6115366126c9565b6115525760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526033602052604090205460ff166115b05760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610ab7565b6001600160a01b0381166000908152603360205260408120546115e5906509184e72a0009062010000900460ff166012612c31565b604051632fa8a91360e11b81526001600160a01b038416600482015290915081903090635f51522690602401602060405180830381865afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116529190613b11565b11156116a05760405162461bcd60e51b815260206004820152601760248201527f5661756c74207374696c6c20686f6c64732061737365740000000000000000006044820152606401610ab7565b6034548060005b828110156116f657846001600160a01b0316603482815481106116cc576116cc613abc565b6000918252602090912001546001600160a01b0316036116ee578091506116f6565b6001016116a7565b506034611704600184613ae8565b8154811061171457611714613abc565b600091825260209091200154603480546001600160a01b03909216918390811061174057611740613abc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550603480548061177f5761177f613afb565b60008281526020808220600019908401810180546001600160a01b031990811690915593019093556001600160a01b038716808252604080855280832080549094169093558251908152928301527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038416600081815260336020908152604091829020805464ffffffffff1916905590519182527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc910160405180910390a150505050565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535805460009190600119810161189e5760405162461bcd60e51b8152600401610ab790613b2a565b60028255603f546001600160a01b03163314806118be57506118be6126c9565b6118da5760405162461bcd60e51b8152600401610ab790613a0e565b6118e8898989898989612c95565b600190925550979650505050505050565b603f546001600160a01b031633148061191557506119156126c9565b6119315760405162461bcd60e51b8152600401610ab790613a0e565b61130681612ce0565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146119d55760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b6064820152608401610ab7565b6119de33612d3f565b565b6119e86126c9565b611a045760405162461bcd60e51b8152600401610ab790613a56565b600060465560478190556040518181527fc29d6fedbc6bdf267a08166c2b976fbd72aca5d6a769528616f8b9224c8f197f90602001610b79565b611a466126c9565b611a625760405162461bcd60e51b8152600401610ab790613a56565b60418190556040518181527f95201f9c21f26877223b1ff4073936a6484c35495649e60e55730497aeb60d9390602001610b79565b611a9f6126c9565b611abb5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff1615611b245760405162461bcd60e51b815260206004820152601760248201527f417373657420616c726561647920737570706f727465640000000000000000006044820152606401610ab7565b60405180608001604052806001151581526020018260ff166001811115611b4d57611b4d613b52565b6001811115611b5e57611b5e613b52565b81526000602080830182905260409283018290526001600160a01b0386168252603381529190208251815490151560ff19821681178355928401519192839161ff001990911661ffff1990911617610100836001811115611bc157611bc1613b52565b02179055506040820151815460609093015161ffff1663010000000264ffff0000001960ff90921662010000029190911664ffffff00001990931692909217919091179055611c0f82612b2a565b603480546001810182556000919091527f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c10180546001600160a01b0319166001600160a01b038481169182179092556037546040516315d5220f60e31b815260048101929092529091169063aea9107890602401602060405180830381865afa158015611ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc49190613b11565b506040516001600160a01b03831681527f4f1ac48525e50059cc1cc6e0e1940ece0dd653a4db4841538d6aef036be2fb7b906020015b60405180910390a15050565b611d0e6126c9565b611d2a5760405162461bcd60e51b8152600401610ab790613a56565b603f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f869e0abd13cc3a975de7b93be3df1cb2255c802b1cead85963cc79d99f131bee90602001610b79565b611d806126c9565b611d9c5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff16611dfa5760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610ab7565b6103e88161ffff1610611e435760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b6044820152606401610ab7565b6001600160a01b038216600081815260336020908152604091829020805464ffff0000001916630100000061ffff8716908102919091179091558251938452908301527f8d22e9d2cbe8bb65a3c4412bd8970743864512a1a0e004e8d00fb96277b78b949101611cfa565b603f546001600160a01b0316331480611eca5750611eca6126c9565b611ee65760405162461bcd60e51b8152600401610ab790613a0e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546001198101611f2a5760405162461bcd60e51b8152600401610ab790613b2a565b60028255611f3b8787878787612d9e565b50600190555050505050565b603f546001600160a01b0316331480611f635750611f636126c9565b611f7f5760405162461bcd60e51b8152600401610ab790613a0e565b670de0b6b3a7640000811115611fc75760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610ab7565b60398190556040518181527f41ecb23a0e7865b25f38c268b7c3012220d822929e9edff07326e89d5bb822b590602001610b79565b603f546001600160a01b031633148061201857506120186126c9565b6120345760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a81b191690556040517f891ebab18da80ebeeea06b1b1cede098329c4c008906a98370c2ac7a80b571cb90600090a1565b6120746126c9565b6120905760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526049602052604090205460ff166120ea5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ab7565b6001600160a01b038116600081815260496020526040808220805460ff19169055517f0ec40967a61509853550658e51d0e4297f7cba244fe4adc8ba18b5631ac20e2f9190a250565b61213b6126c9565b6121575760405162461bcd60e51b8152600401610ab790613a56565b604880546001600160a01b0319166001600160a01b0383169081179091556040519081527f7d7719313229e558c5a3893cad2eb86a86a049156d1d9ebd5c63a8eedefd1c0390602001610b79565b603f546001600160a01b03163314806121c157506121c16126c9565b6121dd5760405162461bcd60e51b8152600401610ab790613a0e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535805460011981016122215760405162461bcd60e51b8152600401610ab790613b2a565b60028255611f3b308888888888612fd6565b61223b6126c9565b6122575760405162461bcd60e51b8152600401610ab790613a56565b603a8190556040518181527f2ec5fb5a3d2703edc461252d92ccd2799c3c74f01d97212b20388207fa17ae4590602001610b79565b603f546001600160a01b03163314806122a857506122a86126c9565b6122c45760405162461bcd60e51b8152600401610ab790613a0e565b306001600160a01b031663af14052c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122ff57600080fd5b505af1158015612313573d6000803e3d6000fd5b5050505060006301e1338060648361232b9190613b68565b6123359190613b68565b905061234b6201518066b1a2bc2ec50000613b68565b81111561238a5760405162461bcd60e51b815260206004820152600d60248201526c0a4c2e8ca40e8dede40d0d2ced609b1b6044820152606401610ab7565b61239381612a67565b604f80546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556040518181527fef46f143af5fead0010484fe7d6ec2e2972420faa76157f5a6075aa72e614cb590602001611cfa565b6123f76126c9565b6124135760405162461bcd60e51b8152600401610ab790613a56565b603b8190556040518181527f39367850377ac04920a9a670f2180e7a94d83b15ad302e59875ec58fd10bd37d90602001610b79565b603f546001600160a01b031633148061246457506124646126c9565b6124805760405162461bcd60e51b8152600401610ab790613a0e565b604080516001600160a01b038085168252831660208201527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b03811615612625576001600160a01b03811660009081526035602052604090205460ff1661250a5760405162461bcd60e51b8152600401610ab790613a8d565b6001600160a01b038216600090815260336020526040902054819060ff1661256d5760405162461bcd60e51b8152602060048201526016602482015275105cdcd95d081a5cc81b9bdd081cdd5c1c1bdc9d195960521b6044820152606401610ab7565b60405163551c457b60e11b81526001600160a01b03848116600483015282169063aa388af690602401602060405180830381865afa1580156125b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d79190613b8a565b6126235760405162461bcd60e51b815260206004820152601f60248201527f4173736574206e6f7420737570706f72746564206279205374726174656779006044820152606401610ab7565b505b6001600160a01b03918216600090815260406020819052902080546001600160a01b03191691909216179055565b603f546001600160a01b031633148061266f575061266f6126c9565b61268b5760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a01b1916600160a01b1790556040517f8cff26a5985614b3d30629cc4ab83824bf115aec971b718d8f2f99562032e97290600090a1565b60006126e1600080516020613d668339815191525490565b6001600160a01b0316336001600160a01b031614905090565b603f546001600160a01b031633148061271657506127166126c9565b6127325760405162461bcd60e51b8152600401610ab790613a0e565b6119de61303f565b6127426126c9565b61275e5760405162461bcd60e51b8152600401610ab790613a56565b612786817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166127a6600080516020613d668339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6127e66126c9565b6128025760405162461bcd60e51b8152600401610ab790613a56565b604580546001600160a01b0319166001600160a01b0383169081179091556040519081527fa12850fb726e0b2b7b3c9a9342031e1268a8148d0eb06b4bea8613204ffcd2b890602001610b79565b6128586126c9565b6128745760405162461bcd60e51b8152600401610ab790613a56565b6127118161ffff16106128c05760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420626173697320706f696e747360601b6044820152606401610ab7565b6048805461ffff60a01b1916600160a01b61ffff8416908102919091179091556040519081527ff12c00256bee2b6facb111a88a9b1cff86e79132939b44f1353212d6f746955790602001610b79565b6129186126c9565b6129345760405162461bcd60e51b8152600401610ab790613a56565b6103e88111156129905760405162461bcd60e51b815260206004820152602160248201527f52656465656d206665652073686f756c64206e6f74206265206f7665722031306044820152602560f81b6064820152608401610ab7565b60388190556040518181527fd6c7508d6658ccee36b7b7d7fd72e5cbaeefb40c64eff24e9ae7470e846304ee90602001610b79565b6129cd6126c9565b6129e95760405162461bcd60e51b8152600401610ab790613a56565b803b612a435760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b6064820152608401610ab7565b7fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd955565b60006001600160401b03821115612acf5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610ab7565b5090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612b25908490613096565b505050565b6001600160a01b0381166000908152603360205260409020805462010000900460ff1615612b56575050565b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bba9190613bac565b905060068160ff1610158015612bd4575060128160ff1611155b612c175760405162461bcd60e51b81526020600482015260146024820152732ab732bc3832b1ba32b210383932b1b4b9b4b7b760611b6044820152606401610ab7565b815460ff909116620100000262ff00001990911617905550565b600081831115612c6157612c5a612c488385613ae8565b612c5390600a613cb0565b8590613168565b9350612c8b565b81831015612c8b57612c88612c768484613ae8565b612c8190600a613cb0565b859061317d565b93505b50825b9392505050565b60405162461bcd60e51b815260206004820152601d60248201527f436f6c6c61746572616c2073776170206e6f7420737570706f727465640000006044820152600090606401610ab7565b612ce981613189565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612d2457600080fd5b505af1158015612d38573d6000803e3d6000fd5b5050505050565b6001600160a01b038116612d955760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f7220697320616464726573732830290000000000006044820152606401610ab7565b6113068161324d565b6001600160a01b03851660009081526035602052604090205460ff16612dfc5760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420746f20537472617465677960681b6044820152606401610ab7565b600183148015612e0c5750600181145b8015612e7057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684846000818110612e5057612e50613abc565b9050602002016020810190612e6591906137ad565b6001600160a01b0316145b612eb55760405162461bcd60e51b815260206004820152601660248201527513db9b1e4815d15512081a5cc81cdd5c1c1bdc9d195960521b6044820152606401610ab7565b612ebd6132b4565b82826000818110612ed057612ed0613abc565b905060200201351115612f255760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768205745544820617661696c61626c65000000000000006044820152606401610ab7565b612f7c8583836000818110612f3c57612f3c613abc565b905060200201357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612ad39092919063ffffffff16565b846001600160a01b031663de5f62686040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612fb757600080fd5b505af1158015612fcb573d6000803e3d6000fd5b505050505050505050565b612fe48686868686866133c2565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561301f57600080fd5b505af1158015613033573d6000803e3d6000fd5b50505050505050505050565b61304761354a565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561308257600080fd5b505af115801561102a573d6000803e3d6000fd5b60006130eb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135d69092919063ffffffff16565b805190915015612b2557808060200190518101906131099190613b8a565b612b255760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ab7565b60006131748284613cbc565b90505b92915050565b60006131748284613b68565b6001600160a01b03811660009081526035602052604090205460ff166131f15760405162461bcd60e51b815260206004820152601960248201527f5374726174656779206973206e6f7420737570706f72746564000000000000006044820152606401610ab7565b6000819050806001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561323157600080fd5b505af1158015613245573d6000803e3d6000fd5b505050505050565b806001600160a01b031661326d600080516020613d668339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020613d6683398151915255565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c548083169585018690529290920416606083015260009283916133049190613cd3565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015613379573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339d9190613b11565b90508181116133b0576000935050505090565b6133ba8282613ae8565b935050505090565b6001600160a01b03851660009081526035602052604090205460ff166134225760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642066726f6d20537472617465677960581b6044820152606401610ab7565b8281146134715760405162461bcd60e51b815260206004820152601960248201527f506172616d65746572206c656e677468206d69736d61746368000000000000006044820152606401610ab7565b8260005b8181101561354057866001600160a01b031663d9caed128988888581811061349f5761349f613abc565b90506020020160208101906134b491906137ad565b8787868181106134c6576134c6613abc565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561351d57600080fd5b505af1158015613531573d6000803e3d6000fd5b50505050806001019050613475565b5050505050505050565b60365460005b81811015610d65576036818154811061356b5761356b613abc565b60009182526020822001546040805163429c145b60e11b815290516001600160a01b039092169263853828b69260048084019382900301818387803b1580156135b357600080fd5b505af11580156135c7573d6000803e3d6000fd5b50505050806001019050613550565b60606135e584846000856135ed565b949350505050565b60608247101561364e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ab7565b843b61369c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ab7565b600080866001600160a01b031685876040516136b89190613d16565b60006040518083038185875af1925050503d80600081146136f5576040519150601f19603f3d011682016040523d82523d6000602084013e6136fa565b606091505b509150915061370a828286613715565b979650505050505050565b60608315613724575081612c8e565b8251156137345782518084602001fd5b8160405162461bcd60e51b8152600401610ab79190613d32565b60006020828403121561376057600080fd5b5035919050565b80356001600160a01b038116811461377e57600080fd5b919050565b6000806040838503121561379657600080fd5b61379f83613767565b946020939093013593505050565b6000602082840312156137bf57600080fd5b61317482613767565b60008060008060008060a087890312156137e157600080fd5b6137ea87613767565b95506137f860208801613767565b9450604087013593506060870135925060808701356001600160401b0381111561382157600080fd5b8701601f8101891361383257600080fd5b80356001600160401b0381111561384857600080fd5b89602082840101111561385a57600080fd5b60208201935080925050509295509295509295565b60ff8116811461130657600080fd5b6000806040838503121561389157600080fd5b61389a83613767565b915060208301356138aa8161386f565b809150509250929050565b803561ffff8116811461377e57600080fd5b600080604083850312156138da57600080fd5b6138e383613767565b91506138f1602084016138b5565b90509250929050565b60008083601f84011261390c57600080fd5b5081356001600160401b0381111561392357600080fd5b6020830191508360208260051b850101111561393e57600080fd5b9250929050565b60008060008060006060868803121561395d57600080fd5b61396686613767565b945060208601356001600160401b0381111561398157600080fd5b61398d888289016138fa565b90955093505060408601356001600160401b038111156139ac57600080fd5b6139b8888289016138fa565b969995985093965092949392505050565b600080604083850312156139dc57600080fd5b6139e583613767565b91506138f160208401613767565b600060208284031215613a0557600080fd5b613174826138b5565b60208082526028908201527f43616c6c6572206973206e6f74207468652053747261746567697374206f722060408201526723b7bb32b93737b960c11b606082015260800190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60208082526015908201527414dd1c985d1959de481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561317757613177613ad2565b634e487b7160e01b600052603160045260246000fd5b600060208284031215613b2357600080fd5b5051919050565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600082613b8557634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613b9c57600080fd5b81518015158114612c8e57600080fd5b600060208284031215613bbe57600080fd5b8151612c8e8161386f565b6001815b6001841115613c0457808504811115613be857613be8613ad2565b6001841615613bf657908102905b60019390931c928002613bcd565b935093915050565b600082613c1b57506001613177565b81613c2857506000613177565b8160018114613c3e5760028114613c4857613c64565b6001915050613177565b60ff841115613c5957613c59613ad2565b50506001821b613177565b5060208310610133831016604e8410600b8410161715613c87575081810a613177565b613c946000198484613bc9565b8060001904821115613ca857613ca8613ad2565b029392505050565b60006131748383613c0c565b808202811582820484141761317757613177613ad2565b6001600160801b03828116828216039081111561317757613177613ad2565b60005b83811015613d0d578181015183820152602001613cf5565b50506000910152565b60008251613d28818460208701613cf2565b9190910192915050565b6020815260008251806020840152613d51816040850160208701613cf2565b601f01601f1916919091016040019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa26469706673582212206100cd46bd28c7d5cd0e2e031923c38df1535948dfe444d8a06be3b1dfdd1f7064736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b506004361061041d5760003560e01c80635d36b1901161022b578063ae69f3cb11610130578063c9919112116100b8578063e6cc543211610087578063e6cc543214610a0b578063e829cc1614610a1f578063eb03654b14610a32578063ef08edc214610a45578063fc0cfeee14610a6c57600080fd5b8063c9919112146109d4578063d38bfff4146109dc578063d58e3b3a146109ef578063e45cc9f014610a0257600080fd5b8063b890ebf6116100ff578063b890ebf614610984578063bb7a632e14610997578063bc90106b146109b1578063c5f00841146109c4578063c7af3352146109cc57600080fd5b8063ae69f3cb14610938578063b2c9336d1461094b578063b4925a201461095e578063b888879e1461097157600080fd5b8063840c4c7a116101b357806394828ffd1161018257806394828ffd146108d857806395b166bc146108e05780639c82f2a4146108f35780639fa1826e14610906578063a403e4d51461090f57600080fd5b8063840c4c7a146108015780638e510b52146108145780638ec489a21461081d578063937b25811461083057600080fd5b80636c7561e8116101fa5780636c7561e8146107ac578063773540b3146107bf57806378f353a1146107d25780637a2202f3146107e55780637b9a7096146107ee57600080fd5b80635d36b1901461076b578063603ea03b14610773578063636e6c4014610786578063663e64ce1461079957600080fd5b8063372aa224116103315780634bed3bc0116102b957806352d38e5d1161028857806352d38e5d1461071557806353ca9f241461071e578063570d8e1d146107325780635802a17214610745578063597c89101461075857600080fd5b80634bed3bc0146106a35780634d5f4629146106b657806350ba711c146106e8578063527e83a8146106fb57600080fd5b80633fc8cef3116103005780633fc8cef31461061a5780634530820a1461064157806345e4213b1461067457806349c1d54d1461067d5780634a5e42b11461069057600080fd5b8063372aa224146105a857806339ebf823146105bb5780633b8ae397146105ff5780633dbc911f1461061257600080fd5b806318ce56bd116103b45780632b3297f9116103835780632b3297f9146104ff5780632da845a8146105105780632e9958ab14610523578063362bd1a31461053657806336b6d9441461059557600080fd5b806318ce56bd146104c75780631cfbe7bc146104da5780631edfe3da146104ed578063207134b0146104f657600080fd5b80630c340a24116103f05780630c340a241461046e5780631072cbea1461048e578063175188e8146104a15780631816dd4a146104b457600080fd5b80630493a0fa1461042257806309f49bf51461043757806309f6442c1461043f5780630acbda751461045b575b600080fd5b61043561043036600461374e565b610a7f565b005b610435610b84565b61044860385481565b6040519081526020015b60405180910390f35b61043561046936600461374e565b610bf4565b610476610c9f565b6040516001600160a01b039091168152602001610452565b61043561049c366004613783565b610cbc565b6104356104af3660046137ad565b610d69565b6104356104c23660046137ad565b611030565b604554610476906001600160a01b031681565b6104356104e836600461374e565b611137565b61044860395481565b61044860435481565b6048546001600160a01b0316610476565b61043561051e3660046137ad565b6111f9565b6104356105313660046137ad565b61126b565b604b54604c54610562916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b0395861681529385166020850152918416918301919091529091166060820152608001610452565b6104356105a33660046137ad565b6112d9565b6104356105b63660046137ad565b611309565b6105e86105c93660046137ad565b6035602052600090815260409020805460019091015460ff9091169082565b604080519215158352602083019190915201610452565b61043561060d3660046137ad565b61137b565b6104356114b8565b6104767f000000000000000000000000000000000000000000000000000000000000000081565b61066461064f3660046137ad565b60496020526000908152604090205460ff1681565b6040519015158152602001610452565b610448604e5481565b604254610476906001600160a01b031681565b61043561069e3660046137ad565b61152e565b604854600160a01b900461ffff16610448565b604f546106d090600160c01b90046001600160401b031681565b6040516001600160401b039091168152602001610452565b6104486106f63660046137c8565b611856565b604f546106d090600160801b90046001600160401b031681565b610448603b5481565b60375461066490600160a01b900460ff1681565b603f54610476906001600160a01b031681565b603c54610476906001600160a01b031681565b6104356107663660046137ad565b6118f9565b61043561193a565b604a54610476906001600160a01b031681565b61043561079436600461374e565b6119e0565b6104356107a736600461374e565b611a3e565b6104356107ba36600461387e565b611a97565b6104356107cd3660046137ad565b611d06565b604f546106d0906001600160401b031681565b61044860475481565b6104356107fc3660046138c7565b611d78565b61043561080f366004613945565b611eae565b61044860415481565b61043561082b36600461374e565b611f47565b61089161083e36600461374e565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a001610452565b610435611ffc565b6104356108ee3660046137ad565b61206c565b6104356109013660046137ad565b612133565b610448603a5481565b61047661091d3660046137ad565b6040602081905260009182529020546001600160a01b031681565b610435610946366004613945565b6121a5565b61043561095936600461374e565b612233565b61043561096c36600461374e565b61228c565b603754610476906001600160a01b031681565b61043561099236600461374e565b6123ef565b604f546106d090600160401b90046001600160401b031681565b6104356109bf3660046139c9565b612448565b610435612653565b6106646126c9565b6104356126fa565b6104356109ea3660046137ad565b61273a565b6104356109fd3660046137ad565b6127de565b61044860465481565b60375461066490600160a81b900460ff1681565b610435610a2d3660046139f3565b612850565b610435610a4036600461374e565b612910565b6104487fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd981565b610435610a7a3660046137ad565b6129c5565b603f546001600160a01b0316331480610a9b5750610a9b6126c9565b610ac05760405162461bcd60e51b8152600401610ab790613a0e565b60405180910390fd5b306001600160a01b031663af14052c6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610afb57600080fd5b505af1158015610b0f573d6000803e3d6000fd5b50505050610b1c81612a67565b604f80546001600160401b0392909216600160401b026fffffffffffffffff0000000000000000199092169190911790556040518181527f406e15fbca1d8ded2dbb06765fea3a54f18395c54125a4c9916dd00ea14ee15e906020015b60405180910390a150565b603f546001600160a01b0316331480610ba05750610ba06126c9565b610bbc5760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a01b191690556040517fbc044409505c95b6b851433df96e1beae715c909d8e7c1d6d7ab783300d4e3b990600090a1565b610bfc6126c9565b610c185760405162461bcd60e51b8152600401610ab790613a56565b611388811115610c6a5760405162461bcd60e51b815260206004820152601760248201527f62617369732063616e6e6f7420657863656564203530250000000000000000006044820152606401610ab7565b60438190556040518181527f56287a45051933ea374811b3d5d165033047be5572cac676f7c28b8be4f746c790602001610b79565b6000610cb7600080516020613d668339815191525490565b905090565b610cc46126c9565b610ce05760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff1615610d495760405162461bcd60e51b815260206004820152601760248201527f4f6e6c7920756e737570706f72746564206173736574730000000000000000006044820152606401610ab7565b610d65610d54610c9f565b6001600160a01b0384169083612ad3565b5050565b610d716126c9565b610d8d5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff16610dc55760405162461bcd60e51b8152600401610ab790613a8d565b60345460005b81811015610e7457826001600160a01b03166040600060348481548110610df457610df4613abc565b60009182526020808320909101546001600160a01b0390811684529083019390935260409091019020541603610e6c5760405162461bcd60e51b815260206004820181905260248201527f53747261746567792069732064656661756c7420666f7220616e2061737365746044820152606401610ab7565b600101610dcb565b506036548060005b82811015610ecb57846001600160a01b031660368281548110610ea157610ea1613abc565b6000918252602090912001546001600160a01b031603610ec357809150610ecb565b600101610e7c565b508181101561102a576036610ee1600184613ae8565b81548110610ef157610ef1613abc565b600091825260209091200154603680546001600160a01b039092169183908110610f1d57610f1d613abc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506036805480610f5c57610f5c613afb565b60008281526020808220830160001990810180546001600160a01b03191690559092019092556001600160a01b03861680835260359091526040808320805460ff19169055805163429c145b60e11b81529051879363853828b6926004808201939182900301818387803b158015610fd357600080fd5b505af1158015610fe7573d6000803e3d6000fd5b50506040516001600160a01b03881681527f09a1db4b80c32706328728508c941a6b954f31eb5affd32f236c1fd405f8fea49250602001905060405180910390a1505b50505050565b6110386126c9565b6110545760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff1661108c5760405162461bcd60e51b8152600401610ab790613a8d565b6001600160a01b03811660009081526049602052604090205460ff16156110eb5760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481dda1a5d195b1a5cdd1959606a1b6044820152606401610ab7565b6001600160a01b038116600081815260496020526040808220805460ff19166001179055517f47c8c96a5942f094264111c5fe7f6a4fe86efe63254a6fa7afa5fc84f07d58e89190a250565b61113f6126c9565b61115b5760405162461bcd60e51b8152600401610ab790613a56565b8015806111785750610258811015801561117857506213c6808111155b6111c45760405162461bcd60e51b815260206004820152601a60248201527f496e76616c696420636c61696d2064656c617920706572696f640000000000006044820152606401610ab7565b604e8190556040518181527fc59f5e32049abab44ddea11021f5abb89422a2f550837afcf25df9fc8d0db6b090602001610b79565b6112016126c9565b61121d5760405162461bcd60e51b8152600401610ab790613a56565b604280546001600160a01b0319166001600160a01b0383169081179091556040519081527f1e4af5ac389e8cde1bdaa6830881b6c987c62a45cfb3b33d27d805cde3b5775090602001610b79565b6112736126c9565b61128f5760405162461bcd60e51b8152600401610ab790613a56565b604a80546001600160a01b0319166001600160a01b0383169081179091556040517faf2910d9759321733de15af1827a49830692912adeb2b3646334861f2cd2eed490600090a250565b6112e16126c9565b6112fd5760405162461bcd60e51b8152600401610ab790613a56565b61130681612b2a565b50565b6113116126c9565b61132d5760405162461bcd60e51b8152600401610ab790613a56565b603780546001600160a01b0319166001600160a01b0383169081179091556040519081527fb266add5f3044b17d27db796af992cecbe413921b4e8aaaee03c719e16b9806a90602001610b79565b6113836126c9565b61139f5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526035602052604090205460ff16156114085760405162461bcd60e51b815260206004820152601960248201527f537472617465677920616c726561647920617070726f766564000000000000006044820152606401610ab7565b6040805180820182526001808252600060208084018281526001600160a01b038716808452603583528684209551865460ff19169015151786559051948401949094556036805493840181559091527f4a11f94e20a93c79f6ec743a1954ec4fc2c08429ae2122118bf234b2185c81b890910180546001600160a01b0319168317905591519081527f960dd94cbb79169f09a4e445d58b895df2d9bffa5b31055d0932d801724a20d19101610b79565b603f546001600160a01b03163314806114d457506114d46126c9565b6114f05760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a81b1916600160a81b1790556040517f71f0e5b62f846a22e0b4d159e516e62fa9c2b8eb570be15f83e67d98a2ee51e090600090a1565b6115366126c9565b6115525760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526033602052604090205460ff166115b05760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610ab7565b6001600160a01b0381166000908152603360205260408120546115e5906509184e72a0009062010000900460ff166012612c31565b604051632fa8a91360e11b81526001600160a01b038416600482015290915081903090635f51522690602401602060405180830381865afa15801561162e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116529190613b11565b11156116a05760405162461bcd60e51b815260206004820152601760248201527f5661756c74207374696c6c20686f6c64732061737365740000000000000000006044820152606401610ab7565b6034548060005b828110156116f657846001600160a01b0316603482815481106116cc576116cc613abc565b6000918252602090912001546001600160a01b0316036116ee578091506116f6565b6001016116a7565b506034611704600184613ae8565b8154811061171457611714613abc565b600091825260209091200154603480546001600160a01b03909216918390811061174057611740613abc565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550603480548061177f5761177f613afb565b60008281526020808220600019908401810180546001600160a01b031990811690915593019093556001600160a01b038716808252604080855280832080549094169093558251908152928301527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b038416600081815260336020908152604091829020805464ffffffffff1916905590519182527f37803e2125c48ee96c38ddf04e826daf335b0e1603579040fd275aba6d06b6fc910160405180910390a150505050565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535805460009190600119810161189e5760405162461bcd60e51b8152600401610ab790613b2a565b60028255603f546001600160a01b03163314806118be57506118be6126c9565b6118da5760405162461bcd60e51b8152600401610ab790613a0e565b6118e8898989898989612c95565b600190925550979650505050505050565b603f546001600160a01b031633148061191557506119156126c9565b6119315760405162461bcd60e51b8152600401610ab790613a0e565b61130681612ce0565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146119d55760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b6064820152608401610ab7565b6119de33612d3f565b565b6119e86126c9565b611a045760405162461bcd60e51b8152600401610ab790613a56565b600060465560478190556040518181527fc29d6fedbc6bdf267a08166c2b976fbd72aca5d6a769528616f8b9224c8f197f90602001610b79565b611a466126c9565b611a625760405162461bcd60e51b8152600401610ab790613a56565b60418190556040518181527f95201f9c21f26877223b1ff4073936a6484c35495649e60e55730497aeb60d9390602001610b79565b611a9f6126c9565b611abb5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff1615611b245760405162461bcd60e51b815260206004820152601760248201527f417373657420616c726561647920737570706f727465640000000000000000006044820152606401610ab7565b60405180608001604052806001151581526020018260ff166001811115611b4d57611b4d613b52565b6001811115611b5e57611b5e613b52565b81526000602080830182905260409283018290526001600160a01b0386168252603381529190208251815490151560ff19821681178355928401519192839161ff001990911661ffff1990911617610100836001811115611bc157611bc1613b52565b02179055506040820151815460609093015161ffff1663010000000264ffff0000001960ff90921662010000029190911664ffffff00001990931692909217919091179055611c0f82612b2a565b603480546001810182556000919091527f46bddb1178e94d7f2892ff5f366840eb658911794f2c3a44c450aa2c505186c10180546001600160a01b0319166001600160a01b038481169182179092556037546040516315d5220f60e31b815260048101929092529091169063aea9107890602401602060405180830381865afa158015611ca0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cc49190613b11565b506040516001600160a01b03831681527f4f1ac48525e50059cc1cc6e0e1940ece0dd653a4db4841538d6aef036be2fb7b906020015b60405180910390a15050565b611d0e6126c9565b611d2a5760405162461bcd60e51b8152600401610ab790613a56565b603f80546001600160a01b0319166001600160a01b0383169081179091556040519081527f869e0abd13cc3a975de7b93be3df1cb2255c802b1cead85963cc79d99f131bee90602001610b79565b611d806126c9565b611d9c5760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03821660009081526033602052604090205460ff16611dfa5760405162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081cdd5c1c1bdc9d1959606a1b6044820152606401610ab7565b6103e88161ffff1610611e435760405162461bcd60e51b81526020600482015260116024820152700a6d8d2e0e0c2ceca40e8dede40d0d2ced607b1b6044820152606401610ab7565b6001600160a01b038216600081815260336020908152604091829020805464ffff0000001916630100000061ffff8716908102919091179091558251938452908301527f8d22e9d2cbe8bb65a3c4412bd8970743864512a1a0e004e8d00fb96277b78b949101611cfa565b603f546001600160a01b0316331480611eca5750611eca6126c9565b611ee65760405162461bcd60e51b8152600401610ab790613a0e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac453580546001198101611f2a5760405162461bcd60e51b8152600401610ab790613b2a565b60028255611f3b8787878787612d9e565b50600190555050505050565b603f546001600160a01b0316331480611f635750611f636126c9565b611f7f5760405162461bcd60e51b8152600401610ab790613a0e565b670de0b6b3a7640000811115611fc75760405162461bcd60e51b815260206004820152600d60248201526c496e76616c69642076616c756560981b6044820152606401610ab7565b60398190556040518181527f41ecb23a0e7865b25f38c268b7c3012220d822929e9edff07326e89d5bb822b590602001610b79565b603f546001600160a01b031633148061201857506120186126c9565b6120345760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a81b191690556040517f891ebab18da80ebeeea06b1b1cede098329c4c008906a98370c2ac7a80b571cb90600090a1565b6120746126c9565b6120905760405162461bcd60e51b8152600401610ab790613a56565b6001600160a01b03811660009081526049602052604090205460ff166120ea5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b6044820152606401610ab7565b6001600160a01b038116600081815260496020526040808220805460ff19169055517f0ec40967a61509853550658e51d0e4297f7cba244fe4adc8ba18b5631ac20e2f9190a250565b61213b6126c9565b6121575760405162461bcd60e51b8152600401610ab790613a56565b604880546001600160a01b0319166001600160a01b0383169081179091556040519081527f7d7719313229e558c5a3893cad2eb86a86a049156d1d9ebd5c63a8eedefd1c0390602001610b79565b603f546001600160a01b03163314806121c157506121c16126c9565b6121dd5760405162461bcd60e51b8152600401610ab790613a0e565b7f53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535805460011981016122215760405162461bcd60e51b8152600401610ab790613b2a565b60028255611f3b308888888888612fd6565b61223b6126c9565b6122575760405162461bcd60e51b8152600401610ab790613a56565b603a8190556040518181527f2ec5fb5a3d2703edc461252d92ccd2799c3c74f01d97212b20388207fa17ae4590602001610b79565b603f546001600160a01b03163314806122a857506122a86126c9565b6122c45760405162461bcd60e51b8152600401610ab790613a0e565b306001600160a01b031663af14052c6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156122ff57600080fd5b505af1158015612313573d6000803e3d6000fd5b5050505060006301e1338060648361232b9190613b68565b6123359190613b68565b905061234b6201518066b1a2bc2ec50000613b68565b81111561238a5760405162461bcd60e51b815260206004820152600d60248201526c0a4c2e8ca40e8dede40d0d2ced609b1b6044820152606401610ab7565b61239381612a67565b604f80546001600160401b0392909216600160801b0267ffffffffffffffff60801b199092169190911790556040518181527fef46f143af5fead0010484fe7d6ec2e2972420faa76157f5a6075aa72e614cb590602001611cfa565b6123f76126c9565b6124135760405162461bcd60e51b8152600401610ab790613a56565b603b8190556040518181527f39367850377ac04920a9a670f2180e7a94d83b15ad302e59875ec58fd10bd37d90602001610b79565b603f546001600160a01b031633148061246457506124646126c9565b6124805760405162461bcd60e51b8152600401610ab790613a0e565b604080516001600160a01b038085168252831660208201527fba58ce12801c949fa65f41c46ed108671c219baf945fa48d21026cea99ff252a910160405180910390a16001600160a01b03811615612625576001600160a01b03811660009081526035602052604090205460ff1661250a5760405162461bcd60e51b8152600401610ab790613a8d565b6001600160a01b038216600090815260336020526040902054819060ff1661256d5760405162461bcd60e51b8152602060048201526016602482015275105cdcd95d081a5cc81b9bdd081cdd5c1c1bdc9d195960521b6044820152606401610ab7565b60405163551c457b60e11b81526001600160a01b03848116600483015282169063aa388af690602401602060405180830381865afa1580156125b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125d79190613b8a565b6126235760405162461bcd60e51b815260206004820152601f60248201527f4173736574206e6f7420737570706f72746564206279205374726174656779006044820152606401610ab7565b505b6001600160a01b03918216600090815260406020819052902080546001600160a01b03191691909216179055565b603f546001600160a01b031633148061266f575061266f6126c9565b61268b5760405162461bcd60e51b8152600401610ab790613a0e565b6037805460ff60a01b1916600160a01b1790556040517f8cff26a5985614b3d30629cc4ab83824bf115aec971b718d8f2f99562032e97290600090a1565b60006126e1600080516020613d668339815191525490565b6001600160a01b0316336001600160a01b031614905090565b603f546001600160a01b031633148061271657506127166126c9565b6127325760405162461bcd60e51b8152600401610ab790613a0e565b6119de61303f565b6127426126c9565b61275e5760405162461bcd60e51b8152600401610ab790613a56565b612786817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166127a6600080516020613d668339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6127e66126c9565b6128025760405162461bcd60e51b8152600401610ab790613a56565b604580546001600160a01b0319166001600160a01b0383169081179091556040519081527fa12850fb726e0b2b7b3c9a9342031e1268a8148d0eb06b4bea8613204ffcd2b890602001610b79565b6128586126c9565b6128745760405162461bcd60e51b8152600401610ab790613a56565b6127118161ffff16106128c05760405162461bcd60e51b8152602060048201526014602482015273496e76616c696420626173697320706f696e747360601b6044820152606401610ab7565b6048805461ffff60a01b1916600160a01b61ffff8416908102919091179091556040519081527ff12c00256bee2b6facb111a88a9b1cff86e79132939b44f1353212d6f746955790602001610b79565b6129186126c9565b6129345760405162461bcd60e51b8152600401610ab790613a56565b6103e88111156129905760405162461bcd60e51b815260206004820152602160248201527f52656465656d206665652073686f756c64206e6f74206265206f7665722031306044820152602560f81b6064820152608401610ab7565b60388190556040518181527fd6c7508d6658ccee36b7b7d7fd72e5cbaeefb40c64eff24e9ae7470e846304ee90602001610b79565b6129cd6126c9565b6129e95760405162461bcd60e51b8152600401610ab790613a56565b803b612a435760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b6064820152608401610ab7565b7fa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd955565b60006001600160401b03821115612acf5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610ab7565b5090565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612b25908490613096565b505050565b6001600160a01b0381166000908152603360205260409020805462010000900460ff1615612b56575050565b6000826001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015612b96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612bba9190613bac565b905060068160ff1610158015612bd4575060128160ff1611155b612c175760405162461bcd60e51b81526020600482015260146024820152732ab732bc3832b1ba32b210383932b1b4b9b4b7b760611b6044820152606401610ab7565b815460ff909116620100000262ff00001990911617905550565b600081831115612c6157612c5a612c488385613ae8565b612c5390600a613cb0565b8590613168565b9350612c8b565b81831015612c8b57612c88612c768484613ae8565b612c8190600a613cb0565b859061317d565b93505b50825b9392505050565b60405162461bcd60e51b815260206004820152601d60248201527f436f6c6c61746572616c2073776170206e6f7420737570706f727465640000006044820152600090606401610ab7565b612ce981613189565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612d2457600080fd5b505af1158015612d38573d6000803e3d6000fd5b5050505050565b6001600160a01b038116612d955760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f7220697320616464726573732830290000000000006044820152606401610ab7565b6113068161324d565b6001600160a01b03851660009081526035602052604090205460ff16612dfc5760405162461bcd60e51b8152602060048201526013602482015272496e76616c696420746f20537472617465677960681b6044820152606401610ab7565b600183148015612e0c5750600181145b8015612e7057507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031684846000818110612e5057612e50613abc565b9050602002016020810190612e6591906137ad565b6001600160a01b0316145b612eb55760405162461bcd60e51b815260206004820152601660248201527513db9b1e4815d15512081a5cc81cdd5c1c1bdc9d195960521b6044820152606401610ab7565b612ebd6132b4565b82826000818110612ed057612ed0613abc565b905060200201351115612f255760405162461bcd60e51b815260206004820152601960248201527f4e6f7420656e6f756768205745544820617661696c61626c65000000000000006044820152606401610ab7565b612f7c8583836000818110612f3c57612f3c613abc565b905060200201357f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316612ad39092919063ffffffff16565b846001600160a01b031663de5f62686040518163ffffffff1660e01b8152600401600060405180830381600087803b158015612fb757600080fd5b505af1158015612fcb573d6000803e3d6000fd5b505050505050505050565b612fe48686868686866133c2565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561301f57600080fd5b505af1158015613033573d6000803e3d6000fd5b50505050505050505050565b61304761354a565b306001600160a01b031663b9b17f9f6040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561308257600080fd5b505af115801561102a573d6000803e3d6000fd5b60006130eb826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166135d69092919063ffffffff16565b805190915015612b2557808060200190518101906131099190613b8a565b612b255760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ab7565b60006131748284613cbc565b90505b92915050565b60006131748284613b68565b6001600160a01b03811660009081526035602052604090205460ff166131f15760405162461bcd60e51b815260206004820152601960248201527f5374726174656779206973206e6f7420737570706f72746564000000000000006044820152606401610ab7565b6000819050806001600160a01b031663853828b66040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561323157600080fd5b505af1158015613245573d6000803e3d6000fd5b505050505050565b806001600160a01b031661326d600080516020613d668339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020613d6683398151915255565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c548083169585018690529290920416606083015260009283916133049190613cd3565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015613379573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339d9190613b11565b90508181116133b0576000935050505090565b6133ba8282613ae8565b935050505090565b6001600160a01b03851660009081526035602052604090205460ff166134225760405162461bcd60e51b8152602060048201526015602482015274496e76616c69642066726f6d20537472617465677960581b6044820152606401610ab7565b8281146134715760405162461bcd60e51b815260206004820152601960248201527f506172616d65746572206c656e677468206d69736d61746368000000000000006044820152606401610ab7565b8260005b8181101561354057866001600160a01b031663d9caed128988888581811061349f5761349f613abc565b90506020020160208101906134b491906137ad565b8787868181106134c6576134c6613abc565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b15801561351d57600080fd5b505af1158015613531573d6000803e3d6000fd5b50505050806001019050613475565b5050505050505050565b60365460005b81811015610d65576036818154811061356b5761356b613abc565b60009182526020822001546040805163429c145b60e11b815290516001600160a01b039092169263853828b69260048084019382900301818387803b1580156135b357600080fd5b505af11580156135c7573d6000803e3d6000fd5b50505050806001019050613550565b60606135e584846000856135ed565b949350505050565b60608247101561364e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610ab7565b843b61369c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ab7565b600080866001600160a01b031685876040516136b89190613d16565b60006040518083038185875af1925050503d80600081146136f5576040519150601f19603f3d011682016040523d82523d6000602084013e6136fa565b606091505b509150915061370a828286613715565b979650505050505050565b60608315613724575081612c8e565b8251156137345782518084602001fd5b8160405162461bcd60e51b8152600401610ab79190613d32565b60006020828403121561376057600080fd5b5035919050565b80356001600160a01b038116811461377e57600080fd5b919050565b6000806040838503121561379657600080fd5b61379f83613767565b946020939093013593505050565b6000602082840312156137bf57600080fd5b61317482613767565b60008060008060008060a087890312156137e157600080fd5b6137ea87613767565b95506137f860208801613767565b9450604087013593506060870135925060808701356001600160401b0381111561382157600080fd5b8701601f8101891361383257600080fd5b80356001600160401b0381111561384857600080fd5b89602082840101111561385a57600080fd5b60208201935080925050509295509295509295565b60ff8116811461130657600080fd5b6000806040838503121561389157600080fd5b61389a83613767565b915060208301356138aa8161386f565b809150509250929050565b803561ffff8116811461377e57600080fd5b600080604083850312156138da57600080fd5b6138e383613767565b91506138f1602084016138b5565b90509250929050565b60008083601f84011261390c57600080fd5b5081356001600160401b0381111561392357600080fd5b6020830191508360208260051b850101111561393e57600080fd5b9250929050565b60008060008060006060868803121561395d57600080fd5b61396686613767565b945060208601356001600160401b0381111561398157600080fd5b61398d888289016138fa565b90955093505060408601356001600160401b038111156139ac57600080fd5b6139b8888289016138fa565b969995985093965092949392505050565b600080604083850312156139dc57600080fd5b6139e583613767565b91506138f160208401613767565b600060208284031215613a0557600080fd5b613174826138b5565b60208082526028908201527f43616c6c6572206973206e6f74207468652053747261746567697374206f722060408201526723b7bb32b93737b960c11b606082015260800190565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60208082526015908201527414dd1c985d1959de481b9bdd08185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b8181038181111561317757613177613ad2565b634e487b7160e01b600052603160045260246000fd5b600060208284031215613b2357600080fd5b5051919050565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052602160045260246000fd5b600082613b8557634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215613b9c57600080fd5b81518015158114612c8e57600080fd5b600060208284031215613bbe57600080fd5b8151612c8e8161386f565b6001815b6001841115613c0457808504811115613be857613be8613ad2565b6001841615613bf657908102905b60019390931c928002613bcd565b935093915050565b600082613c1b57506001613177565b81613c2857506000613177565b8160018114613c3e5760028114613c4857613c64565b6001915050613177565b60ff841115613c5957613c59613ad2565b50506001821b613177565b5060208310610133831016604e8410600b8410161715613c87575081810a613177565b613c946000198484613bc9565b8060001904821115613ca857613ca8613ad2565b029392505050565b60006131748383613c0c565b808202811582820484141761317757613177613ad2565b6001600160801b03828116828216039081111561317757613177613ad2565b60005b83811015613d0d578181015183820152602001613cf5565b50506000910152565b60008251613d28818460208701613cf2565b9190910192915050565b6020815260008251806020840152613d51816040850160208701613cf2565b601f01601f1916919091016040019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa26469706673582212206100cd46bd28c7d5cd0e2e031923c38df1535948dfe444d8a06be3b1dfdd1f7064736f6c634300081c0033", "libraries": {}, "devdoc": { "author": "Origin Protocol Inc", @@ -1606,6 +1710,11 @@ "_threshold": "OToken amount with 18 fixed decimals." } }, + "setDripDuration(uint256)": { + "params": { + "_dripDuration": "Time in seconds to target a constant yield rate" + } + }, "setDripper(address)": { "params": { "_dripper": "Address of the Dripper contract." @@ -1632,6 +1741,11 @@ "_priceProvider": "Address of price provider" } }, + "setRebaseRateMax(uint256)": { + "params": { + "yearlyApr": "in 1e18 notation. 3 * 1e18 = 3% APR" + } + }, "setRebaseThreshold(uint256)": { "params": { "_threshold": "OToken amount with 18 fixed decimals." @@ -1741,6 +1855,9 @@ "depositToStrategy(address,address[],uint256[])": { "notice": "Deposit multiple assets from the vault into the strategy." }, + "dripDuration()": { + "notice": "Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable." + }, "dripper()": { "notice": "Address of the Dripper contract that streams harvested rewards to the Vault" }, @@ -1750,6 +1867,9 @@ "isGovernor()": { "notice": "Returns true if the caller is the current Governor." }, + "lastRebase()": { + "notice": "Time in seconds that the vault last rebased yield." + }, "maxSupplyDiff()": { "notice": "Max difference between total supply and total value of assets. 18 decimals." }, @@ -1774,6 +1894,12 @@ "rebasePaused()": { "notice": "pause rebasing if true" }, + "rebasePerSecondMax()": { + "notice": "max rebase percentage per second Can be used to set maximum yield of the protocol, spreading out yield over time" + }, + "rebasePerSecondTarget()": { + "notice": "target rebase rate limit, based on past rates and funds available." + }, "rebaseThreshold()": { "notice": "OToken mints over this amount automatically rebase. 18 decimals." }, @@ -1798,6 +1924,9 @@ "setAutoAllocateThreshold(uint256)": { "notice": "Sets the minimum amount of OTokens in a mint to trigger an automatic allocation of funds afterwords." }, + "setDripDuration(uint256)": { + "notice": "Set the drip duration period" + }, "setDripper(address)": { "notice": "Set the Dripper contract that streams harvested rewards to the vault." }, @@ -1816,6 +1945,9 @@ "setPriceProvider(address)": { "notice": "Set address of price provider." }, + "setRebaseRateMax(uint256)": { + "notice": "Set a yield streaming max rate. This spreads yield over time if it is above the max rate." + }, "setRebaseThreshold(uint256)": { "notice": "Set a minimum amount of OTokens in a mint or redeem that triggers a rebase" }, @@ -1900,7 +2032,7 @@ "storageLayout": { "storage": [ { - "astId": 53792, + "astId": 59237, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "initialized", "offset": 0, @@ -1908,7 +2040,7 @@ "type": "t_bool" }, { - "astId": 53795, + "astId": 59240, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "initializing", "offset": 1, @@ -1916,7 +2048,7 @@ "type": "t_bool" }, { - "astId": 53835, + "astId": 59280, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "______gap", "offset": 0, @@ -1924,15 +2056,15 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 60758, + "astId": 66519, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "assets", "offset": 0, "slot": "51", - "type": "t_mapping(t_address,t_struct(Asset)60752_storage)" + "type": "t_mapping(t_address,t_struct(Asset)66513_storage)" }, { - "astId": 60762, + "astId": 66523, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "allAssets", "offset": 0, @@ -1940,15 +2072,15 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60773, + "astId": 66534, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "strategies", "offset": 0, "slot": "53", - "type": "t_mapping(t_address,t_struct(Strategy)60767_storage)" + "type": "t_mapping(t_address,t_struct(Strategy)66528_storage)" }, { - "astId": 60777, + "astId": 66538, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "allStrategies", "offset": 0, @@ -1956,7 +2088,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60780, + "astId": 66541, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "priceProvider", "offset": 0, @@ -1964,7 +2096,7 @@ "type": "t_address" }, { - "astId": 60784, + "astId": 66544, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "rebasePaused", "offset": 20, @@ -1972,7 +2104,7 @@ "type": "t_bool" }, { - "astId": 60788, + "astId": 66547, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "capitalPaused", "offset": 21, @@ -1980,7 +2112,7 @@ "type": "t_bool" }, { - "astId": 60791, + "astId": 66550, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "redeemFeeBps", "offset": 0, @@ -1988,7 +2120,7 @@ "type": "t_uint256" }, { - "astId": 60794, + "astId": 66553, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "vaultBuffer", "offset": 0, @@ -1996,7 +2128,7 @@ "type": "t_uint256" }, { - "astId": 60797, + "astId": 66556, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "autoAllocateThreshold", "offset": 0, @@ -2004,7 +2136,7 @@ "type": "t_uint256" }, { - "astId": 60800, + "astId": 66559, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "rebaseThreshold", "offset": 0, @@ -2012,15 +2144,15 @@ "type": "t_uint256" }, { - "astId": 60804, + "astId": 66563, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "oUSD", "offset": 0, "slot": "60", - "type": "t_contract(OUSD)51174" + "type": "t_contract(OUSD)56628" }, { - "astId": 60815, + "astId": 66574, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "_deprecated_rebaseHooksAddr", "offset": 0, @@ -2028,7 +2160,7 @@ "type": "t_address" }, { - "astId": 60822, + "astId": 66581, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "_deprecated_uniswapAddr", "offset": 0, @@ -2036,7 +2168,7 @@ "type": "t_address" }, { - "astId": 60829, + "astId": 66588, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "strategistAddr", "offset": 0, @@ -2044,7 +2176,7 @@ "type": "t_address" }, { - "astId": 60834, + "astId": 66593, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "assetDefaultStrategies", "offset": 0, @@ -2052,7 +2184,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 60837, + "astId": 66596, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "maxSupplyDiff", "offset": 0, @@ -2060,7 +2192,7 @@ "type": "t_uint256" }, { - "astId": 60840, + "astId": 66599, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "trusteeAddress", "offset": 0, @@ -2068,7 +2200,7 @@ "type": "t_address" }, { - "astId": 60843, + "astId": 66602, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "trusteeFeeBps", "offset": 0, @@ -2076,7 +2208,7 @@ "type": "t_uint256" }, { - "astId": 60847, + "astId": 66606, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "_deprecated_swapTokens", "offset": 0, @@ -2084,7 +2216,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60853, + "astId": 66612, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "ousdMetaStrategy", "offset": 0, @@ -2092,7 +2224,7 @@ "type": "t_address" }, { - "astId": 60856, + "astId": 66615, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "netOusdMintedForStrategy", "offset": 0, @@ -2100,7 +2232,7 @@ "type": "t_int256" }, { - "astId": 60859, + "astId": 66618, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "netOusdMintForStrategyThreshold", "offset": 0, @@ -2108,15 +2240,15 @@ "type": "t_uint256" }, { - "astId": 60881, + "astId": 66640, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "swapConfig", "offset": 0, "slot": "72", - "type": "t_struct(SwapConfig)60871_storage" + "type": "t_struct(SwapConfig)66630_storage" }, { - "astId": 60885, + "astId": 66644, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "isMintWhitelistedStrategy", "offset": 0, @@ -2124,7 +2256,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 60888, + "astId": 66647, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "dripper", "offset": 0, @@ -2132,23 +2264,23 @@ "type": "t_address" }, { - "astId": 60902, + "astId": 66661, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "withdrawalQueueMetadata", "offset": 0, "slot": "75", - "type": "t_struct(WithdrawalQueueMetadata)60898_storage" + "type": "t_struct(WithdrawalQueueMetadata)66657_storage" }, { - "astId": 60919, + "astId": 66678, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "withdrawalRequests", "offset": 0, "slot": "77", - "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)" + "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)" }, { - "astId": 60922, + "astId": 66681, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "withdrawalClaimDelay", "offset": 0, @@ -2156,12 +2288,44 @@ "type": "t_uint256" }, { - "astId": 60926, + "astId": 66684, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", - "label": "__gap", + "label": "lastRebase", "offset": 0, "slot": "79", - "type": "t_array(t_uint256)44_storage" + "type": "t_uint64" + }, + { + "astId": 66687, + "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", + "label": "dripDuration", + "offset": 8, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66690, + "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", + "label": "rebasePerSecondMax", + "offset": 16, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66693, + "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", + "label": "rebasePerSecondTarget", + "offset": 24, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66708, + "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", + "label": "__gap", + "offset": 0, + "slot": "80", + "type": "t_array(t_uint256)43_storage" } ], "types": { @@ -2176,11 +2340,11 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_uint256)44_storage": { + "t_array(t_uint256)43_storage": { "base": "t_uint256", "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" + "label": "uint256[43]", + "numberOfBytes": "1376" }, "t_array(t_uint256)50_storage": { "base": "t_uint256", @@ -2193,12 +2357,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(OUSD)51174": { + "t_contract(OUSD)56628": { "encoding": "inplace", "label": "contract OUSD", "numberOfBytes": "20" }, - "t_enum(UnitConversion)60742": { + "t_enum(UnitConversion)66503": { "encoding": "inplace", "label": "enum VaultStorage.UnitConversion", "numberOfBytes": "1" @@ -2222,33 +2386,33 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(Asset)60752_storage)": { + "t_mapping(t_address,t_struct(Asset)66513_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct VaultStorage.Asset)", "numberOfBytes": "32", - "value": "t_struct(Asset)60752_storage" + "value": "t_struct(Asset)66513_storage" }, - "t_mapping(t_address,t_struct(Strategy)60767_storage)": { + "t_mapping(t_address,t_struct(Strategy)66528_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct VaultStorage.Strategy)", "numberOfBytes": "32", - "value": "t_struct(Strategy)60767_storage" + "value": "t_struct(Strategy)66528_storage" }, - "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)": { + "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VaultStorage.WithdrawalRequest)", "numberOfBytes": "32", - "value": "t_struct(WithdrawalRequest)60913_storage" + "value": "t_struct(WithdrawalRequest)66672_storage" }, - "t_struct(Asset)60752_storage": { + "t_struct(Asset)66513_storage": { "encoding": "inplace", "label": "struct VaultStorage.Asset", "members": [ { - "astId": 60744, + "astId": 66505, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "isSupported", "offset": 0, @@ -2256,15 +2420,15 @@ "type": "t_bool" }, { - "astId": 60747, + "astId": 66508, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "unitConversion", "offset": 1, "slot": "0", - "type": "t_enum(UnitConversion)60742" + "type": "t_enum(UnitConversion)66503" }, { - "astId": 60749, + "astId": 66510, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "decimals", "offset": 2, @@ -2272,7 +2436,7 @@ "type": "t_uint8" }, { - "astId": 60751, + "astId": 66512, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "allowedOracleSlippageBps", "offset": 3, @@ -2282,12 +2446,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Strategy)60767_storage": { + "t_struct(Strategy)66528_storage": { "encoding": "inplace", "label": "struct VaultStorage.Strategy", "members": [ { - "astId": 60764, + "astId": 66525, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "isSupported", "offset": 0, @@ -2295,7 +2459,7 @@ "type": "t_bool" }, { - "astId": 60766, + "astId": 66527, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "_deprecated", "offset": 0, @@ -2305,12 +2469,12 @@ ], "numberOfBytes": "64" }, - "t_struct(SwapConfig)60871_storage": { + "t_struct(SwapConfig)66630_storage": { "encoding": "inplace", "label": "struct VaultStorage.SwapConfig", "members": [ { - "astId": 60868, + "astId": 66627, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "swapper", "offset": 0, @@ -2318,7 +2482,7 @@ "type": "t_address" }, { - "astId": 60870, + "astId": 66629, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "allowedUndervalueBps", "offset": 20, @@ -2328,12 +2492,12 @@ ], "numberOfBytes": "32" }, - "t_struct(WithdrawalQueueMetadata)60898_storage": { + "t_struct(WithdrawalQueueMetadata)66657_storage": { "encoding": "inplace", "label": "struct VaultStorage.WithdrawalQueueMetadata", "members": [ { - "astId": 60891, + "astId": 66650, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "queued", "offset": 0, @@ -2341,7 +2505,7 @@ "type": "t_uint128" }, { - "astId": 60893, + "astId": 66652, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "claimable", "offset": 16, @@ -2349,7 +2513,7 @@ "type": "t_uint128" }, { - "astId": 60895, + "astId": 66654, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "claimed", "offset": 0, @@ -2357,7 +2521,7 @@ "type": "t_uint128" }, { - "astId": 60897, + "astId": 66656, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "nextWithdrawalIndex", "offset": 16, @@ -2367,12 +2531,12 @@ ], "numberOfBytes": "64" }, - "t_struct(WithdrawalRequest)60913_storage": { + "t_struct(WithdrawalRequest)66672_storage": { "encoding": "inplace", "label": "struct VaultStorage.WithdrawalRequest", "members": [ { - "astId": 60904, + "astId": 66663, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "withdrawer", "offset": 0, @@ -2380,7 +2544,7 @@ "type": "t_address" }, { - "astId": 60906, + "astId": 66665, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "claimed", "offset": 20, @@ -2388,7 +2552,7 @@ "type": "t_bool" }, { - "astId": 60908, + "astId": 66667, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "timestamp", "offset": 21, @@ -2396,7 +2560,7 @@ "type": "t_uint40" }, { - "astId": 60910, + "astId": 66669, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "amount", "offset": 0, @@ -2404,7 +2568,7 @@ "type": "t_uint128" }, { - "astId": 60912, + "astId": 66671, "contract": "contracts/vault/OETHVaultAdmin.sol:OETHVaultAdmin", "label": "queued", "offset": 16, @@ -2434,6 +2598,11 @@ "label": "uint40", "numberOfBytes": "5" }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, "t_uint8": { "encoding": "inplace", "label": "uint8", diff --git a/contracts/deployments/mainnet/OETHVaultCore.json b/contracts/deployments/mainnet/OETHVaultCore.json index d2d98ffdf6..af23e039b4 100644 --- a/contracts/deployments/mainnet/OETHVaultCore.json +++ b/contracts/deployments/mainnet/OETHVaultCore.json @@ -1,5 +1,5 @@ { - "address": "0xc33e10a38839dfb5dfE43a61A5513Df21C9dF8Cf", + "address": "0x22431cc134bD24171D71ba1470eA037b36a950D7", "abi": [ { "inputs": [ @@ -107,6 +107,19 @@ "name": "CapitalUnpaused", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "dripDuration", + "type": "uint256" + } + ], + "name": "DripDurationChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -235,6 +248,19 @@ "name": "RebasePaused", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "rebaseRatePerSecond", + "type": "uint256" + } + ], + "name": "RebasePerSecondMaxChanged", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -776,6 +802,19 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "dripDuration", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "dripper", @@ -964,6 +1003,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "lastRebase", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "maxSupplyDiff", @@ -1065,6 +1117,19 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "previewYield", + "outputs": [ + { + "internalType": "uint256", + "name": "yield", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "priceProvider", @@ -1136,6 +1201,32 @@ "stateMutability": "view", "type": "function" }, + { + "inputs": [], + "name": "rebasePerSecondMax", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rebasePerSecondTarget", + "outputs": [ + { + "internalType": "uint64", + "name": "", + "type": "uint64" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [], "name": "rebaseThreshold", @@ -1426,30 +1517,30 @@ "type": "function" } ], - "transactionHash": "0x5177ce09cf6f9703b5e06ca3fede7ff2e0cf2734766f9c9e901b38fae80b307f", + "transactionHash": "0x8679676dd886573e63b74fbcee57cd0ea2db58540367779def12cb678fc35438", "receipt": { "to": null, - "from": "0x3Ba227D87c2A7aB89EAaCEFbeD9bfa0D15Ad249A", - "contractAddress": "0xc33e10a38839dfb5dfE43a61A5513Df21C9dF8Cf", - "transactionIndex": 3, - "gasUsed": "3594629", + "from": "0xFD9E6005187F448957a0972a7d0C0A6dA2911236", + "contractAddress": "0x22431cc134bD24171D71ba1470eA037b36a950D7", + "transactionIndex": 147, + "gasUsed": "3790592", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x8addf661116d940cd79f77e1104e218f4865cd97f4064cc987a669667650f9ef", - "transactionHash": "0x5177ce09cf6f9703b5e06ca3fede7ff2e0cf2734766f9c9e901b38fae80b307f", + "blockHash": "0xd923695a09c2fc3510acab7b9f063711f4fddfe072dd37094981a5945199c349", + "transactionHash": "0x8679676dd886573e63b74fbcee57cd0ea2db58540367779def12cb678fc35438", "logs": [], - "blockNumber": 22186436, - "cumulativeGasUsed": "4070709", + "blockNumber": 22325605, + "cumulativeGasUsed": "12992071", "status": 1, "byzantium": true }, "args": [ "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2" ], - "numDeployments": 8, - "solcInputHash": "ea5866f942a7edcd1f4e3b18c390601e", - "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"AllocateThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"AssetAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"AssetDefaultStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetSupported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"DripperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyDiffChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"NetOusdMintForStrategyThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"OusdMetaStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"PriceProviderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebasePaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"RebaseThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebaseUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"RedeemFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"StrategistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyAddedToMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyRemovedFromMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapAllowedUndervalueChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapSlippageChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAssetAmount\",\"type\":\"uint256\"}],\"name\":\"Swapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"SwapperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"TrusteeAddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"TrusteeFeeBpsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"VaultBufferUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newDelay\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_claimable\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newClaimable\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_queued\",\"type\":\"uint256\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_yield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"YieldDistribution\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"ADMIN_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminImpl\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addWithdrawalQueueLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminImplPosition\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allocate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetDefaultStrategies\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"autoAllocateThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnForStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cacheWETHAssetIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateRedeemOutputs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"capitalPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"claimWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_requestIds\",\"type\":\"uint256[]\"}],\"name\":\"claimWithdrawals\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllStrategies\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"getAssetConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"enum VaultStorage.UnitConversion\",\"name\":\"unitConversion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"allowedOracleSlippageBps\",\"type\":\"uint16\"}],\"internalType\":\"struct VaultStorage.Asset\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssetCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStrategyCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isMintWhitelistedStrategy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"isSupportedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyDiff\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumOusdAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintForStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintForStrategyThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintedForStrategy\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oUSD\",\"outputs\":[{\"internalType\":\"contract OUSD\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ousdMetaStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"priceUnitMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"priceUnitRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebaseThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumUnitAmount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"queued\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImpl\",\"type\":\"address\"}],\"name\":\"setAdminImpl\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"strategies\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_deprecated\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultBuffer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalClaimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalQueueMetadata\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimable\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimed\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"nextWithdrawalIndex\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalRequests\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"withdrawer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"},{\"internalType\":\"uint40\",\"name\":\"timestamp\",\"type\":\"uint40\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{\"addWithdrawalQueueLiquidity()\":{\"details\":\"is called from the Native Staking strategy when validator withdrawals are processed. It also called before any WETH is allocated to a strategy.\"},\"cacheWETHAssetIndex()\":{\"details\":\"Caches WETH's index in `allAssets` variable. Reduces gas usage by redeem by caching that.\"},\"checkBalance(address)\":{\"params\":{\"_asset\":\"Address of asset\"},\"returns\":{\"_0\":\"uint256 Balance of asset in decimals of asset\"}},\"claimWithdrawal(uint256)\":{\"params\":{\"_requestId\":\"Unique ID for the withdrawal request\"},\"returns\":{\"amount\":\"Amount of WETH transferred to the withdrawer\"}},\"claimWithdrawals(uint256[])\":{\"params\":{\"_requestIds\":\"Unique ID of each withdrawal request\"},\"returns\":{\"amounts\":\"Amount of WETH received for each request\",\"totalAmount\":\"Total amount of WETH transferred to the withdrawer\"}},\"getAssetConfig(address)\":{\"params\":{\"_asset\":\"Address of the token asset\"}},\"isSupportedAsset(address)\":{\"params\":{\"_asset\":\"address of the asset\"},\"returns\":{\"_0\":\"true if supported\"}},\"mint(address,uint256,uint256)\":{\"params\":{\"_amount\":\"Amount of the asset being deposited\",\"_asset\":\"Address of the asset being deposited\",\"_minimumOusdAmount\":\"Minimum OTokens to mint\"}},\"priceUnitMint(address)\":{\"params\":{\"asset\":\"address of the asset\"},\"returns\":{\"price\":\"uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\"}},\"priceUnitRedeem(address)\":{\"params\":{\"asset\":\"Address of the asset\"},\"returns\":{\"price\":\"uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\"}},\"redeem(uint256,uint256)\":{\"params\":{\"_amount\":\"Amount of OTokens to burn\",\"_minimumUnitAmount\":\"Minimum stablecoin units to receive in return\"}},\"requestWithdrawal(uint256)\":{\"params\":{\"_amount\":\"Amount of OETH to burn.\"},\"returns\":{\"queued\":\"Cumulative total of all WETH queued including already claimed requests.\",\"requestId\":\"Unique ID for the withdrawal request\"}},\"setAdminImpl(address)\":{\"params\":{\"newImpl\":\"address of the implementation\"}},\"totalValue()\":{\"returns\":{\"value\":\"Total value in USD/ETH (1e18)\"}},\"transferGovernance(address)\":{\"params\":{\"_newGovernor\":\"Address of the new Governor\"}}},\"title\":\"OETH VaultCore Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addWithdrawalQueueLiquidity()\":{\"notice\":\"Collects harvested rewards from the Dripper as WETH then adds WETH to the withdrawal queue if there is a funding shortfall.\"},\"allocate()\":{\"notice\":\"Allocate unallocated funds on Vault to strategies.*\"},\"assetDefaultStrategies(address)\":{\"notice\":\"Mapping of asset address to the Strategy that they should automatically\"},\"autoAllocateThreshold()\":{\"notice\":\"OToken mints over this amount automatically allocate funds. 18 decimals.\"},\"calculateRedeemOutputs(uint256)\":{\"notice\":\"Calculate the outputs for a redeem function, i.e. the mix of coins that will be returned\"},\"capitalPaused()\":{\"notice\":\"pause operations that change the OToken supply. eg mint, redeem, allocate, mint/burn for strategy\"},\"checkBalance(address)\":{\"notice\":\"Get the balance of an asset held in Vault and all strategies.\"},\"claimGovernance()\":{\"notice\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"claimWithdrawal(uint256)\":{\"notice\":\"Claim a previously requested withdrawal once it is claimable. This request can be claimed once the withdrawal queue's `claimable` amount is greater than or equal this request's `queued` amount and 10 minutes has passed. If the requests is not claimable, the transaction will revert with `Queue pending liquidity`. If the request is not older than 10 minutes, the transaction will revert with `Claim delay not met`. OETH is converted to WETH at 1:1.\"},\"claimWithdrawals(uint256[])\":{\"notice\":\"Claim a previously requested withdrawals once they are claimable. This requests can be claimed once the withdrawal queue's `claimable` amount is greater than or equal each request's `queued` amount and 10 minutes has passed. If one of the requests is not claimable, the whole transaction will revert with `Queue pending liquidity`. If one of the requests is not older than 10 minutes, the whole transaction will revert with `Claim delay not met`.\"},\"dripper()\":{\"notice\":\"Address of the Dripper contract that streams harvested rewards to the Vault\"},\"getAllAssets()\":{\"notice\":\"Return all vault asset addresses in order\"},\"getAllStrategies()\":{\"notice\":\"Return the array of all strategies\"},\"getAssetConfig(address)\":{\"notice\":\"Gets the vault configuration of a supported asset.\"},\"getAssetCount()\":{\"notice\":\"Return the number of assets supported by the Vault.\"},\"getStrategyCount()\":{\"notice\":\"Return the number of strategies active on the Vault.\"},\"governor()\":{\"notice\":\"Returns the address of the current Governor.\"},\"isGovernor()\":{\"notice\":\"Returns true if the caller is the current Governor.\"},\"isSupportedAsset(address)\":{\"notice\":\"Returns whether the vault supports the asset\"},\"maxSupplyDiff()\":{\"notice\":\"Max difference between total supply and total value of assets. 18 decimals.\"},\"mint(address,uint256,uint256)\":{\"notice\":\"Deposit a supported asset and mint OTokens.\"},\"netOusdMintForStrategyThreshold()\":{\"notice\":\"How much net total OTokens are allowed to be minted by all strategies\"},\"netOusdMintedForStrategy()\":{\"notice\":\"How much OTokens are currently minted by the strategy\"},\"ousdMetaStrategy()\":{\"notice\":\"Metapool strategy that is allowed to mint/burn OTokens without changing collateral\"},\"priceProvider()\":{\"notice\":\"Address of the Oracle price provider contract\"},\"priceUnitMint(address)\":{\"notice\":\"Returns the total price in 18 digit units for a given asset. Never goes above 1, since that is how we price mints.\"},\"priceUnitRedeem(address)\":{\"notice\":\"Returns the total price in 18 digit unit for a given asset. Never goes below 1, since that is how we price redeems\"},\"rebase()\":{\"notice\":\"Calculate the total value of assets held by the Vault and all strategies and update the supply of OTokens.\"},\"rebasePaused()\":{\"notice\":\"pause rebasing if true\"},\"rebaseThreshold()\":{\"notice\":\"OToken mints over this amount automatically rebase. 18 decimals.\"},\"redeem(uint256,uint256)\":{\"notice\":\"Withdraw a supported asset and burn OTokens.\"},\"redeemFeeBps()\":{\"notice\":\"Redemption fee in basis points. eg 50 = 0.5%\"},\"requestWithdrawal(uint256)\":{\"notice\":\"Request an asynchronous withdrawal of WETH in exchange for OETH. The OETH is burned on request and the WETH is transferred to the withdrawer on claim. This request can be claimed once the withdrawal queue's `claimable` amount is greater than or equal this request's `queued` amount. There is a minimum of 10 minutes before a request can be claimed. After that, the request just needs enough WETH liquidity in the Vault to satisfy all the outstanding requests to that point in the queue. OETH is converted to WETH at 1:1.\"},\"setAdminImpl(address)\":{\"notice\":\"set the implementation for the admin, this needs to be in a base class else we cannot set it\"},\"strategistAddr()\":{\"notice\":\"Address of the Strategist\"},\"totalValue()\":{\"notice\":\"Determine the total value of assets held by the vault and its strategies.\"},\"transferGovernance(address)\":{\"notice\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\"},\"trusteeAddress()\":{\"notice\":\"Trustee contract that can collect a percentage of yield\"},\"trusteeFeeBps()\":{\"notice\":\"Amount of yield collected in basis points. eg 2000 = 20%\"},\"vaultBuffer()\":{\"notice\":\"Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\"},\"withdrawalClaimDelay()\":{\"notice\":\"Sets a minimum delay that is required to elapse between requesting async withdrawals and claiming the request. When set to 0 async withdrawals are disabled.\"},\"withdrawalQueueMetadata()\":{\"notice\":\"Global metadata for the withdrawal queue including: queued - cumulative total of all withdrawal requests included the ones that have already been claimed claimable - cumulative total of all the requests that can be claimed including the ones already claimed claimed - total of all the requests that have been claimed nextWithdrawalIndex - index of the next withdrawal request starting at 0\"},\"withdrawalRequests(uint256)\":{\"notice\":\"Mapping of withdrawal request indices to the user withdrawal request data\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vault/OETHVaultCore.sol\":\"OETHVaultCore\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX 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 *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\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 require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(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 require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(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 require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(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 require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(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 require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(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 require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\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 require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\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 require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\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 * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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 * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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 * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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 * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\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 * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\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 require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base for contracts that are managed by the Origin Protocol's Governor.\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @notice Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @notice Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n emit GovernorshipTransferred(_governor(), newGovernor);\\n\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @notice Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @notice Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0xec8e86e43da98835736de1151b86ca13cd8a1a256adc1382ce7030d825521003\",\"license\":\"MIT\"},\"contracts/interfaces/IBasicToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBasicToken {\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa562062698aa12572123b36dfd2072f1a39e44fed2031cc19c2c9fd522f96ec2\",\"license\":\"MIT\"},\"contracts/interfaces/IDripper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IDripper {\\n /// @notice How much funds have dripped out already and are currently\\n // available to be sent to the vault.\\n /// @return The amount that would be sent if a collect was called\\n function availableFunds() external view returns (uint256);\\n\\n /// @notice Collect all dripped funds and send to vault.\\n /// Recalculate new drip rate.\\n function collect() external;\\n\\n /// @notice Collect all dripped funds, send to vault, recalculate new drip\\n /// rate, and rebase mToken.\\n function collectAndRebase() external;\\n\\n /// @notice Change the drip duration. Governor only.\\n /// @param _durationSeconds the number of seconds to drip out the entire\\n /// balance over if no collects were called during that time.\\n function setDripDuration(uint256 _durationSeconds) external;\\n\\n /// @dev Transfer out ERC20 tokens held by the contract. Governor only.\\n /// @param _asset ERC20 token address\\n /// @param _amount amount to transfer\\n function transferToken(address _asset, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xf160a884d11a9e38ab14d504aa0c3318e78244e4d4c37b555658e0dbbe42c1ce\",\"license\":\"MIT\"},\"contracts/interfaces/IGetExchangeRateToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGetExchangeRateToken {\\n function getExchangeRate() external view returns (uint256 _exchangeRate);\\n}\\n\",\"keccak256\":\"0x243be4dffe1eb453d25cae22b6c172bb64c574d80943cef058fdc30a4b9c9bfd\",\"license\":\"MIT\"},\"contracts/interfaces/IOracle.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IOracle {\\n /**\\n * @dev returns the asset price in USD, in 8 decimal digits.\\n *\\n * The version of priceProvider deployed for OETH has 18 decimal digits\\n */\\n function price(address asset) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x9eabf152389f145c9c23ed71972af73fb1708cbc4b26e524a9ba29a557b7cfe5\",\"license\":\"MIT\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Platform interface to integrate with lending platform like Compound, AAVE etc.\\n */\\ninterface IStrategy {\\n /**\\n * @dev Deposit the given asset to platform\\n * @param _asset asset address\\n * @param _amount Amount to deposit\\n */\\n function deposit(address _asset, uint256 _amount) external;\\n\\n /**\\n * @dev Deposit the entire balance of all supported assets in the Strategy\\n * to the platform\\n */\\n function depositAll() external;\\n\\n /**\\n * @dev Withdraw given asset from Lending platform\\n */\\n function withdraw(\\n address _recipient,\\n address _asset,\\n uint256 _amount\\n ) external;\\n\\n /**\\n * @dev Liquidate all assets in strategy and return them to Vault.\\n */\\n function withdrawAll() external;\\n\\n /**\\n * @dev Returns the current balance of the given asset.\\n */\\n function checkBalance(address _asset)\\n external\\n view\\n returns (uint256 balance);\\n\\n /**\\n * @dev Returns bool indicating whether strategy supports asset.\\n */\\n function supportsAsset(address _asset) external view returns (bool);\\n\\n /**\\n * @dev Collect reward tokens from the Strategy.\\n */\\n function collectRewardTokens() external;\\n\\n /**\\n * @dev The address array of the reward tokens for the Strategy.\\n */\\n function getRewardTokenAddresses() external view returns (address[] memory);\\n}\\n\",\"keccak256\":\"0xb291e409a9b95527f9ed19cd6bff8eeb9921a21c1f5194a48c0bb9ce6613959a\",\"license\":\"MIT\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\ncontract OUSD is Governable {\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n\\n /// @dev Event triggered when the supply changes\\n /// @param totalSupply Updated token total supply\\n /// @param rebasingCredits Updated token rebasing credits\\n /// @param rebasingCreditsPerToken Updated token rebasing credits per token\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n /// @dev Event triggered when an account opts in for rebasing\\n /// @param account Address of the account\\n event AccountRebasingEnabled(address account);\\n /// @dev Event triggered when an account opts out of rebasing\\n /// @param account Address of the account\\n event AccountRebasingDisabled(address account);\\n /// @dev Emitted when `value` tokens are moved from one account `from` to\\n /// another `to`.\\n /// @param from Address of the account tokens are moved from\\n /// @param to Address of the account tokens are moved to\\n /// @param value Amount of tokens transferred\\n event Transfer(address indexed from, address indexed to, uint256 value);\\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 /// @param owner Address of the owner approving allowance\\n /// @param spender Address of the spender allowance is granted to\\n /// @param value Amount of tokens spender can transfer\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n /// @dev Yield resulting from {changeSupply} that a `source` account would\\n /// receive is directed to `target` account.\\n /// @param source Address of the source forwarding the yield\\n /// @param target Address of the target receiving the yield\\n event YieldDelegated(address source, address target);\\n /// @dev Yield delegation from `source` account to the `target` account is\\n /// suspended.\\n /// @param source Address of the source suspending yield forwarding\\n /// @param target Address of the target no longer receiving yield from `source`\\n /// account\\n event YieldUndelegated(address source, address target);\\n\\n enum RebaseOptions {\\n NotSet,\\n StdNonRebasing,\\n StdRebasing,\\n YieldDelegationSource,\\n YieldDelegationTarget\\n }\\n\\n uint256[154] private _gap; // Slots to align with deployed contract\\n uint256 private constant MAX_SUPPLY = type(uint128).max;\\n /// @dev The amount of tokens in existence\\n uint256 public totalSupply;\\n mapping(address => mapping(address => uint256)) private allowances;\\n /// @dev The vault with privileges to execute {mint}, {burn}\\n /// and {changeSupply}\\n address public vaultAddress;\\n mapping(address => uint256) internal creditBalances;\\n // the 2 storage variables below need trailing underscores to not name collide with public functions\\n uint256 private rebasingCredits_; // Sum of all rebasing credits (creditBalances for rebasing accounts)\\n uint256 private rebasingCreditsPerToken_;\\n /// @dev The amount of tokens that are not rebasing - receiving yield\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) internal alternativeCreditsPerToken;\\n /// @dev A map of all addresses and their respective RebaseOptions\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) private __deprecated_isUpgraded;\\n /// @dev A map of addresses that have yields forwarded to. This is an\\n /// inverse mapping of {yieldFrom}\\n /// Key Account forwarding yield\\n /// Value Account receiving yield\\n mapping(address => address) public yieldTo;\\n /// @dev A map of addresses that are receiving the yield. This is an\\n /// inverse mapping of {yieldTo}\\n /// Key Account receiving yield\\n /// Value Account forwarding yield\\n mapping(address => address) public yieldFrom;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n uint256[34] private __gap; // including below gap totals up to 200\\n\\n /// @dev Initializes the contract and sets necessary variables.\\n /// @param _vaultAddress Address of the vault contract\\n /// @param _initialCreditsPerToken The starting rebasing credits per token.\\n function initialize(address _vaultAddress, uint256 _initialCreditsPerToken)\\n external\\n onlyGovernor\\n {\\n require(_vaultAddress != address(0), \\\"Zero vault address\\\");\\n require(vaultAddress == address(0), \\\"Already initialized\\\");\\n\\n rebasingCreditsPerToken_ = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /// @dev Returns the symbol of the token, a shorter version\\n /// of the name.\\n function symbol() external pure virtual returns (string memory) {\\n return \\\"OUSD\\\";\\n }\\n\\n /// @dev Returns the name of the token.\\n function name() external pure virtual returns (string memory) {\\n return \\\"Origin Dollar\\\";\\n }\\n\\n /// @dev Returns the number of decimals used to get its user representation.\\n function decimals() external pure virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() external view returns (uint256) {\\n return rebasingCreditsPerToken_;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() external view returns (uint256) {\\n return rebasingCreditsPerToken_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() external view returns (uint256) {\\n return rebasingCredits_;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() external view returns (uint256) {\\n return rebasingCredits_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @notice Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account) public view returns (uint256) {\\n RebaseOptions state = rebaseState[_account];\\n if (state == RebaseOptions.YieldDelegationSource) {\\n // Saves a slot read when transferring to or from a yield delegating source\\n // since we know creditBalances equals the balance.\\n return creditBalances[_account];\\n }\\n uint256 baseBalance = (creditBalances[_account] * 1e18) /\\n _creditsPerToken(_account);\\n if (state == RebaseOptions.YieldDelegationTarget) {\\n // creditBalances of yieldFrom accounts equals token balances\\n return baseBalance - creditBalances[yieldFrom[_account]];\\n }\\n return baseBalance;\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n external\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (creditBalances[_account], cpt);\\n } else {\\n return (\\n creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n creditBalances[_account],\\n _creditsPerToken(_account),\\n true // all accounts have their resolution \\\"upgraded\\\"\\n );\\n }\\n\\n // Backwards compatible view\\n function nonRebasingCreditsPerToken(address _account)\\n external\\n view\\n returns (uint256)\\n {\\n return alternativeCreditsPerToken[_account];\\n }\\n\\n /**\\n * @notice Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n * @return true on success.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n uint256 userAllowance = allowances[_from][msg.sender];\\n require(_value <= userAllowance, \\\"Allowance exceeded\\\");\\n\\n unchecked {\\n allowances[_from][msg.sender] = userAllowance - _value;\\n }\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n return true;\\n }\\n\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n (\\n int256 fromRebasingCreditsDiff,\\n int256 fromNonRebasingSupplyDiff\\n ) = _adjustAccount(_from, -_value.toInt256());\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_to, _value.toInt256());\\n\\n _adjustGlobals(\\n fromRebasingCreditsDiff + toRebasingCreditsDiff,\\n fromNonRebasingSupplyDiff + toNonRebasingSupplyDiff\\n );\\n }\\n\\n function _adjustAccount(address _account, int256 _balanceChange)\\n internal\\n returns (int256 rebasingCreditsDiff, int256 nonRebasingSupplyDiff)\\n {\\n RebaseOptions state = rebaseState[_account];\\n int256 currentBalance = balanceOf(_account).toInt256();\\n if (currentBalance + _balanceChange < 0) {\\n revert(\\\"Transfer amount exceeds balance\\\");\\n }\\n uint256 newBalance = (currentBalance + _balanceChange).toUint256();\\n\\n if (state == RebaseOptions.YieldDelegationSource) {\\n address target = yieldTo[_account];\\n uint256 targetOldBalance = balanceOf(target);\\n uint256 targetNewCredits = _balanceToRebasingCredits(\\n targetOldBalance + newBalance\\n );\\n rebasingCreditsDiff =\\n targetNewCredits.toInt256() -\\n creditBalances[target].toInt256();\\n\\n creditBalances[_account] = newBalance;\\n creditBalances[target] = targetNewCredits;\\n } else if (state == RebaseOptions.YieldDelegationTarget) {\\n uint256 newCredits = _balanceToRebasingCredits(\\n newBalance + creditBalances[yieldFrom[_account]]\\n );\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n } else {\\n _autoMigrate(_account);\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem > 0) {\\n nonRebasingSupplyDiff = _balanceChange;\\n if (alternativeCreditsPerTokenMem != 1e18) {\\n alternativeCreditsPerToken[_account] = 1e18;\\n }\\n creditBalances[_account] = newBalance;\\n } else {\\n uint256 newCredits = _balanceToRebasingCredits(newBalance);\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n }\\n }\\n }\\n\\n function _adjustGlobals(\\n int256 _rebasingCreditsDiff,\\n int256 _nonRebasingSupplyDiff\\n ) internal {\\n if (_rebasingCreditsDiff != 0) {\\n rebasingCredits_ = (rebasingCredits_.toInt256() +\\n _rebasingCreditsDiff).toUint256();\\n }\\n if (_nonRebasingSupplyDiff != 0) {\\n nonRebasingSupply = (nonRebasingSupply.toInt256() +\\n _nonRebasingSupplyDiff).toUint256();\\n }\\n }\\n\\n /**\\n * @notice Function to check the amount of tokens that _owner has allowed\\n * to `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[_owner][_spender];\\n }\\n\\n /**\\n * @notice Approve the passed address to spend the specified amount of\\n * tokens on behalf of msg.sender.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n * @return true on success.\\n */\\n function approve(address _spender, uint256 _value) external returns (bool) {\\n allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Creates `_amount` tokens and assigns them to `_account`,\\n * increasing the total supply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, _amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply + _amount;\\n\\n require(totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @notice Destroys `_amount` tokens from `_account`,\\n * reducing the total supply.\\n */\\n function burn(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, -_amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem != 0) {\\n return alternativeCreditsPerTokenMem;\\n } else {\\n return rebasingCreditsPerToken_;\\n }\\n }\\n\\n /**\\n * @dev Auto migrate contracts to be non rebasing,\\n * unless they have opted into yield.\\n * @param _account Address of the account.\\n */\\n function _autoMigrate(address _account) internal {\\n bool isContract = _account.code.length > 0;\\n // In previous code versions, contracts would not have had their\\n // rebaseState[_account] set to RebaseOptions.NonRebasing when migrated\\n // therefore we check the actual accounting used on the account instead.\\n if (\\n isContract &&\\n rebaseState[_account] == RebaseOptions.NotSet &&\\n alternativeCreditsPerToken[_account] == 0\\n ) {\\n _rebaseOptOut(_account);\\n }\\n }\\n\\n /**\\n * @dev Calculates credits from contract's global rebasingCreditsPerToken_, and\\n * also balance that corresponds to those credits. The latter is important\\n * when adjusting the contract's global nonRebasingSupply to circumvent any\\n * possible rounding errors.\\n *\\n * @param _balance Balance of the account.\\n */\\n function _balanceToRebasingCredits(uint256 _balance)\\n internal\\n view\\n returns (uint256 rebasingCredits)\\n {\\n // Rounds up, because we need to ensure that accounts always have\\n // at least the balance that they should have.\\n // Note this should always be used on an absolute account value,\\n // not on a possibly negative diff, because then the rounding would be wrong.\\n return ((_balance) * rebasingCreditsPerToken_ + 1e18 - 1) / 1e18;\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n * @param _account Address of the account.\\n */\\n function governanceRebaseOptIn(address _account) external onlyGovernor {\\n require(_account != address(0), \\\"Zero address not allowed\\\");\\n _rebaseOptIn(_account);\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n */\\n function rebaseOptIn() external {\\n _rebaseOptIn(msg.sender);\\n }\\n\\n function _rebaseOptIn(address _account) internal {\\n uint256 balance = balanceOf(_account);\\n\\n // prettier-ignore\\n require(\\n alternativeCreditsPerToken[_account] > 0 ||\\n // Accounts may explicitly `rebaseOptIn` regardless of\\n // accounting if they have a 0 balance.\\n creditBalances[_account] == 0\\n ,\\n \\\"Account must be non-rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n // prettier-ignore\\n require(\\n state == RebaseOptions.StdNonRebasing ||\\n state == RebaseOptions.NotSet,\\n \\\"Only standard non-rebasing accounts can opt in\\\"\\n );\\n\\n uint256 newCredits = _balanceToRebasingCredits(balance);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdRebasing;\\n alternativeCreditsPerToken[_account] = 0;\\n creditBalances[_account] = newCredits;\\n // Globals\\n _adjustGlobals(newCredits.toInt256(), -balance.toInt256());\\n\\n emit AccountRebasingEnabled(_account);\\n }\\n\\n /**\\n * @notice The calling account will no longer receive yield\\n */\\n function rebaseOptOut() external {\\n _rebaseOptOut(msg.sender);\\n }\\n\\n function _rebaseOptOut(address _account) internal {\\n require(\\n alternativeCreditsPerToken[_account] == 0,\\n \\\"Account must be rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n require(\\n state == RebaseOptions.StdRebasing || state == RebaseOptions.NotSet,\\n \\\"Only standard rebasing accounts can opt out\\\"\\n );\\n\\n uint256 oldCredits = creditBalances[_account];\\n uint256 balance = balanceOf(_account);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdNonRebasing;\\n alternativeCreditsPerToken[_account] = 1e18;\\n creditBalances[_account] = balance;\\n // Globals\\n _adjustGlobals(-oldCredits.toInt256(), balance.toInt256());\\n\\n emit AccountRebasingDisabled(_account);\\n }\\n\\n /**\\n * @notice Distribute yield to users. This changes the exchange rate\\n * between \\\"credits\\\" and OUSD tokens to change rebasing user's balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply) external onlyVault {\\n require(totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n return;\\n }\\n\\n totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n uint256 rebasingSupply = totalSupply - nonRebasingSupply;\\n // round up in the favour of the protocol\\n rebasingCreditsPerToken_ =\\n (rebasingCredits_ * 1e18 + rebasingSupply - 1) /\\n rebasingSupply;\\n\\n require(rebasingCreditsPerToken_ > 0, \\\"Invalid change in supply\\\");\\n\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n }\\n\\n /*\\n * @notice Send the yield from one account to another account.\\n * Each account keeps its own balances.\\n */\\n function delegateYield(address _from, address _to) external onlyGovernor {\\n require(_from != address(0), \\\"Zero from address not allowed\\\");\\n require(_to != address(0), \\\"Zero to address not allowed\\\");\\n\\n require(_from != _to, \\\"Cannot delegate to self\\\");\\n require(\\n yieldFrom[_to] == address(0) &&\\n yieldTo[_to] == address(0) &&\\n yieldFrom[_from] == address(0) &&\\n yieldTo[_from] == address(0),\\n \\\"Blocked by existing yield delegation\\\"\\n );\\n RebaseOptions stateFrom = rebaseState[_from];\\n RebaseOptions stateTo = rebaseState[_to];\\n\\n require(\\n stateFrom == RebaseOptions.NotSet ||\\n stateFrom == RebaseOptions.StdNonRebasing ||\\n stateFrom == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState from\\\"\\n );\\n\\n require(\\n stateTo == RebaseOptions.NotSet ||\\n stateTo == RebaseOptions.StdNonRebasing ||\\n stateTo == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState to\\\"\\n );\\n\\n if (alternativeCreditsPerToken[_from] == 0) {\\n _rebaseOptOut(_from);\\n }\\n if (alternativeCreditsPerToken[_to] > 0) {\\n _rebaseOptIn(_to);\\n }\\n\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(_to);\\n uint256 oldToCredits = creditBalances[_to];\\n uint256 newToCredits = _balanceToRebasingCredits(\\n fromBalance + toBalance\\n );\\n\\n // Set up the bidirectional links\\n yieldTo[_from] = _to;\\n yieldFrom[_to] = _from;\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.YieldDelegationSource;\\n alternativeCreditsPerToken[_from] = 1e18;\\n creditBalances[_from] = fromBalance;\\n rebaseState[_to] = RebaseOptions.YieldDelegationTarget;\\n creditBalances[_to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, -(fromBalance).toInt256());\\n emit YieldDelegated(_from, _to);\\n }\\n\\n /*\\n * @notice Stop sending the yield from one account to another account.\\n */\\n function undelegateYield(address _from) external onlyGovernor {\\n // Require a delegation, which will also ensure a valid delegation\\n require(yieldTo[_from] != address(0), \\\"Zero address not allowed\\\");\\n\\n address to = yieldTo[_from];\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(to);\\n uint256 oldToCredits = creditBalances[to];\\n uint256 newToCredits = _balanceToRebasingCredits(toBalance);\\n\\n // Remove the bidirectional links\\n yieldFrom[to] = address(0);\\n yieldTo[_from] = address(0);\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.StdNonRebasing;\\n // alternativeCreditsPerToken[from] already 1e18 from `delegateYield()`\\n creditBalances[_from] = fromBalance;\\n rebaseState[to] = RebaseOptions.StdRebasing;\\n // alternativeCreditsPerToken[to] already 0 from `delegateYield()`\\n creditBalances[to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, fromBalance.toInt256());\\n emit YieldUndelegated(_from, to);\\n }\\n}\\n\",\"keccak256\":\"0x5741d16e48d6031ec92c1e189ea023c78a34956b6bc9642ea9dfc9a6dafe49ca\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IBasicToken } from \\\"../interfaces/IBasicToken.sol\\\";\\n\\nlibrary Helpers {\\n /**\\n * @notice Fetch the `symbol()` from an ERC20 token\\n * @dev Grabs the `symbol()` from a contract\\n * @param _token Address of the ERC20 token\\n * @return string Symbol of the ERC20 token\\n */\\n function getSymbol(address _token) internal view returns (string memory) {\\n string memory symbol = IBasicToken(_token).symbol();\\n return symbol;\\n }\\n\\n /**\\n * @notice Fetch the `decimals()` from an ERC20 token\\n * @dev Grabs the `decimals()` from a contract and fails if\\n * the decimal value does not live within a certain range\\n * @param _token Address of the ERC20 token\\n * @return uint256 Decimals of the ERC20 token\\n */\\n function getDecimals(address _token) internal view returns (uint256) {\\n uint256 decimals = IBasicToken(_token).decimals();\\n require(\\n decimals >= 4 && decimals <= 18,\\n \\\"Token must have sufficient decimal places\\\"\\n );\\n\\n return decimals;\\n }\\n}\\n\",\"keccak256\":\"0x108b7a69e0140da0072ca18f90a03a3340574400f81aa6076cd2cccdf13699c2\",\"license\":\"MIT\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base contract any contracts that need to initialize state after deployment.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0xaadbcc138114afed4af4f353c2ced2916e6ee14be91434789187f192caf0d786\",\"license\":\"MIT\"},\"contracts/utils/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n\\n// Based on StableMath from Stability Labs Pty. Ltd.\\n// https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol\\n\\nlibrary StableMath {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Scaling unit for use in specific calculations,\\n * where 1 * 10**18, or 1e18 represents a unit '1'\\n */\\n uint256 private constant FULL_SCALE = 1e18;\\n\\n /***************************************\\n Helpers\\n ****************************************/\\n\\n /**\\n * @dev Adjust the scale of an integer\\n * @param to Decimals to scale to\\n * @param from Decimals to scale from\\n */\\n function scaleBy(\\n uint256 x,\\n uint256 to,\\n uint256 from\\n ) internal pure returns (uint256) {\\n if (to > from) {\\n x = x.mul(10**(to - from));\\n } else if (to < from) {\\n // slither-disable-next-line divide-before-multiply\\n x = x.div(10**(from - to));\\n }\\n return x;\\n }\\n\\n /***************************************\\n Precise Arithmetic\\n ****************************************/\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulTruncateScale(x, y, FULL_SCALE);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the given scale. For example,\\n * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @param scale Scale unit\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncateScale(\\n uint256 x,\\n uint256 y,\\n uint256 scale\\n ) internal pure returns (uint256) {\\n // e.g. assume scale = fullScale\\n // z = 10e18 * 9e17 = 9e36\\n uint256 z = x.mul(y);\\n // return 9e36 / 1e18 = 9e18\\n return z.div(scale);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit, rounded up to the closest base unit.\\n */\\n function mulTruncateCeil(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e17 * 17268172638 = 138145381104e17\\n uint256 scaled = x.mul(y);\\n // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17\\n uint256 ceil = scaled.add(FULL_SCALE.sub(1));\\n // e.g. 13814538111.399...e18 / 1e18 = 13814538111\\n return ceil.div(FULL_SCALE);\\n }\\n\\n /**\\n * @dev Precisely divides two units, by first scaling the left hand operand. Useful\\n * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)\\n * @param x Left hand input to division\\n * @param y Right hand input to division\\n * @return Result after multiplying the left operand by the scale, and\\n * executing the division on the right hand input.\\n */\\n function divPrecisely(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e18 * 1e18 = 8e36\\n uint256 z = x.mul(FULL_SCALE);\\n // e.g. 8e36 / 10e18 = 8e17\\n return z.div(y);\\n }\\n}\\n\",\"keccak256\":\"0x1eb49f6f79045d9e0a8e1dced8e01d9e559e5fac554dcbb53e43140b601b04e7\",\"license\":\"MIT\"},\"contracts/vault/OETHVaultCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { VaultCore } from \\\"./VaultCore.sol\\\";\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { IDripper } from \\\"../interfaces/IDripper.sol\\\";\\n\\n/**\\n * @title OETH VaultCore Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETHVaultCore is VaultCore {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n\\n address public immutable weth;\\n uint256 public wethAssetIndex;\\n\\n // For future use (because OETHBaseVaultCore inherits from this)\\n uint256[50] private __gap;\\n\\n constructor(address _weth) {\\n weth = _weth;\\n }\\n\\n /**\\n * @dev Caches WETH's index in `allAssets` variable.\\n * Reduces gas usage by redeem by caching that.\\n */\\n function cacheWETHAssetIndex() external onlyGovernor {\\n uint256 assetCount = allAssets.length;\\n for (uint256 i; i < assetCount; ++i) {\\n if (allAssets[i] == weth) {\\n wethAssetIndex = i;\\n break;\\n }\\n }\\n\\n require(allAssets[wethAssetIndex] == weth, \\\"Invalid WETH Asset Index\\\");\\n }\\n\\n // @inheritdoc VaultCore\\n function mintForStrategy(uint256 amount)\\n external\\n override\\n whenNotCapitalPaused\\n {\\n require(\\n strategies[msg.sender].isSupported == true,\\n \\\"Unsupported strategy\\\"\\n );\\n require(\\n isMintWhitelistedStrategy[msg.sender] == true,\\n \\\"Not whitelisted strategy\\\"\\n );\\n\\n emit Mint(msg.sender, amount);\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, amount);\\n }\\n\\n // @inheritdoc VaultCore\\n function burnForStrategy(uint256 amount)\\n external\\n override\\n whenNotCapitalPaused\\n {\\n require(\\n strategies[msg.sender].isSupported == true,\\n \\\"Unsupported strategy\\\"\\n );\\n require(\\n isMintWhitelistedStrategy[msg.sender] == true,\\n \\\"Not whitelisted strategy\\\"\\n );\\n\\n emit Redeem(msg.sender, amount);\\n\\n // Burn OTokens\\n oUSD.burn(msg.sender, amount);\\n }\\n\\n // @inheritdoc VaultCore\\n // slither-disable-start reentrancy-no-eth\\n function _mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) internal virtual override {\\n require(_asset == weth, \\\"Unsupported asset for minting\\\");\\n require(_amount > 0, \\\"Amount must be greater than 0\\\");\\n require(\\n _amount >= _minimumOusdAmount,\\n \\\"Mint amount lower than minimum\\\"\\n );\\n\\n emit Mint(msg.sender, _amount);\\n\\n // Rebase must happen before any transfers occur.\\n if (!rebasePaused && _amount >= rebaseThreshold) {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n _rebase();\\n }\\n\\n // Mint oTokens\\n oUSD.mint(msg.sender, _amount);\\n\\n // Transfer the deposited coins to the vault\\n IERC20(_asset).safeTransferFrom(msg.sender, address(this), _amount);\\n\\n // Give priority to the withdrawal queue for the new WETH liquidity\\n _addWithdrawalQueueLiquidity();\\n\\n // Auto-allocate if necessary\\n if (_amount >= autoAllocateThreshold) {\\n _allocate();\\n }\\n }\\n\\n // slither-disable-end reentrancy-no-eth\\n\\n // @inheritdoc VaultCore\\n function _calculateRedeemOutputs(uint256 _amount)\\n internal\\n view\\n virtual\\n override\\n returns (uint256[] memory outputs)\\n {\\n // Overrides `VaultCore._calculateRedeemOutputs` to redeem with only\\n // WETH instead of LST-mix. Doesn't change the function signature\\n // for backward compatibility\\n\\n // Calculate redeem fee\\n if (redeemFeeBps > 0) {\\n uint256 redeemFee = _amount.mulTruncateScale(redeemFeeBps, 1e4);\\n _amount = _amount - redeemFee;\\n }\\n\\n // Ensure that the WETH index is cached\\n uint256 _wethAssetIndex = wethAssetIndex;\\n require(\\n allAssets[_wethAssetIndex] == weth,\\n \\\"WETH Asset index not cached\\\"\\n );\\n\\n outputs = new uint256[](allAssets.length);\\n outputs[_wethAssetIndex] = _amount;\\n }\\n\\n // @inheritdoc VaultCore\\n function _redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n internal\\n virtual\\n override\\n {\\n // Override `VaultCore._redeem` to simplify it. Gets rid of oracle\\n // usage and looping through all assets for LST-mix redeem. Instead\\n // does a simple WETH-only redeem.\\n emit Redeem(msg.sender, _amount);\\n\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Amount excluding fees\\n // No fee for the strategist or the governor, makes it easier to do operations\\n uint256 amountMinusFee = (msg.sender == strategistAddr || isGovernor())\\n ? _amount\\n : _calculateRedeemOutputs(_amount)[wethAssetIndex];\\n\\n require(\\n amountMinusFee >= _minimumUnitAmount,\\n \\\"Redeem amount lower than minimum\\\"\\n );\\n\\n // Is there enough WETH in the Vault available after accounting for the withdrawal queue\\n require(_wethAvailable() >= amountMinusFee, \\\"Liquidity error\\\");\\n\\n // Transfer WETH minus the fee to the redeemer\\n IERC20(weth).safeTransfer(msg.sender, amountMinusFee);\\n\\n // Burn OETH from user (including fees)\\n oUSD.burn(msg.sender, _amount);\\n\\n // Prevent insolvency\\n _postRedeem(_amount);\\n }\\n\\n /**\\n * @notice Request an asynchronous withdrawal of WETH in exchange for OETH.\\n * The OETH is burned on request and the WETH is transferred to the withdrawer on claim.\\n * This request can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal this request's `queued` amount.\\n * There is a minimum of 10 minutes before a request can be claimed. After that, the request just needs\\n * enough WETH liquidity in the Vault to satisfy all the outstanding requests to that point in the queue.\\n * OETH is converted to WETH at 1:1.\\n * @param _amount Amount of OETH to burn.\\n * @return requestId Unique ID for the withdrawal request\\n * @return queued Cumulative total of all WETH queued including already claimed requests.\\n */\\n function requestWithdrawal(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256 requestId, uint256 queued)\\n {\\n require(withdrawalClaimDelay > 0, \\\"Async withdrawals not enabled\\\");\\n\\n // The check that the requester has enough OETH is done in to later burn call\\n\\n requestId = withdrawalQueueMetadata.nextWithdrawalIndex;\\n queued = withdrawalQueueMetadata.queued + _amount;\\n\\n // Store the next withdrawal request\\n withdrawalQueueMetadata.nextWithdrawalIndex = SafeCast.toUint128(\\n requestId + 1\\n );\\n // Store the updated queued amount which reserves WETH in the withdrawal queue\\n // and reduces the vault's total assets\\n withdrawalQueueMetadata.queued = SafeCast.toUint128(queued);\\n // Store the user's withdrawal request\\n withdrawalRequests[requestId] = WithdrawalRequest({\\n withdrawer: msg.sender,\\n claimed: false,\\n timestamp: uint40(block.timestamp),\\n amount: SafeCast.toUint128(_amount),\\n queued: SafeCast.toUint128(queued)\\n });\\n\\n // Burn the user's OETH\\n oUSD.burn(msg.sender, _amount);\\n\\n // Prevent withdrawal if the vault is solvent by more than the the allowed percentage\\n _postRedeem(_amount);\\n\\n emit WithdrawalRequested(msg.sender, requestId, _amount, queued);\\n }\\n\\n // slither-disable-start reentrancy-no-eth\\n /**\\n * @notice Claim a previously requested withdrawal once it is claimable.\\n * This request can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal this request's `queued` amount and 10 minutes has passed.\\n * If the requests is not claimable, the transaction will revert with `Queue pending liquidity`.\\n * If the request is not older than 10 minutes, the transaction will revert with `Claim delay not met`.\\n * OETH is converted to WETH at 1:1.\\n * @param _requestId Unique ID for the withdrawal request\\n * @return amount Amount of WETH transferred to the withdrawer\\n */\\n function claimWithdrawal(uint256 _requestId)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256 amount)\\n {\\n // Try and get more liquidity if there is not enough available\\n if (\\n withdrawalRequests[_requestId].queued >\\n withdrawalQueueMetadata.claimable\\n ) {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n // Add any WETH from the Dripper to the withdrawal queue\\n _addWithdrawalQueueLiquidity();\\n }\\n\\n amount = _claimWithdrawal(_requestId);\\n\\n // transfer WETH from the vault to the withdrawer\\n IERC20(weth).safeTransfer(msg.sender, amount);\\n\\n // Prevent insolvency\\n _postRedeem(amount);\\n }\\n\\n // slither-disable-end reentrancy-no-eth\\n\\n /**\\n * @notice Claim a previously requested withdrawals once they are claimable.\\n * This requests can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal each request's `queued` amount and 10 minutes has passed.\\n * If one of the requests is not claimable, the whole transaction will revert with `Queue pending liquidity`.\\n * If one of the requests is not older than 10 minutes,\\n * the whole transaction will revert with `Claim delay not met`.\\n * @param _requestIds Unique ID of each withdrawal request\\n * @return amounts Amount of WETH received for each request\\n * @return totalAmount Total amount of WETH transferred to the withdrawer\\n */\\n function claimWithdrawals(uint256[] calldata _requestIds)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256[] memory amounts, uint256 totalAmount)\\n {\\n // Just call the Dripper instead of looping through _requestIds to find the highest id\\n // and checking it's queued amount is > the queue's claimable amount.\\n\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n // Add any WETH from the Dripper to the withdrawal queue\\n _addWithdrawalQueueLiquidity();\\n\\n amounts = new uint256[](_requestIds.length);\\n for (uint256 i; i < _requestIds.length; ++i) {\\n amounts[i] = _claimWithdrawal(_requestIds[i]);\\n totalAmount += amounts[i];\\n }\\n\\n // transfer all the claimed WETH from the vault to the withdrawer\\n IERC20(weth).safeTransfer(msg.sender, totalAmount);\\n\\n // Prevent insolvency\\n _postRedeem(totalAmount);\\n }\\n\\n function _claimWithdrawal(uint256 requestId)\\n internal\\n returns (uint256 amount)\\n {\\n require(withdrawalClaimDelay > 0, \\\"Async withdrawals not enabled\\\");\\n\\n // Load the structs from storage into memory\\n WithdrawalRequest memory request = withdrawalRequests[requestId];\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n require(\\n request.timestamp + withdrawalClaimDelay <= block.timestamp,\\n \\\"Claim delay not met\\\"\\n );\\n // If there isn't enough reserved liquidity in the queue to claim\\n require(request.queued <= queue.claimable, \\\"Queue pending liquidity\\\");\\n require(request.withdrawer == msg.sender, \\\"Not requester\\\");\\n require(request.claimed == false, \\\"Already claimed\\\");\\n\\n // Store the request as claimed\\n withdrawalRequests[requestId].claimed = true;\\n // Store the updated claimed amount\\n withdrawalQueueMetadata.claimed = queue.claimed + request.amount;\\n\\n emit WithdrawalClaimed(msg.sender, requestId, request.amount);\\n\\n return request.amount;\\n }\\n\\n /// @notice Collects harvested rewards from the Dripper as WETH then\\n /// adds WETH to the withdrawal queue if there is a funding shortfall.\\n /// @dev is called from the Native Staking strategy when validator withdrawals are processed.\\n /// It also called before any WETH is allocated to a strategy.\\n function addWithdrawalQueueLiquidity() external {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n _addWithdrawalQueueLiquidity();\\n }\\n\\n /// @dev Adds WETH to the withdrawal queue if there is a funding shortfall.\\n /// This assumes 1 WETH equal 1 OETH.\\n function _addWithdrawalQueueLiquidity()\\n internal\\n returns (uint256 addedClaimable)\\n {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // Check if the claimable WETH is less than the queued amount\\n uint256 queueShortfall = queue.queued - queue.claimable;\\n\\n // No need to do anything is the withdrawal queue is full funded\\n if (queueShortfall == 0) {\\n return 0;\\n }\\n\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // Of the claimable withdrawal requests, how much is unclaimed?\\n // That is, the amount of WETH that is currently allocated for the withdrawal queue\\n uint256 allocatedWeth = queue.claimable - queue.claimed;\\n\\n // If there is no unallocated WETH then there is nothing to add to the queue\\n if (wethBalance <= allocatedWeth) {\\n return 0;\\n }\\n\\n uint256 unallocatedWeth = wethBalance - allocatedWeth;\\n\\n // the new claimable amount is the smaller of the queue shortfall or unallocated weth\\n addedClaimable = queueShortfall < unallocatedWeth\\n ? queueShortfall\\n : unallocatedWeth;\\n uint256 newClaimable = queue.claimable + addedClaimable;\\n\\n // Store the new claimable amount back to storage\\n withdrawalQueueMetadata.claimable = SafeCast.toUint128(newClaimable);\\n\\n // emit a WithdrawalClaimable event\\n emit WithdrawalClaimable(newClaimable, addedClaimable);\\n }\\n\\n /***************************************\\n View Functions\\n ****************************************/\\n\\n /// @dev Calculate how much WETH in the vault is not reserved for the withdrawal queue.\\n // That is, it is available to be redeemed or deposited into a strategy.\\n function _wethAvailable() internal view returns (uint256 wethAvailable) {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // The amount of WETH that is still to be claimed in the withdrawal queue\\n uint256 outstandingWithdrawals = queue.queued - queue.claimed;\\n\\n // The amount of sitting in WETH in the vault\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // If there is not enough WETH in the vault to cover the outstanding withdrawals\\n if (wethBalance <= outstandingWithdrawals) {\\n return 0;\\n }\\n\\n return wethBalance - outstandingWithdrawals;\\n }\\n\\n /// @dev Get the balance of an asset held in Vault and all strategies\\n /// less any WETH that is reserved for the withdrawal queue.\\n /// WETH is the only asset that can return a non-zero balance.\\n /// All other assets will return 0 even if there is some dust amounts left in the Vault.\\n /// For example, there is 1 wei left of stETH in the OETH Vault but will return 0 in this function.\\n ///\\n /// If there is not enough WETH in the vault and all strategies to cover all outstanding\\n /// withdrawal requests then return a WETH balance of 0\\n function _checkBalance(address _asset)\\n internal\\n view\\n override\\n returns (uint256 balance)\\n {\\n if (_asset != weth) {\\n return 0;\\n }\\n\\n // Get the WETH in the vault and the strategies\\n balance = super._checkBalance(_asset);\\n\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // If the vault becomes insolvent enough that the total value in the vault and all strategies\\n // is less than the outstanding withdrawals.\\n // For example, there was a mass slashing event and most users request a withdrawal.\\n if (balance + queue.claimed < queue.queued) {\\n return 0;\\n }\\n\\n // Need to remove WETH that is reserved for the withdrawal queue\\n return balance + queue.claimed - queue.queued;\\n }\\n\\n /**\\n * @notice Allocate unallocated funds on Vault to strategies.\\n **/\\n function allocate() external override whenNotCapitalPaused nonReentrant {\\n // Add any unallocated WETH to the withdrawal queue first\\n _addWithdrawalQueueLiquidity();\\n\\n _allocate();\\n }\\n\\n /// @dev Allocate WETH to the default WETH strategy if there is excess to the Vault buffer.\\n /// This is called from either `mint` or `allocate` and assumes `_addWithdrawalQueueLiquidity`\\n /// has been called before this function.\\n function _allocate() internal override {\\n // No need to do anything if no default strategy for WETH\\n address depositStrategyAddr = assetDefaultStrategies[weth];\\n if (depositStrategyAddr == address(0)) return;\\n\\n uint256 wethAvailableInVault = _wethAvailable();\\n // No need to do anything if there isn't any WETH in the vault to allocate\\n if (wethAvailableInVault == 0) return;\\n\\n // Calculate the target buffer for the vault using the total supply\\n uint256 totalSupply = oUSD.totalSupply();\\n uint256 targetBuffer = totalSupply.mulTruncate(vaultBuffer);\\n\\n // If available WETH in the Vault is below or equal the target buffer then there's nothing to allocate\\n if (wethAvailableInVault <= targetBuffer) return;\\n\\n // The amount of assets to allocate to the default strategy\\n uint256 allocateAmount = wethAvailableInVault - targetBuffer;\\n\\n IStrategy strategy = IStrategy(depositStrategyAddr);\\n // Transfer WETH to the strategy and call the strategy's deposit function\\n IERC20(weth).safeTransfer(address(strategy), allocateAmount);\\n strategy.deposit(weth, allocateAmount);\\n\\n emit AssetAllocated(weth, depositStrategyAddr, allocateAmount);\\n }\\n\\n /// @dev The total value of all WETH held by the vault and all its strategies\\n /// less any WETH that is reserved for the withdrawal queue.\\n ///\\n // If there is not enough WETH in the vault and all strategies to cover all outstanding\\n // withdrawal requests then return a total value of 0.\\n function _totalValue() internal view override returns (uint256 value) {\\n // As WETH is the only asset, just return the WETH balance\\n return _checkBalance(weth);\\n }\\n\\n /// @dev Only WETH is supported in the OETH Vault so return the WETH balance only\\n /// Any ETH balances in the Vault will be ignored.\\n /// Amounts from previously supported vault assets will also be ignored.\\n /// For example, there is 1 wei left of stETH in the OETH Vault but is will be ignored.\\n function _totalValueInVault()\\n internal\\n view\\n override\\n returns (uint256 value)\\n {\\n value = IERC20(weth).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x3e406ef12420c175d117f8644976ee0e75bdd2855ac470966ccf43b8681eb03f\",\"license\":\"MIT\"},\"contracts/vault/VaultCore.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultCore contract\\n * @notice The Vault contract stores assets. On a deposit, OTokens will be minted\\n and sent to the depositor. On a withdrawal, OTokens will be burned and\\n assets will be sent to the withdrawer. The Vault accepts deposits of\\n interest from yield bearing strategies which will modify the supply\\n of OTokens.\\n * @author Origin Protocol Inc\\n */\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { IOracle } from \\\"../interfaces/IOracle.sol\\\";\\nimport { IGetExchangeRateToken } from \\\"../interfaces/IGetExchangeRateToken.sol\\\";\\nimport { IDripper } from \\\"../interfaces/IDripper.sol\\\";\\n\\nimport \\\"./VaultInitializer.sol\\\";\\n\\ncontract VaultCore is VaultInitializer {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n /// @dev max signed int\\n uint256 internal constant MAX_INT = uint256(type(int256).max);\\n\\n /**\\n * @dev Verifies that the rebasing is not paused.\\n */\\n modifier whenNotRebasePaused() {\\n require(!rebasePaused, \\\"Rebasing paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Verifies that the deposits are not paused.\\n */\\n modifier whenNotCapitalPaused() {\\n require(!capitalPaused, \\\"Capital paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the AMO strategy.\\n */\\n modifier onlyOusdMetaStrategy() {\\n require(\\n msg.sender == ousdMetaStrategy,\\n \\\"Caller is not the OUSD meta strategy\\\"\\n );\\n _;\\n }\\n\\n /**\\n * @notice Deposit a supported asset and mint OTokens.\\n * @param _asset Address of the asset being deposited\\n * @param _amount Amount of the asset being deposited\\n * @param _minimumOusdAmount Minimum OTokens to mint\\n */\\n function mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) external whenNotCapitalPaused nonReentrant {\\n _mint(_asset, _amount, _minimumOusdAmount);\\n }\\n\\n /**\\n * @dev Deposit a supported asset and mint OTokens.\\n * @param _asset Address of the asset being deposited\\n * @param _amount Amount of the asset being deposited\\n * @param _minimumOusdAmount Minimum OTokens to mint\\n */\\n function _mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) internal virtual {\\n require(assets[_asset].isSupported, \\\"Asset is not supported\\\");\\n require(_amount > 0, \\\"Amount must be greater than 0\\\");\\n\\n uint256 units = _toUnits(_amount, _asset);\\n uint256 unitPrice = _toUnitPrice(_asset, true);\\n uint256 priceAdjustedDeposit = (units * unitPrice) / 1e18;\\n\\n if (_minimumOusdAmount > 0) {\\n require(\\n priceAdjustedDeposit >= _minimumOusdAmount,\\n \\\"Mint amount lower than minimum\\\"\\n );\\n }\\n\\n emit Mint(msg.sender, priceAdjustedDeposit);\\n\\n // Rebase must happen before any transfers occur.\\n if (priceAdjustedDeposit >= rebaseThreshold && !rebasePaused) {\\n if (dripper != address(0)) {\\n // Stream any harvested rewards that are available\\n IDripper(dripper).collect();\\n }\\n _rebase();\\n }\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, priceAdjustedDeposit);\\n\\n // Transfer the deposited coins to the vault\\n IERC20 asset = IERC20(_asset);\\n asset.safeTransferFrom(msg.sender, address(this), _amount);\\n\\n if (priceAdjustedDeposit >= autoAllocateThreshold) {\\n _allocate();\\n }\\n }\\n\\n /**\\n * @notice Mint OTokens for a Metapool Strategy\\n * @param _amount Amount of the asset being deposited\\n *\\n * Notice: can't use `nonReentrant` modifier since the `mint` function can\\n * call `allocate`, and that can trigger `ConvexOUSDMetaStrategy` to call this function\\n * while the execution of the `mint` has not yet completed -> causing a `nonReentrant` collision.\\n *\\n * Also important to understand is that this is a limitation imposed by the test suite.\\n * Production / mainnet contracts should never be configured in a way where mint/redeem functions\\n * that are moving funds between the Vault and end user wallets can influence strategies\\n * utilizing this function.\\n */\\n function mintForStrategy(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n onlyOusdMetaStrategy\\n {\\n require(_amount < MAX_INT, \\\"Amount too high\\\");\\n\\n emit Mint(msg.sender, _amount);\\n\\n // safe to cast because of the require check at the beginning of the function\\n netOusdMintedForStrategy += int256(_amount);\\n\\n require(\\n abs(netOusdMintedForStrategy) < netOusdMintForStrategyThreshold,\\n \\\"Minted ousd surpassed netOusdMintForStrategyThreshold.\\\"\\n );\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, _amount);\\n }\\n\\n // In memoriam\\n\\n /**\\n * @notice Withdraw a supported asset and burn OTokens.\\n * @param _amount Amount of OTokens to burn\\n * @param _minimumUnitAmount Minimum stablecoin units to receive in return\\n */\\n function redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n external\\n whenNotCapitalPaused\\n nonReentrant\\n {\\n _redeem(_amount, _minimumUnitAmount);\\n }\\n\\n /**\\n * @notice Withdraw a supported asset and burn OTokens.\\n * @param _amount Amount of OTokens to burn\\n * @param _minimumUnitAmount Minimum stablecoin units to receive in return\\n */\\n function _redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n internal\\n virtual\\n {\\n // Calculate redemption outputs\\n uint256[] memory outputs = _calculateRedeemOutputs(_amount);\\n\\n emit Redeem(msg.sender, _amount);\\n\\n // Send outputs\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n if (outputs[i] == 0) continue;\\n\\n address assetAddr = allAssets[i];\\n\\n if (IERC20(assetAddr).balanceOf(address(this)) >= outputs[i]) {\\n // Use Vault funds first if sufficient\\n IERC20(assetAddr).safeTransfer(msg.sender, outputs[i]);\\n } else {\\n address strategyAddr = assetDefaultStrategies[assetAddr];\\n if (strategyAddr != address(0)) {\\n // Nothing in Vault, but something in Strategy, send from there\\n IStrategy strategy = IStrategy(strategyAddr);\\n strategy.withdraw(msg.sender, assetAddr, outputs[i]);\\n } else {\\n // Cant find funds anywhere\\n revert(\\\"Liquidity error\\\");\\n }\\n }\\n }\\n\\n if (_minimumUnitAmount > 0) {\\n uint256 unitTotal = 0;\\n for (uint256 i = 0; i < outputs.length; ++i) {\\n unitTotal += _toUnits(outputs[i], allAssets[i]);\\n }\\n require(\\n unitTotal >= _minimumUnitAmount,\\n \\\"Redeem amount lower than minimum\\\"\\n );\\n }\\n\\n oUSD.burn(msg.sender, _amount);\\n\\n _postRedeem(_amount);\\n }\\n\\n function _postRedeem(uint256 _amount) internal {\\n // Until we can prove that we won't affect the prices of our assets\\n // by withdrawing them, this should be here.\\n // It's possible that a strategy was off on its asset total, perhaps\\n // a reward token sold for more or for less than anticipated.\\n uint256 totalUnits = 0;\\n if (_amount >= rebaseThreshold && !rebasePaused) {\\n totalUnits = _rebase();\\n } else {\\n totalUnits = _totalValue();\\n }\\n\\n // Check that the OTokens are backed by enough assets\\n if (maxSupplyDiff > 0) {\\n // If there are more outstanding withdrawal requests than assets in the vault and strategies\\n // then the available assets will be negative and totalUnits will be rounded up to zero.\\n // As we don't know the exact shortfall amount, we will reject all redeem and withdrawals\\n require(totalUnits > 0, \\\"Too many outstanding requests\\\");\\n\\n // Allow a max difference of maxSupplyDiff% between\\n // backing assets value and OUSD total supply\\n uint256 diff = oUSD.totalSupply().divPrecisely(totalUnits);\\n require(\\n (diff > 1e18 ? diff - 1e18 : 1e18 - diff) <= maxSupplyDiff,\\n \\\"Backing supply liquidity error\\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Burn OTokens for Metapool Strategy\\n * @param _amount Amount of OUSD to burn\\n *\\n * @dev Notice: can't use `nonReentrant` modifier since the `redeem` function could\\n * require withdrawal on `ConvexOUSDMetaStrategy` and that one can call `burnForStrategy`\\n * while the execution of the `redeem` has not yet completed -> causing a `nonReentrant` collision.\\n *\\n * Also important to understand is that this is a limitation imposed by the test suite.\\n * Production / mainnet contracts should never be configured in a way where mint/redeem functions\\n * that are moving funds between the Vault and end user wallets can influence strategies\\n * utilizing this function.\\n */\\n function burnForStrategy(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n onlyOusdMetaStrategy\\n {\\n require(_amount < MAX_INT, \\\"Amount too high\\\");\\n\\n emit Redeem(msg.sender, _amount);\\n\\n // safe to cast because of the require check at the beginning of the function\\n netOusdMintedForStrategy -= int256(_amount);\\n\\n require(\\n abs(netOusdMintedForStrategy) < netOusdMintForStrategyThreshold,\\n \\\"Attempting to burn too much OUSD.\\\"\\n );\\n\\n // Burn OTokens\\n oUSD.burn(msg.sender, _amount);\\n }\\n\\n /**\\n * @notice Allocate unallocated funds on Vault to strategies.\\n **/\\n function allocate() external virtual whenNotCapitalPaused nonReentrant {\\n _allocate();\\n }\\n\\n /**\\n * @dev Allocate unallocated funds on Vault to strategies.\\n **/\\n function _allocate() internal virtual {\\n uint256 vaultValue = _totalValueInVault();\\n // Nothing in vault to allocate\\n if (vaultValue == 0) return;\\n uint256 strategiesValue = _totalValueInStrategies();\\n // We have a method that does the same as this, gas optimisation\\n uint256 calculatedTotalValue = vaultValue + strategiesValue;\\n\\n // We want to maintain a buffer on the Vault so calculate a percentage\\n // modifier to multiply each amount being allocated by to enforce the\\n // vault buffer\\n uint256 vaultBufferModifier;\\n if (strategiesValue == 0) {\\n // Nothing in Strategies, allocate 100% minus the vault buffer to\\n // strategies\\n vaultBufferModifier = uint256(1e18) - vaultBuffer;\\n } else {\\n vaultBufferModifier =\\n (vaultBuffer * calculatedTotalValue) /\\n vaultValue;\\n if (1e18 > vaultBufferModifier) {\\n // E.g. 1e18 - (1e17 * 10e18)/5e18 = 8e17\\n // (5e18 * 8e17) / 1e18 = 4e18 allocated from Vault\\n vaultBufferModifier = uint256(1e18) - vaultBufferModifier;\\n } else {\\n // We need to let the buffer fill\\n return;\\n }\\n }\\n if (vaultBufferModifier == 0) return;\\n\\n // Iterate over all assets in the Vault and allocate to the appropriate\\n // strategy\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n IERC20 asset = IERC20(allAssets[i]);\\n uint256 assetBalance = asset.balanceOf(address(this));\\n // No balance, nothing to do here\\n if (assetBalance == 0) continue;\\n\\n // Multiply the balance by the vault buffer modifier and truncate\\n // to the scale of the asset decimals\\n uint256 allocateAmount = assetBalance.mulTruncate(\\n vaultBufferModifier\\n );\\n\\n address depositStrategyAddr = assetDefaultStrategies[\\n address(asset)\\n ];\\n\\n if (depositStrategyAddr != address(0) && allocateAmount > 0) {\\n IStrategy strategy = IStrategy(depositStrategyAddr);\\n // Transfer asset to Strategy and call deposit method to\\n // mint or take required action\\n asset.safeTransfer(address(strategy), allocateAmount);\\n strategy.deposit(address(asset), allocateAmount);\\n emit AssetAllocated(\\n address(asset),\\n depositStrategyAddr,\\n allocateAmount\\n );\\n }\\n }\\n }\\n\\n /**\\n * @notice Calculate the total value of assets held by the Vault and all\\n * strategies and update the supply of OTokens.\\n */\\n function rebase() external virtual nonReentrant {\\n _rebase();\\n }\\n\\n /**\\n * @dev Calculate the total value of assets held by the Vault and all\\n * strategies and update the supply of OTokens, optionally sending a\\n * portion of the yield to the trustee.\\n * @return totalUnits Total balance of Vault in units\\n */\\n function _rebase() internal whenNotRebasePaused returns (uint256) {\\n uint256 ousdSupply = oUSD.totalSupply();\\n uint256 vaultValue = _totalValue();\\n if (ousdSupply == 0) {\\n return vaultValue;\\n }\\n\\n // Yield fee collection\\n address _trusteeAddress = trusteeAddress; // gas savings\\n if (_trusteeAddress != address(0) && (vaultValue > ousdSupply)) {\\n uint256 yield = vaultValue - ousdSupply;\\n uint256 fee = yield.mulTruncateScale(trusteeFeeBps, 1e4);\\n require(yield > fee, \\\"Fee must not be greater than yield\\\");\\n if (fee > 0) {\\n oUSD.mint(_trusteeAddress, fee);\\n }\\n emit YieldDistribution(_trusteeAddress, yield, fee);\\n }\\n\\n // Only ratchet OToken supply upwards\\n ousdSupply = oUSD.totalSupply(); // Final check should use latest value\\n if (vaultValue > ousdSupply) {\\n oUSD.changeSupply(vaultValue);\\n }\\n return vaultValue;\\n }\\n\\n /**\\n * @notice Determine the total value of assets held by the vault and its\\n * strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function totalValue() external view virtual returns (uint256 value) {\\n value = _totalValue();\\n }\\n\\n /**\\n * @dev Internal Calculate the total value of the assets held by the\\n * vault and its strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValue() internal view virtual returns (uint256 value) {\\n return _totalValueInVault() + _totalValueInStrategies();\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held in Vault.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInVault()\\n internal\\n view\\n virtual\\n returns (uint256 value)\\n {\\n uint256 assetCount = allAssets.length;\\n for (uint256 y; y < assetCount; ++y) {\\n address assetAddr = allAssets[y];\\n uint256 balance = IERC20(assetAddr).balanceOf(address(this));\\n if (balance > 0) {\\n value += _toUnits(balance, assetAddr);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held in Strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInStrategies() internal view returns (uint256 value) {\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n value = value + _totalValueInStrategy(allStrategies[i]);\\n }\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held by strategy.\\n * @param _strategyAddr Address of the strategy\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInStrategy(address _strategyAddr)\\n internal\\n view\\n returns (uint256 value)\\n {\\n IStrategy strategy = IStrategy(_strategyAddr);\\n uint256 assetCount = allAssets.length;\\n for (uint256 y; y < assetCount; ++y) {\\n address assetAddr = allAssets[y];\\n if (strategy.supportsAsset(assetAddr)) {\\n uint256 balance = strategy.checkBalance(assetAddr);\\n if (balance > 0) {\\n value += _toUnits(balance, assetAddr);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @notice Get the balance of an asset held in Vault and all strategies.\\n * @param _asset Address of asset\\n * @return uint256 Balance of asset in decimals of asset\\n */\\n function checkBalance(address _asset) external view returns (uint256) {\\n return _checkBalance(_asset);\\n }\\n\\n /**\\n * @notice Get the balance of an asset held in Vault and all strategies.\\n * @param _asset Address of asset\\n * @return balance Balance of asset in decimals of asset\\n */\\n function _checkBalance(address _asset)\\n internal\\n view\\n virtual\\n returns (uint256 balance)\\n {\\n IERC20 asset = IERC20(_asset);\\n balance = asset.balanceOf(address(this));\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n IStrategy strategy = IStrategy(allStrategies[i]);\\n if (strategy.supportsAsset(_asset)) {\\n balance = balance + strategy.checkBalance(_asset);\\n }\\n }\\n }\\n\\n /**\\n * @notice Calculate the outputs for a redeem function, i.e. the mix of\\n * coins that will be returned\\n */\\n function calculateRedeemOutputs(uint256 _amount)\\n external\\n view\\n returns (uint256[] memory)\\n {\\n return _calculateRedeemOutputs(_amount);\\n }\\n\\n /**\\n * @dev Calculate the outputs for a redeem function, i.e. the mix of\\n * coins that will be returned.\\n * @return outputs Array of amounts respective to the supported assets\\n */\\n function _calculateRedeemOutputs(uint256 _amount)\\n internal\\n view\\n virtual\\n returns (uint256[] memory outputs)\\n {\\n // We always give out coins in proportion to how many we have,\\n // Now if all coins were the same value, this math would easy,\\n // just take the percentage of each coin, and multiply by the\\n // value to be given out. But if coins are worth more than $1,\\n // then we would end up handing out too many coins. We need to\\n // adjust by the total value of coins.\\n //\\n // To do this, we total up the value of our coins, by their\\n // percentages. Then divide what we would otherwise give out by\\n // this number.\\n //\\n // Let say we have 100 DAI at $1.06 and 200 USDT at $1.00.\\n // So for every 1 DAI we give out, we'll be handing out 2 USDT\\n // Our total output ratio is: 33% * 1.06 + 66% * 1.00 = 1.02\\n //\\n // So when calculating the output, we take the percentage of\\n // each coin, times the desired output value, divided by the\\n // totalOutputRatio.\\n //\\n // For example, withdrawing: 30 OUSD:\\n // DAI 33% * 30 / 1.02 = 9.80 DAI\\n // USDT = 66 % * 30 / 1.02 = 19.60 USDT\\n //\\n // Checking these numbers:\\n // 9.80 DAI * 1.06 = $10.40\\n // 19.60 USDT * 1.00 = $19.60\\n //\\n // And so the user gets $10.40 + $19.60 = $30 worth of value.\\n\\n uint256 assetCount = allAssets.length;\\n uint256[] memory assetUnits = new uint256[](assetCount);\\n uint256[] memory assetBalances = new uint256[](assetCount);\\n outputs = new uint256[](assetCount);\\n\\n // Calculate redeem fee\\n if (redeemFeeBps > 0) {\\n uint256 redeemFee = _amount.mulTruncateScale(redeemFeeBps, 1e4);\\n _amount = _amount - redeemFee;\\n }\\n\\n // Calculate assets balances and decimals once,\\n // for a large gas savings.\\n uint256 totalUnits = 0;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n address assetAddr = allAssets[i];\\n uint256 balance = _checkBalance(assetAddr);\\n assetBalances[i] = balance;\\n assetUnits[i] = _toUnits(balance, assetAddr);\\n totalUnits = totalUnits + assetUnits[i];\\n }\\n // Calculate totalOutputRatio\\n uint256 totalOutputRatio = 0;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n uint256 unitPrice = _toUnitPrice(allAssets[i], false);\\n uint256 ratio = (assetUnits[i] * unitPrice) / totalUnits;\\n totalOutputRatio = totalOutputRatio + ratio;\\n }\\n // Calculate final outputs\\n uint256 factor = _amount.divPrecisely(totalOutputRatio);\\n for (uint256 i = 0; i < assetCount; ++i) {\\n outputs[i] = (assetBalances[i] * factor) / totalUnits;\\n }\\n }\\n\\n /***************************************\\n Pricing\\n ****************************************/\\n\\n /**\\n * @notice Returns the total price in 18 digit units for a given asset.\\n * Never goes above 1, since that is how we price mints.\\n * @param asset address of the asset\\n * @return price uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\\n */\\n function priceUnitMint(address asset)\\n external\\n view\\n returns (uint256 price)\\n {\\n /* need to supply 1 asset unit in asset's decimals and can not just hard-code\\n * to 1e18 and ignore calling `_toUnits` since we need to consider assets\\n * with the exchange rate\\n */\\n uint256 units = _toUnits(\\n uint256(1e18).scaleBy(_getDecimals(asset), 18),\\n asset\\n );\\n price = (_toUnitPrice(asset, true) * units) / 1e18;\\n }\\n\\n /**\\n * @notice Returns the total price in 18 digit unit for a given asset.\\n * Never goes below 1, since that is how we price redeems\\n * @param asset Address of the asset\\n * @return price uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\\n */\\n function priceUnitRedeem(address asset)\\n external\\n view\\n returns (uint256 price)\\n {\\n /* need to supply 1 asset unit in asset's decimals and can not just hard-code\\n * to 1e18 and ignore calling `_toUnits` since we need to consider assets\\n * with the exchange rate\\n */\\n uint256 units = _toUnits(\\n uint256(1e18).scaleBy(_getDecimals(asset), 18),\\n asset\\n );\\n price = (_toUnitPrice(asset, false) * units) / 1e18;\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n /**\\n * @dev Convert a quantity of a token into 1e18 fixed decimal \\\"units\\\"\\n * in the underlying base (USD/ETH) used by the vault.\\n * Price is not taken into account, only quantity.\\n *\\n * Examples of this conversion:\\n *\\n * - 1e18 DAI becomes 1e18 units (same decimals)\\n * - 1e6 USDC becomes 1e18 units (decimal conversion)\\n * - 1e18 rETH becomes 1.2e18 units (exchange rate conversion)\\n *\\n * @param _raw Quantity of asset\\n * @param _asset Core Asset address\\n * @return value 1e18 normalized quantity of units\\n */\\n function _toUnits(uint256 _raw, address _asset)\\n internal\\n view\\n returns (uint256)\\n {\\n UnitConversion conversion = assets[_asset].unitConversion;\\n if (conversion == UnitConversion.DECIMALS) {\\n return _raw.scaleBy(18, _getDecimals(_asset));\\n } else if (conversion == UnitConversion.GETEXCHANGERATE) {\\n uint256 exchangeRate = IGetExchangeRateToken(_asset)\\n .getExchangeRate();\\n return (_raw * exchangeRate) / 1e18;\\n } else {\\n revert(\\\"Unsupported conversion type\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns asset's unit price accounting for different asset types\\n * and takes into account the context in which that price exists -\\n * - mint or redeem.\\n *\\n * Note: since we are returning the price of the unit and not the one of the\\n * asset (see comment above how 1 rETH exchanges for 1.2 units) we need\\n * to make the Oracle price adjustment as well since we are pricing the\\n * units and not the assets.\\n *\\n * The price also snaps to a \\\"full unit price\\\" in case a mint or redeem\\n * action would be unfavourable to the protocol.\\n *\\n */\\n function _toUnitPrice(address _asset, bool isMint)\\n internal\\n view\\n returns (uint256 price)\\n {\\n UnitConversion conversion = assets[_asset].unitConversion;\\n price = IOracle(priceProvider).price(_asset);\\n\\n if (conversion == UnitConversion.GETEXCHANGERATE) {\\n uint256 exchangeRate = IGetExchangeRateToken(_asset)\\n .getExchangeRate();\\n price = (price * 1e18) / exchangeRate;\\n } else if (conversion != UnitConversion.DECIMALS) {\\n revert(\\\"Unsupported conversion type\\\");\\n }\\n\\n /* At this stage the price is already adjusted to the unit\\n * so the price checks are agnostic to underlying asset being\\n * pegged to a USD or to an ETH or having a custom exchange rate.\\n */\\n require(price <= MAX_UNIT_PRICE_DRIFT, \\\"Vault: Price exceeds max\\\");\\n require(price >= MIN_UNIT_PRICE_DRIFT, \\\"Vault: Price under min\\\");\\n\\n if (isMint) {\\n /* Never price a normalized unit price for more than one\\n * unit of OETH/OUSD when minting.\\n */\\n if (price > 1e18) {\\n price = 1e18;\\n }\\n require(price >= MINT_MINIMUM_UNIT_PRICE, \\\"Asset price below peg\\\");\\n } else {\\n /* Never give out more than 1 normalized unit amount of assets\\n * for one unit of OETH/OUSD when redeeming.\\n */\\n if (price < 1e18) {\\n price = 1e18;\\n }\\n }\\n }\\n\\n /**\\n * @dev Get the number of decimals of a token asset\\n * @param _asset Address of the asset\\n * @return decimals number of decimals\\n */\\n function _getDecimals(address _asset)\\n internal\\n view\\n returns (uint256 decimals)\\n {\\n decimals = assets[_asset].decimals;\\n require(decimals > 0, \\\"Decimals not cached\\\");\\n }\\n\\n /**\\n * @notice Return the number of assets supported by the Vault.\\n */\\n function getAssetCount() public view returns (uint256) {\\n return allAssets.length;\\n }\\n\\n /**\\n * @notice Gets the vault configuration of a supported asset.\\n * @param _asset Address of the token asset\\n */\\n function getAssetConfig(address _asset)\\n public\\n view\\n returns (Asset memory config)\\n {\\n config = assets[_asset];\\n }\\n\\n /**\\n * @notice Return all vault asset addresses in order\\n */\\n function getAllAssets() external view returns (address[] memory) {\\n return allAssets;\\n }\\n\\n /**\\n * @notice Return the number of strategies active on the Vault.\\n */\\n function getStrategyCount() external view returns (uint256) {\\n return allStrategies.length;\\n }\\n\\n /**\\n * @notice Return the array of all strategies\\n */\\n function getAllStrategies() external view returns (address[] memory) {\\n return allStrategies;\\n }\\n\\n /**\\n * @notice Returns whether the vault supports the asset\\n * @param _asset address of the asset\\n * @return true if supported\\n */\\n function isSupportedAsset(address _asset) external view returns (bool) {\\n return assets[_asset].isSupported;\\n }\\n\\n function ADMIN_IMPLEMENTATION() external view returns (address adminImpl) {\\n bytes32 slot = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n adminImpl := sload(slot)\\n }\\n }\\n\\n /**\\n * @dev Falldown to the admin implementation\\n * @notice This is a catch all for all functions not declared in core\\n */\\n // solhint-disable-next-line no-complex-fallback\\n fallback() external {\\n bytes32 slot = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(\\n gas(),\\n sload(slot),\\n 0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n function abs(int256 x) private pure returns (uint256) {\\n require(x < int256(MAX_INT), \\\"Amount too high\\\");\\n return x >= 0 ? uint256(x) : uint256(-x);\\n }\\n}\\n\",\"keccak256\":\"0xc66694f32775472e70331a4a797ea0ed41ba89888d21292d7eb32c5145a9871f\",\"license\":\"MIT\"},\"contracts/vault/VaultInitializer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultInitializer contract\\n * @notice The Vault contract initializes the vault.\\n * @author Origin Protocol Inc\\n */\\n\\nimport \\\"./VaultStorage.sol\\\";\\n\\ncontract VaultInitializer is VaultStorage {\\n function initialize(address _priceProvider, address _oToken)\\n external\\n onlyGovernor\\n initializer\\n {\\n require(_priceProvider != address(0), \\\"PriceProvider address is zero\\\");\\n require(_oToken != address(0), \\\"oToken address is zero\\\");\\n\\n oUSD = OUSD(_oToken);\\n\\n priceProvider = _priceProvider;\\n\\n rebasePaused = false;\\n capitalPaused = true;\\n\\n // Initial redeem fee of 0 basis points\\n redeemFeeBps = 0;\\n // Initial Vault buffer of 0%\\n vaultBuffer = 0;\\n // Initial allocate threshold of 25,000 OUSD\\n autoAllocateThreshold = 25000e18;\\n // Threshold for rebasing\\n rebaseThreshold = 1000e18;\\n // Initialize all strategies\\n allStrategies = new address[](0);\\n }\\n}\\n\",\"keccak256\":\"0x5b9676307bbabe14b5278f00ec7edc557b84debbfa1391902d78100cb9cd467e\",\"license\":\"MIT\"},\"contracts/vault/VaultStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultStorage contract\\n * @notice The VaultStorage contract defines the storage for the Vault contracts\\n * @author Origin Protocol Inc\\n */\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { OUSD } from \\\"../token/OUSD.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport \\\"../utils/Helpers.sol\\\";\\n\\ncontract VaultStorage is Initializable, Governable {\\n using SafeERC20 for IERC20;\\n\\n event AssetSupported(address _asset);\\n event AssetRemoved(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event OusdMetaStrategyUpdated(address _ousdMetaStrategy);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event NetOusdMintForStrategyThresholdChanged(uint256 _threshold);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n event WithdrawalClaimDelayUpdated(uint256 _newDelay);\\n\\n // Assets supported by the Vault, i.e. Stablecoins\\n enum UnitConversion {\\n DECIMALS,\\n GETEXCHANGERATE\\n }\\n // Changed to fit into a single storage slot so the decimals needs to be recached\\n struct Asset {\\n // Note: OETHVaultCore doesn't use `isSupported` when minting,\\n // redeeming or checking balance of assets.\\n bool isSupported;\\n UnitConversion unitConversion;\\n uint8 decimals;\\n // Max allowed slippage from the Oracle price when swapping collateral assets in basis points.\\n // For example 40 == 0.4% slippage\\n uint16 allowedOracleSlippageBps;\\n }\\n\\n /// @dev mapping of supported vault assets to their configuration\\n // slither-disable-next-line uninitialized-state\\n mapping(address => Asset) internal assets;\\n /// @dev list of all assets supported by the vault.\\n // slither-disable-next-line uninitialized-state\\n address[] internal allAssets;\\n\\n // Strategies approved for use by the Vault\\n struct Strategy {\\n bool isSupported;\\n uint256 _deprecated; // Deprecated storage slot\\n }\\n /// @dev mapping of strategy contracts to their configuration\\n // slither-disable-next-line uninitialized-state\\n mapping(address => Strategy) public strategies;\\n /// @dev list of all vault strategies\\n address[] internal allStrategies;\\n\\n /// @notice Address of the Oracle price provider contract\\n // slither-disable-next-line uninitialized-state\\n address public priceProvider;\\n /// @notice pause rebasing if true\\n bool public rebasePaused = false;\\n /// @notice pause operations that change the OToken supply.\\n /// eg mint, redeem, allocate, mint/burn for strategy\\n bool public capitalPaused = true;\\n /// @notice Redemption fee in basis points. eg 50 = 0.5%\\n uint256 public redeemFeeBps;\\n /// @notice Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\\n uint256 public vaultBuffer;\\n /// @notice OToken mints over this amount automatically allocate funds. 18 decimals.\\n uint256 public autoAllocateThreshold;\\n /// @notice OToken mints over this amount automatically rebase. 18 decimals.\\n uint256 public rebaseThreshold;\\n\\n /// @dev Address of the OToken token. eg OUSD or OETH.\\n // slither-disable-next-line uninitialized-state\\n OUSD public oUSD;\\n\\n /// @dev Storage slot for the address of the VaultAdmin contract that is delegated to\\n // keccak256(\\\"OUSD.vault.governor.admin.impl\\\");\\n bytes32 public constant adminImplPosition =\\n 0xa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd9;\\n\\n /// @dev Address of the contract responsible for post rebase syncs with AMMs\\n // slither-disable-next-line constable-states\\n address private _deprecated_rebaseHooksAddr = address(0);\\n\\n /// @dev Deprecated: Address of Uniswap\\n // slither-disable-next-line constable-states\\n address private _deprecated_uniswapAddr = address(0);\\n\\n /// @notice Address of the Strategist\\n address public strategistAddr = address(0);\\n\\n /// @notice Mapping of asset address to the Strategy that they should automatically\\n // be allocated to\\n // slither-disable-next-line uninitialized-state\\n mapping(address => address) public assetDefaultStrategies;\\n\\n /// @notice Max difference between total supply and total value of assets. 18 decimals.\\n // slither-disable-next-line uninitialized-state\\n uint256 public maxSupplyDiff;\\n\\n /// @notice Trustee contract that can collect a percentage of yield\\n address public trusteeAddress;\\n\\n /// @notice Amount of yield collected in basis points. eg 2000 = 20%\\n uint256 public trusteeFeeBps;\\n\\n /// @dev Deprecated: Tokens that should be swapped for stablecoins\\n address[] private _deprecated_swapTokens;\\n\\n uint256 constant MINT_MINIMUM_UNIT_PRICE = 0.998e18;\\n\\n /// @notice Metapool strategy that is allowed to mint/burn OTokens without changing collateral\\n\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n address public ousdMetaStrategy;\\n\\n /// @notice How much OTokens are currently minted by the strategy\\n // slither-disable-next-line uninitialized-state\\n int256 public netOusdMintedForStrategy;\\n\\n /// @notice How much net total OTokens are allowed to be minted by all strategies\\n // slither-disable-next-line uninitialized-state\\n uint256 public netOusdMintForStrategyThreshold;\\n\\n // slither-disable-end constable-states\\n\\n uint256 constant MIN_UNIT_PRICE_DRIFT = 0.7e18;\\n uint256 constant MAX_UNIT_PRICE_DRIFT = 1.3e18;\\n\\n /// @notice Collateral swap configuration.\\n /// @dev is packed into a single storage slot to save gas.\\n struct SwapConfig {\\n // Contract that swaps the vault's collateral assets\\n address swapper;\\n // Max allowed percentage the total value can drop below the total supply in basis points.\\n // For example 100 == 1%\\n uint16 allowedUndervalueBps;\\n }\\n SwapConfig internal swapConfig = SwapConfig(address(0), 0);\\n\\n // List of strategies that can mint oTokens directly\\n // Used in OETHBaseVaultCore\\n // slither-disable-next-line uninitialized-state\\n mapping(address => bool) public isMintWhitelistedStrategy;\\n\\n /// @notice Address of the Dripper contract that streams harvested rewards to the Vault\\n /// @dev The vault is proxied so needs to be set with setDripper against the proxy contract.\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n address public dripper;\\n // slither-disable-end constable-states\\n\\n /// Withdrawal Queue Storage /////\\n\\n struct WithdrawalQueueMetadata {\\n // cumulative total of all withdrawal requests included the ones that have already been claimed\\n uint128 queued;\\n // cumulative total of all the requests that can be claimed including the ones that have already been claimed\\n uint128 claimable;\\n // total of all the requests that have been claimed\\n uint128 claimed;\\n // index of the next withdrawal request starting at 0\\n uint128 nextWithdrawalIndex;\\n }\\n\\n /// @notice Global metadata for the withdrawal queue including:\\n /// queued - cumulative total of all withdrawal requests included the ones that have already been claimed\\n /// claimable - cumulative total of all the requests that can be claimed including the ones already claimed\\n /// claimed - total of all the requests that have been claimed\\n /// nextWithdrawalIndex - index of the next withdrawal request starting at 0\\n // slither-disable-next-line uninitialized-state\\n WithdrawalQueueMetadata public withdrawalQueueMetadata;\\n\\n struct WithdrawalRequest {\\n address withdrawer;\\n bool claimed;\\n uint40 timestamp; // timestamp of the withdrawal request\\n // Amount of oTokens to redeem. eg OETH\\n uint128 amount;\\n // cumulative total of all withdrawal requests including this one.\\n // this request can be claimed when this queued amount is less than or equal to the queue's claimable amount.\\n uint128 queued;\\n }\\n\\n /// @notice Mapping of withdrawal request indices to the user withdrawal request data\\n mapping(uint256 => WithdrawalRequest) public withdrawalRequests;\\n\\n /// @notice Sets a minimum delay that is required to elapse between\\n /// requesting async withdrawals and claiming the request.\\n /// When set to 0 async withdrawals are disabled.\\n // slither-disable-start constable-states\\n // slither-disable-next-line uninitialized-state\\n uint256 public withdrawalClaimDelay;\\n // slither-disable-end constable-states\\n\\n // For future use\\n uint256[44] private __gap;\\n\\n /**\\n * @notice set the implementation for the admin, this needs to be in a base class else we cannot set it\\n * @param newImpl address of the implementation\\n */\\n function setAdminImpl(address newImpl) external onlyGovernor {\\n require(\\n Address.isContract(newImpl),\\n \\\"new implementation is not a contract\\\"\\n );\\n bytes32 position = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newImpl)\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc96eb2e6b540ccdbf7667dbee2ca78053e0e27d865953608a21f25581ca8e1e8\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6037805461ffff60a01b1916600160a81b179055603d80546001600160a01b0319908116909155603e805482169055603f8054909116905560e0604052600060a081905260c052604880546001600160b01b031916905534801561006257600080fd5b506040516140c53803806140c583398101604081905261008191610092565b6001600160a01b03166080526100c2565b6000602082840312156100a457600080fd5b81516001600160a01b03811681146100bb57600080fd5b9392505050565b608051613f7f610146600039600081816104c401528181610a0e01528181610a7801528181610ebf01528181611a1d01528181611ae9015281816122d80152818161298401528181612a8b01528181612ccf01528181612dda01528181612edd01528181612f2801528181612f900152818161331f01526137350152613f7f6000f3fe608060405234801561001057600080fd5b50600436106103425760003560e01c80636217f3ea116101b8578063abaa991611610104578063d38bfff4116100a2578063e6cc54321161007c578063e6cc543214610833578063ef08edc214610847578063f84444361461085c578063fc0cfeee1461086f57610342565b8063d38bfff41461080f578063d4c3eea014610822578063e45cc9f01461082a57610342565b8063b9b17f9f116100de578063b9b17f9f146107e2578063c3b28864146107ea578063c7af3352146107f2578063cc2fe94b146107fa57610342565b8063abaa9916146107bf578063af14052c146107c7578063b888879e146107cf57610342565b8063937b2581116101715780639fa1826e1161014b5780639fa1826e14610772578063a0aead4d1461077b578063a403e4d514610783578063ab80dafb146107ac57610342565b8063937b2581146106765780639be918e61461071e5780639ee679e81461074a57610342565b80636217f3ea146105fe57806367bd7ba3146106115780636ec3ab67146106315780637a2202f3146106515780637cbc23731461065a5780638e510b521461066d57610342565b80634530820a1161029257806354c6d858116102305780635b60f9fc1161020a5780635b60f9fc146105bd5780635d36b190146105d05780635f515226146105d8578063603ea03b146105eb57610342565b806354c6d8581461058e578063570d8e1d146105975780635802a172146105aa57610342565b806348e30f541161026c57806348e30f541461053d57806349c1d54d1461055e57806352d38e5d1461057157806353ca9f241461057a57610342565b80634530820a146104ee57806345e4213b14610521578063485cc9551461052a57610342565b80632acada4d116102ff57806339ebf823116102d957806339ebf823146104685780633b8fe28d146104ac5780633fc8cef3146104bf57806344c54707146104e657610342565b80632acada4d146103ec57806331e19cfa14610401578063362bd1a31461040957610342565b806309f6442c146103785780630c340a2414610394578063156e29f6146103b457806318ce56bd146103c75780631edfe3da146103da578063207134b0146103e3575b600080516020613f0a833981519152366000803760008036600084545af43d6000803e808015610371573d6000f35b3d6000fd5b005b61038160385481565b6040519081526020015b60405180910390f35b61039c610882565b6040516001600160a01b03909116815260200161038b565b6103766103c236600461396d565b61089f565b60455461039c906001600160a01b031681565b61038160395481565b61038160435481565b6103f461091d565b60405161038b91906139a0565b603654610381565b604b54604c54610435916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b039586168152938516602085015291841691830191909152909116606082015260800161038b565b6104956104763660046139ec565b6035602052600090815260409020805460019091015460ff9091169082565b60408051921515835260208301919091520161038b565b6103816104ba3660046139ec565b61097f565b61039c7f000000000000000000000000000000000000000000000000000000000000000081565b6103766109da565b6105116104fc3660046139ec565b60496020526000908152604090205460ff1681565b604051901515815260200161038b565b610381604e5481565b610376610538366004613a07565b610b1a565b61055061054b366004613a3a565b610d1c565b60405161038b929190613aed565b60425461039c906001600160a01b031681565b610381603b5481565b60375461051190600160a01b900460ff1681565b610381607b5481565b603f5461039c906001600160a01b031681565b603c5461039c906001600160a01b031681565b6103816105cb3660046139ec565b610efc565b610376610f25565b6103816105e63660046139ec565b610fcb565b604a5461039c906001600160a01b031681565b61037661060c366004613b0f565b610fdc565b61062461061f366004613b0f565b611160565b60405161038b9190613b28565b61064461063f3660046139ec565b61116b565b60405161038b9190613b51565b61038160475481565b610376610668366004613ba7565b611211565b61038160415481565b6106d7610684366004613b0f565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a00161038b565b61051161072c3660046139ec565b6001600160a01b031660009081526033602052604090205460ff1690565b61075d610758366004613b0f565b611284565b6040805192835260208301919091520161038b565b610381603a5481565b603454610381565b61039c6107913660046139ec565b6040602081905260009182529020546001600160a01b031681565b6103766107ba366004613b0f565b611541565b610376611690565b610376611708565b60375461039c906001600160a01b031681565b61037661174e565b6103f46117be565b61051161181e565b600080516020613f0a8339815191525461039c565b61037661081d3660046139ec565b61184f565b6103816118f3565b61038160465481565b60375461051190600160a81b900460ff1681565b610381600080516020613f0a83398151915281565b61038161086a366004613b0f565b6118fd565b61037661087d3660046139ec565b611a57565b600061089a600080516020613f2a8339815191525490565b905090565b603754600160a81b900460ff16156108d25760405162461bcd60e51b81526004016108c990613bc9565b60405180910390fd5b600080516020613eea833981519152805460011981016109045760405162461bcd60e51b81526004016108c990613bf1565b60028255610913858585611ae7565b5060019055505050565b6060603480548060200260200160405190810160405280929190818152602001828054801561097557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610957575b5050505050905090565b6000806109a86109a261099185611d68565b670de0b6b3a7640000906012611dd2565b84611e34565b9050670de0b6b3a7640000816109bf856001611f7f565b6109c99190613c2f565b6109d39190613c46565b9392505050565b6109e261181e565b6109fe5760405162461bcd60e51b81526004016108c990613c68565b60345460005b81811015610a75577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110610a4957610a49613c9f565b6000918252602090912001546001600160a01b031603610a6d57607b819055610a75565b600101610a04565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166034607b5481548110610ab557610ab5613c9f565b6000918252602090912001546001600160a01b031614610b175760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964205745544820417373657420496e646578000000000000000060448201526064016108c9565b50565b610b2261181e565b610b3e5760405162461bcd60e51b81526004016108c990613c68565b600054610100900460ff1680610b57575060005460ff16155b610bba5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108c9565b600054610100900460ff16158015610bdc576000805461ffff19166101011790555b6001600160a01b038316610c325760405162461bcd60e51b815260206004820152601d60248201527f507269636550726f76696465722061646472657373206973207a65726f00000060448201526064016108c9565b6001600160a01b038216610c815760405162461bcd60e51b81526020600482015260166024820152756f546f6b656e2061646472657373206973207a65726f60501b60448201526064016108c9565b603c80546001600160a01b038481166001600160a01b031990921691909117909155603780546001600160b01b03191691851691909117600160a81b17905560006038819055603981905569054b40b1f852bda00000603a55683635c9adc5dea00000603b556040805191825260208201908190529051610d04916036916138e5565b508015610d17576000805461ff00191690555b505050565b603754606090600090600160a81b900460ff1615610d4c5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea83398151915280546001198101610d7e5760405162461bcd60e51b81526004016108c990613bf1565b60028255604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610dd257600080fd5b505af1158015610de6573d6000803e3d6000fd5b50505050610df2612252565b508467ffffffffffffffff811115610e0c57610e0c613cb5565b604051908082528060200260200182016040528015610e35578160200160208202803683370190505b50935060005b85811015610eb157610e64878783818110610e5857610e58613c9f565b9050602002013561242e565b858281518110610e7657610e76613c9f565b602002602001018181525050848181518110610e9457610e94613c9f565b602002602001015184610ea79190613ccb565b9350600101610e3b565b50610ee66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385612724565b610eef8361277a565b6001825550509250929050565b600080610f0e6109a261099185611d68565b9050670de0b6b3a7640000816109bf856000611f7f565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b031614610fc05760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016108c9565b610fc933612921565b565b6000610fd682612980565b92915050565b603754600160a81b900460ff16156110065760405162461bcd60e51b81526004016108c990613bc9565b3360009081526035602052604090205460ff1615156001146110615760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016108c9565b3360009081526049602052604090205460ff1615156001146110c05760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016108c9565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a633826040516110f1929190613cde565b60405180910390a1603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061112b9033908590600401613cde565b600060405180830381600087803b15801561114557600080fd5b505af1158015611159573d6000803e3d6000fd5b5050505050565b6060610fd682612a53565b604080516080808201835260008083526020808401829052838501829052606084018290526001600160a01b038616825260338152908490208451928301909452835460ff8082161515845293949293918401916101009091041660018111156111d7576111d7613b3b565b60018111156111e8576111e8613b3b565b8152905462010000810460ff1660208301526301000000900461ffff1660409091015292915050565b603754600160a81b900460ff161561123b5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea8339815191528054600119810161126d5760405162461bcd60e51b81526004016108c990613bf1565b6002825561127b8484612b94565b50600190555050565b6037546000908190600160a81b900460ff16156112b35760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea833981519152805460011981016112e55760405162461bcd60e51b81526004016108c990613bf1565b600282556000604e541161133b5760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016108c9565b604c54604b546001600160801b03600160801b9092048216955061136191879116613ccb565b9250611376611371856001613ccb565b612d63565b604c80546001600160801b03928316600160801b02921691909117905561139c83612d63565b604b80546001600160801b0319166001600160801b03929092169190911790556040805160a081018252338152600060208201524264ffffffffff1691810191909152606081016113ec87612d63565b6001600160801b0316815260200161140385612d63565b6001600160801b039081169091526000868152604d602090815260409182902084518154928601518685015164ffffffffff16600160a81b0264ffffffffff60a81b19911515600160a01b026001600160a81b03199095166001600160a01b0393841617949094171692909217815560608501516080909501518416600160801b029490931693909317600190920191909155603c549051632770a7eb60e21b8152911690639dc29fac906114be9033908990600401613cde565b600060405180830381600087803b1580156114d857600080fd5b505af11580156114ec573d6000803e3d6000fd5b505050506114f98561277a565b6040805186815260208101859052859133917f38e3d972947cfef94205163d483d6287ef27eb312e20cb8e0b13a49989db232e910160405180910390a3600182555050915091565b603754600160a81b900460ff161561156b5760405162461bcd60e51b81526004016108c990613bc9565b3360009081526035602052604090205460ff1615156001146115c65760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016108c9565b3360009081526049602052604090205460ff1615156001146116255760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016108c9565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853382604051611656929190613cde565b60405180910390a1603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061112b9033908590600401613cde565b603754600160a81b900460ff16156116ba5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea833981519152805460011981016116ec5760405162461bcd60e51b81526004016108c990613bf1565b600282556116f8612252565b50611701612dd0565b5060019055565b600080516020613eea8339815191528054600119810161173a5760405162461bcd60e51b81526004016108c990613bf1565b60028255611746612ff8565b505060019055565b604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561179e57600080fd5b505af11580156117b2573d6000803e3d6000fd5b50505050610b17612252565b60606036805480602002602001604051908101604052809291908181526020018280548015610975576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610957575050505050905090565b6000611836600080516020613f2a8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b61185761181e565b6118735760405162461bcd60e51b81526004016108c990613c68565b61189b817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166118bb600080516020613f2a8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b600061089a613318565b603754600090600160a81b900460ff161561192a5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea8339815191528054600119810161195c5760405162461bcd60e51b81526004016108c990613bf1565b60028255604b546000858152604d60205260409020600101546001600160801b03600160801b92839004811692909104161115611a0557604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119e357600080fd5b505af11580156119f7573d6000803e3d6000fd5b50505050611a03612252565b505b611a0e8461242e565b9250611a446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385612724565b611a4d8361277a565b5060019055919050565b611a5f61181e565b611a7b5760405162461bcd60e51b81526004016108c990613c68565b803b611ad55760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016108c9565b600080516020613f0a83398151915255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614611b685760405162461bcd60e51b815260206004820152601d60248201527f556e737570706f7274656420617373657420666f72206d696e74696e6700000060448201526064016108c9565b60008211611bb85760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016108c9565b80821015611c085760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420616d6f756e74206c6f776572207468616e206d696e696d756d000060448201526064016108c9565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853383604051611c39929190613cde565b60405180910390a1603754600160a01b900460ff16158015611c5d5750603b548210155b15611cd457604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611cb257600080fd5b505af1158015611cc6573d6000803e3d6000fd5b50505050611cd2612ff8565b505b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611d069033908690600401613cde565b600060405180830381600087803b158015611d2057600080fd5b505af1158015611d34573d6000803e3d6000fd5b50611d4e925050506001600160a01b038416333085613343565b611d56612252565b50603a548210610d1757610d17612dd0565b6001600160a01b03811660009081526033602052604090205462010000900460ff1680611dcd5760405162461bcd60e51b8152602060048201526013602482015272111958da5b585b1cc81b9bdd0818d858da1959606a1b60448201526064016108c9565b919050565b600081831115611e0257611dfb611de98385613cf7565b611df490600a613df1565b8590613381565b9350611e2c565b81831015611e2c57611e29611e178484613cf7565b611e2290600a613df1565b859061338d565b93505b509192915050565b6001600160a01b038116600090815260336020526040812054610100900460ff1681816001811115611e6857611e68613b3b565b03611e8b57611e836012611e7b85611d68565b869190611dd2565b915050610fd6565b6001816001811115611e9f57611e9f613b3b565b03611f30576000836001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ee4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f089190613dfd565b9050670de0b6b3a7640000611f1d8287613c2f565b611f279190613c46565b92505050610fd6565b60405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016108c9565b5092915050565b6001600160a01b038281166000818152603360205260408082205460375491516315d5220f60e31b81526004810194909452919361010090920460ff169291169063aea9107890602401602060405180830381865afa158015611fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200a9190613dfd565b9150600181600181111561202057612020613b3b565b036120b0576000846001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612065573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120899190613dfd565b90508061209e84670de0b6b3a7640000613c2f565b6120a89190613c46565b925050612111565b60008160018111156120c4576120c4613b3b565b146121115760405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016108c9565b67120a871cc00200008211156121695760405162461bcd60e51b815260206004820152601860248201527f5661756c743a2050726963652065786365656473206d6178000000000000000060448201526064016108c9565b6709b6e64a8ec600008210156121ba5760405162461bcd60e51b81526020600482015260166024820152752b30bab63a1d10283934b1b2903ab73232b91036b4b760511b60448201526064016108c9565b821561223157670de0b6b3a76400008211156121dc57670de0b6b3a764000091505b670dd99bb65dd7000082101561222c5760405162461bcd60e51b815260206004820152601560248201527441737365742070726963652062656c6f772070656760581b60448201526064016108c9565b611f78565b670de0b6b3a7640000821015611f785750670de0b6b3a76400009392505050565b60408051608081018252604b546001600160801b03808216808452600160801b92839004821660208501819052604c54808416968601969096529290940416606083015260009283916122a491613e16565b6001600160801b03169050806000036122c05760009250505090565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b9190613dfd565b90506000836040015184602001516123639190613e16565b6001600160801b0316905080821161238057600094505050505090565b600061238c8284613cf7565b905080841061239b578061239d565b835b955060008686602001516001600160801b03166123ba9190613ccb565b90506123c581612d63565b604b80546001600160801b03928316600160801b0292169190911790556040517fee79a0c43d3993055690b54e074b5153e8bae8d1a872b656dedb64aa8f4633339061241d9083908a90918252602082015260400190565b60405180910390a150505050505090565b600080604e54116124815760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016108c9565b6000828152604d6020908152604091829020825160a08101845281546001600160a01b038116825260ff600160a01b82041615158285015264ffffffffff600160a81b90910481168286019081526001909301546001600160801b03808216606080860191909152600160801b92839004821660808087019190915288519081018952604b548084168252849004831697810197909752604c54808316988801989098529190960490951694840194909452604e5491519093429261254892909116613ccb565b111561258c5760405162461bcd60e51b815260206004820152601360248201527210db185a5b4819195b185e481b9bdd081b595d606a1b60448201526064016108c9565b80602001516001600160801b031682608001516001600160801b031611156125f65760405162461bcd60e51b815260206004820152601760248201527f51756575652070656e64696e67206c697175696469747900000000000000000060448201526064016108c9565b81516001600160a01b0316331461263f5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103932b8bab2b9ba32b960991b60448201526064016108c9565b6020820151156126835760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016108c9565b6000848152604d602052604090819020805460ff60a01b1916600160a01b1790556060830151908201516126b79190613e35565b604c80546001600160801b0319166001600160801b03928316179055606083015160405191168152849033907f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d19060200160405180910390a350606001516001600160801b031692915050565b610d178363a9059cbb60e01b8484604051602401612743929190613cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613399565b6000603b5482101580156127985750603754600160a01b900460ff16155b156127ac576127a5612ff8565b90506127b7565b6127b4613318565b90505b6041541561291d576000811161280f5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d616e79206f75747374616e64696e6720726571756573747300000060448201526064016108c9565b600061289282603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288c9190613dfd565b9061346b565b9050604154670de0b6b3a764000082116128bd576128b882670de0b6b3a7640000613cf7565b6128cf565b6128cf670de0b6b3a764000083613cf7565b1115610d175760405162461bcd60e51b815260206004820152601e60248201527f4261636b696e6720737570706c79206c6971756964697479206572726f72000060448201526064016108c9565b5050565b6001600160a01b0381166129775760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016108c9565b610b1781613494565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146129c357506000919050565b6129cc826134fb565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301529293509190612a1c9084613ccb565b1015612a2b5750600092915050565b805160408201516001600160801b0391821691612a49911684613ccb565b6109d39190613cf7565b60385460609015612a8257603854600090612a72908490612710613695565b9050612a7e8184613cf7565b9250505b6000607b5490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110612ac657612ac6613c9f565b6000918252602090912001546001600160a01b031614612b285760405162461bcd60e51b815260206004820152601b60248201527f5745544820417373657420696e646578206e6f7420636163686564000000000060448201526064016108c9565b60345467ffffffffffffffff811115612b4357612b43613cb5565b604051908082528060200260200182016040528015612b6c578160200160208202803683370190505b50915082828281518110612b8257612b82613c9f565b60200260200101818152505050919050565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a63383604051612bc5929190613cde565b60405180910390a181600003612bd9575050565b603f546000906001600160a01b0316331480612bf85750612bf861181e565b612c2557612c0583612a53565b607b5481518110612c1857612c18613c9f565b6020026020010151612c27565b825b905081811015612c795760405162461bcd60e51b815260206004820181905260248201527f52656465656d20616d6f756e74206c6f776572207468616e206d696e696d756d60448201526064016108c9565b80612c826136b7565b1015612cc25760405162461bcd60e51b815260206004820152600f60248201526e2634b8bab4b234ba3c9032b93937b960891b60448201526064016108c9565b612cf66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612724565b603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90612d289033908790600401613cde565b600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b50505050610d178361277a565b60006001600160801b03821115612dcc5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016108c9565b5090565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166000908152604060208190529020541680612e135750565b6000612e1d6136b7565b905080600003612e2b575050565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e999190613dfd565b90506000612eb2603954836137c590919063ffffffff16565b9050808311612ec15750505050565b6000612ecd8285613cf7565b905084612f046001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284612724565b6040516311f9fbc960e21b81526001600160a01b038216906347e7ef2490612f52907f0000000000000000000000000000000000000000000000000000000000000000908690600401613cde565b600060405180830381600087803b158015612f6c57600080fd5b505af1158015612f80573d6000803e3d6000fd5b5050604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528a1660208201529081018590527f41b99659f6ba0803f444aff29e5bf6e26dd86a3219aff92119d69710a956ba8d9250606001905060405180910390a1505050505050565b603754600090600160a01b900460ff16156130475760405162461bcd60e51b815260206004820152600f60248201526e149958985cda5b99c81c185d5cd959608a1b60448201526064016108c9565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613091573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b59190613dfd565b905060006130c1613318565b9050816000036130d45791506133159050565b6042546001600160a01b031680158015906130ee57508282115b156132305760006130ff8484613cf7565b9050600061311c604354612710846136959092919063ffffffff16565b90508082116131785760405162461bcd60e51b815260206004820152602260248201527f466565206d757374206e6f742062652067726561746572207468616e207969656044820152611b1960f21b60648201526084016108c9565b80156131e357603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906131b09086908590600401613cde565b600060405180830381600087803b1580156131ca57600080fd5b505af11580156131de573d6000803e3d6000fd5b505050505b604080516001600160a01b0385168152602081018490529081018290527f09516ecf4a8a86e59780a9befc6dee948bc9e60a36e3be68d31ea817ee8d2c809060600160405180910390a150505b603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a79190613dfd565b92508282111561331057603c546040516339a7919f60e01b8152600481018490526001600160a01b03909116906339a7919f90602401600060405180830381600087803b1580156132f757600080fd5b505af115801561330b573d6000803e3d6000fd5b505050505b509150505b90565b600061089a7f0000000000000000000000000000000000000000000000000000000000000000612980565b6040516001600160a01b038085166024830152831660448201526064810182905261337b9085906323b872dd60e01b90608401612743565b50505050565b60006109d38284613c2f565b60006109d38284613c46565b60006133ee826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137da9092919063ffffffff16565b805190915015610d17578080602001905181019061340c9190613e54565b610d175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108c9565b60008061348084670de0b6b3a7640000613381565b905061348c818461338d565b949350505050565b806001600160a01b03166134b4600080516020613f2a8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020613f2a83398151915255565b6040516370a0823160e01b815230600482015260009082906001600160a01b038216906370a0823190602401602060405180830381865afa158015613544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135689190613dfd565b60365490925060005b8181101561368d5760006036828154811061358e5761358e613c9f565b60009182526020909120015460405163551c457b60e11b81526001600160a01b0388811660048301529091169150819063aa388af690602401602060405180830381865afa1580156135e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136089190613e54565b1561368457604051632fa8a91360e11b81526001600160a01b038781166004830152821690635f51522690602401602060405180830381865afa158015613653573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136779190613dfd565b6136819086613ccb565b94505b50600101613571565b505050919050565b6000806136a28585613381565b90506136ae818461338d565b95945050505050565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c548083169585018690529290920416606083015260009283916137079190613e16565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561377c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a09190613dfd565b90508181116137b3576000935050505090565b6137bd8282613cf7565b935050505090565b60006109d38383670de0b6b3a7640000613695565b606061348c848460008585843b6138335760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108c9565b600080866001600160a01b0316858760405161384f9190613e9a565b60006040518083038185875af1925050503d806000811461388c576040519150601f19603f3d011682016040523d82523d6000602084013e613891565b606091505b50915091506138a18282866138ac565b979650505050505050565b606083156138bb5750816109d3565b8251156138cb5782518084602001fd5b8160405162461bcd60e51b81526004016108c99190613eb6565b82805482825590600052602060002090810192821561393a579160200282015b8281111561393a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613905565b50612dcc9291505b80821115612dcc5760008155600101613942565b80356001600160a01b0381168114611dcd57600080fd5b60008060006060848603121561398257600080fd5b61398b84613956565b95602085013595506040909401359392505050565b602080825282518282018190526000918401906040840190835b818110156139e15783516001600160a01b03168352602093840193909201916001016139ba565b509095945050505050565b6000602082840312156139fe57600080fd5b6109d382613956565b60008060408385031215613a1a57600080fd5b613a2383613956565b9150613a3160208401613956565b90509250929050565b60008060208385031215613a4d57600080fd5b823567ffffffffffffffff811115613a6457600080fd5b8301601f81018513613a7557600080fd5b803567ffffffffffffffff811115613a8c57600080fd5b8560208260051b8401011115613aa157600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b82811015613ae3578151865260209586019590910190600101613ac5565b5093949350505050565b604081526000613b006040830185613ab1565b90508260208301529392505050565b600060208284031215613b2157600080fd5b5035919050565b6020815260006109d36020830184613ab1565b634e487b7160e01b600052602160045260246000fd5b8151151581526020820151608082019060028110613b7f57634e487b7160e01b600052602160045260246000fd5b8060208401525060ff604084015116604083015261ffff606084015116606083015292915050565b60008060408385031215613bba57600080fd5b50508035926020909101359150565b6020808252600e908201526d10d85c1a5d185b081c185d5cd95960921b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610fd657610fd6613c19565b600082613c6357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80820180821115610fd657610fd6613c19565b6001600160a01b03929092168252602082015260400190565b81810381811115610fd657610fd6613c19565b6001815b6001841115613d4557808504811115613d2957613d29613c19565b6001841615613d3757908102905b60019390931c928002613d0e565b935093915050565b600082613d5c57506001610fd6565b81613d6957506000610fd6565b8160018114613d7f5760028114613d8957613da5565b6001915050610fd6565b60ff841115613d9a57613d9a613c19565b50506001821b610fd6565b5060208310610133831016604e8410600b8410161715613dc8575081810a610fd6565b613dd56000198484613d0a565b8060001904821115613de957613de9613c19565b029392505050565b60006109d38383613d4d565b600060208284031215613e0f57600080fd5b5051919050565b6001600160801b038281168282160390811115610fd657610fd6613c19565b6001600160801b038181168382160190811115610fd657610fd6613c19565b600060208284031215613e6657600080fd5b815180151581146109d357600080fd5b60005b83811015613e91578181015183820152602001613e79565b50506000910152565b60008251613eac818460208701613e76565b9190910192915050565b6020815260008251806020840152613ed5816040850160208701613e76565b601f01601f1916919091016040019291505056fe53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535a2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd97bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa264697066735822122020d5819135f6c39694e5c322b1bb1bcc619c176b711e18820986e86eee171dc664736f6c634300081c0033", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103425760003560e01c80636217f3ea116101b8578063abaa991611610104578063d38bfff4116100a2578063e6cc54321161007c578063e6cc543214610833578063ef08edc214610847578063f84444361461085c578063fc0cfeee1461086f57610342565b8063d38bfff41461080f578063d4c3eea014610822578063e45cc9f01461082a57610342565b8063b9b17f9f116100de578063b9b17f9f146107e2578063c3b28864146107ea578063c7af3352146107f2578063cc2fe94b146107fa57610342565b8063abaa9916146107bf578063af14052c146107c7578063b888879e146107cf57610342565b8063937b2581116101715780639fa1826e1161014b5780639fa1826e14610772578063a0aead4d1461077b578063a403e4d514610783578063ab80dafb146107ac57610342565b8063937b2581146106765780639be918e61461071e5780639ee679e81461074a57610342565b80636217f3ea146105fe57806367bd7ba3146106115780636ec3ab67146106315780637a2202f3146106515780637cbc23731461065a5780638e510b521461066d57610342565b80634530820a1161029257806354c6d858116102305780635b60f9fc1161020a5780635b60f9fc146105bd5780635d36b190146105d05780635f515226146105d8578063603ea03b146105eb57610342565b806354c6d8581461058e578063570d8e1d146105975780635802a172146105aa57610342565b806348e30f541161026c57806348e30f541461053d57806349c1d54d1461055e57806352d38e5d1461057157806353ca9f241461057a57610342565b80634530820a146104ee57806345e4213b14610521578063485cc9551461052a57610342565b80632acada4d116102ff57806339ebf823116102d957806339ebf823146104685780633b8fe28d146104ac5780633fc8cef3146104bf57806344c54707146104e657610342565b80632acada4d146103ec57806331e19cfa14610401578063362bd1a31461040957610342565b806309f6442c146103785780630c340a2414610394578063156e29f6146103b457806318ce56bd146103c75780631edfe3da146103da578063207134b0146103e3575b600080516020613f0a833981519152366000803760008036600084545af43d6000803e808015610371573d6000f35b3d6000fd5b005b61038160385481565b6040519081526020015b60405180910390f35b61039c610882565b6040516001600160a01b03909116815260200161038b565b6103766103c236600461396d565b61089f565b60455461039c906001600160a01b031681565b61038160395481565b61038160435481565b6103f461091d565b60405161038b91906139a0565b603654610381565b604b54604c54610435916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b039586168152938516602085015291841691830191909152909116606082015260800161038b565b6104956104763660046139ec565b6035602052600090815260409020805460019091015460ff9091169082565b60408051921515835260208301919091520161038b565b6103816104ba3660046139ec565b61097f565b61039c7f000000000000000000000000000000000000000000000000000000000000000081565b6103766109da565b6105116104fc3660046139ec565b60496020526000908152604090205460ff1681565b604051901515815260200161038b565b610381604e5481565b610376610538366004613a07565b610b1a565b61055061054b366004613a3a565b610d1c565b60405161038b929190613aed565b60425461039c906001600160a01b031681565b610381603b5481565b60375461051190600160a01b900460ff1681565b610381607b5481565b603f5461039c906001600160a01b031681565b603c5461039c906001600160a01b031681565b6103816105cb3660046139ec565b610efc565b610376610f25565b6103816105e63660046139ec565b610fcb565b604a5461039c906001600160a01b031681565b61037661060c366004613b0f565b610fdc565b61062461061f366004613b0f565b611160565b60405161038b9190613b28565b61064461063f3660046139ec565b61116b565b60405161038b9190613b51565b61038160475481565b610376610668366004613ba7565b611211565b61038160415481565b6106d7610684366004613b0f565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a00161038b565b61051161072c3660046139ec565b6001600160a01b031660009081526033602052604090205460ff1690565b61075d610758366004613b0f565b611284565b6040805192835260208301919091520161038b565b610381603a5481565b603454610381565b61039c6107913660046139ec565b6040602081905260009182529020546001600160a01b031681565b6103766107ba366004613b0f565b611541565b610376611690565b610376611708565b60375461039c906001600160a01b031681565b61037661174e565b6103f46117be565b61051161181e565b600080516020613f0a8339815191525461039c565b61037661081d3660046139ec565b61184f565b6103816118f3565b61038160465481565b60375461051190600160a81b900460ff1681565b610381600080516020613f0a83398151915281565b61038161086a366004613b0f565b6118fd565b61037661087d3660046139ec565b611a57565b600061089a600080516020613f2a8339815191525490565b905090565b603754600160a81b900460ff16156108d25760405162461bcd60e51b81526004016108c990613bc9565b60405180910390fd5b600080516020613eea833981519152805460011981016109045760405162461bcd60e51b81526004016108c990613bf1565b60028255610913858585611ae7565b5060019055505050565b6060603480548060200260200160405190810160405280929190818152602001828054801561097557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610957575b5050505050905090565b6000806109a86109a261099185611d68565b670de0b6b3a7640000906012611dd2565b84611e34565b9050670de0b6b3a7640000816109bf856001611f7f565b6109c99190613c2f565b6109d39190613c46565b9392505050565b6109e261181e565b6109fe5760405162461bcd60e51b81526004016108c990613c68565b60345460005b81811015610a75577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110610a4957610a49613c9f565b6000918252602090912001546001600160a01b031603610a6d57607b819055610a75565b600101610a04565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166034607b5481548110610ab557610ab5613c9f565b6000918252602090912001546001600160a01b031614610b175760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964205745544820417373657420496e646578000000000000000060448201526064016108c9565b50565b610b2261181e565b610b3e5760405162461bcd60e51b81526004016108c990613c68565b600054610100900460ff1680610b57575060005460ff16155b610bba5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016108c9565b600054610100900460ff16158015610bdc576000805461ffff19166101011790555b6001600160a01b038316610c325760405162461bcd60e51b815260206004820152601d60248201527f507269636550726f76696465722061646472657373206973207a65726f00000060448201526064016108c9565b6001600160a01b038216610c815760405162461bcd60e51b81526020600482015260166024820152756f546f6b656e2061646472657373206973207a65726f60501b60448201526064016108c9565b603c80546001600160a01b038481166001600160a01b031990921691909117909155603780546001600160b01b03191691851691909117600160a81b17905560006038819055603981905569054b40b1f852bda00000603a55683635c9adc5dea00000603b556040805191825260208201908190529051610d04916036916138e5565b508015610d17576000805461ff00191690555b505050565b603754606090600090600160a81b900460ff1615610d4c5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea83398151915280546001198101610d7e5760405162461bcd60e51b81526004016108c990613bf1565b60028255604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610dd257600080fd5b505af1158015610de6573d6000803e3d6000fd5b50505050610df2612252565b508467ffffffffffffffff811115610e0c57610e0c613cb5565b604051908082528060200260200182016040528015610e35578160200160208202803683370190505b50935060005b85811015610eb157610e64878783818110610e5857610e58613c9f565b9050602002013561242e565b858281518110610e7657610e76613c9f565b602002602001018181525050848181518110610e9457610e94613c9f565b602002602001015184610ea79190613ccb565b9350600101610e3b565b50610ee66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385612724565b610eef8361277a565b6001825550509250929050565b600080610f0e6109a261099185611d68565b9050670de0b6b3a7640000816109bf856000611f7f565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b031614610fc05760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016108c9565b610fc933612921565b565b6000610fd682612980565b92915050565b603754600160a81b900460ff16156110065760405162461bcd60e51b81526004016108c990613bc9565b3360009081526035602052604090205460ff1615156001146110615760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016108c9565b3360009081526049602052604090205460ff1615156001146110c05760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016108c9565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a633826040516110f1929190613cde565b60405180910390a1603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061112b9033908590600401613cde565b600060405180830381600087803b15801561114557600080fd5b505af1158015611159573d6000803e3d6000fd5b5050505050565b6060610fd682612a53565b604080516080808201835260008083526020808401829052838501829052606084018290526001600160a01b038616825260338152908490208451928301909452835460ff8082161515845293949293918401916101009091041660018111156111d7576111d7613b3b565b60018111156111e8576111e8613b3b565b8152905462010000810460ff1660208301526301000000900461ffff1660409091015292915050565b603754600160a81b900460ff161561123b5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea8339815191528054600119810161126d5760405162461bcd60e51b81526004016108c990613bf1565b6002825561127b8484612b94565b50600190555050565b6037546000908190600160a81b900460ff16156112b35760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea833981519152805460011981016112e55760405162461bcd60e51b81526004016108c990613bf1565b600282556000604e541161133b5760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016108c9565b604c54604b546001600160801b03600160801b9092048216955061136191879116613ccb565b9250611376611371856001613ccb565b612d63565b604c80546001600160801b03928316600160801b02921691909117905561139c83612d63565b604b80546001600160801b0319166001600160801b03929092169190911790556040805160a081018252338152600060208201524264ffffffffff1691810191909152606081016113ec87612d63565b6001600160801b0316815260200161140385612d63565b6001600160801b039081169091526000868152604d602090815260409182902084518154928601518685015164ffffffffff16600160a81b0264ffffffffff60a81b19911515600160a01b026001600160a81b03199095166001600160a01b0393841617949094171692909217815560608501516080909501518416600160801b029490931693909317600190920191909155603c549051632770a7eb60e21b8152911690639dc29fac906114be9033908990600401613cde565b600060405180830381600087803b1580156114d857600080fd5b505af11580156114ec573d6000803e3d6000fd5b505050506114f98561277a565b6040805186815260208101859052859133917f38e3d972947cfef94205163d483d6287ef27eb312e20cb8e0b13a49989db232e910160405180910390a3600182555050915091565b603754600160a81b900460ff161561156b5760405162461bcd60e51b81526004016108c990613bc9565b3360009081526035602052604090205460ff1615156001146115c65760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016108c9565b3360009081526049602052604090205460ff1615156001146116255760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016108c9565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853382604051611656929190613cde565b60405180910390a1603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061112b9033908590600401613cde565b603754600160a81b900460ff16156116ba5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea833981519152805460011981016116ec5760405162461bcd60e51b81526004016108c990613bf1565b600282556116f8612252565b50611701612dd0565b5060019055565b600080516020613eea8339815191528054600119810161173a5760405162461bcd60e51b81526004016108c990613bf1565b60028255611746612ff8565b505060019055565b604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561179e57600080fd5b505af11580156117b2573d6000803e3d6000fd5b50505050610b17612252565b60606036805480602002602001604051908101604052809291908181526020018280548015610975576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610957575050505050905090565b6000611836600080516020613f2a8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b61185761181e565b6118735760405162461bcd60e51b81526004016108c990613c68565b61189b817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166118bb600080516020613f2a8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b600061089a613318565b603754600090600160a81b900460ff161561192a5760405162461bcd60e51b81526004016108c990613bc9565b600080516020613eea8339815191528054600119810161195c5760405162461bcd60e51b81526004016108c990613bf1565b60028255604b546000858152604d60205260409020600101546001600160801b03600160801b92839004811692909104161115611a0557604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156119e357600080fd5b505af11580156119f7573d6000803e3d6000fd5b50505050611a03612252565b505b611a0e8461242e565b9250611a446001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163385612724565b611a4d8361277a565b5060019055919050565b611a5f61181e565b611a7b5760405162461bcd60e51b81526004016108c990613c68565b803b611ad55760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016108c9565b600080516020613f0a83398151915255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614611b685760405162461bcd60e51b815260206004820152601d60248201527f556e737570706f7274656420617373657420666f72206d696e74696e6700000060448201526064016108c9565b60008211611bb85760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016108c9565b80821015611c085760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420616d6f756e74206c6f776572207468616e206d696e696d756d000060448201526064016108c9565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853383604051611c39929190613cde565b60405180910390a1603754600160a01b900460ff16158015611c5d5750603b548210155b15611cd457604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611cb257600080fd5b505af1158015611cc6573d6000803e3d6000fd5b50505050611cd2612ff8565b505b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611d069033908690600401613cde565b600060405180830381600087803b158015611d2057600080fd5b505af1158015611d34573d6000803e3d6000fd5b50611d4e925050506001600160a01b038416333085613343565b611d56612252565b50603a548210610d1757610d17612dd0565b6001600160a01b03811660009081526033602052604090205462010000900460ff1680611dcd5760405162461bcd60e51b8152602060048201526013602482015272111958da5b585b1cc81b9bdd0818d858da1959606a1b60448201526064016108c9565b919050565b600081831115611e0257611dfb611de98385613cf7565b611df490600a613df1565b8590613381565b9350611e2c565b81831015611e2c57611e29611e178484613cf7565b611e2290600a613df1565b859061338d565b93505b509192915050565b6001600160a01b038116600090815260336020526040812054610100900460ff1681816001811115611e6857611e68613b3b565b03611e8b57611e836012611e7b85611d68565b869190611dd2565b915050610fd6565b6001816001811115611e9f57611e9f613b3b565b03611f30576000836001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ee4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f089190613dfd565b9050670de0b6b3a7640000611f1d8287613c2f565b611f279190613c46565b92505050610fd6565b60405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016108c9565b5092915050565b6001600160a01b038281166000818152603360205260408082205460375491516315d5220f60e31b81526004810194909452919361010090920460ff169291169063aea9107890602401602060405180830381865afa158015611fe6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061200a9190613dfd565b9150600181600181111561202057612020613b3b565b036120b0576000846001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612065573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120899190613dfd565b90508061209e84670de0b6b3a7640000613c2f565b6120a89190613c46565b925050612111565b60008160018111156120c4576120c4613b3b565b146121115760405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016108c9565b67120a871cc00200008211156121695760405162461bcd60e51b815260206004820152601860248201527f5661756c743a2050726963652065786365656473206d6178000000000000000060448201526064016108c9565b6709b6e64a8ec600008210156121ba5760405162461bcd60e51b81526020600482015260166024820152752b30bab63a1d10283934b1b2903ab73232b91036b4b760511b60448201526064016108c9565b821561223157670de0b6b3a76400008211156121dc57670de0b6b3a764000091505b670dd99bb65dd7000082101561222c5760405162461bcd60e51b815260206004820152601560248201527441737365742070726963652062656c6f772070656760581b60448201526064016108c9565b611f78565b670de0b6b3a7640000821015611f785750670de0b6b3a76400009392505050565b60408051608081018252604b546001600160801b03808216808452600160801b92839004821660208501819052604c54808416968601969096529290940416606083015260009283916122a491613e16565b6001600160801b03169050806000036122c05760009250505090565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015612327573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061234b9190613dfd565b90506000836040015184602001516123639190613e16565b6001600160801b0316905080821161238057600094505050505090565b600061238c8284613cf7565b905080841061239b578061239d565b835b955060008686602001516001600160801b03166123ba9190613ccb565b90506123c581612d63565b604b80546001600160801b03928316600160801b0292169190911790556040517fee79a0c43d3993055690b54e074b5153e8bae8d1a872b656dedb64aa8f4633339061241d9083908a90918252602082015260400190565b60405180910390a150505050505090565b600080604e54116124815760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016108c9565b6000828152604d6020908152604091829020825160a08101845281546001600160a01b038116825260ff600160a01b82041615158285015264ffffffffff600160a81b90910481168286019081526001909301546001600160801b03808216606080860191909152600160801b92839004821660808087019190915288519081018952604b548084168252849004831697810197909752604c54808316988801989098529190960490951694840194909452604e5491519093429261254892909116613ccb565b111561258c5760405162461bcd60e51b815260206004820152601360248201527210db185a5b4819195b185e481b9bdd081b595d606a1b60448201526064016108c9565b80602001516001600160801b031682608001516001600160801b031611156125f65760405162461bcd60e51b815260206004820152601760248201527f51756575652070656e64696e67206c697175696469747900000000000000000060448201526064016108c9565b81516001600160a01b0316331461263f5760405162461bcd60e51b815260206004820152600d60248201526c2737ba103932b8bab2b9ba32b960991b60448201526064016108c9565b6020820151156126835760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016108c9565b6000848152604d602052604090819020805460ff60a01b1916600160a01b1790556060830151908201516126b79190613e35565b604c80546001600160801b0319166001600160801b03928316179055606083015160405191168152849033907f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d19060200160405180910390a350606001516001600160801b031692915050565b610d178363a9059cbb60e01b8484604051602401612743929190613cde565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152613399565b6000603b5482101580156127985750603754600160a01b900460ff16155b156127ac576127a5612ff8565b90506127b7565b6127b4613318565b90505b6041541561291d576000811161280f5760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d616e79206f75747374616e64696e6720726571756573747300000060448201526064016108c9565b600061289282603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061288c9190613dfd565b9061346b565b9050604154670de0b6b3a764000082116128bd576128b882670de0b6b3a7640000613cf7565b6128cf565b6128cf670de0b6b3a764000083613cf7565b1115610d175760405162461bcd60e51b815260206004820152601e60248201527f4261636b696e6720737570706c79206c6971756964697479206572726f72000060448201526064016108c9565b5050565b6001600160a01b0381166129775760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016108c9565b610b1781613494565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316146129c357506000919050565b6129cc826134fb565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301529293509190612a1c9084613ccb565b1015612a2b5750600092915050565b805160408201516001600160801b0391821691612a49911684613ccb565b6109d39190613cf7565b60385460609015612a8257603854600090612a72908490612710613695565b9050612a7e8184613cf7565b9250505b6000607b5490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110612ac657612ac6613c9f565b6000918252602090912001546001600160a01b031614612b285760405162461bcd60e51b815260206004820152601b60248201527f5745544820417373657420696e646578206e6f7420636163686564000000000060448201526064016108c9565b60345467ffffffffffffffff811115612b4357612b43613cb5565b604051908082528060200260200182016040528015612b6c578160200160208202803683370190505b50915082828281518110612b8257612b82613c9f565b60200260200101818152505050919050565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a63383604051612bc5929190613cde565b60405180910390a181600003612bd9575050565b603f546000906001600160a01b0316331480612bf85750612bf861181e565b612c2557612c0583612a53565b607b5481518110612c1857612c18613c9f565b6020026020010151612c27565b825b905081811015612c795760405162461bcd60e51b815260206004820181905260248201527f52656465656d20616d6f756e74206c6f776572207468616e206d696e696d756d60448201526064016108c9565b80612c826136b7565b1015612cc25760405162461bcd60e51b815260206004820152600f60248201526e2634b8bab4b234ba3c9032b93937b960891b60448201526064016108c9565b612cf66001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000163383612724565b603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90612d289033908790600401613cde565b600060405180830381600087803b158015612d4257600080fd5b505af1158015612d56573d6000803e3d6000fd5b50505050610d178361277a565b60006001600160801b03821115612dcc5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016108c9565b5090565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166000908152604060208190529020541680612e135750565b6000612e1d6136b7565b905080600003612e2b575050565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612e75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e999190613dfd565b90506000612eb2603954836137c590919063ffffffff16565b9050808311612ec15750505050565b6000612ecd8285613cf7565b905084612f046001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168284612724565b6040516311f9fbc960e21b81526001600160a01b038216906347e7ef2490612f52907f0000000000000000000000000000000000000000000000000000000000000000908690600401613cde565b600060405180830381600087803b158015612f6c57600080fd5b505af1158015612f80573d6000803e3d6000fd5b5050604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528a1660208201529081018590527f41b99659f6ba0803f444aff29e5bf6e26dd86a3219aff92119d69710a956ba8d9250606001905060405180910390a1505050505050565b603754600090600160a01b900460ff16156130475760405162461bcd60e51b815260206004820152600f60248201526e149958985cda5b99c81c185d5cd959608a1b60448201526064016108c9565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613091573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130b59190613dfd565b905060006130c1613318565b9050816000036130d45791506133159050565b6042546001600160a01b031680158015906130ee57508282115b156132305760006130ff8484613cf7565b9050600061311c604354612710846136959092919063ffffffff16565b90508082116131785760405162461bcd60e51b815260206004820152602260248201527f466565206d757374206e6f742062652067726561746572207468616e207969656044820152611b1960f21b60648201526084016108c9565b80156131e357603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906131b09086908590600401613cde565b600060405180830381600087803b1580156131ca57600080fd5b505af11580156131de573d6000803e3d6000fd5b505050505b604080516001600160a01b0385168152602081018490529081018290527f09516ecf4a8a86e59780a9befc6dee948bc9e60a36e3be68d31ea817ee8d2c809060600160405180910390a150505b603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613283573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132a79190613dfd565b92508282111561331057603c546040516339a7919f60e01b8152600481018490526001600160a01b03909116906339a7919f90602401600060405180830381600087803b1580156132f757600080fd5b505af115801561330b573d6000803e3d6000fd5b505050505b509150505b90565b600061089a7f0000000000000000000000000000000000000000000000000000000000000000612980565b6040516001600160a01b038085166024830152831660448201526064810182905261337b9085906323b872dd60e01b90608401612743565b50505050565b60006109d38284613c2f565b60006109d38284613c46565b60006133ee826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166137da9092919063ffffffff16565b805190915015610d17578080602001905181019061340c9190613e54565b610d175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108c9565b60008061348084670de0b6b3a7640000613381565b905061348c818461338d565b949350505050565b806001600160a01b03166134b4600080516020613f2a8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020613f2a83398151915255565b6040516370a0823160e01b815230600482015260009082906001600160a01b038216906370a0823190602401602060405180830381865afa158015613544573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135689190613dfd565b60365490925060005b8181101561368d5760006036828154811061358e5761358e613c9f565b60009182526020909120015460405163551c457b60e11b81526001600160a01b0388811660048301529091169150819063aa388af690602401602060405180830381865afa1580156135e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136089190613e54565b1561368457604051632fa8a91360e11b81526001600160a01b038781166004830152821690635f51522690602401602060405180830381865afa158015613653573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906136779190613dfd565b6136819086613ccb565b94505b50600101613571565b505050919050565b6000806136a28585613381565b90506136ae818461338d565b95945050505050565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c548083169585018690529290920416606083015260009283916137079190613e16565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa15801561377c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137a09190613dfd565b90508181116137b3576000935050505090565b6137bd8282613cf7565b935050505090565b60006109d38383670de0b6b3a7640000613695565b606061348c848460008585843b6138335760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108c9565b600080866001600160a01b0316858760405161384f9190613e9a565b60006040518083038185875af1925050503d806000811461388c576040519150601f19603f3d011682016040523d82523d6000602084013e613891565b606091505b50915091506138a18282866138ac565b979650505050505050565b606083156138bb5750816109d3565b8251156138cb5782518084602001fd5b8160405162461bcd60e51b81526004016108c99190613eb6565b82805482825590600052602060002090810192821561393a579160200282015b8281111561393a57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613905565b50612dcc9291505b80821115612dcc5760008155600101613942565b80356001600160a01b0381168114611dcd57600080fd5b60008060006060848603121561398257600080fd5b61398b84613956565b95602085013595506040909401359392505050565b602080825282518282018190526000918401906040840190835b818110156139e15783516001600160a01b03168352602093840193909201916001016139ba565b509095945050505050565b6000602082840312156139fe57600080fd5b6109d382613956565b60008060408385031215613a1a57600080fd5b613a2383613956565b9150613a3160208401613956565b90509250929050565b60008060208385031215613a4d57600080fd5b823567ffffffffffffffff811115613a6457600080fd5b8301601f81018513613a7557600080fd5b803567ffffffffffffffff811115613a8c57600080fd5b8560208260051b8401011115613aa157600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b82811015613ae3578151865260209586019590910190600101613ac5565b5093949350505050565b604081526000613b006040830185613ab1565b90508260208301529392505050565b600060208284031215613b2157600080fd5b5035919050565b6020815260006109d36020830184613ab1565b634e487b7160e01b600052602160045260246000fd5b8151151581526020820151608082019060028110613b7f57634e487b7160e01b600052602160045260246000fd5b8060208401525060ff604084015116604083015261ffff606084015116606083015292915050565b60008060408385031215613bba57600080fd5b50508035926020909101359150565b6020808252600e908201526d10d85c1a5d185b081c185d5cd95960921b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610fd657610fd6613c19565b600082613c6357634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80820180821115610fd657610fd6613c19565b6001600160a01b03929092168252602082015260400190565b81810381811115610fd657610fd6613c19565b6001815b6001841115613d4557808504811115613d2957613d29613c19565b6001841615613d3757908102905b60019390931c928002613d0e565b935093915050565b600082613d5c57506001610fd6565b81613d6957506000610fd6565b8160018114613d7f5760028114613d8957613da5565b6001915050610fd6565b60ff841115613d9a57613d9a613c19565b50506001821b610fd6565b5060208310610133831016604e8410600b8410161715613dc8575081810a610fd6565b613dd56000198484613d0a565b8060001904821115613de957613de9613c19565b029392505050565b60006109d38383613d4d565b600060208284031215613e0f57600080fd5b5051919050565b6001600160801b038281168282160390811115610fd657610fd6613c19565b6001600160801b038181168382160190811115610fd657610fd6613c19565b600060208284031215613e6657600080fd5b815180151581146109d357600080fd5b60005b83811015613e91578181015183820152602001613e79565b50506000910152565b60008251613eac818460208701613e76565b9190910192915050565b6020815260008251806020840152613ed5816040850160208701613e76565b601f01601f1916919091016040019291505056fe53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535a2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd97bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa264697066735822122020d5819135f6c39694e5c322b1bb1bcc619c176b711e18820986e86eee171dc664736f6c634300081c0033", + "numDeployments": 9, + "solcInputHash": "3d93c313784f00c00800e6c458e27c1d", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_weth\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"AllocateThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"AssetAllocated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_strategy\",\"type\":\"address\"}],\"name\":\"AssetDefaultStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"AssetSupported\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalPaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"CapitalUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"dripDuration\",\"type\":\"uint256\"}],\"name\":\"DripDurationChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_dripper\",\"type\":\"address\"}],\"name\":\"DripperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"maxSupplyDiff\",\"type\":\"uint256\"}],\"name\":\"MaxSupplyDiffChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Mint\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"NetOusdMintForStrategyThresholdChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_ousdMetaStrategy\",\"type\":\"address\"}],\"name\":\"OusdMetaStrategyUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"}],\"name\":\"PriceProviderUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebasePaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"rebaseRatePerSecond\",\"type\":\"uint256\"}],\"name\":\"RebasePerSecondMaxChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_threshold\",\"type\":\"uint256\"}],\"name\":\"RebaseThresholdUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"RebaseUnpaused\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Redeem\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_redeemFeeBps\",\"type\":\"uint256\"}],\"name\":\"RedeemFeeUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"StrategistUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyAddedToMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyApproved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_addr\",\"type\":\"address\"}],\"name\":\"StrategyRemoved\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"strategy\",\"type\":\"address\"}],\"name\":\"StrategyRemovedFromMintWhitelist\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapAllowedUndervalueChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"SwapSlippageChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_fromAsset\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_toAsset\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fromAssetAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_toAssetAmount\",\"type\":\"uint256\"}],\"name\":\"Swapped\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"SwapperChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_address\",\"type\":\"address\"}],\"name\":\"TrusteeAddressChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_basis\",\"type\":\"uint256\"}],\"name\":\"TrusteeFeeBpsChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_vaultBuffer\",\"type\":\"uint256\"}],\"name\":\"VaultBufferUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newDelay\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimDelayUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_claimable\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_newClaimable\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimable\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"WithdrawalClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"_withdrawer\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_queued\",\"type\":\"uint256\"}],\"name\":\"WithdrawalRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_yield\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"_fee\",\"type\":\"uint256\"}],\"name\":\"YieldDistribution\",\"type\":\"event\"},{\"stateMutability\":\"nonpayable\",\"type\":\"fallback\"},{\"inputs\":[],\"name\":\"ADMIN_IMPLEMENTATION\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"adminImpl\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"addWithdrawalQueueLiquidity\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"adminImplPosition\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"allocate\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"assetDefaultStrategies\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"autoAllocateThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"burnForStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"cacheWETHAssetIndex\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"calculateRedeemOutputs\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"capitalPaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"checkBalance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_requestId\",\"type\":\"uint256\"}],\"name\":\"claimWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256[]\",\"name\":\"_requestIds\",\"type\":\"uint256[]\"}],\"name\":\"claimWithdrawals\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256\",\"name\":\"totalAmount\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripDuration\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dripper\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllAssets\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAllStrategies\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"getAssetConfig\",\"outputs\":[{\"components\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"enum VaultStorage.UnitConversion\",\"name\":\"unitConversion\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"decimals\",\"type\":\"uint8\"},{\"internalType\":\"uint16\",\"name\":\"allowedOracleSlippageBps\",\"type\":\"uint16\"}],\"internalType\":\"struct VaultStorage.Asset\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getAssetCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStrategyCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_priceProvider\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_oToken\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"isMintWhitelistedStrategy\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"}],\"name\":\"isSupportedAsset\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"lastRebase\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"maxSupplyDiff\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_asset\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumOusdAmount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mintForStrategy\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintForStrategyThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"netOusdMintedForStrategy\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"oUSD\",\"outputs\":[{\"internalType\":\"contract OUSD\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"ousdMetaStrategy\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"previewYield\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"yield\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"priceProvider\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"priceUnitMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"priceUnitRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"price\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebase\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePaused\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePerSecondMax\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebasePerSecondTarget\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rebaseThreshold\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_minimumUnitAmount\",\"type\":\"uint256\"}],\"name\":\"redeem\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"redeemFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"requestWithdrawal\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"requestId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"queued\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImpl\",\"type\":\"address\"}],\"name\":\"setAdminImpl\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"strategies\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"isSupported\",\"type\":\"bool\"},{\"internalType\":\"uint256\",\"name\":\"_deprecated\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"strategistAddr\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalValue\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"trusteeFeeBps\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vaultBuffer\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"weth\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"wethAssetIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalClaimDelay\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawalQueueMetadata\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimable\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"claimed\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"nextWithdrawalIndex\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"withdrawalRequests\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"withdrawer\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"claimed\",\"type\":\"bool\"},{\"internalType\":\"uint40\",\"name\":\"timestamp\",\"type\":\"uint40\"},{\"internalType\":\"uint128\",\"name\":\"amount\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"queued\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{\"addWithdrawalQueueLiquidity()\":{\"details\":\"is called from the Native Staking strategy when validator withdrawals are processed. It also called before any WETH is allocated to a strategy.\"},\"cacheWETHAssetIndex()\":{\"details\":\"Caches WETH's index in `allAssets` variable. Reduces gas usage by redeem by caching that.\"},\"checkBalance(address)\":{\"params\":{\"_asset\":\"Address of asset\"},\"returns\":{\"_0\":\"uint256 Balance of asset in decimals of asset\"}},\"claimWithdrawal(uint256)\":{\"params\":{\"_requestId\":\"Unique ID for the withdrawal request\"},\"returns\":{\"amount\":\"Amount of WETH transferred to the withdrawer\"}},\"claimWithdrawals(uint256[])\":{\"params\":{\"_requestIds\":\"Unique ID of each withdrawal request\"},\"returns\":{\"amounts\":\"Amount of WETH received for each request\",\"totalAmount\":\"Total amount of WETH transferred to the withdrawer\"}},\"getAssetConfig(address)\":{\"params\":{\"_asset\":\"Address of the token asset\"}},\"isSupportedAsset(address)\":{\"params\":{\"_asset\":\"address of the asset\"},\"returns\":{\"_0\":\"true if supported\"}},\"mint(address,uint256,uint256)\":{\"params\":{\"_amount\":\"Amount of the asset being deposited\",\"_asset\":\"Address of the asset being deposited\",\"_minimumOusdAmount\":\"Minimum OTokens to mint\"}},\"previewYield()\":{\"returns\":{\"yield\":\"amount of expected yield\"}},\"priceUnitMint(address)\":{\"params\":{\"asset\":\"address of the asset\"},\"returns\":{\"price\":\"uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\"}},\"priceUnitRedeem(address)\":{\"params\":{\"asset\":\"Address of the asset\"},\"returns\":{\"price\":\"uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\"}},\"redeem(uint256,uint256)\":{\"params\":{\"_amount\":\"Amount of OTokens to burn\",\"_minimumUnitAmount\":\"Minimum stablecoin units to receive in return\"}},\"requestWithdrawal(uint256)\":{\"params\":{\"_amount\":\"Amount of OETH to burn.\"},\"returns\":{\"queued\":\"Cumulative total of all WETH queued including already claimed requests.\",\"requestId\":\"Unique ID for the withdrawal request\"}},\"setAdminImpl(address)\":{\"params\":{\"newImpl\":\"address of the implementation\"}},\"totalValue()\":{\"returns\":{\"value\":\"Total value in USD/ETH (1e18)\"}},\"transferGovernance(address)\":{\"params\":{\"_newGovernor\":\"Address of the new Governor\"}}},\"title\":\"OETH VaultCore Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"addWithdrawalQueueLiquidity()\":{\"notice\":\"Collects harvested rewards from the Dripper as WETH then adds WETH to the withdrawal queue if there is a funding shortfall.\"},\"allocate()\":{\"notice\":\"Allocate unallocated funds on Vault to strategies.*\"},\"assetDefaultStrategies(address)\":{\"notice\":\"Mapping of asset address to the Strategy that they should automatically\"},\"autoAllocateThreshold()\":{\"notice\":\"OToken mints over this amount automatically allocate funds. 18 decimals.\"},\"calculateRedeemOutputs(uint256)\":{\"notice\":\"Calculate the outputs for a redeem function, i.e. the mix of coins that will be returned\"},\"capitalPaused()\":{\"notice\":\"pause operations that change the OToken supply. eg mint, redeem, allocate, mint/burn for strategy\"},\"checkBalance(address)\":{\"notice\":\"Get the balance of an asset held in Vault and all strategies.\"},\"claimGovernance()\":{\"notice\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"claimWithdrawal(uint256)\":{\"notice\":\"Claim a previously requested withdrawal once it is claimable. This request can be claimed once the withdrawal queue's `claimable` amount is greater than or equal this request's `queued` amount and 10 minutes has passed. If the requests is not claimable, the transaction will revert with `Queue pending liquidity`. If the request is not older than 10 minutes, the transaction will revert with `Claim delay not met`. OETH is converted to WETH at 1:1.\"},\"claimWithdrawals(uint256[])\":{\"notice\":\"Claim a previously requested withdrawals once they are claimable. This requests can be claimed once the withdrawal queue's `claimable` amount is greater than or equal each request's `queued` amount and 10 minutes has passed. If one of the requests is not claimable, the whole transaction will revert with `Queue pending liquidity`. If one of the requests is not older than 10 minutes, the whole transaction will revert with `Claim delay not met`.\"},\"dripDuration()\":{\"notice\":\"Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable.\"},\"dripper()\":{\"notice\":\"Address of the Dripper contract that streams harvested rewards to the Vault\"},\"getAllAssets()\":{\"notice\":\"Return all vault asset addresses in order\"},\"getAllStrategies()\":{\"notice\":\"Return the array of all strategies\"},\"getAssetConfig(address)\":{\"notice\":\"Gets the vault configuration of a supported asset.\"},\"getAssetCount()\":{\"notice\":\"Return the number of assets supported by the Vault.\"},\"getStrategyCount()\":{\"notice\":\"Return the number of strategies active on the Vault.\"},\"governor()\":{\"notice\":\"Returns the address of the current Governor.\"},\"isGovernor()\":{\"notice\":\"Returns true if the caller is the current Governor.\"},\"isSupportedAsset(address)\":{\"notice\":\"Returns whether the vault supports the asset\"},\"lastRebase()\":{\"notice\":\"Time in seconds that the vault last rebased yield.\"},\"maxSupplyDiff()\":{\"notice\":\"Max difference between total supply and total value of assets. 18 decimals.\"},\"mint(address,uint256,uint256)\":{\"notice\":\"Deposit a supported asset and mint OTokens.\"},\"netOusdMintForStrategyThreshold()\":{\"notice\":\"How much net total OTokens are allowed to be minted by all strategies\"},\"netOusdMintedForStrategy()\":{\"notice\":\"How much OTokens are currently minted by the strategy\"},\"ousdMetaStrategy()\":{\"notice\":\"Metapool strategy that is allowed to mint/burn OTokens without changing collateral\"},\"previewYield()\":{\"notice\":\"Calculates the amount that would rebase at at next rebase. This is before any fees.\"},\"priceProvider()\":{\"notice\":\"Address of the Oracle price provider contract\"},\"priceUnitMint(address)\":{\"notice\":\"Returns the total price in 18 digit units for a given asset. Never goes above 1, since that is how we price mints.\"},\"priceUnitRedeem(address)\":{\"notice\":\"Returns the total price in 18 digit unit for a given asset. Never goes below 1, since that is how we price redeems\"},\"rebase()\":{\"notice\":\"Calculate the total value of assets held by the Vault and all strategies and update the supply of OTokens.\"},\"rebasePaused()\":{\"notice\":\"pause rebasing if true\"},\"rebasePerSecondMax()\":{\"notice\":\"max rebase percentage per second Can be used to set maximum yield of the protocol, spreading out yield over time\"},\"rebasePerSecondTarget()\":{\"notice\":\"target rebase rate limit, based on past rates and funds available.\"},\"rebaseThreshold()\":{\"notice\":\"OToken mints over this amount automatically rebase. 18 decimals.\"},\"redeem(uint256,uint256)\":{\"notice\":\"Withdraw a supported asset and burn OTokens.\"},\"redeemFeeBps()\":{\"notice\":\"Redemption fee in basis points. eg 50 = 0.5%\"},\"requestWithdrawal(uint256)\":{\"notice\":\"Request an asynchronous withdrawal of WETH in exchange for OETH. The OETH is burned on request and the WETH is transferred to the withdrawer on claim. This request can be claimed once the withdrawal queue's `claimable` amount is greater than or equal this request's `queued` amount. There is a minimum of 10 minutes before a request can be claimed. After that, the request just needs enough WETH liquidity in the Vault to satisfy all the outstanding requests to that point in the queue. OETH is converted to WETH at 1:1.\"},\"setAdminImpl(address)\":{\"notice\":\"set the implementation for the admin, this needs to be in a base class else we cannot set it\"},\"strategistAddr()\":{\"notice\":\"Address of the Strategist\"},\"totalValue()\":{\"notice\":\"Determine the total value of assets held by the vault and its strategies.\"},\"transferGovernance(address)\":{\"notice\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\"},\"trusteeAddress()\":{\"notice\":\"Trustee contract that can collect a percentage of yield\"},\"trusteeFeeBps()\":{\"notice\":\"Amount of yield collected in basis points. eg 2000 = 20%\"},\"vaultBuffer()\":{\"notice\":\"Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\"},\"withdrawalClaimDelay()\":{\"notice\":\"Sets a minimum delay that is required to elapse between requesting async withdrawals and claiming the request. When set to 0 async withdrawals are disabled.\"},\"withdrawalQueueMetadata()\":{\"notice\":\"Global metadata for the withdrawal queue including: queued - cumulative total of all withdrawal requests included the ones that have already been claimed claimable - cumulative total of all the requests that can be claimed including the ones already claimed claimed - total of all the requests that have been claimed nextWithdrawalIndex - index of the next withdrawal request starting at 0\"},\"withdrawalRequests(uint256)\":{\"notice\":\"Mapping of withdrawal request indices to the user withdrawal request data\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/vault/OETHVaultCore.sol\":\"OETHVaultCore\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX 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 *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\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 require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(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 require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(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 require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(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 require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(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 require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(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 require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\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 require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\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 require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\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 * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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 * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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 * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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 * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\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 * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\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 require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base for contracts that are managed by the Origin Protocol's Governor.\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @notice Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @notice Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n emit GovernorshipTransferred(_governor(), newGovernor);\\n\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @notice Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @notice Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0xf32f873c8bfbacf2e5f01d0cf37bc7f54fbd5aa656e95c8a599114229946f107\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IBasicToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IBasicToken {\\n function symbol() external view returns (string memory);\\n\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0xa562062698aa12572123b36dfd2072f1a39e44fed2031cc19c2c9fd522f96ec2\",\"license\":\"MIT\"},\"contracts/interfaces/IDripper.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\ninterface IDripper {\\n /// @notice How much funds have dripped out already and are currently\\n // available to be sent to the vault.\\n /// @return The amount that would be sent if a collect was called\\n function availableFunds() external view returns (uint256);\\n\\n /// @notice Collect all dripped funds and send to vault.\\n /// Recalculate new drip rate.\\n function collect() external;\\n\\n /// @notice Collect all dripped funds, send to vault, recalculate new drip\\n /// rate, and rebase mToken.\\n function collectAndRebase() external;\\n\\n /// @notice Change the drip duration. Governor only.\\n /// @param _durationSeconds the number of seconds to drip out the entire\\n /// balance over if no collects were called during that time.\\n function setDripDuration(uint256 _durationSeconds) external;\\n\\n /// @dev Transfer out ERC20 tokens held by the contract. Governor only.\\n /// @param _asset ERC20 token address\\n /// @param _amount amount to transfer\\n function transferToken(address _asset, uint256 _amount) external;\\n}\\n\",\"keccak256\":\"0xf194915ea458c2150f0dda4d59566a75f9c3fd9f04da83d764ad1cbe19011db2\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IGetExchangeRateToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\ninterface IGetExchangeRateToken {\\n function getExchangeRate() external view returns (uint256 _exchangeRate);\\n}\\n\",\"keccak256\":\"0x243be4dffe1eb453d25cae22b6c172bb64c574d80943cef058fdc30a4b9c9bfd\",\"license\":\"MIT\"},\"contracts/interfaces/IOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\ninterface IOracle {\\n /**\\n * @dev returns the asset price in USD, in 8 decimal digits.\\n *\\n * The version of priceProvider deployed for OETH has 18 decimal digits\\n */\\n function price(address asset) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0xa5f765f5b22cd5426803b22a7344d4c34c4d4016a0b6e9d799862133253f77b2\",\"license\":\"BUSL-1.1\"},\"contracts/interfaces/IStrategy.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Platform interface to integrate with lending platform like Compound, AAVE etc.\\n */\\ninterface IStrategy {\\n /**\\n * @dev Deposit the given asset to platform\\n * @param _asset asset address\\n * @param _amount Amount to deposit\\n */\\n function deposit(address _asset, uint256 _amount) external;\\n\\n /**\\n * @dev Deposit the entire balance of all supported assets in the Strategy\\n * to the platform\\n */\\n function depositAll() external;\\n\\n /**\\n * @dev Withdraw given asset from Lending platform\\n */\\n function withdraw(\\n address _recipient,\\n address _asset,\\n uint256 _amount\\n ) external;\\n\\n /**\\n * @dev Liquidate all assets in strategy and return them to Vault.\\n */\\n function withdrawAll() external;\\n\\n /**\\n * @dev Returns the current balance of the given asset.\\n */\\n function checkBalance(address _asset)\\n external\\n view\\n returns (uint256 balance);\\n\\n /**\\n * @dev Returns bool indicating whether strategy supports asset.\\n */\\n function supportsAsset(address _asset) external view returns (bool);\\n\\n /**\\n * @dev Collect reward tokens from the Strategy.\\n */\\n function collectRewardTokens() external;\\n\\n /**\\n * @dev The address array of the reward tokens for the Strategy.\\n */\\n function getRewardTokenAddresses() external view returns (address[] memory);\\n\\n function harvesterAddress() external view returns (address);\\n}\\n\",\"keccak256\":\"0x3e9fcd1bfb6f82fd8e04284d0d728a932ffbb88fe52dd89fdeb45b6b17eedae5\",\"license\":\"BUSL-1.1\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\ncontract OUSD is Governable {\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n\\n /// @dev Event triggered when the supply changes\\n /// @param totalSupply Updated token total supply\\n /// @param rebasingCredits Updated token rebasing credits\\n /// @param rebasingCreditsPerToken Updated token rebasing credits per token\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n /// @dev Event triggered when an account opts in for rebasing\\n /// @param account Address of the account\\n event AccountRebasingEnabled(address account);\\n /// @dev Event triggered when an account opts out of rebasing\\n /// @param account Address of the account\\n event AccountRebasingDisabled(address account);\\n /// @dev Emitted when `value` tokens are moved from one account `from` to\\n /// another `to`.\\n /// @param from Address of the account tokens are moved from\\n /// @param to Address of the account tokens are moved to\\n /// @param value Amount of tokens transferred\\n event Transfer(address indexed from, address indexed to, uint256 value);\\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 /// @param owner Address of the owner approving allowance\\n /// @param spender Address of the spender allowance is granted to\\n /// @param value Amount of tokens spender can transfer\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n /// @dev Yield resulting from {changeSupply} that a `source` account would\\n /// receive is directed to `target` account.\\n /// @param source Address of the source forwarding the yield\\n /// @param target Address of the target receiving the yield\\n event YieldDelegated(address source, address target);\\n /// @dev Yield delegation from `source` account to the `target` account is\\n /// suspended.\\n /// @param source Address of the source suspending yield forwarding\\n /// @param target Address of the target no longer receiving yield from `source`\\n /// account\\n event YieldUndelegated(address source, address target);\\n\\n enum RebaseOptions {\\n NotSet,\\n StdNonRebasing,\\n StdRebasing,\\n YieldDelegationSource,\\n YieldDelegationTarget\\n }\\n\\n uint256[154] private _gap; // Slots to align with deployed contract\\n uint256 private constant MAX_SUPPLY = type(uint128).max;\\n /// @dev The amount of tokens in existence\\n uint256 public totalSupply;\\n mapping(address => mapping(address => uint256)) private allowances;\\n /// @dev The vault with privileges to execute {mint}, {burn}\\n /// and {changeSupply}\\n address public vaultAddress;\\n mapping(address => uint256) internal creditBalances;\\n // the 2 storage variables below need trailing underscores to not name collide with public functions\\n uint256 private rebasingCredits_; // Sum of all rebasing credits (creditBalances for rebasing accounts)\\n uint256 private rebasingCreditsPerToken_;\\n /// @dev The amount of tokens that are not rebasing - receiving yield\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) internal alternativeCreditsPerToken;\\n /// @dev A map of all addresses and their respective RebaseOptions\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) private __deprecated_isUpgraded;\\n /// @dev A map of addresses that have yields forwarded to. This is an\\n /// inverse mapping of {yieldFrom}\\n /// Key Account forwarding yield\\n /// Value Account receiving yield\\n mapping(address => address) public yieldTo;\\n /// @dev A map of addresses that are receiving the yield. This is an\\n /// inverse mapping of {yieldTo}\\n /// Key Account receiving yield\\n /// Value Account forwarding yield\\n mapping(address => address) public yieldFrom;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n uint256[34] private __gap; // including below gap totals up to 200\\n\\n /// @dev Initializes the contract and sets necessary variables.\\n /// @param _vaultAddress Address of the vault contract\\n /// @param _initialCreditsPerToken The starting rebasing credits per token.\\n function initialize(address _vaultAddress, uint256 _initialCreditsPerToken)\\n external\\n onlyGovernor\\n {\\n require(_vaultAddress != address(0), \\\"Zero vault address\\\");\\n require(vaultAddress == address(0), \\\"Already initialized\\\");\\n\\n rebasingCreditsPerToken_ = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /// @dev Returns the symbol of the token, a shorter version\\n /// of the name.\\n function symbol() external pure virtual returns (string memory) {\\n return \\\"OUSD\\\";\\n }\\n\\n /// @dev Returns the name of the token.\\n function name() external pure virtual returns (string memory) {\\n return \\\"Origin Dollar\\\";\\n }\\n\\n /// @dev Returns the number of decimals used to get its user representation.\\n function decimals() external pure virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() external view returns (uint256) {\\n return rebasingCreditsPerToken_;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() external view returns (uint256) {\\n return rebasingCreditsPerToken_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() external view returns (uint256) {\\n return rebasingCredits_;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() external view returns (uint256) {\\n return rebasingCredits_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @notice Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account) public view returns (uint256) {\\n RebaseOptions state = rebaseState[_account];\\n if (state == RebaseOptions.YieldDelegationSource) {\\n // Saves a slot read when transferring to or from a yield delegating source\\n // since we know creditBalances equals the balance.\\n return creditBalances[_account];\\n }\\n uint256 baseBalance = (creditBalances[_account] * 1e18) /\\n _creditsPerToken(_account);\\n if (state == RebaseOptions.YieldDelegationTarget) {\\n // creditBalances of yieldFrom accounts equals token balances\\n return baseBalance - creditBalances[yieldFrom[_account]];\\n }\\n return baseBalance;\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n external\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (creditBalances[_account], cpt);\\n } else {\\n return (\\n creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n creditBalances[_account],\\n _creditsPerToken(_account),\\n true // all accounts have their resolution \\\"upgraded\\\"\\n );\\n }\\n\\n // Backwards compatible view\\n function nonRebasingCreditsPerToken(address _account)\\n external\\n view\\n returns (uint256)\\n {\\n return alternativeCreditsPerToken[_account];\\n }\\n\\n /**\\n * @notice Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n * @return true on success.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n uint256 userAllowance = allowances[_from][msg.sender];\\n require(_value <= userAllowance, \\\"Allowance exceeded\\\");\\n\\n unchecked {\\n allowances[_from][msg.sender] = userAllowance - _value;\\n }\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n return true;\\n }\\n\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n (\\n int256 fromRebasingCreditsDiff,\\n int256 fromNonRebasingSupplyDiff\\n ) = _adjustAccount(_from, -_value.toInt256());\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_to, _value.toInt256());\\n\\n _adjustGlobals(\\n fromRebasingCreditsDiff + toRebasingCreditsDiff,\\n fromNonRebasingSupplyDiff + toNonRebasingSupplyDiff\\n );\\n }\\n\\n function _adjustAccount(address _account, int256 _balanceChange)\\n internal\\n returns (int256 rebasingCreditsDiff, int256 nonRebasingSupplyDiff)\\n {\\n RebaseOptions state = rebaseState[_account];\\n int256 currentBalance = balanceOf(_account).toInt256();\\n if (currentBalance + _balanceChange < 0) {\\n revert(\\\"Transfer amount exceeds balance\\\");\\n }\\n uint256 newBalance = (currentBalance + _balanceChange).toUint256();\\n\\n if (state == RebaseOptions.YieldDelegationSource) {\\n address target = yieldTo[_account];\\n uint256 targetOldBalance = balanceOf(target);\\n uint256 targetNewCredits = _balanceToRebasingCredits(\\n targetOldBalance + newBalance\\n );\\n rebasingCreditsDiff =\\n targetNewCredits.toInt256() -\\n creditBalances[target].toInt256();\\n\\n creditBalances[_account] = newBalance;\\n creditBalances[target] = targetNewCredits;\\n } else if (state == RebaseOptions.YieldDelegationTarget) {\\n uint256 newCredits = _balanceToRebasingCredits(\\n newBalance + creditBalances[yieldFrom[_account]]\\n );\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n } else {\\n _autoMigrate(_account);\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem > 0) {\\n nonRebasingSupplyDiff = _balanceChange;\\n if (alternativeCreditsPerTokenMem != 1e18) {\\n alternativeCreditsPerToken[_account] = 1e18;\\n }\\n creditBalances[_account] = newBalance;\\n } else {\\n uint256 newCredits = _balanceToRebasingCredits(newBalance);\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n }\\n }\\n }\\n\\n function _adjustGlobals(\\n int256 _rebasingCreditsDiff,\\n int256 _nonRebasingSupplyDiff\\n ) internal {\\n if (_rebasingCreditsDiff != 0) {\\n rebasingCredits_ = (rebasingCredits_.toInt256() +\\n _rebasingCreditsDiff).toUint256();\\n }\\n if (_nonRebasingSupplyDiff != 0) {\\n nonRebasingSupply = (nonRebasingSupply.toInt256() +\\n _nonRebasingSupplyDiff).toUint256();\\n }\\n }\\n\\n /**\\n * @notice Function to check the amount of tokens that _owner has allowed\\n * to `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[_owner][_spender];\\n }\\n\\n /**\\n * @notice Approve the passed address to spend the specified amount of\\n * tokens on behalf of msg.sender.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n * @return true on success.\\n */\\n function approve(address _spender, uint256 _value) external returns (bool) {\\n allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Creates `_amount` tokens and assigns them to `_account`,\\n * increasing the total supply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, _amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply + _amount;\\n\\n require(totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @notice Destroys `_amount` tokens from `_account`,\\n * reducing the total supply.\\n */\\n function burn(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, -_amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem != 0) {\\n return alternativeCreditsPerTokenMem;\\n } else {\\n return rebasingCreditsPerToken_;\\n }\\n }\\n\\n /**\\n * @dev Auto migrate contracts to be non rebasing,\\n * unless they have opted into yield.\\n * @param _account Address of the account.\\n */\\n function _autoMigrate(address _account) internal {\\n bool isContract = _account.code.length > 0;\\n // In previous code versions, contracts would not have had their\\n // rebaseState[_account] set to RebaseOptions.NonRebasing when migrated\\n // therefore we check the actual accounting used on the account instead.\\n if (\\n isContract &&\\n rebaseState[_account] == RebaseOptions.NotSet &&\\n alternativeCreditsPerToken[_account] == 0\\n ) {\\n _rebaseOptOut(_account);\\n }\\n }\\n\\n /**\\n * @dev Calculates credits from contract's global rebasingCreditsPerToken_, and\\n * also balance that corresponds to those credits. The latter is important\\n * when adjusting the contract's global nonRebasingSupply to circumvent any\\n * possible rounding errors.\\n *\\n * @param _balance Balance of the account.\\n */\\n function _balanceToRebasingCredits(uint256 _balance)\\n internal\\n view\\n returns (uint256 rebasingCredits)\\n {\\n // Rounds up, because we need to ensure that accounts always have\\n // at least the balance that they should have.\\n // Note this should always be used on an absolute account value,\\n // not on a possibly negative diff, because then the rounding would be wrong.\\n return ((_balance) * rebasingCreditsPerToken_ + 1e18 - 1) / 1e18;\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n * @param _account Address of the account.\\n */\\n function governanceRebaseOptIn(address _account) external onlyGovernor {\\n require(_account != address(0), \\\"Zero address not allowed\\\");\\n _rebaseOptIn(_account);\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n */\\n function rebaseOptIn() external {\\n _rebaseOptIn(msg.sender);\\n }\\n\\n function _rebaseOptIn(address _account) internal {\\n uint256 balance = balanceOf(_account);\\n\\n // prettier-ignore\\n require(\\n alternativeCreditsPerToken[_account] > 0 ||\\n // Accounts may explicitly `rebaseOptIn` regardless of\\n // accounting if they have a 0 balance.\\n creditBalances[_account] == 0\\n ,\\n \\\"Account must be non-rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n // prettier-ignore\\n require(\\n state == RebaseOptions.StdNonRebasing ||\\n state == RebaseOptions.NotSet,\\n \\\"Only standard non-rebasing accounts can opt in\\\"\\n );\\n\\n uint256 newCredits = _balanceToRebasingCredits(balance);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdRebasing;\\n alternativeCreditsPerToken[_account] = 0;\\n creditBalances[_account] = newCredits;\\n // Globals\\n _adjustGlobals(newCredits.toInt256(), -balance.toInt256());\\n\\n emit AccountRebasingEnabled(_account);\\n }\\n\\n /**\\n * @notice The calling account will no longer receive yield\\n */\\n function rebaseOptOut() external {\\n _rebaseOptOut(msg.sender);\\n }\\n\\n function _rebaseOptOut(address _account) internal {\\n require(\\n alternativeCreditsPerToken[_account] == 0,\\n \\\"Account must be rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n require(\\n state == RebaseOptions.StdRebasing || state == RebaseOptions.NotSet,\\n \\\"Only standard rebasing accounts can opt out\\\"\\n );\\n\\n uint256 oldCredits = creditBalances[_account];\\n uint256 balance = balanceOf(_account);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdNonRebasing;\\n alternativeCreditsPerToken[_account] = 1e18;\\n creditBalances[_account] = balance;\\n // Globals\\n _adjustGlobals(-oldCredits.toInt256(), balance.toInt256());\\n\\n emit AccountRebasingDisabled(_account);\\n }\\n\\n /**\\n * @notice Distribute yield to users. This changes the exchange rate\\n * between \\\"credits\\\" and OUSD tokens to change rebasing user's balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply) external onlyVault {\\n require(totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n return;\\n }\\n\\n totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n uint256 rebasingSupply = totalSupply - nonRebasingSupply;\\n // round up in the favour of the protocol\\n rebasingCreditsPerToken_ =\\n (rebasingCredits_ * 1e18 + rebasingSupply - 1) /\\n rebasingSupply;\\n\\n require(rebasingCreditsPerToken_ > 0, \\\"Invalid change in supply\\\");\\n\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n }\\n\\n /*\\n * @notice Send the yield from one account to another account.\\n * Each account keeps its own balances.\\n */\\n function delegateYield(address _from, address _to) external onlyGovernor {\\n require(_from != address(0), \\\"Zero from address not allowed\\\");\\n require(_to != address(0), \\\"Zero to address not allowed\\\");\\n\\n require(_from != _to, \\\"Cannot delegate to self\\\");\\n require(\\n yieldFrom[_to] == address(0) &&\\n yieldTo[_to] == address(0) &&\\n yieldFrom[_from] == address(0) &&\\n yieldTo[_from] == address(0),\\n \\\"Blocked by existing yield delegation\\\"\\n );\\n RebaseOptions stateFrom = rebaseState[_from];\\n RebaseOptions stateTo = rebaseState[_to];\\n\\n require(\\n stateFrom == RebaseOptions.NotSet ||\\n stateFrom == RebaseOptions.StdNonRebasing ||\\n stateFrom == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState from\\\"\\n );\\n\\n require(\\n stateTo == RebaseOptions.NotSet ||\\n stateTo == RebaseOptions.StdNonRebasing ||\\n stateTo == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState to\\\"\\n );\\n\\n if (alternativeCreditsPerToken[_from] == 0) {\\n _rebaseOptOut(_from);\\n }\\n if (alternativeCreditsPerToken[_to] > 0) {\\n _rebaseOptIn(_to);\\n }\\n\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(_to);\\n uint256 oldToCredits = creditBalances[_to];\\n uint256 newToCredits = _balanceToRebasingCredits(\\n fromBalance + toBalance\\n );\\n\\n // Set up the bidirectional links\\n yieldTo[_from] = _to;\\n yieldFrom[_to] = _from;\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.YieldDelegationSource;\\n alternativeCreditsPerToken[_from] = 1e18;\\n creditBalances[_from] = fromBalance;\\n rebaseState[_to] = RebaseOptions.YieldDelegationTarget;\\n creditBalances[_to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, -(fromBalance).toInt256());\\n emit YieldDelegated(_from, _to);\\n }\\n\\n /*\\n * @notice Stop sending the yield from one account to another account.\\n */\\n function undelegateYield(address _from) external onlyGovernor {\\n // Require a delegation, which will also ensure a valid delegation\\n require(yieldTo[_from] != address(0), \\\"Zero address not allowed\\\");\\n\\n address to = yieldTo[_from];\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(to);\\n uint256 oldToCredits = creditBalances[to];\\n uint256 newToCredits = _balanceToRebasingCredits(toBalance);\\n\\n // Remove the bidirectional links\\n yieldFrom[to] = address(0);\\n yieldTo[_from] = address(0);\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.StdNonRebasing;\\n // alternativeCreditsPerToken[from] already 1e18 from `delegateYield()`\\n creditBalances[_from] = fromBalance;\\n rebaseState[to] = RebaseOptions.StdRebasing;\\n // alternativeCreditsPerToken[to] already 0 from `delegateYield()`\\n creditBalances[to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, fromBalance.toInt256());\\n emit YieldUndelegated(_from, to);\\n }\\n}\\n\",\"keccak256\":\"0x5741d16e48d6031ec92c1e189ea023c78a34956b6bc9642ea9dfc9a6dafe49ca\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Helpers.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { IBasicToken } from \\\"../interfaces/IBasicToken.sol\\\";\\n\\nlibrary Helpers {\\n /**\\n * @notice Fetch the `symbol()` from an ERC20 token\\n * @dev Grabs the `symbol()` from a contract\\n * @param _token Address of the ERC20 token\\n * @return string Symbol of the ERC20 token\\n */\\n function getSymbol(address _token) internal view returns (string memory) {\\n string memory symbol = IBasicToken(_token).symbol();\\n return symbol;\\n }\\n\\n /**\\n * @notice Fetch the `decimals()` from an ERC20 token\\n * @dev Grabs the `decimals()` from a contract and fails if\\n * the decimal value does not live within a certain range\\n * @param _token Address of the ERC20 token\\n * @return uint256 Decimals of the ERC20 token\\n */\\n function getDecimals(address _token) internal view returns (uint256) {\\n uint256 decimals = IBasicToken(_token).decimals();\\n require(\\n decimals >= 4 && decimals <= 18,\\n \\\"Token must have sufficient decimal places\\\"\\n );\\n\\n return decimals;\\n }\\n}\\n\",\"keccak256\":\"0x4366f8d90b34c1eef8bbaaf369b1e5cd59f04027bb3c111f208eaee65bbc0346\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base contract any contracts that need to initialize state after deployment.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0x50d39ebf38a3d3111f2b77a6c75ece1d4ae731552fec4697ab16fcf6c0d4d5e8\",\"license\":\"BUSL-1.1\"},\"contracts/utils/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n\\n// Based on StableMath from Stability Labs Pty. Ltd.\\n// https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol\\n\\nlibrary StableMath {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Scaling unit for use in specific calculations,\\n * where 1 * 10**18, or 1e18 represents a unit '1'\\n */\\n uint256 private constant FULL_SCALE = 1e18;\\n\\n /***************************************\\n Helpers\\n ****************************************/\\n\\n /**\\n * @dev Adjust the scale of an integer\\n * @param to Decimals to scale to\\n * @param from Decimals to scale from\\n */\\n function scaleBy(\\n uint256 x,\\n uint256 to,\\n uint256 from\\n ) internal pure returns (uint256) {\\n if (to > from) {\\n x = x.mul(10**(to - from));\\n } else if (to < from) {\\n // slither-disable-next-line divide-before-multiply\\n x = x.div(10**(from - to));\\n }\\n return x;\\n }\\n\\n /***************************************\\n Precise Arithmetic\\n ****************************************/\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulTruncateScale(x, y, FULL_SCALE);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the given scale. For example,\\n * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @param scale Scale unit\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncateScale(\\n uint256 x,\\n uint256 y,\\n uint256 scale\\n ) internal pure returns (uint256) {\\n // e.g. assume scale = fullScale\\n // z = 10e18 * 9e17 = 9e36\\n uint256 z = x.mul(y);\\n // return 9e36 / 1e18 = 9e18\\n return z.div(scale);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit, rounded up to the closest base unit.\\n */\\n function mulTruncateCeil(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e17 * 17268172638 = 138145381104e17\\n uint256 scaled = x.mul(y);\\n // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17\\n uint256 ceil = scaled.add(FULL_SCALE.sub(1));\\n // e.g. 13814538111.399...e18 / 1e18 = 13814538111\\n return ceil.div(FULL_SCALE);\\n }\\n\\n /**\\n * @dev Precisely divides two units, by first scaling the left hand operand. Useful\\n * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)\\n * @param x Left hand input to division\\n * @param y Right hand input to division\\n * @return Result after multiplying the left operand by the scale, and\\n * executing the division on the right hand input.\\n */\\n function divPrecisely(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e18 * 1e18 = 8e36\\n uint256 z = x.mul(FULL_SCALE);\\n // e.g. 8e36 / 10e18 = 8e17\\n return z.div(y);\\n }\\n}\\n\",\"keccak256\":\"0x71d6ed0053a1e5ef018d27c3b6d024f336d8157ab6f6859e400b3243a50a71b7\",\"license\":\"BUSL-1.1\"},\"contracts/vault/OETHVaultCore.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { VaultCore } from \\\"./VaultCore.sol\\\";\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { IDripper } from \\\"../interfaces/IDripper.sol\\\";\\n\\n/**\\n * @title OETH VaultCore Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETHVaultCore is VaultCore {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n\\n address public immutable weth;\\n uint256 public wethAssetIndex;\\n\\n // For future use (because OETHBaseVaultCore inherits from this)\\n uint256[50] private __gap;\\n\\n constructor(address _weth) {\\n weth = _weth;\\n }\\n\\n /**\\n * @dev Caches WETH's index in `allAssets` variable.\\n * Reduces gas usage by redeem by caching that.\\n */\\n function cacheWETHAssetIndex() external onlyGovernor {\\n uint256 assetCount = allAssets.length;\\n for (uint256 i; i < assetCount; ++i) {\\n if (allAssets[i] == weth) {\\n wethAssetIndex = i;\\n break;\\n }\\n }\\n\\n require(allAssets[wethAssetIndex] == weth, \\\"Invalid WETH Asset Index\\\");\\n }\\n\\n // @inheritdoc VaultCore\\n function mintForStrategy(uint256 amount)\\n external\\n override\\n whenNotCapitalPaused\\n {\\n require(\\n strategies[msg.sender].isSupported == true,\\n \\\"Unsupported strategy\\\"\\n );\\n require(\\n isMintWhitelistedStrategy[msg.sender] == true,\\n \\\"Not whitelisted strategy\\\"\\n );\\n\\n emit Mint(msg.sender, amount);\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, amount);\\n }\\n\\n // @inheritdoc VaultCore\\n function burnForStrategy(uint256 amount)\\n external\\n override\\n whenNotCapitalPaused\\n {\\n require(\\n strategies[msg.sender].isSupported == true,\\n \\\"Unsupported strategy\\\"\\n );\\n require(\\n isMintWhitelistedStrategy[msg.sender] == true,\\n \\\"Not whitelisted strategy\\\"\\n );\\n\\n emit Redeem(msg.sender, amount);\\n\\n // Burn OTokens\\n oUSD.burn(msg.sender, amount);\\n }\\n\\n // @inheritdoc VaultCore\\n // slither-disable-start reentrancy-no-eth\\n function _mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) internal virtual override {\\n require(_asset == weth, \\\"Unsupported asset for minting\\\");\\n require(_amount > 0, \\\"Amount must be greater than 0\\\");\\n require(\\n _amount >= _minimumOusdAmount,\\n \\\"Mint amount lower than minimum\\\"\\n );\\n\\n emit Mint(msg.sender, _amount);\\n\\n // Rebase must happen before any transfers occur.\\n if (!rebasePaused && _amount >= rebaseThreshold) {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n _rebase();\\n }\\n\\n // Mint oTokens\\n oUSD.mint(msg.sender, _amount);\\n\\n // Transfer the deposited coins to the vault\\n IERC20(_asset).safeTransferFrom(msg.sender, address(this), _amount);\\n\\n // Give priority to the withdrawal queue for the new WETH liquidity\\n _addWithdrawalQueueLiquidity();\\n\\n // Auto-allocate if necessary\\n if (_amount >= autoAllocateThreshold) {\\n _allocate();\\n }\\n }\\n\\n // slither-disable-end reentrancy-no-eth\\n\\n // @inheritdoc VaultCore\\n function _calculateRedeemOutputs(uint256 _amount)\\n internal\\n view\\n virtual\\n override\\n returns (uint256[] memory outputs)\\n {\\n // Overrides `VaultCore._calculateRedeemOutputs` to redeem with only\\n // WETH instead of LST-mix. Doesn't change the function signature\\n // for backward compatibility\\n\\n // Calculate redeem fee\\n if (redeemFeeBps > 0) {\\n uint256 redeemFee = _amount.mulTruncateScale(redeemFeeBps, 1e4);\\n _amount = _amount - redeemFee;\\n }\\n\\n // Ensure that the WETH index is cached\\n uint256 _wethAssetIndex = wethAssetIndex;\\n require(\\n allAssets[_wethAssetIndex] == weth,\\n \\\"WETH Asset index not cached\\\"\\n );\\n\\n outputs = new uint256[](allAssets.length);\\n outputs[_wethAssetIndex] = _amount;\\n }\\n\\n // @inheritdoc VaultCore\\n function _redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n internal\\n virtual\\n override\\n {\\n // Override `VaultCore._redeem` to simplify it. Gets rid of oracle\\n // usage and looping through all assets for LST-mix redeem. Instead\\n // does a simple WETH-only redeem.\\n emit Redeem(msg.sender, _amount);\\n\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Amount excluding fees\\n // No fee for the strategist or the governor, makes it easier to do operations\\n uint256 amountMinusFee = (msg.sender == strategistAddr || isGovernor())\\n ? _amount\\n : _calculateRedeemOutputs(_amount)[wethAssetIndex];\\n\\n require(\\n amountMinusFee >= _minimumUnitAmount,\\n \\\"Redeem amount lower than minimum\\\"\\n );\\n\\n // Is there enough WETH in the Vault available after accounting for the withdrawal queue\\n require(_wethAvailable() >= amountMinusFee, \\\"Liquidity error\\\");\\n\\n // Transfer WETH minus the fee to the redeemer\\n IERC20(weth).safeTransfer(msg.sender, amountMinusFee);\\n\\n // Burn OETH from user (including fees)\\n oUSD.burn(msg.sender, _amount);\\n\\n // Prevent insolvency\\n _postRedeem(_amount);\\n }\\n\\n /**\\n * @notice Request an asynchronous withdrawal of WETH in exchange for OETH.\\n * The OETH is burned on request and the WETH is transferred to the withdrawer on claim.\\n * This request can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal this request's `queued` amount.\\n * There is a minimum of 10 minutes before a request can be claimed. After that, the request just needs\\n * enough WETH liquidity in the Vault to satisfy all the outstanding requests to that point in the queue.\\n * OETH is converted to WETH at 1:1.\\n * @param _amount Amount of OETH to burn.\\n * @return requestId Unique ID for the withdrawal request\\n * @return queued Cumulative total of all WETH queued including already claimed requests.\\n */\\n function requestWithdrawal(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256 requestId, uint256 queued)\\n {\\n require(withdrawalClaimDelay > 0, \\\"Async withdrawals not enabled\\\");\\n\\n // The check that the requester has enough OETH is done in to later burn call\\n\\n requestId = withdrawalQueueMetadata.nextWithdrawalIndex;\\n queued = withdrawalQueueMetadata.queued + _amount;\\n\\n // Store the next withdrawal request\\n withdrawalQueueMetadata.nextWithdrawalIndex = SafeCast.toUint128(\\n requestId + 1\\n );\\n // Store the updated queued amount which reserves WETH in the withdrawal queue\\n // and reduces the vault's total assets\\n withdrawalQueueMetadata.queued = SafeCast.toUint128(queued);\\n // Store the user's withdrawal request\\n withdrawalRequests[requestId] = WithdrawalRequest({\\n withdrawer: msg.sender,\\n claimed: false,\\n timestamp: uint40(block.timestamp),\\n amount: SafeCast.toUint128(_amount),\\n queued: SafeCast.toUint128(queued)\\n });\\n\\n // Burn the user's OETH\\n oUSD.burn(msg.sender, _amount);\\n\\n // Prevent withdrawal if the vault is solvent by more than the the allowed percentage\\n _postRedeem(_amount);\\n\\n emit WithdrawalRequested(msg.sender, requestId, _amount, queued);\\n }\\n\\n // slither-disable-start reentrancy-no-eth\\n /**\\n * @notice Claim a previously requested withdrawal once it is claimable.\\n * This request can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal this request's `queued` amount and 10 minutes has passed.\\n * If the requests is not claimable, the transaction will revert with `Queue pending liquidity`.\\n * If the request is not older than 10 minutes, the transaction will revert with `Claim delay not met`.\\n * OETH is converted to WETH at 1:1.\\n * @param _requestId Unique ID for the withdrawal request\\n * @return amount Amount of WETH transferred to the withdrawer\\n */\\n function claimWithdrawal(uint256 _requestId)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256 amount)\\n {\\n // Try and get more liquidity if there is not enough available\\n if (\\n withdrawalRequests[_requestId].queued >\\n withdrawalQueueMetadata.claimable\\n ) {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n // Add any WETH from the Dripper to the withdrawal queue\\n _addWithdrawalQueueLiquidity();\\n }\\n\\n amount = _claimWithdrawal(_requestId);\\n\\n // transfer WETH from the vault to the withdrawer\\n IERC20(weth).safeTransfer(msg.sender, amount);\\n\\n // Prevent insolvency\\n _postRedeem(amount);\\n }\\n\\n // slither-disable-end reentrancy-no-eth\\n\\n /**\\n * @notice Claim a previously requested withdrawals once they are claimable.\\n * This requests can be claimed once the withdrawal queue's `claimable` amount\\n * is greater than or equal each request's `queued` amount and 10 minutes has passed.\\n * If one of the requests is not claimable, the whole transaction will revert with `Queue pending liquidity`.\\n * If one of the requests is not older than 10 minutes,\\n * the whole transaction will revert with `Claim delay not met`.\\n * @param _requestIds Unique ID of each withdrawal request\\n * @return amounts Amount of WETH received for each request\\n * @return totalAmount Total amount of WETH transferred to the withdrawer\\n */\\n function claimWithdrawals(uint256[] calldata _requestIds)\\n external\\n virtual\\n whenNotCapitalPaused\\n nonReentrant\\n returns (uint256[] memory amounts, uint256 totalAmount)\\n {\\n // Just call the Dripper instead of looping through _requestIds to find the highest id\\n // and checking it's queued amount is > the queue's claimable amount.\\n\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n // Add any WETH from the Dripper to the withdrawal queue\\n _addWithdrawalQueueLiquidity();\\n\\n amounts = new uint256[](_requestIds.length);\\n for (uint256 i; i < _requestIds.length; ++i) {\\n amounts[i] = _claimWithdrawal(_requestIds[i]);\\n totalAmount += amounts[i];\\n }\\n\\n // transfer all the claimed WETH from the vault to the withdrawer\\n IERC20(weth).safeTransfer(msg.sender, totalAmount);\\n\\n // Prevent insolvency\\n _postRedeem(totalAmount);\\n }\\n\\n function _claimWithdrawal(uint256 requestId)\\n internal\\n returns (uint256 amount)\\n {\\n require(withdrawalClaimDelay > 0, \\\"Async withdrawals not enabled\\\");\\n\\n // Load the structs from storage into memory\\n WithdrawalRequest memory request = withdrawalRequests[requestId];\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n require(\\n request.timestamp + withdrawalClaimDelay <= block.timestamp,\\n \\\"Claim delay not met\\\"\\n );\\n // If there isn't enough reserved liquidity in the queue to claim\\n require(request.queued <= queue.claimable, \\\"Queue pending liquidity\\\");\\n require(request.withdrawer == msg.sender, \\\"Not requester\\\");\\n require(request.claimed == false, \\\"Already claimed\\\");\\n\\n // Store the request as claimed\\n withdrawalRequests[requestId].claimed = true;\\n // Store the updated claimed amount\\n withdrawalQueueMetadata.claimed = queue.claimed + request.amount;\\n\\n emit WithdrawalClaimed(msg.sender, requestId, request.amount);\\n\\n return request.amount;\\n }\\n\\n /// @notice Collects harvested rewards from the Dripper as WETH then\\n /// adds WETH to the withdrawal queue if there is a funding shortfall.\\n /// @dev is called from the Native Staking strategy when validator withdrawals are processed.\\n /// It also called before any WETH is allocated to a strategy.\\n function addWithdrawalQueueLiquidity() external {\\n // Stream any harvested rewards (WETH) that are available to the Vault\\n IDripper(dripper).collect();\\n\\n _addWithdrawalQueueLiquidity();\\n }\\n\\n /// @dev Adds WETH to the withdrawal queue if there is a funding shortfall.\\n /// This assumes 1 WETH equal 1 OETH.\\n function _addWithdrawalQueueLiquidity()\\n internal\\n returns (uint256 addedClaimable)\\n {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // Check if the claimable WETH is less than the queued amount\\n uint256 queueShortfall = queue.queued - queue.claimable;\\n\\n // No need to do anything is the withdrawal queue is full funded\\n if (queueShortfall == 0) {\\n return 0;\\n }\\n\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // Of the claimable withdrawal requests, how much is unclaimed?\\n // That is, the amount of WETH that is currently allocated for the withdrawal queue\\n uint256 allocatedWeth = queue.claimable - queue.claimed;\\n\\n // If there is no unallocated WETH then there is nothing to add to the queue\\n if (wethBalance <= allocatedWeth) {\\n return 0;\\n }\\n\\n uint256 unallocatedWeth = wethBalance - allocatedWeth;\\n\\n // the new claimable amount is the smaller of the queue shortfall or unallocated weth\\n addedClaimable = queueShortfall < unallocatedWeth\\n ? queueShortfall\\n : unallocatedWeth;\\n uint256 newClaimable = queue.claimable + addedClaimable;\\n\\n // Store the new claimable amount back to storage\\n withdrawalQueueMetadata.claimable = SafeCast.toUint128(newClaimable);\\n\\n // emit a WithdrawalClaimable event\\n emit WithdrawalClaimable(newClaimable, addedClaimable);\\n }\\n\\n /***************************************\\n View Functions\\n ****************************************/\\n\\n /// @dev Calculate how much WETH in the vault is not reserved for the withdrawal queue.\\n // That is, it is available to be redeemed or deposited into a strategy.\\n function _wethAvailable() internal view returns (uint256 wethAvailable) {\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // The amount of WETH that is still to be claimed in the withdrawal queue\\n uint256 outstandingWithdrawals = queue.queued - queue.claimed;\\n\\n // The amount of sitting in WETH in the vault\\n uint256 wethBalance = IERC20(weth).balanceOf(address(this));\\n\\n // If there is not enough WETH in the vault to cover the outstanding withdrawals\\n if (wethBalance <= outstandingWithdrawals) {\\n return 0;\\n }\\n\\n return wethBalance - outstandingWithdrawals;\\n }\\n\\n /// @dev Get the balance of an asset held in Vault and all strategies\\n /// less any WETH that is reserved for the withdrawal queue.\\n /// WETH is the only asset that can return a non-zero balance.\\n /// All other assets will return 0 even if there is some dust amounts left in the Vault.\\n /// For example, there is 1 wei left of stETH in the OETH Vault but will return 0 in this function.\\n ///\\n /// If there is not enough WETH in the vault and all strategies to cover all outstanding\\n /// withdrawal requests then return a WETH balance of 0\\n function _checkBalance(address _asset)\\n internal\\n view\\n override\\n returns (uint256 balance)\\n {\\n if (_asset != weth) {\\n return 0;\\n }\\n\\n // Get the WETH in the vault and the strategies\\n balance = super._checkBalance(_asset);\\n\\n WithdrawalQueueMetadata memory queue = withdrawalQueueMetadata;\\n\\n // If the vault becomes insolvent enough that the total value in the vault and all strategies\\n // is less than the outstanding withdrawals.\\n // For example, there was a mass slashing event and most users request a withdrawal.\\n if (balance + queue.claimed < queue.queued) {\\n return 0;\\n }\\n\\n // Need to remove WETH that is reserved for the withdrawal queue\\n return balance + queue.claimed - queue.queued;\\n }\\n\\n /**\\n * @notice Allocate unallocated funds on Vault to strategies.\\n **/\\n function allocate() external override whenNotCapitalPaused nonReentrant {\\n // Add any unallocated WETH to the withdrawal queue first\\n _addWithdrawalQueueLiquidity();\\n\\n _allocate();\\n }\\n\\n /// @dev Allocate WETH to the default WETH strategy if there is excess to the Vault buffer.\\n /// This is called from either `mint` or `allocate` and assumes `_addWithdrawalQueueLiquidity`\\n /// has been called before this function.\\n function _allocate() internal override {\\n // No need to do anything if no default strategy for WETH\\n address depositStrategyAddr = assetDefaultStrategies[weth];\\n if (depositStrategyAddr == address(0)) return;\\n\\n uint256 wethAvailableInVault = _wethAvailable();\\n // No need to do anything if there isn't any WETH in the vault to allocate\\n if (wethAvailableInVault == 0) return;\\n\\n // Calculate the target buffer for the vault using the total supply\\n uint256 totalSupply = oUSD.totalSupply();\\n uint256 targetBuffer = totalSupply.mulTruncate(vaultBuffer);\\n\\n // If available WETH in the Vault is below or equal the target buffer then there's nothing to allocate\\n if (wethAvailableInVault <= targetBuffer) return;\\n\\n // The amount of assets to allocate to the default strategy\\n uint256 allocateAmount = wethAvailableInVault - targetBuffer;\\n\\n IStrategy strategy = IStrategy(depositStrategyAddr);\\n // Transfer WETH to the strategy and call the strategy's deposit function\\n IERC20(weth).safeTransfer(address(strategy), allocateAmount);\\n strategy.deposit(weth, allocateAmount);\\n\\n emit AssetAllocated(weth, depositStrategyAddr, allocateAmount);\\n }\\n\\n /// @dev The total value of all WETH held by the vault and all its strategies\\n /// less any WETH that is reserved for the withdrawal queue.\\n ///\\n // If there is not enough WETH in the vault and all strategies to cover all outstanding\\n // withdrawal requests then return a total value of 0.\\n function _totalValue() internal view override returns (uint256 value) {\\n // As WETH is the only asset, just return the WETH balance\\n return _checkBalance(weth);\\n }\\n\\n /// @dev Only WETH is supported in the OETH Vault so return the WETH balance only\\n /// Any ETH balances in the Vault will be ignored.\\n /// Amounts from previously supported vault assets will also be ignored.\\n /// For example, there is 1 wei left of stETH in the OETH Vault but is will be ignored.\\n function _totalValueInVault()\\n internal\\n view\\n override\\n returns (uint256 value)\\n {\\n value = IERC20(weth).balanceOf(address(this));\\n }\\n}\\n\",\"keccak256\":\"0x13e9a4ea2004efc0142c1fc497708e508cd70e246b5f3a46dfa74e4345576957\",\"license\":\"BUSL-1.1\"},\"contracts/vault/VaultCore.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultCore contract\\n * @notice The Vault contract stores assets. On a deposit, OTokens will be minted\\n and sent to the depositor. On a withdrawal, OTokens will be burned and\\n assets will be sent to the withdrawer. The Vault accepts deposits of\\n interest from yield bearing strategies which will modify the supply\\n of OTokens.\\n * @author Origin Protocol Inc\\n */\\n\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { IOracle } from \\\"../interfaces/IOracle.sol\\\";\\nimport { IGetExchangeRateToken } from \\\"../interfaces/IGetExchangeRateToken.sol\\\";\\nimport { IDripper } from \\\"../interfaces/IDripper.sol\\\";\\n\\nimport \\\"./VaultInitializer.sol\\\";\\n\\ncontract VaultCore is VaultInitializer {\\n using SafeERC20 for IERC20;\\n using StableMath for uint256;\\n /// @dev max signed int\\n uint256 internal constant MAX_INT = uint256(type(int256).max);\\n\\n /**\\n * @dev Verifies that the rebasing is not paused.\\n */\\n modifier whenNotRebasePaused() {\\n require(!rebasePaused, \\\"Rebasing paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Verifies that the deposits are not paused.\\n */\\n modifier whenNotCapitalPaused() {\\n require(!capitalPaused, \\\"Capital paused\\\");\\n _;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the AMO strategy.\\n */\\n modifier onlyOusdMetaStrategy() {\\n require(\\n msg.sender == ousdMetaStrategy,\\n \\\"Caller is not the OUSD meta strategy\\\"\\n );\\n _;\\n }\\n\\n /**\\n * @notice Deposit a supported asset and mint OTokens.\\n * @param _asset Address of the asset being deposited\\n * @param _amount Amount of the asset being deposited\\n * @param _minimumOusdAmount Minimum OTokens to mint\\n */\\n function mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) external whenNotCapitalPaused nonReentrant {\\n _mint(_asset, _amount, _minimumOusdAmount);\\n }\\n\\n /**\\n * @dev Deposit a supported asset and mint OTokens.\\n * @param _asset Address of the asset being deposited\\n * @param _amount Amount of the asset being deposited\\n * @param _minimumOusdAmount Minimum OTokens to mint\\n */\\n function _mint(\\n address _asset,\\n uint256 _amount,\\n uint256 _minimumOusdAmount\\n ) internal virtual {\\n require(assets[_asset].isSupported, \\\"Asset is not supported\\\");\\n require(_amount > 0, \\\"Amount must be greater than 0\\\");\\n\\n uint256 units = _toUnits(_amount, _asset);\\n uint256 unitPrice = _toUnitPrice(_asset, true);\\n uint256 priceAdjustedDeposit = (units * unitPrice) / 1e18;\\n\\n if (_minimumOusdAmount > 0) {\\n require(\\n priceAdjustedDeposit >= _minimumOusdAmount,\\n \\\"Mint amount lower than minimum\\\"\\n );\\n }\\n\\n emit Mint(msg.sender, priceAdjustedDeposit);\\n\\n // Rebase must happen before any transfers occur.\\n if (priceAdjustedDeposit >= rebaseThreshold && !rebasePaused) {\\n if (dripper != address(0)) {\\n // Stream any harvested rewards that are available\\n IDripper(dripper).collect();\\n }\\n _rebase();\\n }\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, priceAdjustedDeposit);\\n\\n // Transfer the deposited coins to the vault\\n IERC20 asset = IERC20(_asset);\\n asset.safeTransferFrom(msg.sender, address(this), _amount);\\n\\n if (priceAdjustedDeposit >= autoAllocateThreshold) {\\n _allocate();\\n }\\n }\\n\\n /**\\n * @notice Mint OTokens for a Metapool Strategy\\n * @param _amount Amount of the asset being deposited\\n *\\n * Notice: can't use `nonReentrant` modifier since the `mint` function can\\n * call `allocate`, and that can trigger `ConvexOUSDMetaStrategy` to call this function\\n * while the execution of the `mint` has not yet completed -> causing a `nonReentrant` collision.\\n *\\n * Also important to understand is that this is a limitation imposed by the test suite.\\n * Production / mainnet contracts should never be configured in a way where mint/redeem functions\\n * that are moving funds between the Vault and end user wallets can influence strategies\\n * utilizing this function.\\n */\\n function mintForStrategy(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n onlyOusdMetaStrategy\\n {\\n require(_amount < MAX_INT, \\\"Amount too high\\\");\\n\\n emit Mint(msg.sender, _amount);\\n\\n // safe to cast because of the require check at the beginning of the function\\n netOusdMintedForStrategy += int256(_amount);\\n\\n require(\\n abs(netOusdMintedForStrategy) < netOusdMintForStrategyThreshold,\\n \\\"Minted ousd surpassed netOusdMintForStrategyThreshold.\\\"\\n );\\n\\n // Mint matching amount of OTokens\\n oUSD.mint(msg.sender, _amount);\\n }\\n\\n // In memoriam\\n\\n /**\\n * @notice Withdraw a supported asset and burn OTokens.\\n * @param _amount Amount of OTokens to burn\\n * @param _minimumUnitAmount Minimum stablecoin units to receive in return\\n */\\n function redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n external\\n whenNotCapitalPaused\\n nonReentrant\\n {\\n _redeem(_amount, _minimumUnitAmount);\\n }\\n\\n /**\\n * @notice Withdraw a supported asset and burn OTokens.\\n * @param _amount Amount of OTokens to burn\\n * @param _minimumUnitAmount Minimum stablecoin units to receive in return\\n */\\n function _redeem(uint256 _amount, uint256 _minimumUnitAmount)\\n internal\\n virtual\\n {\\n // Calculate redemption outputs\\n uint256[] memory outputs = _calculateRedeemOutputs(_amount);\\n\\n emit Redeem(msg.sender, _amount);\\n\\n // Send outputs\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n if (outputs[i] == 0) continue;\\n\\n address assetAddr = allAssets[i];\\n\\n if (IERC20(assetAddr).balanceOf(address(this)) >= outputs[i]) {\\n // Use Vault funds first if sufficient\\n IERC20(assetAddr).safeTransfer(msg.sender, outputs[i]);\\n } else {\\n address strategyAddr = assetDefaultStrategies[assetAddr];\\n if (strategyAddr != address(0)) {\\n // Nothing in Vault, but something in Strategy, send from there\\n IStrategy strategy = IStrategy(strategyAddr);\\n strategy.withdraw(msg.sender, assetAddr, outputs[i]);\\n } else {\\n // Cant find funds anywhere\\n revert(\\\"Liquidity error\\\");\\n }\\n }\\n }\\n\\n if (_minimumUnitAmount > 0) {\\n uint256 unitTotal = 0;\\n for (uint256 i = 0; i < outputs.length; ++i) {\\n unitTotal += _toUnits(outputs[i], allAssets[i]);\\n }\\n require(\\n unitTotal >= _minimumUnitAmount,\\n \\\"Redeem amount lower than minimum\\\"\\n );\\n }\\n\\n oUSD.burn(msg.sender, _amount);\\n\\n _postRedeem(_amount);\\n }\\n\\n function _postRedeem(uint256 _amount) internal {\\n // Until we can prove that we won't affect the prices of our assets\\n // by withdrawing them, this should be here.\\n // It's possible that a strategy was off on its asset total, perhaps\\n // a reward token sold for more or for less than anticipated.\\n uint256 totalUnits = 0;\\n if (_amount >= rebaseThreshold && !rebasePaused) {\\n totalUnits = _rebase();\\n } else {\\n totalUnits = _totalValue();\\n }\\n\\n // Check that the OTokens are backed by enough assets\\n if (maxSupplyDiff > 0) {\\n // If there are more outstanding withdrawal requests than assets in the vault and strategies\\n // then the available assets will be negative and totalUnits will be rounded up to zero.\\n // As we don't know the exact shortfall amount, we will reject all redeem and withdrawals\\n require(totalUnits > 0, \\\"Too many outstanding requests\\\");\\n\\n // Allow a max difference of maxSupplyDiff% between\\n // backing assets value and OUSD total supply\\n uint256 diff = oUSD.totalSupply().divPrecisely(totalUnits);\\n require(\\n (diff > 1e18 ? diff - 1e18 : 1e18 - diff) <= maxSupplyDiff,\\n \\\"Backing supply liquidity error\\\"\\n );\\n }\\n }\\n\\n /**\\n * @notice Burn OTokens for Metapool Strategy\\n * @param _amount Amount of OUSD to burn\\n *\\n * @dev Notice: can't use `nonReentrant` modifier since the `redeem` function could\\n * require withdrawal on `ConvexOUSDMetaStrategy` and that one can call `burnForStrategy`\\n * while the execution of the `redeem` has not yet completed -> causing a `nonReentrant` collision.\\n *\\n * Also important to understand is that this is a limitation imposed by the test suite.\\n * Production / mainnet contracts should never be configured in a way where mint/redeem functions\\n * that are moving funds between the Vault and end user wallets can influence strategies\\n * utilizing this function.\\n */\\n function burnForStrategy(uint256 _amount)\\n external\\n virtual\\n whenNotCapitalPaused\\n onlyOusdMetaStrategy\\n {\\n require(_amount < MAX_INT, \\\"Amount too high\\\");\\n\\n emit Redeem(msg.sender, _amount);\\n\\n // safe to cast because of the require check at the beginning of the function\\n netOusdMintedForStrategy -= int256(_amount);\\n\\n require(\\n abs(netOusdMintedForStrategy) < netOusdMintForStrategyThreshold,\\n \\\"Attempting to burn too much OUSD.\\\"\\n );\\n\\n // Burn OTokens\\n oUSD.burn(msg.sender, _amount);\\n }\\n\\n /**\\n * @notice Allocate unallocated funds on Vault to strategies.\\n **/\\n function allocate() external virtual whenNotCapitalPaused nonReentrant {\\n _allocate();\\n }\\n\\n /**\\n * @dev Allocate unallocated funds on Vault to strategies.\\n **/\\n function _allocate() internal virtual {\\n uint256 vaultValue = _totalValueInVault();\\n // Nothing in vault to allocate\\n if (vaultValue == 0) return;\\n uint256 strategiesValue = _totalValueInStrategies();\\n // We have a method that does the same as this, gas optimisation\\n uint256 calculatedTotalValue = vaultValue + strategiesValue;\\n\\n // We want to maintain a buffer on the Vault so calculate a percentage\\n // modifier to multiply each amount being allocated by to enforce the\\n // vault buffer\\n uint256 vaultBufferModifier;\\n if (strategiesValue == 0) {\\n // Nothing in Strategies, allocate 100% minus the vault buffer to\\n // strategies\\n vaultBufferModifier = uint256(1e18) - vaultBuffer;\\n } else {\\n vaultBufferModifier =\\n (vaultBuffer * calculatedTotalValue) /\\n vaultValue;\\n if (1e18 > vaultBufferModifier) {\\n // E.g. 1e18 - (1e17 * 10e18)/5e18 = 8e17\\n // (5e18 * 8e17) / 1e18 = 4e18 allocated from Vault\\n vaultBufferModifier = uint256(1e18) - vaultBufferModifier;\\n } else {\\n // We need to let the buffer fill\\n return;\\n }\\n }\\n if (vaultBufferModifier == 0) return;\\n\\n // Iterate over all assets in the Vault and allocate to the appropriate\\n // strategy\\n uint256 assetCount = allAssets.length;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n IERC20 asset = IERC20(allAssets[i]);\\n uint256 assetBalance = asset.balanceOf(address(this));\\n // No balance, nothing to do here\\n if (assetBalance == 0) continue;\\n\\n // Multiply the balance by the vault buffer modifier and truncate\\n // to the scale of the asset decimals\\n uint256 allocateAmount = assetBalance.mulTruncate(\\n vaultBufferModifier\\n );\\n\\n address depositStrategyAddr = assetDefaultStrategies[\\n address(asset)\\n ];\\n\\n if (depositStrategyAddr != address(0) && allocateAmount > 0) {\\n IStrategy strategy = IStrategy(depositStrategyAddr);\\n // Transfer asset to Strategy and call deposit method to\\n // mint or take required action\\n asset.safeTransfer(address(strategy), allocateAmount);\\n strategy.deposit(address(asset), allocateAmount);\\n emit AssetAllocated(\\n address(asset),\\n depositStrategyAddr,\\n allocateAmount\\n );\\n }\\n }\\n }\\n\\n /**\\n * @notice Calculate the total value of assets held by the Vault and all\\n * strategies and update the supply of OTokens.\\n */\\n function rebase() external virtual nonReentrant {\\n _rebase();\\n }\\n\\n /**\\n * @dev Calculate the total value of assets held by the Vault and all\\n * strategies and update the supply of OTokens, optionally sending a\\n * portion of the yield to the trustee.\\n * @return totalUnits Total balance of Vault in units\\n */\\n function _rebase() internal whenNotRebasePaused returns (uint256) {\\n uint256 supply = oUSD.totalSupply();\\n uint256 vaultValue = _totalValue();\\n // If no supply yet, do not rebase\\n if (supply == 0) {\\n return vaultValue;\\n }\\n\\n // Calculate yield and new supply\\n (uint256 yield, uint256 targetRate) = _nextYield(supply, vaultValue);\\n uint256 newSupply = supply + yield;\\n // Only rebase upwards and if we have enough backing funds\\n if (newSupply <= supply || newSupply > vaultValue) {\\n return vaultValue;\\n }\\n\\n rebasePerSecondTarget = uint64(_min(targetRate, type(uint64).max));\\n lastRebase = uint64(block.timestamp); // Intentional cast\\n\\n // Fee collection on yield\\n address _trusteeAddress = trusteeAddress; // gas savings\\n uint256 fee = 0;\\n if (_trusteeAddress != address(0)) {\\n fee = (yield * trusteeFeeBps) / 1e4;\\n if (fee > 0) {\\n require(fee < yield, \\\"Fee must not be greater than yield\\\");\\n oUSD.mint(_trusteeAddress, fee);\\n }\\n }\\n emit YieldDistribution(_trusteeAddress, yield, fee);\\n\\n // Only ratchet OToken supply upwards\\n // Final check uses latest totalSupply\\n if (newSupply > oUSD.totalSupply()) {\\n oUSD.changeSupply(newSupply);\\n }\\n return vaultValue;\\n }\\n\\n /**\\n * @notice Calculates the amount that would rebase at at next rebase.\\n * This is before any fees.\\n * @return yield amount of expected yield\\n */\\n function previewYield() external view returns (uint256 yield) {\\n (yield, ) = _nextYield(oUSD.totalSupply(), _totalValue());\\n return yield;\\n }\\n\\n function _nextYield(uint256 supply, uint256 vaultValue)\\n internal\\n view\\n virtual\\n returns (uint256 yield, uint256 targetRate)\\n {\\n uint256 nonRebasing = oUSD.nonRebasingSupply();\\n uint256 rebasing = supply - nonRebasing;\\n uint256 elapsed = block.timestamp - lastRebase;\\n targetRate = rebasePerSecondTarget;\\n\\n if (\\n elapsed == 0 || // Yield only once per block.\\n rebasing == 0 || // No yield if there are no rebasing tokens to give it to.\\n supply > vaultValue || // No yield if we do not have yield to give.\\n block.timestamp >= type(uint64).max // No yield if we are too far in the future to calculate it correctly.\\n ) {\\n return (0, targetRate);\\n }\\n\\n // Start with the full difference available\\n yield = vaultValue - supply;\\n\\n // Cap via optional automatic duration smoothing\\n uint256 _dripDuration = dripDuration;\\n if (_dripDuration > 1) {\\n // If we are able to sustain an increased drip rate for\\n // double the duration, then increase the target drip rate\\n targetRate = _max(targetRate, yield / (_dripDuration * 2));\\n // If we cannot sustain the target rate any more,\\n // then rebase what we can, and reduce the target\\n targetRate = _min(targetRate, yield / _dripDuration);\\n // drip at the new target rate\\n yield = _min(yield, targetRate * elapsed);\\n }\\n\\n // Cap per second. elapsed is not 1e18 denominated\\n yield = _min(yield, (rebasing * elapsed * rebasePerSecondMax) / 1e18);\\n\\n // Cap at a hard max per rebase, to avoid long durations resulting in huge rebases\\n yield = _min(yield, (rebasing * MAX_REBASE) / 1e18);\\n\\n return (yield, targetRate);\\n }\\n\\n /**\\n * @notice Determine the total value of assets held by the vault and its\\n * strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function totalValue() external view virtual returns (uint256 value) {\\n value = _totalValue();\\n }\\n\\n /**\\n * @dev Internal Calculate the total value of the assets held by the\\n * vault and its strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValue() internal view virtual returns (uint256 value) {\\n return _totalValueInVault() + _totalValueInStrategies();\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held in Vault.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInVault()\\n internal\\n view\\n virtual\\n returns (uint256 value)\\n {\\n uint256 assetCount = allAssets.length;\\n for (uint256 y; y < assetCount; ++y) {\\n address assetAddr = allAssets[y];\\n uint256 balance = IERC20(assetAddr).balanceOf(address(this));\\n if (balance > 0) {\\n value += _toUnits(balance, assetAddr);\\n }\\n }\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held in Strategies.\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInStrategies() internal view returns (uint256 value) {\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n value = value + _totalValueInStrategy(allStrategies[i]);\\n }\\n }\\n\\n /**\\n * @dev Internal to calculate total value of all assets held by strategy.\\n * @param _strategyAddr Address of the strategy\\n * @return value Total value in USD/ETH (1e18)\\n */\\n function _totalValueInStrategy(address _strategyAddr)\\n internal\\n view\\n returns (uint256 value)\\n {\\n IStrategy strategy = IStrategy(_strategyAddr);\\n uint256 assetCount = allAssets.length;\\n for (uint256 y; y < assetCount; ++y) {\\n address assetAddr = allAssets[y];\\n if (strategy.supportsAsset(assetAddr)) {\\n uint256 balance = strategy.checkBalance(assetAddr);\\n if (balance > 0) {\\n value += _toUnits(balance, assetAddr);\\n }\\n }\\n }\\n }\\n\\n /**\\n * @notice Get the balance of an asset held in Vault and all strategies.\\n * @param _asset Address of asset\\n * @return uint256 Balance of asset in decimals of asset\\n */\\n function checkBalance(address _asset) external view returns (uint256) {\\n return _checkBalance(_asset);\\n }\\n\\n /**\\n * @notice Get the balance of an asset held in Vault and all strategies.\\n * @param _asset Address of asset\\n * @return balance Balance of asset in decimals of asset\\n */\\n function _checkBalance(address _asset)\\n internal\\n view\\n virtual\\n returns (uint256 balance)\\n {\\n IERC20 asset = IERC20(_asset);\\n balance = asset.balanceOf(address(this));\\n uint256 stratCount = allStrategies.length;\\n for (uint256 i = 0; i < stratCount; ++i) {\\n IStrategy strategy = IStrategy(allStrategies[i]);\\n if (strategy.supportsAsset(_asset)) {\\n balance = balance + strategy.checkBalance(_asset);\\n }\\n }\\n }\\n\\n /**\\n * @notice Calculate the outputs for a redeem function, i.e. the mix of\\n * coins that will be returned\\n */\\n function calculateRedeemOutputs(uint256 _amount)\\n external\\n view\\n returns (uint256[] memory)\\n {\\n return _calculateRedeemOutputs(_amount);\\n }\\n\\n /**\\n * @dev Calculate the outputs for a redeem function, i.e. the mix of\\n * coins that will be returned.\\n * @return outputs Array of amounts respective to the supported assets\\n */\\n function _calculateRedeemOutputs(uint256 _amount)\\n internal\\n view\\n virtual\\n returns (uint256[] memory outputs)\\n {\\n // We always give out coins in proportion to how many we have,\\n // Now if all coins were the same value, this math would easy,\\n // just take the percentage of each coin, and multiply by the\\n // value to be given out. But if coins are worth more than $1,\\n // then we would end up handing out too many coins. We need to\\n // adjust by the total value of coins.\\n //\\n // To do this, we total up the value of our coins, by their\\n // percentages. Then divide what we would otherwise give out by\\n // this number.\\n //\\n // Let say we have 100 DAI at $1.06 and 200 USDT at $1.00.\\n // So for every 1 DAI we give out, we'll be handing out 2 USDT\\n // Our total output ratio is: 33% * 1.06 + 66% * 1.00 = 1.02\\n //\\n // So when calculating the output, we take the percentage of\\n // each coin, times the desired output value, divided by the\\n // totalOutputRatio.\\n //\\n // For example, withdrawing: 30 OUSD:\\n // DAI 33% * 30 / 1.02 = 9.80 DAI\\n // USDT = 66 % * 30 / 1.02 = 19.60 USDT\\n //\\n // Checking these numbers:\\n // 9.80 DAI * 1.06 = $10.40\\n // 19.60 USDT * 1.00 = $19.60\\n //\\n // And so the user gets $10.40 + $19.60 = $30 worth of value.\\n\\n uint256 assetCount = allAssets.length;\\n uint256[] memory assetUnits = new uint256[](assetCount);\\n uint256[] memory assetBalances = new uint256[](assetCount);\\n outputs = new uint256[](assetCount);\\n\\n // Calculate redeem fee\\n if (redeemFeeBps > 0) {\\n uint256 redeemFee = _amount.mulTruncateScale(redeemFeeBps, 1e4);\\n _amount = _amount - redeemFee;\\n }\\n\\n // Calculate assets balances and decimals once,\\n // for a large gas savings.\\n uint256 totalUnits = 0;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n address assetAddr = allAssets[i];\\n uint256 balance = _checkBalance(assetAddr);\\n assetBalances[i] = balance;\\n assetUnits[i] = _toUnits(balance, assetAddr);\\n totalUnits = totalUnits + assetUnits[i];\\n }\\n // Calculate totalOutputRatio\\n uint256 totalOutputRatio = 0;\\n for (uint256 i = 0; i < assetCount; ++i) {\\n uint256 unitPrice = _toUnitPrice(allAssets[i], false);\\n uint256 ratio = (assetUnits[i] * unitPrice) / totalUnits;\\n totalOutputRatio = totalOutputRatio + ratio;\\n }\\n // Calculate final outputs\\n uint256 factor = _amount.divPrecisely(totalOutputRatio);\\n for (uint256 i = 0; i < assetCount; ++i) {\\n outputs[i] = (assetBalances[i] * factor) / totalUnits;\\n }\\n }\\n\\n /***************************************\\n Pricing\\n ****************************************/\\n\\n /**\\n * @notice Returns the total price in 18 digit units for a given asset.\\n * Never goes above 1, since that is how we price mints.\\n * @param asset address of the asset\\n * @return price uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\\n */\\n function priceUnitMint(address asset)\\n external\\n view\\n returns (uint256 price)\\n {\\n /* need to supply 1 asset unit in asset's decimals and can not just hard-code\\n * to 1e18 and ignore calling `_toUnits` since we need to consider assets\\n * with the exchange rate\\n */\\n uint256 units = _toUnits(\\n uint256(1e18).scaleBy(_getDecimals(asset), 18),\\n asset\\n );\\n price = (_toUnitPrice(asset, true) * units) / 1e18;\\n }\\n\\n /**\\n * @notice Returns the total price in 18 digit unit for a given asset.\\n * Never goes below 1, since that is how we price redeems\\n * @param asset Address of the asset\\n * @return price uint256: unit (USD / ETH) price for 1 unit of the asset, in 18 decimal fixed\\n */\\n function priceUnitRedeem(address asset)\\n external\\n view\\n returns (uint256 price)\\n {\\n /* need to supply 1 asset unit in asset's decimals and can not just hard-code\\n * to 1e18 and ignore calling `_toUnits` since we need to consider assets\\n * with the exchange rate\\n */\\n uint256 units = _toUnits(\\n uint256(1e18).scaleBy(_getDecimals(asset), 18),\\n asset\\n );\\n price = (_toUnitPrice(asset, false) * units) / 1e18;\\n }\\n\\n /***************************************\\n Utils\\n ****************************************/\\n\\n /**\\n * @dev Convert a quantity of a token into 1e18 fixed decimal \\\"units\\\"\\n * in the underlying base (USD/ETH) used by the vault.\\n * Price is not taken into account, only quantity.\\n *\\n * Examples of this conversion:\\n *\\n * - 1e18 DAI becomes 1e18 units (same decimals)\\n * - 1e6 USDC becomes 1e18 units (decimal conversion)\\n * - 1e18 rETH becomes 1.2e18 units (exchange rate conversion)\\n *\\n * @param _raw Quantity of asset\\n * @param _asset Core Asset address\\n * @return value 1e18 normalized quantity of units\\n */\\n function _toUnits(uint256 _raw, address _asset)\\n internal\\n view\\n returns (uint256)\\n {\\n UnitConversion conversion = assets[_asset].unitConversion;\\n if (conversion == UnitConversion.DECIMALS) {\\n return _raw.scaleBy(18, _getDecimals(_asset));\\n } else if (conversion == UnitConversion.GETEXCHANGERATE) {\\n uint256 exchangeRate = IGetExchangeRateToken(_asset)\\n .getExchangeRate();\\n return (_raw * exchangeRate) / 1e18;\\n } else {\\n revert(\\\"Unsupported conversion type\\\");\\n }\\n }\\n\\n /**\\n * @dev Returns asset's unit price accounting for different asset types\\n * and takes into account the context in which that price exists -\\n * - mint or redeem.\\n *\\n * Note: since we are returning the price of the unit and not the one of the\\n * asset (see comment above how 1 rETH exchanges for 1.2 units) we need\\n * to make the Oracle price adjustment as well since we are pricing the\\n * units and not the assets.\\n *\\n * The price also snaps to a \\\"full unit price\\\" in case a mint or redeem\\n * action would be unfavourable to the protocol.\\n *\\n */\\n function _toUnitPrice(address _asset, bool isMint)\\n internal\\n view\\n returns (uint256 price)\\n {\\n UnitConversion conversion = assets[_asset].unitConversion;\\n price = IOracle(priceProvider).price(_asset);\\n\\n if (conversion == UnitConversion.GETEXCHANGERATE) {\\n uint256 exchangeRate = IGetExchangeRateToken(_asset)\\n .getExchangeRate();\\n price = (price * 1e18) / exchangeRate;\\n } else if (conversion != UnitConversion.DECIMALS) {\\n revert(\\\"Unsupported conversion type\\\");\\n }\\n\\n /* At this stage the price is already adjusted to the unit\\n * so the price checks are agnostic to underlying asset being\\n * pegged to a USD or to an ETH or having a custom exchange rate.\\n */\\n require(price <= MAX_UNIT_PRICE_DRIFT, \\\"Vault: Price exceeds max\\\");\\n require(price >= MIN_UNIT_PRICE_DRIFT, \\\"Vault: Price under min\\\");\\n\\n if (isMint) {\\n /* Never price a normalized unit price for more than one\\n * unit of OETH/OUSD when minting.\\n */\\n if (price > 1e18) {\\n price = 1e18;\\n }\\n require(price >= MINT_MINIMUM_UNIT_PRICE, \\\"Asset price below peg\\\");\\n } else {\\n /* Never give out more than 1 normalized unit amount of assets\\n * for one unit of OETH/OUSD when redeeming.\\n */\\n if (price < 1e18) {\\n price = 1e18;\\n }\\n }\\n }\\n\\n /**\\n * @dev Get the number of decimals of a token asset\\n * @param _asset Address of the asset\\n * @return decimals number of decimals\\n */\\n function _getDecimals(address _asset)\\n internal\\n view\\n returns (uint256 decimals)\\n {\\n decimals = assets[_asset].decimals;\\n require(decimals > 0, \\\"Decimals not cached\\\");\\n }\\n\\n /**\\n * @notice Return the number of assets supported by the Vault.\\n */\\n function getAssetCount() public view returns (uint256) {\\n return allAssets.length;\\n }\\n\\n /**\\n * @notice Gets the vault configuration of a supported asset.\\n * @param _asset Address of the token asset\\n */\\n function getAssetConfig(address _asset)\\n public\\n view\\n returns (Asset memory config)\\n {\\n config = assets[_asset];\\n }\\n\\n /**\\n * @notice Return all vault asset addresses in order\\n */\\n function getAllAssets() external view returns (address[] memory) {\\n return allAssets;\\n }\\n\\n /**\\n * @notice Return the number of strategies active on the Vault.\\n */\\n function getStrategyCount() external view returns (uint256) {\\n return allStrategies.length;\\n }\\n\\n /**\\n * @notice Return the array of all strategies\\n */\\n function getAllStrategies() external view returns (address[] memory) {\\n return allStrategies;\\n }\\n\\n /**\\n * @notice Returns whether the vault supports the asset\\n * @param _asset address of the asset\\n * @return true if supported\\n */\\n function isSupportedAsset(address _asset) external view returns (bool) {\\n return assets[_asset].isSupported;\\n }\\n\\n function ADMIN_IMPLEMENTATION() external view returns (address adminImpl) {\\n bytes32 slot = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n adminImpl := sload(slot)\\n }\\n }\\n\\n /**\\n * @dev Falldown to the admin implementation\\n * @notice This is a catch all for all functions not declared in core\\n */\\n // solhint-disable-next-line no-complex-fallback\\n fallback() external {\\n bytes32 slot = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(\\n gas(),\\n sload(slot),\\n 0,\\n calldatasize(),\\n 0,\\n 0\\n )\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n function abs(int256 x) private pure returns (uint256) {\\n require(x < int256(MAX_INT), \\\"Amount too high\\\");\\n return x >= 0 ? uint256(x) : uint256(-x);\\n }\\n\\n function _min(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a < b ? a : b;\\n }\\n\\n function _max(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a > b ? a : b;\\n }\\n}\\n\",\"keccak256\":\"0x6f02349bdc834d0271a9494ed449c88610da3eb59469e0a7ff1ddbc8b8ed7ee4\",\"license\":\"BUSL-1.1\"},\"contracts/vault/VaultInitializer.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultInitializer contract\\n * @notice The Vault contract initializes the vault.\\n * @author Origin Protocol Inc\\n */\\n\\nimport \\\"./VaultStorage.sol\\\";\\n\\ncontract VaultInitializer is VaultStorage {\\n function initialize(address _priceProvider, address _oToken)\\n external\\n onlyGovernor\\n initializer\\n {\\n require(_priceProvider != address(0), \\\"PriceProvider address is zero\\\");\\n require(_oToken != address(0), \\\"oToken address is zero\\\");\\n\\n oUSD = OUSD(_oToken);\\n\\n priceProvider = _priceProvider;\\n\\n rebasePaused = false;\\n capitalPaused = true;\\n\\n // Initial redeem fee of 0 basis points\\n redeemFeeBps = 0;\\n // Initial Vault buffer of 0%\\n vaultBuffer = 0;\\n // Initial allocate threshold of 25,000 OUSD\\n autoAllocateThreshold = 25000e18;\\n // Threshold for rebasing\\n rebaseThreshold = 1000e18;\\n // Initialize all strategies\\n allStrategies = new address[](0);\\n // Start with drip duration disabled\\n dripDuration = 1;\\n }\\n}\\n\",\"keccak256\":\"0x5555eb1e24efd4b14a7c46780e02ff58d6bdd063801a1f74715ea8a5426c634a\",\"license\":\"BUSL-1.1\"},\"contracts/vault/VaultStorage.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OToken VaultStorage contract\\n * @notice The VaultStorage contract defines the storage for the Vault contracts\\n * @author Origin Protocol Inc\\n */\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { IStrategy } from \\\"../interfaces/IStrategy.sol\\\";\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { OUSD } from \\\"../token/OUSD.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport \\\"../utils/Helpers.sol\\\";\\n\\ncontract VaultStorage is Initializable, Governable {\\n using SafeERC20 for IERC20;\\n\\n event AssetSupported(address _asset);\\n event AssetRemoved(address _asset);\\n event AssetDefaultStrategyUpdated(address _asset, address _strategy);\\n event AssetAllocated(address _asset, address _strategy, uint256 _amount);\\n event StrategyApproved(address _addr);\\n event StrategyRemoved(address _addr);\\n event Mint(address _addr, uint256 _value);\\n event Redeem(address _addr, uint256 _value);\\n event CapitalPaused();\\n event CapitalUnpaused();\\n event RebasePaused();\\n event RebaseUnpaused();\\n event VaultBufferUpdated(uint256 _vaultBuffer);\\n event OusdMetaStrategyUpdated(address _ousdMetaStrategy);\\n event RedeemFeeUpdated(uint256 _redeemFeeBps);\\n event PriceProviderUpdated(address _priceProvider);\\n event AllocateThresholdUpdated(uint256 _threshold);\\n event RebaseThresholdUpdated(uint256 _threshold);\\n event StrategistUpdated(address _address);\\n event MaxSupplyDiffChanged(uint256 maxSupplyDiff);\\n event YieldDistribution(address _to, uint256 _yield, uint256 _fee);\\n event TrusteeFeeBpsChanged(uint256 _basis);\\n event TrusteeAddressChanged(address _address);\\n event NetOusdMintForStrategyThresholdChanged(uint256 _threshold);\\n event SwapperChanged(address _address);\\n event SwapAllowedUndervalueChanged(uint256 _basis);\\n event SwapSlippageChanged(address _asset, uint256 _basis);\\n event Swapped(\\n address indexed _fromAsset,\\n address indexed _toAsset,\\n uint256 _fromAssetAmount,\\n uint256 _toAssetAmount\\n );\\n event StrategyAddedToMintWhitelist(address indexed strategy);\\n event StrategyRemovedFromMintWhitelist(address indexed strategy);\\n event DripperChanged(address indexed _dripper);\\n event RebasePerSecondMaxChanged(uint256 rebaseRatePerSecond);\\n event DripDurationChanged(uint256 dripDuration);\\n event WithdrawalRequested(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount,\\n uint256 _queued\\n );\\n event WithdrawalClaimed(\\n address indexed _withdrawer,\\n uint256 indexed _requestId,\\n uint256 _amount\\n );\\n event WithdrawalClaimable(uint256 _claimable, uint256 _newClaimable);\\n event WithdrawalClaimDelayUpdated(uint256 _newDelay);\\n\\n // Since we are proxy, all state should be uninitalized.\\n // Since this storage contract does not have logic directly on it\\n // we should not be checking for to see if these variables can be constant.\\n // slither-disable-start uninitialized-state\\n // slither-disable-start constable-states\\n\\n // Assets supported by the Vault, i.e. Stablecoins\\n enum UnitConversion {\\n DECIMALS,\\n GETEXCHANGERATE\\n }\\n // Changed to fit into a single storage slot so the decimals needs to be recached\\n struct Asset {\\n // Note: OETHVaultCore doesn't use `isSupported` when minting,\\n // redeeming or checking balance of assets.\\n bool isSupported;\\n UnitConversion unitConversion;\\n uint8 decimals;\\n // Max allowed slippage from the Oracle price when swapping collateral assets in basis points.\\n // For example 40 == 0.4% slippage\\n uint16 allowedOracleSlippageBps;\\n }\\n\\n /// @dev mapping of supported vault assets to their configuration\\n mapping(address => Asset) internal assets;\\n /// @dev list of all assets supported by the vault.\\n address[] internal allAssets;\\n\\n // Strategies approved for use by the Vault\\n struct Strategy {\\n bool isSupported;\\n uint256 _deprecated; // Deprecated storage slot\\n }\\n /// @dev mapping of strategy contracts to their configuration\\n mapping(address => Strategy) public strategies;\\n /// @dev list of all vault strategies\\n address[] internal allStrategies;\\n\\n /// @notice Address of the Oracle price provider contract\\n address public priceProvider;\\n /// @notice pause rebasing if true\\n bool public rebasePaused;\\n /// @notice pause operations that change the OToken supply.\\n /// eg mint, redeem, allocate, mint/burn for strategy\\n bool public capitalPaused;\\n /// @notice Redemption fee in basis points. eg 50 = 0.5%\\n uint256 public redeemFeeBps;\\n /// @notice Percentage of assets to keep in Vault to handle (most) withdrawals. 100% = 1e18.\\n uint256 public vaultBuffer;\\n /// @notice OToken mints over this amount automatically allocate funds. 18 decimals.\\n uint256 public autoAllocateThreshold;\\n /// @notice OToken mints over this amount automatically rebase. 18 decimals.\\n uint256 public rebaseThreshold;\\n\\n /// @dev Address of the OToken token. eg OUSD or OETH.\\n OUSD public oUSD;\\n\\n /// @dev Storage slot for the address of the VaultAdmin contract that is delegated to\\n // keccak256(\\\"OUSD.vault.governor.admin.impl\\\");\\n bytes32 public constant adminImplPosition =\\n 0xa2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd9;\\n\\n /// @dev Address of the contract responsible for post rebase syncs with AMMs\\n address private _deprecated_rebaseHooksAddr = address(0);\\n\\n /// @dev Deprecated: Address of Uniswap\\n address private _deprecated_uniswapAddr = address(0);\\n\\n /// @notice Address of the Strategist\\n address public strategistAddr = address(0);\\n\\n /// @notice Mapping of asset address to the Strategy that they should automatically\\n // be allocated to\\n mapping(address => address) public assetDefaultStrategies;\\n\\n /// @notice Max difference between total supply and total value of assets. 18 decimals.\\n uint256 public maxSupplyDiff;\\n\\n /// @notice Trustee contract that can collect a percentage of yield\\n address public trusteeAddress;\\n\\n /// @notice Amount of yield collected in basis points. eg 2000 = 20%\\n uint256 public trusteeFeeBps;\\n\\n /// @dev Deprecated: Tokens that should be swapped for stablecoins\\n address[] private _deprecated_swapTokens;\\n\\n uint256 constant MINT_MINIMUM_UNIT_PRICE = 0.998e18;\\n\\n /// @notice Metapool strategy that is allowed to mint/burn OTokens without changing collateral\\n\\n address public ousdMetaStrategy;\\n\\n /// @notice How much OTokens are currently minted by the strategy\\n int256 public netOusdMintedForStrategy;\\n\\n /// @notice How much net total OTokens are allowed to be minted by all strategies\\n uint256 public netOusdMintForStrategyThreshold;\\n\\n uint256 constant MIN_UNIT_PRICE_DRIFT = 0.7e18;\\n uint256 constant MAX_UNIT_PRICE_DRIFT = 1.3e18;\\n\\n /// @notice Collateral swap configuration.\\n /// @dev is packed into a single storage slot to save gas.\\n struct SwapConfig {\\n // Contract that swaps the vault's collateral assets\\n address swapper;\\n // Max allowed percentage the total value can drop below the total supply in basis points.\\n // For example 100 == 1%\\n uint16 allowedUndervalueBps;\\n }\\n SwapConfig internal swapConfig = SwapConfig(address(0), 0);\\n\\n // List of strategies that can mint oTokens directly\\n // Used in OETHBaseVaultCore\\n mapping(address => bool) public isMintWhitelistedStrategy;\\n\\n /// @notice Address of the Dripper contract that streams harvested rewards to the Vault\\n /// @dev The vault is proxied so needs to be set with setDripper against the proxy contract.\\n address public dripper;\\n\\n /// Withdrawal Queue Storage /////\\n\\n struct WithdrawalQueueMetadata {\\n // cumulative total of all withdrawal requests included the ones that have already been claimed\\n uint128 queued;\\n // cumulative total of all the requests that can be claimed including the ones that have already been claimed\\n uint128 claimable;\\n // total of all the requests that have been claimed\\n uint128 claimed;\\n // index of the next withdrawal request starting at 0\\n uint128 nextWithdrawalIndex;\\n }\\n\\n /// @notice Global metadata for the withdrawal queue including:\\n /// queued - cumulative total of all withdrawal requests included the ones that have already been claimed\\n /// claimable - cumulative total of all the requests that can be claimed including the ones already claimed\\n /// claimed - total of all the requests that have been claimed\\n /// nextWithdrawalIndex - index of the next withdrawal request starting at 0\\n WithdrawalQueueMetadata public withdrawalQueueMetadata;\\n\\n struct WithdrawalRequest {\\n address withdrawer;\\n bool claimed;\\n uint40 timestamp; // timestamp of the withdrawal request\\n // Amount of oTokens to redeem. eg OETH\\n uint128 amount;\\n // cumulative total of all withdrawal requests including this one.\\n // this request can be claimed when this queued amount is less than or equal to the queue's claimable amount.\\n uint128 queued;\\n }\\n\\n /// @notice Mapping of withdrawal request indices to the user withdrawal request data\\n mapping(uint256 => WithdrawalRequest) public withdrawalRequests;\\n\\n /// @notice Sets a minimum delay that is required to elapse between\\n /// requesting async withdrawals and claiming the request.\\n /// When set to 0 async withdrawals are disabled.\\n uint256 public withdrawalClaimDelay;\\n\\n /// @notice Time in seconds that the vault last rebased yield.\\n uint64 public lastRebase;\\n\\n /// @notice Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable.\\n uint64 public dripDuration;\\n\\n /// @notice max rebase percentage per second\\n /// Can be used to set maximum yield of the protocol,\\n /// spreading out yield over time\\n uint64 public rebasePerSecondMax;\\n\\n /// @notice target rebase rate limit, based on past rates and funds available.\\n uint64 public rebasePerSecondTarget;\\n\\n uint256 internal constant MAX_REBASE = 0.02 ether;\\n uint256 internal constant MAX_REBASE_PER_SECOND =\\n uint256(0.05 ether) / 1 days;\\n\\n // For future use\\n uint256[43] private __gap;\\n\\n // slither-disable-end constable-states\\n // slither-disable-end uninitialized-state\\n\\n /**\\n * @notice set the implementation for the admin, this needs to be in a base class else we cannot set it\\n * @param newImpl address of the implementation\\n */\\n function setAdminImpl(address newImpl) external onlyGovernor {\\n require(\\n Address.isContract(newImpl),\\n \\\"new implementation is not a contract\\\"\\n );\\n bytes32 position = adminImplPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newImpl)\\n }\\n }\\n}\\n\",\"keccak256\":\"0x58f3046a1b219fd43d234f5374a4ce6ec1d8cb51a837e06eafb5532e05b0f6c1\",\"license\":\"BUSL-1.1\"}},\"version\":1}", + "bytecode": "0x603d80546001600160a01b0319908116909155603e805482169055603f8054909116905560e0604052600060a081905260c052604880546001600160b01b031916905534801561004e57600080fd5b506040516144a53803806144a583398101604081905261006d9161007e565b6001600160a01b03166080526100ae565b60006020828403121561009057600080fd5b81516001600160a01b03811681146100a757600080fd5b9392505050565b6080516143736101326000396000818161051b01528181610ae601528181610b5001528181610fb501528181611ba201528181611c6e0152818161245d01528181612b0901528181612c1001528181612e5301528181612f5e01528181613061015281816130ac015281816131140152818161351d0152613b0601526143736000f3fe608060405234801561001057600080fd5b50600436106103995760003560e01c80636217f3ea116101e9578063af14052c1161010f578063d38bfff4116100ad578063ea33b8e41161007c578063ea33b8e414610917578063ef08edc21461091f578063f844443614610934578063fc0cfeee1461094757610399565b8063d38bfff4146108df578063d4c3eea0146108f2578063e45cc9f0146108fa578063e6cc54321461090357610399565b8063bb7a632e116100e9578063bb7a632e146108a0578063c3b28864146108ba578063c7af3352146108c2578063cc2fe94b146108ca57610399565b8063af14052c1461087d578063b888879e14610885578063b9b17f9f1461089857610399565b8063937b258111610187578063a0aead4d11610156578063a0aead4d14610831578063a403e4d514610839578063ab80dafb14610862578063abaa99161461087557610399565b8063937b25811461072c5780639be918e6146107d45780639ee679e8146108005780639fa1826e1461082857610399565b806378f353a1116101c357806378f353a1146106f45780637a2202f3146107075780637cbc2373146107105780638e510b521461072357610399565b80636217f3ea146106a157806367bd7ba3146106b45780636ec3ab67146106d457610399565b806345e4213b116102ce57806353ca9f241161026c5780635b60f9fc1161023b5780635b60f9fc146106605780635d36b190146106735780635f5152261461067b578063603ea03b1461068e57610399565b806353ca9f241461061d57806354c6d85814610631578063570d8e1d1461063a5780635802a1721461064d57610399565b806349c1d54d116102a857806349c1d54d146105b55780634d5f4629146105c8578063527e83a8146105fa57806352d38e5d1461061457610399565b806345e4213b14610578578063485cc9551461058157806348e30f541461059457610399565b806331e19cfa1161033b5780633b8fe28d116103155780633b8fe28d146105035780633fc8cef31461051657806344c547071461053d5780634530820a1461054557610399565b806331e19cfa14610458578063362bd1a31461046057806339ebf823146104bf57610399565b806318ce56bd1161037757806318ce56bd1461041e5780631edfe3da14610431578063207134b01461043a5780632acada4d1461044357610399565b806309f6442c146103cf5780630c340a24146103eb578063156e29f61461040b575b6000805160206142fe833981519152366000803760008036600084545af43d6000803e8080156103c8573d6000f35b3d6000fd5b005b6103d860385481565b6040519081526020015b60405180910390f35b6103f361095a565b6040516001600160a01b0390911681526020016103e2565b6103cd610419366004613d63565b610977565b6045546103f3906001600160a01b031681565b6103d860395481565b6103d860435481565b61044b6109f5565b6040516103e29190613d96565b6036546103d8565b604b54604c5461048c916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b03958616815293851660208501529184169183019190915290911660608201526080016103e2565b6104ec6104cd366004613de2565b6035602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152016103e2565b6103d8610511366004613de2565b610a57565b6103f37f000000000000000000000000000000000000000000000000000000000000000081565b6103cd610ab2565b610568610553366004613de2565b60496020526000908152604090205460ff1681565b60405190151581526020016103e2565b6103d8604e5481565b6103cd61058f366004613dfd565b610bf2565b6105a76105a2366004613e30565b610e13565b6040516103e2929190613ee1565b6042546103f3906001600160a01b031681565b604f546105e290600160c01b90046001600160401b031681565b6040516001600160401b0390911681526020016103e2565b604f546105e290600160801b90046001600160401b031681565b6103d8603b5481565b60375461056890600160a01b900460ff1681565b6103d8607b5481565b603f546103f3906001600160a01b031681565b603c546103f3906001600160a01b031681565b6103d861066e366004613de2565b610ff2565b6103cd61101b565b6103d8610689366004613de2565b6110c1565b604a546103f3906001600160a01b031681565b6103cd6106af366004613f03565b6110d2565b6106c76106c2366004613f03565b611256565b6040516103e29190613f1c565b6106e76106e2366004613de2565b611261565b6040516103e29190613f45565b604f546105e2906001600160401b031681565b6103d860475481565b6103cd61071e366004613f9b565b611307565b6103d860415481565b61078d61073a366004613f03565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a0016103e2565b6105686107e2366004613de2565b6001600160a01b031660009081526033602052604090205460ff1690565b61081361080e366004613f03565b61137a565b604080519283526020830191909152016103e2565b6103d8603a5481565b6034546103d8565b6103f3610847366004613de2565b6040602081905260009182529020546001600160a01b031681565b6103cd610870366004613f03565b611637565b6103cd611786565b6103cd6117fe565b6037546103f3906001600160a01b031681565b6103cd611844565b604f546105e290600160401b90046001600160401b031681565b61044b6118b4565b610568611914565b6000805160206142fe833981519152546103f3565b6103cd6108ed366004613de2565b611945565b6103d86119e9565b6103d860465481565b60375461056890600160a81b900460ff1681565b6103d86119f3565b6103d86000805160206142fe83398151915281565b6103d8610942366004613f03565b611a82565b6103cd610955366004613de2565b611bdc565b600061097260008051602061431e8339815191525490565b905090565b603754600160a81b900460ff16156109aa5760405162461bcd60e51b81526004016109a190613fbd565b60405180910390fd5b6000805160206142de833981519152805460011981016109dc5760405162461bcd60e51b81526004016109a190613fe5565b600282556109eb858585611c6c565b5060019055505050565b60606034805480602002602001604051908101604052809291908181526020018280548015610a4d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a2f575b5050505050905090565b600080610a80610a7a610a6985611eed565b670de0b6b3a7640000906012611f57565b84611fb9565b9050670de0b6b3a764000081610a97856001612104565b610aa19190614023565b610aab919061403a565b9392505050565b610aba611914565b610ad65760405162461bcd60e51b81526004016109a19061405c565b60345460005b81811015610b4d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110610b2157610b21614093565b6000918252602090912001546001600160a01b031603610b4557607b819055610b4d565b600101610adc565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166034607b5481548110610b8d57610b8d614093565b6000918252602090912001546001600160a01b031614610bef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964205745544820417373657420496e646578000000000000000060448201526064016109a1565b50565b610bfa611914565b610c165760405162461bcd60e51b81526004016109a19061405c565b600054610100900460ff1680610c2f575060005460ff16155b610c925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a1565b600054610100900460ff16158015610cb4576000805461ffff19166101011790555b6001600160a01b038316610d0a5760405162461bcd60e51b815260206004820152601d60248201527f507269636550726f76696465722061646472657373206973207a65726f00000060448201526064016109a1565b6001600160a01b038216610d595760405162461bcd60e51b81526020600482015260166024820152756f546f6b656e2061646472657373206973207a65726f60501b60448201526064016109a1565b603c80546001600160a01b038481166001600160a01b031990921691909117909155603780546001600160b01b03191691851691909117600160a81b17905560006038819055603981905569054b40b1f852bda00000603a55683635c9adc5dea00000603b556040805191825260208201908190529051610ddc91603691613cdb565b50604f80546fffffffffffffffff00000000000000001916600160401b1790558015610e0e576000805461ff00191690555b505050565b603754606090600090600160a81b900460ff1615610e435760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de83398151915280546001198101610e755760405162461bcd60e51b81526004016109a190613fe5565b60028255604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ec957600080fd5b505af1158015610edd573d6000803e3d6000fd5b50505050610ee96123d7565b50846001600160401b03811115610f0257610f026140a9565b604051908082528060200260200182016040528015610f2b578160200160208202803683370190505b50935060005b85811015610fa757610f5a878783818110610f4e57610f4e614093565b905060200201356125b3565b858281518110610f6c57610f6c614093565b602002602001018181525050848181518110610f8a57610f8a614093565b602002602001015184610f9d91906140bf565b9350600101610f31565b50610fdc6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633856128a9565b610fe5836128ff565b6001825550509250929050565b600080611004610a7a610a6985611eed565b9050670de0b6b3a764000081610a97856000612104565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146110b65760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016109a1565b6110bf33612aa6565b565b60006110cc82612b05565b92915050565b603754600160a81b900460ff16156110fc5760405162461bcd60e51b81526004016109a190613fbd565b3360009081526035602052604090205460ff1615156001146111575760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016109a1565b3360009081526049602052604090205460ff1615156001146111b65760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016109a1565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a633826040516111e79291906140d2565b60405180910390a1603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061122190339085906004016140d2565b600060405180830381600087803b15801561123b57600080fd5b505af115801561124f573d6000803e3d6000fd5b5050505050565b60606110cc82612bd8565b604080516080808201835260008083526020808401829052838501829052606084018290526001600160a01b038616825260338152908490208451928301909452835460ff8082161515845293949293918401916101009091041660018111156112cd576112cd613f2f565b60018111156112de576112de613f2f565b8152905462010000810460ff1660208301526301000000900461ffff1660409091015292915050565b603754600160a81b900460ff16156113315760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016113635760405162461bcd60e51b81526004016109a190613fe5565b600282556113718484612d18565b50600190555050565b6037546000908190600160a81b900460ff16156113a95760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016113db5760405162461bcd60e51b81526004016109a190613fe5565b600282556000604e54116114315760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016109a1565b604c54604b546001600160801b03600160801b90920482169550611457918791166140bf565b925061146c6114678560016140bf565b612ee7565b604c80546001600160801b03928316600160801b02921691909117905561149283612ee7565b604b80546001600160801b0319166001600160801b03929092169190911790556040805160a081018252338152600060208201524264ffffffffff1691810191909152606081016114e287612ee7565b6001600160801b031681526020016114f985612ee7565b6001600160801b039081169091526000868152604d602090815260409182902084518154928601518685015164ffffffffff16600160a81b0264ffffffffff60a81b19911515600160a01b026001600160a81b03199095166001600160a01b0393841617949094171692909217815560608501516080909501518416600160801b029490931693909317600190920191909155603c549051632770a7eb60e21b8152911690639dc29fac906115b490339089906004016140d2565b600060405180830381600087803b1580156115ce57600080fd5b505af11580156115e2573d6000803e3d6000fd5b505050506115ef856128ff565b6040805186815260208101859052859133917f38e3d972947cfef94205163d483d6287ef27eb312e20cb8e0b13a49989db232e910160405180910390a3600182555050915091565b603754600160a81b900460ff16156116615760405162461bcd60e51b81526004016109a190613fbd565b3360009081526035602052604090205460ff1615156001146116bc5760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016109a1565b3360009081526049602052604090205460ff16151560011461171b5760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016109a1565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885338260405161174c9291906140d2565b60405180910390a1603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061122190339085906004016140d2565b603754600160a81b900460ff16156117b05760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016117e25760405162461bcd60e51b81526004016109a190613fe5565b600282556117ee6123d7565b506117f7612f54565b5060019055565b6000805160206142de833981519152805460011981016118305760405162461bcd60e51b81526004016109a190613fe5565b6002825561183c61317c565b505060019055565b604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561189457600080fd5b505af11580156118a8573d6000803e3d6000fd5b50505050610bef6123d7565b60606036805480602002602001604051908101604052809291908181526020018280548015610a4d576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a2f575050505050905090565b600061192c60008051602061431e8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b61194d611914565b6119695760405162461bcd60e51b81526004016109a19061405c565b611991817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166119b160008051602061431e8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6000610972613516565b6000611a7c603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906140eb565b611a77613516565b613541565b50919050565b603754600090600160a81b900460ff1615611aaf5760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de83398151915280546001198101611ae15760405162461bcd60e51b81526004016109a190613fe5565b60028255604b546000858152604d60205260409020600101546001600160801b03600160801b92839004811692909104161115611b8a57604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b6857600080fd5b505af1158015611b7c573d6000803e3d6000fd5b50505050611b886123d7565b505b611b93846125b3565b9250611bc96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633856128a9565b611bd2836128ff565b5060019055919050565b611be4611914565b611c005760405162461bcd60e51b81526004016109a19061405c565b803b611c5a5760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016109a1565b6000805160206142fe83398151915255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614611ced5760405162461bcd60e51b815260206004820152601d60248201527f556e737570706f7274656420617373657420666f72206d696e74696e6700000060448201526064016109a1565b60008211611d3d5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016109a1565b80821015611d8d5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420616d6f756e74206c6f776572207468616e206d696e696d756d000060448201526064016109a1565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853383604051611dbe9291906140d2565b60405180910390a1603754600160a01b900460ff16158015611de25750603b548210155b15611e5957604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e3757600080fd5b505af1158015611e4b573d6000803e3d6000fd5b50505050611e5761317c565b505b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611e8b90339086906004016140d2565b600060405180830381600087803b158015611ea557600080fd5b505af1158015611eb9573d6000803e3d6000fd5b50611ed3925050506001600160a01b038416333085613714565b611edb6123d7565b50603a548210610e0e57610e0e612f54565b6001600160a01b03811660009081526033602052604090205462010000900460ff1680611f525760405162461bcd60e51b8152602060048201526013602482015272111958da5b585b1cc81b9bdd0818d858da1959606a1b60448201526064016109a1565b919050565b600081831115611f8757611f80611f6e8385614104565b611f7990600a6141fe565b8590613752565b9350611fb1565b81831015611fb157611fae611f9c8484614104565b611fa790600a6141fe565b859061375e565b93505b509192915050565b6001600160a01b038116600090815260336020526040812054610100900460ff1681816001811115611fed57611fed613f2f565b0361201057612008601261200085611eed565b869190611f57565b9150506110cc565b600181600181111561202457612024613f2f565b036120b5576000836001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208d91906140eb565b9050670de0b6b3a76400006120a28287614023565b6120ac919061403a565b925050506110cc565b60405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016109a1565b5092915050565b6001600160a01b038281166000818152603360205260408082205460375491516315d5220f60e31b81526004810194909452919361010090920460ff169291169063aea9107890602401602060405180830381865afa15801561216b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218f91906140eb565b915060018160018111156121a5576121a5613f2f565b03612235576000846001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220e91906140eb565b90508061222384670de0b6b3a7640000614023565b61222d919061403a565b925050612296565b600081600181111561224957612249613f2f565b146122965760405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016109a1565b67120a871cc00200008211156122ee5760405162461bcd60e51b815260206004820152601860248201527f5661756c743a2050726963652065786365656473206d6178000000000000000060448201526064016109a1565b6709b6e64a8ec6000082101561233f5760405162461bcd60e51b81526020600482015260166024820152752b30bab63a1d10283934b1b2903ab73232b91036b4b760511b60448201526064016109a1565b82156123b657670de0b6b3a764000082111561236157670de0b6b3a764000091505b670dd99bb65dd700008210156123b15760405162461bcd60e51b815260206004820152601560248201527441737365742070726963652062656c6f772070656760581b60448201526064016109a1565b6120fd565b670de0b6b3a76400008210156120fd5750670de0b6b3a76400009392505050565b60408051608081018252604b546001600160801b03808216808452600160801b92839004821660208501819052604c54808416968601969096529290940416606083015260009283916124299161420a565b6001600160801b03169050806000036124455760009250505090565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156124ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d091906140eb565b90506000836040015184602001516124e8919061420a565b6001600160801b0316905080821161250557600094505050505090565b60006125118284614104565b90508084106125205780612522565b835b955060008686602001516001600160801b031661253f91906140bf565b905061254a81612ee7565b604b80546001600160801b03928316600160801b0292169190911790556040517fee79a0c43d3993055690b54e074b5153e8bae8d1a872b656dedb64aa8f463333906125a29083908a90918252602082015260400190565b60405180910390a150505050505090565b600080604e54116126065760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016109a1565b6000828152604d6020908152604091829020825160a08101845281546001600160a01b038116825260ff600160a01b82041615158285015264ffffffffff600160a81b90910481168286019081526001909301546001600160801b03808216606080860191909152600160801b92839004821660808087019190915288519081018952604b548084168252849004831697810197909752604c54808316988801989098529190960490951694840194909452604e549151909342926126cd929091166140bf565b11156127115760405162461bcd60e51b815260206004820152601360248201527210db185a5b4819195b185e481b9bdd081b595d606a1b60448201526064016109a1565b80602001516001600160801b031682608001516001600160801b0316111561277b5760405162461bcd60e51b815260206004820152601760248201527f51756575652070656e64696e67206c697175696469747900000000000000000060448201526064016109a1565b81516001600160a01b031633146127c45760405162461bcd60e51b815260206004820152600d60248201526c2737ba103932b8bab2b9ba32b960991b60448201526064016109a1565b6020820151156128085760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016109a1565b6000848152604d602052604090819020805460ff60a01b1916600160a01b17905560608301519082015161283c9190614229565b604c80546001600160801b0319166001600160801b03928316179055606083015160405191168152849033907f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d19060200160405180910390a350606001516001600160801b031692915050565b610e0e8363a9059cbb60e01b84846040516024016128c89291906140d2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261376a565b6000603b54821015801561291d5750603754600160a01b900460ff16155b156129315761292a61317c565b905061293c565b612939613516565b90505b60415415612aa257600081116129945760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d616e79206f75747374616e64696e6720726571756573747300000060448201526064016109a1565b6000612a1782603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1191906140eb565b9061383c565b9050604154670de0b6b3a76400008211612a4257612a3d82670de0b6b3a7640000614104565b612a54565b612a54670de0b6b3a764000083614104565b1115610e0e5760405162461bcd60e51b815260206004820152601e60248201527f4261636b696e6720737570706c79206c6971756964697479206572726f72000060448201526064016109a1565b5050565b6001600160a01b038116612afc5760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016109a1565b610bef81613865565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614612b4857506000919050565b612b51826138cc565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301529293509190612ba190846140bf565b1015612bb05750600092915050565b805160408201516001600160801b0391821691612bce9116846140bf565b610aab9190614104565b60385460609015612c0757603854600090612bf7908490612710613a66565b9050612c038184614104565b9250505b6000607b5490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110612c4b57612c4b614093565b6000918252602090912001546001600160a01b031614612cad5760405162461bcd60e51b815260206004820152601b60248201527f5745544820417373657420696e646578206e6f7420636163686564000000000060448201526064016109a1565b6034546001600160401b03811115612cc757612cc76140a9565b604051908082528060200260200182016040528015612cf0578160200160208202803683370190505b50915082828281518110612d0657612d06614093565b60200260200101818152505050919050565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a63383604051612d499291906140d2565b60405180910390a181600003612d5d575050565b603f546000906001600160a01b0316331480612d7c5750612d7c611914565b612da957612d8983612bd8565b607b5481518110612d9c57612d9c614093565b6020026020010151612dab565b825b905081811015612dfd5760405162461bcd60e51b815260206004820181905260248201527f52656465656d20616d6f756e74206c6f776572207468616e206d696e696d756d60448201526064016109a1565b80612e06613a88565b1015612e465760405162461bcd60e51b815260206004820152600f60248201526e2634b8bab4b234ba3c9032b93937b960891b60448201526064016109a1565b612e7a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836128a9565b603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90612eac90339087906004016140d2565b600060405180830381600087803b158015612ec657600080fd5b505af1158015612eda573d6000803e3d6000fd5b50505050610e0e836128ff565b60006001600160801b03821115612f505760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016109a1565b5090565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166000908152604060208190529020541680612f975750565b6000612fa1613a88565b905080600003612faf575050565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612ff9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061301d91906140eb565b9050600061303660395483613b9690919063ffffffff16565b90508083116130455750505050565b60006130518285614104565b9050846130886001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001682846128a9565b6040516311f9fbc960e21b81526001600160a01b038216906347e7ef24906130d6907f00000000000000000000000000000000000000000000000000000000000000009086906004016140d2565b600060405180830381600087803b1580156130f057600080fd5b505af1158015613104573d6000803e3d6000fd5b5050604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528a1660208201529081018590527f41b99659f6ba0803f444aff29e5bf6e26dd86a3219aff92119d69710a956ba8d9250606001905060405180910390a1505050505050565b603754600090600160a01b900460ff16156131cb5760405162461bcd60e51b815260206004820152600f60248201526e149958985cda5b99c81c185d5cd959608a1b60448201526064016109a1565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613215573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323991906140eb565b90506000613245613516565b9050816000036132585791506135139050565b6000806132658484613541565b9092509050600061327683866140bf565b9050848111158061328657508381115b15613295575091949350505050565b6132a6826001600160401b03613bab565b604f805477ffffffffffffffffffffffffffffffff000000000000000016600160c01b6001600160401b039384160267ffffffffffffffff19161742929092169190911790556042546001600160a01b0316600081156133e257612710604354866133119190614023565b61331b919061403a565b905080156133e25784811061337d5760405162461bcd60e51b815260206004820152602260248201527f466565206d757374206e6f742062652067726561746572207468616e207969656044820152611b1960f21b60648201526084016109a1565b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906133af90859085906004016140d2565b600060405180830381600087803b1580156133c957600080fd5b505af11580156133dd573d6000803e3d6000fd5b505050505b604080516001600160a01b0384168152602081018790529081018290527f09516ecf4a8a86e59780a9befc6dee948bc9e60a36e3be68d31ea817ee8d2c809060600160405180910390a1603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561347f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134a391906140eb565b83111561350957603c546040516339a7919f60e01b8152600481018590526001600160a01b03909116906339a7919f90602401600060405180830381600087803b1580156134f057600080fd5b505af1158015613504573d6000803e3d6000fd5b505050505b5093955050505050505b90565b60006109727f0000000000000000000000000000000000000000000000000000000000000000612b05565b6000806000603c60009054906101000a90046001600160a01b03166001600160a01b031663e696393a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135bd91906140eb565b905060006135cb8287614104565b604f549091506000906135e7906001600160401b031642614104565b604f54600160c01b90046001600160401b031694509050801580613609575081155b8061361357508587115b8061362557506001600160401b034210155b15613636576000945050505061370d565b6136408787614104565b604f54909550600160401b90046001600160401b031660018111156136a55761367d8561366e836002614023565b613678908961403a565b613bc1565b94506136928561368d838961403a565b613bab565b94506136a28661368d8488614023565b95505b604f546136e6908790670de0b6b3a764000090600160801b90046001600160401b03166136d28688614023565b6136dc9190614023565b61368d919061403a565b955061370686670de0b6b3a76400006136dc66470de4df82000087614023565b9550505050505b9250929050565b6040516001600160a01b038085166024830152831660448201526064810182905261374c9085906323b872dd60e01b906084016128c8565b50505050565b6000610aab8284614023565b6000610aab828461403a565b60006137bf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613bd09092919063ffffffff16565b805190915015610e0e57808060200190518101906137dd9190614248565b610e0e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a1565b60008061385184670de0b6b3a7640000613752565b905061385d818461375e565b949350505050565b806001600160a01b031661388560008051602061431e8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a360008051602061431e83398151915255565b6040516370a0823160e01b815230600482015260009082906001600160a01b038216906370a0823190602401602060405180830381865afa158015613915573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061393991906140eb565b60365490925060005b81811015613a5e5760006036828154811061395f5761395f614093565b60009182526020909120015460405163551c457b60e11b81526001600160a01b0388811660048301529091169150819063aa388af690602401602060405180830381865afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190614248565b15613a5557604051632fa8a91360e11b81526001600160a01b038781166004830152821690635f51522690602401602060405180830381865afa158015613a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a4891906140eb565b613a5290866140bf565b94505b50600101613942565b505050919050565b600080613a738585613752565b9050613a7f818461375e565b95945050505050565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301526000928391613ad8919061420a565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015613b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b7191906140eb565b9050818111613b84576000935050505090565b613b8e8282614104565b935050505090565b6000610aab8383670de0b6b3a7640000613a66565b6000818310613bba5781610aab565b5090919050565b6000818311613bba5781610aab565b606061385d848460008585843b613c295760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a1565b600080866001600160a01b03168587604051613c45919061428e565b60006040518083038185875af1925050503d8060008114613c82576040519150601f19603f3d011682016040523d82523d6000602084013e613c87565b606091505b5091509150613c97828286613ca2565b979650505050505050565b60608315613cb1575081610aab565b825115613cc15782518084602001fd5b8160405162461bcd60e51b81526004016109a191906142aa565b828054828255906000526020600020908101928215613d30579160200282015b82811115613d3057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613cfb565b50612f509291505b80821115612f505760008155600101613d38565b80356001600160a01b0381168114611f5257600080fd5b600080600060608486031215613d7857600080fd5b613d8184613d4c565b95602085013595506040909401359392505050565b602080825282518282018190526000918401906040840190835b81811015613dd75783516001600160a01b0316835260209384019390920191600101613db0565b509095945050505050565b600060208284031215613df457600080fd5b610aab82613d4c565b60008060408385031215613e1057600080fd5b613e1983613d4c565b9150613e2760208401613d4c565b90509250929050565b60008060208385031215613e4357600080fd5b82356001600160401b03811115613e5957600080fd5b8301601f81018513613e6a57600080fd5b80356001600160401b03811115613e8057600080fd5b8560208260051b8401011115613e9557600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b82811015613ed7578151865260209586019590910190600101613eb9565b5093949350505050565b604081526000613ef46040830185613ea5565b90508260208301529392505050565b600060208284031215613f1557600080fd5b5035919050565b602081526000610aab6020830184613ea5565b634e487b7160e01b600052602160045260246000fd5b8151151581526020820151608082019060028110613f7357634e487b7160e01b600052602160045260246000fd5b8060208401525060ff604084015116604083015261ffff606084015116606083015292915050565b60008060408385031215613fae57600080fd5b50508035926020909101359150565b6020808252600e908201526d10d85c1a5d185b081c185d5cd95960921b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176110cc576110cc61400d565b60008261405757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b808201808211156110cc576110cc61400d565b6001600160a01b03929092168252602082015260400190565b6000602082840312156140fd57600080fd5b5051919050565b818103818111156110cc576110cc61400d565b6001815b6001841115614152578085048111156141365761413661400d565b600184161561414457908102905b60019390931c92800261411b565b935093915050565b600082614169575060016110cc565b81614176575060006110cc565b816001811461418c5760028114614196576141b2565b60019150506110cc565b60ff8411156141a7576141a761400d565b50506001821b6110cc565b5060208310610133831016604e8410600b84101617156141d5575081810a6110cc565b6141e26000198484614117565b80600019048211156141f6576141f661400d565b029392505050565b6000610aab838361415a565b6001600160801b0382811682821603908111156110cc576110cc61400d565b6001600160801b0381811683821601908111156110cc576110cc61400d565b60006020828403121561425a57600080fd5b81518015158114610aab57600080fd5b60005b8381101561428557818101518382015260200161426d565b50506000910152565b600082516142a081846020870161426a565b9190910192915050565b60208152600082518060208401526142c981604085016020870161426a565b601f01601f1916919091016040019291505056fe53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535a2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd97bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220080c10048cd02c60922c73f1307185a629d08d4703fd0355a893c49ba2a7c13764736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106103995760003560e01c80636217f3ea116101e9578063af14052c1161010f578063d38bfff4116100ad578063ea33b8e41161007c578063ea33b8e414610917578063ef08edc21461091f578063f844443614610934578063fc0cfeee1461094757610399565b8063d38bfff4146108df578063d4c3eea0146108f2578063e45cc9f0146108fa578063e6cc54321461090357610399565b8063bb7a632e116100e9578063bb7a632e146108a0578063c3b28864146108ba578063c7af3352146108c2578063cc2fe94b146108ca57610399565b8063af14052c1461087d578063b888879e14610885578063b9b17f9f1461089857610399565b8063937b258111610187578063a0aead4d11610156578063a0aead4d14610831578063a403e4d514610839578063ab80dafb14610862578063abaa99161461087557610399565b8063937b25811461072c5780639be918e6146107d45780639ee679e8146108005780639fa1826e1461082857610399565b806378f353a1116101c357806378f353a1146106f45780637a2202f3146107075780637cbc2373146107105780638e510b521461072357610399565b80636217f3ea146106a157806367bd7ba3146106b45780636ec3ab67146106d457610399565b806345e4213b116102ce57806353ca9f241161026c5780635b60f9fc1161023b5780635b60f9fc146106605780635d36b190146106735780635f5152261461067b578063603ea03b1461068e57610399565b806353ca9f241461061d57806354c6d85814610631578063570d8e1d1461063a5780635802a1721461064d57610399565b806349c1d54d116102a857806349c1d54d146105b55780634d5f4629146105c8578063527e83a8146105fa57806352d38e5d1461061457610399565b806345e4213b14610578578063485cc9551461058157806348e30f541461059457610399565b806331e19cfa1161033b5780633b8fe28d116103155780633b8fe28d146105035780633fc8cef31461051657806344c547071461053d5780634530820a1461054557610399565b806331e19cfa14610458578063362bd1a31461046057806339ebf823146104bf57610399565b806318ce56bd1161037757806318ce56bd1461041e5780631edfe3da14610431578063207134b01461043a5780632acada4d1461044357610399565b806309f6442c146103cf5780630c340a24146103eb578063156e29f61461040b575b6000805160206142fe833981519152366000803760008036600084545af43d6000803e8080156103c8573d6000f35b3d6000fd5b005b6103d860385481565b6040519081526020015b60405180910390f35b6103f361095a565b6040516001600160a01b0390911681526020016103e2565b6103cd610419366004613d63565b610977565b6045546103f3906001600160a01b031681565b6103d860395481565b6103d860435481565b61044b6109f5565b6040516103e29190613d96565b6036546103d8565b604b54604c5461048c916001600160801b0380821692600160801b928390048216928183169291041684565b604080516001600160801b03958616815293851660208501529184169183019190915290911660608201526080016103e2565b6104ec6104cd366004613de2565b6035602052600090815260409020805460019091015460ff9091169082565b6040805192151583526020830191909152016103e2565b6103d8610511366004613de2565b610a57565b6103f37f000000000000000000000000000000000000000000000000000000000000000081565b6103cd610ab2565b610568610553366004613de2565b60496020526000908152604090205460ff1681565b60405190151581526020016103e2565b6103d8604e5481565b6103cd61058f366004613dfd565b610bf2565b6105a76105a2366004613e30565b610e13565b6040516103e2929190613ee1565b6042546103f3906001600160a01b031681565b604f546105e290600160c01b90046001600160401b031681565b6040516001600160401b0390911681526020016103e2565b604f546105e290600160801b90046001600160401b031681565b6103d8603b5481565b60375461056890600160a01b900460ff1681565b6103d8607b5481565b603f546103f3906001600160a01b031681565b603c546103f3906001600160a01b031681565b6103d861066e366004613de2565b610ff2565b6103cd61101b565b6103d8610689366004613de2565b6110c1565b604a546103f3906001600160a01b031681565b6103cd6106af366004613f03565b6110d2565b6106c76106c2366004613f03565b611256565b6040516103e29190613f1c565b6106e76106e2366004613de2565b611261565b6040516103e29190613f45565b604f546105e2906001600160401b031681565b6103d860475481565b6103cd61071e366004613f9b565b611307565b6103d860415481565b61078d61073a366004613f03565b604d60205260009081526040902080546001909101546001600160a01b03821691600160a01b810460ff1691600160a81b90910464ffffffffff16906001600160801b0380821691600160801b90041685565b604080516001600160a01b039096168652931515602086015264ffffffffff909216928401929092526001600160801b03918216606084015216608082015260a0016103e2565b6105686107e2366004613de2565b6001600160a01b031660009081526033602052604090205460ff1690565b61081361080e366004613f03565b61137a565b604080519283526020830191909152016103e2565b6103d8603a5481565b6034546103d8565b6103f3610847366004613de2565b6040602081905260009182529020546001600160a01b031681565b6103cd610870366004613f03565b611637565b6103cd611786565b6103cd6117fe565b6037546103f3906001600160a01b031681565b6103cd611844565b604f546105e290600160401b90046001600160401b031681565b61044b6118b4565b610568611914565b6000805160206142fe833981519152546103f3565b6103cd6108ed366004613de2565b611945565b6103d86119e9565b6103d860465481565b60375461056890600160a81b900460ff1681565b6103d86119f3565b6103d86000805160206142fe83398151915281565b6103d8610942366004613f03565b611a82565b6103cd610955366004613de2565b611bdc565b600061097260008051602061431e8339815191525490565b905090565b603754600160a81b900460ff16156109aa5760405162461bcd60e51b81526004016109a190613fbd565b60405180910390fd5b6000805160206142de833981519152805460011981016109dc5760405162461bcd60e51b81526004016109a190613fe5565b600282556109eb858585611c6c565b5060019055505050565b60606034805480602002602001604051908101604052809291908181526020018280548015610a4d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610a2f575b5050505050905090565b600080610a80610a7a610a6985611eed565b670de0b6b3a7640000906012611f57565b84611fb9565b9050670de0b6b3a764000081610a97856001612104565b610aa19190614023565b610aab919061403a565b9392505050565b610aba611914565b610ad65760405162461bcd60e51b81526004016109a19061405c565b60345460005b81811015610b4d577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110610b2157610b21614093565b6000918252602090912001546001600160a01b031603610b4557607b819055610b4d565b600101610adc565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166034607b5481548110610b8d57610b8d614093565b6000918252602090912001546001600160a01b031614610bef5760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964205745544820417373657420496e646578000000000000000060448201526064016109a1565b50565b610bfa611914565b610c165760405162461bcd60e51b81526004016109a19061405c565b600054610100900460ff1680610c2f575060005460ff16155b610c925760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016109a1565b600054610100900460ff16158015610cb4576000805461ffff19166101011790555b6001600160a01b038316610d0a5760405162461bcd60e51b815260206004820152601d60248201527f507269636550726f76696465722061646472657373206973207a65726f00000060448201526064016109a1565b6001600160a01b038216610d595760405162461bcd60e51b81526020600482015260166024820152756f546f6b656e2061646472657373206973207a65726f60501b60448201526064016109a1565b603c80546001600160a01b038481166001600160a01b031990921691909117909155603780546001600160b01b03191691851691909117600160a81b17905560006038819055603981905569054b40b1f852bda00000603a55683635c9adc5dea00000603b556040805191825260208201908190529051610ddc91603691613cdb565b50604f80546fffffffffffffffff00000000000000001916600160401b1790558015610e0e576000805461ff00191690555b505050565b603754606090600090600160a81b900460ff1615610e435760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de83398151915280546001198101610e755760405162461bcd60e51b81526004016109a190613fe5565b60028255604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610ec957600080fd5b505af1158015610edd573d6000803e3d6000fd5b50505050610ee96123d7565b50846001600160401b03811115610f0257610f026140a9565b604051908082528060200260200182016040528015610f2b578160200160208202803683370190505b50935060005b85811015610fa757610f5a878783818110610f4e57610f4e614093565b905060200201356125b3565b858281518110610f6c57610f6c614093565b602002602001018181525050848181518110610f8a57610f8a614093565b602002602001015184610f9d91906140bf565b9350600101610f31565b50610fdc6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633856128a9565b610fe5836128ff565b6001825550509250929050565b600080611004610a7a610a6985611eed565b9050670de0b6b3a764000081610a97856000612104565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146110b65760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016109a1565b6110bf33612aa6565b565b60006110cc82612b05565b92915050565b603754600160a81b900460ff16156110fc5760405162461bcd60e51b81526004016109a190613fbd565b3360009081526035602052604090205460ff1615156001146111575760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016109a1565b3360009081526049602052604090205460ff1615156001146111b65760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016109a1565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a633826040516111e79291906140d2565b60405180910390a1603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac9061122190339085906004016140d2565b600060405180830381600087803b15801561123b57600080fd5b505af115801561124f573d6000803e3d6000fd5b5050505050565b60606110cc82612bd8565b604080516080808201835260008083526020808401829052838501829052606084018290526001600160a01b038616825260338152908490208451928301909452835460ff8082161515845293949293918401916101009091041660018111156112cd576112cd613f2f565b60018111156112de576112de613f2f565b8152905462010000810460ff1660208301526301000000900461ffff1660409091015292915050565b603754600160a81b900460ff16156113315760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016113635760405162461bcd60e51b81526004016109a190613fe5565b600282556113718484612d18565b50600190555050565b6037546000908190600160a81b900460ff16156113a95760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016113db5760405162461bcd60e51b81526004016109a190613fe5565b600282556000604e54116114315760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016109a1565b604c54604b546001600160801b03600160801b90920482169550611457918791166140bf565b925061146c6114678560016140bf565b612ee7565b604c80546001600160801b03928316600160801b02921691909117905561149283612ee7565b604b80546001600160801b0319166001600160801b03929092169190911790556040805160a081018252338152600060208201524264ffffffffff1691810191909152606081016114e287612ee7565b6001600160801b031681526020016114f985612ee7565b6001600160801b039081169091526000868152604d602090815260409182902084518154928601518685015164ffffffffff16600160a81b0264ffffffffff60a81b19911515600160a01b026001600160a81b03199095166001600160a01b0393841617949094171692909217815560608501516080909501518416600160801b029490931693909317600190920191909155603c549051632770a7eb60e21b8152911690639dc29fac906115b490339089906004016140d2565b600060405180830381600087803b1580156115ce57600080fd5b505af11580156115e2573d6000803e3d6000fd5b505050506115ef856128ff565b6040805186815260208101859052859133917f38e3d972947cfef94205163d483d6287ef27eb312e20cb8e0b13a49989db232e910160405180910390a3600182555050915091565b603754600160a81b900460ff16156116615760405162461bcd60e51b81526004016109a190613fbd565b3360009081526035602052604090205460ff1615156001146116bc5760405162461bcd60e51b8152602060048201526014602482015273556e737570706f7274656420737472617465677960601b60448201526064016109a1565b3360009081526049602052604090205460ff16151560011461171b5760405162461bcd60e51b81526020600482015260186024820152774e6f742077686974656c697374656420737472617465677960401b60448201526064016109a1565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885338260405161174c9291906140d2565b60405180910390a1603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f199061122190339085906004016140d2565b603754600160a81b900460ff16156117b05760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de833981519152805460011981016117e25760405162461bcd60e51b81526004016109a190613fe5565b600282556117ee6123d7565b506117f7612f54565b5060019055565b6000805160206142de833981519152805460011981016118305760405162461bcd60e51b81526004016109a190613fe5565b6002825561183c61317c565b505060019055565b604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561189457600080fd5b505af11580156118a8573d6000803e3d6000fd5b50505050610bef6123d7565b60606036805480602002602001604051908101604052809291908181526020018280548015610a4d576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311610a2f575050505050905090565b600061192c60008051602061431e8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b61194d611914565b6119695760405162461bcd60e51b81526004016109a19061405c565b611991817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b03166119b160008051602061431e8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6000610972613516565b6000611a7c603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6f91906140eb565b611a77613516565b613541565b50919050565b603754600090600160a81b900460ff1615611aaf5760405162461bcd60e51b81526004016109a190613fbd565b6000805160206142de83398151915280546001198101611ae15760405162461bcd60e51b81526004016109a190613fe5565b60028255604b546000858152604d60205260409020600101546001600160801b03600160801b92839004811692909104161115611b8a57604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b6857600080fd5b505af1158015611b7c573d6000803e3d6000fd5b50505050611b886123d7565b505b611b93846125b3565b9250611bc96001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633856128a9565b611bd2836128ff565b5060019055919050565b611be4611914565b611c005760405162461bcd60e51b81526004016109a19061405c565b803b611c5a5760405162461bcd60e51b8152602060048201526024808201527f6e657720696d706c656d656e746174696f6e206973206e6f74206120636f6e746044820152631c9858dd60e21b60648201526084016109a1565b6000805160206142fe83398151915255565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b031614611ced5760405162461bcd60e51b815260206004820152601d60248201527f556e737570706f7274656420617373657420666f72206d696e74696e6700000060448201526064016109a1565b60008211611d3d5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016109a1565b80821015611d8d5760405162461bcd60e51b815260206004820152601e60248201527f4d696e7420616d6f756e74206c6f776572207468616e206d696e696d756d000060448201526064016109a1565b7f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968853383604051611dbe9291906140d2565b60405180910390a1603754600160a01b900460ff16158015611de25750603b548210155b15611e5957604a60009054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611e3757600080fd5b505af1158015611e4b573d6000803e3d6000fd5b50505050611e5761317c565b505b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f1990611e8b90339086906004016140d2565b600060405180830381600087803b158015611ea557600080fd5b505af1158015611eb9573d6000803e3d6000fd5b50611ed3925050506001600160a01b038416333085613714565b611edb6123d7565b50603a548210610e0e57610e0e612f54565b6001600160a01b03811660009081526033602052604090205462010000900460ff1680611f525760405162461bcd60e51b8152602060048201526013602482015272111958da5b585b1cc81b9bdd0818d858da1959606a1b60448201526064016109a1565b919050565b600081831115611f8757611f80611f6e8385614104565b611f7990600a6141fe565b8590613752565b9350611fb1565b81831015611fb157611fae611f9c8484614104565b611fa790600a6141fe565b859061375e565b93505b509192915050565b6001600160a01b038116600090815260336020526040812054610100900460ff1681816001811115611fed57611fed613f2f565b0361201057612008601261200085611eed565b869190611f57565b9150506110cc565b600181600181111561202457612024613f2f565b036120b5576000836001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612069573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208d91906140eb565b9050670de0b6b3a76400006120a28287614023565b6120ac919061403a565b925050506110cc565b60405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016109a1565b5092915050565b6001600160a01b038281166000818152603360205260408082205460375491516315d5220f60e31b81526004810194909452919361010090920460ff169291169063aea9107890602401602060405180830381865afa15801561216b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061218f91906140eb565b915060018160018111156121a5576121a5613f2f565b03612235576000846001600160a01b031663e6aa216c6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061220e91906140eb565b90508061222384670de0b6b3a7640000614023565b61222d919061403a565b925050612296565b600081600181111561224957612249613f2f565b146122965760405162461bcd60e51b815260206004820152601b60248201527f556e737570706f7274656420636f6e76657273696f6e2074797065000000000060448201526064016109a1565b67120a871cc00200008211156122ee5760405162461bcd60e51b815260206004820152601860248201527f5661756c743a2050726963652065786365656473206d6178000000000000000060448201526064016109a1565b6709b6e64a8ec6000082101561233f5760405162461bcd60e51b81526020600482015260166024820152752b30bab63a1d10283934b1b2903ab73232b91036b4b760511b60448201526064016109a1565b82156123b657670de0b6b3a764000082111561236157670de0b6b3a764000091505b670dd99bb65dd700008210156123b15760405162461bcd60e51b815260206004820152601560248201527441737365742070726963652062656c6f772070656760581b60448201526064016109a1565b6120fd565b670de0b6b3a76400008210156120fd5750670de0b6b3a76400009392505050565b60408051608081018252604b546001600160801b03808216808452600160801b92839004821660208501819052604c54808416968601969096529290940416606083015260009283916124299161420a565b6001600160801b03169050806000036124455760009250505090565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156124ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124d091906140eb565b90506000836040015184602001516124e8919061420a565b6001600160801b0316905080821161250557600094505050505090565b60006125118284614104565b90508084106125205780612522565b835b955060008686602001516001600160801b031661253f91906140bf565b905061254a81612ee7565b604b80546001600160801b03928316600160801b0292169190911790556040517fee79a0c43d3993055690b54e074b5153e8bae8d1a872b656dedb64aa8f463333906125a29083908a90918252602082015260400190565b60405180910390a150505050505090565b600080604e54116126065760405162461bcd60e51b815260206004820152601d60248201527f4173796e63207769746864726177616c73206e6f7420656e61626c656400000060448201526064016109a1565b6000828152604d6020908152604091829020825160a08101845281546001600160a01b038116825260ff600160a01b82041615158285015264ffffffffff600160a81b90910481168286019081526001909301546001600160801b03808216606080860191909152600160801b92839004821660808087019190915288519081018952604b548084168252849004831697810197909752604c54808316988801989098529190960490951694840194909452604e549151909342926126cd929091166140bf565b11156127115760405162461bcd60e51b815260206004820152601360248201527210db185a5b4819195b185e481b9bdd081b595d606a1b60448201526064016109a1565b80602001516001600160801b031682608001516001600160801b0316111561277b5760405162461bcd60e51b815260206004820152601760248201527f51756575652070656e64696e67206c697175696469747900000000000000000060448201526064016109a1565b81516001600160a01b031633146127c45760405162461bcd60e51b815260206004820152600d60248201526c2737ba103932b8bab2b9ba32b960991b60448201526064016109a1565b6020820151156128085760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b60448201526064016109a1565b6000848152604d602052604090819020805460ff60a01b1916600160a01b17905560608301519082015161283c9190614229565b604c80546001600160801b0319166001600160801b03928316179055606083015160405191168152849033907f2d43eb174787155132b52ddb6b346e2dca99302eac3df4466dbeff953d3c84d19060200160405180910390a350606001516001600160801b031692915050565b610e0e8363a9059cbb60e01b84846040516024016128c89291906140d2565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b03199093169290921790915261376a565b6000603b54821015801561291d5750603754600160a01b900460ff16155b156129315761292a61317c565b905061293c565b612939613516565b90505b60415415612aa257600081116129945760405162461bcd60e51b815260206004820152601d60248201527f546f6f206d616e79206f75747374616e64696e6720726571756573747300000060448201526064016109a1565b6000612a1782603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129ed573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a1191906140eb565b9061383c565b9050604154670de0b6b3a76400008211612a4257612a3d82670de0b6b3a7640000614104565b612a54565b612a54670de0b6b3a764000083614104565b1115610e0e5760405162461bcd60e51b815260206004820152601e60248201527f4261636b696e6720737570706c79206c6971756964697479206572726f72000060448201526064016109a1565b5050565b6001600160a01b038116612afc5760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016109a1565b610bef81613865565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614612b4857506000919050565b612b51826138cc565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301529293509190612ba190846140bf565b1015612bb05750600092915050565b805160408201516001600160801b0391821691612bce9116846140bf565b610aab9190614104565b60385460609015612c0757603854600090612bf7908490612710613a66565b9050612c038184614104565b9250505b6000607b5490507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031660348281548110612c4b57612c4b614093565b6000918252602090912001546001600160a01b031614612cad5760405162461bcd60e51b815260206004820152601b60248201527f5745544820417373657420696e646578206e6f7420636163686564000000000060448201526064016109a1565b6034546001600160401b03811115612cc757612cc76140a9565b604051908082528060200260200182016040528015612cf0578160200160208202803683370190505b50915082828281518110612d0657612d06614093565b60200260200101818152505050919050565b7f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a63383604051612d499291906140d2565b60405180910390a181600003612d5d575050565b603f546000906001600160a01b0316331480612d7c5750612d7c611914565b612da957612d8983612bd8565b607b5481518110612d9c57612d9c614093565b6020026020010151612dab565b825b905081811015612dfd5760405162461bcd60e51b815260206004820181905260248201527f52656465656d20616d6f756e74206c6f776572207468616e206d696e696d756d60448201526064016109a1565b80612e06613a88565b1015612e465760405162461bcd60e51b815260206004820152600f60248201526e2634b8bab4b234ba3c9032b93937b960891b60448201526064016109a1565b612e7a6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001633836128a9565b603c54604051632770a7eb60e21b81526001600160a01b0390911690639dc29fac90612eac90339087906004016140d2565b600060405180830381600087803b158015612ec657600080fd5b505af1158015612eda573d6000803e3d6000fd5b50505050610e0e836128ff565b60006001600160801b03821115612f505760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20316044820152663238206269747360c81b60648201526084016109a1565b5090565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166000908152604060208190529020541680612f975750565b6000612fa1613a88565b905080600003612faf575050565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015612ff9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061301d91906140eb565b9050600061303660395483613b9690919063ffffffff16565b90508083116130455750505050565b60006130518285614104565b9050846130886001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001682846128a9565b6040516311f9fbc960e21b81526001600160a01b038216906347e7ef24906130d6907f00000000000000000000000000000000000000000000000000000000000000009086906004016140d2565b600060405180830381600087803b1580156130f057600080fd5b505af1158015613104573d6000803e3d6000fd5b5050604080516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811682528a1660208201529081018590527f41b99659f6ba0803f444aff29e5bf6e26dd86a3219aff92119d69710a956ba8d9250606001905060405180910390a1505050505050565b603754600090600160a01b900460ff16156131cb5760405162461bcd60e51b815260206004820152600f60248201526e149958985cda5b99c81c185d5cd959608a1b60448201526064016109a1565b603c54604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015613215573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061323991906140eb565b90506000613245613516565b9050816000036132585791506135139050565b6000806132658484613541565b9092509050600061327683866140bf565b9050848111158061328657508381115b15613295575091949350505050565b6132a6826001600160401b03613bab565b604f805477ffffffffffffffffffffffffffffffff000000000000000016600160c01b6001600160401b039384160267ffffffffffffffff19161742929092169190911790556042546001600160a01b0316600081156133e257612710604354866133119190614023565b61331b919061403a565b905080156133e25784811061337d5760405162461bcd60e51b815260206004820152602260248201527f466565206d757374206e6f742062652067726561746572207468616e207969656044820152611b1960f21b60648201526084016109a1565b603c546040516340c10f1960e01b81526001600160a01b03909116906340c10f19906133af90859085906004016140d2565b600060405180830381600087803b1580156133c957600080fd5b505af11580156133dd573d6000803e3d6000fd5b505050505b604080516001600160a01b0384168152602081018790529081018290527f09516ecf4a8a86e59780a9befc6dee948bc9e60a36e3be68d31ea817ee8d2c809060600160405180910390a1603c60009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561347f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906134a391906140eb565b83111561350957603c546040516339a7919f60e01b8152600481018590526001600160a01b03909116906339a7919f90602401600060405180830381600087803b1580156134f057600080fd5b505af1158015613504573d6000803e3d6000fd5b505050505b5093955050505050505b90565b60006109727f0000000000000000000000000000000000000000000000000000000000000000612b05565b6000806000603c60009054906101000a90046001600160a01b03166001600160a01b031663e696393a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015613599573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135bd91906140eb565b905060006135cb8287614104565b604f549091506000906135e7906001600160401b031642614104565b604f54600160c01b90046001600160401b031694509050801580613609575081155b8061361357508587115b8061362557506001600160401b034210155b15613636576000945050505061370d565b6136408787614104565b604f54909550600160401b90046001600160401b031660018111156136a55761367d8561366e836002614023565b613678908961403a565b613bc1565b94506136928561368d838961403a565b613bab565b94506136a28661368d8488614023565b95505b604f546136e6908790670de0b6b3a764000090600160801b90046001600160401b03166136d28688614023565b6136dc9190614023565b61368d919061403a565b955061370686670de0b6b3a76400006136dc66470de4df82000087614023565b9550505050505b9250929050565b6040516001600160a01b038085166024830152831660448201526064810182905261374c9085906323b872dd60e01b906084016128c8565b50505050565b6000610aab8284614023565b6000610aab828461403a565b60006137bf826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613bd09092919063ffffffff16565b805190915015610e0e57808060200190518101906137dd9190614248565b610e0e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016109a1565b60008061385184670de0b6b3a7640000613752565b905061385d818461375e565b949350505050565b806001600160a01b031661388560008051602061431e8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a360008051602061431e83398151915255565b6040516370a0823160e01b815230600482015260009082906001600160a01b038216906370a0823190602401602060405180830381865afa158015613915573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061393991906140eb565b60365490925060005b81811015613a5e5760006036828154811061395f5761395f614093565b60009182526020909120015460405163551c457b60e11b81526001600160a01b0388811660048301529091169150819063aa388af690602401602060405180830381865afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190614248565b15613a5557604051632fa8a91360e11b81526001600160a01b038781166004830152821690635f51522690602401602060405180830381865afa158015613a24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a4891906140eb565b613a5290866140bf565b94505b50600101613942565b505050919050565b600080613a738585613752565b9050613a7f818461375e565b95945050505050565b60408051608081018252604b546001600160801b03808216808452600160801b9283900482166020850152604c54808316958501869052929092041660608301526000928391613ad8919061420a565b6040516370a0823160e01b81523060048201526001600160801b039190911691506000906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015613b4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613b7191906140eb565b9050818111613b84576000935050505090565b613b8e8282614104565b935050505090565b6000610aab8383670de0b6b3a7640000613a66565b6000818310613bba5781610aab565b5090919050565b6000818311613bba5781610aab565b606061385d848460008585843b613c295760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016109a1565b600080866001600160a01b03168587604051613c45919061428e565b60006040518083038185875af1925050503d8060008114613c82576040519150601f19603f3d011682016040523d82523d6000602084013e613c87565b606091505b5091509150613c97828286613ca2565b979650505050505050565b60608315613cb1575081610aab565b825115613cc15782518084602001fd5b8160405162461bcd60e51b81526004016109a191906142aa565b828054828255906000526020600020908101928215613d30579160200282015b82811115613d3057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613cfb565b50612f509291505b80821115612f505760008155600101613d38565b80356001600160a01b0381168114611f5257600080fd5b600080600060608486031215613d7857600080fd5b613d8184613d4c565b95602085013595506040909401359392505050565b602080825282518282018190526000918401906040840190835b81811015613dd75783516001600160a01b0316835260209384019390920191600101613db0565b509095945050505050565b600060208284031215613df457600080fd5b610aab82613d4c565b60008060408385031215613e1057600080fd5b613e1983613d4c565b9150613e2760208401613d4c565b90509250929050565b60008060208385031215613e4357600080fd5b82356001600160401b03811115613e5957600080fd5b8301601f81018513613e6a57600080fd5b80356001600160401b03811115613e8057600080fd5b8560208260051b8401011115613e9557600080fd5b6020919091019590945092505050565b600081518084526020840193506020830160005b82811015613ed7578151865260209586019590910190600101613eb9565b5093949350505050565b604081526000613ef46040830185613ea5565b90508260208301529392505050565b600060208284031215613f1557600080fd5b5035919050565b602081526000610aab6020830184613ea5565b634e487b7160e01b600052602160045260246000fd5b8151151581526020820151608082019060028110613f7357634e487b7160e01b600052602160045260246000fd5b8060208401525060ff604084015116604083015261ffff606084015116606083015292915050565b60008060408385031215613fae57600080fd5b50508035926020909101359150565b6020808252600e908201526d10d85c1a5d185b081c185d5cd95960921b604082015260600190565b6020808252600e908201526d1499595b9d1c985b9d0818d85b1b60921b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176110cc576110cc61400d565b60008261405757634e487b7160e01b600052601260045260246000fd5b500490565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b808201808211156110cc576110cc61400d565b6001600160a01b03929092168252602082015260400190565b6000602082840312156140fd57600080fd5b5051919050565b818103818111156110cc576110cc61400d565b6001815b6001841115614152578085048111156141365761413661400d565b600184161561414457908102905b60019390931c92800261411b565b935093915050565b600082614169575060016110cc565b81614176575060006110cc565b816001811461418c5760028114614196576141b2565b60019150506110cc565b60ff8411156141a7576141a761400d565b50506001821b6110cc565b5060208310610133831016604e8410600b84101617156141d5575081810a6110cc565b6141e26000198484614117565b80600019048211156141f6576141f661400d565b029392505050565b6000610aab838361415a565b6001600160801b0382811682821603908111156110cc576110cc61400d565b6001600160801b0381811683821601908111156110cc576110cc61400d565b60006020828403121561425a57600080fd5b81518015158114610aab57600080fd5b60005b8381101561428557818101518382015260200161426d565b50506000910152565b600082516142a081846020870161426a565b9190910192915050565b60208152600082518060208401526142c981604085016020870161426a565b601f01601f1916919091016040019291505056fe53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535a2bd3d3cf188a41358c8b401076eb59066b09dec5775650c0de4c55187d17bd97bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa2646970667358221220080c10048cd02c60922c73f1307185a629d08d4703fd0355a893c49ba2a7c13764736f6c634300081c0033", "libraries": {}, "devdoc": { "author": "Origin Protocol Inc", @@ -1506,6 +1597,11 @@ "_minimumOusdAmount": "Minimum OTokens to mint" } }, + "previewYield()": { + "returns": { + "yield": "amount of expected yield" + } + }, "priceUnitMint(address)": { "params": { "asset": "address of the asset" @@ -1589,6 +1685,9 @@ "claimWithdrawals(uint256[])": { "notice": "Claim a previously requested withdrawals once they are claimable. This requests can be claimed once the withdrawal queue's `claimable` amount is greater than or equal each request's `queued` amount and 10 minutes has passed. If one of the requests is not claimable, the whole transaction will revert with `Queue pending liquidity`. If one of the requests is not older than 10 minutes, the whole transaction will revert with `Claim delay not met`." }, + "dripDuration()": { + "notice": "Automatic rebase yield calculations. In seconds. Set to 0 or 1 to disable." + }, "dripper()": { "notice": "Address of the Dripper contract that streams harvested rewards to the Vault" }, @@ -1616,6 +1715,9 @@ "isSupportedAsset(address)": { "notice": "Returns whether the vault supports the asset" }, + "lastRebase()": { + "notice": "Time in seconds that the vault last rebased yield." + }, "maxSupplyDiff()": { "notice": "Max difference between total supply and total value of assets. 18 decimals." }, @@ -1631,6 +1733,9 @@ "ousdMetaStrategy()": { "notice": "Metapool strategy that is allowed to mint/burn OTokens without changing collateral" }, + "previewYield()": { + "notice": "Calculates the amount that would rebase at at next rebase. This is before any fees." + }, "priceProvider()": { "notice": "Address of the Oracle price provider contract" }, @@ -1646,6 +1751,12 @@ "rebasePaused()": { "notice": "pause rebasing if true" }, + "rebasePerSecondMax()": { + "notice": "max rebase percentage per second Can be used to set maximum yield of the protocol, spreading out yield over time" + }, + "rebasePerSecondTarget()": { + "notice": "target rebase rate limit, based on past rates and funds available." + }, "rebaseThreshold()": { "notice": "OToken mints over this amount automatically rebase. 18 decimals." }, @@ -1694,7 +1805,7 @@ "storageLayout": { "storage": [ { - "astId": 53792, + "astId": 59237, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "initialized", "offset": 0, @@ -1702,7 +1813,7 @@ "type": "t_bool" }, { - "astId": 53795, + "astId": 59240, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "initializing", "offset": 1, @@ -1710,7 +1821,7 @@ "type": "t_bool" }, { - "astId": 53835, + "astId": 59280, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "______gap", "offset": 0, @@ -1718,15 +1829,15 @@ "type": "t_array(t_uint256)50_storage" }, { - "astId": 60758, + "astId": 66519, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "assets", "offset": 0, "slot": "51", - "type": "t_mapping(t_address,t_struct(Asset)60752_storage)" + "type": "t_mapping(t_address,t_struct(Asset)66513_storage)" }, { - "astId": 60762, + "astId": 66523, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "allAssets", "offset": 0, @@ -1734,15 +1845,15 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60773, + "astId": 66534, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "strategies", "offset": 0, "slot": "53", - "type": "t_mapping(t_address,t_struct(Strategy)60767_storage)" + "type": "t_mapping(t_address,t_struct(Strategy)66528_storage)" }, { - "astId": 60777, + "astId": 66538, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "allStrategies", "offset": 0, @@ -1750,7 +1861,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60780, + "astId": 66541, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "priceProvider", "offset": 0, @@ -1758,7 +1869,7 @@ "type": "t_address" }, { - "astId": 60784, + "astId": 66544, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "rebasePaused", "offset": 20, @@ -1766,7 +1877,7 @@ "type": "t_bool" }, { - "astId": 60788, + "astId": 66547, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "capitalPaused", "offset": 21, @@ -1774,7 +1885,7 @@ "type": "t_bool" }, { - "astId": 60791, + "astId": 66550, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "redeemFeeBps", "offset": 0, @@ -1782,7 +1893,7 @@ "type": "t_uint256" }, { - "astId": 60794, + "astId": 66553, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "vaultBuffer", "offset": 0, @@ -1790,7 +1901,7 @@ "type": "t_uint256" }, { - "astId": 60797, + "astId": 66556, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "autoAllocateThreshold", "offset": 0, @@ -1798,7 +1909,7 @@ "type": "t_uint256" }, { - "astId": 60800, + "astId": 66559, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "rebaseThreshold", "offset": 0, @@ -1806,15 +1917,15 @@ "type": "t_uint256" }, { - "astId": 60804, + "astId": 66563, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "oUSD", "offset": 0, "slot": "60", - "type": "t_contract(OUSD)51174" + "type": "t_contract(OUSD)56628" }, { - "astId": 60815, + "astId": 66574, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "_deprecated_rebaseHooksAddr", "offset": 0, @@ -1822,7 +1933,7 @@ "type": "t_address" }, { - "astId": 60822, + "astId": 66581, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "_deprecated_uniswapAddr", "offset": 0, @@ -1830,7 +1941,7 @@ "type": "t_address" }, { - "astId": 60829, + "astId": 66588, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "strategistAddr", "offset": 0, @@ -1838,7 +1949,7 @@ "type": "t_address" }, { - "astId": 60834, + "astId": 66593, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "assetDefaultStrategies", "offset": 0, @@ -1846,7 +1957,7 @@ "type": "t_mapping(t_address,t_address)" }, { - "astId": 60837, + "astId": 66596, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "maxSupplyDiff", "offset": 0, @@ -1854,7 +1965,7 @@ "type": "t_uint256" }, { - "astId": 60840, + "astId": 66599, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "trusteeAddress", "offset": 0, @@ -1862,7 +1973,7 @@ "type": "t_address" }, { - "astId": 60843, + "astId": 66602, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "trusteeFeeBps", "offset": 0, @@ -1870,7 +1981,7 @@ "type": "t_uint256" }, { - "astId": 60847, + "astId": 66606, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "_deprecated_swapTokens", "offset": 0, @@ -1878,7 +1989,7 @@ "type": "t_array(t_address)dyn_storage" }, { - "astId": 60853, + "astId": 66612, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "ousdMetaStrategy", "offset": 0, @@ -1886,7 +1997,7 @@ "type": "t_address" }, { - "astId": 60856, + "astId": 66615, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "netOusdMintedForStrategy", "offset": 0, @@ -1894,7 +2005,7 @@ "type": "t_int256" }, { - "astId": 60859, + "astId": 66618, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "netOusdMintForStrategyThreshold", "offset": 0, @@ -1902,15 +2013,15 @@ "type": "t_uint256" }, { - "astId": 60881, + "astId": 66640, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "swapConfig", "offset": 0, "slot": "72", - "type": "t_struct(SwapConfig)60871_storage" + "type": "t_struct(SwapConfig)66630_storage" }, { - "astId": 60885, + "astId": 66644, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "isMintWhitelistedStrategy", "offset": 0, @@ -1918,7 +2029,7 @@ "type": "t_mapping(t_address,t_bool)" }, { - "astId": 60888, + "astId": 66647, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "dripper", "offset": 0, @@ -1926,23 +2037,23 @@ "type": "t_address" }, { - "astId": 60902, + "astId": 66661, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "withdrawalQueueMetadata", "offset": 0, "slot": "75", - "type": "t_struct(WithdrawalQueueMetadata)60898_storage" + "type": "t_struct(WithdrawalQueueMetadata)66657_storage" }, { - "astId": 60919, + "astId": 66678, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "withdrawalRequests", "offset": 0, "slot": "77", - "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)" + "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)" }, { - "astId": 60922, + "astId": 66681, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "withdrawalClaimDelay", "offset": 0, @@ -1950,15 +2061,47 @@ "type": "t_uint256" }, { - "astId": 60926, + "astId": 66684, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", - "label": "__gap", + "label": "lastRebase", "offset": 0, "slot": "79", - "type": "t_array(t_uint256)44_storage" + "type": "t_uint64" }, { - "astId": 55647, + "astId": 66687, + "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", + "label": "dripDuration", + "offset": 8, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66690, + "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", + "label": "rebasePerSecondMax", + "offset": 16, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66693, + "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", + "label": "rebasePerSecondTarget", + "offset": 24, + "slot": "79", + "type": "t_uint64" + }, + { + "astId": 66708, + "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", + "label": "__gap", + "offset": 0, + "slot": "80", + "type": "t_array(t_uint256)43_storage" + }, + { + "astId": 61092, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "wethAssetIndex", "offset": 0, @@ -1966,7 +2109,7 @@ "type": "t_uint256" }, { - "astId": 55651, + "astId": 61096, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "__gap", "offset": 0, @@ -1986,11 +2129,11 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_uint256)44_storage": { + "t_array(t_uint256)43_storage": { "base": "t_uint256", "encoding": "inplace", - "label": "uint256[44]", - "numberOfBytes": "1408" + "label": "uint256[43]", + "numberOfBytes": "1376" }, "t_array(t_uint256)50_storage": { "base": "t_uint256", @@ -2003,12 +2146,12 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(OUSD)51174": { + "t_contract(OUSD)56628": { "encoding": "inplace", "label": "contract OUSD", "numberOfBytes": "20" }, - "t_enum(UnitConversion)60742": { + "t_enum(UnitConversion)66503": { "encoding": "inplace", "label": "enum VaultStorage.UnitConversion", "numberOfBytes": "1" @@ -2032,33 +2175,33 @@ "numberOfBytes": "32", "value": "t_bool" }, - "t_mapping(t_address,t_struct(Asset)60752_storage)": { + "t_mapping(t_address,t_struct(Asset)66513_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct VaultStorage.Asset)", "numberOfBytes": "32", - "value": "t_struct(Asset)60752_storage" + "value": "t_struct(Asset)66513_storage" }, - "t_mapping(t_address,t_struct(Strategy)60767_storage)": { + "t_mapping(t_address,t_struct(Strategy)66528_storage)": { "encoding": "mapping", "key": "t_address", "label": "mapping(address => struct VaultStorage.Strategy)", "numberOfBytes": "32", - "value": "t_struct(Strategy)60767_storage" + "value": "t_struct(Strategy)66528_storage" }, - "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)": { + "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)": { "encoding": "mapping", "key": "t_uint256", "label": "mapping(uint256 => struct VaultStorage.WithdrawalRequest)", "numberOfBytes": "32", - "value": "t_struct(WithdrawalRequest)60913_storage" + "value": "t_struct(WithdrawalRequest)66672_storage" }, - "t_struct(Asset)60752_storage": { + "t_struct(Asset)66513_storage": { "encoding": "inplace", "label": "struct VaultStorage.Asset", "members": [ { - "astId": 60744, + "astId": 66505, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "isSupported", "offset": 0, @@ -2066,15 +2209,15 @@ "type": "t_bool" }, { - "astId": 60747, + "astId": 66508, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "unitConversion", "offset": 1, "slot": "0", - "type": "t_enum(UnitConversion)60742" + "type": "t_enum(UnitConversion)66503" }, { - "astId": 60749, + "astId": 66510, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "decimals", "offset": 2, @@ -2082,7 +2225,7 @@ "type": "t_uint8" }, { - "astId": 60751, + "astId": 66512, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "allowedOracleSlippageBps", "offset": 3, @@ -2092,12 +2235,12 @@ ], "numberOfBytes": "32" }, - "t_struct(Strategy)60767_storage": { + "t_struct(Strategy)66528_storage": { "encoding": "inplace", "label": "struct VaultStorage.Strategy", "members": [ { - "astId": 60764, + "astId": 66525, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "isSupported", "offset": 0, @@ -2105,7 +2248,7 @@ "type": "t_bool" }, { - "astId": 60766, + "astId": 66527, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "_deprecated", "offset": 0, @@ -2115,12 +2258,12 @@ ], "numberOfBytes": "64" }, - "t_struct(SwapConfig)60871_storage": { + "t_struct(SwapConfig)66630_storage": { "encoding": "inplace", "label": "struct VaultStorage.SwapConfig", "members": [ { - "astId": 60868, + "astId": 66627, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "swapper", "offset": 0, @@ -2128,7 +2271,7 @@ "type": "t_address" }, { - "astId": 60870, + "astId": 66629, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "allowedUndervalueBps", "offset": 20, @@ -2138,12 +2281,12 @@ ], "numberOfBytes": "32" }, - "t_struct(WithdrawalQueueMetadata)60898_storage": { + "t_struct(WithdrawalQueueMetadata)66657_storage": { "encoding": "inplace", "label": "struct VaultStorage.WithdrawalQueueMetadata", "members": [ { - "astId": 60891, + "astId": 66650, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "queued", "offset": 0, @@ -2151,7 +2294,7 @@ "type": "t_uint128" }, { - "astId": 60893, + "astId": 66652, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "claimable", "offset": 16, @@ -2159,7 +2302,7 @@ "type": "t_uint128" }, { - "astId": 60895, + "astId": 66654, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "claimed", "offset": 0, @@ -2167,7 +2310,7 @@ "type": "t_uint128" }, { - "astId": 60897, + "astId": 66656, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "nextWithdrawalIndex", "offset": 16, @@ -2177,12 +2320,12 @@ ], "numberOfBytes": "64" }, - "t_struct(WithdrawalRequest)60913_storage": { + "t_struct(WithdrawalRequest)66672_storage": { "encoding": "inplace", "label": "struct VaultStorage.WithdrawalRequest", "members": [ { - "astId": 60904, + "astId": 66663, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "withdrawer", "offset": 0, @@ -2190,7 +2333,7 @@ "type": "t_address" }, { - "astId": 60906, + "astId": 66665, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "claimed", "offset": 20, @@ -2198,7 +2341,7 @@ "type": "t_bool" }, { - "astId": 60908, + "astId": 66667, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "timestamp", "offset": 21, @@ -2206,7 +2349,7 @@ "type": "t_uint40" }, { - "astId": 60910, + "astId": 66669, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "amount", "offset": 0, @@ -2214,7 +2357,7 @@ "type": "t_uint128" }, { - "astId": 60912, + "astId": 66671, "contract": "contracts/vault/OETHVaultCore.sol:OETHVaultCore", "label": "queued", "offset": 16, @@ -2244,6 +2387,11 @@ "label": "uint40", "numberOfBytes": "5" }, + "t_uint64": { + "encoding": "inplace", + "label": "uint64", + "numberOfBytes": "8" + }, "t_uint8": { "encoding": "inplace", "label": "uint8", diff --git a/contracts/deployments/mainnet/WOETH.json b/contracts/deployments/mainnet/WOETH.json index 4ce3e0ecda..31e912bb12 100644 --- a/contracts/deployments/mainnet/WOETH.json +++ b/contracts/deployments/mainnet/WOETH.json @@ -1,5 +1,5 @@ { - "address": "0x9C5a92AaA2A4373D6bd20F7b45cdEb7A13f9AA79", + "address": "0x388782b21275F75255f3ee08e23Bd3991d4eB830", "abi": [ { "inputs": [ @@ -7,16 +7,6 @@ "internalType": "contract ERC20", "name": "underlying_", "type": "address" - }, - { - "internalType": "string", - "name": "name_", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol_", - "type": "string" } ], "stateMutability": "nonpayable", @@ -178,6 +168,19 @@ "name": "Withdraw", "type": "event" }, + { + "inputs": [], + "name": "adjuster", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, { "inputs": [ { @@ -408,6 +411,13 @@ "stateMutability": "nonpayable", "type": "function" }, + { + "inputs": [], + "name": "initialize2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, { "inputs": [], "name": "isGovernor", @@ -792,48 +802,42 @@ "type": "function" } ], - "transactionHash": "0xbc9c39ca4f83c7ec5ee9a661584defe299da8f2242a83266efa6e8edd053d2c2", + "transactionHash": "0x1ceebd0513db0b599fc55eda86957dd1881523069c7ff769bf9353c77496a331", "receipt": { "to": null, "from": "0xFD9E6005187F448957a0972a7d0C0A6dA2911236", - "contractAddress": "0x9C5a92AaA2A4373D6bd20F7b45cdEb7A13f9AA79", - "transactionIndex": 14, - "gasUsed": "1799404", - "logsBloom": "0x00000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000020000000000000000000800000100000000000000000000000000000014000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x0b36d1c61fa5e2fb72074d13f4d3f294760ea5e022df47683fbad32484c782d6", - "transactionHash": "0xbc9c39ca4f83c7ec5ee9a661584defe299da8f2242a83266efa6e8edd053d2c2", - "logs": [ - { - "transactionIndex": 14, - "blockNumber": 17067478, - "transactionHash": "0xbc9c39ca4f83c7ec5ee9a661584defe299da8f2242a83266efa6e8edd053d2c2", - "address": "0x9C5a92AaA2A4373D6bd20F7b45cdEb7A13f9AA79", - "topics": [ - "0xc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "0x000000000000000000000000fd9e6005187f448957a0972a7d0c0a6da2911236" - ], - "data": "0x", - "logIndex": 45, - "blockHash": "0x0b36d1c61fa5e2fb72074d13f4d3f294760ea5e022df47683fbad32484c782d6" - } - ], - "blockNumber": 17067478, - "cumulativeGasUsed": "3484840", + "contractAddress": "0x388782b21275F75255f3ee08e23Bd3991d4eB830", + "transactionIndex": 27, + "gasUsed": "1665746", + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "blockHash": "0x459bbc3d2cbc9aed03217a9b36871de459e1a9c35d039e8f510e48b8118420b3", + "transactionHash": "0x1ceebd0513db0b599fc55eda86957dd1881523069c7ff769bf9353c77496a331", + "logs": [], + "blockNumber": 22325612, + "cumulativeGasUsed": "4617420", "status": 1, "byzantium": true }, "args": [ - "0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3", - "Wrapped OETH", - "WOETH" + "0x856c4Efb76C1D1AE02e20CEB03A2A6a08b0b8dC3" ], - "solcInputHash": "8564b351f4bb5da3f43a5b9c5739eec4", - "metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"underlying_\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"name_\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"symbol_\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"transferToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"asset()\":{\"details\":\"See {IERC4262-asset} \"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"claimGovernance()\":{\"details\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"convertToAssets(uint256)\":{\"details\":\"See {IERC4262-convertToAssets} \"},\"convertToShares(uint256)\":{\"details\":\"See {IERC4262-convertToShares} Will revert if asserts > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset would represent an infinite amout of shares.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"deposit(uint256,address)\":{\"details\":\"See {IERC4262-deposit} \"},\"governor()\":{\"details\":\"Returns the address of the current Governor.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"isGovernor()\":{\"details\":\"Returns true if the caller is the current Governor.\"},\"maxDeposit(address)\":{\"details\":\"See {IERC4262-maxDeposit} \"},\"maxMint(address)\":{\"details\":\"See {IERC4262-maxMint} \"},\"maxRedeem(address)\":{\"details\":\"See {IERC4262-maxRedeem} \"},\"maxWithdraw(address)\":{\"details\":\"See {IERC4262-maxWithdraw} \"},\"mint(uint256,address)\":{\"details\":\"See {IERC4262-mint} \"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"previewDeposit(uint256)\":{\"details\":\"See {IERC4262-previewDeposit} \"},\"previewMint(uint256)\":{\"details\":\"See {IERC4262-previewMint} \"},\"previewRedeem(uint256)\":{\"details\":\"See {IERC4262-previewRedeem} \"},\"previewWithdraw(uint256)\":{\"details\":\"See {IERC4262-previewWithdraw} \"},\"redeem(uint256,address,address)\":{\"details\":\"See {IERC4262-redeem} \"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalAssets()\":{\"details\":\"See {IERC4262-totalAssets} \"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferGovernance(address)\":{\"details\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\",\"params\":{\"_newGovernor\":\"Address of the new Governor\"}},\"transferToken(address,uint256)\":{\"params\":{\"amount_\":\"Amount of the asset to transfer\",\"asset_\":\"Address for the asset\"}},\"withdraw(uint256,address,address)\":{\"details\":\"See {IERC4262-withdraw} \"}},\"title\":\"OETH Token Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"initialize()\":{\"notice\":\"Enable OETH rebasing for this contract\"},\"transferToken(address,uint256)\":{\"notice\":\"Transfer token to governor. Intended for recovering tokens stuck in contract, i.e. mistaken sends. Cannot transfer OETH\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/WOETH.sol\":\"WOETH\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xd1d8caaeb45f78e0b0715664d56c220c283c89bf8b8c02954af86404d6b367f8\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n /**\\n * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n uint256 c = a + b;\\n if (c < a) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the substraction of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b > a) return (false, 0);\\n return (true, a - b);\\n }\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n // benefit is lost if 'b' is also tested.\\n // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n if (a == 0) return (true, 0);\\n uint256 c = a * b;\\n if (c / a != b) return (false, 0);\\n return (true, c);\\n }\\n }\\n\\n /**\\n * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a / b);\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n *\\n * _Available since v3.4._\\n */\\n function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n unchecked {\\n if (b == 0) return (false, 0);\\n return (true, a % b);\\n }\\n }\\n\\n /**\\n * @dev Returns the addition of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `+` operator.\\n *\\n * Requirements:\\n *\\n * - Addition cannot overflow.\\n */\\n function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a + b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting on\\n * overflow (when the result is negative).\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a - b;\\n }\\n\\n /**\\n * @dev Returns the multiplication of two unsigned integers, reverting on\\n * overflow.\\n *\\n * Counterpart to Solidity's `*` operator.\\n *\\n * Requirements:\\n *\\n * - Multiplication cannot overflow.\\n */\\n function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a * b;\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator.\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a / b;\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting when dividing by zero.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n return a % b;\\n }\\n\\n /**\\n * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n * overflow (when the result is negative).\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {trySub}.\\n *\\n * Counterpart to Solidity's `-` operator.\\n *\\n * Requirements:\\n *\\n * - Subtraction cannot overflow.\\n */\\n function sub(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b <= a, errorMessage);\\n return a - b;\\n }\\n }\\n\\n /**\\n * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n * division by zero. The result is rounded towards zero.\\n *\\n * Counterpart to Solidity's `/` operator. Note: this function uses a\\n * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n * uses an invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function div(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a / b;\\n }\\n }\\n\\n /**\\n * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n * reverting with custom message when dividing by zero.\\n *\\n * CAUTION: This function is deprecated because it requires allocating memory for the error\\n * message unnecessarily. For custom revert reasons use {tryMod}.\\n *\\n * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n * opcode (which leaves remaining gas untouched) while Solidity uses an\\n * invalid opcode to revert (consuming all remaining gas).\\n *\\n * Requirements:\\n *\\n * - The divisor cannot be zero.\\n */\\n function mod(\\n uint256 a,\\n uint256 b,\\n string memory errorMessage\\n ) internal pure returns (uint256) {\\n unchecked {\\n require(b > 0, errorMessage);\\n return a % b;\\n }\\n }\\n}\\n\",\"keccak256\":\"0xa2f576be637946f767aa56601c26d717f48a0aff44f82e46f13807eea1009a21\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Governable Contract\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\ncontract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @dev Initializes the contract setting the deployer as the initial Governor.\\n */\\n constructor() {\\n _setGovernor(msg.sender);\\n emit GovernorshipTransferred(address(0), _governor());\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @dev Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @dev Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n emit GovernorshipTransferred(_governor(), _newGovernor);\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0x1b2af4d111ebd49acdbdfb4817b90bff752a453576d4e0b03dd5e5954f236c1b\",\"license\":\"MIT\"},\"contracts/token/OETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { OUSD } from \\\"./OUSD.sol\\\";\\n\\n/**\\n * @title OETH Token Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETH is OUSD {\\n\\n}\\n\",\"keccak256\":\"0x1046a590097f1cddcc1523b4d646fbe2db7c646e40fc504a6947202e44dada4a\",\"license\":\"MIT\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport { Address } from \\\"@openzeppelin/contracts/utils/Address.sol\\\";\\n\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport { InitializableERC20Detailed } from \\\"../utils/InitializableERC20Detailed.sol\\\";\\nimport { StableMath } from \\\"../utils/StableMath.sol\\\";\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\n\\n/**\\n * NOTE that this is an ERC20 token but the invariant that the sum of\\n * balanceOf(x) for all x is not >= totalSupply(). This is a consequence of the\\n * rebasing design. Any integrations with OUSD should be aware.\\n */\\n\\ncontract OUSD is Initializable, InitializableERC20Detailed, Governable {\\n using SafeMath for uint256;\\n using StableMath for uint256;\\n\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n\\n enum RebaseOptions {\\n NotSet,\\n OptOut,\\n OptIn\\n }\\n\\n uint256 private constant MAX_SUPPLY = ~uint128(0); // (2^128) - 1\\n uint256 public _totalSupply;\\n mapping(address => mapping(address => uint256)) private _allowances;\\n address public vaultAddress = address(0);\\n mapping(address => uint256) private _creditBalances;\\n uint256 private _rebasingCredits;\\n uint256 private _rebasingCreditsPerToken;\\n // Frozen address/credits are non rebasing (value is held in contracts which\\n // do not receive yield unless they explicitly opt in)\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) public nonRebasingCreditsPerToken;\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) public isUpgraded;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n\\n function initialize(\\n string calldata _nameArg,\\n string calldata _symbolArg,\\n address _vaultAddress,\\n uint256 _initialCreditsPerToken\\n ) external onlyGovernor initializer {\\n InitializableERC20Detailed._initialize(_nameArg, _symbolArg, 18);\\n _rebasingCreditsPerToken = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return The total supply of OUSD.\\n */\\n function totalSupply() public view override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() public view returns (uint256) {\\n return _rebasingCreditsPerToken / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() public view returns (uint256) {\\n return _rebasingCredits / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() public view returns (uint256) {\\n return _rebasingCreditsPerToken;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() public view returns (uint256) {\\n return _rebasingCredits;\\n }\\n\\n /**\\n * @dev Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account)\\n public\\n view\\n override\\n returns (uint256)\\n {\\n if (_creditBalances[_account] == 0) return 0;\\n return\\n _creditBalances[_account].divPrecisely(_creditsPerToken(_account));\\n }\\n\\n /**\\n * @dev Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n public\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (_creditBalances[_account], cpt);\\n } else {\\n return (\\n _creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @dev Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n public\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n _creditBalances[_account],\\n _creditsPerToken(_account),\\n isUpgraded[_account] == 1\\n );\\n }\\n\\n /**\\n * @dev Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value)\\n public\\n override\\n returns (bool)\\n {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n require(\\n _value <= balanceOf(msg.sender),\\n \\\"Transfer greater than balance\\\"\\n );\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) public override returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n require(_value <= balanceOf(_from), \\\"Transfer greater than balance\\\");\\n\\n _allowances[_from][msg.sender] = _allowances[_from][msg.sender].sub(\\n _value\\n );\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n\\n return true;\\n }\\n\\n /**\\n * @dev Update the count of non rebasing credits in response to a transfer\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value Amount of OUSD to transfer\\n */\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n bool isNonRebasingTo = _isNonRebasingAccount(_to);\\n bool isNonRebasingFrom = _isNonRebasingAccount(_from);\\n\\n // Credits deducted and credited might be different due to the\\n // differing creditsPerToken used by each account\\n uint256 creditsCredited = _value.mulTruncate(_creditsPerToken(_to));\\n uint256 creditsDeducted = _value.mulTruncate(_creditsPerToken(_from));\\n\\n _creditBalances[_from] = _creditBalances[_from].sub(\\n creditsDeducted,\\n \\\"Transfer amount exceeds balance\\\"\\n );\\n _creditBalances[_to] = _creditBalances[_to].add(creditsCredited);\\n\\n if (isNonRebasingTo && !isNonRebasingFrom) {\\n // Transfer to non-rebasing account from rebasing account, credits\\n // are removed from the non rebasing tally\\n nonRebasingSupply = nonRebasingSupply.add(_value);\\n // Update rebasingCredits by subtracting the deducted amount\\n _rebasingCredits = _rebasingCredits.sub(creditsDeducted);\\n } else if (!isNonRebasingTo && isNonRebasingFrom) {\\n // Transfer to rebasing account from non-rebasing account\\n // Decreasing non-rebasing credits by the amount that was sent\\n nonRebasingSupply = nonRebasingSupply.sub(_value);\\n // Update rebasingCredits by adding the credited amount\\n _rebasingCredits = _rebasingCredits.add(creditsCredited);\\n }\\n }\\n\\n /**\\n * @dev Function to check the amount of tokens that _owner has allowed to\\n * `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n public\\n view\\n override\\n returns (uint256)\\n {\\n return _allowances[_owner][_spender];\\n }\\n\\n /**\\n * @dev Approve the passed address to spend the specified amount of tokens\\n * on behalf of msg.sender. This method is included for ERC20\\n * compatibility. `increaseAllowance` and `decreaseAllowance` should be\\n * used instead.\\n *\\n * Changing an allowance with this method brings the risk that someone\\n * may transfer both the old and the new allowance - if they are both\\n * greater than zero - if a transfer transaction is mined before the\\n * later approve() call is mined.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n */\\n function approve(address _spender, uint256 _value)\\n public\\n override\\n returns (bool)\\n {\\n _allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @dev Increase the amount of tokens that an owner has allowed to\\n * `_spender`.\\n * This method should be used instead of approve() to avoid the double\\n * approval vulnerability described above.\\n * @param _spender The address which will spend the funds.\\n * @param _addedValue The amount of tokens to increase the allowance by.\\n */\\n function increaseAllowance(address _spender, uint256 _addedValue)\\n public\\n returns (bool)\\n {\\n _allowances[msg.sender][_spender] = _allowances[msg.sender][_spender]\\n .add(_addedValue);\\n emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]);\\n return true;\\n }\\n\\n /**\\n * @dev Decrease the amount of tokens that an owner has allowed to\\n `_spender`.\\n * @param _spender The address which will spend the funds.\\n * @param _subtractedValue The amount of tokens to decrease the allowance\\n * by.\\n */\\n function decreaseAllowance(address _spender, uint256 _subtractedValue)\\n public\\n returns (bool)\\n {\\n uint256 oldValue = _allowances[msg.sender][_spender];\\n if (_subtractedValue >= oldValue) {\\n _allowances[msg.sender][_spender] = 0;\\n } else {\\n _allowances[msg.sender][_spender] = oldValue.sub(_subtractedValue);\\n }\\n emit Approval(msg.sender, _spender, _allowances[msg.sender][_spender]);\\n return true;\\n }\\n\\n /**\\n * @dev Mints new tokens, increasing totalSupply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n _mint(_account, _amount);\\n }\\n\\n /**\\n * @dev Creates `_amount` tokens and assigns them to `_account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements\\n *\\n * - `to` cannot be the zero address.\\n */\\n function _mint(address _account, uint256 _amount) internal nonReentrant {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n bool isNonRebasingAccount = _isNonRebasingAccount(_account);\\n\\n uint256 creditAmount = _amount.mulTruncate(_creditsPerToken(_account));\\n _creditBalances[_account] = _creditBalances[_account].add(creditAmount);\\n\\n // If the account is non rebasing and doesn't have a set creditsPerToken\\n // then set it i.e. this is a mint from a fresh contract\\n if (isNonRebasingAccount) {\\n nonRebasingSupply = nonRebasingSupply.add(_amount);\\n } else {\\n _rebasingCredits = _rebasingCredits.add(creditAmount);\\n }\\n\\n _totalSupply = _totalSupply.add(_amount);\\n\\n require(_totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @dev Burns tokens, decreasing totalSupply.\\n */\\n function burn(address account, uint256 amount) external onlyVault {\\n _burn(account, amount);\\n }\\n\\n /**\\n * @dev Destroys `_amount` tokens from `_account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements\\n *\\n * - `_account` cannot be the zero address.\\n * - `_account` must have at least `_amount` tokens.\\n */\\n function _burn(address _account, uint256 _amount) internal nonReentrant {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n bool isNonRebasingAccount = _isNonRebasingAccount(_account);\\n uint256 creditAmount = _amount.mulTruncate(_creditsPerToken(_account));\\n uint256 currentCredits = _creditBalances[_account];\\n\\n // Remove the credits, burning rounding errors\\n if (\\n currentCredits == creditAmount || currentCredits - 1 == creditAmount\\n ) {\\n // Handle dust from rounding\\n _creditBalances[_account] = 0;\\n } else if (currentCredits > creditAmount) {\\n _creditBalances[_account] = _creditBalances[_account].sub(\\n creditAmount\\n );\\n } else {\\n revert(\\\"Remove exceeds balance\\\");\\n }\\n\\n // Remove from the credit tallies and non-rebasing supply\\n if (isNonRebasingAccount) {\\n nonRebasingSupply = nonRebasingSupply.sub(_amount);\\n } else {\\n _rebasingCredits = _rebasingCredits.sub(creditAmount);\\n }\\n\\n _totalSupply = _totalSupply.sub(_amount);\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n if (nonRebasingCreditsPerToken[_account] != 0) {\\n return nonRebasingCreditsPerToken[_account];\\n } else {\\n return _rebasingCreditsPerToken;\\n }\\n }\\n\\n /**\\n * @dev Is an account using rebasing accounting or non-rebasing accounting?\\n * Also, ensure contracts are non-rebasing if they have not opted in.\\n * @param _account Address of the account.\\n */\\n function _isNonRebasingAccount(address _account) internal returns (bool) {\\n bool isContract = Address.isContract(_account);\\n if (isContract && rebaseState[_account] == RebaseOptions.NotSet) {\\n _ensureRebasingMigration(_account);\\n }\\n return nonRebasingCreditsPerToken[_account] > 0;\\n }\\n\\n /**\\n * @dev Ensures internal account for rebasing and non-rebasing credits and\\n * supply is updated following deployment of frozen yield change.\\n */\\n function _ensureRebasingMigration(address _account) internal {\\n if (nonRebasingCreditsPerToken[_account] == 0) {\\n if (_creditBalances[_account] == 0) {\\n // Since there is no existing balance, we can directly set to\\n // high resolution, and do not have to do any other bookkeeping\\n nonRebasingCreditsPerToken[_account] = 1e27;\\n } else {\\n // Migrate an existing account:\\n\\n // Set fixed credits per token for this account\\n nonRebasingCreditsPerToken[_account] = _rebasingCreditsPerToken;\\n // Update non rebasing supply\\n nonRebasingSupply = nonRebasingSupply.add(balanceOf(_account));\\n // Update credit tallies\\n _rebasingCredits = _rebasingCredits.sub(\\n _creditBalances[_account]\\n );\\n }\\n }\\n }\\n\\n /**\\n * @dev Add a contract address to the non-rebasing exception list. The\\n * address's balance will be part of rebases and the account will be exposed\\n * to upside and downside.\\n */\\n function rebaseOptIn() public nonReentrant {\\n require(_isNonRebasingAccount(msg.sender), \\\"Account has not opted out\\\");\\n\\n // Convert balance into the same amount at the current exchange rate\\n uint256 newCreditBalance = _creditBalances[msg.sender]\\n .mul(_rebasingCreditsPerToken)\\n .div(_creditsPerToken(msg.sender));\\n\\n // Decreasing non rebasing supply\\n nonRebasingSupply = nonRebasingSupply.sub(balanceOf(msg.sender));\\n\\n _creditBalances[msg.sender] = newCreditBalance;\\n\\n // Increase rebasing credits, totalSupply remains unchanged so no\\n // adjustment necessary\\n _rebasingCredits = _rebasingCredits.add(_creditBalances[msg.sender]);\\n\\n rebaseState[msg.sender] = RebaseOptions.OptIn;\\n\\n // Delete any fixed credits per token\\n delete nonRebasingCreditsPerToken[msg.sender];\\n }\\n\\n /**\\n * @dev Explicitly mark that an address is non-rebasing.\\n */\\n function rebaseOptOut() public nonReentrant {\\n require(!_isNonRebasingAccount(msg.sender), \\\"Account has not opted in\\\");\\n\\n // Increase non rebasing supply\\n nonRebasingSupply = nonRebasingSupply.add(balanceOf(msg.sender));\\n // Set fixed credits per token\\n nonRebasingCreditsPerToken[msg.sender] = _rebasingCreditsPerToken;\\n\\n // Decrease rebasing credits, total supply remains unchanged so no\\n // adjustment necessary\\n _rebasingCredits = _rebasingCredits.sub(_creditBalances[msg.sender]);\\n\\n // Mark explicitly opted out of rebasing\\n rebaseState[msg.sender] = RebaseOptions.OptOut;\\n }\\n\\n /**\\n * @dev Modify the supply without minting new tokens. This uses a change in\\n * the exchange rate between \\\"credits\\\" and OUSD tokens to change balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply)\\n external\\n onlyVault\\n nonReentrant\\n {\\n require(_totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (_totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n _totalSupply,\\n _rebasingCredits,\\n _rebasingCreditsPerToken\\n );\\n return;\\n }\\n\\n _totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n _rebasingCreditsPerToken = _rebasingCredits.divPrecisely(\\n _totalSupply.sub(nonRebasingSupply)\\n );\\n\\n require(_rebasingCreditsPerToken > 0, \\\"Invalid change in supply\\\");\\n\\n _totalSupply = _rebasingCredits\\n .divPrecisely(_rebasingCreditsPerToken)\\n .add(nonRebasingSupply);\\n\\n emit TotalSupplyUpdatedHighres(\\n _totalSupply,\\n _rebasingCredits,\\n _rebasingCreditsPerToken\\n );\\n }\\n}\\n\",\"keccak256\":\"0x14a6bcf58e3622e475941619b0491b5e486bc7f6a3568ac179630bd4d725b85b\",\"license\":\"MIT\"},\"contracts/token/WOETH.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { ERC4626 } from \\\"../../lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport { OETH } from \\\"./OETH.sol\\\";\\n\\n/**\\n * @title OETH Token Contract\\n * @author Origin Protocol Inc\\n */\\n\\ncontract WOETH is ERC4626, Governable, Initializable {\\n using SafeERC20 for IERC20;\\n\\n constructor(\\n ERC20 underlying_,\\n string memory name_,\\n string memory symbol_\\n ) ERC20(name_, symbol_) ERC4626(underlying_) Governable() {}\\n\\n /**\\n * @notice Enable OETH rebasing for this contract\\n */\\n function initialize() external onlyGovernor initializer {\\n OETH(address(asset())).rebaseOptIn();\\n }\\n\\n function name() public view override returns (string memory) {\\n return \\\"Wrapped OETH\\\";\\n }\\n\\n function symbol() public view override returns (string memory) {\\n return \\\"WOETH\\\";\\n }\\n\\n /**\\n * @notice Transfer token to governor. Intended for recovering tokens stuck in\\n * contract, i.e. mistaken sends. Cannot transfer OETH\\n * @param asset_ Address for the asset\\n * @param amount_ Amount of the asset to transfer\\n */\\n function transferToken(address asset_, uint256 amount_)\\n external\\n onlyGovernor\\n {\\n require(asset_ != address(asset()), \\\"Cannot collect OETH\\\");\\n IERC20(asset_).safeTransfer(governor(), amount_);\\n }\\n}\\n\",\"keccak256\":\"0xbd46885cdaa9a652826f50fc861adc1f623699a699569c0a8ba4fba8be39df7b\",\"license\":\"MIT\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0xed91beae8c271cd70d80a9fce9306f1c46b8437cdd1d78ed9b75c067961e5259\",\"license\":\"MIT\"},\"contracts/utils/InitializableERC20Detailed.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\n/**\\n * @dev Optional functions from the ERC20 standard.\\n * Converted from openzeppelin/contracts/token/ERC20/ERC20Detailed.sol\\n */\\nabstract contract InitializableERC20Detailed is IERC20 {\\n // Storage gap to skip storage from prior to OUSD reset\\n uint256[100] private _____gap;\\n\\n string private _name;\\n string private _symbol;\\n uint8 private _decimals;\\n\\n /**\\n * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of\\n * these values are immutable: they can only be set once during\\n * construction.\\n * @notice To avoid variable shadowing appended `Arg` after arguments name.\\n */\\n function _initialize(\\n string memory nameArg,\\n string memory symbolArg,\\n uint8 decimalsArg\\n ) internal {\\n _name = nameArg;\\n _symbol = symbolArg;\\n _decimals = decimalsArg;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5,05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view returns (uint8) {\\n return _decimals;\\n }\\n}\\n\",\"keccak256\":\"0x9ffba86e00ab24fab65da197f3c44f4b672dafbc63926584bdf42c47425dba51\",\"license\":\"MIT\"},\"contracts/utils/StableMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport { SafeMath } from \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\n\\n// Based on StableMath from Stability Labs Pty. Ltd.\\n// https://github.com/mstable/mStable-contracts/blob/master/contracts/shared/StableMath.sol\\n\\nlibrary StableMath {\\n using SafeMath for uint256;\\n\\n /**\\n * @dev Scaling unit for use in specific calculations,\\n * where 1 * 10**18, or 1e18 represents a unit '1'\\n */\\n uint256 private constant FULL_SCALE = 1e18;\\n\\n /***************************************\\n Helpers\\n ****************************************/\\n\\n /**\\n * @dev Adjust the scale of an integer\\n * @param to Decimals to scale to\\n * @param from Decimals to scale from\\n */\\n function scaleBy(\\n uint256 x,\\n uint256 to,\\n uint256 from\\n ) internal pure returns (uint256) {\\n if (to > from) {\\n x = x.mul(10**(to - from));\\n } else if (to < from) {\\n // slither-disable-next-line divide-before-multiply\\n x = x.div(10**(from - to));\\n }\\n return x;\\n }\\n\\n /***************************************\\n Precise Arithmetic\\n ****************************************/\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncate(uint256 x, uint256 y) internal pure returns (uint256) {\\n return mulTruncateScale(x, y, FULL_SCALE);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the given scale. For example,\\n * when calculating 90% of 10e18, (10e18 * 9e17) / 1e18 = (9e36) / 1e18 = 9e18\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @param scale Scale unit\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit\\n */\\n function mulTruncateScale(\\n uint256 x,\\n uint256 y,\\n uint256 scale\\n ) internal pure returns (uint256) {\\n // e.g. assume scale = fullScale\\n // z = 10e18 * 9e17 = 9e36\\n uint256 z = x.mul(y);\\n // return 9e36 / 1e18 = 9e18\\n return z.div(scale);\\n }\\n\\n /**\\n * @dev Multiplies two precise units, and then truncates by the full scale, rounding up the result\\n * @param x Left hand input to multiplication\\n * @param y Right hand input to multiplication\\n * @return Result after multiplying the two inputs and then dividing by the shared\\n * scale unit, rounded up to the closest base unit.\\n */\\n function mulTruncateCeil(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e17 * 17268172638 = 138145381104e17\\n uint256 scaled = x.mul(y);\\n // e.g. 138145381104e17 + 9.99...e17 = 138145381113.99...e17\\n uint256 ceil = scaled.add(FULL_SCALE.sub(1));\\n // e.g. 13814538111.399...e18 / 1e18 = 13814538111\\n return ceil.div(FULL_SCALE);\\n }\\n\\n /**\\n * @dev Precisely divides two units, by first scaling the left hand operand. Useful\\n * for finding percentage weightings, i.e. 8e18/10e18 = 80% (or 8e17)\\n * @param x Left hand input to division\\n * @param y Right hand input to division\\n * @return Result after multiplying the left operand by the scale, and\\n * executing the division on the right hand input.\\n */\\n function divPrecisely(uint256 x, uint256 y)\\n internal\\n pure\\n returns (uint256)\\n {\\n // e.g. 8e18 * 1e18 = 8e36\\n uint256 z = x.mul(FULL_SCALE);\\n // e.g. 8e36 / 10e18 = 8e17\\n return z.div(y);\\n }\\n}\\n\",\"keccak256\":\"0x1eb49f6f79045d9e0a8e1dced8e01d9e559e5fac554dcbb53e43140b601b04e7\",\"license\":\"MIT\"},\"lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { IERC4626 } from \\\"../../../../interfaces/IERC4626.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n// From Open Zeppelin draft PR commit:\\n// fac43034dca85ff539db3fc8aa2a7084b843d454\\n// https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171\\n\\nabstract contract ERC4626 is ERC20, IERC4626 {\\n IERC20Metadata private immutable _asset;\\n\\n constructor(IERC20Metadata __asset) {\\n _asset = __asset;\\n }\\n\\n /** @dev See {IERC4262-asset} */\\n function asset() public view virtual override returns (address) {\\n return address(_asset);\\n }\\n\\n /** @dev See {IERC4262-totalAssets} */\\n function totalAssets() public view virtual override returns (uint256) {\\n return _asset.balanceOf(address(this));\\n }\\n\\n /**\\n * @dev See {IERC4262-convertToShares}\\n *\\n * Will revert if asserts > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset\\n * would represent an infinite amout of shares.\\n */\\n function convertToShares(uint256 assets) public view virtual override returns (uint256 shares) {\\n uint256 supply = totalSupply();\\n\\n return\\n (assets == 0 || supply == 0)\\n ? (assets * 10**decimals()) / 10**_asset.decimals()\\n : (assets * supply) / totalAssets();\\n }\\n\\n /** @dev See {IERC4262-convertToAssets} */\\n function convertToAssets(uint256 shares) public view virtual override returns (uint256 assets) {\\n uint256 supply = totalSupply();\\n\\n return (supply == 0) ? (shares * 10**_asset.decimals()) / 10**decimals() : (shares * totalAssets()) / supply;\\n }\\n\\n /** @dev See {IERC4262-maxDeposit} */\\n function maxDeposit(address) public view virtual override returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4262-maxMint} */\\n function maxMint(address) public view virtual override returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4262-maxWithdraw} */\\n function maxWithdraw(address owner) public view virtual override returns (uint256) {\\n return convertToAssets(balanceOf(owner));\\n }\\n\\n /** @dev See {IERC4262-maxRedeem} */\\n function maxRedeem(address owner) public view virtual override returns (uint256) {\\n return balanceOf(owner);\\n }\\n\\n /** @dev See {IERC4262-previewDeposit} */\\n function previewDeposit(uint256 assets) public view virtual override returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n /** @dev See {IERC4262-previewMint} */\\n function previewMint(uint256 shares) public view virtual override returns (uint256) {\\n uint256 assets = convertToAssets(shares);\\n return assets + (convertToShares(assets) < shares ? 1 : 0);\\n }\\n\\n /** @dev See {IERC4262-previewWithdraw} */\\n function previewWithdraw(uint256 assets) public view virtual override returns (uint256) {\\n uint256 shares = convertToShares(assets);\\n return shares + (convertToAssets(shares) < assets ? 1 : 0);\\n }\\n\\n /** @dev See {IERC4262-previewRedeem} */\\n function previewRedeem(uint256 shares) public view virtual override returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /** @dev See {IERC4262-deposit} */\\n function deposit(uint256 assets, address receiver) public virtual override returns (uint256) {\\n require(assets <= maxDeposit(receiver), \\\"ERC4626: deposit more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 shares = previewDeposit(assets);\\n\\n // if _asset is ERC777, transferFrom can call reenter BEFORE the transfer happens through\\n // the tokensToSend hook, so we need to transfer before we mint to keep the invariants.\\n SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4262-mint} */\\n function mint(uint256 shares, address receiver) public virtual override returns (uint256) {\\n require(shares <= maxMint(receiver), \\\"ERC4626: mint more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 assets = previewMint(shares);\\n\\n // if _asset is ERC777, transferFrom can call reenter BEFORE the transfer happens through\\n // the tokensToSend hook, so we need to transfer before we mint to keep the invariants.\\n SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n\\n return assets;\\n }\\n\\n /** @dev See {IERC4262-withdraw} */\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual override returns (uint256) {\\n require(assets <= maxWithdraw(owner), \\\"ERC4626: withdraw more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 shares = previewWithdraw(assets);\\n\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // if _asset is ERC777, transfer can call reenter AFTER the transfer happens through\\n // the tokensReceived hook, so we need to transfer after we burn to keep the invariants.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer(_asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4262-redeem} */\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual override returns (uint256) {\\n require(shares <= maxRedeem(owner), \\\"ERC4626: redeem more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 assets = previewRedeem(shares);\\n\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // if _asset is ERC777, transfer can call reenter AFTER the transfer happens through\\n // the tokensReceived hook, so we need to transfer after we burn to keep the invariants.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer(_asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n\\n return assets;\\n }\\n\\n // Included here, since this method was not yet present in\\n // the version of Open Zeppelin ERC20 code we use.\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n}\",\"keccak256\":\"0xe68fcf324a08589930f6f34fcb00ce219f79a9e7cf968b8cbed97f8f5abbdffd\",\"license\":\"MIT\"},\"lib/openzeppelin/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) external returns (uint256 assets);\\n}\",\"keccak256\":\"0xd1abd028496aacc3eef98e585a744e1a449dcf9b2e818c59d15d5c0091c3f293\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x60a06040523480156200001157600080fd5b50604051620021b3380380620021b383398101604081905262000034916200023e565b82828281600390805190602001906200004f929190620000e1565b50805162000065906004906020840190620000e1565b50505060601b6001600160601b03191660805262000090336000805160206200219383398151915255565b60008051602062002193833981519152546040516001600160a01b03909116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a35050506200031b565b828054620000ef90620002c8565b90600052602060002090601f0160209004810192826200011357600085556200015e565b82601f106200012e57805160ff19168380011785556200015e565b828001600101855582156200015e579182015b828111156200015e57825182559160200191906001019062000141565b506200016c92915062000170565b5090565b5b808211156200016c576000815560010162000171565b600082601f8301126200019957600080fd5b81516001600160401b0380821115620001b657620001b662000305565b604051601f8301601f19908116603f01168101908282118183101715620001e157620001e162000305565b81604052838152602092508683858801011115620001fe57600080fd5b600091505b8382101562000222578582018301518183018401529082019062000203565b83821115620002345760008385830101525b9695505050505050565b6000806000606084860312156200025457600080fd5b83516001600160a01b03811681146200026c57600080fd5b60208501519093506001600160401b03808211156200028a57600080fd5b620002988783880162000187565b93506040860151915080821115620002af57600080fd5b50620002be8682870162000187565b9150509250925092565b600181811c90821680620002dd57607f821691505b60208210811415620002ff57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160601c611e1a62000379600039600081816102f6015281816104ec015281816105b7015281816106fe0152818161094001528181610a9301528181610b2e01528181610d0601528181610e300152610edf0152611e1a6000f3fe608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063ba087652116100ad578063ce96cb771161007c578063ce96cb771461044f578063d38bfff414610462578063d905777e14610475578063dd62ed3e14610488578063ef8b30f7146104c157600080fd5b8063ba08765214610421578063c63d75b61461032d578063c6e6f59214610434578063c7af33521461044757600080fd5b8063a457c2d7116100e9578063a457c2d7146103d5578063a9059cbb146103e8578063b3d7f6b9146103fb578063b460af941461040e57600080fd5b806370a08231146103705780638129fc1c1461039957806394bf804d146103a157806395d89b41146103b457600080fd5b806323b872dd11610192578063402d267d11610161578063402d267d1461032d5780634cdad506146103425780635d36b190146103555780636e553f651461035d57600080fd5b806323b872dd146102d2578063313ce567146102e557806338d52e0f146102f4578063395093511461031a57600080fd5b80630a28a477116101ce5780630a28a477146102825780630c340a24146102955780631072cbea146102b557806318160ddd146102ca57600080fd5b806301e1d1141461020057806306fdde031461021b57806307a2d13a1461024c578063095ea7b31461025f575b600080fd5b6102086104d4565b6040519081526020015b60405180910390f35b60408051808201909152600c81526b0aee4c2e0e0cac8409e8aa8960a31b60208201525b6040516102129190611bba565b61020861025a366004611aea565b610573565b61027261026d366004611a9e565b61066c565b6040519015158152602001610212565b610208610290366004611aea565b610683565b61029d6106b7565b6040516001600160a01b039091168152602001610212565b6102c86102c3366004611a9e565b6106cf565b005b600254610208565b6102726102e0366004611a62565b610794565b60405160128152602001610212565b7f000000000000000000000000000000000000000000000000000000000000000061029d565b610272610328366004611a9e565b61083e565b61020861033b366004611a14565b5060001990565b610208610350366004611aea565b61087a565b6102c8610885565b61020861036b366004611b1c565b61092b565b61020861037e366004611a14565b6001600160a01b031660009081526020819052604090205490565b6102c86109cf565b6102086103af366004611b1c565b610b19565b6040805180820190915260058152640ae9e8aa8960db1b602082015261023f565b6102726103e3366004611a9e565b610bad565b6102726103f6366004611a9e565b610c46565b610208610409366004611aea565b610c53565b61020861041c366004611b3f565b610c6b565b61020861042f366004611b3f565b610d95565b610208610442366004611aea565b610eae565b610272610f80565b61020861045d366004611a14565b610fb1565b6102c8610470366004611a14565b610fd3565b610208610483366004611a14565b611077565b610208610496366004611a2f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102086104cf366004611aea565b611095565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561053657600080fd5b505afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611b03565b905090565b60008061057f60025490565b905080156105a957806105906104d4565b61059a9085611d4c565b6105a49190611c3c565b610665565b6105b56012600a611ca1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611b7b565b61065190600a611ca1565b61065b9085611d4c565b6106659190611c3c565b9392505050565b60006106793384846110a0565b5060015b92915050565b60008061068f83610eae565b90508261069b82610573565b106106a75760006106aa565b60015b6106659060ff1682611c24565b600061056e600080516020611dc58339815191525490565b6106d7610f80565b6106fc5760405162461bcd60e51b81526004016106f390611bed565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156107745760405162461bcd60e51b8152602060048201526013602482015272086c2dcdcdee840c6ded8d8cac6e8409e8aa89606b1b60448201526064016106f3565b61079061077f6106b7565b6001600160a01b03841690836111c4565b5050565b60006107a184848461122c565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108265760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016106f3565b61083385338584036110a0565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610679918590610875908690611c24565b6110a0565b600061067d82610573565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146109205760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016106f3565b610929336113fc565b565b600033600061093985611095565b90506109677f00000000000000000000000000000000000000000000000000000000000000008330886114bd565b61097184826114f5565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d787846040516109bf929190918252602082015260400190565b60405180910390a3949350505050565b6109d7610f80565b6109f35760405162461bcd60e51b81526004016106f390611bed565b600554610100900460ff1680610a0c575060055460ff16155b610a6f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f3565b600554610100900460ff16158015610a91576005805461ffff19166101011790555b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b505050508015610b16576005805461ff00191690555b50565b6000336000610b2785610c53565b9050610b557f00000000000000000000000000000000000000000000000000000000000000008330846114bd565b610b5f84866114f5565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d783886040516109bf929190918252602082015260400190565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c2f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106f3565b610c3c33858584036110a0565b5060019392505050565b600061067933848461122c565b600080610c5f83610573565b90508261069b82610eae565b6000610c7682610fb1565b841115610cc55760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468656e206d61780060448201526064016106f3565b336000610cd186610683565b9050836001600160a01b0316826001600160a01b031614610cf757610cf78483836115d4565b610d018482611660565b610d2c7f000000000000000000000000000000000000000000000000000000000000000086886111c4565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8985604051610d84929190918252602082015260400190565b60405180910390a495945050505050565b6000610da082611077565b841115610def5760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468656e206d617800000060448201526064016106f3565b336000610dfb8661087a565b9050836001600160a01b0316826001600160a01b031614610e2157610e218483886115d4565b610e2b8487611660565b610e567f000000000000000000000000000000000000000000000000000000000000000086836111c4565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db848a604051610d84929190918252602082015260400190565b600080610eba60025490565b9050821580610ec7575080155b610edd57610ed36104d4565b61059a8285611d4c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3657600080fd5b505afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611b7b565b610f7990600a611ca1565b6012610646565b6000610f98600080516020611dc58339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6001600160a01b03811660009081526020819052604081205461067d90610573565b610fdb610f80565b610ff75760405162461bcd60e51b81526004016106f390611bed565b61101f817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b031661103f600080516020611dc58339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b03811660009081526020819052604081205461067d565b600061067d82610eae565b6001600160a01b0383166111025760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106f3565b6001600160a01b0382166111635760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106f3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b03831660248201526044810182905261122790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117ae565b505050565b6001600160a01b0383166112905760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106f3565b6001600160a01b0382166112f25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106f3565b6001600160a01b0383166000908152602081905260409020548181101561136a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106f3565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906113a1908490611c24565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113ed91815260200190565b60405180910390a35b50505050565b6001600160a01b0381166114525760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016106f3565b806001600160a01b0316611472600080516020611dc58339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3610b1681600080516020611dc583398151915255565b6040516001600160a01b03808516602483015283166044820152606481018290526113f69085906323b872dd60e01b906084016111f0565b6001600160a01b03821661154b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106f3565b806002600082825461155d9190611c24565b90915550506001600160a01b0382166000908152602081905260408120805483929061158a908490611c24565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146113f657818110156116535760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106f3565b6113f684848484036110a0565b6001600160a01b0382166116c05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106f3565b6001600160a01b038216600090815260208190526040902054818110156117345760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106f3565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611763908490611d6b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611803826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118809092919063ffffffff16565b80519091501561122757808060200190518101906118219190611ac8565b6112275760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106f3565b606061188f8484600085611897565b949350505050565b6060824710156118f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106f3565b843b6119465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106f3565b600080866001600160a01b031685876040516119629190611b9e565b60006040518083038185875af1925050503d806000811461199f576040519150601f19603f3d011682016040523d82523d6000602084013e6119a4565b606091505b50915091506119b48282866119bf565b979650505050505050565b606083156119ce575081610665565b8251156119de5782518084602001fd5b8160405162461bcd60e51b81526004016106f39190611bba565b80356001600160a01b0381168114611a0f57600080fd5b919050565b600060208284031215611a2657600080fd5b610665826119f8565b60008060408385031215611a4257600080fd5b611a4b836119f8565b9150611a59602084016119f8565b90509250929050565b600080600060608486031215611a7757600080fd5b611a80846119f8565b9250611a8e602085016119f8565b9150604084013590509250925092565b60008060408385031215611ab157600080fd5b611aba836119f8565b946020939093013593505050565b600060208284031215611ada57600080fd5b8151801515811461066557600080fd5b600060208284031215611afc57600080fd5b5035919050565b600060208284031215611b1557600080fd5b5051919050565b60008060408385031215611b2f57600080fd5b82359150611a59602084016119f8565b600080600060608486031215611b5457600080fd5b83359250611b64602085016119f8565b9150611b72604085016119f8565b90509250925092565b600060208284031215611b8d57600080fd5b815160ff8116811461066557600080fd5b60008251611bb0818460208701611d82565b9190910192915050565b6020815260008251806020840152611bd9816040850160208701611d82565b601f01601f19169190910160400192915050565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60008219821115611c3757611c37611dae565b500190565b600082611c5957634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115611c99578160001904821115611c7f57611c7f611dae565b80851615611c8c57918102915b93841c9390800290611c63565b509250929050565b600061066560ff841683600082611cba5750600161067d565b81611cc75750600061067d565b8160018114611cdd5760028114611ce757611d03565b600191505061067d565b60ff841115611cf857611cf8611dae565b50506001821b61067d565b5060208310610133831016604e8410600b8410161715611d26575081810a61067d565b611d308383611c5e565b8060001904821115611d4457611d44611dae565b029392505050565b6000816000190483118215151615611d6657611d66611dae565b500290565b600082821015611d7d57611d7d611dae565b500390565b60005b83811015611d9d578181015183820152602001611d85565b838111156113f65750506000910152565b634e487b7160e01b600052601160045260246000fdfe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa26469706673582212200d65143c35138a060be887a8650b9f561f446de7a0131d89aa4677bfefe1e8a164736f6c634300080700337bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a", - "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106101fb5760003560e01c806370a082311161011a578063ba087652116100ad578063ce96cb771161007c578063ce96cb771461044f578063d38bfff414610462578063d905777e14610475578063dd62ed3e14610488578063ef8b30f7146104c157600080fd5b8063ba08765214610421578063c63d75b61461032d578063c6e6f59214610434578063c7af33521461044757600080fd5b8063a457c2d7116100e9578063a457c2d7146103d5578063a9059cbb146103e8578063b3d7f6b9146103fb578063b460af941461040e57600080fd5b806370a08231146103705780638129fc1c1461039957806394bf804d146103a157806395d89b41146103b457600080fd5b806323b872dd11610192578063402d267d11610161578063402d267d1461032d5780634cdad506146103425780635d36b190146103555780636e553f651461035d57600080fd5b806323b872dd146102d2578063313ce567146102e557806338d52e0f146102f4578063395093511461031a57600080fd5b80630a28a477116101ce5780630a28a477146102825780630c340a24146102955780631072cbea146102b557806318160ddd146102ca57600080fd5b806301e1d1141461020057806306fdde031461021b57806307a2d13a1461024c578063095ea7b31461025f575b600080fd5b6102086104d4565b6040519081526020015b60405180910390f35b60408051808201909152600c81526b0aee4c2e0e0cac8409e8aa8960a31b60208201525b6040516102129190611bba565b61020861025a366004611aea565b610573565b61027261026d366004611a9e565b61066c565b6040519015158152602001610212565b610208610290366004611aea565b610683565b61029d6106b7565b6040516001600160a01b039091168152602001610212565b6102c86102c3366004611a9e565b6106cf565b005b600254610208565b6102726102e0366004611a62565b610794565b60405160128152602001610212565b7f000000000000000000000000000000000000000000000000000000000000000061029d565b610272610328366004611a9e565b61083e565b61020861033b366004611a14565b5060001990565b610208610350366004611aea565b61087a565b6102c8610885565b61020861036b366004611b1c565b61092b565b61020861037e366004611a14565b6001600160a01b031660009081526020819052604090205490565b6102c86109cf565b6102086103af366004611b1c565b610b19565b6040805180820190915260058152640ae9e8aa8960db1b602082015261023f565b6102726103e3366004611a9e565b610bad565b6102726103f6366004611a9e565b610c46565b610208610409366004611aea565b610c53565b61020861041c366004611b3f565b610c6b565b61020861042f366004611b3f565b610d95565b610208610442366004611aea565b610eae565b610272610f80565b61020861045d366004611a14565b610fb1565b6102c8610470366004611a14565b610fd3565b610208610483366004611a14565b611077565b610208610496366004611a2f565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6102086104cf366004611aea565b611095565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a082319060240160206040518083038186803b15801561053657600080fd5b505afa15801561054a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061056e9190611b03565b905090565b60008061057f60025490565b905080156105a957806105906104d4565b61059a9085611d4c565b6105a49190611c3c565b610665565b6105b56012600a611ca1565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561060e57600080fd5b505afa158015610622573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106469190611b7b565b61065190600a611ca1565b61065b9085611d4c565b6106659190611c3c565b9392505050565b60006106793384846110a0565b5060015b92915050565b60008061068f83610eae565b90508261069b82610573565b106106a75760006106aa565b60015b6106659060ff1682611c24565b600061056e600080516020611dc58339815191525490565b6106d7610f80565b6106fc5760405162461bcd60e51b81526004016106f390611bed565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614156107745760405162461bcd60e51b8152602060048201526013602482015272086c2dcdcdee840c6ded8d8cac6e8409e8aa89606b1b60448201526064016106f3565b61079061077f6106b7565b6001600160a01b03841690836111c4565b5050565b60006107a184848461122c565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156108265760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016106f3565b61083385338584036110a0565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610679918590610875908690611c24565b6110a0565b600061067d82610573565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b0316146109205760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016106f3565b610929336113fc565b565b600033600061093985611095565b90506109677f00000000000000000000000000000000000000000000000000000000000000008330886114bd565b61097184826114f5565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d787846040516109bf929190918252602082015260400190565b60405180910390a3949350505050565b6109d7610f80565b6109f35760405162461bcd60e51b81526004016106f390611bed565b600554610100900460ff1680610a0c575060055460ff16155b610a6f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f3565b600554610100900460ff16158015610a91576005805461ffff19166101011790555b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610aec57600080fd5b505af1158015610b00573d6000803e3d6000fd5b505050508015610b16576005805461ff00191690555b50565b6000336000610b2785610c53565b9050610b557f00000000000000000000000000000000000000000000000000000000000000008330846114bd565b610b5f84866114f5565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d783886040516109bf929190918252602082015260400190565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c2f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106f3565b610c3c33858584036110a0565b5060019392505050565b600061067933848461122c565b600080610c5f83610573565b90508261069b82610eae565b6000610c7682610fb1565b841115610cc55760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468656e206d61780060448201526064016106f3565b336000610cd186610683565b9050836001600160a01b0316826001600160a01b031614610cf757610cf78483836115d4565b610d018482611660565b610d2c7f000000000000000000000000000000000000000000000000000000000000000086886111c4565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8985604051610d84929190918252602082015260400190565b60405180910390a495945050505050565b6000610da082611077565b841115610def5760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468656e206d617800000060448201526064016106f3565b336000610dfb8661087a565b9050836001600160a01b0316826001600160a01b031614610e2157610e218483886115d4565b610e2b8487611660565b610e567f000000000000000000000000000000000000000000000000000000000000000086836111c4565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db848a604051610d84929190918252602082015260400190565b600080610eba60025490565b9050821580610ec7575080155b610edd57610ed36104d4565b61059a8285611d4c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3657600080fd5b505afa158015610f4a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f6e9190611b7b565b610f7990600a611ca1565b6012610646565b6000610f98600080516020611dc58339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6001600160a01b03811660009081526020819052604081205461067d90610573565b610fdb610f80565b610ff75760405162461bcd60e51b81526004016106f390611bed565b61101f817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b031661103f600080516020611dc58339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b03811660009081526020819052604081205461067d565b600061067d82610eae565b6001600160a01b0383166111025760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106f3565b6001600160a01b0382166111635760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106f3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b03831660248201526044810182905261122790849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b0319909316929092179091526117ae565b505050565b6001600160a01b0383166112905760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106f3565b6001600160a01b0382166112f25760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106f3565b6001600160a01b0383166000908152602081905260409020548181101561136a5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016106f3565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906113a1908490611c24565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113ed91815260200190565b60405180910390a35b50505050565b6001600160a01b0381166114525760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016106f3565b806001600160a01b0316611472600080516020611dc58339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3610b1681600080516020611dc583398151915255565b6040516001600160a01b03808516602483015283166044820152606481018290526113f69085906323b872dd60e01b906084016111f0565b6001600160a01b03821661154b5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106f3565b806002600082825461155d9190611c24565b90915550506001600160a01b0382166000908152602081905260408120805483929061158a908490611c24565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146113f657818110156116535760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106f3565b6113f684848484036110a0565b6001600160a01b0382166116c05760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106f3565b6001600160a01b038216600090815260208190526040902054818110156117345760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106f3565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611763908490611d6b565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6000611803826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118809092919063ffffffff16565b80519091501561122757808060200190518101906118219190611ac8565b6112275760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016106f3565b606061188f8484600085611897565b949350505050565b6060824710156118f85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016106f3565b843b6119465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016106f3565b600080866001600160a01b031685876040516119629190611b9e565b60006040518083038185875af1925050503d806000811461199f576040519150601f19603f3d011682016040523d82523d6000602084013e6119a4565b606091505b50915091506119b48282866119bf565b979650505050505050565b606083156119ce575081610665565b8251156119de5782518084602001fd5b8160405162461bcd60e51b81526004016106f39190611bba565b80356001600160a01b0381168114611a0f57600080fd5b919050565b600060208284031215611a2657600080fd5b610665826119f8565b60008060408385031215611a4257600080fd5b611a4b836119f8565b9150611a59602084016119f8565b90509250929050565b600080600060608486031215611a7757600080fd5b611a80846119f8565b9250611a8e602085016119f8565b9150604084013590509250925092565b60008060408385031215611ab157600080fd5b611aba836119f8565b946020939093013593505050565b600060208284031215611ada57600080fd5b8151801515811461066557600080fd5b600060208284031215611afc57600080fd5b5035919050565b600060208284031215611b1557600080fd5b5051919050565b60008060408385031215611b2f57600080fd5b82359150611a59602084016119f8565b600080600060608486031215611b5457600080fd5b83359250611b64602085016119f8565b9150611b72604085016119f8565b90509250925092565b600060208284031215611b8d57600080fd5b815160ff8116811461066557600080fd5b60008251611bb0818460208701611d82565b9190910192915050565b6020815260008251806020840152611bd9816040850160208701611d82565b601f01601f19169190910160400192915050565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b60008219821115611c3757611c37611dae565b500190565b600082611c5957634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115611c99578160001904821115611c7f57611c7f611dae565b80851615611c8c57918102915b93841c9390800290611c63565b509250929050565b600061066560ff841683600082611cba5750600161067d565b81611cc75750600061067d565b8160018114611cdd5760028114611ce757611d03565b600191505061067d565b60ff841115611cf857611cf8611dae565b50506001821b61067d565b5060208310610133831016604e8410600b8410161715611d26575081810a61067d565b611d308383611c5e565b8060001904821115611d4457611d44611dae565b029392505050565b6000816000190483118215151615611d6657611d66611dae565b500290565b600082821015611d7d57611d7d611dae565b500390565b60005b83811015611d9d578181015183820152602001611d85565b838111156113f65750506000910152565b634e487b7160e01b600052601160045260246000fdfe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa26469706673582212200d65143c35138a060be887a8650b9f561f446de7a0131d89aa4677bfefe1e8a164736f6c63430008070033", + "numDeployments": 2, + "solcInputHash": "a4288a3d1cec73b5c3426e0ce97fd8f3", + "metadata": "{\"compiler\":{\"version\":\"0.8.28+commit.7893614a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"contract ERC20\",\"name\":\"underlying_\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"GovernorshipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousGovernor\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newGovernor\",\"type\":\"address\"}],\"name\":\"PendingGovernorshipTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"caller\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"adjuster\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"asset\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"convertToAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"convertToShares\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"deposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"governor\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"initialize2\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isGovernor\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"maxMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"maxWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"mint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewDeposit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewMint\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"}],\"name\":\"previewRedeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"}],\"name\":\"previewWithdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"shares\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"redeem\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalAssets\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newGovernor\",\"type\":\"address\"}],\"name\":\"transferGovernance\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset_\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount_\",\"type\":\"uint256\"}],\"name\":\"transferToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"assets\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"withdraw\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Origin Protocol Inc\",\"details\":\"An important capability of this contract is that it isn't susceptible to changes of the exchange rate of WOETH/OETH if/when someone sends the underlying asset (OETH) to the contract. If OETH weren't rebasing this could be achieved by solely tracking the ERC20 transfers of the OETH token on mint, deposit, redeem, withdraw. The issue is that OETH is rebasing and OETH balances will change when the token rebases. For that reason the contract logic checks the actual underlying OETH token balance only once (either on a fresh contract creation or upgrade) and considering the WOETH supply and rebasingCreditsPerToken calculates the _adjuster. Once the adjuster is calculated any donations to the contract are ignored. The totalSupply (instead of querying OETH balance) works off of adjuster the current WOETH supply and rebasingCreditsPerToken. This makes WOETH value accrual completely follow OETH's value accrual. WOETH is safe to use in lending markets as the VualtCore's _rebase contains safeguards preventing any sudden large rebases.\",\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. Requirements: - `spender` cannot be the zero address.\"},\"asset()\":{\"details\":\"See {IERC4262-asset} \"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"convertToAssets(uint256)\":{\"details\":\"See {IERC4262-convertToAssets} \"},\"convertToShares(uint256)\":{\"details\":\"See {IERC4262-convertToShares} Will revert if asserts > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset would represent an infinite amout of shares.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"deposit(uint256,address)\":{\"details\":\"See {IERC4262-deposit} \"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"maxDeposit(address)\":{\"details\":\"See {IERC4262-maxDeposit} \"},\"maxMint(address)\":{\"details\":\"See {IERC4262-maxMint} \"},\"maxRedeem(address)\":{\"details\":\"See {IERC4262-maxRedeem} \"},\"maxWithdraw(address)\":{\"details\":\"See {IERC4262-maxWithdraw} \"},\"mint(uint256,address)\":{\"details\":\"See {IERC4262-mint} \"},\"previewDeposit(uint256)\":{\"details\":\"See {IERC4262-previewDeposit} \"},\"previewMint(uint256)\":{\"details\":\"See {IERC4262-previewMint} \"},\"previewRedeem(uint256)\":{\"details\":\"See {IERC4262-previewRedeem} \"},\"previewWithdraw(uint256)\":{\"details\":\"See {IERC4262-previewWithdraw} \"},\"redeem(uint256,address,address)\":{\"details\":\"See {IERC4262-redeem} \"},\"totalAssets()\":{\"details\":\"See {IERC4262-totalAssets} \"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `recipient` cannot be the zero address. - the caller must have a balance of at least `amount`.\"},\"transferFrom(address,address,uint256)\":{\"details\":\"See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`.\"},\"transferGovernance(address)\":{\"params\":{\"_newGovernor\":\"Address of the new Governor\"}},\"transferToken(address,uint256)\":{\"params\":{\"amount_\":\"Amount of the asset to transfer\",\"asset_\":\"Address for the asset\"}},\"withdraw(uint256,address,address)\":{\"details\":\"See {IERC4262-withdraw} \"}},\"title\":\"Wrapped OETH Token Contract\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"claimGovernance()\":{\"notice\":\"Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor.\"},\"governor()\":{\"notice\":\"Returns the address of the current Governor.\"},\"initialize()\":{\"notice\":\"Enable OETH rebasing for this contract\"},\"initialize2()\":{\"notice\":\"secondary initializer that newly deployed contracts will execute as part of primary initialize function and the existing contracts will have it called as a governance operation.\"},\"isGovernor()\":{\"notice\":\"Returns true if the caller is the current Governor.\"},\"transferGovernance(address)\":{\"notice\":\"Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete\"},\"transferToken(address,uint256)\":{\"notice\":\"Transfer token to governor. Intended for recovering tokens stuck in contract, i.e. mistaken sends. Cannot transfer OETH\"}},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/token/WOETH.sol\":\"WOETH\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * The default value of {decimals} is 18. To select a different value for\\n * {decimals} you should overload it.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\\n * overridden;\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `recipient` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\\n _transfer(_msgSender(), recipient, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n _approve(_msgSender(), spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * Requirements:\\n *\\n * - `sender` and `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``sender``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) public virtual override returns (bool) {\\n _transfer(sender, recipient, amount);\\n\\n uint256 currentAllowance = _allowances[sender][_msgSender()];\\n require(currentAllowance >= amount, \\\"ERC20: transfer amount exceeds allowance\\\");\\n unchecked {\\n _approve(sender, _msgSender(), currentAllowance - amount);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n uint256 currentAllowance = _allowances[_msgSender()][spender];\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `sender` cannot be the zero address.\\n * - `recipient` cannot be the zero address.\\n * - `sender` must have a balance of at least `amount`.\\n */\\n function _transfer(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) internal virtual {\\n require(sender != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(recipient != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(sender, recipient, amount);\\n\\n uint256 senderBalance = _balances[sender];\\n require(senderBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[sender] = senderBalance - amount;\\n }\\n _balances[recipient] += amount;\\n\\n emit Transfer(sender, recipient, amount);\\n\\n _afterTokenTransfer(sender, recipient, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n _balances[account] += amount;\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n }\\n _totalSupply -= amount;\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(\\n address from,\\n address to,\\n uint256 amount\\n ) internal virtual {}\\n}\\n\",\"keccak256\":\"0xd1d8caaeb45f78e0b0715664d56c220c283c89bf8b8c02954af86404d6b367f8\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address recipient, uint256 amount) 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 `amount` as the allowance of `spender` over the 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 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\\n * allowance mechanism. `amount` 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(\\n address sender,\\n address recipient,\\n uint256 amount\\n ) external returns (bool);\\n\\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\",\"keccak256\":\"0x61437cb513a887a1bbad006e7b1c8b414478427d33de47c5600af3c748f108da\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\\n }\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n if (returndata.length > 0) {\\n // Return data is optional\\n require(abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n }\\n}\\n\",\"keccak256\":\"0xc3d946432c0ddbb1f846a0d3985be71299df331b91d06732152117f62f0be2b5\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize, which returns 0 for contracts in\\n // construction, since the code is only stored at the end of the\\n // constructor execution.\\n\\n uint256 size;\\n assembly {\\n size := extcodesize(account)\\n }\\n return size > 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionCall(target, data, \\\"Address: low-level call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.call{value: value}(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n require(isContract(target), \\\"Address: static call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(isContract(target), \\\"Address: delegate call to non-contract\\\");\\n\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return verifyCallResult(success, returndata, errorMessage);\\n }\\n\\n /**\\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length > 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n }\\n}\\n\",\"keccak256\":\"0x51b758a8815ecc9596c66c37d56b1d33883a444631a3f916b9fe65cb863ef7c4\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\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\",\"keccak256\":\"0xe2e337e6dde9ef6b680e07338c493ebea1b5fd09b43424112868e9cc1706bca7\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeCast.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Wrappers over Solidity's uintXX/intXX 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 *\\n * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing\\n * all math on `uint256` and `int256` and then downcasting.\\n */\\nlibrary SafeCast {\\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 require(value <= type(uint224).max, \\\"SafeCast: value doesn't fit in 224 bits\\\");\\n return uint224(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 require(value <= type(uint128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return uint128(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 require(value <= type(uint96).max, \\\"SafeCast: value doesn't fit in 96 bits\\\");\\n return uint96(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 require(value <= type(uint64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return uint64(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 require(value <= type(uint32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return uint32(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 require(value <= type(uint16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\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 require(value <= type(uint8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\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 require(value >= 0, \\\"SafeCast: value must be positive\\\");\\n return uint256(value);\\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 * _Available since v3.1._\\n */\\n function toInt128(int256 value) internal pure returns (int128) {\\n require(value >= type(int128).min && value <= type(int128).max, \\\"SafeCast: value doesn't fit in 128 bits\\\");\\n return int128(value);\\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 * _Available since v3.1._\\n */\\n function toInt64(int256 value) internal pure returns (int64) {\\n require(value >= type(int64).min && value <= type(int64).max, \\\"SafeCast: value doesn't fit in 64 bits\\\");\\n return int64(value);\\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 * _Available since v3.1._\\n */\\n function toInt32(int256 value) internal pure returns (int32) {\\n require(value >= type(int32).min && value <= type(int32).max, \\\"SafeCast: value doesn't fit in 32 bits\\\");\\n return int32(value);\\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 * _Available since v3.1._\\n */\\n function toInt16(int256 value) internal pure returns (int16) {\\n require(value >= type(int16).min && value <= type(int16).max, \\\"SafeCast: value doesn't fit in 16 bits\\\");\\n return int16(value);\\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 * _Available since v3.1._\\n */\\n function toInt8(int256 value) internal pure returns (int8) {\\n require(value >= type(int8).min && value <= type(int8).max, \\\"SafeCast: value doesn't fit in 8 bits\\\");\\n return int8(value);\\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 require(value <= uint256(type(int256).max), \\\"SafeCast: value doesn't fit in an int256\\\");\\n return int256(value);\\n }\\n}\\n\",\"keccak256\":\"0x5c6caab697d302ad7eb59c234a4d2dbc965c1bae87709bd2850060b7695b28c7\",\"license\":\"MIT\"},\"contracts/governance/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base for contracts that are managed by the Origin Protocol's Governor.\\n * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change\\n * from owner to governor and renounce methods removed. Does not use\\n * Context.sol like Ownable.sol does for simplification.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Governable {\\n // Storage position of the owner and pendingOwner of the contract\\n // keccak256(\\\"OUSD.governor\\\");\\n bytes32 private constant governorPosition =\\n 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a;\\n\\n // keccak256(\\\"OUSD.pending.governor\\\");\\n bytes32 private constant pendingGovernorPosition =\\n 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db;\\n\\n // keccak256(\\\"OUSD.reentry.status\\\");\\n bytes32 private constant reentryStatusPosition =\\n 0x53bf423e48ed90e97d02ab0ebab13b2a235a6bfbe9c321847d5c175333ac4535;\\n\\n // See OpenZeppelin ReentrancyGuard implementation\\n uint256 constant _NOT_ENTERED = 1;\\n uint256 constant _ENTERED = 2;\\n\\n event PendingGovernorshipTransfer(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n event GovernorshipTransferred(\\n address indexed previousGovernor,\\n address indexed newGovernor\\n );\\n\\n /**\\n * @notice Returns the address of the current Governor.\\n */\\n function governor() public view returns (address) {\\n return _governor();\\n }\\n\\n /**\\n * @dev Returns the address of the current Governor.\\n */\\n function _governor() internal view returns (address governorOut) {\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n governorOut := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Returns the address of the pending Governor.\\n */\\n function _pendingGovernor()\\n internal\\n view\\n returns (address pendingGovernor)\\n {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n pendingGovernor := sload(position)\\n }\\n }\\n\\n /**\\n * @dev Throws if called by any account other than the Governor.\\n */\\n modifier onlyGovernor() {\\n require(isGovernor(), \\\"Caller is not the Governor\\\");\\n _;\\n }\\n\\n /**\\n * @notice Returns true if the caller is the current Governor.\\n */\\n function isGovernor() public view returns (bool) {\\n return msg.sender == _governor();\\n }\\n\\n function _setGovernor(address newGovernor) internal {\\n emit GovernorshipTransferred(_governor(), newGovernor);\\n\\n bytes32 position = governorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and make it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n bytes32 position = reentryStatusPosition;\\n uint256 _reentry_status;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n _reentry_status := sload(position)\\n }\\n\\n // On the first call to nonReentrant, _notEntered will be true\\n require(_reentry_status != _ENTERED, \\\"Reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _ENTERED)\\n }\\n\\n _;\\n\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, _NOT_ENTERED)\\n }\\n }\\n\\n function _setPendingGovernor(address newGovernor) internal {\\n bytes32 position = pendingGovernorPosition;\\n // solhint-disable-next-line no-inline-assembly\\n assembly {\\n sstore(position, newGovernor)\\n }\\n }\\n\\n /**\\n * @notice Transfers Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the current Governor. Must be claimed for this to complete\\n * @param _newGovernor Address of the new Governor\\n */\\n function transferGovernance(address _newGovernor) external onlyGovernor {\\n _setPendingGovernor(_newGovernor);\\n emit PendingGovernorshipTransfer(_governor(), _newGovernor);\\n }\\n\\n /**\\n * @notice Claim Governance of the contract to a new account (`newGovernor`).\\n * Can only be called by the new Governor.\\n */\\n function claimGovernance() external {\\n require(\\n msg.sender == _pendingGovernor(),\\n \\\"Only the pending Governor can complete the claim\\\"\\n );\\n _changeGovernor(msg.sender);\\n }\\n\\n /**\\n * @dev Change Governance of the contract to a new account (`newGovernor`).\\n * @param _newGovernor Address of the new Governor\\n */\\n function _changeGovernor(address _newGovernor) internal {\\n require(_newGovernor != address(0), \\\"New Governor is address(0)\\\");\\n _setGovernor(_newGovernor);\\n }\\n}\\n\",\"keccak256\":\"0xf32f873c8bfbacf2e5f01d0cf37bc7f54fbd5aa656e95c8a599114229946f107\",\"license\":\"BUSL-1.1\"},\"contracts/token/OETH.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { OUSD } from \\\"./OUSD.sol\\\";\\n\\n/**\\n * @title OETH Token Contract\\n * @author Origin Protocol Inc\\n */\\ncontract OETH is OUSD {\\n function symbol() external pure override returns (string memory) {\\n return \\\"OETH\\\";\\n }\\n\\n function name() external pure override returns (string memory) {\\n return \\\"Origin Ether\\\";\\n }\\n\\n function decimals() external pure override returns (uint8) {\\n return 18;\\n }\\n}\\n\",\"keccak256\":\"0x7c8579044be870836558b1ff181f6419492936fcb2edad2161863b91090a9581\",\"license\":\"BUSL-1.1\"},\"contracts/token/OUSD.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title OUSD Token Contract\\n * @dev ERC20 compatible contract for OUSD\\n * @dev Implements an elastic supply\\n * @author Origin Protocol Inc\\n */\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { SafeCast } from \\\"@openzeppelin/contracts/utils/math/SafeCast.sol\\\";\\n\\ncontract OUSD is Governable {\\n using SafeCast for int256;\\n using SafeCast for uint256;\\n\\n /// @dev Event triggered when the supply changes\\n /// @param totalSupply Updated token total supply\\n /// @param rebasingCredits Updated token rebasing credits\\n /// @param rebasingCreditsPerToken Updated token rebasing credits per token\\n event TotalSupplyUpdatedHighres(\\n uint256 totalSupply,\\n uint256 rebasingCredits,\\n uint256 rebasingCreditsPerToken\\n );\\n /// @dev Event triggered when an account opts in for rebasing\\n /// @param account Address of the account\\n event AccountRebasingEnabled(address account);\\n /// @dev Event triggered when an account opts out of rebasing\\n /// @param account Address of the account\\n event AccountRebasingDisabled(address account);\\n /// @dev Emitted when `value` tokens are moved from one account `from` to\\n /// another `to`.\\n /// @param from Address of the account tokens are moved from\\n /// @param to Address of the account tokens are moved to\\n /// @param value Amount of tokens transferred\\n event Transfer(address indexed from, address indexed to, uint256 value);\\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 /// @param owner Address of the owner approving allowance\\n /// @param spender Address of the spender allowance is granted to\\n /// @param value Amount of tokens spender can transfer\\n event Approval(\\n address indexed owner,\\n address indexed spender,\\n uint256 value\\n );\\n /// @dev Yield resulting from {changeSupply} that a `source` account would\\n /// receive is directed to `target` account.\\n /// @param source Address of the source forwarding the yield\\n /// @param target Address of the target receiving the yield\\n event YieldDelegated(address source, address target);\\n /// @dev Yield delegation from `source` account to the `target` account is\\n /// suspended.\\n /// @param source Address of the source suspending yield forwarding\\n /// @param target Address of the target no longer receiving yield from `source`\\n /// account\\n event YieldUndelegated(address source, address target);\\n\\n enum RebaseOptions {\\n NotSet,\\n StdNonRebasing,\\n StdRebasing,\\n YieldDelegationSource,\\n YieldDelegationTarget\\n }\\n\\n uint256[154] private _gap; // Slots to align with deployed contract\\n uint256 private constant MAX_SUPPLY = type(uint128).max;\\n /// @dev The amount of tokens in existence\\n uint256 public totalSupply;\\n mapping(address => mapping(address => uint256)) private allowances;\\n /// @dev The vault with privileges to execute {mint}, {burn}\\n /// and {changeSupply}\\n address public vaultAddress;\\n mapping(address => uint256) internal creditBalances;\\n // the 2 storage variables below need trailing underscores to not name collide with public functions\\n uint256 private rebasingCredits_; // Sum of all rebasing credits (creditBalances for rebasing accounts)\\n uint256 private rebasingCreditsPerToken_;\\n /// @dev The amount of tokens that are not rebasing - receiving yield\\n uint256 public nonRebasingSupply;\\n mapping(address => uint256) internal alternativeCreditsPerToken;\\n /// @dev A map of all addresses and their respective RebaseOptions\\n mapping(address => RebaseOptions) public rebaseState;\\n mapping(address => uint256) private __deprecated_isUpgraded;\\n /// @dev A map of addresses that have yields forwarded to. This is an\\n /// inverse mapping of {yieldFrom}\\n /// Key Account forwarding yield\\n /// Value Account receiving yield\\n mapping(address => address) public yieldTo;\\n /// @dev A map of addresses that are receiving the yield. This is an\\n /// inverse mapping of {yieldTo}\\n /// Key Account receiving yield\\n /// Value Account forwarding yield\\n mapping(address => address) public yieldFrom;\\n\\n uint256 private constant RESOLUTION_INCREASE = 1e9;\\n uint256[34] private __gap; // including below gap totals up to 200\\n\\n /// @dev Initializes the contract and sets necessary variables.\\n /// @param _vaultAddress Address of the vault contract\\n /// @param _initialCreditsPerToken The starting rebasing credits per token.\\n function initialize(address _vaultAddress, uint256 _initialCreditsPerToken)\\n external\\n onlyGovernor\\n {\\n require(_vaultAddress != address(0), \\\"Zero vault address\\\");\\n require(vaultAddress == address(0), \\\"Already initialized\\\");\\n\\n rebasingCreditsPerToken_ = _initialCreditsPerToken;\\n vaultAddress = _vaultAddress;\\n }\\n\\n /// @dev Returns the symbol of the token, a shorter version\\n /// of the name.\\n function symbol() external pure virtual returns (string memory) {\\n return \\\"OUSD\\\";\\n }\\n\\n /// @dev Returns the name of the token.\\n function name() external pure virtual returns (string memory) {\\n return \\\"Origin Dollar\\\";\\n }\\n\\n /// @dev Returns the number of decimals used to get its user representation.\\n function decimals() external pure virtual returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev Verifies that the caller is the Vault contract\\n */\\n modifier onlyVault() {\\n require(vaultAddress == msg.sender, \\\"Caller is not the Vault\\\");\\n _;\\n }\\n\\n /**\\n * @return High resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerTokenHighres() external view returns (uint256) {\\n return rebasingCreditsPerToken_;\\n }\\n\\n /**\\n * @return Low resolution rebasingCreditsPerToken\\n */\\n function rebasingCreditsPerToken() external view returns (uint256) {\\n return rebasingCreditsPerToken_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @return High resolution total number of rebasing credits\\n */\\n function rebasingCreditsHighres() external view returns (uint256) {\\n return rebasingCredits_;\\n }\\n\\n /**\\n * @return Low resolution total number of rebasing credits\\n */\\n function rebasingCredits() external view returns (uint256) {\\n return rebasingCredits_ / RESOLUTION_INCREASE;\\n }\\n\\n /**\\n * @notice Gets the balance of the specified address.\\n * @param _account Address to query the balance of.\\n * @return A uint256 representing the amount of base units owned by the\\n * specified address.\\n */\\n function balanceOf(address _account) public view returns (uint256) {\\n RebaseOptions state = rebaseState[_account];\\n if (state == RebaseOptions.YieldDelegationSource) {\\n // Saves a slot read when transferring to or from a yield delegating source\\n // since we know creditBalances equals the balance.\\n return creditBalances[_account];\\n }\\n uint256 baseBalance = (creditBalances[_account] * 1e18) /\\n _creditsPerToken(_account);\\n if (state == RebaseOptions.YieldDelegationTarget) {\\n // creditBalances of yieldFrom accounts equals token balances\\n return baseBalance - creditBalances[yieldFrom[_account]];\\n }\\n return baseBalance;\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @dev Backwards compatible with old low res credits per token.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256) Credit balance and credits per token of the\\n * address\\n */\\n function creditsBalanceOf(address _account)\\n external\\n view\\n returns (uint256, uint256)\\n {\\n uint256 cpt = _creditsPerToken(_account);\\n if (cpt == 1e27) {\\n // For a period before the resolution upgrade, we created all new\\n // contract accounts at high resolution. Since they are not changing\\n // as a result of this upgrade, we will return their true values\\n return (creditBalances[_account], cpt);\\n } else {\\n return (\\n creditBalances[_account] / RESOLUTION_INCREASE,\\n cpt / RESOLUTION_INCREASE\\n );\\n }\\n }\\n\\n /**\\n * @notice Gets the credits balance of the specified address.\\n * @param _account The address to query the balance of.\\n * @return (uint256, uint256, bool) Credit balance, credits per token of the\\n * address, and isUpgraded\\n */\\n function creditsBalanceOfHighres(address _account)\\n external\\n view\\n returns (\\n uint256,\\n uint256,\\n bool\\n )\\n {\\n return (\\n creditBalances[_account],\\n _creditsPerToken(_account),\\n true // all accounts have their resolution \\\"upgraded\\\"\\n );\\n }\\n\\n // Backwards compatible view\\n function nonRebasingCreditsPerToken(address _account)\\n external\\n view\\n returns (uint256)\\n {\\n return alternativeCreditsPerToken[_account];\\n }\\n\\n /**\\n * @notice Transfer tokens to a specified address.\\n * @param _to the address to transfer to.\\n * @param _value the amount to be transferred.\\n * @return true on success.\\n */\\n function transfer(address _to, uint256 _value) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n\\n _executeTransfer(msg.sender, _to, _value);\\n\\n emit Transfer(msg.sender, _to, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Transfer tokens from one address to another.\\n * @param _from The address you want to send tokens from.\\n * @param _to The address you want to transfer to.\\n * @param _value The amount of tokens to be transferred.\\n * @return true on success.\\n */\\n function transferFrom(\\n address _from,\\n address _to,\\n uint256 _value\\n ) external returns (bool) {\\n require(_to != address(0), \\\"Transfer to zero address\\\");\\n uint256 userAllowance = allowances[_from][msg.sender];\\n require(_value <= userAllowance, \\\"Allowance exceeded\\\");\\n\\n unchecked {\\n allowances[_from][msg.sender] = userAllowance - _value;\\n }\\n\\n _executeTransfer(_from, _to, _value);\\n\\n emit Transfer(_from, _to, _value);\\n return true;\\n }\\n\\n function _executeTransfer(\\n address _from,\\n address _to,\\n uint256 _value\\n ) internal {\\n (\\n int256 fromRebasingCreditsDiff,\\n int256 fromNonRebasingSupplyDiff\\n ) = _adjustAccount(_from, -_value.toInt256());\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_to, _value.toInt256());\\n\\n _adjustGlobals(\\n fromRebasingCreditsDiff + toRebasingCreditsDiff,\\n fromNonRebasingSupplyDiff + toNonRebasingSupplyDiff\\n );\\n }\\n\\n function _adjustAccount(address _account, int256 _balanceChange)\\n internal\\n returns (int256 rebasingCreditsDiff, int256 nonRebasingSupplyDiff)\\n {\\n RebaseOptions state = rebaseState[_account];\\n int256 currentBalance = balanceOf(_account).toInt256();\\n if (currentBalance + _balanceChange < 0) {\\n revert(\\\"Transfer amount exceeds balance\\\");\\n }\\n uint256 newBalance = (currentBalance + _balanceChange).toUint256();\\n\\n if (state == RebaseOptions.YieldDelegationSource) {\\n address target = yieldTo[_account];\\n uint256 targetOldBalance = balanceOf(target);\\n uint256 targetNewCredits = _balanceToRebasingCredits(\\n targetOldBalance + newBalance\\n );\\n rebasingCreditsDiff =\\n targetNewCredits.toInt256() -\\n creditBalances[target].toInt256();\\n\\n creditBalances[_account] = newBalance;\\n creditBalances[target] = targetNewCredits;\\n } else if (state == RebaseOptions.YieldDelegationTarget) {\\n uint256 newCredits = _balanceToRebasingCredits(\\n newBalance + creditBalances[yieldFrom[_account]]\\n );\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n } else {\\n _autoMigrate(_account);\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem > 0) {\\n nonRebasingSupplyDiff = _balanceChange;\\n if (alternativeCreditsPerTokenMem != 1e18) {\\n alternativeCreditsPerToken[_account] = 1e18;\\n }\\n creditBalances[_account] = newBalance;\\n } else {\\n uint256 newCredits = _balanceToRebasingCredits(newBalance);\\n rebasingCreditsDiff =\\n newCredits.toInt256() -\\n creditBalances[_account].toInt256();\\n creditBalances[_account] = newCredits;\\n }\\n }\\n }\\n\\n function _adjustGlobals(\\n int256 _rebasingCreditsDiff,\\n int256 _nonRebasingSupplyDiff\\n ) internal {\\n if (_rebasingCreditsDiff != 0) {\\n rebasingCredits_ = (rebasingCredits_.toInt256() +\\n _rebasingCreditsDiff).toUint256();\\n }\\n if (_nonRebasingSupplyDiff != 0) {\\n nonRebasingSupply = (nonRebasingSupply.toInt256() +\\n _nonRebasingSupplyDiff).toUint256();\\n }\\n }\\n\\n /**\\n * @notice Function to check the amount of tokens that _owner has allowed\\n * to `_spender`.\\n * @param _owner The address which owns the funds.\\n * @param _spender The address which will spend the funds.\\n * @return The number of tokens still available for the _spender.\\n */\\n function allowance(address _owner, address _spender)\\n external\\n view\\n returns (uint256)\\n {\\n return allowances[_owner][_spender];\\n }\\n\\n /**\\n * @notice Approve the passed address to spend the specified amount of\\n * tokens on behalf of msg.sender.\\n * @param _spender The address which will spend the funds.\\n * @param _value The amount of tokens to be spent.\\n * @return true on success.\\n */\\n function approve(address _spender, uint256 _value) external returns (bool) {\\n allowances[msg.sender][_spender] = _value;\\n emit Approval(msg.sender, _spender, _value);\\n return true;\\n }\\n\\n /**\\n * @notice Creates `_amount` tokens and assigns them to `_account`,\\n * increasing the total supply.\\n */\\n function mint(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Mint to the zero address\\\");\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, _amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply + _amount;\\n\\n require(totalSupply < MAX_SUPPLY, \\\"Max supply\\\");\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n /**\\n * @notice Destroys `_amount` tokens from `_account`,\\n * reducing the total supply.\\n */\\n function burn(address _account, uint256 _amount) external onlyVault {\\n require(_account != address(0), \\\"Burn from the zero address\\\");\\n if (_amount == 0) {\\n return;\\n }\\n\\n // Account\\n (\\n int256 toRebasingCreditsDiff,\\n int256 toNonRebasingSupplyDiff\\n ) = _adjustAccount(_account, -_amount.toInt256());\\n // Globals\\n _adjustGlobals(toRebasingCreditsDiff, toNonRebasingSupplyDiff);\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n /**\\n * @dev Get the credits per token for an account. Returns a fixed amount\\n * if the account is non-rebasing.\\n * @param _account Address of the account.\\n */\\n function _creditsPerToken(address _account)\\n internal\\n view\\n returns (uint256)\\n {\\n uint256 alternativeCreditsPerTokenMem = alternativeCreditsPerToken[\\n _account\\n ];\\n if (alternativeCreditsPerTokenMem != 0) {\\n return alternativeCreditsPerTokenMem;\\n } else {\\n return rebasingCreditsPerToken_;\\n }\\n }\\n\\n /**\\n * @dev Auto migrate contracts to be non rebasing,\\n * unless they have opted into yield.\\n * @param _account Address of the account.\\n */\\n function _autoMigrate(address _account) internal {\\n bool isContract = _account.code.length > 0;\\n // In previous code versions, contracts would not have had their\\n // rebaseState[_account] set to RebaseOptions.NonRebasing when migrated\\n // therefore we check the actual accounting used on the account instead.\\n if (\\n isContract &&\\n rebaseState[_account] == RebaseOptions.NotSet &&\\n alternativeCreditsPerToken[_account] == 0\\n ) {\\n _rebaseOptOut(_account);\\n }\\n }\\n\\n /**\\n * @dev Calculates credits from contract's global rebasingCreditsPerToken_, and\\n * also balance that corresponds to those credits. The latter is important\\n * when adjusting the contract's global nonRebasingSupply to circumvent any\\n * possible rounding errors.\\n *\\n * @param _balance Balance of the account.\\n */\\n function _balanceToRebasingCredits(uint256 _balance)\\n internal\\n view\\n returns (uint256 rebasingCredits)\\n {\\n // Rounds up, because we need to ensure that accounts always have\\n // at least the balance that they should have.\\n // Note this should always be used on an absolute account value,\\n // not on a possibly negative diff, because then the rounding would be wrong.\\n return ((_balance) * rebasingCreditsPerToken_ + 1e18 - 1) / 1e18;\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n * @param _account Address of the account.\\n */\\n function governanceRebaseOptIn(address _account) external onlyGovernor {\\n require(_account != address(0), \\\"Zero address not allowed\\\");\\n _rebaseOptIn(_account);\\n }\\n\\n /**\\n * @notice The calling account will start receiving yield after a successful call.\\n */\\n function rebaseOptIn() external {\\n _rebaseOptIn(msg.sender);\\n }\\n\\n function _rebaseOptIn(address _account) internal {\\n uint256 balance = balanceOf(_account);\\n\\n // prettier-ignore\\n require(\\n alternativeCreditsPerToken[_account] > 0 ||\\n // Accounts may explicitly `rebaseOptIn` regardless of\\n // accounting if they have a 0 balance.\\n creditBalances[_account] == 0\\n ,\\n \\\"Account must be non-rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n // prettier-ignore\\n require(\\n state == RebaseOptions.StdNonRebasing ||\\n state == RebaseOptions.NotSet,\\n \\\"Only standard non-rebasing accounts can opt in\\\"\\n );\\n\\n uint256 newCredits = _balanceToRebasingCredits(balance);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdRebasing;\\n alternativeCreditsPerToken[_account] = 0;\\n creditBalances[_account] = newCredits;\\n // Globals\\n _adjustGlobals(newCredits.toInt256(), -balance.toInt256());\\n\\n emit AccountRebasingEnabled(_account);\\n }\\n\\n /**\\n * @notice The calling account will no longer receive yield\\n */\\n function rebaseOptOut() external {\\n _rebaseOptOut(msg.sender);\\n }\\n\\n function _rebaseOptOut(address _account) internal {\\n require(\\n alternativeCreditsPerToken[_account] == 0,\\n \\\"Account must be rebasing\\\"\\n );\\n RebaseOptions state = rebaseState[_account];\\n require(\\n state == RebaseOptions.StdRebasing || state == RebaseOptions.NotSet,\\n \\\"Only standard rebasing accounts can opt out\\\"\\n );\\n\\n uint256 oldCredits = creditBalances[_account];\\n uint256 balance = balanceOf(_account);\\n\\n // Account\\n rebaseState[_account] = RebaseOptions.StdNonRebasing;\\n alternativeCreditsPerToken[_account] = 1e18;\\n creditBalances[_account] = balance;\\n // Globals\\n _adjustGlobals(-oldCredits.toInt256(), balance.toInt256());\\n\\n emit AccountRebasingDisabled(_account);\\n }\\n\\n /**\\n * @notice Distribute yield to users. This changes the exchange rate\\n * between \\\"credits\\\" and OUSD tokens to change rebasing user's balances.\\n * @param _newTotalSupply New total supply of OUSD.\\n */\\n function changeSupply(uint256 _newTotalSupply) external onlyVault {\\n require(totalSupply > 0, \\\"Cannot increase 0 supply\\\");\\n\\n if (totalSupply == _newTotalSupply) {\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n return;\\n }\\n\\n totalSupply = _newTotalSupply > MAX_SUPPLY\\n ? MAX_SUPPLY\\n : _newTotalSupply;\\n\\n uint256 rebasingSupply = totalSupply - nonRebasingSupply;\\n // round up in the favour of the protocol\\n rebasingCreditsPerToken_ =\\n (rebasingCredits_ * 1e18 + rebasingSupply - 1) /\\n rebasingSupply;\\n\\n require(rebasingCreditsPerToken_ > 0, \\\"Invalid change in supply\\\");\\n\\n emit TotalSupplyUpdatedHighres(\\n totalSupply,\\n rebasingCredits_,\\n rebasingCreditsPerToken_\\n );\\n }\\n\\n /*\\n * @notice Send the yield from one account to another account.\\n * Each account keeps its own balances.\\n */\\n function delegateYield(address _from, address _to) external onlyGovernor {\\n require(_from != address(0), \\\"Zero from address not allowed\\\");\\n require(_to != address(0), \\\"Zero to address not allowed\\\");\\n\\n require(_from != _to, \\\"Cannot delegate to self\\\");\\n require(\\n yieldFrom[_to] == address(0) &&\\n yieldTo[_to] == address(0) &&\\n yieldFrom[_from] == address(0) &&\\n yieldTo[_from] == address(0),\\n \\\"Blocked by existing yield delegation\\\"\\n );\\n RebaseOptions stateFrom = rebaseState[_from];\\n RebaseOptions stateTo = rebaseState[_to];\\n\\n require(\\n stateFrom == RebaseOptions.NotSet ||\\n stateFrom == RebaseOptions.StdNonRebasing ||\\n stateFrom == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState from\\\"\\n );\\n\\n require(\\n stateTo == RebaseOptions.NotSet ||\\n stateTo == RebaseOptions.StdNonRebasing ||\\n stateTo == RebaseOptions.StdRebasing,\\n \\\"Invalid rebaseState to\\\"\\n );\\n\\n if (alternativeCreditsPerToken[_from] == 0) {\\n _rebaseOptOut(_from);\\n }\\n if (alternativeCreditsPerToken[_to] > 0) {\\n _rebaseOptIn(_to);\\n }\\n\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(_to);\\n uint256 oldToCredits = creditBalances[_to];\\n uint256 newToCredits = _balanceToRebasingCredits(\\n fromBalance + toBalance\\n );\\n\\n // Set up the bidirectional links\\n yieldTo[_from] = _to;\\n yieldFrom[_to] = _from;\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.YieldDelegationSource;\\n alternativeCreditsPerToken[_from] = 1e18;\\n creditBalances[_from] = fromBalance;\\n rebaseState[_to] = RebaseOptions.YieldDelegationTarget;\\n creditBalances[_to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, -(fromBalance).toInt256());\\n emit YieldDelegated(_from, _to);\\n }\\n\\n /*\\n * @notice Stop sending the yield from one account to another account.\\n */\\n function undelegateYield(address _from) external onlyGovernor {\\n // Require a delegation, which will also ensure a valid delegation\\n require(yieldTo[_from] != address(0), \\\"Zero address not allowed\\\");\\n\\n address to = yieldTo[_from];\\n uint256 fromBalance = balanceOf(_from);\\n uint256 toBalance = balanceOf(to);\\n uint256 oldToCredits = creditBalances[to];\\n uint256 newToCredits = _balanceToRebasingCredits(toBalance);\\n\\n // Remove the bidirectional links\\n yieldFrom[to] = address(0);\\n yieldTo[_from] = address(0);\\n\\n // Local\\n rebaseState[_from] = RebaseOptions.StdNonRebasing;\\n // alternativeCreditsPerToken[from] already 1e18 from `delegateYield()`\\n creditBalances[_from] = fromBalance;\\n rebaseState[to] = RebaseOptions.StdRebasing;\\n // alternativeCreditsPerToken[to] already 0 from `delegateYield()`\\n creditBalances[to] = newToCredits;\\n\\n // Global\\n int256 creditsChange = newToCredits.toInt256() -\\n oldToCredits.toInt256();\\n _adjustGlobals(creditsChange, fromBalance.toInt256());\\n emit YieldUndelegated(_from, to);\\n }\\n}\\n\",\"keccak256\":\"0x5741d16e48d6031ec92c1e189ea023c78a34956b6bc9642ea9dfc9a6dafe49ca\",\"license\":\"BUSL-1.1\"},\"contracts/token/WOETH.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\nimport { ERC4626 } from \\\"../../lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport { Governable } from \\\"../governance/Governable.sol\\\";\\nimport { Initializable } from \\\"../utils/Initializable.sol\\\";\\nimport { OETH } from \\\"./OETH.sol\\\";\\n\\n/**\\n * @title Wrapped OETH Token Contract\\n * @author Origin Protocol Inc\\n *\\n * @dev An important capability of this contract is that it isn't susceptible to changes of the\\n * exchange rate of WOETH/OETH if/when someone sends the underlying asset (OETH) to the contract.\\n * If OETH weren't rebasing this could be achieved by solely tracking the ERC20 transfers of the OETH\\n * token on mint, deposit, redeem, withdraw. The issue is that OETH is rebasing and OETH balances\\n * will change when the token rebases.\\n * For that reason the contract logic checks the actual underlying OETH token balance only once\\n * (either on a fresh contract creation or upgrade) and considering the WOETH supply and\\n * rebasingCreditsPerToken calculates the _adjuster. Once the adjuster is calculated any donations\\n * to the contract are ignored. The totalSupply (instead of querying OETH balance) works off of\\n * adjuster the current WOETH supply and rebasingCreditsPerToken. This makes WOETH value accrual\\n * completely follow OETH's value accrual.\\n * WOETH is safe to use in lending markets as the VualtCore's _rebase contains safeguards preventing\\n * any sudden large rebases.\\n */\\n\\ncontract WOETH is ERC4626, Governable, Initializable {\\n using SafeERC20 for IERC20;\\n /* This is a 1e27 adjustment constant that expresses the difference in exchange rate between\\n * OETH's rebase since inception (expressed with rebasingCreditsPerToken) and WOETH to OETH\\n * conversion.\\n *\\n * If WOETH and OETH are deployed at the same time, the value of adjuster is a neutral 1e27\\n */\\n uint256 public adjuster;\\n uint256[49] private __gap;\\n\\n // no need to set ERC20 name and symbol since they are overridden in WOETH & WOETHBase\\n constructor(ERC20 underlying_) ERC20(\\\"\\\", \\\"\\\") ERC4626(underlying_) {}\\n\\n /**\\n * @notice Enable OETH rebasing for this contract\\n */\\n function initialize() external onlyGovernor initializer {\\n OETH(address(asset())).rebaseOptIn();\\n\\n initialize2();\\n }\\n\\n /**\\n * @notice secondary initializer that newly deployed contracts will execute as part\\n * of primary initialize function and the existing contracts will have it called\\n * as a governance operation.\\n */\\n function initialize2() public onlyGovernor {\\n require(adjuster == 0, \\\"Initialize2 already called\\\");\\n\\n if (totalSupply() == 0) {\\n adjuster = 1e27;\\n } else {\\n adjuster =\\n (rebasingCreditsPerTokenHighres() *\\n ERC20(asset()).balanceOf(address(this))) /\\n totalSupply();\\n }\\n }\\n\\n function name()\\n public\\n view\\n virtual\\n override(ERC20, IERC20Metadata)\\n returns (string memory)\\n {\\n return \\\"Wrapped OETH\\\";\\n }\\n\\n function symbol()\\n public\\n view\\n virtual\\n override(ERC20, IERC20Metadata)\\n returns (string memory)\\n {\\n return \\\"wOETH\\\";\\n }\\n\\n /**\\n * @notice Transfer token to governor. Intended for recovering tokens stuck in\\n * contract, i.e. mistaken sends. Cannot transfer OETH\\n * @param asset_ Address for the asset\\n * @param amount_ Amount of the asset to transfer\\n */\\n function transferToken(address asset_, uint256 amount_)\\n external\\n onlyGovernor\\n {\\n require(asset_ != address(asset()), \\\"Cannot collect core asset\\\");\\n IERC20(asset_).safeTransfer(governor(), amount_);\\n }\\n\\n /// @inheritdoc ERC4626\\n function convertToShares(uint256 assets)\\n public\\n view\\n virtual\\n override\\n returns (uint256 shares)\\n {\\n return (assets * rebasingCreditsPerTokenHighres()) / adjuster;\\n }\\n\\n /// @inheritdoc ERC4626\\n function convertToAssets(uint256 shares)\\n public\\n view\\n virtual\\n override\\n returns (uint256 assets)\\n {\\n return (shares * adjuster) / rebasingCreditsPerTokenHighres();\\n }\\n\\n /// @inheritdoc ERC4626\\n function totalAssets() public view override returns (uint256) {\\n return (totalSupply() * adjuster) / rebasingCreditsPerTokenHighres();\\n }\\n\\n function rebasingCreditsPerTokenHighres() internal view returns (uint256) {\\n return OETH(asset()).rebasingCreditsPerTokenHighres();\\n }\\n}\\n\",\"keccak256\":\"0x3559e66e932965b8d4369ea165ea5d9564231c2e1e0ee9f0c9a2f1e2878cba4a\",\"license\":\"BUSL-1.1\"},\"contracts/utils/Initializable.sol\":{\"content\":\"// SPDX-License-Identifier: BUSL-1.1\\npragma solidity ^0.8.0;\\n\\n/**\\n * @title Base contract any contracts that need to initialize state after deployment.\\n * @author Origin Protocol Inc\\n */\\nabstract contract Initializable {\\n /**\\n * @dev Indicates that the contract has been initialized.\\n */\\n bool private initialized;\\n\\n /**\\n * @dev Indicates that the contract is in the process of being initialized.\\n */\\n bool private initializing;\\n\\n /**\\n * @dev Modifier to protect an initializer function from being invoked twice.\\n */\\n modifier initializer() {\\n require(\\n initializing || !initialized,\\n \\\"Initializable: contract is already initialized\\\"\\n );\\n\\n bool isTopLevelCall = !initializing;\\n if (isTopLevelCall) {\\n initializing = true;\\n initialized = true;\\n }\\n\\n _;\\n\\n if (isTopLevelCall) {\\n initializing = false;\\n }\\n }\\n\\n uint256[50] private ______gap;\\n}\\n\",\"keccak256\":\"0x50d39ebf38a3d3111f2b77a6c75ece1d4ae731552fec4697ab16fcf6c0d4d5e8\",\"license\":\"BUSL-1.1\"},\"lib/openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { IERC4626 } from \\\"../../../../interfaces/IERC4626.sol\\\";\\nimport { ERC20 } from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport { SafeERC20 } from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n// From Open Zeppelin draft PR commit:\\n// fac43034dca85ff539db3fc8aa2a7084b843d454\\n// https://github.com/OpenZeppelin/openzeppelin-contracts/pull/3171\\n\\nabstract contract ERC4626 is ERC20, IERC4626 {\\n IERC20Metadata private immutable _asset;\\n\\n constructor(IERC20Metadata __asset) {\\n _asset = __asset;\\n }\\n\\n /** @dev See {IERC4262-asset} */\\n function asset() public view virtual override returns (address) {\\n return address(_asset);\\n }\\n\\n /** @dev See {IERC4262-totalAssets} */\\n function totalAssets() public view virtual override returns (uint256) {\\n return _asset.balanceOf(address(this));\\n }\\n\\n /**\\n * @dev See {IERC4262-convertToShares}\\n *\\n * Will revert if asserts > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset\\n * would represent an infinite amout of shares.\\n */\\n function convertToShares(uint256 assets) public view virtual override returns (uint256 shares) {\\n uint256 supply = totalSupply();\\n\\n return\\n (assets == 0 || supply == 0)\\n ? (assets * 10**decimals()) / 10**_asset.decimals()\\n : (assets * supply) / totalAssets();\\n }\\n\\n /** @dev See {IERC4262-convertToAssets} */\\n function convertToAssets(uint256 shares) public view virtual override returns (uint256 assets) {\\n uint256 supply = totalSupply();\\n\\n return (supply == 0) ? (shares * 10**_asset.decimals()) / 10**decimals() : (shares * totalAssets()) / supply;\\n }\\n\\n /** @dev See {IERC4262-maxDeposit} */\\n function maxDeposit(address) public view virtual override returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4262-maxMint} */\\n function maxMint(address) public view virtual override returns (uint256) {\\n return type(uint256).max;\\n }\\n\\n /** @dev See {IERC4262-maxWithdraw} */\\n function maxWithdraw(address owner) public view virtual override returns (uint256) {\\n return convertToAssets(balanceOf(owner));\\n }\\n\\n /** @dev See {IERC4262-maxRedeem} */\\n function maxRedeem(address owner) public view virtual override returns (uint256) {\\n return balanceOf(owner);\\n }\\n\\n /** @dev See {IERC4262-previewDeposit} */\\n function previewDeposit(uint256 assets) public view virtual override returns (uint256) {\\n return convertToShares(assets);\\n }\\n\\n /** @dev See {IERC4262-previewMint} */\\n function previewMint(uint256 shares) public view virtual override returns (uint256) {\\n uint256 assets = convertToAssets(shares);\\n return assets + (convertToShares(assets) < shares ? 1 : 0);\\n }\\n\\n /** @dev See {IERC4262-previewWithdraw} */\\n function previewWithdraw(uint256 assets) public view virtual override returns (uint256) {\\n uint256 shares = convertToShares(assets);\\n return shares + (convertToAssets(shares) < assets ? 1 : 0);\\n }\\n\\n /** @dev See {IERC4262-previewRedeem} */\\n function previewRedeem(uint256 shares) public view virtual override returns (uint256) {\\n return convertToAssets(shares);\\n }\\n\\n /** @dev See {IERC4262-deposit} */\\n function deposit(uint256 assets, address receiver) public virtual override returns (uint256) {\\n require(assets <= maxDeposit(receiver), \\\"ERC4626: deposit more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 shares = previewDeposit(assets);\\n\\n // if _asset is ERC777, transferFrom can call reenter BEFORE the transfer happens through\\n // the tokensToSend hook, so we need to transfer before we mint to keep the invariants.\\n SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4262-mint} */\\n function mint(uint256 shares, address receiver) public virtual override returns (uint256) {\\n require(shares <= maxMint(receiver), \\\"ERC4626: mint more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 assets = previewMint(shares);\\n\\n // if _asset is ERC777, transferFrom can call reenter BEFORE the transfer happens through\\n // the tokensToSend hook, so we need to transfer before we mint to keep the invariants.\\n SafeERC20.safeTransferFrom(_asset, caller, address(this), assets);\\n _mint(receiver, shares);\\n\\n emit Deposit(caller, receiver, assets, shares);\\n\\n return assets;\\n }\\n\\n /** @dev See {IERC4262-withdraw} */\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) public virtual override returns (uint256) {\\n require(assets <= maxWithdraw(owner), \\\"ERC4626: withdraw more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 shares = previewWithdraw(assets);\\n\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // if _asset is ERC777, transfer can call reenter AFTER the transfer happens through\\n // the tokensReceived hook, so we need to transfer after we burn to keep the invariants.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer(_asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n\\n return shares;\\n }\\n\\n /** @dev See {IERC4262-redeem} */\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) public virtual override returns (uint256) {\\n require(shares <= maxRedeem(owner), \\\"ERC4626: redeem more then max\\\");\\n\\n address caller = _msgSender();\\n uint256 assets = previewRedeem(shares);\\n\\n if (caller != owner) {\\n _spendAllowance(owner, caller, shares);\\n }\\n\\n // if _asset is ERC777, transfer can call reenter AFTER the transfer happens through\\n // the tokensReceived hook, so we need to transfer after we burn to keep the invariants.\\n _burn(owner, shares);\\n SafeERC20.safeTransfer(_asset, receiver, assets);\\n\\n emit Withdraw(caller, receiver, owner, assets, shares);\\n\\n return assets;\\n }\\n\\n // Included here, since this method was not yet present in\\n // the version of Open Zeppelin ERC20 code we use.\\n function _spendAllowance(\\n address owner,\\n address spender,\\n uint256 amount\\n ) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n}\",\"keccak256\":\"0xe68fcf324a08589930f6f34fcb00ce219f79a9e7cf968b8cbed97f8f5abbdffd\",\"license\":\"MIT\"},\"lib/openzeppelin/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8.0;\\n\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\nimport { IERC20 } from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\n\\ninterface IERC4626 is IERC20, IERC20Metadata {\\n event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares);\\n\\n event Withdraw(\\n address indexed caller,\\n address indexed receiver,\\n address indexed owner,\\n uint256 assets,\\n uint256 shares\\n );\\n\\n /**\\n * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.\\n *\\n * - MUST be an ERC-20 token contract.\\n * - MUST NOT revert.\\n */\\n function asset() external view returns (address assetTokenAddress);\\n\\n /**\\n * @dev Returns the total amount of the underlying asset that is \\u201cmanaged\\u201d by Vault.\\n *\\n * - SHOULD include any compounding that occurs from yield.\\n * - MUST be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT revert.\\n */\\n function totalAssets() external view returns (uint256 totalManagedAssets);\\n\\n /**\\n * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToShares(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal\\n * scenario where all the conditions are met.\\n *\\n * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.\\n * - MUST NOT show any variations depending on the caller.\\n * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.\\n * - MUST NOT revert.\\n *\\n * NOTE: This calculation MAY NOT reflect the \\u201cper-user\\u201d price-per-share, and instead should reflect the\\n * \\u201caverage-user\\u2019s\\u201d price-per-share, meaning what the average user should expect to see when exchanging to and\\n * from.\\n */\\n function convertToAssets(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,\\n * through a deposit call.\\n *\\n * - MUST return a limited value if receiver is subject to some deposit limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.\\n * - MUST NOT revert.\\n */\\n function maxDeposit(address receiver) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit\\n * call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called\\n * in the same transaction.\\n * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the\\n * deposit would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewDeposit(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * deposit execution, and are accounted for during deposit.\\n * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function deposit(uint256 assets, address receiver) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.\\n * - MUST return a limited value if receiver is subject to some mint limit.\\n * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.\\n * - MUST NOT revert.\\n */\\n function maxMint(address receiver) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given\\n * current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call\\n * in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the\\n * same transaction.\\n * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint\\n * would be accepted, regardless if the user has enough tokens approved, etc.\\n * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by minting.\\n */\\n function previewMint(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.\\n *\\n * - MUST emit the Deposit event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint\\n * execution, and are accounted for during mint.\\n * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not\\n * approving enough underlying tokens to the Vault contract, etc).\\n *\\n * NOTE: most implementations will require pre-approval of the Vault with the Vault\\u2019s underlying asset token.\\n */\\n function mint(uint256 shares, address receiver) external returns (uint256 assets);\\n\\n /**\\n * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the\\n * Vault, through a withdraw call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxWithdraw(address owner) external view returns (uint256 maxAssets);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw\\n * call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if\\n * called\\n * in the same transaction.\\n * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though\\n * the withdrawal would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by depositing.\\n */\\n function previewWithdraw(uint256 assets) external view returns (uint256 shares);\\n\\n /**\\n * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * withdraw execution, and are accounted for during withdraw.\\n * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function withdraw(\\n uint256 assets,\\n address receiver,\\n address owner\\n ) external returns (uint256 shares);\\n\\n /**\\n * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,\\n * through a redeem call.\\n *\\n * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.\\n * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.\\n * - MUST NOT revert.\\n */\\n function maxRedeem(address owner) external view returns (uint256 maxShares);\\n\\n /**\\n * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,\\n * given current on-chain conditions.\\n *\\n * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call\\n * in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the\\n * same transaction.\\n * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the\\n * redemption would be accepted, regardless if the user has enough shares, etc.\\n * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.\\n * - MUST NOT revert.\\n *\\n * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in\\n * share price or some other type of condition, meaning the depositor will lose assets by redeeming.\\n */\\n function previewRedeem(uint256 shares) external view returns (uint256 assets);\\n\\n /**\\n * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.\\n *\\n * - MUST emit the Withdraw event.\\n * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the\\n * redeem execution, and are accounted for during redeem.\\n * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner\\n * not having enough shares, etc).\\n *\\n * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.\\n * Those methods should be performed separately.\\n */\\n function redeem(\\n uint256 shares,\\n address receiver,\\n address owner\\n ) external returns (uint256 assets);\\n}\",\"keccak256\":\"0xd1abd028496aacc3eef98e585a744e1a449dcf9b2e818c59d15d5c0091c3f293\",\"license\":\"MIT\"}},\"version\":1}", + "bytecode": "0x60a060405234801561001057600080fd5b50604051611f4d380380611f4d83398101604081905261002f9161007a565b604080516020808201835260008083528351918201909352918252829160036100588382610149565b5060046100658282610149565b5050506001600160a01b031660805250610207565b60006020828403121561008c57600080fd5b81516001600160a01b03811681146100a357600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806100d457607f821691505b6020821081036100f457634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561014457806000526020600020601f840160051c810160208510156101215750805b601f840160051c820191505b81811015610141576000815560010161012d565b50505b505050565b81516001600160401b03811115610162576101626100aa565b6101768161017084546100c0565b846100fa565b6020601f8211600181146101aa57600083156101925750848201515b600019600385901b1c1916600184901b178455610141565b600084815260208120601f198516915b828110156101da57878501518255602094850194600190920191016101ba565b50848210156101f85786840151600019600387901b60f8161c191681555b50505050600190811b01905550565b608051611cf361025a6000396000818161030c015281816105e3015281816107fd0152818161096c01528181610abf01528181610b6201528181610d3a01528181610e64015261101d0152611cf36000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063be989523116100ad578063ce96cb771161007c578063ce96cb7714610476578063d38bfff414610489578063d905777e1461049c578063dd62ed3e146104af578063ef8b30f7146104e857600080fd5b8063be98952314610452578063c63d75b614610343578063c6e6f5921461045b578063c7af33521461046e57600080fd5b8063a457c2d7116100f4578063a457c2d7146103f3578063a9059cbb14610406578063b3d7f6b914610419578063b460af941461042c578063ba0876521461043f57600080fd5b806370a082311461038e5780638129fc1c146103b757806394bf804d146103bf57806395d89b41146103d257600080fd5b806323b872dd116101a8578063402d267d11610177578063402d267d14610343578063472abf68146103585780634cdad506146103605780635d36b190146103735780636e553f651461037b57600080fd5b806323b872dd146102e8578063313ce567146102fb57806338d52e0f1461030a578063395093511461033057600080fd5b80630a28a477116101e45780630a28a477146102985780630c340a24146102ab5780631072cbea146102cb57806318160ddd146102e057600080fd5b806301e1d1141461021657806306fdde031461023157806307a2d13a14610262578063095ea7b314610275575b600080fd5b61021e6104fb565b6040519081526020015b60405180910390f35b60408051808201909152600c81526b0aee4c2e0e0cac8409e8aa8960a31b60208201525b6040516102289190611a1e565b61021e610270366004611a51565b610524565b610288610283366004611a86565b61054b565b6040519015158152602001610228565b61021e6102a6366004611a51565b610561565b6102b361059c565b6040516001600160a01b039091168152602001610228565b6102de6102d9366004611a86565b6105b4565b005b60025461021e565b6102886102f6366004611ab0565b610682565b60405160128152602001610228565b7f00000000000000000000000000000000000000000000000000000000000000006102b3565b61028861033e366004611a86565b61072c565b61021e610351366004611aed565b5060001990565b6102de610768565b61021e61036e366004611a51565b6108a8565b6102de6108b3565b61021e610389366004611b08565b610957565b61021e61039c366004611aed565b6001600160a01b031660009081526020819052604090205490565b6102de6109fb565b61021e6103cd366004611b08565b610b4d565b6040805180820190915260058152640ee9e8aa8960db1b6020820152610255565b610288610401366004611a86565b610be1565b610288610414366004611a86565b610c7a565b61021e610427366004611a51565b610c87565b61021e61043a366004611b34565b610c9f565b61021e61044d366004611b34565b610dc9565b61021e60385481565b61021e610469366004611a51565b610ee2565b610288610ef9565b61021e610484366004611aed565b610f2a565b6102de610497366004611aed565b610f4c565b61021e6104aa366004611aed565b610ff0565b61021e6104bd366004611b70565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61021e6104f6366004611a51565b61100e565b6000610505611019565b6038546002546105159190611bb0565b61051f9190611bc7565b905090565b600061052e611019565b60385461053b9084611bb0565b6105459190611bc7565b92915050565b600061055833848461109d565b50600192915050565b60008061056d83610ee2565b90508261057982610524565b10610585576000610588565b60015b6105959060ff1682611be9565b9392505050565b600061051f600080516020611c9e8339815191525490565b6105bc610ef9565b6105e15760405162461bcd60e51b81526004016105d890611bfc565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036106625760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420636f6c6c65637420636f72652061737365740000000000000060448201526064016105d8565b61067e61066d61059c565b6001600160a01b03841690836111c1565b5050565b600061068f848484611229565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156107145760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016105d8565b610721853385840361109d565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610558918590610763908690611be9565b61109d565b610770610ef9565b61078c5760405162461bcd60e51b81526004016105d890611bfc565b603854156107dc5760405162461bcd60e51b815260206004820152601a60248201527f496e697469616c697a653220616c72656164792063616c6c656400000000000060448201526064016105d8565b6002546000036107f8576b033b2e3c9fd0803ce8000000603855565b6002547f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108869190611c33565b61088e611019565b6108989190611bb0565b6108a29190611bc7565b6038555b565b600061054582610524565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b03161461094e5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016105d8565b6108a6336113f9565b60003360006109658561100e565b90506109937f0000000000000000000000000000000000000000000000000000000000000000833088611458565b61099d8482611490565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d787846040516109eb929190918252602082015260400190565b60405180910390a3949350505050565b610a03610ef9565b610a1f5760405162461bcd60e51b81526004016105d890611bfc565b600554610100900460ff1680610a38575060055460ff16155b610a9b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600554610100900460ff16158015610abd576005805461ffff19166101011790555b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b1857600080fd5b505af1158015610b2c573d6000803e3d6000fd5b50505050610b38610768565b8015610b4a576005805461ff00191690555b50565b6000336000610b5b85610c87565b9050610b897f0000000000000000000000000000000000000000000000000000000000000000833084611458565b610b938486611490565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d783886040516109eb929190918252602082015260400190565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c635760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105d8565b610c70338585840361109d565b5060019392505050565b6000610558338484611229565b600080610c9383610524565b90508261057982610ee2565b6000610caa82610f2a565b841115610cf95760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468656e206d61780060448201526064016105d8565b336000610d0586610561565b9050836001600160a01b0316826001600160a01b031614610d2b57610d2b84838361156f565b610d3584826115fb565b610d607f000000000000000000000000000000000000000000000000000000000000000086886111c1565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8985604051610db8929190918252602082015260400190565b60405180910390a495945050505050565b6000610dd482610ff0565b841115610e235760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468656e206d617800000060448201526064016105d8565b336000610e2f866108a8565b9050836001600160a01b0316826001600160a01b031614610e5557610e5584838861156f565b610e5f84876115fb565b610e8a7f000000000000000000000000000000000000000000000000000000000000000086836111c1565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db848a604051610db8929190918252602082015260400190565b6000603854610eef611019565b61053b9084611bb0565b6000610f11600080516020611c9e8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6001600160a01b03811660009081526020819052604081205461054590610524565b610f54610ef9565b610f705760405162461bcd60e51b81526004016105d890611bfc565b610f98817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b0316610fb8600080516020611c9e8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b038116600090815260208190526040812054610545565b600061054582610ee2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a46a9c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f9190611c33565b6001600160a01b0383166110ff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105d8565b6001600160a01b0382166111605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105d8565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b03831660248201526044810182905261122490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611749565b505050565b6001600160a01b03831661128d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105d8565b6001600160a01b0382166112ef5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105d8565b6001600160a01b038316600090815260208190526040902054818110156113675760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105d8565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061139e908490611be9565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113ea91815260200190565b60405180910390a35b50505050565b6001600160a01b03811661144f5760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016105d8565b610b4a8161181b565b6040516001600160a01b03808516602483015283166044820152606481018290526113f39085906323b872dd60e01b906084016111ed565b6001600160a01b0382166114e65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105d8565b80600260008282546114f89190611be9565b90915550506001600160a01b03821660009081526020819052604081208054839290611525908490611be9565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146113f357818110156115ee5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105d8565b6113f3848484840361109d565b6001600160a01b03821661165b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105d8565b6001600160a01b038216600090815260208190526040902054818110156116cf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105d8565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116fe908490611c4c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600061179e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118829092919063ffffffff16565b80519091501561122457808060200190518101906117bc9190611c5f565b6112245760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105d8565b806001600160a01b031661183b600080516020611c9e8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020611c9e83398151915255565b60606118918484600085611899565b949350505050565b6060824710156118fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105d8565b843b6119485760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105d8565b600080866001600160a01b031685876040516119649190611c81565b60006040518083038185875af1925050503d80600081146119a1576040519150601f19603f3d011682016040523d82523d6000602084013e6119a6565b606091505b50915091506119b68282866119c1565b979650505050505050565b606083156119d0575081610595565b8251156119e05782518084602001fd5b8160405162461bcd60e51b81526004016105d89190611a1e565b60005b83811015611a155781810151838201526020016119fd565b50506000910152565b6020815260008251806020840152611a3d8160408501602087016119fa565b601f01601f19169190910160400192915050565b600060208284031215611a6357600080fd5b5035919050565b80356001600160a01b0381168114611a8157600080fd5b919050565b60008060408385031215611a9957600080fd5b611aa283611a6a565b946020939093013593505050565b600080600060608486031215611ac557600080fd5b611ace84611a6a565b9250611adc60208501611a6a565b929592945050506040919091013590565b600060208284031215611aff57600080fd5b61059582611a6a565b60008060408385031215611b1b57600080fd5b82359150611b2b60208401611a6a565b90509250929050565b600080600060608486031215611b4957600080fd5b83359250611b5960208501611a6a565b9150611b6760408501611a6a565b90509250925092565b60008060408385031215611b8357600080fd5b611b8c83611a6a565b9150611b2b60208401611a6a565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761054557610545611b9a565b600082611be457634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561054557610545611b9a565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b600060208284031215611c4557600080fd5b5051919050565b8181038181111561054557610545611b9a565b600060208284031215611c7157600080fd5b8151801515811461059557600080fd5b60008251611c938184602087016119fa565b919091019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa264697066735822122085f205c3abe980537d5813f29beafcf67bade193e470ac320a088d22499a110a64736f6c634300081c0033", + "deployedBytecode": "0x608060405234801561001057600080fd5b50600436106102115760003560e01c806370a0823111610125578063be989523116100ad578063ce96cb771161007c578063ce96cb7714610476578063d38bfff414610489578063d905777e1461049c578063dd62ed3e146104af578063ef8b30f7146104e857600080fd5b8063be98952314610452578063c63d75b614610343578063c6e6f5921461045b578063c7af33521461046e57600080fd5b8063a457c2d7116100f4578063a457c2d7146103f3578063a9059cbb14610406578063b3d7f6b914610419578063b460af941461042c578063ba0876521461043f57600080fd5b806370a082311461038e5780638129fc1c146103b757806394bf804d146103bf57806395d89b41146103d257600080fd5b806323b872dd116101a8578063402d267d11610177578063402d267d14610343578063472abf68146103585780634cdad506146103605780635d36b190146103735780636e553f651461037b57600080fd5b806323b872dd146102e8578063313ce567146102fb57806338d52e0f1461030a578063395093511461033057600080fd5b80630a28a477116101e45780630a28a477146102985780630c340a24146102ab5780631072cbea146102cb57806318160ddd146102e057600080fd5b806301e1d1141461021657806306fdde031461023157806307a2d13a14610262578063095ea7b314610275575b600080fd5b61021e6104fb565b6040519081526020015b60405180910390f35b60408051808201909152600c81526b0aee4c2e0e0cac8409e8aa8960a31b60208201525b6040516102289190611a1e565b61021e610270366004611a51565b610524565b610288610283366004611a86565b61054b565b6040519015158152602001610228565b61021e6102a6366004611a51565b610561565b6102b361059c565b6040516001600160a01b039091168152602001610228565b6102de6102d9366004611a86565b6105b4565b005b60025461021e565b6102886102f6366004611ab0565b610682565b60405160128152602001610228565b7f00000000000000000000000000000000000000000000000000000000000000006102b3565b61028861033e366004611a86565b61072c565b61021e610351366004611aed565b5060001990565b6102de610768565b61021e61036e366004611a51565b6108a8565b6102de6108b3565b61021e610389366004611b08565b610957565b61021e61039c366004611aed565b6001600160a01b031660009081526020819052604090205490565b6102de6109fb565b61021e6103cd366004611b08565b610b4d565b6040805180820190915260058152640ee9e8aa8960db1b6020820152610255565b610288610401366004611a86565b610be1565b610288610414366004611a86565b610c7a565b61021e610427366004611a51565b610c87565b61021e61043a366004611b34565b610c9f565b61021e61044d366004611b34565b610dc9565b61021e60385481565b61021e610469366004611a51565b610ee2565b610288610ef9565b61021e610484366004611aed565b610f2a565b6102de610497366004611aed565b610f4c565b61021e6104aa366004611aed565b610ff0565b61021e6104bd366004611b70565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61021e6104f6366004611a51565b61100e565b6000610505611019565b6038546002546105159190611bb0565b61051f9190611bc7565b905090565b600061052e611019565b60385461053b9084611bb0565b6105459190611bc7565b92915050565b600061055833848461109d565b50600192915050565b60008061056d83610ee2565b90508261057982610524565b10610585576000610588565b60015b6105959060ff1682611be9565b9392505050565b600061051f600080516020611c9e8339815191525490565b6105bc610ef9565b6105e15760405162461bcd60e51b81526004016105d890611bfc565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b0316036106625760405162461bcd60e51b815260206004820152601960248201527f43616e6e6f7420636f6c6c65637420636f72652061737365740000000000000060448201526064016105d8565b61067e61066d61059c565b6001600160a01b03841690836111c1565b5050565b600061068f848484611229565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156107145760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084016105d8565b610721853385840361109d565b506001949350505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610558918590610763908690611be9565b61109d565b610770610ef9565b61078c5760405162461bcd60e51b81526004016105d890611bfc565b603854156107dc5760405162461bcd60e51b815260206004820152601a60248201527f496e697469616c697a653220616c72656164792063616c6c656400000000000060448201526064016105d8565b6002546000036107f8576b033b2e3c9fd0803ce8000000603855565b6002547f00000000000000000000000000000000000000000000000000000000000000006040516370a0823160e01b81523060048201526001600160a01b0391909116906370a0823190602401602060405180830381865afa158015610862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108869190611c33565b61088e611019565b6108989190611bb0565b6108a29190611bc7565b6038555b565b600061054582610524565b7f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db546001600160a01b0316336001600160a01b03161461094e5760405162461bcd60e51b815260206004820152603060248201527f4f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f60448201526f6d706c6574652074686520636c61696d60801b60648201526084016105d8565b6108a6336113f9565b60003360006109658561100e565b90506109937f0000000000000000000000000000000000000000000000000000000000000000833088611458565b61099d8482611490565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d787846040516109eb929190918252602082015260400190565b60405180910390a3949350505050565b610a03610ef9565b610a1f5760405162461bcd60e51b81526004016105d890611bfc565b600554610100900460ff1680610a38575060055460ff16155b610a9b5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016105d8565b600554610100900460ff16158015610abd576005805461ffff19166101011790555b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663f51b0fd46040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610b1857600080fd5b505af1158015610b2c573d6000803e3d6000fd5b50505050610b38610768565b8015610b4a576005805461ff00191690555b50565b6000336000610b5b85610c87565b9050610b897f0000000000000000000000000000000000000000000000000000000000000000833084611458565b610b938486611490565b836001600160a01b0316826001600160a01b03167fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d783886040516109eb929190918252602082015260400190565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610c635760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105d8565b610c70338585840361109d565b5060019392505050565b6000610558338484611229565b600080610c9383610524565b90508261057982610ee2565b6000610caa82610f2a565b841115610cf95760405162461bcd60e51b815260206004820152601f60248201527f455243343632363a207769746864726177206d6f7265207468656e206d61780060448201526064016105d8565b336000610d0586610561565b9050836001600160a01b0316826001600160a01b031614610d2b57610d2b84838361156f565b610d3584826115fb565b610d607f000000000000000000000000000000000000000000000000000000000000000086886111c1565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db8985604051610db8929190918252602082015260400190565b60405180910390a495945050505050565b6000610dd482610ff0565b841115610e235760405162461bcd60e51b815260206004820152601d60248201527f455243343632363a2072656465656d206d6f7265207468656e206d617800000060448201526064016105d8565b336000610e2f866108a8565b9050836001600160a01b0316826001600160a01b031614610e5557610e5584838861156f565b610e5f84876115fb565b610e8a7f000000000000000000000000000000000000000000000000000000000000000086836111c1565b836001600160a01b0316856001600160a01b0316836001600160a01b03167ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db848a604051610db8929190918252602082015260400190565b6000603854610eef611019565b61053b9084611bb0565b6000610f11600080516020611c9e8339815191525490565b6001600160a01b0316336001600160a01b031614905090565b6001600160a01b03811660009081526020819052604081205461054590610524565b610f54610ef9565b610f705760405162461bcd60e51b81526004016105d890611bfc565b610f98817f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db55565b806001600160a01b0316610fb8600080516020611c9e8339815191525490565b6001600160a01b03167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b6001600160a01b038116600090815260208190526040812054610545565b600061054582610ee2565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637a46a9c56040518163ffffffff1660e01b8152600401602060405180830381865afa158015611079573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061051f9190611c33565b6001600160a01b0383166110ff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105d8565b6001600160a01b0382166111605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105d8565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6040516001600160a01b03831660248201526044810182905261122490849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611749565b505050565b6001600160a01b03831661128d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105d8565b6001600160a01b0382166112ef5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105d8565b6001600160a01b038316600090815260208190526040902054818110156113675760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105d8565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061139e908490611be9565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516113ea91815260200190565b60405180910390a35b50505050565b6001600160a01b03811661144f5760405162461bcd60e51b815260206004820152601a60248201527f4e657720476f7665726e6f72206973206164647265737328302900000000000060448201526064016105d8565b610b4a8161181b565b6040516001600160a01b03808516602483015283166044820152606481018290526113f39085906323b872dd60e01b906084016111ed565b6001600160a01b0382166114e65760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016105d8565b80600260008282546114f89190611be9565b90915550506001600160a01b03821660009081526020819052604081208054839290611525908490611be9565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b0383811660009081526001602090815260408083209386168352929052205460001981146113f357818110156115ee5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105d8565b6113f3848484840361109d565b6001600160a01b03821661165b5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016105d8565b6001600160a01b038216600090815260208190526040902054818110156116cf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016105d8565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116fe908490611c4c565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600061179e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166118829092919063ffffffff16565b80519091501561122457808060200190518101906117bc9190611c5f565b6112245760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016105d8565b806001600160a01b031661183b600080516020611c9e8339815191525490565b6001600160a01b03167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3600080516020611c9e83398151915255565b60606118918484600085611899565b949350505050565b6060824710156118fa5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016105d8565b843b6119485760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105d8565b600080866001600160a01b031685876040516119649190611c81565b60006040518083038185875af1925050503d80600081146119a1576040519150601f19603f3d011682016040523d82523d6000602084013e6119a6565b606091505b50915091506119b68282866119c1565b979650505050505050565b606083156119d0575081610595565b8251156119e05782518084602001fd5b8160405162461bcd60e51b81526004016105d89190611a1e565b60005b83811015611a155781810151838201526020016119fd565b50506000910152565b6020815260008251806020840152611a3d8160408501602087016119fa565b601f01601f19169190910160400192915050565b600060208284031215611a6357600080fd5b5035919050565b80356001600160a01b0381168114611a8157600080fd5b919050565b60008060408385031215611a9957600080fd5b611aa283611a6a565b946020939093013593505050565b600080600060608486031215611ac557600080fd5b611ace84611a6a565b9250611adc60208501611a6a565b929592945050506040919091013590565b600060208284031215611aff57600080fd5b61059582611a6a565b60008060408385031215611b1b57600080fd5b82359150611b2b60208401611a6a565b90509250929050565b600080600060608486031215611b4957600080fd5b83359250611b5960208501611a6a565b9150611b6760408501611a6a565b90509250925092565b60008060408385031215611b8357600080fd5b611b8c83611a6a565b9150611b2b60208401611a6a565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761054557610545611b9a565b600082611be457634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561054557610545611b9a565b6020808252601a908201527f43616c6c6572206973206e6f742074686520476f7665726e6f72000000000000604082015260600190565b600060208284031215611c4557600080fd5b5051919050565b8181038181111561054557610545611b9a565b600060208284031215611c7157600080fd5b8151801515811461059557600080fd5b60008251611c938184602087016119fa565b919091019291505056fe7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4aa264697066735822122085f205c3abe980537d5813f29beafcf67bade193e470ac320a088d22499a110a64736f6c634300081c0033", + "libraries": {}, "devdoc": { "author": "Origin Protocol Inc", + "details": "An important capability of this contract is that it isn't susceptible to changes of the exchange rate of WOETH/OETH if/when someone sends the underlying asset (OETH) to the contract. If OETH weren't rebasing this could be achieved by solely tracking the ERC20 transfers of the OETH token on mint, deposit, redeem, withdraw. The issue is that OETH is rebasing and OETH balances will change when the token rebases. For that reason the contract logic checks the actual underlying OETH token balance only once (either on a fresh contract creation or upgrade) and considering the WOETH supply and rebasingCreditsPerToken calculates the _adjuster. Once the adjuster is calculated any donations to the contract are ignored. The totalSupply (instead of querying OETH balance) works off of adjuster the current WOETH supply and rebasingCreditsPerToken. This makes WOETH value accrual completely follow OETH's value accrual. WOETH is safe to use in lending markets as the VualtCore's _rebase contains safeguards preventing any sudden large rebases.", + "events": { + "Approval(address,address,uint256)": { + "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." + }, + "Transfer(address,address,uint256)": { + "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." + } + }, "kind": "dev", "methods": { "allowance(address,address)": { @@ -848,9 +852,6 @@ "balanceOf(address)": { "details": "See {IERC20-balanceOf}." }, - "claimGovernance()": { - "details": "Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor." - }, "convertToAssets(uint256)": { "details": "See {IERC4262-convertToAssets} " }, @@ -866,15 +867,9 @@ "deposit(uint256,address)": { "details": "See {IERC4262-deposit} " }, - "governor()": { - "details": "Returns the address of the current Governor." - }, "increaseAllowance(address,uint256)": { "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." }, - "isGovernor()": { - "details": "Returns true if the caller is the current Governor." - }, "maxDeposit(address)": { "details": "See {IERC4262-maxDeposit} " }, @@ -890,9 +885,6 @@ "mint(uint256,address)": { "details": "See {IERC4262-mint} " }, - "name()": { - "details": "Returns the name of the token." - }, "previewDeposit(uint256)": { "details": "See {IERC4262-previewDeposit} " }, @@ -908,9 +900,6 @@ "redeem(uint256,address,address)": { "details": "See {IERC4262-redeem} " }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, "totalAssets()": { "details": "See {IERC4262-totalAssets} " }, @@ -924,7 +913,6 @@ "details": "See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - `sender` and `recipient` cannot be the zero address. - `sender` must have a balance of at least `amount`. - the caller must have allowance for ``sender``'s tokens of at least `amount`." }, "transferGovernance(address)": { - "details": "Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete", "params": { "_newGovernor": "Address of the new Governor" } @@ -939,15 +927,30 @@ "details": "See {IERC4262-withdraw} " } }, - "title": "OETH Token Contract", + "title": "Wrapped OETH Token Contract", "version": 1 }, "userdoc": { "kind": "user", "methods": { + "claimGovernance()": { + "notice": "Claim Governance of the contract to a new account (`newGovernor`). Can only be called by the new Governor." + }, + "governor()": { + "notice": "Returns the address of the current Governor." + }, "initialize()": { "notice": "Enable OETH rebasing for this contract" }, + "initialize2()": { + "notice": "secondary initializer that newly deployed contracts will execute as part of primary initialize function and the existing contracts will have it called as a governance operation." + }, + "isGovernor()": { + "notice": "Returns true if the caller is the current Governor." + }, + "transferGovernance(address)": { + "notice": "Transfers Governance of the contract to a new account (`newGovernor`). Can only be called by the current Governor. Must be claimed for this to complete" + }, "transferToken(address,uint256)": { "notice": "Transfer token to governor. Intended for recovering tokens stuck in contract, i.e. mistaken sends. Cannot transfer OETH" } @@ -997,7 +1000,7 @@ "type": "t_string_storage" }, { - "astId": 24590, + "astId": 3893, "contract": "contracts/token/WOETH.sol:WOETH", "label": "initialized", "offset": 0, @@ -1005,7 +1008,7 @@ "type": "t_bool" }, { - "astId": 24593, + "astId": 3896, "contract": "contracts/token/WOETH.sol:WOETH", "label": "initializing", "offset": 1, @@ -1013,12 +1016,28 @@ "type": "t_bool" }, { - "astId": 24633, + "astId": 3936, "contract": "contracts/token/WOETH.sol:WOETH", "label": "______gap", "offset": 0, "slot": "6", "type": "t_array(t_uint256)50_storage" + }, + { + "astId": 3522, + "contract": "contracts/token/WOETH.sol:WOETH", + "label": "adjuster", + "offset": 0, + "slot": "56", + "type": "t_uint256" + }, + { + "astId": 3526, + "contract": "contracts/token/WOETH.sol:WOETH", + "label": "__gap", + "offset": 0, + "slot": "57", + "type": "t_array(t_uint256)49_storage" } ], "types": { @@ -1027,6 +1046,12 @@ "label": "address", "numberOfBytes": "20" }, + "t_array(t_uint256)49_storage": { + "base": "t_uint256", + "encoding": "inplace", + "label": "uint256[49]", + "numberOfBytes": "1568" + }, "t_array(t_uint256)50_storage": { "base": "t_uint256", "encoding": "inplace", diff --git a/contracts/storageLayout/mainnet/OETHVaultAdmin.json b/contracts/storageLayout/mainnet/OETHVaultAdmin.json index ac4cbe5948..74d0d82085 100644 --- a/contracts/storageLayout/mainnet/OETHVaultAdmin.json +++ b/contracts/storageLayout/mainnet/OETHVaultAdmin.json @@ -29,9 +29,9 @@ "label": "assets", "offset": 0, "slot": "51", - "type": "t_mapping(t_address,t_struct(Asset)60752_storage)", + "type": "t_mapping(t_address,t_struct(Asset)66513_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:92" + "src": "contracts/vault/VaultStorage.sol:99" }, { "label": "allAssets", @@ -39,15 +39,15 @@ "slot": "52", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:95" + "src": "contracts/vault/VaultStorage.sol:101" }, { "label": "strategies", "offset": 0, "slot": "53", - "type": "t_mapping(t_address,t_struct(Strategy)60767_storage)", + "type": "t_mapping(t_address,t_struct(Strategy)66528_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:104" + "src": "contracts/vault/VaultStorage.sol:109" }, { "label": "allStrategies", @@ -55,7 +55,7 @@ "slot": "54", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:106" + "src": "contracts/vault/VaultStorage.sol:111" }, { "label": "priceProvider", @@ -63,7 +63,7 @@ "slot": "55", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:110" + "src": "contracts/vault/VaultStorage.sol:114" }, { "label": "rebasePaused", @@ -71,7 +71,7 @@ "slot": "55", "type": "t_bool", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:112" + "src": "contracts/vault/VaultStorage.sol:116" }, { "label": "capitalPaused", @@ -79,7 +79,7 @@ "slot": "55", "type": "t_bool", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:115" + "src": "contracts/vault/VaultStorage.sol:119" }, { "label": "redeemFeeBps", @@ -87,7 +87,7 @@ "slot": "56", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:117" + "src": "contracts/vault/VaultStorage.sol:121" }, { "label": "vaultBuffer", @@ -95,7 +95,7 @@ "slot": "57", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:119" + "src": "contracts/vault/VaultStorage.sol:123" }, { "label": "autoAllocateThreshold", @@ -103,7 +103,7 @@ "slot": "58", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:121" + "src": "contracts/vault/VaultStorage.sol:125" }, { "label": "rebaseThreshold", @@ -111,15 +111,15 @@ "slot": "59", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:123" + "src": "contracts/vault/VaultStorage.sol:127" }, { "label": "oUSD", "offset": 0, "slot": "60", - "type": "t_contract(OUSD)51174", + "type": "t_contract(OUSD)56628", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:127" + "src": "contracts/vault/VaultStorage.sol:130" }, { "label": "_deprecated_rebaseHooksAddr", @@ -127,7 +127,7 @@ "slot": "61", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:136" + "src": "contracts/vault/VaultStorage.sol:138" }, { "label": "_deprecated_uniswapAddr", @@ -135,7 +135,7 @@ "slot": "62", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:140" + "src": "contracts/vault/VaultStorage.sol:141" }, { "label": "strategistAddr", @@ -143,7 +143,7 @@ "slot": "63", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:143" + "src": "contracts/vault/VaultStorage.sol:144" }, { "label": "assetDefaultStrategies", @@ -159,7 +159,7 @@ "slot": "65", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:152" + "src": "contracts/vault/VaultStorage.sol:151" }, { "label": "trusteeAddress", @@ -167,7 +167,7 @@ "slot": "66", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:155" + "src": "contracts/vault/VaultStorage.sol:154" }, { "label": "trusteeFeeBps", @@ -175,7 +175,7 @@ "slot": "67", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:158" + "src": "contracts/vault/VaultStorage.sol:157" }, { "label": "_deprecated_swapTokens", @@ -183,7 +183,7 @@ "slot": "68", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:161" + "src": "contracts/vault/VaultStorage.sol:160" }, { "label": "ousdMetaStrategy", @@ -191,7 +191,7 @@ "slot": "69", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:169" + "src": "contracts/vault/VaultStorage.sol:166" }, { "label": "netOusdMintedForStrategy", @@ -199,7 +199,7 @@ "slot": "70", "type": "t_int256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:173" + "src": "contracts/vault/VaultStorage.sol:169" }, { "label": "netOusdMintForStrategyThreshold", @@ -207,15 +207,15 @@ "slot": "71", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:177" + "src": "contracts/vault/VaultStorage.sol:172" }, { "label": "swapConfig", "offset": 0, "slot": "72", - "type": "t_struct(SwapConfig)60871_storage", + "type": "t_struct(SwapConfig)66630_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:193" + "src": "contracts/vault/VaultStorage.sol:186" }, { "label": "isMintWhitelistedStrategy", @@ -223,7 +223,7 @@ "slot": "73", "type": "t_mapping(t_address,t_bool)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:198" + "src": "contracts/vault/VaultStorage.sol:190" }, { "label": "dripper", @@ -231,23 +231,23 @@ "slot": "74", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:204" + "src": "contracts/vault/VaultStorage.sol:194" }, { "label": "withdrawalQueueMetadata", "offset": 0, "slot": "75", - "type": "t_struct(WithdrawalQueueMetadata)60898_storage", + "type": "t_struct(WithdrawalQueueMetadata)66657_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:226" + "src": "contracts/vault/VaultStorage.sol:214" }, { "label": "withdrawalRequests", "offset": 0, "slot": "77", - "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)", + "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:240" + "src": "contracts/vault/VaultStorage.sol:228" }, { "label": "withdrawalClaimDelay", @@ -255,15 +255,47 @@ "slot": "78", "type": "t_uint256", "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:233" + }, + { + "label": "lastRebase", + "offset": 0, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:236" + }, + { + "label": "dripDuration", + "offset": 8, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:239" + }, + { + "label": "rebasePerSecondMax", + "offset": 16, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:244" + }, + { + "label": "rebasePerSecondTarget", + "offset": 24, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", "src": "contracts/vault/VaultStorage.sol:247" }, { "label": "__gap", "offset": 0, - "slot": "79", - "type": "t_array(t_uint256)44_storage", + "slot": "80", + "type": "t_array(t_uint256)43_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:251" + "src": "contracts/vault/VaultStorage.sol:254" } ], "types": { @@ -275,9 +307,9 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_uint256)44_storage": { - "label": "uint256[44]", - "numberOfBytes": "1408" + "t_array(t_uint256)43_storage": { + "label": "uint256[43]", + "numberOfBytes": "1376" }, "t_array(t_uint256)50_storage": { "label": "uint256[50]", @@ -287,11 +319,11 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(OUSD)51174": { + "t_contract(OUSD)56628": { "label": "contract OUSD", "numberOfBytes": "20" }, - "t_enum(UnitConversion)60742": { + "t_enum(UnitConversion)66503": { "label": "enum VaultStorage.UnitConversion", "members": [ "DECIMALS", @@ -311,19 +343,19 @@ "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(Asset)60752_storage)": { + "t_mapping(t_address,t_struct(Asset)66513_storage)": { "label": "mapping(address => struct VaultStorage.Asset)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(Strategy)60767_storage)": { + "t_mapping(t_address,t_struct(Strategy)66528_storage)": { "label": "mapping(address => struct VaultStorage.Strategy)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)": { + "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)": { "label": "mapping(uint256 => struct VaultStorage.WithdrawalRequest)", "numberOfBytes": "32" }, - "t_struct(Asset)60752_storage": { + "t_struct(Asset)66513_storage": { "label": "struct VaultStorage.Asset", "members": [ { @@ -334,7 +366,7 @@ }, { "label": "unitConversion", - "type": "t_enum(UnitConversion)60742", + "type": "t_enum(UnitConversion)66503", "offset": 1, "slot": "0" }, @@ -353,7 +385,7 @@ ], "numberOfBytes": "32" }, - "t_struct(Strategy)60767_storage": { + "t_struct(Strategy)66528_storage": { "label": "struct VaultStorage.Strategy", "members": [ { @@ -371,7 +403,7 @@ ], "numberOfBytes": "64" }, - "t_struct(SwapConfig)60871_storage": { + "t_struct(SwapConfig)66630_storage": { "label": "struct VaultStorage.SwapConfig", "members": [ { @@ -389,7 +421,7 @@ ], "numberOfBytes": "32" }, - "t_struct(WithdrawalQueueMetadata)60898_storage": { + "t_struct(WithdrawalQueueMetadata)66657_storage": { "label": "struct VaultStorage.WithdrawalQueueMetadata", "members": [ { @@ -419,7 +451,7 @@ ], "numberOfBytes": "64" }, - "t_struct(WithdrawalRequest)60913_storage": { + "t_struct(WithdrawalRequest)66672_storage": { "label": "struct VaultStorage.WithdrawalRequest", "members": [ { @@ -471,6 +503,10 @@ "label": "uint40", "numberOfBytes": "5" }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, "t_uint8": { "label": "uint8", "numberOfBytes": "1" diff --git a/contracts/storageLayout/mainnet/OETHVaultCore.json b/contracts/storageLayout/mainnet/OETHVaultCore.json index 168e1ef111..10a4042845 100644 --- a/contracts/storageLayout/mainnet/OETHVaultCore.json +++ b/contracts/storageLayout/mainnet/OETHVaultCore.json @@ -29,9 +29,9 @@ "label": "assets", "offset": 0, "slot": "51", - "type": "t_mapping(t_address,t_struct(Asset)60752_storage)", + "type": "t_mapping(t_address,t_struct(Asset)66513_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:92" + "src": "contracts/vault/VaultStorage.sol:99" }, { "label": "allAssets", @@ -39,15 +39,15 @@ "slot": "52", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:95" + "src": "contracts/vault/VaultStorage.sol:101" }, { "label": "strategies", "offset": 0, "slot": "53", - "type": "t_mapping(t_address,t_struct(Strategy)60767_storage)", + "type": "t_mapping(t_address,t_struct(Strategy)66528_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:104" + "src": "contracts/vault/VaultStorage.sol:109" }, { "label": "allStrategies", @@ -55,7 +55,7 @@ "slot": "54", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:106" + "src": "contracts/vault/VaultStorage.sol:111" }, { "label": "priceProvider", @@ -63,7 +63,7 @@ "slot": "55", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:110" + "src": "contracts/vault/VaultStorage.sol:114" }, { "label": "rebasePaused", @@ -71,7 +71,7 @@ "slot": "55", "type": "t_bool", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:112" + "src": "contracts/vault/VaultStorage.sol:116" }, { "label": "capitalPaused", @@ -79,7 +79,7 @@ "slot": "55", "type": "t_bool", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:115" + "src": "contracts/vault/VaultStorage.sol:119" }, { "label": "redeemFeeBps", @@ -87,7 +87,7 @@ "slot": "56", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:117" + "src": "contracts/vault/VaultStorage.sol:121" }, { "label": "vaultBuffer", @@ -95,7 +95,7 @@ "slot": "57", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:119" + "src": "contracts/vault/VaultStorage.sol:123" }, { "label": "autoAllocateThreshold", @@ -103,7 +103,7 @@ "slot": "58", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:121" + "src": "contracts/vault/VaultStorage.sol:125" }, { "label": "rebaseThreshold", @@ -111,15 +111,15 @@ "slot": "59", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:123" + "src": "contracts/vault/VaultStorage.sol:127" }, { "label": "oUSD", "offset": 0, "slot": "60", - "type": "t_contract(OUSD)51174", + "type": "t_contract(OUSD)56628", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:127" + "src": "contracts/vault/VaultStorage.sol:130" }, { "label": "_deprecated_rebaseHooksAddr", @@ -127,7 +127,7 @@ "slot": "61", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:136" + "src": "contracts/vault/VaultStorage.sol:138" }, { "label": "_deprecated_uniswapAddr", @@ -135,7 +135,7 @@ "slot": "62", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:140" + "src": "contracts/vault/VaultStorage.sol:141" }, { "label": "strategistAddr", @@ -143,7 +143,7 @@ "slot": "63", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:143" + "src": "contracts/vault/VaultStorage.sol:144" }, { "label": "assetDefaultStrategies", @@ -159,7 +159,7 @@ "slot": "65", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:152" + "src": "contracts/vault/VaultStorage.sol:151" }, { "label": "trusteeAddress", @@ -167,7 +167,7 @@ "slot": "66", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:155" + "src": "contracts/vault/VaultStorage.sol:154" }, { "label": "trusteeFeeBps", @@ -175,7 +175,7 @@ "slot": "67", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:158" + "src": "contracts/vault/VaultStorage.sol:157" }, { "label": "_deprecated_swapTokens", @@ -183,7 +183,7 @@ "slot": "68", "type": "t_array(t_address)dyn_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:161" + "src": "contracts/vault/VaultStorage.sol:160" }, { "label": "ousdMetaStrategy", @@ -191,7 +191,7 @@ "slot": "69", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:169" + "src": "contracts/vault/VaultStorage.sol:166" }, { "label": "netOusdMintedForStrategy", @@ -199,7 +199,7 @@ "slot": "70", "type": "t_int256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:173" + "src": "contracts/vault/VaultStorage.sol:169" }, { "label": "netOusdMintForStrategyThreshold", @@ -207,15 +207,15 @@ "slot": "71", "type": "t_uint256", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:177" + "src": "contracts/vault/VaultStorage.sol:172" }, { "label": "swapConfig", "offset": 0, "slot": "72", - "type": "t_struct(SwapConfig)60871_storage", + "type": "t_struct(SwapConfig)66630_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:193" + "src": "contracts/vault/VaultStorage.sol:186" }, { "label": "isMintWhitelistedStrategy", @@ -223,7 +223,7 @@ "slot": "73", "type": "t_mapping(t_address,t_bool)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:198" + "src": "contracts/vault/VaultStorage.sol:190" }, { "label": "dripper", @@ -231,23 +231,23 @@ "slot": "74", "type": "t_address", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:204" + "src": "contracts/vault/VaultStorage.sol:194" }, { "label": "withdrawalQueueMetadata", "offset": 0, "slot": "75", - "type": "t_struct(WithdrawalQueueMetadata)60898_storage", + "type": "t_struct(WithdrawalQueueMetadata)66657_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:226" + "src": "contracts/vault/VaultStorage.sol:214" }, { "label": "withdrawalRequests", "offset": 0, "slot": "77", - "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)", + "type": "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:240" + "src": "contracts/vault/VaultStorage.sol:228" }, { "label": "withdrawalClaimDelay", @@ -255,15 +255,47 @@ "slot": "78", "type": "t_uint256", "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:233" + }, + { + "label": "lastRebase", + "offset": 0, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:236" + }, + { + "label": "dripDuration", + "offset": 8, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:239" + }, + { + "label": "rebasePerSecondMax", + "offset": 16, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", + "src": "contracts/vault/VaultStorage.sol:244" + }, + { + "label": "rebasePerSecondTarget", + "offset": 24, + "slot": "79", + "type": "t_uint64", + "contract": "VaultStorage", "src": "contracts/vault/VaultStorage.sol:247" }, { "label": "__gap", "offset": 0, - "slot": "79", - "type": "t_array(t_uint256)44_storage", + "slot": "80", + "type": "t_array(t_uint256)43_storage", "contract": "VaultStorage", - "src": "contracts/vault/VaultStorage.sol:251" + "src": "contracts/vault/VaultStorage.sol:254" }, { "label": "wethAssetIndex", @@ -291,9 +323,9 @@ "label": "address[]", "numberOfBytes": "32" }, - "t_array(t_uint256)44_storage": { - "label": "uint256[44]", - "numberOfBytes": "1408" + "t_array(t_uint256)43_storage": { + "label": "uint256[43]", + "numberOfBytes": "1376" }, "t_array(t_uint256)50_storage": { "label": "uint256[50]", @@ -303,11 +335,11 @@ "label": "bool", "numberOfBytes": "1" }, - "t_contract(OUSD)51174": { + "t_contract(OUSD)56628": { "label": "contract OUSD", "numberOfBytes": "20" }, - "t_enum(UnitConversion)60742": { + "t_enum(UnitConversion)66503": { "label": "enum VaultStorage.UnitConversion", "members": [ "DECIMALS", @@ -327,19 +359,19 @@ "label": "mapping(address => bool)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(Asset)60752_storage)": { + "t_mapping(t_address,t_struct(Asset)66513_storage)": { "label": "mapping(address => struct VaultStorage.Asset)", "numberOfBytes": "32" }, - "t_mapping(t_address,t_struct(Strategy)60767_storage)": { + "t_mapping(t_address,t_struct(Strategy)66528_storage)": { "label": "mapping(address => struct VaultStorage.Strategy)", "numberOfBytes": "32" }, - "t_mapping(t_uint256,t_struct(WithdrawalRequest)60913_storage)": { + "t_mapping(t_uint256,t_struct(WithdrawalRequest)66672_storage)": { "label": "mapping(uint256 => struct VaultStorage.WithdrawalRequest)", "numberOfBytes": "32" }, - "t_struct(Asset)60752_storage": { + "t_struct(Asset)66513_storage": { "label": "struct VaultStorage.Asset", "members": [ { @@ -350,7 +382,7 @@ }, { "label": "unitConversion", - "type": "t_enum(UnitConversion)60742", + "type": "t_enum(UnitConversion)66503", "offset": 1, "slot": "0" }, @@ -369,7 +401,7 @@ ], "numberOfBytes": "32" }, - "t_struct(Strategy)60767_storage": { + "t_struct(Strategy)66528_storage": { "label": "struct VaultStorage.Strategy", "members": [ { @@ -387,7 +419,7 @@ ], "numberOfBytes": "64" }, - "t_struct(SwapConfig)60871_storage": { + "t_struct(SwapConfig)66630_storage": { "label": "struct VaultStorage.SwapConfig", "members": [ { @@ -405,7 +437,7 @@ ], "numberOfBytes": "32" }, - "t_struct(WithdrawalQueueMetadata)60898_storage": { + "t_struct(WithdrawalQueueMetadata)66657_storage": { "label": "struct VaultStorage.WithdrawalQueueMetadata", "members": [ { @@ -435,7 +467,7 @@ ], "numberOfBytes": "64" }, - "t_struct(WithdrawalRequest)60913_storage": { + "t_struct(WithdrawalRequest)66672_storage": { "label": "struct VaultStorage.WithdrawalRequest", "members": [ { @@ -487,6 +519,10 @@ "label": "uint40", "numberOfBytes": "5" }, + "t_uint64": { + "label": "uint64", + "numberOfBytes": "8" + }, "t_uint8": { "label": "uint8", "numberOfBytes": "1" diff --git a/contracts/storageLayout/mainnet/WOETH.json b/contracts/storageLayout/mainnet/WOETH.json index be4eb6d576..c763fb40af 100644 --- a/contracts/storageLayout/mainnet/WOETH.json +++ b/contracts/storageLayout/mainnet/WOETH.json @@ -1,75 +1,119 @@ { + "solcVersion": "0.8.28", "storage": [ { - "contract": "ERC20", "label": "_balances", + "offset": 0, + "slot": "0", "type": "t_mapping(t_address,t_uint256)", + "contract": "ERC20", "src": "@openzeppelin/contracts/token/ERC20/ERC20.sol:36" }, { - "contract": "ERC20", "label": "_allowances", + "offset": 0, + "slot": "1", "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))", + "contract": "ERC20", "src": "@openzeppelin/contracts/token/ERC20/ERC20.sol:38" }, { - "contract": "ERC20", "label": "_totalSupply", + "offset": 0, + "slot": "2", "type": "t_uint256", + "contract": "ERC20", "src": "@openzeppelin/contracts/token/ERC20/ERC20.sol:40" }, { - "contract": "ERC20", "label": "_name", + "offset": 0, + "slot": "3", "type": "t_string_storage", + "contract": "ERC20", "src": "@openzeppelin/contracts/token/ERC20/ERC20.sol:42" }, { - "contract": "ERC20", "label": "_symbol", + "offset": 0, + "slot": "4", "type": "t_string_storage", + "contract": "ERC20", "src": "@openzeppelin/contracts/token/ERC20/ERC20.sol:43" }, { - "contract": "Initializable", "label": "initialized", + "offset": 0, + "slot": "5", "type": "t_bool", - "src": "contracts/utils/Initializable.sol:8" + "contract": "Initializable", + "src": "contracts/utils/Initializable.sol:12" }, { - "contract": "Initializable", "label": "initializing", + "offset": 1, + "slot": "5", "type": "t_bool", - "src": "contracts/utils/Initializable.sol:13" + "contract": "Initializable", + "src": "contracts/utils/Initializable.sol:17" }, { - "contract": "Initializable", "label": "______gap", + "offset": 0, + "slot": "6", "type": "t_array(t_uint256)50_storage", - "src": "contracts/utils/Initializable.sol:37" + "contract": "Initializable", + "src": "contracts/utils/Initializable.sol:41" + }, + { + "label": "adjuster", + "offset": 0, + "slot": "56", + "type": "t_uint256", + "contract": "WOETH", + "src": "contracts/token/WOETH.sol:41" + }, + { + "label": "__gap", + "offset": 0, + "slot": "57", + "type": "t_array(t_uint256)49_storage", + "contract": "WOETH", + "src": "contracts/token/WOETH.sol:42" } ], "types": { - "t_bool": { - "label": "bool" - }, - "t_array(t_uint256)50_storage": { - "label": "uint256[50]" + "t_address": { + "label": "address", + "numberOfBytes": "20" }, - "t_uint256": { - "label": "uint256" + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" }, - "t_mapping(t_address,t_uint256)": { - "label": "mapping(address => uint256)" + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" }, - "t_address": { - "label": "address" + "t_bool": { + "label": "bool", + "numberOfBytes": "1" }, "t_mapping(t_address,t_mapping(t_address,t_uint256))": { - "label": "mapping(address => mapping(address => uint256))" + "label": "mapping(address => mapping(address => uint256))", + "numberOfBytes": "32" + }, + "t_mapping(t_address,t_uint256)": { + "label": "mapping(address => uint256)", + "numberOfBytes": "32" }, "t_string_storage": { - "label": "string" + "label": "string", + "numberOfBytes": "32" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" } } } \ No newline at end of file