Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update initialize-account to latest ExampleNFT #5

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions initialize-account/initialize-account.cdc.tmpl
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import NFTStorefront from ${NFTStorefrontContractAddress}
import DapperUtilityCoin from ${DapperUtilityCoinContractAddress}
import FungibleToken from ${FungibleTokenContractAddress}
import ${NFTContractName} from ${NFTContractAddress}
import NonFungibleToken from ${NonFungibleTokenContractAddress}

// This transcation initializes an account with a collection that allows it to hold NFTs from a specific contract. It will
// do nothing if the account is already initialized.
Expand All @@ -10,7 +8,7 @@ transaction {
if collector.borrow<&${NFTContractName}.Collection>(from: ${NFTContractName}.CollectionStoragePath) == nil {
let collection <- ${NFTContractName}.createEmptyCollection() as! @${NFTContractName}.Collection
collector.save(<-collection, to: ${NFTContractName}.CollectionStoragePath)
collector.link<&{${NFTContractName}.CollectionPublic}>(
collector.link<&${NFTContractName}.Collection{${NFTContractName}.${NFTContractName}CollectionPublic, NonFungibleToken.CollectionPublic}>(
${NFTContractName}.CollectionPublicPath,
target: ${NFTContractName}.CollectionStoragePath,
)
Expand Down
4 changes: 1 addition & 3 deletions initialize-account/mainnet.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
NFTStorefrontContractAddress=0x4eb8a10cb9f87357
DapperUtilityCoinContractAddress=0xead892083b3e2c6c
FungibleTokenContractAddress=0xf233dcee88fe0abe
NonFungibleTokenContractAddress=0x1d7e57aa55817448
NFTContractName=
NFTContractAddress=

4 changes: 1 addition & 3 deletions initialize-account/testnet.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
NFTStorefrontContractAddress=0x94b06cfca1d8a476
DapperUtilityCoinContractAddress=0x82ec283f88a62e65
FungibleTokenContractAddress=0x9a0766d93b6608b7
NonFungibleTokenContractAddress=0x631e88ae7f1d7c20
NFTContractName=
NFTContractAddress=