Commit 1ded9c45 authored by James Kim's avatar James Kim

use library constants

parent b371ef63
...@@ -7,6 +7,7 @@ import { AttestationStation } from "../universal/op-nft/AttestationStation.sol"; ...@@ -7,6 +7,7 @@ import { AttestationStation } from "../universal/op-nft/AttestationStation.sol";
import { OptimistAllowlist } from "../universal/op-nft/OptimistAllowlist.sol"; import { OptimistAllowlist } from "../universal/op-nft/OptimistAllowlist.sol";
import { OptimistInviter } from "../universal/op-nft/OptimistInviter.sol"; import { OptimistInviter } from "../universal/op-nft/OptimistInviter.sol";
import { OptimistInviterHelper } from "../testing/helpers/OptimistInviterHelper.sol"; import { OptimistInviterHelper } from "../testing/helpers/OptimistInviterHelper.sol";
import { OptimistConstants } from "../universal/op-nft/libraries/OptimistConstants.sol";
contract OptimistAllowlist_Initializer is Test { contract OptimistAllowlist_Initializer is Test {
event AttestationCreated( event AttestationCreated(
...@@ -217,7 +218,7 @@ contract OptimistAllowlistTest is OptimistAllowlist_Initializer { ...@@ -217,7 +218,7 @@ contract OptimistAllowlistTest is OptimistAllowlist_Initializer {
vm.prank(ted); vm.prank(ted);
attestationStation.attest( attestationStation.attest(
bob, bob,
optimistInviter.CAN_MINT_FROM_INVITE_ATTESTATION_KEY(), OptimistConstants.OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY,
bytes("true") bytes("true")
); );
assertFalse(optimistAllowlist.isAllowedToMint(bob)); assertFalse(optimistAllowlist.isAllowedToMint(bob));
......
...@@ -3,6 +3,7 @@ pragma solidity 0.8.15; ...@@ -3,6 +3,7 @@ pragma solidity 0.8.15;
import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol"; import { Semver } from "@eth-optimism/contracts-bedrock/contracts/universal/Semver.sol";
import { AttestationStation } from "./AttestationStation.sol"; import { AttestationStation } from "./AttestationStation.sol";
import { OptimistConstants } from "./libraries/OptimistConstants.sol";
/** /**
* @title OptimistAllowlist * @title OptimistAllowlist
...@@ -23,12 +24,6 @@ contract OptimistAllowlist is Semver { ...@@ -23,12 +24,6 @@ contract OptimistAllowlist is Semver {
bytes32 public constant COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY = bytes32 public constant COINBASE_QUEST_ELIGIBLE_ATTESTATION_KEY =
bytes32("coinbase.quest-eligible"); bytes32("coinbase.quest-eligible");
/**
* @notice Attestation key the OptimistInviter needs to issue to allow an address to mint.
*/
bytes32 public constant OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY =
bytes32("optimist.can-mint-from-invite");
/** /**
* @notice Address of the AttestationStation contract. * @notice Address of the AttestationStation contract.
*/ */
...@@ -125,7 +120,7 @@ contract OptimistAllowlist is Semver { ...@@ -125,7 +120,7 @@ contract OptimistAllowlist is Semver {
.attestations( .attestations(
OPTIMIST_INVITER, OPTIMIST_INVITER,
_claimer, _claimer,
OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY OptimistConstants.OPTIMIST_CAN_MINT_FROM_INVITE_ATTESTATION_KEY
) )
.length > 0; .length > 0;
} }
......
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