Skip to content

Replace import placeholders with correct placholder format #230

@joshuahannan

Description

@joshuahannan

Issue To Be Solved

The Flow CLI introduced proper import placeholder standards for contracts a long time ago, but the Top Shot repo is still using the old 0xIMPORTADDRESS placeholder syntax, which is unhelpful for community developers who want to work with the contracts using their typical flow.json setup

Suggest A Solution

  • check out the Docs: https://developers.flow.com/tools/flow-cli/flow.json/configuration
  • Replace all the import placeholders in the contracts, transactions, and scripts to use a placeholder like "NonFungibleToken" instead of 0xNFTADDRESS
  • Update the contracts and templates packages to look for these placeholders instead of the old ones.
  • Update flow.json to use the correct syntax for working with these placeholders.

Example in NFT repo: https://github.com/onflow/flow-nft/blob/master/contracts/ExampleNFT.cdc#L12
example in contracts package: https://github.com/onflow/flow-nft/blob/master/lib/go/contracts/contracts.go#L16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions