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

spike: emit events on Smart Contract actions on Soroban for Trustless Work #30

Open
techrebelgit opened this issue Jan 22, 2025 · 12 comments

Comments

@techrebelgit
Copy link
Contributor

Enable Event Emission in Soroban Smart Contracts

Objective

Enable Soroban smart contracts to emit events when specific actions occur, such as funding an escrow or changing its status. These events should be easily consumable by the Trustless Work API to notify other roles and parties involved in the escrow. This will create a seamless, real-time communication layer for escrow workflows.


Tasks

1. Research

  • Investigate the capabilities of Soroban for event emission, including:
    • Official documentation.
    • Examples and best practices.
  • Explore existing libraries, tools, and techniques that simplify or optimize event emission.
  • Engage with the Stellar Discord community to gather insights and recommendations.

2. Architecture Proposal

  • Design an architecture for emitting events tied to key actions, such as:
    • Funding an escrow.
    • Status changes.
  • Define how these events will be structured and consumed by the Trustless Work API.

3. Implementation


Expected Deliverables

1. Documentation

  • Overview of the research conducted, including:
    • Soroban's capabilities and limitations.
    • Insights gained from community engagement and tools explored.
  • A clear and concise explanation of the proposed architecture.

2. Proof of Concept (PoC)

  • A sample Soroban smart contract demonstrating event emission for the specified actions.
  • Well-documented code with comments and explanations to ensure clarity for future developers.

Acceptance Criteria

1. Event Structure

  • Events must include sufficient data for downstream processes, such as:
    • Escrow ID
    • Action type
    • Timestamp
    • Relevant metadata

2. PoC Functionality

  • Funding an Escrow:
    • Triggers an event with a payload that includes escrow ID and amount.
  • Status Changes:
    • Triggers an event with a payload that includes escrow ID, old status, and new status.

3. Documentation Quality

  • Must clearly describe:
    • How events are emitted by the smart contract.
    • How events can be consumed by external systems.
    • Libraries, tools, or community-recommended practices used.
@JoelVR17 JoelVR17 changed the title Emit events on Smart Contract actions on Soroban for Trustless Work spike: emit events on Smart Contract actions on Soroban for Trustless Work Jan 22, 2025
@caxtonacollins
Copy link

Can I take care of this issue?

@ooochoche
Copy link

Gm, I have gone through the tasks, expected outcomes and acceptance criteria and would love to take part working on this.

@mimisavage
Copy link

Can I handle this task?

@suhas-sensei
Copy link
Contributor

gm ser, so what i propose i'll implement event emission in Soroban smart contracts for escrow actions (funding, status changes), focusing on creating a structured event system with detailed payloads and comprehensive documentation for the Trustless Work API integration as i have previously done for moonpay docs.

@martinvibes
Copy link

Holla i'm Martin, I'm a frontend developer who enjoys building smooth applications to pixel perfect and engaging websites using JavaScript, typescript and frameworks(React, nextjs, tailwindcss etc.) and i have contributed to other projects that have been merged.
Am also experienced in working and writing smart contracts.
Kindly assign :)

@Jagadeeshftw
Copy link

Proposal to Work on the Issue

I am eager to contribute to this issue and believe I am well-suited for the task, given my extensive experience in Cairo programming and building decentralized applications on StarkNet. My expertise spans across multiple domains crucial for this implementation:

  • Smart Contracts & Blockchain Development: Proven expertise in StarkNet, Stellar, and Rust, with hands-on experience in developing secure and efficient smart contracts, blockchain integrations, and high-performance backend systems.
  • Backend Engineering: Strong background in designing and managing scalable APIs, handling server-side operations, and ensuring robust backend performance for blockchain applications.
  • Frontend Development: Proficient in building intuitive and responsive frontend interfaces using React and Next.js, ensuring seamless interaction between users and blockchain-based applications.

Why Assign This to Me?

I have a track record of delivering high-quality solutions efficiently, with a deep understanding of smart contract security, decentralized architectures, and full-stack development. My ability to bridge frontend, backend, and blockchain components ensures a well-rounded, optimized solution.

Estimated Timeline

I anticipate delivering a fully functional solution within 2 days. Please let me know if I can proceed.

I am excited about the opportunity to contribute and look forward to collaborating!

Best regards,
Jagadeesh B

@ShantelPeters
Copy link

Can I tackle this one?

@Wendyalbert
Copy link

Can I take this issue?

@1nonlypiece
Copy link

Application for Contribution

I am excited about the opportunity to contribute to this issue and am confident that my expertise aligns well with the requirements. With a strong background in Cairo programming and decentralized application development on StarkNet, I bring a well-rounded skill set to deliver an effective solution.

Relevant Expertise

  • Blockchain & Smart Contracts: Extensive experience with StarkNet, Stellar, and Rust, specializing in developing secure and optimized smart contracts, blockchain integrations, and high-performance backend infrastructure.
  • Backend Development: Well-versed in API design, server-side logic, and scalable system architecture, ensuring efficient and seamless backend performance.
  • Frontend Engineering: Skilled in crafting interactive and responsive UI components using React and Next.js, enhancing the user experience for blockchain-based platforms.

Why Consider My Application?

My proven track record of delivering high-quality, optimized solutions in blockchain and full-stack development sets me apart. I have a deep understanding of smart contract security, decentralized architectures, and the synergy between frontend, backend, and blockchain layers—ensuring a seamless and efficient implementation.

ETA

I expect to have a working solution ready within 48 hours. Please let me know if I can proceed with the implementation.

@aniruddhaaps
Copy link

To address this issue, I would
-Research: Explore Soroban's event emission capabilities, official documentation, and best practices. Interact with the Stellar Discord community for further insights and tools to optimize event emission.
-Architecture Proposal: Design a structure for event payloads (e.g., escrow ID, action type, timestamp, metadata) and outline how these events will integrate with the Trustless Work API for real-time updates.
-Implementation: Modify the Trustless Work Smart Contract Repository to emit events for funding and status changes, providing a well-documented PoC with clear comments for future developers. Ensure events include all relevant data and are easy to consume downstream.

@techrebelgit
Copy link
Contributor Author

@ooochoche Any updates? Thanks!

@ooochoche
Copy link

Yeah, I am creating a PR tomorrow

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

No branches or pull requests