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

ERC721 program in Cairo #6

Open
s0lness opened this issue Aug 20, 2024 · 18 comments
Open

ERC721 program in Cairo #6

s0lness opened this issue Aug 20, 2024 · 18 comments
Labels
good first issue Good for newcomers ODHack7

Comments

@s0lness
Copy link
Contributor

s0lness commented Aug 20, 2024

Write a program to manage ERC721 tokens in Cairo, and deploy it on Hylé.
Here's the documentation to code your 1st smart contract on Hylé.

Here's an example of the Cairo ERC20 contract used for the vibe check demo.

@s0lness s0lness added good first issue Good for newcomers ODHack7 labels Aug 20, 2024
@manoahLinks
Copy link

@s0lness can i work on this ?

@ikemHood
Copy link

ikemHood commented Aug 22, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey, I am ikem Peter. a fullstack software developer with 3+ years of working experience, I would love to help out with this issue...

How I plan on tackling this issue

  • I'll examine the example Cairo ERC20 contract to get a sense of the syntax and structure used in Cairo smart contracts.
  • I'll write the ERC721 contract in Cairo, implementing the required functions such as: minting new tokens, transferring tokens, approving others to transfer tokens, checking token ownership and balances.
  • I'll ensure that the contract includes all necessary events and follows best practices for security and efficiency.
  • Once the contract is written, I'll review it carefully for any errors or potential improvements.
  • After I'm satisfied with the code, I'll prepare it for deployment on Hylé, following the platform's specific deployment procedures.
  • Finally, I'll test the deployed contract thoroughly to ensure it functions as expected on the Hylé network.

@bomanaps
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

My name is Mercy Boma Naps-Nkari, and I have a strong background in software development with a particular focus on blockchain technologies. Over the past few years, I have developed and deployed various smart contracts on different blockchain platforms, including Ethereum and StarkNet.

Relevant Experience
I have experience working with Solidity for ERC20 and ERC721 contracts and have recently been exploring Cairo due to its relevance in the StarkNet ecosystem. My understanding of how NFTs work, combined with my experience in developing and auditing smart contracts, will be directly applicable in writing an ERC721 token management program in Cairo. While I am still relatively new to Cairo, I have a solid grasp of the syntax and concepts, and I am confident in my ability to learn quickly.

Transferable Skills
In addition to my experience with smart contracts, I have a strong foundation in software engineering principles, which includes code optimization, testing, and security. My ability to write clean, efficient code and my attention to detail will ensure that the ERC721 token management program I develop is robust and secure.

Enthusiasm and Fit
I am excited about the opportunity to deploy a smart contract on Hylé and contribute to this project. The chance to work on the ERC721 standard in Cairo is particularly appealing as it aligns with my interests in both NFTs and the StarkNet ecosystem. I am confident that my background and skills will allow me to contribute effectively to this project.

@raizo07
Copy link

raizo07 commented Aug 22, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, I'll like to be assigned to work on this. I am a first time contributor and would love to be given the opportunity.

@PavitraAgarwal21
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a skilled smart contract engineer with expertise in Cairo, Rust, and Solidity. My recent project involved building an ERC721 contract from scratch, showcasing my deep understanding of the standard. I am proficient in Rust, making me well-suited to implement and manage ERC721 tokens, and my experience with Cairo and Solidity allows me to handle complex, multi-language projects efficiently. My ability to work on multiple issues simultaneously will ensure timely and effective execution of tasks.

How I plan on tackling this issue

To manage ERC721 tokens in Cairo and deploy on Hylé, I would start by thoroughly understanding the ERC721 standard, focusing on ownership mappings, transfers, approvals, and metadata. I’d then set up a Cairo project tailored for Hylé, using the example ERC20 contract as a reference. Core functions like transferFrom, safeTransferFrom, mint, and approve would be implemented with Cairo’s storage and security features in mind. Finally, I’d test thoroughly and follow Hylé’s documentation for deployment, ensuring the contract is secure and efficient.

@estherbreath
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

My name is Esther Breath.

I am a Smart contract developer in Solidity and Cairo

I am leveraging on my Solidity and Cairo experience to develop and deploy ERC721 tokens on Hylé, by understanding the ERC721 standard in Cairo, transitioning smoothly from Solidity to Cairo, utilizing resources like OpenZeppelin Contracts for Cairo, adapting Solidity concepts to Cairo, and deploythe contract on Hylé seamlessly.

How I plan on tackling this issue

I have already familiarize myself with the ERC721 standard for non-fungible tokens (NFTs). based on my experience.

• Set Up the Development Environment: Install the Cairo toolchain and any necessary tools for interacting with Hylé. 
3. Initialize the Project: Create a new project directory and initialize it with Cairo. 
4. Write the ERC721 Contract: Start writing ERC721 contract in Cairo, focusing on implementing core functionalities like balanceOf, ownerOf, transferFrom, approve, and mint. 
5. Compile and Deploy the Contract: Use the Cairo compiler to compile the contract and deploy it to Hylé using the StarkNet Gateway API. 
6. Interact with the Contract: Implement functions to interact with the contract, such as minting new tokens and transferring them. 
7. Testing and Debugging: Thoroughly test the contract to ensure all functionalities work as expected. 
8. Documentation and Deployment: Document contract's functionality and prepare for deployment by setting up governance models and conducting security audits. 

@chachaleo
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have a degree in applied mathematics engineering and have worked as a ZKML Engineer

How I plan on tackling this issue

Read the example and the your 1st smart contract on Hylé

@SoarinSkySagar
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a full stack web3 developer with experience in developing dapps. I have also contributed to core ETH repos on Golang and Rust clients.

How I plan on tackling this issue

I have developed Cairo smart contracts before for Starknet grants projects and Dojo programs. Creating an ERC721 program using Cairo should be easy enough and will not take much time. I will also make sure that,

  1. My code is readable, with difficult portions having explanations using comments
  2. there are no errors during runtime
  3. proper documentation

@MullerTheScientist
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a full-stack developer with experience in different languages, such as Python, Cairo, Solidity, and JavaScript.

How I plan on tackling this issue

I will use the Cairo programming language to write the ERC721 token manager contract.
Implement functions for minting, transferring, and burning tokens.
Include events for token transfers and ownership changes. also, Write unit tests to ensure the contract functions correctly. Test minting, transferring, burning, and metadata management.

@captr1g
Copy link

captr1g commented Aug 23, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi i m current working as smart contract developer and security testing.

My name is Yash , and I am a first time contributor in open source and would love to be given the opportunity. I have a strong background in software development with a particular focus on blockchain technologies. Over the past few years, I have developed and deployed various smart contracts on blockchain platforms, including Ethereum.

I can make the contract and with secure as well. thank you

How I plan on tackling this issue

I will use the industry standard and security to provide the same experience like a other Verified contracts including all the function needed with interfaces.

@CollinsC1O
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a frontend and a blockchain developer (I write smart contract using solidity and cairo) and I will love to work on this

@PoulavBhowmick03
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Poulav Bhowmick, a software engineer at Invisible Studios with a robust background in TypeScript, Rust, Solidity Cairo, fullstack development and blockchain technology. My experience includes building robust applications, optimizing functionalities and blockchain integration. I have actively participated in events and open source contributions, enhancing my capability to tackle real-world tech challenges. My projects can be viewed on my GitHub Profile and OnlyDust Profile. Plus I´m active member of Starknet community🇷.

How I plan on tackling this issue

To address this issue, I plan to implement the following solution:

ERC721 Contract Implementation in Cairo:

I'll develop an ERC721 contract in Cairo by defining the necessary functions for minting, transferring, and managing ownership of non-fungible tokens (NFTs). This will include implementing functions like mint, transferFrom, and ownerOf.
Integrate with Hylé:

I'll follow the steps provided in the Hylé documentation to deploy the ERC721 contract on the Hylé devnet. This includes registering the smart contract using the hyled CLI tool, providing a unique contract name, verifier, program ID, and state digest.
Publishing and Proving Payloads:

After deployment, I'll implement the logic to publish payloads and generate proofs to update the contract state on Hylé. This will involve encoding the payloads appropriately and using the hyled CLI to publish and prove the transactions.
Testing and Validation:

I'll write test cases to ensure that the ERC721 contract functions as expected. These tests will validate the minting, transferring, and ownership functionalities, ensuring that the contract interacts correctly with Hylé's proof system.
Documentation:

Finally, I'll document the entire process, including the contract deployment and interaction steps, making it easier for others to replicate or build upon this work.
This approach will ensure that the ERC721 contract is correctly implemented, deployed, and integrated with Hylé, providing a solid foundation for further development and use.

ETA- 3 days

@MachoMaheen
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have substantial experience in blockchain development, particularly in writing and deploying smart contracts using various programming languages and frameworks. My expertise in Cairo, gained through participation in the StarkNet hackathon and other projects, equips me with a deep understanding of developing decentralized applications on the StarkNet ecosystem.

My work includes developing and deploying smart contracts for secure digital asset management, such as the Certify-ETH project at ETHIndia 2022. Additionally, I have experience with Rust and Solidity, which have similar principles to Cairo, making it easier to translate my skills across these technologies. My experience also extends to full-stack development, which allows me to efficiently integrate smart contracts with front-end interfaces, ensuring a seamless user experience.

Having worked on several blockchain projects, including implementing token standards like ERC20, I am well-versed in the nuances of blockchain interactions and smart contract development, which is essential for successfully managing ERC721 tokens.

