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

Parametric fees for each token in e2e tests #409

Merged
merged 3 commits into from
Jan 15, 2025
Merged
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
87 changes: 47 additions & 40 deletions integrationTests/relayers/slowTests/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func GenerateTestUSDCToken() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "ETHUSDC",
MvxUniversalTokenDisplayName: "WrappedUSDC",
MvxChainSpecificTokenDisplayName: "EthereumWrappedUSDC",
MvxToEthFee: big.NewInt(50),
ValueToMintOnMvx: "10000000000",
IsMintBurnOnMvX: true,
IsNativeOnMvX: false,
Expand Down Expand Up @@ -184,6 +185,7 @@ func GenerateTestMEMEToken() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "ETHMEME",
MvxUniversalTokenDisplayName: "WrappedMEME",
MvxChainSpecificTokenDisplayName: "EthereumWrappedMEME",
MvxToEthFee: big.NewInt(51),
ValueToMintOnMvx: "10000000000",
IsMintBurnOnMvX: false,
IsNativeOnMvX: true,
Expand Down Expand Up @@ -233,7 +235,7 @@ func GenerateTestMEMEToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(4000 - 50 + 6000 - 50 + 2000 - 50),
OnEth: big.NewInt(4000 - 51 + 6000 - 51 + 2000 - 51),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
Expand All @@ -260,7 +262,7 @@ func GenerateTestMEMEToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(4000 - 50 - 2400 + 6000 - 50 - 200 + 2000 - 50 - 1000 - 1300 + 1250),
OnEth: big.NewInt(4000 - 51 - 2400 + 6000 - 51 - 200 + 2000 - 51 - 1000 - 1300 + 1249),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
Expand Down Expand Up @@ -294,7 +296,7 @@ func GenerateTestMEMEToken() framework.TestTokenParams {
MvxSafeMintValue: big.NewInt(0),
MvxSafeBurnValue: big.NewInt(0),

EthSafeMintValue: big.NewInt(4000 - 50 + 6000 - 50 + 2000 - 50 + 1300 - 50),
EthSafeMintValue: big.NewInt(4000 - 51 + 6000 - 51 + 2000 - 51 + 1300 - 51),
EthSafeBurnValue: big.NewInt(2400 + 200 + 1000 + 1300),
},
SpecialChecks: &framework.SpecialBalanceChecks{
Expand All @@ -308,11 +310,11 @@ func ApplyMEMERefundBalances(token *framework.TestTokenParams) {
// we need to add the 1000 MEME tokens as the third bridge was done that include the refund on the Ethereum side
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(4000 - 2400 + 6000 - 200 + 2000 - 1300 + 1300 - 1000 + 1000)
// Bob will get his tokens back from the refund
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(4000 - 50 - 2400 + 6000 - 50 - 200 + 2000 - 50 - 1300 + 1250 - 1000 + 950)
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(4000 - 51 - 2400 + 6000 - 51 - 200 + 2000 - 51 - 1300 + 1249 - 1000 + 949)
// no funds remain in the test caller SC
token.DeltaBalances[framework.SecondHalfBridge][framework.CalledTestSC].OnMvx = big.NewInt(0)

token.MintBurnChecks.EthSafeMintValue = big.NewInt(4000 - 50 + 6000 - 50 + 2000 - 50 + 1300 - 50 + 1000 - 50)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(4000 - 51 + 6000 - 51 + 2000 - 51 + 1300 - 51 + 1000 - 51)
}

// GenerateTestTADAToken will generate a test MEME token
Expand All @@ -328,6 +330,7 @@ func GenerateTestTADAToken() framework.TestTokenParams {
MvxUniversalTokenDisplayName: "WrappedTADA",
MvxChainSpecificTokenDisplayName: "EthereumWrappedTADA",
ValueToMintOnMvx: "10000000000",
MvxToEthFee: big.NewInt(57),
IsMintBurnOnMvX: true,
IsNativeOnMvX: true,
HasChainSpecificToken: true,
Expand Down Expand Up @@ -376,13 +379,13 @@ func GenerateTestTADAToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50),
OnEth: big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
framework.SafeSC: {
OnEth: big.NewInt(0),
OnMvx: big.NewInt(50 + 50 + 50),
OnMvx: big.NewInt(57 + 57 + 57),
MvxToken: framework.ChainSpecificToken,
},
framework.CalledTestSC: {
Expand All @@ -403,7 +406,7 @@ func GenerateTestTADAToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(5980 - 50 - 3100 + 2300 - 50 - 800 + 4000 - 50 - 2000 - 1900 + 1850),
OnEth: big.NewInt(5980 - 57 - 3100 + 2300 - 57 - 800 + 4000 - 57 - 2000 - 1900 + 1843),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
Expand All @@ -414,7 +417,7 @@ func GenerateTestTADAToken() framework.TestTokenParams {
},
framework.SafeSC: {
OnEth: big.NewInt(0),
OnMvx: big.NewInt(50 + 50 + 50 + 50),
OnMvx: big.NewInt(57 + 57 + 57 + 57),
MvxToken: framework.ChainSpecificToken,
},
framework.CalledTestSC: {
Expand All @@ -433,11 +436,11 @@ func GenerateTestTADAToken() framework.TestTokenParams {
MvxTotalUniversalMint: big.NewInt(3100 + 800 + 2000),
MvxTotalChainSpecificMint: big.NewInt(3100 + 800 + 2000 + 1900),
MvxTotalUniversalBurn: big.NewInt(5980 + 2300 + 4000),
MvxTotalChainSpecificBurn: big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 1900 - 50),
MvxTotalChainSpecificBurn: big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 1900 - 57),
MvxSafeMintValue: big.NewInt(3100 + 800 + 2000 + 1900),
MvxSafeBurnValue: big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 1900 - 50),
MvxSafeBurnValue: big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 1900 - 57),

