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

feat: erc165 support interface #281

Merged
merged 21 commits into from
Sep 27, 2024

++

252264f
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat: erc165 support interface #281

++
252264f
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy failed Sep 11, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (6)

contracts-proc/src/interface.rs|13 col 32| warning: this argument is passed by value, but not consumed in the function body
--> contracts-proc/src/interface.rs:13:32
|
13 | pub(crate) fn interface(attr: TokenStream, input: TokenStream) -> TokenStream {
| ^^^^^^^^^^^ help: consider taking a reference instead: &TokenStream
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: -W clippy::needless-pass-by-value implied by -W clippy::pedantic
= help: to override -W clippy::pedantic add #[allow(clippy::needless_pass_by_value)]
contracts-proc/src/interface.rs|51 col 17| warning: wildcard matches only a single variant and will also match any future added variants
--> contracts-proc/src/interface.rs:51:17
|
51 | _ => None,
| ^ help: try: FnArg::Receiver(_)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
= note: -W clippy::match-wildcard-for-single-variants implied by -W clippy::pedantic
= help: to override -W clippy::pedantic add #[allow(clippy::match_wildcard_for_single_variants)]
contracts-proc/src/lib.rs|3 col 1| warning: missing documentation for the crate
--> contracts-proc/src/lib.rs:3:1
|
3 | / extern crate proc_macro;
4 | | use proc_macro::TokenStream;
5 | |
6 | | /// Shorthand to print nice errors.
... |
22 | | interface::interface(attr, input)
23 | | }
| |
^
|
= note: requested on the command line with -W missing-docs
contracts-proc/src/interface.rs|13 col 32| warning: this argument is passed by value, but not consumed in the function body
--> contracts-proc/src/interface.rs:13:32
|
13 | pub(crate) fn interface(attr: TokenStream, input: TokenStream) -> TokenStream {
| ^^^^^^^^^^^ help: consider taking a reference instead: &TokenStream
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
= note: -W clippy::needless-pass-by-value implied by -W clippy::pedantic
= help: to override -W clippy::pedantic add #[allow(clippy::needless_pass_by_value)]
contracts-proc/src/interface.rs|51 col 17| warning: wildcard matches only a single variant and will also match any future added variants
--> contracts-proc/src/interface.rs:51:17
|
51 | _ => None,
| ^ help: try: FnArg::Receiver(_)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
= note: -W clippy::match-wildcard-for-single-variants implied by -W clippy::pedantic
= help: to override -W clippy::pedantic add #[allow(clippy::match_wildcard_for_single_variants)]
contracts-proc/src/lib.rs|3 col 1| warning: missing documentation for the crate
--> contracts-proc/src/lib.rs:3:1
|
3 | / extern crate proc_macro;
4 | | use proc_macro::TokenStream;
5 | |
6 | | /// Shorthand to print nice errors.
... |
22 | | interface::interface(attr, input)
23 | | }
| |
^
|
= note: requested on the command line with -W missing-docs

Filtered Findings (7)

