Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Figure out and clean up contract artifacts loading #96

Open
krebernisak opened this issue Sep 2, 2022 · 0 comments
Open

Figure out and clean up contract artifacts loading #96

krebernisak opened this issue Sep 2, 2022 · 0 comments

Comments

@krebernisak
Copy link
Collaborator

krebernisak commented Sep 2, 2022

Currently, we don't have proper tools in place to load Cairo and Solidity contract artifacts from imported NPM/PyPI packages.

Our typescript tests and gauntlet implementation is filled with ad-hoc loading functions like this:

export const loadOpenzepplinContract = (name: string): any => {
  return json.parse(
    fs
      .readFileSync(
        `${__dirname}/../../../node_modules/@openzeppelin/contracts/build/contracts/${name}.json`,
      )
      .toString('ascii'),
  )
}

There are many unanswered questions:

  • Is loading Solidity contracts from imported NPM packages really still unsupported by the HardHat toolchain?
  • If it's not supported, what kind of additional utilities we can write to simplify this for us?
  • What about Cairo imported contracts? These can be loaded to scope via NPM or PyPI, which complicates things.
  • What about our Go stack, how do we access and load contracts from our Go code?
    • We currently proxy contract deployments and some interactions via Gauntlet (TS). Will we continue to do that for all cases or will we need to access contract directly from Go code?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant