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] Emit event when donator contract is deployed #135

Closed
adrianvrj opened this issue Oct 24, 2024 · 10 comments
Closed

[feat] Emit event when donator contract is deployed #135

adrianvrj opened this issue Oct 24, 2024 · 10 comments
Assignees
Labels
ODHack9 ODHack9.0 issue

Comments

@adrianvrj
Copy link
Member

This issue will be part of ODHack9.0, please apply via Onlydust app

  • Emit an event when a donator contract is successfully deployed by the donator manager contract.
  • The event should contain: the owner (caller address) and the new donator contract address.
  • Please read contributors guide before asking for an issue

Acceptance Criteria

  • Code builds successfully.
  • Event struct has all the attributes needed.
@Iwueseiter
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I'm a frontend and smart contract developer.
This will be my first time contributing to this project and i'd be glad if I get assigned to this task.

How I plan on tackling this issue

Here is how I will tackle this task:

  1. I'll declare an event in donator manager contract, with the required attributes which are: the owner (caller address) and the new donator contract address.
  2. I'll emit the event when a donator contract is successfully deployed by the donator manager contract.

At the end of my implementation, Code builds successfully and event struct will have all the attributes needed.

ETA: 24hrs.

@adrianvrj adrianvrj removed the good first issue Good for newcomers label Oct 24, 2024
@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 Starknet Wolf. I am a software engineer at Invisible Studios, and a blockchain engineer 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, Ethereum, Stellar ecosystem.

How I plan on tackling this issue

To solve this issue, I will modify the constructor of the Donator contract to emit an event when the contract is successfully deployed. This event will include the owner (caller address) and the new donator contract address, as specified in the issue. First, I will define an event structure that contains two fields: owner and contract_address. In the constructor, after the initial values are set, I will use Starknet's event emission functionality to emit this event, passing the owner and the contract address. I'll also ensure that the contract address is retrieved correctly using the Starknet context. Finally, I will write a test case to validate that the event is emitted with the correct data when the donator contract is deployed.
ETA - 2 hours

@NueloSE
Copy link
Contributor

NueloSE commented Oct 24, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

As a skilled solidity and cairo developer with experience in blockchain technologies and contribution to previous testing of smart contracts. Link to previous test: scaffoldstark testing

How I plan on tackling this issue

  1. I need to implement an event in a fund contract that gets triggered when a new donation is received. The event should contain specific information about the donation and the contract.
  2. I'll start by defining the event structure in the contract
  3. Next, I'll implement the receiveDonation method that will emit the event
  4. I've made sure that the event struct contains all the required attributes: donor address, donation amount, current STRKs balance, and fund contract address.
  5. I'll review the code to ensure it meets all the requirements:
  • The event is properly defined and emitted.
  • The receiveDonation method is implemented correctly.
  • The event contains all the required attributes.
  • The code builds successfully.

@Gerson2102
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hey! I'm Gerson. 👋

Member of Dojo Coding. I have contributed before to other Cairo projects like:

  • Raito
  • kakarot-ssj

Can I work on this issue?

Check my OnlyDust profile, I've contributed to many projects: Profile


How I plan on tackling this issue

Plan to Solve the Issue:

  1. Study the codebase to understand the current structure and functionality.
  2. Understand the problem that needs to be solved by thoroughly reading the issue details.
  3. Leverage all provided resources within the issue to get a better grasp of the task at hand.
  4. If I encounter roadblocks, I will ask questions ASAP in the Telegram group to move forward effectively.
  5. I will open a PR and wait for ur feedback

@zleypner
Copy link

zleypner commented Oct 24, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi! I’m Anwar a Software Developer with +3 years of experience, and I would love
to make my first contribution to this project.

I'm excited to take on this issue to challenge myself, and contribute to the project's success. I'm also a member of the Dojo Coding community CR.

How I plan on tackling this issue

First, I’ll read through the Contributor Guidelines and README to ensure I understand the project structure, coding standards, and the process you’re following.

I will begin by examining the donator manager contract to understand how and where the donator contracts are deployed.

I will add an event that triggers upon successful deployment of a donator contract. The event will include the caller's address and the address of the newly created donator contract.

I will define the event struct to include all necessary attributes

After implementing the event, I will conduct tests to verify that the event is emitted correctly during deployment and that all required data is present.

If I run into any problems or questions, I’ll reach out to the maintainers for assistance.

@Gianfranco99
Copy link

Gianfranco99 commented Oct 24, 2024

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have been a developer for over 4 years and have been contributing to the Starknet ecosystem for more than a year. My recent contributions include work on cairo-lint and scaffold-starknet. I’m eager to participate in this project as I see a lot of potential in it and believe it adds valuable functionality to the Starknet ecosystem. Also I'm part of dojo-coding comunity!

How I plan on tackling this issue

I am going to create the event structure with the necessary parameters and when the function has been carried out correctly I am going to emit this event. It is an easy issue to solve
And I would also like to resolve the issue in which the tests of this event should be applied

@ShantelPeters
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am Shantel Peters, a frontend and blockchain developer .My experience with smart contracts will aid in efficiently implementing this functionality.

How I plan on tackling this issue

To address the issue of emitting an event upon the successful deployment of a donator contract, I would define a new event structure that includes the owner’s address and the new donator contract address. In the donator manager contract, I would implement the logic to emit this event immediately after a donator contract is deployed. I will ensure the code builds successfully and that the event struct captures all necessary attributes.

@saimeunt
Copy link
Contributor

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I have contributed to several Cairo projects on OnlyDust and I've worked on very similar issues in the past such as ArkProjectNFTs/bridge#236

How I plan on tackling this issue

I will carefully add the necessary Starknet event and will make sure to emit it correctly where it is required.

@0xprivateChaos
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I bring 2 years of experience writing tests for Solidity smart contracts, with specialized focus on event-driven architectures. Recently, I've expanded into Cairo development where I've noticed interesting parallels between ERC event patterns and Starknet's event system. Working with leveling mechanisms in gaming contracts has given me particular insight into contracts with state progression like this donator contract, where tracking level changes and donations through events becomes crucial for off-chain applications.

How I plan on tackling this issue

Core Event Implementation: Define DonatorCreated event capturing owner address and initial level state, which enables tracking user progression from genesis

State Management: Ensure event emission aligns with DonatorConstants initialization, particularly INITIAL_LEVEL and INITIAL_MAX_STARKS_DONATION_TO_NEXT_LEVEL

Integration Pattern: Structure event to enable future linking with Fund contract events for comprehensive donation tracking

@aniruddhaaps
Copy link

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a cairo dev. A new-comer here, willing and ready to contribute to contribute to solve the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ODHack9 ODHack9.0 issue
Projects
None yet
Development

No branches or pull requests