Skip to content

Connect Photo Upload Form to Submission.createSubmission Contract Call #59

@JamesVictor-O

Description

@JamesVictor-O

#Description
Enable users to submit their cleanup photos to the Submission contract by calling the createSubmission function with the IPFS dataURI. Use the @decleanup/contracts package for type-safe interactions and handle transaction confirmation.

Tasks:

  • Initialize the Submission contract using DCUContracts(Networks.ARBITRUM_SEPOLIA).Submission.connect(signer).

  • A hook will be created, implement the hook after the images have been sucessfully uploaded to ipfs(pinate) and a url is returned.

  • Handle transaction confirmation and display the transaction hash.

  • Catch and display contract-specific errors (e.g., SUBMISSION__InvalidSubmissionData).

  • Update the frontend state to reflect the new submission.

Acceptance Criteria:

  • Users can submit photos to the Submission contract after IPFS upload.

  • The createSubmission function is called with the correct dataURI.

  • Transaction confirmation is awaited, and the hash is displayed.

  • Errors (e.g., invalid dataURI, insufficient gas) are caught and shown to the user.

  • Type-safe interactions are used via @decleanup/contracts.

Notes

this is the link to the type chain implementation docs docs

something else...

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrontendenhancementNew feature or requestonlydust-waveContribute to awesome OSS repos during OnlyDust's open source week

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions