Commit 6404af03 authored by James Kim's avatar James Kim

add comments

parent 96c8f41d
...@@ -681,7 +681,7 @@ contract OptimistInviterTest is OptimistInviter_Initializer { ...@@ -681,7 +681,7 @@ contract OptimistInviterTest is OptimistInviter_Initializer {
_commitInviteAs(eve, signature4); _commitInviteAs(eve, signature4);
vm.expectRevert("OptimistInviter: issuer has no invites"); vm.expectRevert("OptimistInviter: issuer has no invites");
vm.prank(sally); vm.prank(eve);
optimistInviter.claimInvite(eve, claimableInvite4, signature4); optimistInviter.claimInvite(eve, claimableInvite4, signature4);
assertEq(_getInviteCount(bob), 0); assertEq(_getInviteCount(bob), 0);
......
...@@ -11,10 +11,12 @@ import { ...@@ -11,10 +11,12 @@ import {
} from "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; } from "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol";
/** /**
* @custom:upgradeable
* @title OptimistInviter * @title OptimistInviter
* @notice OptimistInviter is a contract that allows a user to issue invites as a signature, * @notice OptimistInviter is a contract that issues "optimist.can-invite" and
* allowing the invitee to claim the invite to an address of their choosing. The invitee * "optimist.can-mint-from-invite" attestations. Accounts that have a "optimist.can-invite"
* can claim the invite using a commit and reveal flow. * attestation can issue signatures that allow other accounts to claim an invite. The
* invitee uses a claim and reveal flow to claim the invite to an address of their choosing.
*/ */
contract OptimistInviter is Semver, EIP712Upgradeable { contract OptimistInviter is Semver, EIP712Upgradeable {
/** /**
...@@ -48,7 +50,7 @@ contract OptimistInviter is Semver, EIP712Upgradeable { ...@@ -48,7 +50,7 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
AttestationStation public immutable ATTESTATION_STATION; AttestationStation public immutable ATTESTATION_STATION;
/** /**
* @notice Struct that represents a claimable invite. * @notice Struct that represents a claimable invite that will be signed by the issuer.
* *
* @custom:field issuer Address that issued the signature. Reason this is explicitly included, * @custom:field issuer Address that issued the signature. Reason this is explicitly included,
* and not implicitly assumed to be the recovered address from the * and not implicitly assumed to be the recovered address from the
...@@ -74,6 +76,7 @@ contract OptimistInviter is Semver, EIP712Upgradeable { ...@@ -74,6 +76,7 @@ contract OptimistInviter is Semver, EIP712Upgradeable {
/** /**
* @custom:semver 1.0.0 * @custom:semver 1.0.0
*
* @param _inviteGranter Address of the invite granter. * @param _inviteGranter Address of the invite granter.
* @param _attestationStation Address of the AttestationStation contract. * @param _attestationStation Address of the AttestationStation contract.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment