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

[FEAT]: Add ownable component #102

Open
danielcdz opened this issue Jan 22, 2025 · 16 comments
Open

[FEAT]: Add ownable component #102

danielcdz opened this issue Jan 22, 2025 · 16 comments
Assignees
Labels
difficult: medium enhancement New feature or request ODBoost This issue will be available ONLY during the ODBoost

Comments

@danielcdz
Copy link
Member

📘 Description

To expand the examples provided in our codebase, we need to add reusable components. As a starting point, we aim to implement an Ownable component. You can use this as a reference: [Starknet by Example: Ownable](https://starknet-by-example.voyager.online/components/ownable).

Instructions:

  1. Navigate to the modules directory in the codebase.
  2. Create a new directory named ownable_component.
  3. Begin building the Ownable component within this directory.
  4. Ensure the implementation includes:
    • Relevant comments explaining the solution.
    • Proper modularity for ease of reuse.
  5. Once complete, take screenshots of the successful build of the component and include them in the PR for verification.

✅ Acceptance Criteria

  • A fully implemented and functional Ownable component in the modules/ownable_component directory.
  • The code is well-documented with relevant comments.
  • Screenshots of the successful build are included in the PR.

🌎 References

📜 Additional Notes

  • Do not apply until the ODBoost begins.
  • Read our contribution guidelines before applying.
@danielcdz danielcdz added enhancement New feature or request difficult: medium ODBoost This issue will be available ONLY during the ODBoost labels Jan 22, 2025
@codebestia
Copy link
Contributor

Can i work on this? @danielcdz
I am a good blockchain developer with ample experience with cairo.

How i will handle this?

  • I will fork this repo and follow the contribution guide
  • I wil create a directory ownable_component in the modules directory.
  • In the ownable component directory, i will create two file iownable.cairo and ownable.cairo
  • In the iownable.cairo file, i will define the iownable interface that will contain the following functions: fn owner(self: @TContractState) ->ContractAddress, fn transfer_ownership(ref self: TContractState, new_owner: ContractAddress) ;, fn revoke_ownership(ref self: TContractState) ;, fn is_owner(self: @TContractState) -> bool;.
  • In the ownable.cairo file, i will define the component with #[starknet::component] and it will implement the IOwnable interface and also include private functions like fn assert_only_owner(self: @ContractState) and fn initialize_owner(ref self: ContractState).
  • I will include documentation comment for each functions and modules.
  • I will take screenshot of the successful build of the component.
  • I will make a PR within 24 hours of assignment.

@martinvibes
Copy link
Contributor

Holla i'm Martin, I'm a frontend developer who enjoys building smooth applications to pixel perfect and engaging websites using JavaScript, typescript and frameworks(React, nextjs, tailwindcss etc.) and i have contributed to other projects that have been merged.
Am also experienced in working and writing smart contracts.
Kindly assign :)

@Akshola00
Copy link

May I take care of this?
Im Confident I can handle this issue
I've worked on several contracts and integrated open Zeppelin In various open source repositories
Pls assign this to me
ETA< 1day

@jorgezerpa
Copy link
Contributor

Hi! Dojo here⛩️

I had contributed to Starkiro on the issue of create a random number generator contract.

Also I have experience working with Ownable components -> I implemented openZeppelin Ownable component for some contracts on Landver project. This issue was based on incorporate the OZ Upgraddable component, which requires an Ownable component implementation and a good understanding of how this works.

This is how I will proceed with this issue:

  1. I will create a basic contract following the example you provide. Including the owner, transfer_ownership and renunce_ownership functions.
  2. Then, I will add a bit extra functionalities to make the contract more complete, like accept_ownership, and pending_owner. For this I will use as guide the Open Zeppelin Ownable component code

Of course I will follow the instructions you provide about where to write the contract, add an screenshot to the PR, etc.

I'm attentive :)

@manlikeHB
Copy link
Contributor

Could I grab this task?

@ChrisFernandezVivas
Copy link

hi im dojo member

ETA 2 days

how to solve?

-see the reference and replicated that in your contract
-test the component
-PR ready

@CollinsC1O
Copy link

Hello, I'm a front-end and a blockchain developer and I will love to tackle this issue, providing the required solution by creating an Ownable Component for implementing access control where necessary in the entire contract.

@No-bodyq
Copy link

Mind if I take this issue?

@chiscookeke11
Copy link

Can I take this issue?

@Jagadeeshftw
Copy link
Contributor

Proposal to Work on the Issue

I would be delighted to contribute to this issue, as I have extensive experience with Cairo programming and developing decentralized applications on StarkNet.

Estimated Timeline

I anticipate delivering a working solution within the next 24 hours. Please let me know if I can proceed.

Looking forward to contributing and collaborating!

Best regards,
Jagadeesh B

@caxtonacollins
Copy link

I am applying through the onlydust platform.
@coxmars, will love to contribute to this issue, my experience as a fullstack dev, proficient in Javascript, rust and cairo make me the perfect candidiate for this issue, I am a first time contributor to this project and am ready to put in the work.

@Yunusabdul38
Copy link

I’d like to work on this.

@gadyrcdz
Copy link
Contributor

Is it okay if I tackle this? Also, I'm a member of the community Dogo Coding

@RomThpt
Copy link
Contributor

RomThpt commented Jan 22, 2025

I’d love to work on this task and contribute to the project. I’ll be participating in the ETHDenver hackathon, and I see this as a great opportunity not only to help improve the project but also to grow my skills by tackling this issue.

@ryzen-xp
Copy link
Contributor

May I try my hand at this?

@wheval
Copy link
Contributor

wheval commented Jan 22, 2025

I'd love to give this a go :).
I would implement an Ownable component using the Starknet reference.
I would ensure to document my code properly explaining the solution I employed.

ETA is 1 day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficult: medium enhancement New feature or request ODBoost This issue will be available ONLY during the ODBoost
Projects
None yet
Development

No branches or pull requests