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

Batch Contract Read #926

Merged
merged 3 commits into from
Nov 18, 2024
Merged

Batch Contract Read #926

merged 3 commits into from
Nov 18, 2024

Conversation

EasterTheBunny
Copy link
Contributor

Batch contract reads are added and multiple address support was removed. All tests now pass.

Copy link

@patrick-dowell patrick-dowell left a comment

Choose a reason for hiding this comment

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

I'm curious - what are we testing via these tests? Do we have any sort of E2E testing ability to test against a simulated backend? What are the existing tests actually testing?

}

*ptrToValue = value

return nil

Choose a reason for hiding this comment

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

Don't we still need to set returnVal.(*values.Value)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The type casting creates the pointer to the value. Setting the value on line 157 is correct. You can see the implementation in evm is the same.

binding.Decode(ctx, data[idx], contractType),
)

value, err := values.Wrap(contractType)
Copy link
Contributor

Choose a reason for hiding this comment

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

In what format does the rpc return data? Do we have to da a borsh decode?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since the start, we have been assuming binary encoded data (borsh). The other option is JSON but so far expectations did not include json.

Copy link
Contributor

@ilija42 ilija42 left a comment

Choose a reason for hiding this comment

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

Don't have enough context on batch, but everything else looks fine

Batch contract reads are added and multiple address support was removed. All tests now pass.
@cl-sonarqube-production
Copy link

Quality Gate failed Quality Gate failed

Failed conditions
64.6% Coverage on New Code (required ≥ 75%)

See analysis details on SonarQube

Copy link

@patrick-dowell patrick-dowell left a comment

Choose a reason for hiding this comment

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

LGTM

@aalu1418 aalu1418 merged commit b9bf6a3 into develop Nov 18, 2024
34 of 35 checks passed
@aalu1418 aalu1418 deleted the ah/batch-contract-read branch November 18, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants