Bond Marketplace Contract Methods
The bond marketplace contract includes all the methods that are available in the extended ERC-1155 NFT contract and additional methods that are specific to the bond marketplace scenario.
Solidity Autogenerated Methods
The bond marketplace asset is based on the extended ERC-1155 standard, and supports all of the generic methods for that standard. For more information about the generic ERC-1155 methods, see Digital Assets APIs.-
postToken - This method submits a bond token for listing in the marketplace. This method can be called only by a token creator. When a token is created, its status is initially set to
created. This method updates the status toposted. -
purchaseToken - This method purchases a listed bond NFT, transferring it from the creator's accoun to the caller's account and transferring CBDC tokens from the caller's account to the creator's account. This method can be called by any account holder.
-
payInterest - This method pays interest earned on a bond token. It can be called only by the token creator. The interest frequency of the token must be monthly, quarterly, or annually. Interest cannot be paid if the interest frequency is at maturity. Interest is calculated by the contract based on the coupon rate of the token.
requestTokenRedemption- This method raises a request for the redemption of bond tokens after maturity. It can be called only by the token owner. This method is also used to calculate the redemption price by the contract. Redemption requests can be raised only on the entire quantity of the bond token that the user owns. Users can raise multiple redemption requests based on different settlement IDs but only one can be approved by the token creator.
approveTokenRedemption- This method approves a request for the redemption of bond tokens. It can be called only by the token creator.
rejectTokenRedemption- This method rejects a request for the redemption of bond tokens. It can be called only by the token creator. Token owners can raise a redemption request again by using a different settlement ID.
getTokenRedemptionRequests- This method gets the details of token redemption requests. It can be called by any account holder.
getUserBondDetails- This method gets an account summary that includes the details of purchased or redeemed tokens and the purchase price and redemption price. It can be called by any account holder.