Skip to content

Commit

Permalink
Update core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go
Browse files Browse the repository at this point in the history
  • Loading branch information
winder authored Mar 27, 2024
1 parent 151021b commit d68e290
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,14 @@ func (s *TokenDataReader) getUSDCMessageBody(ctx context.Context, msg cciptypes.
}

// callAttestationApi calls the USDC attestation API with the given USDC message hash.
// The attestation API is rate limited to 10 requests per second, with a temporary ban
// for 5 minutes if 110 requests are made within a 10-second period.
// Documentation: https://developers.circle.com/stablecoins/reference/getattestation
```suggestion

Check failure on line 186 in core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go

View workflow job for this annotation

GitHub Actions / Flakey Test Detection

syntax error: non-declaration statement outside function body

Check failure on line 186 in core/services/ocr2/plugins/ccip/tokendata/usdc/usdc.go

View workflow job for this annotation

GitHub Actions / Flakey Test Detection

string not terminated
// The attestation service rate limit is 10 requests per second. If you exceed 10 requests
// per second, the service blocks all API requests for the next 5 minutes and returns an
// HTTP 429 response.
//
// Documentation:
// https://developers.circle.com/stablecoins/reference/getattestation
// https://developers.circle.com/stablecoins/docs/transfer-usdc-on-testnet-from-ethereum-to-avalanche
func (s *TokenDataReader) callAttestationApi(ctx context.Context, usdcMessageHash [32]byte) (attestationResponse, error) {
body, _, headers, err := s.httpClient.Get(
ctx,
Expand Down

0 comments on commit d68e290

Please sign in to comment.