EthSafeMintValue: big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 1900 - 50),
EthSafeMintValue: big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 1900 - 57),
EthSafeBurnValue: big.NewInt(3100 + 800 + 2000 + 1900),
},
SpecialChecks: &framework.SpecialBalanceChecks{
Expand All @@ -449,18 +452,18 @@ func GenerateTestTADAToken() framework.TestTokenParams {
// ApplyTADARefundBalances will apply the refund balances on the involved entities for the MEME token
func ApplyTADARefundBalances(token *framework.TestTokenParams) {
// we need to add the 1000 MEME tokens as the third bridge was done that include the refund on the Ethereum side
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(50 + 50 + 50 + 50 + 50)
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(57 + 57 + 57 + 57 + 57)
// Bob will get his tokens back from the refund
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(5980 - 50 - 3100 + 2300 - 50 - 800 + 4000 - 50 - 1900 + 1850 - 2000 + 1950)
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(5980 - 57 - 3100 + 2300 - 57 - 800 + 4000 - 57 - 1900 + 1843 - 2000 + 1943)
// no funds remain in the test caller SC
token.DeltaBalances[framework.SecondHalfBridge][framework.CalledTestSC].OnMvx = big.NewInt(0)
// we need to subtract the refunded value from the wrapper contract
token.DeltaBalances[framework.SecondHalfBridge][framework.WrapperSC].OnMvx = big.NewInt(-5980 - 2300 - 4000 + 3100 + 800 + 2000 - 2000)

token.MintBurnChecks.MvxTotalChainSpecificBurn = big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 2000 - 50 + 1900 - 50)
token.MintBurnChecks.MvxTotalChainSpecificBurn = big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 2000 - 57 + 1900 - 57)
token.MintBurnChecks.MvxTotalUniversalBurn = big.NewInt(5980 + 2300 + 4000 + 2000)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 2000 - 50 + 1900 - 50)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(5980 - 50 + 2300 - 50 + 4000 - 50 + 2000 - 50 + 1900 - 50)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 2000 - 57 + 1900 - 57)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(5980 - 57 + 2300 - 57 + 4000 - 57 + 2000 - 57 + 1900 - 57)

