Function batchRedeem(uint256[] calldata tokenIds_, uint256[] calldata amounts_) external
NO UNIT-TEST
Essentially performs multiple
redeem
calls, which could have been done manually. A good check to mention here would be thattokenIds
array length has to be equal toamounts
array length.
Function deploy(ERC20 underlying_, uint48 expiry_) external
NO UNIT-TEST or at least not direct test
Intended behavior.
"Deploy" a new ERC1155 bond token for an (underlying, expiry) pair and return its address.
Negative behavior.
It shouldn’t allow modifying an already existing
underlying, expiry
pair!It must assure that the
expiry
is in the future!
Preconditions.
Assumes that the
underlying, expiry
pair doesn’t already exist as a bondTokenThat
getTokenId
calculates thetokenId
properly and there’s no way to bypass and create an additional token with sameid
.
Postconditions.
Assumes a new ERC1155 tokenId has been created with the
underlying, expiry
pair.
Inputs.
ERC20 underlying_: controlled,
uint48 expiry_: controlled,
Examine all function calls the function makes.
There are no function calls here.