nba-smart-contracts
nba-smart-contracts copied to clipboard
Replace import placeholders with correct placholder format
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 of0xNFTADDRESS - Update the
contractsandtemplatespackages 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