lib/motsu/src/shims.rs|100 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:100:1
|
100 | / /// Reads a 32-byte value from permanent storage. Stylus's storage format is
101 | | /// identical to that of the EVM. This means that, under the hood, this hostio
102 | | /// is accessing the 32-byte value stored in the EVM state trie at offset
103 | | /// key, which will be 0 when not previously set. The semantics, then, are
104 | | /// equivalent to that of the EVM's [SLOAD] opcode.
105 | | ///
106 | | /// [SLOAD]: https://www.evm.codes/#54
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
= note: -W clippy::too-long-first-doc-paragraph implied by -W clippy::all
= help: to override -W clippy::all add #[allow(clippy::too_long_first_doc_paragraph)]
lib/motsu/src/shims.rs|125 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:125:1
|
125 | / /// Writes a 32-byte value to the permanent storage cache. Stylus's storage
126 | | /// format is identical to that of the EVM. This means that, under the hood,
127 | | /// this hostio represents storing a 32-byte value into the EVM state trie at
128 | | /// offset key. Refunds are tabulated exactly as in the EVM. The semantics,
129 | | /// then, are equivalent to that of the EVM's [SSTORE] opcode.
130 | | ///
131 | | /// Note: because the value is cached, one must call storage_flush_cache to
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
lib/motsu/src/shims.rs|171 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:171:1
|
171 | / /// Gets the address of the account that called the program. For normal
172 | | /// L2-to-L2 transactions the semantics are equivalent to that of the EVM's
173 | | /// [CALLER] opcode, including in cases arising from [DELEGATE_CALL].
174 | | ///
175 | | /// For L1-to-L2 retryable ticket transactions, the top-level sender's address
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
lib/motsu/src/shims.rs|216 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:216:1
|
216 | / /// Emits an EVM log with the given number of topics and data, the first bytes
217 | | /// of which should be the 32-byte-aligned topic data. The semantics are
218 | | /// equivalent to that of the EVM's [LOG0], [LOG1], [LOG2], [LOG3], and
219 | | /// [LOG4] opcodes based on the number of topics specified. Requesting more
220 | | /// than 4 topics will induce a revert.
221 | | ///
222 | | /// [LOG0]: https://www.evm.codes/#a0
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
lib/motsu/src/shims.rs|232 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:232:1
|
232 | / /// Gets the code hash of the account at the given address.
233 | | /// The semantics are equivalent to that of the EVM's [EXT_CODEHASH] opcode.
234 | | /// Note that the code hash of an account without code will be the empty hash
235 | | /// keccak("") = 236 | | /// c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470.
237 | | ///
238 | | /// [EXT_CODEHASH]: https://www.evm.codes/#3F
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
help: add an empty line
|
232 ~ /// Gets the code hash of the account at the given address.
233 + ///
|
lib/motsu/src/shims.rs|251 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:251:1
|
251 | / /// Returns the length of the last EVM call or deployment return result, or 0
252 | | /// if neither have happened during the program's execution. The semantics are
253 | | /// equivalent to that of the EVM's [RETURN_DATA_SIZE] opcode.
254 | | ///
255 | | /// [RETURN_DATA_SIZE]: https://www.evm.codes/#3d
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
lib/motsu/src/shims.rs|264 col 1| warning: first doc comment paragraph is too long
--> lib/motsu/src/shims.rs:264:1
|
264 | / /// Copies the bytes of the last EVM call or deployment return result. Does not
265 | | /// revert if out of bounds, but rather copies the overlapping portion. The
266 | | /// semantics are otherwise equivalent to that of the EVM's [RETURN_DATA_COPY]
267 | | /// opcode.
268 | | ///
269 | | /// Returns the number of bytes written.
| |_
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

Annotations

Check warning on line 13 in contracts-proc/src/interface.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/interface.rs#L13

warning: this argument is passed by value, but not consumed in the function body
  --> contracts-proc/src/interface.rs:13:32
   |
