-
Notifications
You must be signed in to change notification settings - Fork 333
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
test: Add auto-generating basic abi tests for solidity interfaces #2018
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fee4499
chore: Prefer equal to eq matcher
nddeluca 01f7eb6
chore: Rename viem extension and add deploy
nddeluca 13f5272
chore: Fix the viem extensions path
nddeluca 28291a8
chore: Add abitype explicit dependency
nddeluca f2b21a1
test: Document EOA account call behavior
nddeluca 867dcc6
test: Add abi basic tests based on sol interfaces
nddeluca 5b01adb
chore: Remove unused imports
nddeluca bad97d1
chore: Add solhint to CI and fix CI lint
nddeluca 9762334
chore: format fixes for function parethesis
nddeluca 7bef5a4
chore: Explain throwOnTransactionFailures setting
nddeluca abfac03
chore: Remove outdated comment
nddeluca 6d6ba28
lint: Add eqeqeq smart validation and fix ==
nddeluca 578df9b
chore: Add stricter settings for tsconfig
nddeluca 5600f4d
ci: Target the local build image for e2e-evm
nddeluca 6d7a83a
doc: Add act cmds for running e2e-evm CI jobs
nddeluca 92f525d
lint: Fix readme prettier formatting
nddeluca a511e03
ci: Add explicit compile step to fix race cond
nddeluca 6b03924
test: Add empty account creation transaction
nddeluca File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -45,6 +45,12 @@ jobs: | |||||
- name: Install npm dependencies | ||||||
run: npm install | ||||||
working-directory: tests/e2e-evm | ||||||
- name: Run solhint | ||||||
run: npm run solhint | ||||||
working-directory: tests/e2e-evm | ||||||
- name: Compile contracts and create artifcats | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. artif🐱🐱🐱🐱
Suggested change
|
||||||
run: npm run compile | ||||||
working-directory: tests/e2e-evm | ||||||
- name: Run linter | ||||||
run: npm run lint | ||||||
working-directory: tests/e2e-evm | ||||||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// solhint-disable one-contract-per-file | ||
// solhint-disable no-empty-blocks | ||
// solhint-disable payable-fallback | ||
|
||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.24; | ||
|
||
// | ||
// Normal noop functions only with nonpayable, payable, view, and pure modifiers | ||
// | ||
interface NoopNoReceiveNoFallback { | ||
function noopNonpayable() external; | ||
function noopPayable() external payable; | ||
function noopView() external view; | ||
function noopPure() external pure; | ||
} | ||
contract NoopNoReceiveNoFallbackMock is NoopNoReceiveNoFallback { | ||
function noopNonpayable() external {} | ||
function noopPayable() external payable {} | ||
function noopView() external view {} | ||
function noopPure() external pure {} | ||
} | ||
|
||
// | ||
// Added receive function (always payable) | ||
// | ||
interface NoopReceiveNoFallback is NoopNoReceiveNoFallback { | ||
receive() external payable; | ||
} | ||
contract NoopReceiveNoFallbackMock is NoopReceiveNoFallback, NoopNoReceiveNoFallbackMock { | ||
receive() external payable {} | ||
} | ||
|
||
// | ||
// Added receive function and payable fallback | ||
// | ||
interface NoopReceivePayableFallback is NoopNoReceiveNoFallback { | ||
receive() external payable; | ||
fallback() external payable; | ||
} | ||
contract NoopReceivePayableFallbackMock is NoopReceivePayableFallback, NoopNoReceiveNoFallbackMock { | ||
receive() external payable {} | ||
fallback() external payable {} | ||
} | ||
|
||
// | ||
// Added receive function and non-payable fallback | ||
// | ||
interface NoopReceiveNonpayableFallback is NoopNoReceiveNoFallback { | ||
receive() external payable; | ||
fallback() external; | ||
} | ||
contract NoopReceiveNonpayableFallbackMock is NoopReceiveNonpayableFallback, NoopNoReceiveNoFallbackMock { | ||
receive() external payable {} | ||
fallback() external {} | ||
} | ||
|
||
// | ||
// Added payable fallback and no receive function | ||
// | ||
// solc-ignore-next-line missing-receive | ||
interface NoopNoReceivePayableFallback is NoopNoReceiveNoFallback { | ||
fallback() external payable; | ||
} | ||
// solc-ignore-next-line missing-receive | ||
contract NoopNoReceivePayableFallbackMock is NoopNoReceivePayableFallback, NoopNoReceiveNoFallbackMock { | ||
fallback() external payable {} | ||
} | ||
|
||
// | ||
// Added non-payable fallback and no receive function | ||
// | ||
interface NoopNoReceiveNonpayableFallback is NoopNoReceiveNoFallback { | ||
fallback() external; | ||
} | ||
contract NoopNoReceiveNonpayableFallbackMock is NoopNoReceiveNonpayableFallback, NoopNoReceiveNoFallbackMock { | ||
fallback() external {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
📠 🍝