web3wagers / gostarkme

Funds recollection project in Starknet ecosystem
http://web3wagers.github.io/gostarkme/
GNU Affero General Public License v3.0
13 stars 42 forks source link

[test] Test event emit when fund contract receives vote #145

Open adrianvrj opened 2 days ago

adrianvrj commented 2 days ago

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

Acceptance Criteria

estherbreath commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a Smart contract developer, in Solidity and Cairo languages and would like to work on this issue. Testing is one of my areas of interest as a developer.

How I plan on tackling this issue

To approach this issue, I would:

• Review the  the current implementation of fund voting to locate where the event should be emitted.
• Modify the relevant function(s) to emit the new event, ensuring that all required parameters are passed correctly. 
• Create unit tests to verify event emission, by testing various scenarios.

ETA: 2 days

Mystic-Nayy commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a web3 developer, I have expertise in smart contracts, decentralized technologies, and frameworks like React. I can build innovative dApps, contribute to open-source projects, educate others, and network with industry leaders to advance my career in the decentralized space.

ETA => 2 days after being assign

How I plan on tackling this issue

Create a test that triggers the relevant function to emit the event, verifying that it includes all expected values. Ensure your test adheres to the standards outlined in the contributors guide. Run all tests to confirm that your new test passes successfully and meets the acceptance criteria.

DiegoB1911 commented 2 days ago

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 a member of Dojo Coding, where I'm expanding my expertise in Cairo and Web3 technologies. I'm enthusiastic about learning, and becoming a part of this project.

How I plan on tackling this issue

To solve this, I will:

  1. Analyze the contract functionality.
  2. Develop a test to verify that the event is emitted correctly using assert_emitted.
  3. Verify that everything works as expected and document the code. ETA: 2 days
diegoTech14 commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello @adrianvrj

I'm a software engineer from Costa Rica and a proud member of Dojo Coding. I've contributed to projects like Go Stark Me, Coffiblocks, and DipDup, and I have experience with technologies such as JavaScript, Node.js, PHP, Java, C#, and Cairo. I would love the opportunity to help with this issue and contribute to your project

How I plan on tackling this issue

For this issue I will:

1. Understand the fund contract: I will analyze the fund contract the get more context about it and design good test cases

2. Test event: I will create a test to verify that the event is emitted when the fund receives a vote.

3. Test pass: I will ensure all the tests pass successfully.

4. Documentation: I will prepare any necessary documentation to support the implementation.

ETA: 2-3 days

Looking forward to your feedback!

Best regards,

Diego Duarte Fernández.

NueloSE commented 2 days ago

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

[test] Test event emit when fund contract receives vote #145 
  1. Implement the Event Emission
    • I'll define the event structure in the fund contract
    • Implement the method that receives vote and emits the event 2 Add a Test I will create a test file for the fund contract. And write a test case to verify the event emission
  2. Verify Implementation I will ensure the event is properly defined and emitted. I will finaly check that the test passes successfully.
zleypner commented 2 days ago

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 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.

Then I will review the existing fund voting mechanism to identify the best location for emitting the event.

I will modify the relevant functions to include the new event, ensuring all necessary parameters are passed correctly.

I plan to test and verify the correct emission of the event under various scenarios.

ETA: 2-3days

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

juandiegocv27 commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

hI @adrianvrj 👋🏻. I’m Juan Diego, a software engineer with experience in Web3 and smart contract development. I’m currently working on ByteBeasts, an on-chain RPG, and I’m part of the Dojo Coding community, where I’ve been involved in projects focused on on-chain logic and event-driven architectures. I have solid experience in Rust, and I’m currently learning Cairo to expand my skills further in the StarkNet ecosystem. I’ve contributed to several open-source projects, working with smart contracts, and I’m comfortable with writing and testing code to ensure event emissions are working correctly. I’m really excited to bring my expertise to this issue and help make an impact.

How I plan on tackling this issue

ETA: 3-4 days

ShantelPeters commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a blockchain developer with vast knowledge in languages as cairo, typescript, javascript, Html, Css , solidity, React etc.Drawing on my background in smart contract development and testing, I would ensure comprehensive test coverage to validate that the event emission works as intended and all tests pass successfully.

How I plan on tackling this issue

To solve the issue of ensuring the correct emission of an event as per issue #137, I would first examine the context provided in that issue to understand the event's expected structure and values. Next, I would implement a unit test specifically targeting the function responsible for emitting the event. This test will check that the event is emitted with all required attributes and assert that the values match the expected output.

saimeunt commented 2 days ago

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 https://github.com/ArkProjectNFTs/bridge/pull/236

How I plan on tackling this issue

I will carefully craft a test to make sure the event is emitted using Starknet Foundry and assert_emitted.

raizo07 commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello, can I be assigned to work on this issue?

I'm a software developer with over 4 years experience

Here's my OnlyDust profile https://app.onlydust.com/u/raizo07

ETA: One day

ryzen-xp commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I am a Full Stack Blockchain developer with expertise in Cairo, Solidity, and TypeScript. I have worked on smart contract testing and event validation in projects such as Worldcoin-Bridge-Linea and ARK Project NFTs Bridge.

