-
-
Notifications
You must be signed in to change notification settings - Fork 804
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
fix[tool]: include structs in -f interface
output
#4294
fix[tool]: include structs in -f interface
output
#4294
Conversation
interface
output-f interface
output
make functions and events consistent refactor how `out` is built`
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4294 +/- ##
===========================================
- Coverage 91.36% 46.02% -45.34%
===========================================
Files 112 112
Lines 15849 15858 +9
Branches 2685 2688 +3
===========================================
- Hits 14480 7299 -7181
- Misses 934 8004 +7070
- Partials 435 555 +120 ☔ View full report in Codecov by Sentry. |
I quickly tested the PR, and I think it's incomplete. It does not list the imported (via module) structs. Example from 🐍 snekmate: vyper -f interface src/snekmate/utils/mocks/batch_distributor_mock.vy outputs # Functions
@payable
@external
def distribute_ether(data: Batch):
...
@external
def distribute_token(token: .../snekmate/venv/Lib/site-packages/vyper/builtins/interfaces/IERC20.vyi, data: Batch):
... The structs (we can debate if we only want to list # Structs
struct Transaction:
recipient: address
amount: uint256
struct Batch:
txns: DynArray[Transaction, 255] are missing in the interface for Furthermore (not related to this PR), I would like to highlight that for the usage of interfaces as types displayed within |
for output structs we output the names of their fields although they are tuples in the abi, is this intended? # test.vyi
struct Foo:
x: uint256
def foo() -> Foo:
... -f abi (see [
{
"stateMutability": "nonpayable",
"type": "function",
"name": "foo",
"inputs": [],
"outputs": [
{
"name": "",
"type": "tuple",
"components": [
{
"name": "x",
"type": "uint256"
}
]
}
]
}
|
What I did
fix #4282.
How I did it
How to verify it
Commit message
Description for the changelog
Cute Animal Picture