smartcontractkit / smartcontractkit/chainlink-starknet
Figure out and clean up contract artifacts loading
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 60
- Forks
- 31
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 2
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the ad-hoc artifact loader shown in the issue and its uses in the TypeScript tests and Gauntlet implementation. Then investigate the Hardhat-toolchain question, Cairo packages from NPM or PyPI, and access from the Go stack. Done means the supported loading approach and scope for each stack are settled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, solidity, typescript
- Domain
- blockchain, tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100