Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: Setup mise
timeout-minutes: 10
uses: jdx/mise-action@v4.3.0
uses: jdx/mise-action@v5.0.1

- name: Install dependencies
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Setup mise
timeout-minutes: 10
uses: jdx/mise-action@v4.3.0
uses: jdx/mise-action@v5.0.1

- name: Install dependencies
timeout-minutes: 10
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Setup mise
timeout-minutes: 10
uses: jdx/mise-action@v4.3.0
uses: jdx/mise-action@v5.0.1

- name: Update dependencies
timeout-minutes: 30
Expand Down
120 changes: 60 additions & 60 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pydantic_string_url import HttpUrl

from erc7730.common.output import ConsoleOutputAdder, exception_to_output
from erc7730.common.output import ConsoleOutputAdder, OutputAdder, exception_to_output
from erc7730.convert.calldata.v1.descriptor import (
convert_descriptor,
)
Expand All @@ -11,21 +11,25 @@


def erc7730_descriptor_to_calldata_descriptors(
input_descriptor: InputERC7730Descriptor, source: HttpUrl | None = None, chain_id: int | None = None
input_descriptor: InputERC7730Descriptor,
source: HttpUrl | None = None,
chain_id: int | None = None,
out: OutputAdder | None = None,
) -> list[CalldataDescriptor]:
"""
Generate output calldata descriptors from input ERC-7730 descriptor with contract context.

If descriptor is invalid, an empty list is returned. If the descriptor is partially invalid, a partial list is
returned. Errors are logged as warnings.
returned. Errors are reported to the error handler.

:param input_descriptor: input descriptor
:param source: source of the descriptor file
:param chain_id: if set, only emit calldata descriptors for given chain IDs
:param out: error handler, defaults to printing errors to the console
:return: output calldata descriptors (1 per chain + selector)
"""

out = ConsoleOutputAdder()
out = ConsoleOutputAdder() if out is None else out
try:
if not isinstance(input_descriptor.context, InputContractContext):
return []
Expand Down
Loading