-
Notifications
You must be signed in to change notification settings - Fork 363
feat(test): Added test to call contract's read method #1324
Conversation
WalkthroughThe changes involve updating a Go source file related to Ethereum's Hive testing framework. Specifically, the Changes
Assessment against linked issues
Poem
TipsChat with CodeRabbit Bot (
|
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.
Review Status
Actionable comments generated: 3
Configuration used: CodeRabbit UI
Files ignored due to filter (6)
- cosmos/go.mod
- cosmos/go.sum
- e2e/localnet/go.mod
- e2e/localnet/go.sum
- e2e/precompile/go.mod
- e2e/precompile/go.sum
Files selected for processing (1)
- e2e/hive/simulators/rpc/ethclient.hive (3 hunks)
Additional comments: 1
e2e/hive/simulators/rpc/ethclient.hive (1)
- 424-457: The new test function
deployContractTest
has been added to test the contract read-only method. The code looks correct, but ensure that thepredeployedContractABI
variable reflects the actual ABI of the deployed contract, including the correct output names for theconstFunc
function.
fc8cb0d
to
823aee4
Compare
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- e2e/hive/simulators/rpc/ethclient.hive (3 hunks)
Additional comments: 4
e2e/hive/simulators/rpc/ethclient.hive (4)
3-3: The import for the
bytes
package is now present, resolving the previous issue.69-69: The
predeployedContractABI
variable has been updated to include output names for theconstFunc
function, addressing the previous comment.421-421: The error handling in
deployContractTest
is now consistent, usingt.Fatalf
for all error scenarios, which addresses the previous inconsistency issue.424-457: The new test
deployContractTest
correctly deploys a contract and tests a read-only method. The test checks the return values against the expected values, ensuring the contract's read method works as intended.
Ran `make test-hive`, all test cases passed. Closes berachain/pm#6 ## Summary by CodeRabbit - **New Features** - Enhanced smart contract interaction with additional output names for better clarity in read-only operations. - **Tests** - Implemented new tests to ensure reliable contract read-only method functionality. (cherry picked from commit 5eeed56)
#1326) This is an automatic backport of pull request #1324 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details> Co-authored-by: hunter-bera <133678627+hunter-bera@users.noreply.github.com>
Ran
make test-hive
, all test cases passed. Closes berachain/pm#6Summary by CodeRabbit
New Features
Tests