From f1c01e78607363e3d51ce374a6ae8075aee9a57c Mon Sep 17 00:00:00 2001 From: trung Date: Mon, 30 Oct 2023 14:35:14 +0700 Subject: [PATCH] refactor: verify contracts via blockscout worker --- infrastructure/blockscout/httpclient.go | 6 +++--- infrastructure/httpapi/handlers/contract_verifiers.go | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/infrastructure/blockscout/httpclient.go b/infrastructure/blockscout/httpclient.go index 633ee91..c1d36ae 100644 --- a/infrastructure/blockscout/httpclient.go +++ b/infrastructure/blockscout/httpclient.go @@ -1383,7 +1383,7 @@ func (client *HTTPClient) Verify(bodyParams interface{}) (interface{}, error) { return nil, err } - rawRespBody, err := client.requestPost(client.getUrl(HARD_HAT_POST_INTERFACE, ""), postBody) + rawRespBody, err := client.requestPost(client.getWorkerUrl(HARD_HAT_POST_INTERFACE, ""), postBody) if err != nil { return nil, err } @@ -1423,7 +1423,7 @@ func (client *HTTPClient) VerifyFlattened(bodyParams interface{}) (interface{}, return nil, err } - rawRespBody, err := client.requestPost(client.getUrl(VERIFY_FLATTENED, ""), postBody) + rawRespBody, err := client.requestPost(client.getWorkerUrl(VERIFY_FLATTENED, ""), postBody) if err != nil { return nil, err } @@ -1526,7 +1526,7 @@ func (client *HTTPClient) Logs(bodyParams interface{}) (interface{}, error) { return nil, err } - rawRespBody, err := client.requestPost(client.getUrl(HARD_HAT_POST_INTERFACE, ""), postBody) + rawRespBody, err := client.requestPost(client.getWorkerUrl(HARD_HAT_POST_INTERFACE, ""), postBody) if err != nil { return nil, err } diff --git a/infrastructure/httpapi/handlers/contract_verifiers.go b/infrastructure/httpapi/handlers/contract_verifiers.go index b4f6fa0..84eb95a 100644 --- a/infrastructure/httpapi/handlers/contract_verifiers.go +++ b/infrastructure/httpapi/handlers/contract_verifiers.go @@ -169,8 +169,7 @@ func (handler *ContractVerifiers) VerifyFlattened(ctx *fasthttp.RequestCtx) { httpapi.SuccessNotWrappedResult(ctx, resp) } -//checkverifystatus - +// checkverifystatus func (handler *ContractVerifiers) ContractActions(ctx *fasthttp.RequestCtx) { startTime := time.Now() recordMethod := "CheckVerifyStatus"