BurnerBond
Source: contracts/peripherals/BurnerBond.sol · Guide: bonds
Functions that change state
Function
Who can call
Also
batchRedeemBonds(uint256[] bondIds)Anyone; acts on the caller's own account
nonReentrantemergencyRecover(address token, uint256 amount)onlyOwnerinitialize(address _burnerBondDeposit, address _factory, address _assurancePool, address _underlyingToken, string _uri, string _collectionName, string _collectionSymbol, string _collectionDescription, address _traitStore, address _discountCurve)Once, when the proxy is initialised
mintBond(uint256 faceValue, uint256 maturityDate, uint256 discountPercentage, address creator)Checked inside the function
nonReentrantredeemBond(uint256 bondId)Anyone; acts on the caller's own account
nonReentrantredeemEarly(uint256 bondId)Checked inside the function
nonReentrantremoveBondTrait(uint256 bondId, string traitName)onlyOwnerrenounceOwnership()The owner
rollBond(uint256 bondId)Checked inside the function
nonReentrantsafeBatchTransferFrom(address from, address to, uint256[] ids, uint256[] amounts, bytes data)The holder, or an approved operator
safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes data)The holder, or an approved operator
seizeBond(uint256 bondId, address from, address to)Checked inside the function
setApprovalForAll(address operator, bool approved)The holder
setAssurancePool(address _assurancePool)onlyOwnersetAutoRollOptOut(uint256 bondId, bool optOut)Checked inside the function
setBondTrait(uint256 bondId, bytes32 traitKey, bytes traitValue)onlyOwnersetBondTraitFlexible(uint256 bondId, bytes traitKey, bytes traitValue, uint8 valueType)onlyOwnersetBondVault(address _bondVault)onlyOwnersetBurnerBondDeposit(address _burnerBondDeposit)onlyOwnersetDiscountCurve(uint8 _curveType, uint256 _curveParameter)onlyOwnersetEncumbranceSource(address source, bytes32 kind)onlyOwnersetFirstBondId(uint256 firstId)onlyOwnersetLiquidator(address _liquidator)onlyOwnersetRollTerm(uint256 _rollTerm)onlyOwnersetUnderlyingToken(address _underlyingToken)onlyOwnersetURI(string newuri)onlyOwnertransferOwnership(address newOwner)The owner
Read functions
Anyone can call these; they change nothing.
Function
Returns
assurancePool()address
autoRollOptedOut(uint256)bool
balanceOf(address account, uint256 id)uint256
balanceOfBatch(address[] accounts, uint256[] ids)uint256[]
bondCreator(uint256)address
bondIdsByCreator(address, uint256)uint256
bonds(uint256)uint256 faceValue, uint256 maturityDate, uint256 discountPercentage, uint256 purchasePrice, bool isRedeemed, address creator, uint64 issuedAt
bondsCreatedBy(address)uint256
bondVault()address
burnerBondDeposit()address
calculateDiscount(uint256 maturityDate)uint256
calculateDiscountWithCurve(uint256 maturityDate)uint256
calculatePurchasePrice(uint256 faceValue, uint256 maturityDate)uint256
collateralKind()bytes32
collectionDescription()string
collectionName()string
collectionSymbol()string
contractURI()string
curveParameter()uint256
curveType()uint8
description()string
discountCurveEngine()address
encumbranceSource()address
factory()address
getBondIdsByCreator(address creator)uint256[]
getBondInfo(uint256 bondId)(uint256,uint256,uint256,uint256,bool,address,uint64)
getBondsCreatedBy(address creator)uint256
getBondStatistics()uint256 totalMinted, uint256 totalDeposited, uint256 totalRedeemed
getBondTraitKeys(uint256 bondId)bytes32[]
getBondTraitMetadataURI()string
getBondTraitName(bytes32 traitKey)string
getBondTraitValue(uint256 bondId, bytes32 traitKey)bytes
getBondTraitValues(uint256 bondId, bytes32[] traitKeys)bytes[]
getBondType(uint256 maturityDate)string
getCollectionMetadata()string collectionName_, string collectionSymbol_, string collectionDescription_, address underlyingTokenAddress_, uint256 totalSupply_
getDiscountCurve()uint8, uint256, uint256, uint256
getDiscountForMaturity(uint256 timeToMaturity)uint256
getDiscountParameters()uint256, uint256
getUnderlyingToken()address
isApprovedForAll(address account, address operator)bool
isBondMature(uint256 bondId)bool
liquidator()address
name()string
owner()address
presentValueOf(uint256 bondId)uint256
rollTerm()uint256
supportsInterface(bytes4 interfaceId)bool
symbol()string
totalBondsMinted()uint256
totalUSDCDeposited()uint256
totalUSDCRedeemed()uint256
traitStore()address
underlyingToken()address
uri(uint256)string
willAutoRoll(uint256 bondId)bool
Events
Event
ApprovalForAll(address account indexed, address operator indexed, bool approved)AutoRollOptOutSet(uint256 bondId indexed, bool optedOut)BondMinted(uint256 bondId indexed, address creator indexed, uint256 faceValue, uint256 maturityDate, uint256 discountPercentage, uint256 purchasePrice)BondRedeemed(uint256 bondId indexed, address redeemer indexed, uint256 faceValue)BondRolled(uint256 oldBondId indexed, uint256 newBondId indexed, uint256 rolledValue)BondSeized(uint256 bondId indexed, address from indexed, address to indexed)BondTraitUpdated(uint256 bondId indexed, bytes32 traitKey indexed, bytes traitValue)DiscountCurveUpdated(uint8 curveType, uint256 maxDiscount, uint256 maxMaturity, uint256 curveParameter)DiscountParametersUpdated(uint256 maxDiscount, uint256 maxMaturity)Initialized(uint8 version)LiquidatorUpdated(address liquidator indexed)OwnershipTransferred(address previousOwner indexed, address newOwner indexed)RedeemedEarly(uint256 bondId indexed, address holder indexed, uint256 presentValue)TransferBatch(address operator indexed, address from indexed, address to indexed, uint256[] ids, uint256[] values)TransferSingle(address operator indexed, address from indexed, address to indexed, uint256 id, uint256 value)URI(string value, uint256 id indexed)Errors
No custom errors; failures revert with a reason string.