-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix precompile tuple encoding in return position (#2068)
* fix returns tuple encoding * use struct in Referanda precompile to keep same encoding * fix typos
- Loading branch information
Showing
13 changed files
with
435 additions
and
133 deletions.
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
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
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
40 changes: 20 additions & 20 deletions
40
...mpiles/utils/macro/tests/precompile/compile-fail/evm-data/output-dont-impl-evmdata.stderr
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 |
---|---|---|
@@ -1,21 +1,21 @@ | ||
error[E0277]: the trait bound `String: EvmData` is not satisfied | ||
--> tests/precompile/compile-fail/evm-data/output-dont-impl-evmdata.rs:26:46 | ||
| | ||
26 | fn foo(test: &mut impl PrecompileHandle) -> EvmResult<String> { | ||
| ^^^^^^^^^^^^^^^^^ the trait `EvmData` is not implemented for `String` | ||
| | ||
= help: the following other types implement trait `EvmData`: | ||
() | ||
(TupleElement0, TupleElement1) | ||
(TupleElement0, TupleElement1, TupleElement2) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7) | ||
and 27 others | ||
note: required by a bound in `EvmDataWriter::write` | ||
--> $WORKSPACE/precompiles/utils/src/data/mod.rs | ||
| | ||
| pub fn write<T: EvmData>(mut self, value: T) -> Self { | ||
| ^^^^^^^ required by this bound in `EvmDataWriter::write` | ||
--> tests/precompile/compile-fail/evm-data/output-dont-impl-evmdata.rs:26:46 | ||
| | ||
26 | fn foo(test: &mut impl PrecompileHandle) -> EvmResult<String> { | ||
| ^^^^^^^^^^^^^^^^^ the trait `EvmData` is not implemented for `String` | ||
| | ||
= help: the following other types implement trait `EvmData`: | ||
() | ||
(TupleElement0, TupleElement1) | ||
(TupleElement0, TupleElement1, TupleElement2) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6) | ||
(TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7) | ||
and $N others | ||
note: required by a bound in `encode_as_function_return_value` | ||
--> $WORKSPACE/precompiles/utils/src/data/mod.rs | ||
| | ||
| pub fn encode_as_function_return_value<T: EvmData>(value: T) -> Vec<u8> { | ||
| ^^^^^^^ required by this bound in `encode_as_function_return_value` |
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.