token.SpecialChecks.WrapperDeltaLiquidityCheck = big.NewInt(-5980 - 2300 - 4000 + 3100 + 800 + 2000 - 2000)
}
Expand All @@ -477,6 +480,7 @@ func GenerateTestEUROCToken() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "EUROC",
MvxUniversalTokenDisplayName: "TestEUROC",
MvxChainSpecificTokenDisplayName: "TestEUROC",
MvxToEthFee: big.NewInt(52),
ValueToMintOnMvx: "10000000000",
IsMintBurnOnMvX: true,
IsNativeOnMvX: false,
Expand Down Expand Up @@ -548,7 +552,7 @@ func GenerateTestEUROCToken() framework.TestTokenParams {
},
framework.SecondHalfBridge: map[string]*framework.DeltaBalanceHolder{
framework.Alice: {
OnEth: big.NewInt(-5010 - 7010 - 1010 - 700 + 650), // 650 is the refund value
OnEth: big.NewInt(-5010 - 7010 - 1010 - 700 + 648), // 648 is the refund value
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
Expand All @@ -558,13 +562,13 @@ func GenerateTestEUROCToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Charlie: {
OnEth: big.NewInt(2510 - 50 + 310 - 50),
OnEth: big.NewInt(2510 - 52 + 310 - 52),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
framework.SafeSC: {
OnEth: big.NewInt(0),
OnMvx: big.NewInt(50 + 50 + 50),
OnMvx: big.NewInt(52 + 52 + 52),
MvxToken: framework.ChainSpecificToken,
},
framework.CalledTestSC: {
Expand All @@ -582,12 +586,12 @@ func GenerateTestEUROCToken() framework.TestTokenParams {
MintBurnChecks: &framework.MintBurnBalances{
MvxTotalUniversalMint: big.NewInt(5010 + 7010 + 1010 + 700),
MvxTotalChainSpecificMint: big.NewInt(0),
MvxTotalUniversalBurn: big.NewInt(2510 - 50 + 310 - 50 + 700 - 50),
MvxTotalUniversalBurn: big.NewInt(2510 - 52 + 310 - 52 + 700 - 52),
MvxTotalChainSpecificBurn: big.NewInt(0),
MvxSafeMintValue: big.NewInt(5010 + 7010 + 1010 + 700),
MvxSafeBurnValue: big.NewInt(2510 - 50 + 310 - 50 + 700 - 50),
MvxSafeBurnValue: big.NewInt(2510 - 52 + 310 - 52 + 700 - 52),

EthSafeMintValue: big.NewInt(2510 - 50 + 310 - 50 + 650),
EthSafeMintValue: big.NewInt(2510 - 52 + 310 - 52 + 648),
EthSafeBurnValue: big.NewInt(5010 + 7010 + 1010 + 700),
},
SpecialChecks: &framework.SpecialBalanceChecks{
Expand All @@ -601,15 +605,15 @@ func ApplyEUROCRefundBalances(token *framework.TestTokenParams) {
// called test SC will have 0 balance since eth->mvx transfer failed
token.DeltaBalances[framework.FirstHalfBridge][framework.CalledTestSC].OnMvx = big.NewInt(0)
// extra is just for the fees for the 2 transfers mvx->eth and the failed eth->mvx that needed refund
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(50 + 50 + 50 + 50)
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(52 + 52 + 52 + 52)
// Alice will get her tokens back from the refund
token.DeltaBalances[framework.SecondHalfBridge][framework.Alice].OnEth = big.NewInt(-5010 - 7010 - 1010 - 700 + 960 + 650)
token.DeltaBalances[framework.SecondHalfBridge][framework.Alice].OnEth = big.NewInt(-5010 - 7010 - 1010 - 700 + 958 + 648)
// no funds remain in the called test SC
token.DeltaBalances[framework.SecondHalfBridge][framework.CalledTestSC].OnMvx = big.NewInt(0)

token.MintBurnChecks.MvxTotalUniversalBurn = big.NewInt(2510 - 50 + 310 - 50 + 700 - 50 + 1010 - 50)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(2510 - 50 + 310 - 50 + 700 - 50 + 1010 - 50)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(2510 - 50 + 310 - 50 + 650 + 1010 - 50)
token.MintBurnChecks.MvxTotalUniversalBurn = big.NewInt(2510 - 52 + 310 - 52 + 700 - 52 + 1010 - 52)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(2510 - 52 + 310 - 52 + 700 - 52 + 1010 - 52)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(2510 - 52 + 310 - 52 + 648 + 1010 - 52)
}

// GenerateTestMEXToken will generate a test MEX token
Expand All @@ -624,6 +628,7 @@ func GenerateTestMEXToken() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "MEX",
MvxUniversalTokenDisplayName: "TestMEX",
MvxChainSpecificTokenDisplayName: "TestMEX",
MvxToEthFee: big.NewInt(53),
ValueToMintOnMvx: "10000000000",
IsMintBurnOnMvX: true,
IsNativeOnMvX: true,
Expand Down Expand Up @@ -673,13 +678,13 @@ func GenerateTestMEXToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50),
OnEth: big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
framework.SafeSC: {
OnEth: big.NewInt(0),
OnMvx: big.NewInt(50 + 50 + 50),
OnMvx: big.NewInt(53 + 53 + 53),
MvxToken: framework.ChainSpecificToken,
},
framework.CalledTestSC: {
Expand All @@ -700,7 +705,7 @@ func GenerateTestMEXToken() framework.TestTokenParams {
MvxToken: framework.UniversalToken,
},
framework.Bob: {
OnEth: big.NewInt(4010 - 50 - 2410 + 6010 - 50 - 210 + 2010 - 50 - 1010 - 3000 + 2950),
OnEth: big.NewInt(4010 - 53 - 2410 + 6010 - 53 - 210 + 2010 - 53 - 1010 - 3000 + 2947),
OnMvx: big.NewInt(0),
MvxToken: framework.UniversalToken,
},
Expand All @@ -711,7 +716,7 @@ func GenerateTestMEXToken() framework.TestTokenParams {
},
framework.SafeSC: {
OnEth: big.NewInt(0),
OnMvx: big.NewInt(50 + 50 + 50 + 50),
OnMvx: big.NewInt(53 + 53 + 53 + 53),
MvxToken: framework.ChainSpecificToken,
},
framework.CalledTestSC: {
Expand All @@ -729,12 +734,12 @@ func GenerateTestMEXToken() framework.TestTokenParams {
MintBurnChecks: &framework.MintBurnBalances{
MvxTotalUniversalMint: big.NewInt(2410 + 210 + 1010 + 3000),
MvxTotalChainSpecificMint: big.NewInt(0),
MvxTotalUniversalBurn: big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50),
MvxTotalUniversalBurn: big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53),
MvxTotalChainSpecificBurn: big.NewInt(0),
MvxSafeMintValue: big.NewInt(2410 + 210 + 1010 + 3000),
MvxSafeBurnValue: big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50),
MvxSafeBurnValue: big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53),

EthSafeMintValue: big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50),
EthSafeMintValue: big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53),
EthSafeBurnValue: big.NewInt(2410 + 210 + 1010 + 3000),
},
SpecialChecks: &framework.SpecialBalanceChecks{
Expand All @@ -746,15 +751,15 @@ func GenerateTestMEXToken() framework.TestTokenParams {
// ApplyMEXRefundBalances will apply the refund balances on the involved entities for the MEX token
func ApplyMEXRefundBalances(token *framework.TestTokenParams) {
// 3 normal swaps + the refund one
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(50 + 50 + 50 + 50 + 50)
token.DeltaBalances[framework.SecondHalfBridge][framework.SafeSC].OnMvx = big.NewInt(53 + 53 + 53 + 53 + 53)
// Bob will get his tokens back from the refund
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(4010 - 50 - 2410 + 6010 - 50 - 210 + 2010 - 50 - 1010 + 960 - 3000 + 2950)
token.DeltaBalances[framework.SecondHalfBridge][framework.Bob].OnEth = big.NewInt(4010 - 53 - 2410 + 6010 - 53 - 210 + 2010 - 53 - 1010 + 957 - 3000 + 2947)
// no funds remain in the test caller SC
token.DeltaBalances[framework.SecondHalfBridge][framework.CalledTestSC].OnMvx = big.NewInt(0)

token.MintBurnChecks.MvxTotalUniversalBurn = big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50 + 1010 - 50)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50 + 1010 - 50)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(4010 - 50 + 6010 - 50 + 2010 - 50 + 3000 - 50 + 1010 - 50)
token.MintBurnChecks.MvxTotalUniversalBurn = big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53 + 1010 - 53)
token.MintBurnChecks.MvxSafeBurnValue = big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53 + 1010 - 53)
token.MintBurnChecks.EthSafeMintValue = big.NewInt(4010 - 53 + 6010 - 53 + 2010 - 53 + 3000 - 53 + 1010 - 53)
}

