TermRepoToken.sol

This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment. This is an ERC-20 contract to track claims to the aggregate repurchase obligations due on the r

TermRepoToken

This is an ERC-20 contract to track claims to the aggregate repurchase obligations due on the repurchase date across all borrowers to a Term Repo

This contract belongs to the Term Servicer group of contracts and is specific to a Term Repo deployment

ADMIN_ROLE

bytes32 ADMIN_ROLE

DEVOPS_ROLE

bytes32 DEVOPS_ROLE

MINTER_ROLE

bytes32 MINTER_ROLE

BURNER_ROLE

bytes32 BURNER_ROLE

INITIALIZER_ROLE

bytes32 INITIALIZER_ROLE

decimalPlaces

uint8 decimalPlaces

termContractPaired

bool termContractPaired

mintingPaused

bool mintingPaused

burningPaused

bool burningPaused

redemptionValue

uint256 redemptionValue

The number of purchase tokens redeemable

termRepoId

bytes32 termRepoId

mintExposureCap

uint256 mintExposureCap

config

struct TermRepoTokenConfig config

emitter

contract ITermEventEmitter emitter

whileMintingNotPaused

modifier whileMintingNotPaused()

whileBurningNotPaused

modifier whileBurningNotPaused()

notTermContractPaired

modifier notTermContractPaired()

constructor

constructor() public

initialize

function initialize(string termRepoId_, string name_, string symbol_, uint8 decimalPlaces_, uint256 redemptionValue_, uint256 mintExposureCap_, address termInitializer_, struct TermRepoTokenConfig config_) external

pairTermContracts

function pairTermContracts(address termRepoServicer_, contract ITermEventEmitter emitter_, address devopsMultisig_, address adminWallet_) external

resetMintExposureCap

function resetMintExposureCap(uint256 mintExposureCap_) external

totalRedemptionValue

function totalRedemptionValue() external view returns (uint256)

Calculates the total USD redemption value of all outstanding TermRepoTokens

Return Values

Name
Type
Description

[0]

uint256

totalRedemptionValue The total redemption value of TermRepoTokens in USD

burn

function burn(address account, uint256 amount) external

Burns TermRepoTokens held by an account Reverts if caller does not have BURNER_ROLE

Parameters

Name
Type
Description

account

address

The address of account holding TermRepoTokens to burn

amount

uint256

The amount of TermRepoTokens to burn without decimal factor

burnAndReturnValue

function burnAndReturnValue(address account, uint256 amount) external returns (uint256)

Burns TermRepoTokens held by an account and returns purchase redemption value of tokens burned Reverts if caller does not have BURNER_ROLE

Parameters

Name
Type
Description

account

address

The address of account holding TermRepoTokens to burn

amount

uint256

The amount of TermRepoTokens to burn without decimal factor

Return Values

Name
Type
Description

[0]

uint256

totalRedemptionValue Total redemption value of TermRepoTokens burned

mintRedemptionValue

function mintRedemptionValue(address account, uint256 redemptionAmount) external returns (uint256)

Mints TermRepoTokens in an amount equal to caller specified target redemption amount The redemptionValue is the amount of purchase tokens redeemable per unit of TermRepoToken Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

account

address

The address of account to mint TermRepoTokens to

redemptionAmount

uint256

The target redemption amount to mint in TermRepoTokens

Return Values

Name
Type
Description

[0]

uint256

numTokens The amount of Term Repo Tokens minted

mintTokens

function mintTokens(address account, uint256 numTokens) external returns (uint256)

Mints an exact amount of TermRepoTokens Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

account

address

The address of account to mint TermRepoTokens to

numTokens

uint256

The exact number of term repo tokens to mint

decrementMintExposureCap

function decrementMintExposureCap(uint256 supplyMinted) external

Decrements the mintExposureCap Reverts if caller does not have MINTER_ROLE

Parameters

Name
Type
Description

supplyMinted

uint256

The number of Tokens Minted

decimals

function decimals() public view virtual returns (uint8)

Return Values

Name
Type
Description

[0]

uint8

uint8 A uint8 that specifies how many decimal places a token has

pauseMinting

function pauseMinting() external

unpauseMinting

function unpauseMinting() external

pauseBurning

function pauseBurning() external

unpauseBurning

function unpauseBurning() external

_authorizeUpgrade

function _authorizeUpgrade(address impl) internal

required override by the OpenZeppelin UUPS module

Parameters

Name
Type
Description

impl

address

new impl address for proxy upgrade

Last updated