Skip to content

Commit e5ba670

Browse files
Update cadence/contracts/TidalProtocol.cdc
1 parent 86c8507 commit e5ba670

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

cadence/contracts/TidalProtocol.cdc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,8 @@ access(all) contract TidalProtocol: FungibleToken {
464464
) {
465465
pre {
466466
self.globalLedger[tokenType] == nil: "Token type already supported"
467+
tokenType.isSubtype(of: Type<@{FungibleToken.Vault}>()):
468+
"Invalid token type \(tokenType.identifier) - tokenType must be a FungibleToken Vault implementation"
467469
collateralFactor > 0.0 && collateralFactor <= 1.0: "Collateral factor must be between 0 and 1"
468470
borrowFactor > 0.0 && borrowFactor <= 1.0: "Borrow factor must be between 0 and 1"
469471
depositRate > 0.0: "Deposit rate must be positive"

0 commit comments

Comments
 (0)