Closed horsefacts closed 1 year ago
Coverage after merging horsefacts/shared-eip-712-contract into main will be
98.65% |
---|
File | Stmts | Branches | Funcs | Lines | Uncovered Lines |
---|---|---|---|---|---|
src | |||||
Bundler.sol | 100% | 100% | 100% | 100% | |
FnameResolver.sol | 100% | 100% | 100% | 100% | |
IdRegistry.sol | 100% | 100% | 100% | 100% | |
KeyRegistry.sol | 100% | 100% | 100% | 100% | |
StorageRegistry.sol | 100% | 100% | 100% | 100% | |
src/lib | |||||
EIP712.sol | 50% | 100% | 50% | 50% | 19 |
Signatures.sol | 100% | 100% | 100% | 100% | |
TransferHelper.sol | 0% | 0% | 0% | 0% | 12, 17, 20, 20, 20 |
TrustedCaller.sol | 100% | 100% | 100% | 100% | |
src/validators | |||||
SignedKeyRequestValidator.sol | 100% | 100% | 100% | 100% |
Motivation
As we've worked on consuming these contracts from Warpcast, we've added a few EIP-712 helper views. These are useful for clients debugging their own EIP-712 signatures. This PR cleans up our EIP712-related functionality and adds consistent helper views everywhere by extracting a shared abstract base contract.
Change Summary
Refactor all contracts using EIP-712 signatures to use our own
EIP712
base contract, which inherits OZEIP712
and exposeshashTypedDataV4
anddomainSeparatorV4
. Expose typehashes as public constants. Remove most test harness wrappers, which are no longer needed.Merge Checklist
Choose all relevant options below by adding an
x
now or at any time before submitting for reviewPR-Codex overview
Detailed summary
This PR focuses on making several changes and improvements to the codebase. The notable changes include:
KeyRegistry.integration.t.sol
IdRegistry
inIdRegistry.gas.t.sol
SignedKeyRequestValidator.t.sol
KeyRegistry.t.sol
IdRegistry.owner.t.sol
EIP712.sol
BundlerTestSuite.sol
FnameResolver.t.sol
IdRegistry.t.sol
SignedKeyRequestValidatorTestSuite.sol
KeyRegistryTestSuite.sol
FnameResolverTestSuite.sol