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: EIP712 verify #30

Merged
merged 4 commits into from
May 17, 2023
Merged

Feat: EIP712 verify #30

merged 4 commits into from
May 17, 2023

Conversation

bluekirby1111
Copy link
Contributor

Adds implementation to verify EIP712 signature

Copy link
Contributor

@mikonieminen mikonieminen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should at least fix those comments for Type and string representation of it.

src/signers/typed_ethereum.rs Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/lexer.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
src/utils/eip712/parser.rs Outdated Show resolved Hide resolved
Signed-off-by: Blue Kirby <blue.kirby@tutanota.com>
src/utils/eip712/lexer.rs Show resolved Hide resolved
src/utils/eip712/mod.rs Show resolved Hide resolved
#[test]
fn test_nested_array() {
let source = "bytes1[][][7][][][][][][][][]";
assert!(parse_type(source).is_err());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be OK?

Comment on lines +163 to +166
let source = "byte1[][][7][][][][][][][][]";
assert!(parse_type(source).is_err());
let source = "byte[][][7][][][][][][][][]";
assert!(parse_type(source).is_err());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these tests be somewhere else since these test wrong data?

Copy link
Contributor

@mikonieminen mikonieminen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code seems to be now right. Only problem is that test code looks wrong, but CI pipeline does not fail. Is it not running tests?

@bluekirby1111 bluekirby1111 merged commit 873db3a into master May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants