@@ -21,7 +21,6 @@ import (
2121 "github.com/smartcontractkit/chainlink/v2/core/services/ocr2/plugins/ccip/tokendata/http"
2222)
2323
24- // TODO: double check the validty of default values for lombard's API after checking docs
2524const (
2625 apiVersion = "v1"
2726 attestationPath = "deposits/getByHash"
@@ -35,8 +34,8 @@ const (
3534 maxCoolDownDuration = 10 * time .Minute
3635
3736 // defaultRequestInterval defines the rate in requests per second that the attestation API can be called.
38- // this is set according to the APIs documentated 10 requests per second rate limit.
39- defaultRequestInterval = 100 * time .Millisecond
37+ // this is set according to the APIs recommended 5 requests per second rate limit.
38+ defaultRequestInterval = 200 * time .Millisecond
4039
4140 // APIIntervalRateLimitDisabled is a special value to disable the rate limiting.
4241 APIIntervalRateLimitDisabled = - 1
@@ -74,10 +73,9 @@ type TokenDataReader struct {
7473type messageAttestationResponse struct {
7574 MessageHash string `json:"message_hash"`
7675 Status attestationStatus `json:"status"`
77- Attestation string `json:"attestation"` // Attestation represented by abi.encode(payload, proof)
76+ Attestation string `json:"attestation,omitempty "` // Attestation represented by abi.encode(payload, proof)
7877}
7978
80- // TODO: Adjust after checking API docs
8179type attestationRequest struct {
8280 PayloadHashes []string `json:"messageHash"`
8381}
@@ -86,8 +84,6 @@ type attestationResponse struct {
8684 Attestations []messageAttestationResponse `json:"attestations"`
8785}
8886
89- // TODO: Implement encoding/decoding
90-
9187type sourceTokenData struct {
9288 SourcePoolAddress []byte
9389 DestTokenAddress []byte
0 commit comments