F
Flow•10mo ago
ElDumbo

Luke | Flow Community (2024-02-07)

Hi, first time asking long time lurking. i seem to constantly have an issue with the VSCode and importing Contracts. For reference, Im just running a local emulator for playing around as I work through Emerald City's amazing learning course. But even as I've progressed, I constantly have this issue. I've managed to just use: import "filename" And that had been working. But now it's not and neither is the given import code from the tutorial. Anyone else seen this issue with VSCode? Or am I doing something wrong? I have tried resetting my set-up, VSCode, scrapping all the code and redoing it, etc
No description
8 Replies
Needle
Needle•10mo ago
I've created a thread for your message. Please continue any relevant discussion in this thread. You can rename this thread using /title <new title> If this is a technical question that others may benefit from, considering also asking it on Stackoverflow: https://stackoverflow.com/questions/ask?tags=onflow-cadence
Unknown User
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
Unknown User
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
ElDumbo
ElDumboOP•10mo ago
yeah seems I had the random function wrong, but I'd been seeing issues on importing all contracts This means just like: import "Game" right? As in that's absolutely fine to do? How come we now don't need to specifiy a specific file location but we use to? (me going off cadence/learning docs here)
Unknown User
Unknown User•10mo ago
Message Not Public
Sign In & Join Server To View
ElDumbo
ElDumboOP•10mo ago
Ok will dive in later when I finish the day job to check it out 😄
turbolent
turbolent•10mo ago
the flow.json configuration maps names, like e.g Game, that you import in code, like import "Game", to paths / files on your disk ... and then when you deploy the contract, the imports/names will be mapped to addresses
Want results from more Discord servers?
Add your server