Skip to content

Commit 38102d9

Browse files
committed
feat(bridge-history): add s3 client
1 parent d21fa36 commit 38102d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

bridge-history-api/internal/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ type FetcherConfig struct {
3838
BeaconNodeAPIEndpoint string `json:"BeaconNodeAPIEndpoint"`
3939
BlobScanAPIEndpoint string `json:"BlobScanAPIEndpoint"`
4040
BlockNativeAPIEndpoint string `json:"BlockNativeAPIEndpoint"`
41+
AwsS3Endpoint string `json:"AwsS3Endpoint"`
4142
}
4243

4344
// RedisConfig redis config

bridge-history-api/internal/controller/fetcher/l1_fetcher.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ type L1MessageFetcher struct {
3939
// NewL1MessageFetcher creates a new L1MessageFetcher instance.
4040
func NewL1MessageFetcher(ctx context.Context, cfg *config.FetcherConfig, db *gorm.DB, client *ethclient.Client) (*L1MessageFetcher, error) {
4141
blobClient := blob_client.NewBlobClients()
42+
if cfg.AwsS3Endpoint != "" {
43+
blobClient.AddBlobClient(blob_client.NewAwsS3Client(cfg.AwsS3Endpoint))
44+
}
4245
if cfg.BeaconNodeAPIEndpoint != "" {
4346
beaconNodeClient, err := blob_client.NewBeaconNodeClient(cfg.BeaconNodeAPIEndpoint)
4447
if err != nil {

0 commit comments

Comments
 (0)