How I plan on tackling this issue

I see #137 and This is my approch => [1]=>Review the contract to understand how the vote-related event is emitted. [2]=>Write a test to simulate voting and trigger the contract receiving the vote. [3]=>Verify that the emitted event contains all the expected values. [4]=>Ensure the test passes successfully and aligns with the acceptance criteria.

0xprivateChaos commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

I bring 2 years of hands-on experience in writing and optimizing tests for Solidity smart contracts, which has given me strong foundation in blockchain testing patterns. Recently, I've expanded my expertise into Cairo development, actively writing contracts and their corresponding tests. My combination of established testing experience in Solidity and fresh perspective in Cairo, along with deep theoretical knowledge, positions me well to tackle this testing challenge effectively.

How I plan on tackling this issue

Implement event in fund contract. Then write test in which i will implement a method such that fund contract receives a vote and verify that even is emitted.

aniruddhaaps commented 2 days ago

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

BrunoAmbricca commented 2 days ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hello guys, I have been working for the past 4 years as a developer with multiple languages such as ts, and for the past 3 months learning and working with cairo on my own projects.

How I plan on tackling this issue

I would look the method that needs to emit an event, follow the contributor guidelines, do the feature and test all it´s cases.

mimiprosper commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Am a smart contract developer (solidity & starknet cairo). Am a graduate of starknet-cairo developer bootcamp. Am also a smart contract auditor and technical writer. As a smart contract auditor, testing is what i know in-depth and understand. I have audited lots of code bases. I understand how important thorough testing are in the web3 space.

How I plan on tackling this issue

I would follow the guideline in the repo for fork, clone & pull request. I would clone the project on my local machine. I would study the code base (fund contract receives vote events). Reading the code base will make me understand what events are expected to be emitted. Then i write test to make sure that what the fund contract receives vote events are expected to emit are correctly emitted.

LazarusAA commented 1 day ago

I am applying to this issue via OnlyDust platform.

My background and how it can be leveraged

Hi, I'm Alvaro Lazarus a blockchain developer and a new member of Dojo Coding, I've worked with testing Cairo contracts in the past which makes me confident I can complete this issue. Also it seem like an awesome first contribution to the GoStarkMe project.

How I plan on tackling this issue

Thank you for the consideration

ETA: 48 hrs

blessingbytes commented 1 day ago

I'd like to handle this task.

GideonBature commented 1 day ago

Hi, I'm Gideon Bature, a Software Engineer and I'll be working on issue #146.

I estimate this will take 2 days to complete.

This is how I would tackle this issue:

  1. I will write a test using the spy events method and a mock up event to test and make sure that the event is emitting correctly all the expected values.
  2. I will test using snforge from snfoundry to make sure the test passes successfully.
GideonBature commented 1 day ago

Hi, I'm Gideon Bature, a Software Engineer and I'll be working on issue #145.

I estimate this will take 2 days to complete.

This is how I would tackle this issue:

  1. I will write a test using the spy events method and a mock up event to test and make sure that the event is emitting correctly all the expected values.
  2. I will test using snforge from snfoundry to make sure the test passes successfully.
sasasamaes commented 1 day ago

May I take this issue on?

ETA: 2 days

obacollins-lab commented 1 day ago

Can I take care of this issue?

Akshola00 commented 1 day ago

I'd be happy to do this.

jaiminRaiyani commented 1 day ago

Could I be assigned to this?

OWK50GA commented 1 day ago

I am applying to this issue via OnlyDust platform.

Hi, I am Wilfrid Okorie, a Software Engineer adept in writing and testing Starknet Smart Contracts, and I ask to deal with issue #145.

I estimate that this issue will take me 2 days to deal with.

How I Intend Tackling The Task:

First of all, I will go into the writing of the smart contract and have a look at it, to get the variables expected to be contained in the event emission when the fund contract receives a vote. Next, I will go into my test.cairo (or equivalent) and use the spy_events function to assert that the expected variables have been emitted. This will be done by first setting up our test and creating the mutable spy variable using the spy_events() method. Next, I will call the function that is supposed to emit the said event using the dispatcher. Next, I will use assert_emitted() to assert that the event is emitted when the function is called. In a case where this does not work, I will first of all use more explicit methods to attempt fetching all the events explicity using get_events() and will go on with the assertion.

If the event is found not to have emitted using the methods i.e. the tests fail to pass, then the set up and emission can be looked into in issue #137

martinvibes commented 1 day ago

hello @ i'm an experienced frontend developer and a blockchain developer i would love to work on this issue Pleasee kindly assign :)

shubha-me commented 1 day ago

Could I take on this issue?

SoarinSkySagar commented 1 day ago

gm! I am Sagar Rana, and I am experienced in writing Cairo smart contracts along with snforge tests. you can check my contributions and my works on my github and onlydust profile. here is how I would approach this issue: Once issue #137 is resolved, I will add the function test_receiveVote in test_fund.cairo. I will add test cases to ensure that the function is working with the events being emitted correctly and will make sure the tests are passing before opening the PR.

Pvsaint commented 21 hours ago

Can I tackle this one?