Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
AnglesLiquidVaultRateProvider
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 100 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >0.8.0; import {IRateProvider} from "../IRateProvider.sol"; import {IERC4626RateProvider} from "./IERC4626RateProvider.sol"; contract AnglesLiquidVaultRateProvider is IRateProvider { error RateProvider__InvalidParam(); uint256 immutable PRECISION = 1e18; address immutable WRAPPED_ANGLES_S = 0xfA85Fe5A8F5560e9039C04f2b0a90dE1415aBD70; address immutable WRAPPED_S = 0x039e2fB66102314Ce7b64Ce5Ce3E5183bc94aD38; address immutable WRAPPED_ANGLES_S_RATE_PROVIDER = 0x2d087C0999223997b77cc33BE5E7E8eC79396cea; /// @dev hardcode price of WRAPPED_S to PRECISION function rate(address token) external view returns (uint256) { if (token == WRAPPED_S) { return PRECISION; } else if (token == WRAPPED_ANGLES_S) { return IERC4626RateProvider(WRAPPED_ANGLES_S_RATE_PROVIDER).getRate(); } else { revert RateProvider__InvalidParam(); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRateProvider { function rate(address token) external view returns (uint256); } /// @dev returns (rate, quote token decimals) interface IRateProviderV2 { function rate(address token) external view returns (uint256, uint8); }
// SPDX-License-Identifier: MIT pragma solidity >0.8.0; interface IERC4626RateProvider { function getRate() external view returns (uint256); }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "ds-test/=lib/openzeppelin-contracts/lib/forge-std/lib/ds-test/src/", "erc4626-tests/=lib/erc4626-tests/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "solady/=lib/solady/src/", "halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/" ], "optimizer": { "enabled": true, "runs": 100 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"name":"RateProvider__InvalidParam","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"rate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610100806040523461008b57670de0b6b3a764000060805273fa85fe5a8f5560e9039c04f2b0a90de1415abd7060a05273039e2fb66102314ce7b64ce5ce3e5183bc94ad3860c052732d087c0999223997b77cc33be5e7e8ec79396cea60e0526101e090816100908239608051816096015260a0518160ba015260c05181606d015260e0518160fc0152f35b5f80fdfe60806040526004361015610011575f80fd5b5f3560e01c630ba9d8ca14610024575f80fd5b3461005b57602036600319011261005b576004356001600160a01b038116810361005b5761005360209161005f565b604051908152f35b5f80fd5b6001600160a01b03908116907f00000000000000000000000000000000000000000000000000000000000000001681036100b857507f000000000000000000000000000000000000000000000000000000000000000090565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03160361019b576040516333cd77e760e11b81526020816004817f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03165afa908115610190575f91610137575090565b905060203d602011610189575b601f8101601f1916820167ffffffffffffffff8111838210176101755760209183916040528101031261005b575190565b634e487b7160e01b5f52604160045260245ffd5b503d610144565b6040513d5f823e3d90fd5b6338a3c0cf60e01b5f5260045ffdfea26469706673582212200b46974df751e9f8536cba7f06ffd0a623b1256578925e0294bcfe3c5cfd982064736f6c634300081a0033
Deployed Bytecode
0x60806040526004361015610011575f80fd5b5f3560e01c630ba9d8ca14610024575f80fd5b3461005b57602036600319011261005b576004356001600160a01b038116810361005b5761005360209161005f565b604051908152f35b5f80fd5b6001600160a01b03908116907f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad381681036100b857507f0000000000000000000000000000000000000000000000000de0b6b3a764000090565b7f000000000000000000000000fa85fe5a8f5560e9039c04f2b0a90de1415abd706001600160a01b03160361019b576040516333cd77e760e11b81526020816004817f0000000000000000000000002d087c0999223997b77cc33be5e7e8ec79396cea6001600160a01b03165afa908115610190575f91610137575090565b905060203d602011610189575b601f8101601f1916820167ffffffffffffffff8111838210176101755760209183916040528101031261005b575190565b634e487b7160e01b5f52604160045260245ffd5b503d610144565b6040513d5f823e3d90fd5b6338a3c0cf60e01b5f5260045ffdfea26469706673582212200b46974df751e9f8536cba7f06ffd0a623b1256578925e0294bcfe3c5cfd982064736f6c634300081a0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.