Skip to content

Commit

Permalink
fix: update go.mod deps
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrajovic committed Oct 7, 2024
1 parent 4cd7f1e commit 0f14da3
Show file tree
Hide file tree
Showing 7 changed files with 2,493 additions and 934 deletions.
244 changes: 150 additions & 94 deletions go.mod

Large diffs are not rendered by default.

3,163 changes: 2,332 additions & 831 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion orchestrator/cosmos/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func customEndpoints(cfg NetworkConfig) clientcommon.Network {
c := clientcommon.LoadNetwork("devnet", "")
c.Name = "custom"
c.ChainId = cfg.ChainID
c.Fee_denom = "inj"
c.FeeDenom = "inj"
c.TmEndpoint = cfg.TendermintRPC
c.ChainGrpcEndpoint = cfg.CosmosGRPC
c.ExplorerGrpcEndpoint = ""
Expand Down
7 changes: 4 additions & 3 deletions orchestrator/cosmos/peggy/broadcast.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package peggy

import (
"context"
sdkmath "cosmossdk.io/math"
"fmt"

cosmostypes "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -235,7 +236,7 @@ func (c broadcastClient) SendOldDepositClaim(_ context.Context, deposit *peggyev
EventNonce: deposit.EventNonce.Uint64(),
BlockHeight: deposit.Raw.BlockNumber,
TokenContract: deposit.TokenContract.Hex(),
Amount: cosmostypes.NewIntFromBigInt(deposit.Amount),
Amount: sdkmath.NewIntFromBigInt(deposit.Amount),
EthereumSender: deposit.Sender.Hex(),
CosmosReceiver: cosmostypes.AccAddress(deposit.Destination[12:32]).String(),
Orchestrator: c.ChainClient.FromAddress().String(),
Expand Down Expand Up @@ -279,7 +280,7 @@ func (c broadcastClient) SendDepositClaim(_ context.Context, deposit *peggyevent
EventNonce: deposit.EventNonce.Uint64(),
BlockHeight: deposit.Raw.BlockNumber,
TokenContract: deposit.TokenContract.Hex(),
Amount: cosmostypes.NewIntFromBigInt(deposit.Amount),
Amount: sdkmath.NewIntFromBigInt(deposit.Amount),
EthereumSender: deposit.Sender.Hex(),
CosmosReceiver: cosmostypes.AccAddress(deposit.Destination[12:32]).String(),
Orchestrator: c.ChainClient.FromAddress().String(),
Expand Down Expand Up @@ -361,7 +362,7 @@ func (c broadcastClient) SendValsetClaim(_ context.Context, vs *peggyevents.Pegg
EventNonce: vs.EventNonce.Uint64(),
ValsetNonce: vs.NewValsetNonce.Uint64(),
BlockHeight: vs.Raw.BlockNumber,
RewardAmount: cosmostypes.NewIntFromBigInt(vs.RewardAmount),
RewardAmount: sdkmath.NewIntFromBigInt(vs.RewardAmount),
RewardToken: vs.RewardToken.Hex(),
Members: members,
Orchestrator: c.FromAddress().String(),
Expand Down
3 changes: 2 additions & 1 deletion orchestrator/ethereum/util/peggy.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package util

import (
"bytes"
sdkmath "cosmossdk.io/math"
"fmt"
"math/big"
"regexp"
Expand Down Expand Up @@ -62,7 +63,7 @@ func NewERC20Token(amount uint64, contract string) *ERC20Token {

// PeggyCoin returns the peggy representation of the ERC20
func (e *ERC20Token) PeggyCoin() sdk.Coin {
return sdk.NewCoin(fmt.Sprintf("%s/%s", PeggyDenomPrefix, e.Contract), sdk.NewIntFromBigInt(e.Amount))
return sdk.NewCoin(fmt.Sprintf("%s/%s", PeggyDenomPrefix, e.Contract), sdkmath.NewIntFromBigInt(e.Amount))
}

// ValidateBasic permforms stateless validation
Expand Down
4 changes: 2 additions & 2 deletions orchestrator/pricefeed/coingecko.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"strings"
"time"

sdkmath "cosmossdk.io/math"
"github.com/InjectiveLabs/metrics"
cosmtypes "github.com/cosmos/cosmos-sdk/types"
"github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
"github.com/shopspring/decimal"
Expand Down Expand Up @@ -153,7 +153,7 @@ func checkCoingeckoConfig(cfg *Config) *Config {
return cfg
}

func (cp *CoingeckoPriceFeed) CheckFeeThreshold(erc20Contract common.Address, totalFee cosmtypes.Int, minFeeInUSD float64) bool {
func (cp *CoingeckoPriceFeed) CheckFeeThreshold(erc20Contract common.Address, totalFee sdkmath.Int, minFeeInUSD float64) bool {
metrics.ReportFuncCall(cp.svcTags)
doneFn := metrics.ReportFuncTiming(cp.svcTags)
defer doneFn()
Expand Down
4 changes: 2 additions & 2 deletions orchestrator/relayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package orchestrator

import (
"context"
sdkmath "cosmossdk.io/math"
"sort"
"time"

cosmostypes "github.com/cosmos/cosmos-sdk/types"
gethcommon "github.com/ethereum/go-ethereum/common"
"github.com/pkg/errors"
log "github.com/xlab/suplog"
Expand Down Expand Up @@ -328,7 +328,7 @@ func (l *relayer) findLatestValsetOnEth(ctx context.Context) (*peggytypes.Valset
valset := &peggytypes.Valset{
Nonce: event.NewValsetNonce.Uint64(),
Members: make([]*peggytypes.BridgeValidator, 0, len(event.Powers)),
RewardAmount: cosmostypes.NewIntFromBigInt(event.RewardAmount),
RewardAmount: sdkmath.NewIntFromBigInt(event.RewardAmount),
RewardToken: event.RewardToken.Hex(),
}

Expand Down

0 comments on commit 0f14da3

Please sign in to comment.