Skip to content

Commit

Permalink
Implement unit tests for FederatedAttestations (#9565)
Browse files Browse the repository at this point in the history
* add describe blocks for federated attestation tests

* ASv2 validateAttestation functionality and unit tests (#9532)

* validate attestation with eip712

* validate signature of attestation

* modify revokedSigners to boolean instead of time-based

* validate signer

* add validateAttestation docstring

* ASv2 initialize unit tests (#9544)

* initialize unit tests

* ASv2 registerAttestation unit tests (#9543)

* registerAttestation tests

* add docstring and use safemath

* PR comments and additional tests

* Implement FederatedAttestations lookup* unit tests (#9522)

* Modify lookupAttestations to not require ABIEncoderV2

* Implement unit tests for lookupAttestations

* Fix _isRevoked logic

* Clean up lookupAttestations tests

* Fix safemath use and docstring in lookupIdentifiersByAddress

* Implement unit tests for lookupIdentifiersByAddress

* Remove fixed TODO

* Fix some linting errors

* Nit: revocation boolean return

Co-authored-by: Cody Born <codyborn@outlook.com>

* Address PR comments

* Update lookup tests to use register and fix out of gas

* Unify variable names

* Remove ABIEncoderV2

* Add TODO ASv2 to fed-attestations-utils comments to revisit

* Update var names (part 2) to fix linting

* Fix lint checks in FA contract

Co-authored-by: Cody Born <codyborn@outlook.com>

* ASv2 deleteAttestation unit tests (#9563)

* deleteAttestation unit tests

* rename variable

* gas optimizations

* Fix delete loop incrementing

* Add revoke test case for registration

* Add case for registration when issuer == signer of attestation

Co-authored-by: Isabelle Wei <isabelle@clabs.co>
Co-authored-by: Cody Born <codyborn@outlook.com>
  • Loading branch information
3 people authored and martinvol committed Sep 26, 2022
1 parent be5c851 commit c8ae16d
Show file tree
Hide file tree
Showing 5 changed files with 1,278 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,5 @@ interface IAccounts {

function setPaymentDelegation(address, uint256) external;
function getPaymentDelegation(address) external view returns (address, uint256);
function isSigner(address, address, bytes32) external view returns (bool);
}
Loading

0 comments on commit c8ae16d

Please sign in to comment.