TermController.sol

This contract operates at the protocol level and governs all instances of a Term Repo. This contract manages Term Finance protocol permissions and controls

TermController

This contract manages Term Finance protocol permissions and controls

This contract operates at the protocol level and governs all instances of a Term Repo

ADMIN_ROLE

bytes32 ADMIN_ROLE

AUCTION_ROLE

bytes32 AUCTION_ROLE

CONTROLLER_ADMIN_ROLE

bytes32 CONTROLLER_ADMIN_ROLE

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

INITIALIZER_ROLE

bytes32 INITIALIZER_ROLE

SPECIALIST_ROLE

bytes32 SPECIALIST_ROLE

treasuryWallet

address treasuryWallet

protocolReserveWallet

address protocolReserveWallet

termAddresses

mapping(address => bool) termAddresses

termAuctionResults

mapping(bytes32 => struct TermAuctionResults) termAuctionResults

constructor

constructor() public

initialize

function initialize(address treasuryWallet_, address protocolReserveWallet_, address controllerAdminWallet_, address devopsWallet_, address adminWallet_) external

pairInitializer

function pairInitializer(address initializer) external

pairAuction

function pairAuction(address auction) external

Initializer function to pair a new Term Auction with the controller

Parameters

NameTypeDescription

auction

address

new auction address

getTreasuryAddress

function getTreasuryAddress() external view returns (address)

External view function which returns contract address of treasury wallet

getProtocolReserveAddress

function getProtocolReserveAddress() external view returns (address)

External view function which returns contract address of protocol reserve

Return Values

NameTypeDescription

[0]

address

The protocol reserve address

getTermAuctionResults

function getTermAuctionResults(bytes32 termRepoId) external view returns (struct AuctionMetadata[] auctionMetadata, uint8 numOfAuctions)

Returns history of all completed auctions within a term

Parameters

NameTypeDescription

termRepoId

bytes32

term repo id to look up

isTermDeployed

function isTermDeployed(address contractAddress) external view returns (bool)

External view function which returns whether contract address is deployed by Term Finance Protocol

Parameters

NameTypeDescription

contractAddress

address

The input contract address to query

Return Values

NameTypeDescription

[0]

bool

Whether the given address is deployed by Term Finance Protocol

verifyMintExposureAccess

function verifyMintExposureAccess(address authedUser) external view returns (bool)

Parameters

NameTypeDescription

authedUser

address

The address of user to check access for mint exposure

updateTreasuryAddress

function updateTreasuryAddress(address newTreasuryWallet) external

Admin function to update the Term Finance treasury wallet address

Parameters

NameTypeDescription

newTreasuryWallet

address

The new treasury address

updateProtocolReserveAddress

function updateProtocolReserveAddress(address newProtocolReserveWallet) external

Admin function to update the Term Finance protocol reserve wallet address

Parameters

NameTypeDescription

newProtocolReserveWallet

address

The new protocol reserve wallet address

updateControllerAdminWallet

function updateControllerAdminWallet(address oldControllerAdminWallet, address newControllerAdminWallet) external

Admin function to update the designated controller admin wallet that calls markTermDeployed

Parameters

NameTypeDescription

oldControllerAdminWallet

address

The current controller admin wallet to revoke permissions for

newControllerAdminWallet

address

The new controller admin wallet to grant permissions for

markTermDeployed

function markTermDeployed(address termContract) external

Admin function to add a new Term Finance contract to Controller

Parameters

NameTypeDescription

termContract

address

The new term contract address

unmarkTermDeployed

function unmarkTermDeployed(address termContract) external

Admin function to remove a contract from Controller

Parameters

NameTypeDescription

termContract

address

The new term contract address

grantMintExposureAccess

function grantMintExposureAccess(address authedUser) external

Parameters

NameTypeDescription

authedUser

address

The address of user granted access to create mint exposure

revokeMintExposureAccess

function revokeMintExposureAccess(address revokedUser) external

Parameters

NameTypeDescription

revokedUser

address

The address of user to revoke access to create mint exposure

recordAuctionResult

function recordAuctionResult(bytes32 termRepoId, bytes32 termAuctionId, uint256 auctionClearingRate) external

_authorizeUpgrade

function _authorizeUpgrade(address) internal view

required override by the OpenZeppelin UUPS module

Last updated