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
2bc08bc7
Commit
2bc08bc7
authored
Mar 28, 2023
by
James Kim
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apply cr changes
parent
330e2859
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
OptimistInviter.sol
...-periphery/contracts/universal/op-nft/OptimistInviter.sol
+10
-10
No files found.
packages/contracts-periphery/contracts/universal/op-nft/OptimistInviter.sol
View file @
2bc08bc7
...
...
@@ -52,13 +52,13 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
/**
* @notice Attestation key for granting invites.
*/
bytes32 public constant CAN_INVITE_ATTESTATION_KEY =
bytes32
("optimist.can-invite");
bytes32 public constant CAN_INVITE_ATTESTATION_KEY =
keccak256
("optimist.can-invite");
/**
* @notice Attestation key allowing the attested account to mint.
*/
bytes32 public constant CAN_MINT_FROM_INVITE_ATTESTATION_KEY =
bytes32
("optimist.can-mint-from-invite");
keccak256
("optimist.can-mint-from-invite");
/**
* @notice Granter who can set accounts' invite counts.
...
...
@@ -249,6 +249,12 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
// Failing this check means that the issuer has used up all of their existing invites.
require(count > 0, "OptimistInviter: issuer has no invites");
// Reduce the issuer's invite count by 1 by re-attesting the optimist.can-invite attestation
// with the new count. Can be unchecked because we check that the count is > 0 above.
unchecked {
--count;
}
// Create the attestation that the claimer can mint from the issuer's invite.
// The invite issuer is included in the data of the attestation.
ATTESTATION_STATION.attest(
...
...
@@ -257,12 +263,6 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
abi.encode(_claimableInvite.issuer)
);
// Reduce the issuer's invite count by 1 by re-attesting the optimist.can-invite attestation
// with the new count. Can be unchecked because we check that the count is > 0 above.
unchecked {
--count;
}
ATTESTATION_STATION.attest(
_claimableInvite.issuer,
CAN_INVITE_ATTESTATION_KEY,
...
...
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