Skip to content

Commit

Permalink
Merge branch 'master' into fe/adds-scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
abtestingalpha committed May 9, 2024
2 parents e964466 + 84da80d commit 2cb3656
Show file tree
Hide file tree
Showing 159 changed files with 4,643 additions and 4,734 deletions.
2 changes: 1 addition & 1 deletion charts/screener/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.2.4
version: 0.2.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/screener/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
data:
{{ toYaml .Values.files | indent 2 }}
{{ tpl (toYaml .Values.files) . | indent 2 }}
{{- end }}
20 changes: 18 additions & 2 deletions contrib/screener-api/screener/screener.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func NewScreener(ctx context.Context, cfg config.Config, metricHandler metrics.H
}

screener.router = ginhelper.New(logger)
screener.router.Use(screener.metrics.Gin())
screener.router.Handle(http.MethodGet, "/:ruleset/address/:address", screener.screenAddress)

screener.router.Handle(http.MethodPost, "/api/data/sync", screener.authMiddleware(cfg), screener.blacklistAddress)
Expand Down Expand Up @@ -144,6 +145,12 @@ func (s *screenerImpl) fetchBlacklist(ctx context.Context) {
// @Produce json
// @Router /api/data/sync [post].
func (s *screenerImpl) blacklistAddress(c *gin.Context) {
var err error
ctx, span := s.metrics.Tracer().Start(c.Request.Context(), "blacklistAddress")
defer func() {
metrics.EndSpanWithErr(span, err)
}()

var blacklistBody client.BlackListBody

// Grab the body of the JSON request and unmarshal it into the blacklistBody struct.
Expand All @@ -152,6 +159,14 @@ func (s *screenerImpl) blacklistAddress(c *gin.Context) {
return
}

span.SetAttributes(attribute.String("type", blacklistBody.TypeReq))
span.SetAttributes(attribute.String("id", blacklistBody.ID))
span.SetAttributes(attribute.String("data", blacklistBody.Data))
span.SetAttributes(attribute.String("network", blacklistBody.Network))
span.SetAttributes(attribute.String("tag", blacklistBody.Tag))
span.SetAttributes(attribute.String("remark", blacklistBody.Remark))
span.SetAttributes(attribute.String("address", blacklistBody.Address))

blacklistedAddress := db.BlacklistedAddress{
TypeReq: blacklistBody.TypeReq,
ID: blacklistBody.ID,
Expand All @@ -164,7 +179,8 @@ func (s *screenerImpl) blacklistAddress(c *gin.Context) {

switch blacklistBody.TypeReq {
case "create":
if err := s.db.PutBlacklistedAddress(c, blacklistedAddress); err != nil {
if err := s.db.PutBlacklistedAddress(ctx, blacklistedAddress); err != nil {
span.AddEvent("error", trace.WithAttributes(attribute.String("error", err.Error())))
c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
return
}
Expand Down Expand Up @@ -262,7 +278,7 @@ func (s *screenerImpl) Start(ctx context.Context) error {
// @Success 200 {object} map[string]bool "Returns the risk assessment result"
// @Failure 400 {object} map[string]string "Returns error if the required parameters are missing or invalid"
// @Failure 500 {object} map[string]string "Returns error if there are problems processing the indicators"
// @Router /screen/{ruleset}/{address} [get]
// @Router /screen/{ruleset}/{address} [get].
func (s *screenerImpl) screenAddress(c *gin.Context) {
var err error

Expand Down
22 changes: 22 additions & 0 deletions packages/contracts-communication/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.6.1](https://github.com/synapsecns/sanguine/compare/[email protected]@1.6.1) (2024-05-09)


### Bug Fixes

* **contracts-communication:** interchain module ignore nonces ([#2604](https://github.com/synapsecns/sanguine/issues/2604)) ([be4351b](https://github.com/synapsecns/sanguine/commit/be4351be2a5954e6d2c11471b5e93de99b3e42b6))





# [1.6.0](https://github.com/synapsecns/sanguine/compare/[email protected]@1.6.0) (2024-05-09)


### Features

* **contracts-communication:** remove batching ([#2599](https://github.com/synapsecns/sanguine/issues/2599)) ([e6588f7](https://github.com/synapsecns/sanguine/commit/e6588f7dab0d4314e1c18b834708264177abdc7a))





## [1.5.4](https://github.com/synapsecns/sanguine/compare/[email protected]@1.5.4) (2024-05-08)

**Note:** Version bump only for package contracts-communication
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"latestInterchainClient": "InterchainClientV1",
"trustedModules": ["SynapseModule"],
"appConfig": {
"0_requiredResponses": 1,
"1_optimisticPeriod": 30
"requiredResponses": 1,
"optimisticPeriod": 30
},
"messageLengthEstimate": 1024
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"latestInterchainClient": "InterchainClientV1",
"trustedModules": ["SynapseModule"],
"appConfig": {
"0_requiredResponses": 1,
"1_optimisticPeriod": 30
"requiredResponses": 1,
"optimisticPeriod": 30
},
"gasLimit": 500000
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"claimFeeBPS": 10,
"feeCollector": "0xAe61329Ce0AfFA55A7174916214fC2560a1CdD9f",
"feeRecipient": "0xAe61329Ce0AfFA55A7174916214fC2560a1CdD9f",
"gasOracleName": "SynapseGasOracleV1",
"threshold": 6,
"verifiers": [
Expand Down
Loading

0 comments on commit 2cb3656

Please sign in to comment.