mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-27 00:35:18 +00:00
2b123bf007
* add eip712 ante * minor cleanup * eip712 integration test with bridge conversion * fix issues * update bridge module * merge bridge module convert logic * update eip712 tests & update deps * remove v17 migrations * remove v17 migrations * fix genesis test * fix erc20 to coin tx * remove eth check * clean up imports * remove * fix evmutil cli * remove bridge comments * address feedback * rename mint method * add transfer checks for locking & unlocking funds * fix gas * increase gas even more * fix amount check Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com> Co-authored-by: Ruaridh <rhuairahrighairidh@users.noreply.github.com>
37 lines
889 B
Go
37 lines
889 B
Go
package keeper_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
|
|
"github.com/kava-labs/kava/x/evmutil/testutil"
|
|
"github.com/kava-labs/kava/x/evmutil/types"
|
|
)
|
|
|
|
type ParamsTestSuite struct {
|
|
testutil.Suite
|
|
}
|
|
|
|
func TestParamsSuite(t *testing.T) {
|
|
suite.Run(t, new(ParamsTestSuite))
|
|
}
|
|
|
|
func (suite *ParamsTestSuite) TestEnabledConversionPair() {
|
|
pairAddr := testutil.MustNewInternalEVMAddressFromString("0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2")
|
|
expPair := types.ConversionPair{
|
|
KavaERC20Address: pairAddr.Bytes(),
|
|
Denom: "weth",
|
|
}
|
|
params := types.DefaultParams()
|
|
params.EnabledConversionPairs = []types.ConversionPair{expPair}
|
|
suite.Keeper.SetParams(suite.Ctx, params)
|
|
|
|
actualPair, err := suite.Keeper.GetEnabledConversionPairFromERC20Address(
|
|
suite.Ctx,
|
|
pairAddr,
|
|
)
|
|
suite.Require().NoError(err)
|
|
suite.Require().Equal(expPair, actualPair)
|
|
}
|