// GenerateUnlistedTokenFromEth will generate an unlisted token on Eth
Expand All @@ -769,6 +774,7 @@ func GenerateUnlistedTokenFromEth() framework.TestTokenParams {
MvxUniversalTokenDisplayName: "TestULTKE",
MvxChainSpecificTokenDisplayName: "TestULTKE",
ValueToMintOnMvx: "10000000000",
MvxToEthFee: big.NewInt(54),
IsMintBurnOnMvX: true,
IsNativeOnMvX: false,
HasChainSpecificToken: false,
Expand Down Expand Up @@ -876,6 +882,7 @@ func GenerateUnlistedTokenFromMvx() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "ULTKM",
MvxUniversalTokenDisplayName: "TestULTKM",
MvxChainSpecificTokenDisplayName: "TestULTKM",
MvxToEthFee: big.NewInt(55),
ValueToMintOnMvx: "10000000000",
IsMintBurnOnMvX: true,
IsNativeOnMvX: true,
Expand Down
1 change: 1 addition & 0 deletions integrationTests/relayers/slowTests/edgeCases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ func TestRelayersShouldExecuteTransfersForEdgeCases(t *testing.T) {
MvxUniversalTokenDisplayName: "WrappedTEST",
MvxChainSpecificTokenDisplayName: "EthereumWrappedTEST",
ValueToMintOnMvx: "10000000000",
MvxToEthFee: big.NewInt(50),
IsMintBurnOnMvX: true,
IsNativeOnMvX: false,
HasChainSpecificToken: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func createBadToken() framework.TestTokenParams {
MvxChainSpecificTokenTicker: "ETHBAD",
MvxUniversalTokenDisplayName: "WrappedBAD",
MvxChainSpecificTokenDisplayName: "EthereumWrappedBAD",
MvxToEthFee: big.NewInt(50),
ValueToMintOnMvx: "10000000000",
EthTokenName: "ETHTOKEN",
EthTokenSymbol: "ETHT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,6 @@ const (
getTokenLiquidityFunction = "getTokenLiquidity"
)

var (
feeInt = big.NewInt(50)
)

// MultiversxHandler will handle all the operations on the MultiversX side
type MultiversxHandler struct {
testing.TB
Expand Down
6 changes: 3 additions & 3 deletions integrationTests/relayers/slowTests/framework/testSetup.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ func (setup *TestSetup) IssueAndConfigureTokens(tokens ...TestTokenParams) {
setup.MultiversxHandler.UnPauseContractsAfterTokenChanges(setup.Ctx)

for _, token := range tokens {
setup.MultiversxHandler.SubmitAggregatorBatch(setup.Ctx, token.IssueTokenParams, feeInt)
setup.MultiversxHandler.SubmitAggregatorBatch(setup.Ctx, token.IssueTokenParams, token.MvxToEthFee)
}
}

Expand Down Expand Up @@ -586,7 +586,7 @@ func (setup *TestSetup) TestWithdrawTotalFeesOnEthereumForTokens(tokensParams ..
}

if operation.InvalidReceiver != nil {
expectedRefund.Add(expectedRefund, feeInt)
expectedRefund.Add(expectedRefund, param.MvxToEthFee)
}

if operation.ValueToSendFromMvX == nil {
Expand All @@ -596,7 +596,7 @@ func (setup *TestSetup) TestWithdrawTotalFeesOnEthereumForTokens(tokensParams ..
continue
}

expectedAccumulated.Add(expectedAccumulated, feeInt)
expectedAccumulated.Add(expectedAccumulated, param.MvxToEthFee)
}

setup.MultiversxHandler.TestWithdrawFees(setup.Ctx, token.MvxChainSpecificToken, expectedRefund, expectedAccumulated)
Expand Down
1 change: 1 addition & 0 deletions integrationTests/relayers/slowTests/framework/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type IssueTokenParams struct {
MvxChainSpecificTokenTicker string
MvxUniversalTokenDisplayName string
MvxChainSpecificTokenDisplayName string
MvxToEthFee *big.Int
ValueToMintOnMvx string
IsMintBurnOnMvX bool
IsNativeOnMvX bool
Expand Down
Loading