Bond
A custom ERC20 token that can be used to issue bonds.The contract handles issuance, payment, conversion, and redemption.
Events
Approval
CollateralWithdraw
Convert
ExcessPaymentWithdraw
Initialized
OwnershipTransferred
Payment
Redeem
TokenSweep
address
from
Transfer
Errors
BondBeforeGracePeriodAndNotPaid
BondPastMaturity
NoPaymentToWithdraw
NotEnoughCollateral
PaymentAlreadyMet
SweepDisallowedForToken
ZeroAmount
Methods
allowance
Parameters
address
owner
Returns
amountUnpaid
Returns
approve
Parameters
address
spender
Returns
balanceOf
Parameters
Returns
burn
Parameters
burnFrom
Parameters
address
account
collateralBalance
Returns
collateralRatio
Returns
collateralToken
Returns
convert
Parameters
convertibleRatio
Returns
decimals
Returns
decreaseAllowance
Parameters
address
spender
Returns
gracePeriodEnd
Returns
increaseAllowance
Parameters
address
spender
Returns
initialize
Parameters
string
bondName
Passed into the ERC20 token to define the name.
isMature
Returns
maturity
Returns
name
Returns
owner
Returns
pay
Parameters
paymentBalance
Returns
paymentToken
Returns
previewConvertBeforeMaturity
Parameters
Returns
previewRedeemAtMaturity
Parameters
Returns
uint256
The number of paymentTokens that the bond shares would be redeemed for.
previewWithdrawExcessCollateral
Returns
previewWithdrawExcessCollateralAfterPayment
Parameters
Returns
previewWithdrawExcessPayment
Returns
redeem
Parameters
renounceOwnership
sweep
Parameters
contract IERC20Metadata
sweepingToken
The ERC20 token to sweep and send to the receiver.
symbol
Returns
totalSupply
Returns
transfer
Parameters
address
to
Returns
transferFrom
Parameters
address
from
Returns
transferOwnership
Parameters
withdrawExcessCollateral
Parameters
uint256
amount
The number of collateralTokens to withdraw. Reverts if the amount is greater than available in the contract.
withdrawExcessPayment
Parameters
Last updated