Skip to content

Commit

Permalink
add pre-condition to createEmptyVault
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuahannan committed Apr 2, 2024
1 parent ae40465 commit ab7b7ac
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions contracts/FungibleToken.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ access(all) contract interface FungibleToken: ViewResolver {
access(all) fun createEmptyVault(): @{Vault} {
post {
result.balance == 0.0: "The newly created Vault must have zero balance"
result.getType() == self.getType(): "The newly created Vault must have the same type as the creating vault"
}
}
}
Expand Down
Loading

0 comments on commit ab7b7ac

Please sign in to comment.