Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Remove the eip712 feature flag and have it enabled by default #2409

Merged
merged 8 commits into from
May 10, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 0 additions & 3 deletions ethers-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,3 @@ legacy = []

rustls = ["ethers-contract-abigen/rustls"]
openssl = ["ethers-contract-abigen/openssl"]

# Deprecated
eip712 = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you add them back here too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah right, yep.

2 changes: 1 addition & 1 deletion ethers-contract/tests/it/abigen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ fn can_generate_seaport_1_0() {
assert_eq!(hex::encode(FulfillAdvancedOrderCall::selector()), "e7acab24");

assert_codec::<SeaportErrors>();
let err = SeaportErrors::BadContractSignature(BadContractSignature::default());
let err = SeaportErrors::BadContractSignature(BadContractSignature);

let encoded = err.clone().encode();
assert_eq!(err, SeaportErrors::decode(encoded.clone()).unwrap());
Expand Down
3 changes: 0 additions & 3 deletions ethers-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,3 @@ rand.workspace = true
celo = ["legacy"] # celo support extends the transaction format with extra fields
legacy = []
macros = ["syn", "cargo_metadata", "once_cell"]

# Deprecated
eip712 = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same

4 changes: 0 additions & 4 deletions ethers-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ other utilities for interacting with the Ethereum ecosystem

For more information, please refer to the [book](https://gakonst.com/ethers-rs).

## Feature flags

- `eip712`: Provides the `Eip712` trait and derive procedural macro for EIP-712 encoding of typed data.
Copy link
Collaborator

Choose a reason for hiding this comment

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

modify to say "does nothing"


## ABI

This crate re-exports the [`ethabi`](https://docs.rs/ethabi) crate's functions
Expand Down
1 change: 0 additions & 1 deletion ethers-core/src/types/serde_helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ mod tests {
use crate::types::U256;

#[test]
#[cfg(feature = "eip712")]
fn test_deserialize_string_chain_id() {
use crate::types::transaction::eip712::EIP712Domain;

Expand Down
1 change: 0 additions & 1 deletion ethers-core/src/types/signature.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ impl fmt::Display for Signature {
}
}

#[cfg(feature = "eip712")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

combine with main impl block

impl Signature {
/// Recovers the ethereum address which was used to sign a given EIP712
/// typed data payload.
Expand Down
4 changes: 2 additions & 2 deletions ethers-providers/src/rpc/transports/retry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ mod tests {
let err: JsonRpcError = serde_json::from_str(s).unwrap();
let err = ClientError::JsonRpcError(err);

let should_retry = HttpRateLimitRetryPolicy::default().should_retry(&err);
let should_retry = HttpRateLimitRetryPolicy.should_retry(&err);
assert!(should_retry);
}

Expand All @@ -574,7 +574,7 @@ mod tests {
text: s.to_string(),
};

let should_retry = HttpRateLimitRetryPolicy::default().should_retry(&err);
let should_retry = HttpRateLimitRetryPolicy.should_retry(&err);
assert!(should_retry);
}
}