Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint #76

Merged
merged 1 commit into from
Apr 3, 2024
Merged

Lint #76

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/eibc_fulfillment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func TestEIBCFulfillment_EVM(t *testing.T) {
rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom()

var options ibc.TransferOptions
//market maker needs to have funds on the hub first to be able to fulfill upcoming demand order
// market maker needs to have funds on the hub first to be able to fulfill upcoming demand order
_, err = rollapp1.SendIBCTransfer(ctx, channel.ChannelID, rollappUserAddr, transferData, options)
require.NoError(t, err)
rollappHeight, err := rollapp1.GetNode().Height(ctx)
Expand Down Expand Up @@ -425,7 +425,7 @@ func TestEIBCFulfillment_Wasm(t *testing.T) {
rollappIBCDenom := transfertypes.ParseDenomTrace(rollappTokenDenom).IBCDenom()

var options ibc.TransferOptions
//market maker needs to have funds on the hub first to be able to fulfill upcoming demand order
// market maker needs to have funds on the hub first to be able to fulfill upcoming demand order
_, err = rollapp1.SendIBCTransfer(ctx, channel.ChannelID, rollappUserAddr, transferData, options)
require.NoError(t, err)
rollappHeight, err := rollapp1.GetNode().Height(ctx)
Expand Down
12 changes: 4 additions & 8 deletions tests/frozen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ func TestRollAppFreeze_EVM(t *testing.T) {
require.NoError(t, err)

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

err = dymension.IBCTransfer(ctx,
dymension, rollapp1, transferAmount, dymensionUserAddr,
Expand Down Expand Up @@ -541,7 +541,7 @@ func TestRollAppFreeze_Wasm(t *testing.T) {
require.NoError(t, err)

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

err = dymension.IBCTransfer(ctx,
dymension, rollapp1, transferAmount, dymensionUserAddr,
Expand Down Expand Up @@ -719,7 +719,6 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) {

t.Cleanup(
func() {

err = r.StopRelayer(ctx, eRep)
if err != nil {
t.Logf("an error occurred while stopping the relayer: %s", err)
Expand All @@ -729,7 +728,6 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) {
if err != nil {
t.Logf("an error occurred while stopping the relayer: %s", err)
}

},
)

Expand Down Expand Up @@ -897,7 +895,7 @@ func TestOtherRollappNotAffected_EVM(t *testing.T) {
require.Equal(t, latestIndex.StateIndex.Index, fmt.Sprint(targetIndex), "rollapp state index still increment")

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

transferData := ibc.WalletData{
Address: rollapp1UserAddr,
Expand Down Expand Up @@ -1155,7 +1153,6 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) {

t.Cleanup(
func() {

err = r.StopRelayer(ctx, eRep)
if err != nil {
t.Logf("an error occurred while stopping the relayer: %s", err)
Expand All @@ -1165,7 +1162,6 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) {
if err != nil {
t.Logf("an error occurred while stopping the relayer: %s", err)
}

},
)

Expand Down Expand Up @@ -1332,7 +1328,7 @@ func TestOtherRollappNotAffected_Wasm(t *testing.T) {
require.Equal(t, latestIndex.StateIndex.Index, fmt.Sprint(targetIndex), "rollapp state index still increment")

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

transferData := ibc.WalletData{
Address: rollapp1UserAddr,
Expand Down
4 changes: 2 additions & 2 deletions tests/ibc_grace_period_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func TestIBCGracePeriodCompliance_EVM(t *testing.T) {
testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount)

// Compose an IBC transfer and send from rollapp -> dymension
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

channel, err := ibc.GetTransferChannel(ctx, r, eRep, rollapp1.Config().ChainID, dymension.Config().ChainID)
require.NoError(t, err)
Expand Down Expand Up @@ -362,7 +362,7 @@ func TestIBCGracePeriodCompliance_Wasm(t *testing.T) {
testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount)

// Compose an IBC transfer and send from rollapp -> dymension
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

channel, err := ibc.GetTransferChannel(ctx, r, eRep, rollapp1.Config().ChainID, dymension.Config().ChainID)
require.NoError(t, err)
Expand Down
3 changes: 2 additions & 1 deletion tests/ibc_pfm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@ func TestIBCTransferMultiHop_Wasm(t *testing.T) {
ChainConfig: dymensionConfig,
NumValidators: &numHubVals,
NumFullNodes: &numHubFullNodes,
}, {
},
{
Name: "gaia",
Version: "v15.1.0",
ChainConfig: gaiaConfig,
Expand Down
4 changes: 2 additions & 2 deletions tests/ibc_timeout_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func TestIBCTransferTimeout_EVM(t *testing.T) {
testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount)

// Compose an IBC transfer and send from rollapp -> dymension
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

channel, err := ibc.GetTransferChannel(ctx, r, eRep, dymension.Config().ChainID, rollapp1.Config().ChainID)
require.NoError(t, err)
Expand Down Expand Up @@ -370,7 +370,7 @@ func TestIBCTransferTimeout_Wasm(t *testing.T) {
testutil.AssertBalance(t, ctx, rollapp1, rollappUserAddr, rollapp1.Config().Denom, walletAmount)

// Compose an IBC transfer and send from rollapp -> dymension
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

channel, err := ibc.GetTransferChannel(ctx, r, eRep, dymension.Config().ChainID, rollapp1.Config().ChainID)
require.NoError(t, err)
Expand Down
4 changes: 2 additions & 2 deletions tests/ibc_transfer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func TestIBCTransferSuccess_EVM(t *testing.T) {
)

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

transferData := ibc.WalletData{
Address: rollappUserAddr,
Expand Down Expand Up @@ -329,7 +329,7 @@ func TestIBCTransferSuccess_Wasm(t *testing.T) {
)

// Compose an IBC transfer and send from dymension -> rollapp
var transferAmount = math.NewInt(1_000_000)
transferAmount := math.NewInt(1_000_000)

transferData := ibc.WalletData{
Address: rollappUserAddr,
Expand Down
4 changes: 2 additions & 2 deletions tests/setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ var (
Value: "30s",
},
{
Key: "app_state.erc20.params.enable_erc20",
Key: "app_state.erc20.params.enable_erc20",
Value: false,
},
{
Key: "app_state.erc20.params.enable_evm_hook",
Key: "app_state.erc20.params.enable_evm_hook",
Value: false,
},
}
Expand Down
4 changes: 2 additions & 2 deletions tests/tx_batch_finalization_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func TestBatchFinalization_EVM(t *testing.T) {
rollappHeight, err := rollapp1.GetNode().Height(ctx)
require.NoError(t, err)

IsAnyRollappStateFinalized(ctx, dymension, rollapp1.GetChainID(), 300)
_, err = IsAnyRollappStateFinalized(ctx, dymension, rollapp1.GetChainID(), 300)
require.NoError(t, err)

lastFinalizedRollappHeight, err := dymension.FinalizedRollappStateHeight(ctx, rollapp1.GetChainID())
Expand Down Expand Up @@ -296,7 +296,7 @@ func TestBatchFinalization_Wasm(t *testing.T) {
rollappHeight, err := rollapp1.GetNode().Height(ctx)
require.NoError(t, err)

IsAnyRollappStateFinalized(ctx, dymension, rollapp1.GetChainID(), 300)
_, err = IsAnyRollappStateFinalized(ctx, dymension, rollapp1.GetChainID(), 300)
require.NoError(t, err)

lastFinalizedRollappHeight, err := dymension.FinalizedRollappStateHeight(ctx, rollapp1.GetChainID())
Expand Down
Loading