Skip to content

Commit 64574d9

Browse files
committed
switch to string interpolation
1 parent c64fc09 commit 64574d9

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

skills/query-blockchain/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ access(all) fun main(address: Address): UFix64 {
166166
let account = getAccount(address)
167167
let vaultRef = account.capabilities
168168
.borrow<&{FungibleToken.Balance}>(/public/flowTokenBalance)
169-
?? panic("Could not borrow FungibleToken Balance capability for account ".concat(address.toString()).concat(" at path /public/flowTokenBalance. Make sure the account has a FlowToken Vault set up properly."))
169+
?? panic("Could not borrow FungibleToken Balance capability for account \(address) at path /public/flowTokenBalance. Make sure the account has a FlowToken Vault set up properly.")
170170
return vaultRef.balance
171171
}
172172
EOF

skills/query-blockchain/cadence-scripts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ access(all) fun main(address: Address): UFix64 {
2121
let account = getAccount(address)
2222
let vaultRef = account.capabilities
2323
.borrow<&{FungibleToken.Balance}>(/public/flowTokenBalance)
24-
?? panic("Could not borrow FungibleToken Balance capability for account ".concat(address.toString()).concat(" at path /public/flowTokenBalance. Make sure the account has a FlowToken Vault set up properly."))
24+
?? panic("Could not borrow FungibleToken Balance capability for account \(address) at path /public/flowTokenBalance. Make sure the account has a FlowToken Vault set up properly.")
2525
return vaultRef.balance
2626
}
2727
```
@@ -44,7 +44,7 @@ import FungibleToken from 0xf233dcee88fe0abe
4444
access(all) fun main(address: Address, path: PublicPath): UFix64 {
4545
return getAccount(address).capabilities
4646
.borrow<&{FungibleToken.Balance}>(path)?.balance
47-
?? panic("Could not borrow FungibleToken Balance capability for account ".concat(address.toString()).concat(" at path ").concat(path.toString()).concat(". Make sure the account has a Fungible Token Vault set up at this path."))
47+
?? panic("Could not borrow FungibleToken Balance capability for account \(address) at path \(path). Make sure the account has a Fungible Token Vault set up at this path.")
4848
}
4949
```
5050

@@ -58,7 +58,7 @@ access(all) fun main(address: Address, vaultPath: PublicPath): FungibleTokenMeta
5858
let account = getAccount(address)
5959
let vaultRef = account.capabilities
6060
.borrow<&{FungibleToken.Vault}>(vaultPath)
61-
?? panic("Could not borrow FungibleToken Vault capability for account ".concat(address.toString()).concat(" at path ").concat(vaultPath.toString()).concat(". Make sure the account has a Fungible Token Vault set up at this path."))
61+
?? panic("Could not borrow FungibleToken Vault capability for account \(address) at path \(vaultPath). Make sure the account has a Fungible Token Vault set up at this path.")
6262
return FungibleTokenMetadataViews.getFTDisplay(vaultRef)
6363
}
6464
```
@@ -294,7 +294,7 @@ access(all) fun main(address: Address, collectionPublicPath: PublicPath): [UInt6
294294
let account = getAccount(address)
295295
let collectionRef = account.capabilities
296296
.borrow<&{NonFungibleToken.Collection}>(collectionPublicPath)
297-
?? panic("Could not borrow NonFungibleToken Collection capability for account ".concat(address.toString()).concat(" at path ").concat(collectionPublicPath.toString()).concat(". Make sure the account has an NFT Collection set up at this path."))
297+
?? panic("Could not borrow NonFungibleToken Collection capability for account \(address) at path \(collectionPublicPath). Make sure the account has an NFT Collection set up at this path.")
298298
return collectionRef.getIDs()
299299
}
300300
```
@@ -309,7 +309,7 @@ access(all) fun main(address: Address, collectionPublicPath: PublicPath, id: UIn
309309
let account = getAccount(address)
310310
let collectionRef = account.capabilities
311311
.borrow<&{NonFungibleToken.Collection}>(collectionPublicPath)
312-
?? panic("Could not borrow NonFungibleToken Collection capability for account ".concat(address.toString()).concat(" at path ").concat(collectionPublicPath.toString()).concat(". Make sure the account has an NFT Collection set up at this path."))
312+
?? panic("Could not borrow NonFungibleToken Collection capability for account \(address) at path \(collectionPublicPath). Make sure the account has an NFT Collection set up at this path.")
313313
let nft = collectionRef.borrowNFT(id)!
314314
return MetadataViews.getDisplay(nft)
315315
}

0 commit comments

Comments
 (0)