Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xcC46FC6a...FCC965B9C The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PendleTerminalExternalCapV2
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 1000000 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../../../../interfaces/IPTokenWithSupplyCap.sol";
import "../../../../interfaces/Terminal/ITerminalFeed.sol";
import "../../../../interfaces/Terminal/ITerminalGenericVault.sol";
interface IPTerminalSYScaled18 {
function terminalDepositVault() external view returns (address);
function vaultTokenIn() external view returns (address);
}
contract PendleTerminalExternalCapV2 is IPTokenWithSupplyCap {
address public immutable sy;
address public immutable terminalDepositVault;
address public immutable vaultTokenIn;
address public immutable mToken;
constructor(address _sy) {
sy = _sy;
terminalDepositVault = IPTerminalSYScaled18(_sy).terminalDepositVault();
vaultTokenIn = IPTerminalSYScaled18(_sy).vaultTokenIn();
mToken = ITerminalGenericVault(terminalDepositVault).mToken();
}
function getAbsoluteSupplyCap() external view returns (uint256) {
return ITerminalGenericVault(terminalDepositVault).maxSupplyCap();
}
function getAbsoluteTotalSupply() external view returns (uint256) {
return IERC20(mToken).totalSupply();
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface IPTokenWithSupplyCap {
function getAbsoluteSupplyCap() external view returns (uint256);
function getAbsoluteTotalSupply() external view returns (uint256);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface ITerminalFeed {
function getDataInBase18() external view returns (uint256 answer);
}// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;
interface ITerminalGenericVault {
struct TokenConfig {
address dataFeed;
uint256 fee;
uint256 allowance;
bool stable;
}
function mToken() external view returns (address);
function mTokenDataFeed() external view returns (address);
function tokensConfig(address token) external view returns (TokenConfig memory);
function instantFee() external view returns (uint256);
function waivedFeeRestriction(address account) external view returns (bool);
function maxSupplyCap() external view returns (uint256);
}{
"optimizer": {
"enabled": true,
"runs": 1000000
},
"viaIR": true,
"evmVersion": "shanghai",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_sy","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"getAbsoluteSupplyCap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAbsoluteTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"terminalDepositVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vaultTokenIn","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
0x610100604090808252346101835761002d9061062f80380380916100238285610187565b83398101906101be565b60808190528151637051b22f60e01b81526020916001600160a01b0391908216908381600481855afa9182156101795760049285925f9161015c575b5060a05285516397e8fddb60e01b815292839182905afa9182156101525760049284925f91610135575b5060c05260a0511684519283809263c3b6f93960e01b82525afa91821561012b575f926100fe575b505060e0525161045190816101de8239608051816102e1015260a0518181816102730152610374015260c0518161011b015260e05181818160a901526101b10152f35b61011d9250803d10610124575b6101158183610187565b8101906101be565b5f806100bb565b503d61010b565b83513d5f823e3d90fd5b61014c9150833d8511610124576101158183610187565b5f610093565b84513d5f823e3d90fd5b6101739150833d8511610124576101158183610187565b5f610069565b85513d5f823e3d90fd5b5f80fd5b601f909101601f19168101906001600160401b038211908210176101aa57604052565b634e487b7160e01b5f52604160045260245ffd5b9081602091031261018357516001600160a01b0381168103610183579056fe60806040908082526004361015610014575f80fd5b5f3560e01c9081630186533d1461030557508063181cc05b146102975780637051b22f1461022957806380975cc41461013f57806397e8fddb146100d15763c3b6f93914610060575f80fd5b346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b5f80fd5b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd578051907f18160ddd00000000000000000000000000000000000000000000000000000000825260208260048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610220575f916101eb575b6020925051908152f35b90506020823d602011610218575b81610206602093836103ad565b810103126100cd5760209151906101e1565b3d91506101f9565b513d5f823e3d90fd5b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152f35b82346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd577f9d70902f00000000000000000000000000000000000000000000000000000000825260208260048173ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000165afa908115610220575f916101eb576020925051908152f35b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176103ee57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffdfea264697066735822122089fb7485d830199e467d8b5357f71cd842d9b702483b8dce818be76e1ccab15a64736f6c63430008180033000000000000000000000000e770f7ef6c0667dc274194063e23621a82bb0c59
Deployed Bytecode
0x60806040908082526004361015610014575f80fd5b5f3560e01c9081630186533d1461030557508063181cc05b146102975780637051b22f1461022957806380975cc41461013f57806397e8fddb146100d15763c3b6f93914610060575f80fd5b346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a1150cd4a014e06f5e0a6ec9453fe0208da5adab168152f35b5f80fd5b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2168152f35b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd578051907f18160ddd00000000000000000000000000000000000000000000000000000000825260208260048173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000a1150cd4a014e06f5e0a6ec9453fe0208da5adab165afa908115610220575f916101eb575b6020925051908152f35b90506020823d602011610218575b81610206602093836103ad565b810103126100cd5760209151906101e1565b3d91506101f9565b513d5f823e3d90fd5b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c93bb8d5581d74272f0e304593af9ab4e3a0181b168152f35b50346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd576020905173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e770f7ef6c0667dc274194063e23621a82bb0c59168152f35b82346100cd575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc3601126100cd577f9d70902f00000000000000000000000000000000000000000000000000000000825260208260048173ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000c93bb8d5581d74272f0e304593af9ab4e3a0181b165afa908115610220575f916101eb576020925051908152f35b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff8211176103ee57604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffdfea264697066735822122089fb7485d830199e467d8b5357f71cd842d9b702483b8dce818be76e1ccab15a64736f6c63430008180033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.