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

SPL Support v2 #43

Open
wants to merge 32 commits into
base: main
Choose a base branch
from
Open

SPL Support v2 #43

wants to merge 32 commits into from

Conversation

csmarc
Copy link
Contributor

@csmarc csmarc commented Nov 22, 2024

Added two separate function which have a similar
This pull request introduces several changes to the anchor/programs/gigentic module, focusing on enhancing the service review and payment functionalities, as well as integrating SPL token support. The most important changes include adding constants for review limits, modifying context structures for service reviews, and introducing new contexts for SPL token payments.

Enhancements to service review and payment functionalities:

anchor/programs/gigentic/src/constants.rs: Added constants MAX_REVIEW_LENGTH and MAX_REVIEWS to define limits for reviews.
anchor/programs/gigentic/src/contexts/agent_to_consumer_rating.rs and anchor/programs/gigentic/src/contexts/consumer_to_agent_rating.rs: Removed service account and added constraints to ensure the review account is correctly associated with the signer. [1] [2] [3]
Introduction of SPL token support:

anchor/programs/gigentic/src/contexts/pay_service_spl.rs: Added a new context PayServiceSpl to handle service payments using SPL tokens, including escrow and token transfer logic.
anchor/programs/gigentic/src/contexts/sign_service_spl.rs: Added a new context SignServiceSpl to handle the signing of services and transferring SPL tokens from escrow to the service provider and fee account.
Modifications to existing service initialization and payment contexts:

anchor/programs/gigentic/src/contexts/init_service.rs: Added service_provider_token_account and service_authority accounts to the InitializeService context.
anchor/programs/gigentic/src/contexts/pay_service.rs: Updated the PayService context to include review_no as an instruction parameter and added logic to handle review initialization and escrow details. [1] [2] [3] [4]
These changes collectively enhance the review system, ensure proper association of reviews with accounts, and introduce support for SPL token transactions.

Copy link

vercel bot commented Nov 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gigentic-frontend ❌ Failed (Inspect) Nov 25, 2024 7:14am

Copy link

nx-cloud bot commented Nov 22, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit ede6f85. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
nx build web

Sent with 💌 from NxCloud.

@csmarc csmarc changed the title Sol support mtest SPL Support v2 Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants