Source Code
Cross-Chain Transactions
Loading...
Loading
Contract Name:
TermDiscountRateAdapter
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
No with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
import {ITermDiscountRateAdapter} from "./interface/ITermDiscountRateAdapter.sol";
import {ITermController, AuctionMetadata} from "./interface/ITermController.sol";
import {ITermRepoToken} from "./interface/ITermRepoToken.sol";
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
contract TermDiscountRateAdapter is ITermDiscountRateAdapter, AccessControl {
bytes32 public constant ORACLE_ROLE = keccak256("ORACLE_ROLE");
/// @dev Previous term controller
ITermController public prevTermController;
/// @dev Current term controller
ITermController public currTermController;
mapping(address => mapping (bytes32 => bool)) public rateInvalid;
mapping(address => uint256) public repoRedemptionHaircut;
constructor(address termController_, address oracleWallet_) {
currTermController = ITermController(termController_);
_grantRole(ORACLE_ROLE, oracleWallet_);
}
/**
* @notice Retrieves the discount rate for a given repo token
* @param termController The address of the term controller
* @param repoToken The address of the repo token
* @return The discount rate for the specified repo token
* @dev This function fetches the auction results for the repo token's term repo ID
* and returns the clearing rate of the most recent auction
*/
function getDiscountRate(address termController, address repoToken) public view virtual returns (uint256) {
if (repoToken == address(0)) return 0;
if (termController == address(0)) {
return getDiscountRate(repoToken);
}
ITermController tokenTermController;
if (termController == address(prevTermController)) {
tokenTermController = prevTermController;
} else if (termController == address(currTermController)) {
tokenTermController = currTermController;
} else {
revert("Invalid term controller");
}
return _getDiscountRate(tokenTermController, repoToken);
}
/**
* @notice Retrieves the discount rate for a given repo token
* @param repoToken The address of the repo token
* @return The discount rate for the specified repo token
* @dev This function fetches the auction results for the repo token's term repo ID
* and returns the clearing rate of the most recent auction
*/
function getDiscountRate(address repoToken) public view virtual returns (uint256) {
if (repoToken == address(0)) return 0;
ITermController tokenTermController = _identifyTermController(repoToken);
return _getDiscountRate(tokenTermController, repoToken);
}
/**
* @notice Sets the invalidity of the result of a specific auction for a given repo token
* @dev This function is used to mark auction results as invalid or not, typically in cases of suspected manipulation
* @param repoToken The address of the repo token associated with the auction
* @param termAuctionId The unique identifier of the term auction to be invalidated
* @param isInvalid The status of the rate invalidation
* @custom:access Restricted to accounts with the ORACLE_ROLE
*/
function setAuctionRateValidator(
address repoToken,
bytes32 termAuctionId,
bool isInvalid
) external onlyRole(ORACLE_ROLE) {
ITermController tokenTermController = _identifyTermController(repoToken);
// Fetch the auction metadata for the given repo token
(AuctionMetadata[] memory auctionMetadata, ) = tokenTermController.getTermAuctionResults(ITermRepoToken(repoToken).termRepoId());
// Check if the termAuctionId exists in the metadata
bool auctionExists = _validateAuctionExistence(auctionMetadata, termAuctionId);
require(auctionMetadata.length > 1, "Cannot invalidate the only auction result");
// Revert if the auction doesn't exist
require(auctionExists, "Auction ID not found in metadata");
// Update the rate invalidation status
rateInvalid[repoToken][termAuctionId] = isInvalid;
}
/**
* @notice Sets the term controller
* @param termController The address of the term controller
*/
function setTermController(address termController) external onlyRole(ORACLE_ROLE) {
prevTermController = currTermController;
currTermController = ITermController(termController);
}
/**
* @notice Set the repo redemption haircut
* @param repoToken The address of the repo token
* @param haircut The repo redemption haircut in 18 decimals
*/
function setRepoRedemptionHaircut(address repoToken, uint256 haircut) external onlyRole(ORACLE_ROLE) {
repoRedemptionHaircut[repoToken] = haircut;
}
function _identifyTermController(address termRepoToken) internal view returns (ITermController) {
uint8 numOfAuctions;
(,numOfAuctions ) = currTermController.getTermAuctionResults(ITermRepoToken(termRepoToken).termRepoId());
if (numOfAuctions > 0) {
return currTermController;
} else {
if (address(prevTermController) == address(0)) {
revert("Term controller not found");
}
(, numOfAuctions) = prevTermController.getTermAuctionResults(ITermRepoToken(termRepoToken).termRepoId());
if (numOfAuctions > 0) {
return prevTermController;
} else {
revert("Term controller not found");
}
}
}
function _getDiscountRate(ITermController termController, address repoToken) internal view returns (uint256) {
(AuctionMetadata[] memory auctionMetadata, ) = termController.getTermAuctionResults(ITermRepoToken(repoToken).termRepoId());
uint256 len = auctionMetadata.length;
require(len > 0, "No auctions found");
// If there is a re-opening auction, e.g. 2 or more results for the same token
if (len > 1) {
uint256 latestAuctionTime = auctionMetadata[len - 1].auctionClearingBlockTimestamp;
if ((block.timestamp - latestAuctionTime) < 30 minutes) {
for (int256 i = int256(len) - 2; i >= 0; i--) {
if (!rateInvalid[repoToken][auctionMetadata[uint256(i)].termAuctionId]) {
return auctionMetadata[uint256(i)].auctionClearingRate;
}
}
} else {
for (int256 i = int256(len) - 1; i >= 0; i--) {
if (!rateInvalid[repoToken][auctionMetadata[uint256(i)].termAuctionId]) {
return auctionMetadata[uint256(i)].auctionClearingRate;
}
}
}
revert("No valid auction rate found");
}
// If there is only 1 result (not a re-opening) then always return result
return auctionMetadata[0].auctionClearingRate;
}
function _validateAuctionExistence(AuctionMetadata[] memory auctionMetadata, bytes32 termAuctionId) private pure returns(bool auctionExists) {
// Check if the termAuctionId exists in the metadata
for (uint256 i = 0; i < auctionMetadata.length; i++) {
if (auctionMetadata[i].termAuctionId == termAuctionId) {
auctionExists = true;
break;
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;
interface ITermDiscountRateAdapter {
function getDiscountRate(address repoToken) external view returns (uint256);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
struct AuctionMetadata {
bytes32 termAuctionId;
uint256 auctionClearingRate;
uint256 auctionClearingBlockTimestamp;
}
interface ITermController {
function isTermDeployed(address contractAddress) external view returns (bool);
function getTermAuctionResults(bytes32 termRepoId) external view returns (AuctionMetadata[] memory auctionMetadata, uint8 numOfAuctions);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.20;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface ITermRepoToken is IERC20 {
function redemptionValue() external view returns (uint256);
function config() external view returns (
uint256 redemptionTimestamp,
address purchaseToken,
address termRepoServicer,
address termRepoCollateralManager
);
function termRepoId() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```solidity
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```solidity
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC-165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"forge-std/=lib/forge-std/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": false,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "shanghai",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"termController_","type":"address"},{"internalType":"address","name":"oracleWallet_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currTermController","outputs":[{"internalType":"contract ITermController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"repoToken","type":"address"}],"name":"getDiscountRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"termController","type":"address"},{"internalType":"address","name":"repoToken","type":"address"}],"name":"getDiscountRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prevTermController","outputs":[{"internalType":"contract ITermController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"rateInvalid","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"repoRedemptionHaircut","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"repoToken","type":"address"},{"internalType":"bytes32","name":"termAuctionId","type":"bytes32"},{"internalType":"bool","name":"isInvalid","type":"bool"}],"name":"setAuctionRateValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"repoToken","type":"address"},{"internalType":"uint256","name":"haircut","type":"uint256"}],"name":"setRepoRedemptionHaircut","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"termController","type":"address"}],"name":"setTermController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801562000010575f80fd5b50604051620023343803806200233483398181016040528101906200003691906200027b565b8160025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a87f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef182620000b160201b60201c565b505050620002c0565b5f620000c48383620001ac60201b60201c565b620001a25760015f808581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff0219169083151502179055506200013e6200020f60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050620001a6565b5f90505b92915050565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f33905090565b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f62000245826200021a565b9050919050565b620002578162000239565b811462000262575f80fd5b50565b5f8151905062000275816200024c565b92915050565b5f806040838503121562000294576200029362000216565b5b5f620002a38582860162000265565b9250506020620002b68582860162000265565b9150509250929050565b61206680620002ce5f395ff3fe608060405234801561000f575f80fd5b5060043610610109575f3560e01c806343c2935a116100a057806391d148541161006f57806391d14854146102c7578063a217fddf146102f7578063aff518f314610315578063d547741f14610331578063e73a041e1461034d57610109565b806343c2935a1461022d5780636b01d82614610249578063742f03ce146102795780638d35248d1461029757610109565b806331930de9116100dc57806331930de9146101a757806336568abe146101c357806337e935ee146101df57806342a9d1311461020f57610109565b806301ffc9a71461010d57806307e2cea51461013d578063248a9ca31461015b5780632f2ff15d1461018b575b5f80fd5b610127600480360381019061012291906115ae565b61037d565b60405161013491906115f3565b60405180910390f35b6101456103f6565b6040516101529190611624565b60405180910390f35b61017560048036038101906101709190611667565b61041a565b6040516101829190611624565b60405180910390f35b6101a560048036038101906101a091906116ec565b610436565b005b6101c160048036038101906101bc919061175d565b610458565b005b6101dd60048036038101906101d891906116ec565b6104c9565b005b6101f960048036038101906101f4919061179b565b610544565b60405161020691906117d5565b60405180910390f35b610217610559565b6040516102249190611849565b60405180910390f35b6102476004803603810190610242919061188c565b61057e565b005b610263600480360381019061025e919061179b565b61079c565b60405161027091906117d5565b60405180910390f35b6102816107f7565b60405161028e9190611849565b60405180910390f35b6102b160048036038101906102ac91906118dc565b61081c565b6040516102be91906115f3565b60405180910390f35b6102e160048036038101906102dc91906116ec565b610846565b6040516102ee91906115f3565b60405180910390f35b6102ff6108a9565b60405161030c9190611624565b60405180910390f35b61032f600480360381019061032a919061179b565b6108af565b005b61034b600480360381019061034691906116ec565b61097e565b005b6103676004803603810190610362919061191a565b6109a0565b60405161037491906117d5565b60405180910390f35b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103ef57506103ee82610b6a565b5b9050919050565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef181565b5f805f8381526020019081526020015f20600101549050919050565b61043f8261041a565b61044881610bd3565b6104528383610be7565b50505050565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef161048281610bd3565b8160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505050565b6104d1610cd0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610535576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61053f8282610cd7565b505050565b6004602052805f5260405f205f915090505481565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef16105a881610bd3565b5f6105b285610dc0565b90505f8173ffffffffffffffffffffffffffffffffffffffff16637f2fdf488773ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063e919061196c565b6040518263ffffffff1660e01b815260040161065a9190611624565b5f60405180830381865afa158015610674573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061069c9190611b96565b5090505f6106aa8287611117565b905060018251116106f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e790611c70565b60405180910390fd5b80610730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072790611cd8565b60405180910390fd5b8460035f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8881526020019081526020015f205f6101000a81548160ff02191690831515021790555050505050505050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107d8575f90506107f2565b5f6107e283610dc0565b90506107ee818461116d565b9150505b919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6003602052815f5260405f20602052805f5260405f205f915091509054906101000a900460ff1681565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f801b81565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef16108d981610bd3565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6109878261041a565b61099081610bd3565b61099a8383610cd7565b50505050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109dc575f9050610b64565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a1f57610a188261079c565b9050610b64565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610a9d5760015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610b56565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610b1a5760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610b55565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4c90611d40565b60405180910390fd5b5b610b60818461116d565b9150505b92915050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610be481610bdf610cd0565b6114f7565b50565b5f610bf28383610846565b610cc65760015f808581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610c63610cd0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050610cca565b5f90505b92915050565b5f33905090565b5f610ce28383610846565b15610db6575f805f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610d53610cd0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050610dba565b5f90505b92915050565b5f8060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6c919061196c565b6040518263ffffffff1660e01b8152600401610e889190611624565b5f60405180830381865afa158015610ea2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610eca9190611b96565b9050809150505f8160ff161115610f055760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050611112565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8b90611da8565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561101a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103e919061196c565b6040518263ffffffff1660e01b815260040161105a9190611624565b5f60405180830381865afa158015611074573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061109c9190611b96565b9050809150505f8160ff1611156110d75760015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050611112565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110990611da8565b60405180910390fd5b919050565b5f805f90505b8351811015611166578284828151811061113a57611139611dc6565b5b60200260200101515f0151036111535760019150611166565b808061115e90611e20565b91505061111d565b5092915050565b5f808373ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111f8919061196c565b6040518263ffffffff1660e01b81526004016112149190611624565b5f60405180830381865afa15801561122e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906112569190611b96565b5090505f815190505f81116112a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129790611eb1565b60405180910390fd5b60018111156114cd575f826001836112b89190611ecf565b815181106112c9576112c8611dc6565b5b602002602001015160400151905061070881426112e69190611ecf565b10156113c1575f6002836112fa9190611f0b565b90505b5f81126113bb5760035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f85838151811061135557611354611dc6565b5b60200260200101515f015181526020019081526020015f205f9054906101000a900460ff166113a85783818151811061139157611390611dc6565b5b6020026020010151602001519450505050506114f1565b80806113b390611f4b565b9150506112fd565b50611492565b5f6001836113cf9190611f0b565b90505b5f81126114905760035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f85838151811061142a57611429611dc6565b5b60200260200101515f015181526020019081526020015f205f9054906101000a900460ff1661147d5783818151811061146657611465611dc6565b5b6020026020010151602001519450505050506114f1565b808061148890611f4b565b9150506113d2565b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c490611fdc565b60405180910390fd5b815f815181106114e0576114df611dc6565b5b602002602001015160200151925050505b92915050565b6115018282610846565b6115445780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161153b929190612009565b60405180910390fd5b5050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61158d81611559565b8114611597575f80fd5b50565b5f813590506115a881611584565b92915050565b5f602082840312156115c3576115c2611551565b5b5f6115d08482850161159a565b91505092915050565b5f8115159050919050565b6115ed816115d9565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f819050919050565b61161e8161160c565b82525050565b5f6020820190506116375f830184611615565b92915050565b6116468161160c565b8114611650575f80fd5b50565b5f813590506116618161163d565b92915050565b5f6020828403121561167c5761167b611551565b5b5f61168984828501611653565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6116bb82611692565b9050919050565b6116cb816116b1565b81146116d5575f80fd5b50565b5f813590506116e6816116c2565b92915050565b5f806040838503121561170257611701611551565b5b5f61170f85828601611653565b9250506020611720858286016116d8565b9150509250929050565b5f819050919050565b61173c8161172a565b8114611746575f80fd5b50565b5f8135905061175781611733565b92915050565b5f806040838503121561177357611772611551565b5b5f611780858286016116d8565b925050602061179185828601611749565b9150509250929050565b5f602082840312156117b0576117af611551565b5b5f6117bd848285016116d8565b91505092915050565b6117cf8161172a565b82525050565b5f6020820190506117e85f8301846117c6565b92915050565b5f819050919050565b5f61181161180c61180784611692565b6117ee565b611692565b9050919050565b5f611822826117f7565b9050919050565b5f61183382611818565b9050919050565b61184381611829565b82525050565b5f60208201905061185c5f83018461183a565b92915050565b61186b816115d9565b8114611875575f80fd5b50565b5f8135905061188681611862565b92915050565b5f805f606084860312156118a3576118a2611551565b5b5f6118b0868287016116d8565b93505060206118c186828701611653565b92505060406118d286828701611878565b9150509250925092565b5f80604083850312156118f2576118f1611551565b5b5f6118ff858286016116d8565b925050602061191085828601611653565b9150509250929050565b5f80604083850312156119305761192f611551565b5b5f61193d858286016116d8565b925050602061194e858286016116d8565b9150509250929050565b5f815190506119668161163d565b92915050565b5f6020828403121561198157611980611551565b5b5f61198e84828501611958565b91505092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6119e18261199b565b810181811067ffffffffffffffff82111715611a00576119ff6119ab565b5b80604052505050565b5f611a12611548565b9050611a1e82826119d8565b919050565b5f67ffffffffffffffff821115611a3d57611a3c6119ab565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f81519050611a6481611733565b92915050565b5f60608284031215611a7f57611a7e611a52565b5b611a896060611a09565b90505f611a9884828501611958565b5f830152506020611aab84828501611a56565b6020830152506040611abf84828501611a56565b60408301525092915050565b5f611add611ad884611a23565b611a09565b90508083825260208201905060608402830185811115611b0057611aff611a4e565b5b835b81811015611b295780611b158882611a6a565b845260208401935050606081019050611b02565b5050509392505050565b5f82601f830112611b4757611b46611997565b5b8151611b57848260208601611acb565b91505092915050565b5f60ff82169050919050565b611b7581611b60565b8114611b7f575f80fd5b50565b5f81519050611b9081611b6c565b92915050565b5f8060408385031215611bac57611bab611551565b5b5f83015167ffffffffffffffff811115611bc957611bc8611555565b5b611bd585828601611b33565b9250506020611be685828601611b82565b9150509250929050565b5f82825260208201905092915050565b7f43616e6e6f7420696e76616c696461746520746865206f6e6c792061756374695f8201527f6f6e20726573756c740000000000000000000000000000000000000000000000602082015250565b5f611c5a602983611bf0565b9150611c6582611c00565b604082019050919050565b5f6020820190508181035f830152611c8781611c4e565b9050919050565b7f41756374696f6e204944206e6f7420666f756e6420696e206d657461646174615f82015250565b5f611cc2602083611bf0565b9150611ccd82611c8e565b602082019050919050565b5f6020820190508181035f830152611cef81611cb6565b9050919050565b7f496e76616c6964207465726d20636f6e74726f6c6c65720000000000000000005f82015250565b5f611d2a601783611bf0565b9150611d3582611cf6565b602082019050919050565b5f6020820190508181035f830152611d5781611d1e565b9050919050565b7f5465726d20636f6e74726f6c6c6572206e6f7420666f756e64000000000000005f82015250565b5f611d92601983611bf0565b9150611d9d82611d5e565b602082019050919050565b5f6020820190508181035f830152611dbf81611d86565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611e2a8261172a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e5c57611e5b611df3565b5b600182019050919050565b7f4e6f2061756374696f6e7320666f756e640000000000000000000000000000005f82015250565b5f611e9b601183611bf0565b9150611ea682611e67565b602082019050919050565b5f6020820190508181035f830152611ec881611e8f565b9050919050565b5f611ed98261172a565b9150611ee48361172a565b9250828203905081811115611efc57611efb611df3565b5b92915050565b5f819050919050565b5f611f1582611f02565b9150611f2083611f02565b925082820390508181125f8412168282135f851215161715611f4557611f44611df3565b5b92915050565b5f611f5582611f02565b91507f80000000000000000000000000000000000000000000000000000000000000008203611f8757611f86611df3565b5b600182039050919050565b7f4e6f2076616c69642061756374696f6e207261746520666f756e6400000000005f82015250565b5f611fc6601b83611bf0565b9150611fd182611f92565b602082019050919050565b5f6020820190508181035f830152611ff381611fba565b9050919050565b612003816116b1565b82525050565b5f60408201905061201c5f830185611ffa565b6120296020830184611615565b939250505056fea2646970667358221220143e8fda6083b87f33f1ccc624e60c7aec74a92f63b89b041eaf81b981e0e99964736f6c6343000815003300000000000000000000000053838e6d7713cd59e1a01d97b52e412891430ba50000000000000000000000006d3df8d321a47ec2b4463ab0ca75986367c86315
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610109575f3560e01c806343c2935a116100a057806391d148541161006f57806391d14854146102c7578063a217fddf146102f7578063aff518f314610315578063d547741f14610331578063e73a041e1461034d57610109565b806343c2935a1461022d5780636b01d82614610249578063742f03ce146102795780638d35248d1461029757610109565b806331930de9116100dc57806331930de9146101a757806336568abe146101c357806337e935ee146101df57806342a9d1311461020f57610109565b806301ffc9a71461010d57806307e2cea51461013d578063248a9ca31461015b5780632f2ff15d1461018b575b5f80fd5b610127600480360381019061012291906115ae565b61037d565b60405161013491906115f3565b60405180910390f35b6101456103f6565b6040516101529190611624565b60405180910390f35b61017560048036038101906101709190611667565b61041a565b6040516101829190611624565b60405180910390f35b6101a560048036038101906101a091906116ec565b610436565b005b6101c160048036038101906101bc919061175d565b610458565b005b6101dd60048036038101906101d891906116ec565b6104c9565b005b6101f960048036038101906101f4919061179b565b610544565b60405161020691906117d5565b60405180910390f35b610217610559565b6040516102249190611849565b60405180910390f35b6102476004803603810190610242919061188c565b61057e565b005b610263600480360381019061025e919061179b565b61079c565b60405161027091906117d5565b60405180910390f35b6102816107f7565b60405161028e9190611849565b60405180910390f35b6102b160048036038101906102ac91906118dc565b61081c565b6040516102be91906115f3565b60405180910390f35b6102e160048036038101906102dc91906116ec565b610846565b6040516102ee91906115f3565b60405180910390f35b6102ff6108a9565b60405161030c9190611624565b60405180910390f35b61032f600480360381019061032a919061179b565b6108af565b005b61034b600480360381019061034691906116ec565b61097e565b005b6103676004803603810190610362919061191a565b6109a0565b60405161037491906117d5565b60405180910390f35b5f7f7965db0b000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806103ef57506103ee82610b6a565b5b9050919050565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef181565b5f805f8381526020019081526020015f20600101549050919050565b61043f8261041a565b61044881610bd3565b6104528383610be7565b50505050565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef161048281610bd3565b8160045f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505050565b6104d1610cd0565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610535576040517f6697b23200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61053f8282610cd7565b505050565b6004602052805f5260405f205f915090505481565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef16105a881610bd3565b5f6105b285610dc0565b90505f8173ffffffffffffffffffffffffffffffffffffffff16637f2fdf488773ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561061a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061063e919061196c565b6040518263ffffffff1660e01b815260040161065a9190611624565b5f60405180830381865afa158015610674573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061069c9190611b96565b5090505f6106aa8287611117565b905060018251116106f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e790611c70565b60405180910390fd5b80610730576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072790611cd8565b60405180910390fd5b8460035f8973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8881526020019081526020015f205f6101000a81548160ff02191690831515021790555050505050505050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036107d8575f90506107f2565b5f6107e283610dc0565b90506107ee818461116d565b9150505b919050565b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6003602052815f5260405f20602052805f5260405f205f915091509054906101000a900460ff1681565b5f805f8481526020019081526020015f205f015f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16905092915050565b5f801b81565b7f68e79a7bf1e0bc45d0a330c573bc367f9cf464fd326078812f301165fbda4ef16108d981610bd3565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508160025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6109878261041a565b61099081610bd3565b61099a8383610cd7565b50505050565b5f8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036109dc575f9050610b64565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610a1f57610a188261079c565b9050610b64565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610a9d5760015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610b56565b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610b1a5760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050610b55565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4c90611d40565b60405180910390fd5b5b610b60818461116d565b9150505b92915050565b5f7f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b610be481610bdf610cd0565b6114f7565b50565b5f610bf28383610846565b610cc65760015f808581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610c63610cd0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a460019050610cca565b5f90505b92915050565b5f33905090565b5f610ce28383610846565b15610db6575f805f8581526020019081526020015f205f015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f6101000a81548160ff021916908315150217905550610d53610cd0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16847ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a460019050610dba565b5f90505b92915050565b5f8060025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e48573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e6c919061196c565b6040518263ffffffff1660e01b8152600401610e889190611624565b5f60405180830381865afa158015610ea2573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f82011682018060405250810190610eca9190611b96565b9050809150505f8160ff161115610f055760025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050611112565b5f73ffffffffffffffffffffffffffffffffffffffff1660015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1603610f94576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8b90611da8565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561101a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061103e919061196c565b6040518263ffffffff1660e01b815260040161105a9190611624565b5f60405180830381865afa158015611074573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f8201168201806040525081019061109c9190611b96565b9050809150505f8160ff1611156110d75760015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050611112565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110990611da8565b60405180910390fd5b919050565b5f805f90505b8351811015611166578284828151811061113a57611139611dc6565b5b60200260200101515f0151036111535760019150611166565b808061115e90611e20565b91505061111d565b5092915050565b5f808373ffffffffffffffffffffffffffffffffffffffff16637f2fdf488473ffffffffffffffffffffffffffffffffffffffff1663cc5b6e4a6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111d4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111f8919061196c565b6040518263ffffffff1660e01b81526004016112149190611624565b5f60405180830381865afa15801561122e573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906112569190611b96565b5090505f815190505f81116112a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129790611eb1565b60405180910390fd5b60018111156114cd575f826001836112b89190611ecf565b815181106112c9576112c8611dc6565b5b602002602001015160400151905061070881426112e69190611ecf565b10156113c1575f6002836112fa9190611f0b565b90505b5f81126113bb5760035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f85838151811061135557611354611dc6565b5b60200260200101515f015181526020019081526020015f205f9054906101000a900460ff166113a85783818151811061139157611390611dc6565b5b6020026020010151602001519450505050506114f1565b80806113b390611f4b565b9150506112fd565b50611492565b5f6001836113cf9190611f0b565b90505b5f81126114905760035f8773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f85838151811061142a57611429611dc6565b5b60200260200101515f015181526020019081526020015f205f9054906101000a900460ff1661147d5783818151811061146657611465611dc6565b5b6020026020010151602001519450505050506114f1565b808061148890611f4b565b9150506113d2565b505b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c490611fdc565b60405180910390fd5b815f815181106114e0576114df611dc6565b5b602002602001015160200151925050505b92915050565b6115018282610846565b6115445780826040517fe2517d3f00000000000000000000000000000000000000000000000000000000815260040161153b929190612009565b60405180910390fd5b5050565b5f604051905090565b5f80fd5b5f80fd5b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61158d81611559565b8114611597575f80fd5b50565b5f813590506115a881611584565b92915050565b5f602082840312156115c3576115c2611551565b5b5f6115d08482850161159a565b91505092915050565b5f8115159050919050565b6115ed816115d9565b82525050565b5f6020820190506116065f8301846115e4565b92915050565b5f819050919050565b61161e8161160c565b82525050565b5f6020820190506116375f830184611615565b92915050565b6116468161160c565b8114611650575f80fd5b50565b5f813590506116618161163d565b92915050565b5f6020828403121561167c5761167b611551565b5b5f61168984828501611653565b91505092915050565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6116bb82611692565b9050919050565b6116cb816116b1565b81146116d5575f80fd5b50565b5f813590506116e6816116c2565b92915050565b5f806040838503121561170257611701611551565b5b5f61170f85828601611653565b9250506020611720858286016116d8565b9150509250929050565b5f819050919050565b61173c8161172a565b8114611746575f80fd5b50565b5f8135905061175781611733565b92915050565b5f806040838503121561177357611772611551565b5b5f611780858286016116d8565b925050602061179185828601611749565b9150509250929050565b5f602082840312156117b0576117af611551565b5b5f6117bd848285016116d8565b91505092915050565b6117cf8161172a565b82525050565b5f6020820190506117e85f8301846117c6565b92915050565b5f819050919050565b5f61181161180c61180784611692565b6117ee565b611692565b9050919050565b5f611822826117f7565b9050919050565b5f61183382611818565b9050919050565b61184381611829565b82525050565b5f60208201905061185c5f83018461183a565b92915050565b61186b816115d9565b8114611875575f80fd5b50565b5f8135905061188681611862565b92915050565b5f805f606084860312156118a3576118a2611551565b5b5f6118b0868287016116d8565b93505060206118c186828701611653565b92505060406118d286828701611878565b9150509250925092565b5f80604083850312156118f2576118f1611551565b5b5f6118ff858286016116d8565b925050602061191085828601611653565b9150509250929050565b5f80604083850312156119305761192f611551565b5b5f61193d858286016116d8565b925050602061194e858286016116d8565b9150509250929050565b5f815190506119668161163d565b92915050565b5f6020828403121561198157611980611551565b5b5f61198e84828501611958565b91505092915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6119e18261199b565b810181811067ffffffffffffffff82111715611a00576119ff6119ab565b5b80604052505050565b5f611a12611548565b9050611a1e82826119d8565b919050565b5f67ffffffffffffffff821115611a3d57611a3c6119ab565b5b602082029050602081019050919050565b5f80fd5b5f80fd5b5f81519050611a6481611733565b92915050565b5f60608284031215611a7f57611a7e611a52565b5b611a896060611a09565b90505f611a9884828501611958565b5f830152506020611aab84828501611a56565b6020830152506040611abf84828501611a56565b60408301525092915050565b5f611add611ad884611a23565b611a09565b90508083825260208201905060608402830185811115611b0057611aff611a4e565b5b835b81811015611b295780611b158882611a6a565b845260208401935050606081019050611b02565b5050509392505050565b5f82601f830112611b4757611b46611997565b5b8151611b57848260208601611acb565b91505092915050565b5f60ff82169050919050565b611b7581611b60565b8114611b7f575f80fd5b50565b5f81519050611b9081611b6c565b92915050565b5f8060408385031215611bac57611bab611551565b5b5f83015167ffffffffffffffff811115611bc957611bc8611555565b5b611bd585828601611b33565b9250506020611be685828601611b82565b9150509250929050565b5f82825260208201905092915050565b7f43616e6e6f7420696e76616c696461746520746865206f6e6c792061756374695f8201527f6f6e20726573756c740000000000000000000000000000000000000000000000602082015250565b5f611c5a602983611bf0565b9150611c6582611c00565b604082019050919050565b5f6020820190508181035f830152611c8781611c4e565b9050919050565b7f41756374696f6e204944206e6f7420666f756e6420696e206d657461646174615f82015250565b5f611cc2602083611bf0565b9150611ccd82611c8e565b602082019050919050565b5f6020820190508181035f830152611cef81611cb6565b9050919050565b7f496e76616c6964207465726d20636f6e74726f6c6c65720000000000000000005f82015250565b5f611d2a601783611bf0565b9150611d3582611cf6565b602082019050919050565b5f6020820190508181035f830152611d5781611d1e565b9050919050565b7f5465726d20636f6e74726f6c6c6572206e6f7420666f756e64000000000000005f82015250565b5f611d92601983611bf0565b9150611d9d82611d5e565b602082019050919050565b5f6020820190508181035f830152611dbf81611d86565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611e2a8261172a565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611e5c57611e5b611df3565b5b600182019050919050565b7f4e6f2061756374696f6e7320666f756e640000000000000000000000000000005f82015250565b5f611e9b601183611bf0565b9150611ea682611e67565b602082019050919050565b5f6020820190508181035f830152611ec881611e8f565b9050919050565b5f611ed98261172a565b9150611ee48361172a565b9250828203905081811115611efc57611efb611df3565b5b92915050565b5f819050919050565b5f611f1582611f02565b9150611f2083611f02565b925082820390508181125f8412168282135f851215161715611f4557611f44611df3565b5b92915050565b5f611f5582611f02565b91507f80000000000000000000000000000000000000000000000000000000000000008203611f8757611f86611df3565b5b600182039050919050565b7f4e6f2076616c69642061756374696f6e207261746520666f756e6400000000005f82015250565b5f611fc6601b83611bf0565b9150611fd182611f92565b602082019050919050565b5f6020820190508181035f830152611ff381611fba565b9050919050565b612003816116b1565b82525050565b5f60408201905061201c5f830185611ffa565b6120296020830184611615565b939250505056fea2646970667358221220143e8fda6083b87f33f1ccc624e60c7aec74a92f63b89b041eaf81b981e0e99964736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000053838e6d7713cd59e1a01d97b52e412891430ba50000000000000000000000006d3df8d321a47ec2b4463ab0ca75986367c86315
-----Decoded View---------------
Arg [0] : termController_ (address): 0x53838E6d7713Cd59e1a01d97b52e412891430bA5
Arg [1] : oracleWallet_ (address): 0x6D3DF8D321a47ec2b4463Ab0cA75986367c86315
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000053838e6d7713cd59e1a01d97b52e412891430ba5
Arg [1] : 0000000000000000000000006d3df8d321a47ec2b4463ab0ca75986367c86315
Loading...
Loading
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.