Skip to content

Module model #4

@perama-v

Description

@perama-v

I am thinking there might be two ways to extend a contract, e.g., an ERC token to be Ownable.

  1. A myToken.cairo with top-of-file import-style mechanism: from ozcc import ERC, Ownable.
  2. A generator CLI program: ozcc generate ERC Ownable that produces a populated myToken.cairo.

Option 1 would mimic existing Solidity experience, and would involve functions overriding others in a hierarchy.

Option 2 would involve the program fetching only non-overridden functions from the chosen combination and placing those in a file.

Both options are compatible with pre-generated common patterns (721, 721-ownable, 721-ownable-enumerable, 721-enumerable). Option 2 might result in a less-complex contract file, because there would be no override patterns for the developer to mentally manage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions