@@ -182,8 +182,8 @@ access(all) contract interface FungibleToken: ViewResolver {
182
182
}
183
183
post {
184
184
self .balance == 0 .0 :
185
- " FungibleToken.Vault.burnCallback: Cannot burn this Vault with Burner.burn()."
186
- .concat (" The balance must be set to zero during the burnCallback method so that it cannot be spammed" )
185
+ " FungibleToken.Vault.burnCallback: Cannot burn this Vault with Burner.burn(). "
186
+ .concat (" The balance must be set to zero during the burnCallback method so that it cannot be spammed. " )
187
187
}
188
188
self .balance = 0 .0
189
189
}
@@ -223,21 +223,21 @@ access(all) contract interface FungibleToken: ViewResolver {
223
223
}
224
224
post {
225
225
result.getType () == self .getType ():
226
- " FungibleToken.Vault.withdraw: Cannot withdraw tokens!"
226
+ " FungibleToken.Vault.withdraw: Cannot withdraw tokens! "
227
227
.concat (" The withdraw method tried to return an incompatible Vault type <" )
228
228
.concat (result.getType ().identifier).concat (" >. " )
229
- .concat (" It must return a Vault with the same type as self ( " )
229
+ .concat (" It must return a Vault with the same type as self < " )
230
230
.concat (self .getType ().identifier).concat (" >." )
231
231
232
232
// use the special function `before` to get the value of the `balance` field
233
233
// at the beginning of the function execution
234
234
//
235
235
self .balance == before (self .balance) - amount:
236
- " FungibleToken.Vault.withdraw: Cannot withdraw tokens!"
236
+ " FungibleToken.Vault.withdraw: Cannot withdraw tokens! "
237
237
.concat (" The sender's balance after the withdrawal (" )
238
238
.concat (self .balance.toString ())
239
239
.concat (" ) must be the difference of the previous balance (" ).concat (before (self .balance.toString ()))
240
- .concat (" ) and the amount withdrawn (" ).concat (amount.toString ())
240
+ .concat (" ) and the amount withdrawn (" ).concat (amount.toString ()). concat ( " ) " )
241
241
242
242
emit Withdrawn (
243
243
type : result.getType ().identifier,
@@ -257,12 +257,12 @@ access(all) contract interface FungibleToken: ViewResolver {
257
257
// as the vault that is accepting the deposit
258
258
pre {
259
259
from .isInstance (self .getType ()):
260
- " FungibleToken.Vault.deposit: Cannot deposit tokens!"
260
+ " FungibleToken.Vault.deposit: Cannot deposit tokens! "
261
261
.concat (" The type of the deposited tokens <" )
262
262
.concat (from.getType ().identifier)
263
263
.concat (" > has to be the same type as the Vault being deposited into <" )
264
264
.concat (self .getType ().identifier)
265
- .concat (" >. Check that you are withdrawing and depositing to the correct paths in the sender and receiver accounts" )
265
+ .concat (" >. Check that you are withdrawing and depositing to the correct paths in the sender and receiver accounts " )
266
266
.concat (" and that those paths hold the same Vault types." )
267
267
}
268
268
post {
@@ -275,11 +275,11 @@ access(all) contract interface FungibleToken: ViewResolver {
275
275
balanceAfter : self .balance
276
276
)
277
277
self .balance == before (self .balance) + before (from.balance):
278
- " FungibleToken.Vault.deposit: Cannot deposit tokens!"
278
+ " FungibleToken.Vault.deposit: Cannot deposit tokens! "
279
279
.concat (" The receiver's balance after the deposit (" )
280
280
.concat (self .balance.toString ())
281
281
.concat (" ) must be the sum of the previous balance (" ).concat (before (self .balance.toString ()))
282
- .concat (" ) and the amount deposited (" ).concat (before (from.balance).toString ())
282
+ .concat (" ) and the amount deposited (" ).concat (before (from.balance).toString ()). concat ( " ) " )
283
283
}
284
284
}
285
285
@@ -289,12 +289,12 @@ access(all) contract interface FungibleToken: ViewResolver {
289
289
access (all) fun createEmptyVault (): @{Vault} {
290
290
post {
291
291
result.balance == 0 .0 :
292
- " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed!"
292
+ " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed! "
293
293
.concat (" The newly created Vault must have zero balance but it has a balance of " )
294
294
.concat (result.balance.toString ())
295
295
296
296
result.getType () == self .getType ():
297
- " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed!"
297
+ " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed! "
298
298
.concat (" The type of the new Vault <" )
299
299
.concat (result.getType ().identifier)
300
300
.concat (" > has to be the same type as the Vault that created it <" )
@@ -310,12 +310,12 @@ access(all) contract interface FungibleToken: ViewResolver {
310
310
access (all) fun createEmptyVault (vaultType : Type ): @{FungibleToken.Vault} {
311
311
post {
312
312
result.balance == 0 .0 :
313
- " FungibleToken.createEmptyVault: Empty Vault creation failed!"
314
- .concat (" The newly created Vault must have zero balance but it has a balance of " )
315
- .concat (result.balance.toString ())
313
+ " FungibleToken.createEmptyVault: Empty Vault creation failed! "
314
+ .concat (" The newly created Vault must have zero balance but it has a balance of ( " )
315
+ .concat (result.balance.toString ()). concat ( " ) " )
316
316
317
317
result.getType () == vaultType:
318
- " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed!"
318
+ " FungibleToken.Vault.createEmptyVault: Empty Vault creation failed! "
319
319
.concat (" The type of the new Vault <" )
320
320
.concat (result.getType ().identifier)
321
321
.concat (" > has to be the same as the type that was requested <" )
0 commit comments