Skip to content

Commit

Permalink
Fix public path after merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
alilloig committed Nov 29, 2022
1 parent 0cd241e commit 339da75
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 19 deletions.
6 changes: 3 additions & 3 deletions contracts/ExampleToken.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ pub contract ExampleToken: FungibleToken {

/// Storage and Public Paths
pub let VaultStoragePath: StoragePath
pub let VaultPublicPath: PublicPath
pub let ReceiverPublicPath: PublicPath
pub let MetadataPublicPath: PublicPath
pub let AdminStoragePath: StoragePath

/// The event that is emitted when the contract is created
Expand Down Expand Up @@ -137,7 +137,7 @@ pub contract ExampleToken: FungibleToken {
return FungibleTokenMetadataViews.FTVaultData(
storagePath: ExampleToken.VaultStoragePath,
receiverPath: ExampleToken.ReceiverPublicPath,
metadataPath: ExampleToken.MetadataPublicPath,
metadataPath: ExampleToken.VaultPublicPath,
providerPath: /private/exampleTokenVault,
receiverLinkedType: Type<&ExampleToken.Vault{FungibleToken.Receiver}>(),
metadataLinkedType: Type<&ExampleToken.Vault{FungibleToken.Balance, MetadataViews.Resolver}>(),
Expand Down Expand Up @@ -235,8 +235,8 @@ pub contract ExampleToken: FungibleToken {
init() {
self.totalSupply = 1000.0
self.VaultStoragePath = /storage/exampleTokenVault
self.VaultPublicPath = /public/exampleTokenMetadata
self.ReceiverPublicPath = /public/exampleTokenReceiver
self.MetadataPublicPath = /public/exampleTokenMetadata
self.AdminStoragePath = /storage/exampleTokenAdmin

// Create the Vault with the total supply of tokens and save it in storage.
Expand Down
4 changes: 0 additions & 4 deletions contracts/FungibleTokenMetadataViews.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@ pub contract FungibleTokenMetadataViews {
pub struct FTView {
pub let ftDisplay: FTDisplay?
pub let ftVaultData: FTVaultData?
<<<<<<< HEAD
=======

>>>>>>> c5fd8b5 (Add consistency about vaultData field name)
init(
ftDisplay: FTDisplay?,
ftVaultData: FTVaultData?
Expand Down
18 changes: 9 additions & 9 deletions lib/go/contracts/internal/assets/assets.go

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ transaction {
// Create a public capability to the Vault that only exposes
// the balance field through the Balance interface
signer.link<&ExampleToken.Vault{FungibleToken.Balance}>(
ExampleToken.MetadataPublicPath,
ExampleToken.VaultPublicPath,
target: ExampleToken.VaultStoragePath
)

Expand Down
2 changes: 1 addition & 1 deletion transactions/scripts/get_balance.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ExampleToken from "../../contracts/ExampleToken.cdc"

pub fun main(account: Address): UFix64 {
let acct = getAccount(account)
let vaultRef = acct.getCapability(ExampleToken.MetadataPublicPath)
let vaultRef = acct.getCapability(ExampleToken.VaultPublicPath)
.borrow<&ExampleToken.Vault{FungibleToken.Balance}>()
?? panic("Could not borrow Balance reference to the Vault")

Expand Down
2 changes: 1 addition & 1 deletion transactions/setup_account.cdc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ transaction () {

// Create a public capability to the Vault that exposes the Balance and Resolver interfaces
signer.link<&ExampleToken.Vault{FungibleToken.Balance, MetadataViews.Resolver}>(
ExampleToken.MetadataPublicPath,
ExampleToken.VaultPublicPath,
target: ExampleToken.VaultStoragePath
)
}
Expand Down

0 comments on commit 339da75

Please sign in to comment.