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

[RFQ] Enable Message Passing linked to tokens #1805

Open
trajan0x opened this issue Jan 9, 2024 · 2 comments
Open

[RFQ] Enable Message Passing linked to tokens #1805

trajan0x opened this issue Jan 9, 2024 · 2 comments

Comments

@trajan0x
Copy link
Contributor

trajan0x commented Jan 9, 2024

No description provided.

@aureliusbtc aureliusbtc added this to RFQ Jan 7, 2024
@trajan0x trajan0x converted this from a draft issue Jan 9, 2024
@trajan0x
Copy link
Contributor Author

trajan0x commented Jan 9, 2024

Blocked by contracts or smnth, right?

@trajan0x trajan0x added the small label Jun 24, 2024
@github-project-automation github-project-automation bot moved this from Post Launch to Done in RFQ Jun 24, 2024
@trajan0x trajan0x reopened this Jun 24, 2024
@trajan0x trajan0x removed the small label Jun 24, 2024
Copy link

greptile-apps bot commented Jun 24, 2024

To enable message passing linked to tokens in the RFQ service, follow these steps:

  1. Update Swagger Definitions:

    • Modify swagger.yaml and swagger.json to include a new field message in PutQuoteRequest and GetQuoteResponse.
    model.PutQuoteRequest:
      properties:
        message:
          type: string
    model.GetQuoteResponse:
      properties:
        message:
          type: string
  2. Update API Models:

    • Modify response.go to include the Message field in GetQuoteResponse and PutQuoteRequest structs.
    type GetQuoteResponse struct {
      // existing fields...
      Message string `json:"message"`
    }
    type PutQuoteRequest struct {
      // existing fields...
      Message string `json:"message"`
    }
  3. Update Database Models:

    • Modify model.go to include the Message field in RequestForQuote struct.
    type RequestForQuote struct {
      // existing fields...
      Message string
    }
  4. Update Quoter Logic:

    • Modify quoter.go to handle the Message field when generating and submitting quotes.
    func (m *Manager) generateQuote(ctx context.Context, keyTokenID string, chainID int, address common.Address, balance *big.Int, destRFQAddr string) (quote *model.PutQuoteRequest, err error) {
      // existing logic...
      quote = &model.PutQuoteRequest{
        // existing fields...
        Message: "Your custom message",
      }
      return quote, nil
    }

References

/services/rfq/api/docs/swagger.yaml
/services/rfq/api/docs/swagger.json
/services/rfq/api/model/response.go
/services/rfq/relayer/reldb/base/model.go
/services/rfq/relayer/quoter/quoter.go
/services/rfq/api
/docs/bridge/docs/rfq/API
/docs/bridge/docs/rfq/Relayer

Ask Greptile

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

No branches or pull requests

1 participant