Open rajeebkm opened 9 months ago
Isn't this possible already? See https://community.starknet.io/t/cairo-components/101136 , section Component dependencies
starting with the 2.7.* releases new style of storage pointers are available - allows to write proper generics based code - describing a general component.
following storage_node
would be possibly generics - allowing easily mixing such types to share generic logics and storage across components and contracts.
Feature Request
Describe the Feature Request
Import a library ([starknet::component]) inside another library ([starknet::component])
Describe Preferred Solution
It would be great if cairo supports importing library in another library. We can easily use other libraries as well.
Describe Alternatives
Related Code
use project::{interfaces::IFees, libraries::LibAsset::LibAsset as LibAssetComponent};
[starknet::component]
mod LibFees { use starknet::ContractAddress; use super::LibAssetComponent;
}
Additional Context
If the feature request is approved, would you be willing to submit a PR? (Help can be provided if you need assistance submitting a PR)