Hey all - me and my team are new to flow - and having a bit of trouble with creating our own smart contracts. We are trying to follow along with the developer tutorial - but we are current stuck when trying to import a public contract from another local file. We receive the following error:
INFO[0956] β Transaction executed txID=150a23a2841430ee88d6e3122b78fe69162ac6ac4dcc4c6a2b7cab3b981aee6a
WARN[0956] β Transaction reverted txID=af2be854035f27b38ce5bf8cd2ddc8ecb585d86a0286424ea80518b5726ae1f3
WARN[0956] ERR [af2be8] Execution failed:
error: cannot deploy invalid contract
--> af2be854035f27b38ce5bf8cd2ddc8ecb585d86a0286424ea80518b5726ae1f3:11:3
|
11 | acct.contracts.add(name: contract, code: contracts[contract]!.decodeHex())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: cannot find type in this scope: `FungibleToken`
--> e03daebed8ca0615.EngramToken:3:26
|
3 | pub contract EngramToken: FungibleToken {
| ^^^^^^^^^^^^^ not found in this scope
EngramToke.cdc has:
import FungibleToken from "./FungibleToken.cdc"
pub contract EngramToken: FungibleToken {
}
And FungibleToken.cdc has:
pub contract interface FungibleToken {
....
}
Both .cdc files live within the same folder level.
I noticed while reading the docs here: link that:
Status: Imports from local files are not currently implemented.
Could this be the reason for our import error?
Just curious if anyone has run into a similar issue. Thanks!