Skip to content

Commit

Permalink
Merge pull request #554 from DefiantLabs/feat/osmosis-v25-updates-v1
Browse files Browse the repository at this point in the history
feat/osmosis v25 updates v1
  • Loading branch information
pharr117 committed Jun 17, 2024
2 parents 7ad993c + f5c5280 commit 169febb
Show file tree
Hide file tree
Showing 17 changed files with 532 additions and 297 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19'
go-version: '1.21'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19-alpine3.16 AS build-env
FROM golang:1.21.10-alpine3.18 AS build-env

# Customize to your build env

Expand Down Expand Up @@ -77,8 +77,8 @@ COPY --from=build-env /usr/lib/libonig.so.5 /lib
COPY --from=build-env /usr/lib/libcurl.so.4 /lib
COPY --from=build-env /lib/libz.so.1 /lib
COPY --from=build-env /usr/lib/libnghttp2.so.14 /lib
COPY --from=build-env /lib/libssl.so.1.1 /lib
COPY --from=build-env /lib/libcrypto.so.1.1 /lib
COPY --from=build-env /lib/libssl.so.3 /lib
COPY --from=build-env /lib/libcrypto.so.3 /lib
COPY --from=build-env /usr/lib/libbrotlidec.so.1 /lib
COPY --from=build-env /usr/lib/libbrotlicommon.so.1 /lib

Expand Down
31 changes: 31 additions & 0 deletions block-sdk/modules/auction/types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package auction

import (
parsingTypes "github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules"
txModule "github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules/tx"
sdk "github.com/cosmos/cosmos-sdk/types"
)

const (
MsgUpdateParams = "/sdk.auction.v1.MsgUpdateParams"
MsgAuctionBid = "/sdk.auction.v1.MsgAuctionBid"
)

// The Skip Block SDK MsgAuctionBid message allows for the creation of a bid to execute a set of Transactions at the top of a block.
// It is part of the MEV Lane x/auction module (https://docs.skip.money/blocksdk/lanes/existing-lanes/mev).
// Research is being done on how the application should handle this message in the TX message parser.
type WrapperMsgAuctionBid struct {
txModule.Message
}

func (sf *WrapperMsgAuctionBid) String() string {
return ""
}

func (sf *WrapperMsgAuctionBid) HandleMsg(msgType string, msg sdk.Msg, log *txModule.LogMessage) error {
return nil
}

func (sf *WrapperMsgAuctionBid) ParseRelevantData() []parsingTypes.MessageRelevantInformation {
return nil
}
19 changes: 14 additions & 5 deletions core/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"time"
"unsafe"

"github.com/DefiantLabs/cosmos-tax-cli/block-sdk/modules/auction"
"github.com/DefiantLabs/cosmos-tax-cli/config"
"github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules/authz"
"github.com/DefiantLabs/cosmos-tax-cli/cosmos/modules/bank"
Expand Down Expand Up @@ -59,6 +60,8 @@ var messageTypeHandler = map[string][]func() txtypes.CosmosMessage{
staking.MsgBeginRedelegate: {func() txtypes.CosmosMessage { return &staking.WrapperMsgBeginRedelegate{} }},
ibc.MsgRecvPacket: {func() txtypes.CosmosMessage { return &ibc.WrapperMsgRecvPacket{} }},
ibc.MsgAcknowledgement: {func() txtypes.CosmosMessage { return &ibc.WrapperMsgAcknowledgement{} }},
// Support is not fully built out for this message parser
// auction.MsgAuctionBid: {func() txtypes.CosmosMessage { return &auction.WrapperMsgAuctionBid{} }},
}

// These messages are ignored for tax purposes.
Expand All @@ -71,6 +74,11 @@ var messageTypeIgnorer = map[string]interface{}{
authz.MsgExec: nil,
authz.MsgGrant: nil,
authz.MsgRevoke: nil,

// block-sdk auction module parameter updates are not taxable
auction.MsgUpdateParams: nil,
auction.MsgAuctionBid: nil,

// Making a config change is not taxable
distribution.MsgSetWithdrawAddress: nil,
// Making a stableswap config change is not taxable
Expand Down Expand Up @@ -101,11 +109,12 @@ var messageTypeIgnorer = map[string]interface{}{
incentives.MsgCreateGauge: nil,
incentives.MsgAddToGauge: nil,
// Locking/unlocking is not taxable
lockup.MsgBeginUnlocking: nil,
lockup.MsgLockTokens: nil,
lockup.MsgBeginUnlockingAll: nil,
lockup.MsgUnlockPeriodLock: nil,
lockup.MsgUnlockTokens: nil,
lockup.MsgBeginUnlocking: nil,
lockup.MsgLockTokens: nil,
lockup.MsgBeginUnlockingAll: nil,
lockup.MsgUnlockPeriodLock: nil,
lockup.MsgUnlockTokens: nil,
lockup.MsgSetRewardReceiverAddress: nil,
// Protorev taxable events are handled in epoch BeginBlock events
protorev.MsgSetDeveloperAccount: nil,
// Unjailing and updating params is not taxable
Expand Down
Loading

0 comments on commit 169febb

Please sign in to comment.