Comments (4)
Hello @FabijanC, sorry for the delay. I had a more thorough look into it and got some advice from @Nathan-SL.
Basically the "contract.json" is represented by the "metadaPath" and the "contract_abi.json" is represented by the "abiPath". So this issue is about getting rid of the "abiPath".
There are 2 modifications needed to resolve this issue that I would consider breaking changes:
- The StarknetContractFactory exposes a getAbiPath function, which would need to be removed
- The StarknetContractFactoryConfig inherits from the StarknetContractConfig, which exposes the abiPath parameter, so we would need to break the interface inheritance as well.
I see 3 options to address this:
- Create a breaking change and get rid of the abiPath (including removing the getAbiPath function and the interface inheritance)
- Consider the getAbiPath function and the interface inheritance important and disregarding the issue
- Marking the abiPath property as optional, and deriving it from the metadataPath (but then the logic of getContractFactoryUtil)[https://github.com/Shard-Labs/starknet-hardhat-plugin/blob/master/src/extend-utils.ts#L13] becomes redundant and it might need a bigger refactoring)
I'd say if the breaking change is not a problem we go with solution 1.
Feel free to ping me on telegram if you want to discuss this more thoroughly.
from starknet-hardhat-plugin.
Also note, the content of the contract_abi.json
is a property of the object in contract.json
. Perhaps this can be taken into account when addressing this issue.
from starknet-hardhat-plugin.
@robinstraub Sorry for the delay in replying. I don't understand how removing abiPath would allow users to load contracts only with ABI. Shouldn't it be the other json artifact that would require removing? Also note that since the introduction of Cairo 1 the plugin currently requires another artifact: contract.casm (due to Sierra mid-layer).
from starknet-hardhat-plugin.
This will probably be handled as well by #396
from starknet-hardhat-plugin.
Related Issues (20)
- Fix typos
- Cairo 1 compilation needs to be fixed HOT 1
- ContractAddress, ClassHash and EthAddress decoding HOT 1
- Improve macos testing in CI/CD HOT 1
- Cairo 1 compiler needs to be refactored
- Replace cairo installation from source with prebuilt binaries
- Support Dockerized Scarb HOT 1
- Refactor ScarbWrapper
- Add hardhat config file checking
- Support Starknet / cairo-lang 0.12 HOT 1
- Bump starknet.js to v5
- Restructure the plugin to rely on Starknet.js HOT 2
- hardhat starknet-compile does not handle single file compilation after Cairo 2.0.1 HOT 2
- Replace dockerized cairo compiler by relying on prebuilt GitHub binaries
- Update OZ contracts to v0.7.0 HOT 2
- Integrate devnet-rs
- cairo-migrate can be removed
- Update Argent account
- Integrate universal-sierra-compiler
- Support Oracles HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starknet-hardhat-plugin.