nba-smart-contracts icon indicating copy to clipboard operation
nba-smart-contracts copied to clipboard

Replace import placeholders with correct placholder format

Open joshuahannan opened this issue 1 year ago • 0 comments

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

joshuahannan avatar Dec 21 '23 18:12 joshuahannan