diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 55e3560..4f042a2 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -3,7 +3,6 @@ name: docker_publish on: push: branches: - - 'chore/ci-publish-docker' - 'main' tags: - '*' @@ -28,38 +27,4 @@ jobs: secrets: inherit with: publish: true - repoName: finality-gadget - - test_finality_provider: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha }} - - - name: Clone finality-provider repository - run: | - current_hash=$(git rev-parse HEAD) - remote_url=$(git remote get-url origin) - if [[ $remote_url == https://* ]]; then - # For HTTPS URLs - repo_path=$(echo $remote_url | sed -E 's|https://github.com/(.+)(\.git)*|\1|') - else - # For SSH URLs - repo_path=$(echo $remote_url | sed -E 's/.*:(.+)\.git/\1/') - fi - fp_version=$(go list -m github.com/$repo_path@$current_hash) - - git clone https://github.com/babylonlabs-io/finality-provider - cd finality-provider - git checkout base/consumer-chain-support - sed -i "s|github\.com\/babylonlabs-io\/finality-gadget.*|$fp_version|g" go.mod - go mod tidy - - - name: Run op e2e tests - run: | - export PATH=${PATH}:$(go env GOPATH)/bin - cd finality-provider - make op-e2e-devnet - make test-e2e-op + repoName: finality-gadget \ No newline at end of file diff --git a/cwclient/cwclient.go b/cwclient/cwclient.go index 04dc8bc..8d050ad 100644 --- a/cwclient/cwclient.go +++ b/cwclient/cwclient.go @@ -48,6 +48,11 @@ func (cwClient *CosmWasmClient) QueryListOfVotedFinalityProviders( if err != nil { return nil, err } + // BlockVoters's return type is Option> in contract + // Check empty response before unmarshaling + if len(resp.Data) == 0 { + return nil, nil + } votedFpPkHexList := &[]string{} if err := json.Unmarshal(resp.Data, votedFpPkHexList); err != nil { @@ -114,9 +119,9 @@ func createBlockVotersQueryData(queryParams *types.Block) ([]byte, error) { } type contractConfigResponse struct { - ConsumerId string `json:"consumer_id"` - ActivatedHeight uint64 `json:"activated_height"` + ConsumerId string `json:"consumer_id"` } + type ContractQueryMsgs struct { Config *contractConfig `json:"config,omitempty"` BlockVoters *blockVotersQuery `json:"block_voters,omitempty"`