Skip to content

Commit

Permalink
fix: fix action error
Browse files Browse the repository at this point in the history
  • Loading branch information
mikebraver committed Aug 30, 2024
1 parent 950f2ca commit ad34043
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion precompiles/avs/avs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ func (suite *AVSManagerPrecompileSuite) TestRegisterAVS() {
for _, tc := range testcases {
tc := tc
suite.Run(tc.name, func() {

baseFee := suite.App.FeeMarketKeeper.GetBaseFee(suite.Ctx)

// malleate testcase
Expand Down
10 changes: 5 additions & 5 deletions precompiles/avs/query_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package avs_test

import (
sdkmath "cosmossdk.io/math"
"fmt"
"math/big"
"time"

sdkmath "cosmossdk.io/math"

avsManagerPrecompile "github.com/ExocoreNetwork/exocore/precompiles/avs"
exocmn "github.com/ExocoreNetwork/exocore/precompiles/common"
assetstype "github.com/ExocoreNetwork/exocore/x/assets/types"
operatorKeeper "github.com/ExocoreNetwork/exocore/x/operator/keeper"
"github.com/ExocoreNetwork/exocore/x/operator/types"
"github.com/ethereum/go-ethereum/common"
"math/big"
"time"

"github.com/ethereum/go-ethereum/core/vm"
)
Expand Down Expand Up @@ -107,7 +109,6 @@ func (suite *AVSManagerPrecompileSuite) TestGetOptedInOperatorAccAddrs() {
suite.Require().NoError(err, "failed to unpack output", err)
suite.Require().Equal(1, len(out))
suite.Require().Equal(operatorAddress, out[0])

},
100000,
false,
Expand Down Expand Up @@ -197,7 +198,6 @@ func (suite *AVSManagerPrecompileSuite) TestAVSUSDValue() {
err := s.precompile.UnpackIntoInterface(&out, avsManagerPrecompile.MethodGetAVSUSDValue, bz)
s.Require().NoError(err, "failed to unpack output", err)
s.Require().Equal(expectedUSDvalue.BigInt(), out)

},
100000,
false,
Expand Down
3 changes: 2 additions & 1 deletion precompiles/avs/setup_test.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package avs_test

import (
"testing"

sdkmath "cosmossdk.io/math"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/ethereum/go-ethereum/common"
"testing"

"github.com/ExocoreNetwork/exocore/precompiles/avs"
"github.com/ExocoreNetwork/exocore/testutil"
Expand Down
1 change: 0 additions & 1 deletion precompiles/avs/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func (suite *AVSManagerPrecompileSuite) TestOptInList() {
suite.NoError(err)

suite.Contains(avsList, suite.avsAddr)

}

func (suite *AVSManagerPrecompileSuite) TestOptOut() {
Expand Down
4 changes: 2 additions & 2 deletions testutil/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func BroadcastTxBytes(app *app.ExocoreApp, txEncoder sdk.TxEncoder, tx sdk.Tx) (
req := abci.RequestDeliverTx{Tx: bz}
res := app.BaseApp.DeliverTx(req)
if res.Code != 0 {
return abci.ResponseDeliverTx{}, errorsmod.Wrapf(errortypes.ErrInvalidRequest, res.Log)
return abci.ResponseDeliverTx{}, errortypes.ErrInvalidRequest.Wrap(res.Log)
}

return res, nil
Expand Down Expand Up @@ -237,7 +237,7 @@ func checkTxBytes(app *app.ExocoreApp, txEncoder sdk.TxEncoder, tx sdk.Tx) (abci
req := abci.RequestCheckTx{Tx: bz}
res := app.BaseApp.CheckTx(req)
if res.Code != 0 {
return abci.ResponseCheckTx{}, errorsmod.Wrapf(errortypes.ErrInvalidRequest, res.Log)
return abci.ResponseCheckTx{}, errortypes.ErrInvalidRequest.Wrap(res.Log)
}

return res, nil
Expand Down
3 changes: 2 additions & 1 deletion x/feedistribution/keeper/allocation.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package keeper

import (
"sort"

"cosmossdk.io/math"
avstypes "github.com/ExocoreNetwork/exocore/x/avs/types"
"github.com/ExocoreNetwork/exocore/x/feedistribution/types"
sdk "github.com/cosmos/cosmos-sdk/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"sort"
)

// Based on the epoch, AllocateTokens performs reward and fee distribution to all validators.
Expand Down
2 changes: 1 addition & 1 deletion x/feedistribution/keeper/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func (suite *KeeperTestSuite) prepare() {
suite.CheckLengthOfValidatorUpdates(0, nil, "delegate but not self delegate")
// mark it as self delegation
err = suite.App.DelegationKeeper.AssociateOperatorWithStaker(
suite.Ctx, lzID, operatorAddress, staker,
suite.Ctx, lzID, operatorAddress, staker.Bytes(),
)
suite.NoError(err)
suite.CheckLengthOfValidatorUpdates(0, nil, "self delegate but below min")
Expand Down

0 comments on commit ad34043

Please sign in to comment.