How I plan on tackling this issue

To approach the problem of writing an ERC721 program in Cairo and deploying it on Hylé, I would proceed with the following steps:

  1. Review Cairo Language and ERC721 Standard:

    • I would begin by reviewing the Cairo language documentation to refresh my understanding of its unique syntax, particularly how it handles storage, transactions, and interactions on the StarkNet blockchain.
    • Simultaneously, I would revisit the ERC721 token standard to ensure that I fully grasp its specifications, including ownership management, transfer mechanisms, and the various interfaces such as IERC721, IERC721Metadata, and IERC721Receiver.
  2. Analyze the Provided ERC20 Contract Example:

    • Before diving into the ERC721 implementation, I would carefully examine the provided ERC20 contract example. This analysis would help me understand how Cairo structures smart contracts and manages token-related logic, enabling me to adapt similar patterns for ERC721.
  3. Design and Structure the ERC721 Contract:

    • I would start by outlining the core components of the ERC721 contract, including state variables to track token ownership, balances, and metadata. The design phase would involve mapping out the required functions such as balanceOf, ownerOf, transferFrom, approve, setApprovalForAll, and safeTransferFrom.
    • Given Cairo’s low-level nature, I would pay special attention to efficiently managing storage and handling large data structures to ensure optimal gas usage and contract performance.
  4. Implement the ERC721 Functions in Cairo:

    • I would proceed with coding the smart contract, implementing the functions based on the ERC721 standard. Each function would be carefully crafted to adhere to the standard while leveraging Cairo’s strengths, such as its support for high-level logic and cryptographic operations.
    • Error handling and event emission would also be key considerations, ensuring that the contract provides clear feedback during token transfers and ownership changes.
  5. Testing and Debugging:

    • After the initial implementation, I would conduct extensive testing to verify that the contract behaves correctly under various scenarios, including edge cases like invalid transfers or unauthorized actions.
    • Using StarkNet’s testing tools, I would simulate different conditions to ensure the contract’s robustness and security, resolving any issues that arise during testing.
  6. Deploying on Hylé:

    • Once the contract passes all tests, I would deploy it on the Hylé platform, following the deployment procedures outlined in the documentation.
    • Post-deployment, I would perform additional tests on the live environment to confirm that the contract interacts seamlessly with the Hylé network and fulfills the expected functionality.
  7. Documentation and Optimization:

    • I would document the development process, including the contract design, implementation details, and any challenges encountered. This documentation would serve as a reference for other developers and contributors.
    • Finally, I would review the contract for potential optimizations, such as reducing gas costs and improving transaction efficiency, ensuring that the ERC721 implementation is both functional and performant.

@jrmncos
Copy link

jrmncos commented Aug 27, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm Software Engineer SR but this would be one of my first issues in web3

How I plan on tackling this issue

I would create the smart contract in Cairo, following the ERC721 standard. Then I will follow the hylé documentation to deploy it

@MPSxDev
Copy link

MPSxDev commented Aug 27, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a process engineer and Cairo enthusiast. Member of DojoCoding. I have participated in Starknet Bootcamp. I am immediately available to work on an issue.

How I plan on tackling this issue

The checklist I would do would be:

  1. Deeply research the documentation and use in other real projects.
  2. Implement the first features.
  3. Test and try to avoid errors and conflicts.
  4. Continue developing until the desired goal is achieved.

I hope they assign me, I am fully available to contribute.

@martinvibes
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

i'm a frontend dev and a blockchain developer, will love to take on this issue and get it done if you give me the chance

How I plan on tackling this issue

this is easy to tackle let me have this one

@DiegoB1911
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a Full Stack Developer with two years of experience. I'm also an active member of Dojo Coding, where I'm expanding my skills in Cairo and Web3 technologies. I'm eager to learn, contribute, and be part of a new project.

How I plan on tackling this issue

Recently, I worked on an issue involving a program that manages ERC721 tokens.
I would implement the necessary functions that comply with the ERC721 standard, such as balanceOf, ownerOf, transferFrom, and approve.
The contract would include minting functionality to create new tokens and transfer functions to allow the transfer of ownership between users.
Once the contract is fully tested and functional, I would deploy it on Hylé.

@0x-minato
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hii I am a Cairo / solidity dev and have previously worked at Hashstack and currently woking at STRKFarm. I have integrated various protocols and worked around ERC20, ERC721 and ERC4626 standards and I think my background is perfectly capable to handle this task

How I plan on tackling this issue

I will start with implementing ERC721 component from cairo-contracts from openzeppelin to the main contract. Then I will proceed to writing the logic to manage ERC721 tokens. After that I will write basic unit tests and then fork tests to confirm and finally deploy to Hyle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers ODHack7
Projects
None yet
Development

No branches or pull requests