@venusprotocol/oracle 2.8.0-dev.5 → 2.8.0-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deployments/ethereum/sUSDS_ERC4626Oracle.json +177 -0
- package/deployments/ethereum/solcInputs/c3eebb33ec692fad160aed655c5e5531.json +313 -0
- package/deployments/ethereum.json +94 -0
- package/deployments/ethereum_addresses.json +1 -0
- package/deployments/sepolia/sUSDS_ERC4626Oracle.json +177 -0
- package/deployments/sepolia/solcInputs/c3eebb33ec692fad160aed655c5e5531.json +313 -0
- package/deployments/sepolia.json +94 -0
- package/deployments/sepolia_addresses.json +1 -0
- package/dist/deploy/18-deploy-sUSDC-oracle.d.ts +4 -0
- package/dist/deploy/18-deploy-sUSDC-oracle.d.ts.map +1 -0
- package/dist/deploy/18-deploy-sUSDC-oracle.js +21 -0
- package/dist/deploy/18-deploy-sUSDC-oracle.js.map +1 -0
- package/dist/helpers/deploymentConfig.d.ts.map +1 -1
- package/dist/helpers/deploymentConfig.js +4 -0
- package/dist/helpers/deploymentConfig.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
{
|
|
2
|
+
"address": "0xDC4861F5Ad18bD584Eab322cc6706e632E9D1c94",
|
|
3
|
+
"abi": [
|
|
4
|
+
{
|
|
5
|
+
"inputs": [
|
|
6
|
+
{
|
|
7
|
+
"internalType": "address",
|
|
8
|
+
"name": "correlatedToken",
|
|
9
|
+
"type": "address"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"internalType": "address",
|
|
13
|
+
"name": "underlyingToken",
|
|
14
|
+
"type": "address"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"internalType": "address",
|
|
18
|
+
"name": "resilientOracle",
|
|
19
|
+
"type": "address"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
"stateMutability": "nonpayable",
|
|
23
|
+
"type": "constructor"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"inputs": [],
|
|
27
|
+
"name": "InvalidTokenAddress",
|
|
28
|
+
"type": "error"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"inputs": [],
|
|
32
|
+
"name": "ZeroAddressNotAllowed",
|
|
33
|
+
"type": "error"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"inputs": [],
|
|
37
|
+
"name": "CORRELATED_TOKEN",
|
|
38
|
+
"outputs": [
|
|
39
|
+
{
|
|
40
|
+
"internalType": "address",
|
|
41
|
+
"name": "",
|
|
42
|
+
"type": "address"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"stateMutability": "view",
|
|
46
|
+
"type": "function"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"inputs": [],
|
|
50
|
+
"name": "RESILIENT_ORACLE",
|
|
51
|
+
"outputs": [
|
|
52
|
+
{
|
|
53
|
+
"internalType": "contract OracleInterface",
|
|
54
|
+
"name": "",
|
|
55
|
+
"type": "address"
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"stateMutability": "view",
|
|
59
|
+
"type": "function"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"inputs": [],
|
|
63
|
+
"name": "UNDERLYING_TOKEN",
|
|
64
|
+
"outputs": [
|
|
65
|
+
{
|
|
66
|
+
"internalType": "address",
|
|
67
|
+
"name": "",
|
|
68
|
+
"type": "address"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
"stateMutability": "view",
|
|
72
|
+
"type": "function"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"inputs": [
|
|
76
|
+
{
|
|
77
|
+
"internalType": "address",
|
|
78
|
+
"name": "asset",
|
|
79
|
+
"type": "address"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
"name": "getPrice",
|
|
83
|
+
"outputs": [
|
|
84
|
+
{
|
|
85
|
+
"internalType": "uint256",
|
|
86
|
+
"name": "",
|
|
87
|
+
"type": "uint256"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"stateMutability": "view",
|
|
91
|
+
"type": "function"
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"transactionHash": "0x02b383c440a82076b2cfa8a678c8ef2c204e6c954f73d867d09613edee230c62",
|
|
95
|
+
"receipt": {
|
|
96
|
+
"to": null,
|
|
97
|
+
"from": "0x2816CB0001234d2539999730E8A9CD65D7f7212b",
|
|
98
|
+
"contractAddress": "0xDC4861F5Ad18bD584Eab322cc6706e632E9D1c94",
|
|
99
|
+
"transactionIndex": 64,
|
|
100
|
+
"gasUsed": "348136",
|
|
101
|
+
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
102
|
+
"blockHash": "0x6ecf6fcb1744d64abc54df51de6dc21b1cd93553a0466226be4b4641c34625ec",
|
|
103
|
+
"transactionHash": "0x02b383c440a82076b2cfa8a678c8ef2c204e6c954f73d867d09613edee230c62",
|
|
104
|
+
"logs": [],
|
|
105
|
+
"blockNumber": 21729492,
|
|
106
|
+
"cumulativeGasUsed": "5817927",
|
|
107
|
+
"status": 1,
|
|
108
|
+
"byzantium": true
|
|
109
|
+
},
|
|
110
|
+
"args": [
|
|
111
|
+
"0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD",
|
|
112
|
+
"0xdC035D45d973E3EC169d2276DDab16f1e407384F",
|
|
113
|
+
"0xd2ce3fb018805ef92b8C5976cb31F84b4E295F94"
|
|
114
|
+
],
|
|
115
|
+
"numDeployments": 1,
|
|
116
|
+
"solcInputHash": "c3eebb33ec692fad160aed655c5e5531",
|
|
117
|
+
"metadata": "{\"compiler\":{\"version\":\"0.8.25+commit.b61c2a91\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"correlatedToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"underlyingToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"resilientOracle\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[],\"name\":\"InvalidTokenAddress\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroAddressNotAllowed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CORRELATED_TOKEN\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"RESILIENT_ORACLE\",\"outputs\":[{\"internalType\":\"contract OracleInterface\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNDERLYING_TOKEN\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"asset\",\"type\":\"address\"}],\"name\":\"getPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Venus\",\"kind\":\"dev\",\"methods\":{\"constructor\":{\"custom:oz-upgrades-unsafe-allow\":\"constructor\"},\"getPrice(address)\":{\"params\":{\"asset\":\"Address of the correlated token\"},\"returns\":{\"_0\":\"price The price of the correlated token in scaled decimal places\"}}},\"title\":\"ERC4626Oracle\",\"version\":1},\"userdoc\":{\"errors\":{\"InvalidTokenAddress()\":[{\"notice\":\"Thrown if the token address is invalid\"}],\"ZeroAddressNotAllowed()\":[{\"notice\":\"Thrown if the supplied address is a zero address where it is not allowed\"}]},\"kind\":\"user\",\"methods\":{\"CORRELATED_TOKEN()\":{\"notice\":\"Address of the correlated token\"},\"RESILIENT_ORACLE()\":{\"notice\":\"Address of Resilient Oracle\"},\"UNDERLYING_TOKEN()\":{\"notice\":\"Address of the underlying token\"},\"constructor\":{\"notice\":\"Constructor for the implementation contract.\"},\"getPrice(address)\":{\"notice\":\"Fetches the price of the correlated token\"}},\"notice\":\"This oracle fetches the price of ERC4626 tokens\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/oracles/ERC4626Oracle.sol\":\"ERC4626Oracle\"},\"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 (last updated v4.9.0) (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 Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the 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 `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 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 `from` to `to` 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(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"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\"},\"@venusprotocol/solidity-utilities/contracts/constants.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\n/// @dev Base unit for computations, usually used in scaling (multiplications, divisions)\\nuint256 constant EXP_SCALE = 1e18;\\n\\n/// @dev A unit (literal one) in EXP_SCALE, usually used in additions/subtractions\\nuint256 constant MANTISSA_ONE = EXP_SCALE;\\n\\n/// @dev The approximate number of seconds per year\\nuint256 constant SECONDS_PER_YEAR = 31_536_000;\\n\",\"keccak256\":\"0x14de93ead464da249af31bea0e3bcfb62ec693bea3475fb4d90f055ac81dc5eb\",\"license\":\"BSD-3-Clause\"},\"@venusprotocol/solidity-utilities/contracts/validators.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\n/// @notice Thrown if the supplied address is a zero address where it is not allowed\\nerror ZeroAddressNotAllowed();\\n\\n/// @notice Thrown if the supplied value is 0 where it is not allowed\\nerror ZeroValueNotAllowed();\\n\\n/// @notice Checks if the provided address is nonzero, reverts otherwise\\n/// @param address_ Address to check\\n/// @custom:error ZeroAddressNotAllowed is thrown if the provided address is a zero address\\nfunction ensureNonzeroAddress(address address_) pure {\\n if (address_ == address(0)) {\\n revert ZeroAddressNotAllowed();\\n }\\n}\\n\\n/// @notice Checks if the provided value is nonzero, reverts otherwise\\n/// @param value_ Value to check\\n/// @custom:error ZeroValueNotAllowed is thrown if the provided value is 0\\nfunction ensureNonzeroValue(uint256 value_) pure {\\n if (value_ == 0) {\\n revert ZeroValueNotAllowed();\\n }\\n}\\n\",\"keccak256\":\"0xdb88e14d50dd21889ca3329d755673d022c47e8da005b6a545c7f69c2c4b7b86\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/IERC4626.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\ninterface IERC4626 {\\n function convertToAssets(uint256 shares) external view returns (uint256);\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x7f2096f62d52d5f4db07dce231fc37d7ce25f7aecf4245cc03da87002d3038ff\",\"license\":\"BSD-3-Clause\"},\"contracts/interfaces/OracleInterface.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity ^0.8.25;\\n\\ninterface OracleInterface {\\n function getPrice(address asset) external view returns (uint256);\\n}\\n\\ninterface ResilientOracleInterface is OracleInterface {\\n function updatePrice(address vToken) external;\\n\\n function updateAssetPrice(address asset) external;\\n\\n function getUnderlyingPrice(address vToken) external view returns (uint256);\\n}\\n\\ninterface TwapInterface is OracleInterface {\\n function updateTwap(address asset) external returns (uint256);\\n}\\n\\ninterface BoundValidatorInterface {\\n function validatePriceWithAnchorPrice(\\n address asset,\\n uint256 reporterPrice,\\n uint256 anchorPrice\\n ) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x2432799b0d824fc701beb4c30146e912b9aeecf77b5c1635dde6c5fbe6bfc3a7\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/ERC4626Oracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { IERC4626 } from \\\"../interfaces/IERC4626.sol\\\";\\nimport { CorrelatedTokenOracle } from \\\"./common/CorrelatedTokenOracle.sol\\\";\\nimport { EXP_SCALE } from \\\"@venusprotocol/solidity-utilities/contracts/constants.sol\\\";\\n\\n/**\\n * @title ERC4626Oracle\\n * @author Venus\\n * @notice This oracle fetches the price of ERC4626 tokens\\n */\\ncontract ERC4626Oracle is CorrelatedTokenOracle {\\n /// @notice Constructor for the implementation contract.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(\\n address correlatedToken,\\n address underlyingToken,\\n address resilientOracle\\n ) CorrelatedTokenOracle(correlatedToken, underlyingToken, resilientOracle) {}\\n\\n /**\\n * @notice Fetches the amount of underlying token for 1 correlated token\\n * @return amount The amount of underlying token for correlated token\\n */\\n function _getUnderlyingAmount() internal view override returns (uint256) {\\n return IERC4626(CORRELATED_TOKEN).convertToAssets(EXP_SCALE);\\n }\\n}\\n\",\"keccak256\":\"0xc2e277e08d0974f56a947abd4d78478ae9c4977eeceb87f19a768089496ba58b\",\"license\":\"BSD-3-Clause\"},\"contracts/oracles/common/CorrelatedTokenOracle.sol\":{\"content\":\"// SPDX-License-Identifier: BSD-3-Clause\\npragma solidity 0.8.25;\\n\\nimport { OracleInterface } from \\\"../../interfaces/OracleInterface.sol\\\";\\nimport { ensureNonzeroAddress } from \\\"@venusprotocol/solidity-utilities/contracts/validators.sol\\\";\\nimport { IERC20Metadata } from \\\"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol\\\";\\n\\n/**\\n * @title CorrelatedTokenOracle\\n * @notice This oracle fetches the price of a token that is correlated to another token.\\n */\\nabstract contract CorrelatedTokenOracle is OracleInterface {\\n /// @notice Address of the correlated token\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable CORRELATED_TOKEN;\\n\\n /// @notice Address of the underlying token\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n address public immutable UNDERLYING_TOKEN;\\n\\n /// @notice Address of Resilient Oracle\\n /// @custom:oz-upgrades-unsafe-allow state-variable-immutable\\n OracleInterface public immutable RESILIENT_ORACLE;\\n\\n /// @notice Thrown if the token address is invalid\\n error InvalidTokenAddress();\\n\\n /// @notice Constructor for the implementation contract.\\n /// @custom:oz-upgrades-unsafe-allow constructor\\n constructor(address correlatedToken, address underlyingToken, address resilientOracle) {\\n ensureNonzeroAddress(correlatedToken);\\n ensureNonzeroAddress(underlyingToken);\\n ensureNonzeroAddress(resilientOracle);\\n CORRELATED_TOKEN = correlatedToken;\\n UNDERLYING_TOKEN = underlyingToken;\\n RESILIENT_ORACLE = OracleInterface(resilientOracle);\\n }\\n\\n /**\\n * @notice Fetches the price of the correlated token\\n * @param asset Address of the correlated token\\n * @return price The price of the correlated token in scaled decimal places\\n */\\n function getPrice(address asset) external view override returns (uint256) {\\n if (asset != CORRELATED_TOKEN) revert InvalidTokenAddress();\\n\\n // get underlying token amount for 1 correlated token scaled by underlying token decimals\\n uint256 underlyingAmount = _getUnderlyingAmount();\\n\\n // oracle returns (36 - asset decimal) scaled price\\n uint256 underlyingUSDPrice = RESILIENT_ORACLE.getPrice(UNDERLYING_TOKEN);\\n\\n IERC20Metadata token = IERC20Metadata(CORRELATED_TOKEN);\\n uint256 decimals = token.decimals();\\n\\n // underlyingAmount (for 1 correlated token) * underlyingUSDPrice / decimals(correlated token)\\n return (underlyingAmount * underlyingUSDPrice) / (10 ** decimals);\\n }\\n\\n /**\\n * @notice Gets the underlying amount for correlated token\\n * @return underlyingAmount Amount of underlying token\\n */\\n function _getUnderlyingAmount() internal view virtual returns (uint256);\\n}\\n\",\"keccak256\":\"0x7053239c18747f7439e025cd4aab629f78dd6dbaadeedacf2393d74c4db317ca\",\"license\":\"BSD-3-Clause\"}},\"version\":1}",
|
|
118
|
+
"bytecode": "0x60e060405234801561001057600080fd5b5060405161068c38038061068c83398101604081905261002f916100b4565b82828261003b8361006e565b6100448261006e565b61004d8161006e565b6001600160a01b0392831660805290821660a0521660c052506100f7915050565b6001600160a01b038116610095576040516342bcdf7f60e11b815260040160405180910390fd5b50565b80516001600160a01b03811681146100af57600080fd5b919050565b6000806000606084860312156100c957600080fd5b6100d284610098565b92506100e060208501610098565b91506100ee60408501610098565b90509250925092565b60805160a05160c0516105466101466000396000818160e201526101a70152600081816056015261017901526000818160bb015281816101080152818161021801526102eb01526105466000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c806329db1be61461005157806341976e091461009557806369818a35146100b6578063a4edcd4c146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a86100a3366004610363565b610104565b60405190815260200161008c565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461015857604051630f58058360e11b815260040160405180910390fd5b60006101626102cb565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa1580156101ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102129190610393565b905060007f000000000000000000000000000000000000000000000000000000000000000090506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029d91906103ac565b60ff1690506102ad81600a6104cb565b6102b784866104d7565b6102c191906104ee565b9695505050505050565b6040516303d1689d60e11b8152670de0b6b3a764000060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307a2d13a90602401602060405180830381865afa15801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035e9190610393565b905090565b60006020828403121561037557600080fd5b81356001600160a01b038116811461038c57600080fd5b9392505050565b6000602082840312156103a557600080fd5b5051919050565b6000602082840312156103be57600080fd5b815160ff8116811461038c57600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610420578160001904821115610406576104066103cf565b8085161561041357918102915b93841c93908002906103ea565b509250929050565b600082610437575060016104c5565b81610444575060006104c5565b816001811461045a576002811461046457610480565b60019150506104c5565b60ff841115610475576104756103cf565b50506001821b6104c5565b5060208310610133831016604e8410600b84101617156104a3575081810a6104c5565b6104ad83836103e5565b80600019048211156104c1576104c16103cf565b0290505b92915050565b600061038c8383610428565b80820281158282048414176104c5576104c56103cf565b60008261050b57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220227ff6f64f41f89e2c4931ef5b92793800c1b8abbe44792f97766fc15438e4c164736f6c63430008190033",
|
|
119
|
+
"deployedBytecode": "0x608060405234801561001057600080fd5b506004361061004c5760003560e01c806329db1be61461005157806341976e091461009557806369818a35146100b6578063a4edcd4c146100dd575b600080fd5b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100a86100a3366004610363565b610104565b60405190815260200161008c565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b6100787f000000000000000000000000000000000000000000000000000000000000000081565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03161461015857604051630f58058360e11b815260040160405180910390fd5b60006101626102cb565b6040516341976e0960e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301529192506000917f000000000000000000000000000000000000000000000000000000000000000016906341976e0990602401602060405180830381865afa1580156101ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102129190610393565b905060007f000000000000000000000000000000000000000000000000000000000000000090506000816001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa158015610279573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061029d91906103ac565b60ff1690506102ad81600a6104cb565b6102b784866104d7565b6102c191906104ee565b9695505050505050565b6040516303d1689d60e11b8152670de0b6b3a764000060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906307a2d13a90602401602060405180830381865afa15801561033a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035e9190610393565b905090565b60006020828403121561037557600080fd5b81356001600160a01b038116811461038c57600080fd5b9392505050565b6000602082840312156103a557600080fd5b5051919050565b6000602082840312156103be57600080fd5b815160ff8116811461038c57600080fd5b634e487b7160e01b600052601160045260246000fd5b600181815b80851115610420578160001904821115610406576104066103cf565b8085161561041357918102915b93841c93908002906103ea565b509250929050565b600082610437575060016104c5565b81610444575060006104c5565b816001811461045a576002811461046457610480565b60019150506104c5565b60ff841115610475576104756103cf565b50506001821b6104c5565b5060208310610133831016604e8410600b84101617156104a3575081810a6104c5565b6104ad83836103e5565b80600019048211156104c1576104c16103cf565b0290505b92915050565b600061038c8383610428565b80820281158282048414176104c5576104c56103cf565b60008261050b57634e487b7160e01b600052601260045260246000fd5b50049056fea2646970667358221220227ff6f64f41f89e2c4931ef5b92793800c1b8abbe44792f97766fc15438e4c164736f6c63430008190033",
|
|
120
|
+
"devdoc": {
|
|
121
|
+
"author": "Venus",
|
|
122
|
+
"kind": "dev",
|
|
123
|
+
"methods": {
|
|
124
|
+
"constructor": {
|
|
125
|
+
"custom:oz-upgrades-unsafe-allow": "constructor"
|
|
126
|
+
},
|
|
127
|
+
"getPrice(address)": {
|
|
128
|
+
"params": {
|
|
129
|
+
"asset": "Address of the correlated token"
|
|
130
|
+
},
|
|
131
|
+
"returns": {
|
|
132
|
+
"_0": "price The price of the correlated token in scaled decimal places"
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
"title": "ERC4626Oracle",
|
|
137
|
+
"version": 1
|
|
138
|
+
},
|
|
139
|
+
"userdoc": {
|
|
140
|
+
"errors": {
|
|
141
|
+
"InvalidTokenAddress()": [
|
|
142
|
+
{
|
|
143
|
+
"notice": "Thrown if the token address is invalid"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"ZeroAddressNotAllowed()": [
|
|
147
|
+
{
|
|
148
|
+
"notice": "Thrown if the supplied address is a zero address where it is not allowed"
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"kind": "user",
|
|
153
|
+
"methods": {
|
|
154
|
+
"CORRELATED_TOKEN()": {
|
|
155
|
+
"notice": "Address of the correlated token"
|
|
156
|
+
},
|
|
157
|
+
"RESILIENT_ORACLE()": {
|
|
158
|
+
"notice": "Address of Resilient Oracle"
|
|
159
|
+
},
|
|
160
|
+
"UNDERLYING_TOKEN()": {
|
|
161
|
+
"notice": "Address of the underlying token"
|
|
162
|
+
},
|
|
163
|
+
"constructor": {
|
|
164
|
+
"notice": "Constructor for the implementation contract."
|
|
165
|
+
},
|
|
166
|
+
"getPrice(address)": {
|
|
167
|
+
"notice": "Fetches the price of the correlated token"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"notice": "This oracle fetches the price of ERC4626 tokens",
|
|
171
|
+
"version": 1
|
|
172
|
+
},
|
|
173
|
+
"storageLayout": {
|
|
174
|
+
"storage": [],
|
|
175
|
+
"types": null
|
|
176
|
+
}
|
|
177
|
+
}
|