Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

import not working #17

Open
SvenMeyer opened this issue Sep 11, 2023 · 3 comments
Open

import not working #17

SvenMeyer opened this issue Sep 11, 2023 · 3 comments

Comments

@SvenMeyer
Copy link

SvenMeyer commented Sep 11, 2023

@kevinhalliday, after installing according to the README.md pnpm add @omni-network/contracts in a hardhat project ...

  "dependencies": {
    "@omni-network/contracts": "^0.1.4"
  }

the import still does not work ...

import { OmniScient } from "@omni/contracts/OmniScient.sol";
import {IOmniPortal} from "@omni-network/contracts/IOmniPortal.sol";
@SvenMeyer SvenMeyer changed the title import statement wrong in README.md import not working Sep 11, 2023
@SvenMeyer
Copy link
Author

This is working, but maybe not the intended path ?

import { OmniScient } from "@omni-network/contracts/contracts/OmniScient.sol";
import { OmniCodec } from "@omni-network/contracts/contracts/OmniCodec.sol";

import {IOmniPortal} from "@omni-network/contracts/contracts/interfaces/IOmniPortal.sol";

@SvenMeyer
Copy link
Author

image

@kevinhalliday
Copy link
Contributor

@SvenMeyer thanks for raising this issue. You're right, import works on @omni-network/contracts/contracts/{...}. Documentation was incorrect. I'll update documentation.

This was not unintended. But I agree @omni-network/contracts/{...} is a nicer import path. It can be a little awkward to move files to the package root on publish. But I'll try something out

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants