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

Add test for ArbitrumContractTx type transactions #1731

Merged
merged 14 commits into from
Jul 24, 2023

Conversation

anodar
Copy link
Contributor

@anodar anodar commented Jun 30, 2023

No description provided.

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Jun 30, 2023
@anodar anodar marked this pull request as ready for review June 30, 2023 18:31
@anodar anodar requested a review from PlasmaPower June 30, 2023 18:32
@anodar anodar enabled auto-merge July 17, 2023 21:21
Tristan-Wilson
Tristan-Wilson previously approved these changes Jul 21, 2023
Copy link
Member

@Tristan-Wilson Tristan-Wilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments only, LGTM

@@ -52,30 +52,38 @@ func retryableSetup(t *testing.T) (
delayedBridge, err := arbnode.NewDelayedBridge(l1client, l1info.GetAddress("Bridge"), 0)
Require(t, err)

lookupSubmitRetryableL2TxHash := func(l1Receipt *types.Receipt) common.Hash {
lookupL2Hash := func(l1Receipt *types.Receipt) common.Hash {
messages, err := delayedBridge.LookupMessagesInRange(ctx, l1Receipt.BlockNumber, l1Receipt.BlockNumber, nil)
Require(t, err)
if len(messages) == 0 {
Fatal(t, "didn't find message for retryable submission")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed to not just reference retryables now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

continue
}
txs, err := arbos.ParseL2Transactions(message.Message, params.ArbitrumDevTestChainConfig().ChainID, nil)
Require(t, err)
for _, tx := range txs {
if tx.Type() == types.ArbitrumSubmitRetryableTxType || tx.Type() == types.ArbitrumDepositTxType {
if txTypes[tx.Type()] {
submissionTxs = append(submissionTxs, tx)
}
}
}
if len(submissionTxs) != 1 {
Fatal(t, "expected 1 tx from retryable submission, found", len(submissionTxs))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be changed to not just reference retryables now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@anodar anodar merged commit 95de2ca into master Jul 24, 2023
7 checks passed
@anodar anodar deleted the test-cases-contractTxType branch July 25, 2023 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants