-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
De-duplicate agent signing logic (#1228)
* WIP: merge common signing logic into sign() util * WIP: add Encoder interface for signed types * Feat: add consts for salt values * Cleanup: remove specific language from generic signEncoder func * Fix: parity tests * Cleanup: lint
- Loading branch information
Showing
10 changed files
with
125 additions
and
147 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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package types | ||
|
||
// Note: these salt values are taken from contracts/libs/Constants.sol. | ||
|
||
// AttestationValidSalt is the salt for ATTESTATION_VALID_SALT. | ||
const AttestationValidSalt = "ATTESTATION_VALID_SALT" | ||
|
||
// AttestationInvalidSalt is the salt for ATTESTATION_INVALID_SALT. | ||
const AttestationInvalidSalt = "ATTESTATION_INVALID_SALT" | ||
|
||
// ReceiptValidSalt is the salt for RECEIPT_VALID_SALT. | ||
const ReceiptValidSalt = "RECEIPT_VALID_SALT" | ||
|
||
// ReceiptInvalidSalt is the salt for RECEIPT_INVALID_SALT. | ||
const ReceiptInvalidSalt = "RECEIPT_INVALID_SALT" | ||
|
||
// SnapshotValidSalt is the salt for SNAPSHOT_VALID_SALT. | ||
const SnapshotValidSalt = "SNAPSHOT_VALID_SALT" | ||
|
||
// StateInvalidSalt is the salt for STATE_INVALID_SALT. | ||
const StateInvalidSalt = "STATE_INVALID_SALT" |
Oops, something went wrong.