fcl-js icon indicating copy to clipboard operation
fcl-js copied to clipboard

Implement new flow.json contract imports syntax

Open justinbarry opened this issue 3 years ago • 3 comments

To ensure compatibility with the general ecosystem we need to implement this flip.

Note: This issue does NOT encompass the reading of the flow.json file, we are to assume the the data structure is passed in as configuration.

justinbarry avatar Aug 04 '22 23:08 justinbarry

don't we have this already ? with: import xxx from 0xSOMEWHERE replacements ?

bluesign avatar Aug 05 '22 06:08 bluesign

@bluesign we support one of the formats. The other look something like this:

{
...
"contracts": {
	"onflow/NonFungibleToken": "./NonFungibleToken.cdc",
	"onflow/FungibleToken": {
		"testnet": "github.com/flow/FungibleToken/Fungible.cdc",
		"mainnet": "0x2",
		"emulator": "./FungibleToken.cdc", 
		"e2e-testnet": "0x3"
	}
}
...
}

And this one we need to support as well.

justinbarry avatar Aug 05 '22 16:08 justinbarry

ah I always though those 0xProfile etc can be something like onflow/FungibleToken

bluesign avatar Aug 05 '22 20:08 bluesign

Duplicate of #1449

justinbarry avatar Nov 30 '22 20:11 justinbarry