Skip to content

Commit

Permalink
Merge branch 'develop' into develop-oracle-assets
Browse files Browse the repository at this point in the history
  • Loading branch information
leonz789 committed Jul 8, 2024
2 parents f525274 + a69174d commit 28806d9
Show file tree
Hide file tree
Showing 174 changed files with 7,469 additions and 7,312 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,38 @@
name: goreleaser

permissions:
# github releases
contents: write

on:
push:
tags:
- "v*.*.*"
# Validate on develop, main, and master branches that the releaser
# is working as expected.
pull_request:
branches:
- develop
- main
- master

jobs:
goreleaser:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.11'
check-latest: true
- name: release dry run
- name: Release dry run
run: make release-dry-run
- name: setup release environment
- name: Release publish
# Do not publish the release for pull requests.
if: github.event_name != 'pull_request'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
version: 2

before:
hooks:
- go mod download
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,9 @@ localnet-show-logstream:
###############################################################################

PACKAGE_NAME:=github.com/ExocoreNetwork/exocore
GOLANG_CROSS_VERSION = v1.21.11
# There is no `goreleaser-cross` package for 1.21.11, so we use the next
# available version of v1.22 with goreleaser version 2.0.0
GOLANG_CROSS_VERSION = v1.22-v2.0.0
GOPATH ?= '$(HOME)/go'
release-dry-run:
docker run \
Expand All @@ -537,7 +539,7 @@ release-dry-run:
-v ${GOPATH}/pkg:/go/pkg \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--clean --skip-validate --skip-publish --snapshot
--clean --skip validate,publish --snapshot

release:
@if [ ! -f ".release-env" ]; then \
Expand Down
14 changes: 14 additions & 0 deletions app/ante/cosmos/fees.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (

errorsmod "cosmossdk.io/errors"
anteutils "github.com/ExocoreNetwork/exocore/app/ante/utils"
oracletypes "github.com/ExocoreNetwork/exocore/x/oracle/types"
sdk "github.com/cosmos/cosmos-sdk/types"
errortypes "github.com/cosmos/cosmos-sdk/types/errors"
authante "github.com/cosmos/cosmos-sdk/x/auth/ante"
Expand Down Expand Up @@ -68,6 +69,19 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo
err error
)

msgs := tx.GetMsgs()
allOracleMsgs := true
for _, msg := range msgs {
if _, ok := msg.(*oracletypes.MsgCreatePrice); !ok {
allOracleMsgs = false
break
}
}
// skip deductgas if this is a oracle price message
if allOracleMsgs {
return next(ctx, tx, simulate)
}

fee := feeTx.GetFee()
if !simulate {
fee, priority, err = dfd.txFeeChecker(ctx, feeTx)
Expand Down
Loading

0 comments on commit 28806d9

Please sign in to comment.