Open trajan0x opened 8 months ago
To enable message passing linked to tokens in the RFQ service, follow these steps:
Update Swagger Definitions:
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
Update API Models:
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"`
}
Update Database Models:
model.go
to include the Message
field in RequestForQuote
struct.
type RequestForQuote struct {
// existing fields...
Message string
}
Update Quoter Logic:
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
}
/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
Blocked by contracts or smnth, right?