13 | pub(crate) fn interface(_attr: TokenStream, input: TokenStream) -> TokenStream {
   |                                ^^^^^^^^^^^ help: consider taking a reference instead: `&TokenStream`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
   = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
Raw output
contracts-proc/src/interface.rs:13:32:w:warning: this argument is passed by value, but not consumed in the function body
  --> contracts-proc/src/interface.rs:13:32
   |
13 | pub(crate) fn interface(_attr: TokenStream, input: TokenStream) -> TokenStream {
   |                                ^^^^^^^^^^^ help: consider taking a reference instead: `&TokenStream`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
   = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`


__END__

Check warning on line 51 in contracts-proc/src/interface.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/interface.rs#L51

warning: wildcard matches only a single variant and will also match any future added variants
  --> contracts-proc/src/interface.rs:51:17
   |
51 |                 _ => None,
   |                 ^ help: try: `FnArg::Receiver(_)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
   = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]`
Raw output
contracts-proc/src/interface.rs:51:17:w:warning: wildcard matches only a single variant and will also match any future added variants
  --> contracts-proc/src/interface.rs:51:17
   |
51 |                 _ => None,
   |                 ^ help: try: `FnArg::Receiver(_)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
   = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]`


__END__

Check warning on line 3 in contracts-proc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/lib.rs#L3

warning: missing documentation for the crate
  --> contracts-proc/src/lib.rs:3:1
   |
3  | / extern crate proc_macro;
4  | | use proc_macro::TokenStream;
5  | |
6  | | /// Shorthand to print nice errors.
...  |
22 | |     interface::interface(attr, input)
23 | | }
   | |_^
   |
   = note: requested on the command line with `-W missing-docs`
Raw output
contracts-proc/src/lib.rs:3:1:w:warning: missing documentation for the crate
  --> contracts-proc/src/lib.rs:3:1
   |
3  | / extern crate proc_macro;
4  | | use proc_macro::TokenStream;
5  | |
6  | | /// Shorthand to print nice errors.
...  |
22 | |     interface::interface(attr, input)
23 | | }
   | |_^
   |
   = note: requested on the command line with `-W missing-docs`


__END__

Check warning on line 13 in contracts-proc/src/interface.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/interface.rs#L13

warning: this argument is passed by value, but not consumed in the function body
  --> contracts-proc/src/interface.rs:13:32
   |
13 | pub(crate) fn interface(_attr: TokenStream, input: TokenStream) -> TokenStream {
   |                                ^^^^^^^^^^^ help: consider taking a reference instead: `&TokenStream`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
   = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
Raw output
contracts-proc/src/interface.rs:13:32:w:warning: this argument is passed by value, but not consumed in the function body
  --> contracts-proc/src/interface.rs:13:32
   |
13 | pub(crate) fn interface(_attr: TokenStream, input: TokenStream) -> TokenStream {
   |                                ^^^^^^^^^^^ help: consider taking a reference instead: `&TokenStream`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
   = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`


__END__

Check warning on line 51 in contracts-proc/src/interface.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/interface.rs#L51

warning: wildcard matches only a single variant and will also match any future added variants
  --> contracts-proc/src/interface.rs:51:17
   |
51 |                 _ => None,
   |                 ^ help: try: `FnArg::Receiver(_)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
   = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]`
Raw output
contracts-proc/src/interface.rs:51:17:w:warning: wildcard matches only a single variant and will also match any future added variants
  --> contracts-proc/src/interface.rs:51:17
   |
51 |                 _ => None,
   |                 ^ help: try: `FnArg::Receiver(_)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_wildcard_for_single_variants
   = note: `-W clippy::match-wildcard-for-single-variants` implied by `-W clippy::pedantic`
   = help: to override `-W clippy::pedantic` add `#[allow(clippy::match_wildcard_for_single_variants)]`


__END__

Check warning on line 3 in contracts-proc/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] contracts-proc/src/lib.rs#L3

warning: missing documentation for the crate
  --> contracts-proc/src/lib.rs:3:1
   |
3  | / extern crate proc_macro;
4  | | use proc_macro::TokenStream;
5  | |
6  | | /// Shorthand to print nice errors.
...  |
22 | |     interface::interface(attr, input)
23 | | }
   | |_^
   |
   = note: requested on the command line with `-W missing-docs`
Raw output
contracts-proc/src/lib.rs:3:1:w:warning: missing documentation for the crate
  --> contracts-proc/src/lib.rs:3:1
   |
3  | / extern crate proc_macro;
4  | | use proc_macro::TokenStream;
5  | |
6  | | /// Shorthand to print nice errors.
...  |
22 | |     interface::interface(attr, input)
23 | | }
   | |_^
   |
   = note: requested on the command line with `-W missing-docs`


__END__