NoshonNetworks / landver

Onchain Land Management
https://landver.vercel.app/
MIT License
7 stars 32 forks source link

Create roles for the land registry contract #35

Closed fishonamos closed 1 month ago

fishonamos commented 1 month ago
  1. Land Registry Admin: Can add or remove other roles Can update system parameters
  2. Land Inspector: Can verify land details Can approve or reject land registrations
  3. Land Registrar: Can register new lands Can update land details
  4. Land Owner: Can transfer their own land Can view their own land details Public: Can view basic land information...

Follow OZ standard for creating roles: https://docs.openzeppelin.com/contracts-cairo/0.17.0/access

E.G:

const ADMIN_ROLE: felt252 = selector!("ADMIN_ROLE");
const INSPECTOR_ROLE: felt252 = selector!("INSPECTOR_ROLE");
const REGISTRAR_ROLE: felt252 = selector!("REGISTRAR_ROLE");

imports

fn register_land(
        ref self: ContractState,
        land_id: u256,
        location: felt252,
        area: u256,
        land_use: felt252,
        document_hash: felt252
    ) -> Land {
        self.accesscontrol.assert_only_role(REGISTRAR_ROLE);
Jemiiah commented 1 month ago

@fishonamos is this issue open for contribution I would love to work on this issue

jasonarias28 commented 1 month ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have 2 years of coding and learning about web development, recently I joined Dojo Coding to learn about web 3.0 and I think this will be a great opportunity to start contributing.

How I plan on tackling this issue

I would follow the standard for creating roles and use the example as reference