Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
18a5fdb2
Unverified
Commit
18a5fdb2
authored
Nov 07, 2023
by
lbeder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve delegated attestations
parent
a281abba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
7 deletions
+14
-7
EAS.sol
packages/contracts-bedrock/src/EAS/EAS.sol
+1
-1
EIP1271Verifier.sol
...ges/contracts-bedrock/src/EAS/eip1271/EIP1271Verifier.sol
+13
-6
No files found.
packages/contracts-bedrock/src/EAS/EAS.sol
View file @
18a5fdb2
...
...
@@ -84,7 +84,7 @@ contract EAS is IEAS, ISemver, EIP1271Verifier {
string public constant version = "1.3.0";
/// @dev Creates a new EAS instance.
constructor() EIP1271Verifier("EAS", "1.
2
.0") { }
constructor() EIP1271Verifier("EAS", "1.
3
.0") { }
/// @inheritdoc IEAS
function getSchemaRegistry() external pure returns (ISchemaRegistry) {
...
...
packages/contracts-bedrock/src/EAS/eip1271/EIP1271Verifier.sol
View file @
18a5fdb2
...
...
@@ -30,13 +30,13 @@ abstract contract EIP1271Verifier is EIP712 {
error InvalidNonce();
// The hash of the data type used to relay calls to the attest function. It's the value of
// keccak256("Attest(
bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32 refUID,bytes
// data,uint256 value,uint256 nonce,uint64 deadline)").
bytes32 private constant ATTEST_TYPEHASH = 0xf
83bb2b0ede93a840239f7e701a54d9bc35f03701f51ae153d601c6947ff3d3f
;
// keccak256("Attest(
address attester,bytes32 schema,address recipient,uint64 expirationTime,bool revocable,bytes32
//
refUID,bytes
data,uint256 value,uint256 nonce,uint64 deadline)").
bytes32 private constant ATTEST_TYPEHASH = 0xf
eb2925a02bae3dae48d424a0437a2b6ac939aa9230ddc55a1a76f065d988076
;
// The hash of the data type used to relay calls to the revoke function. It's the value of
// keccak256("Revoke(bytes32 schema,bytes32 uid,uint256 value,uint256 nonce,uint64 deadline)").
bytes32 private constant REVOKE_TYPEHASH = 0x
2d4116d8c9824e4c316453e5c2843a1885580374159ce8768603c49085ef424c
;
// keccak256("Revoke(
address revoker,
bytes32 schema,bytes32 uid,uint256 value,uint256 nonce,uint64 deadline)").
bytes32 private constant REVOKE_TYPEHASH = 0x
b5d556f07587ec0f08cf386545cc4362c702a001650c2058002615ee5c9d1e75
;
// The user readable name of the signing domain.
bytes32 private immutable _name;
...
...
@@ -116,6 +116,7 @@ abstract contract EIP1271Verifier is EIP712 {
keccak256(
abi.encode(
ATTEST_TYPEHASH,
request.attester,
request.schema,
data.recipient,
data.expirationTime,
...
...
@@ -150,7 +151,13 @@ abstract contract EIP1271Verifier is EIP712 {
bytes32 hash = _hashTypedDataV4(
keccak256(
abi.encode(
REVOKE_TYPEHASH, request.schema, data.uid, data.value, _nonces[request.revoker]++, request.deadline
REVOKE_TYPEHASH,
request.revoker,
request.schema,
data.uid,
data.value,
_nonces[request.revoker]++,
request.deadline
)
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment