Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for talent protocol discounts #1089

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
229 changes: 229 additions & 0 deletions apps/web/src/abis/TalentProtocolDiscountValidator.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@
export default [
{
inputs: [
{
internalType: 'address',
name: 'owner_',
type: 'address',
},
{
internalType: 'address',
name: 'talentProtocol_',
type: 'address',
},
{
internalType: 'uint256',
name: 'threshold_',
type: 'uint256',
},
],
stateMutability: 'nonpayable',
type: 'constructor',
},
{
inputs: [],
type: 'error',
name: 'AlreadyInitialized',
},
{
inputs: [],
type: 'error',
name: 'NewOwnerIsZeroAddress',
},
{
inputs: [],
type: 'error',
name: 'NoHandoverRequest',
},
{
inputs: [],
type: 'error',
name: 'NoZeroAddress',
},
{
inputs: [],
type: 'error',
name: 'Unauthorized',
},
{
inputs: [
{
internalType: 'address',
name: 'pendingOwner',
type: 'address',
indexed: true,
},
],
type: 'event',
name: 'OwnershipHandoverCanceled',
anonymous: false,
},
{
inputs: [
{
internalType: 'address',
name: 'pendingOwner',
type: 'address',
indexed: true,
},
],
type: 'event',
name: 'OwnershipHandoverRequested',
anonymous: false,
},
{
inputs: [
{
internalType: 'address',
name: 'oldOwner',
type: 'address',
indexed: true,
},
{
internalType: 'address',
name: 'newOwner',
type: 'address',
indexed: true,
},
],
type: 'event',
name: 'OwnershipTransferred',
anonymous: false,
},
{
inputs: [
{
internalType: 'uint256',
name: 'newThreshold',
type: 'uint256',
indexed: false,
},
],
type: 'event',
name: 'ThresholdUpdated',
anonymous: false,
},
{
inputs: [],
stateMutability: 'payable',
type: 'function',
name: 'cancelOwnershipHandover',
},
{
inputs: [
{
internalType: 'address',
name: 'pendingOwner',
type: 'address',
},
],
stateMutability: 'payable',
type: 'function',
name: 'completeOwnershipHandover',
},
{
inputs: [
{
internalType: 'address',
name: 'claimer',
type: 'address',
},
{
internalType: 'bytes',
name: '',
type: 'bytes',
},
],
stateMutability: 'view',
type: 'function',
name: 'isValidDiscountRegistration',
outputs: [
{
internalType: 'bool',
name: '',
type: 'bool',
},
],
},
{
inputs: [],
stateMutability: 'view',
type: 'function',
name: 'owner',
outputs: [
{
internalType: 'address',
name: 'result',
type: 'address',
},
],
},
{
inputs: [
{
internalType: 'address',
name: 'pendingOwner',
type: 'address',
},
],
stateMutability: 'view',
type: 'function',
name: 'ownershipHandoverExpiresAt',
outputs: [
{
internalType: 'uint256',
name: 'result',
type: 'uint256',
},
],
},
{
inputs: [],
stateMutability: 'payable',
type: 'function',
name: 'renounceOwnership',
},
{
inputs: [],
stateMutability: 'payable',
type: 'function',
name: 'requestOwnershipHandover',
},
{
inputs: [
{
internalType: 'uint256',
name: 'threshold_',
type: 'uint256',
},
],
stateMutability: 'nonpayable',
type: 'function',
name: 'setThreshold',
},
{
inputs: [],
stateMutability: 'view',
type: 'function',
name: 'threshold',
outputs: [
{
internalType: 'uint256',
name: '',
type: 'uint256',
},
],
},
{
inputs: [
{
internalType: 'address',
name: 'newOwner',
type: 'address',
},
],
stateMutability: 'payable',
type: 'function',
name: 'transferOwnership',
},
] as const;
5 changes: 5 additions & 0 deletions apps/web/src/addresses/usernames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ export const USERNAME_1155_DISCOUNT_VALIDATORS: AddressMap = {
[base.id]: '0x55246A2AE466257B2fB54d4BB881Fb3f17D8e03e',
};

export const TALENT_PROTOCOL_DISCOUNT_VALIDATORS: AddressMap = {
[baseSepolia.id]: '0x8b769A3fbC29AC02344218840602615B6c9200e7',
[base.id]: '0x0',
};

export const USERNAME_REVERSE_REGISTRAR_ADDRESSES: AddressMap = {
[baseSepolia.id]: '0xa0A8401ECF248a9375a0a71C4dedc263dA18dCd7',
[base.id]: '0x79ea96012eea67a83431f1701b3dff7e37f9e282',
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import summerPassLvl3 from './images/summer-pass-lvl-3.svg';
import cbidVerification from './images/cbid-verification.svg';
import BNSOwnership from './images/bns.jpg';
import BaseNFT from './images/base-nft.svg';
import TalentProtocolIcon from './images/TalentProtocol.svg';
import coinbaseOneVerification from './images/coinbase-one-verification.svg';
import coinbaseVerification from './images/coinbase-verification.svg';
import { StaticImageData } from 'next/dist/shared/lib/get-img-props';
Expand Down Expand Up @@ -72,7 +73,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={coinbaseVerification as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -93,7 +94,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={coinbaseOneVerification as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -114,7 +115,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={cbidVerification as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -135,7 +136,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={baseBuildathonParticipant as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -151,12 +152,33 @@ export default function RegistrationLearnMoreModal({
</div>
)}
</li>
<li className="flex items-center gap-3">
<Tooltip content="Available for anyone with an onchain builder score 50+. Go to passport.talentprotocol.com to mint yours.">
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={TalentProtocolIcon as StaticImageData}
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
imageClassName={BaseDotEthNFTRowClasses}
/>
<p className={BaseDotEthNFTRowClasses}>Builder score 50+</p>
<InfoIcon />
</div>
</Tooltip>
{allActiveDiscounts.has(Discount.BASE_DOT_ETH_NFT) && (
<div className={qualifiedClasses}>
<p className="text-green-60">Qualified</p>
</div>
)}
</li>
<li className="flex items-center gap-3">
<Tooltip content="Available for anyone holding a Summer Pass Level 3 NFT. Go to wallet.coinbase.com/ocs to get your Summer Pass">
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={summerPassLvl3 as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -177,7 +199,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={BNSOwnership}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand All @@ -198,7 +220,7 @@ export default function RegistrationLearnMoreModal({
<div className="flex flex-row items-center justify-start gap-2">
<ImageWithLoading
src={BaseNFT as StaticImageData}
alt="criteria icon"
alt=""
width={30}
height={30}
wrapperClassName="rounded-full"
Expand Down
Loading
Loading