-
Notifications
You must be signed in to change notification settings - Fork 9
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
Invalid deposit transactions tests #381
base: feat/v3.1
Are you sure you want to change the base?
Conversation
- deposits with less amount - bridges to address zero - deposits of non whitelisted tokens
# Conflicts: # integrationTests/relayers/slowTests/framework/multiversxHandler.go # integrationTests/relayers/slowTests/framework/testSetup.go
IsFaultyDeposit: true, | ||
}, | ||
}, | ||
ESDTSafeExtraBalance: big.NewInt(100), // extra is just for the fees for the 2 transfers mvx->eth |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be 0, the swaps are not done, no values should be held in the ESDT safe
@@ -236,6 +275,82 @@ func GenerateTestMEXToken() framework.TestTokenParams { | |||
} | |||
} | |||
|
|||
// GenerateTestDOGEToken will generate a test DOGE token | |||
func GenerateTestDOGEToken() framework.TestTokenParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GenerateUnlistedTokenFromEth?
I think it is a good idea to change in a future PR all test token names
} | ||
|
||
// GenerateTestBOBERToken will generate a test BOBER token | ||
func GenerateTestBOBERToken() framework.TestTokenParams { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GenerateUnlistedTokenFromMvx?
I think it is a good idea to change in a future PR all test token names
{ | ||
ValueToTransferToMvx: nil, | ||
ValueToSendFromMvX: big.NewInt(2010), | ||
MvxSCCallData: createScCallData("callPayable", 50000000), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is irrelevant for this token
MvxSCCallData: createScCallData("callPayable", 50000000), | ||
}, | ||
}, | ||
ESDTSafeExtraBalance: big.NewInt(150), // just the fees should be collected in ESDT safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not 0?
@@ -551,7 +481,10 @@ func (handler *MultiversxHandler) issueAndWhitelistTokensWithChainSpecific(ctx c | |||
handler.setLocalRolesForUniversalTokenOnWrapper(ctx, params) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reconsider this a little bit. What do we need for an unlisted token?
issue at least the universal token
mint the Alice user with some funds for this token
All L481-L494 are not done for an unlisted token.
- there is a mistake as handler.whitelistTokenOnMultisig(ctx, params) is called twice
@@ -569,7 +502,9 @@ func (handler *MultiversxHandler) issueAndWhitelistTokens(ctx context.Context, p | |||
|
|||
handler.setRolesForSpecificTokenOnSafe(ctx, params) | |||
handler.addMappingInMultisig(ctx, params) | |||
handler.whitelistTokenOnMultisig(ctx, params) | |||
if !params.PreventWhitelist { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also here
return len(responseData) != 0 | ||
} | ||
|
||
func (handler *MultiversxHandler) sendAndCheckTx(ctx context.Context, sender KeysHolder, receiver *MvxAddress, value string, gasLimit uint64, function string, params []string) (string, *data.TransactionOnNetwork) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually scCallAndCheckTx :)
@@ -32,6 +33,22 @@ const ( | |||
|
|||
type currentBridge string | |||
|
|||
type CurrentActorState struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing comment
if !setup.checkHolderEthBalanceForToken(sender, true, params) { | ||
// if token is prevented from whitelist, we can't check the balances | ||
if params.PreventWhitelist { | ||
return true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
No description provided.