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
31564f2e
Commit
31564f2e
authored
Mar 29, 2023
by
James Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use different eip712 version from semver
parent
5bb0ade5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
OptimistInviter.t.sol
...s-periphery/contracts/foundry-tests/OptimistInviter.t.sol
+4
-4
OptimistInviter.sol
...-periphery/contracts/universal/op-nft/OptimistInviter.sol
+12
-5
No files found.
packages/contracts-periphery/contracts/foundry-tests/OptimistInviter.t.sol
View file @
31564f2e
...
...
@@ -139,7 +139,7 @@ contract OptimistInviter_Initializer is Test {
_issueInviteWithEIP712Domain(
_privateKey,
bytes("OptimistInviter"),
bytes(optimistInviter.
version
()),
bytes(optimistInviter.
EIP712_VERSION
()),
block.chainid,
address(optimistInviter)
);
...
...
@@ -275,7 +275,7 @@ contract OptimistInviter_Initializer is Test {
ClaimableInviteEIP712TypedData.getDigest(
_claimableInvite,
bytes("OptimistInviter"),
bytes(optimistInviter.
version
()),
bytes(optimistInviter.
EIP712_VERSION
()),
block.chainid,
address(optimistInviter)
);
...
...
@@ -452,7 +452,7 @@ contract OptimistInviterTest is OptimistInviter_Initializer {
) = _issueInviteWithEIP712Domain(
bobPrivateKey,
"OptimismInviter",
bytes(optimistInviter.
version
()),
bytes(optimistInviter.
EIP712_VERSION
()),
1,
address(optimistInviter)
);
...
...
@@ -476,7 +476,7 @@ contract OptimistInviterTest is OptimistInviter_Initializer {
) = _issueInviteWithEIP712Domain(
bobPrivateKey,
"OptimismInviter",
bytes(optimistInviter.
version
()),
bytes(optimistInviter.
EIP712_VERSION
()),
block.chainid,
address(0xBEEF)
);
...
...
packages/contracts-periphery/contracts/universal/op-nft/OptimistInviter.sol
View file @
31564f2e
...
...
@@ -43,6 +43,14 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
*/
event InviteClaimed(address indexed issuer, address indexed claimer);
/**
* @notice Version used for the EIP712 domain separator. This version is separated from the
* contract semver because the EIP712 domain separator is used to sign messages, and
* changing the domain separator invalidates all existing signatures. We should only
* bump this version if we make a major change to the signature scheme.
*/
string public constant EIP712_VERSION = "1.0.0";
/**
* @notice EIP712 typehash for the ClaimableInvite type.
*/
...
...
@@ -114,16 +122,15 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
/**
* @notice Initializes this contract, setting the EIP712 context.
*
* When upgrading this contract, make sure to re-initialize and to update the version
* in the EIP712 context to the up-to-date semver by calling __EIP712_init again. After
* the EIP712 version is changed, any signatures that were issued off-chain but not
* claimed yet, will no longer be accepted by the claimInvite function. Please make
* Only update the EIP712_VERSION when there is a change to the signature scheme.
* After the EIP712 version is changed, any signatures issued off-chain but not
* claimed yet will no longer be accepted by the claimInvite function. Please make
* sure to notify the issuers that they must re-issue their invite signatures.
*
* @param _name Contract name
*/
function initialize(string memory _name) public initializer {
__EIP712_init(_name,
version()
);
__EIP712_init(_name,
EIP712_VERSION
);
}
/**
...
...
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