diff --git a/packages/foundry/script/Deploy.s.sol b/packages/foundry/script/Deploy.s.sol
index 379d229..f370a22 100644
--- a/packages/foundry/script/Deploy.s.sol
+++ b/packages/foundry/script/Deploy.s.sol
@@ -113,12 +113,19 @@ contract DeployScript is ScaffoldETHDeploy {
TokensPropertiesStorage.TokenProperties
memory tokenProperties = TokensPropertiesStorage.TokenProperties(
- true,
+ false,
100
);
instance.createToken(tokenProperties);
- // instance.createToken(tokenProperties);
+
+ // TokensPropertiesStorage.TokenProperties
+ // memory tokenProperties2 = TokensPropertiesStorage.TokenProperties(
+ // true,
+ // 100
+ // );
+
+ // instance.createToken(tokenProperties2);
instance.setTokenURI(0, string.concat(BASE_URI, "0"));
// instance.setTokenURI(1, string.concat(BASE_URI, "1"));
@@ -127,26 +134,26 @@ contract DeployScript is ScaffoldETHDeploy {
mintOperations.to = 0x62286D694F89a1B12c0214bfcD567bb6c2951491;
mintOperations
- .operations = new IReputationTokensInternal.TokenOperation[](2);
+ .operations = new IReputationTokensInternal.TokenOperation[](1);
mintOperations.operations[0] = IReputationTokensInternal.TokenOperation(
0,
90
);
- mintOperations.operations[1] = IReputationTokensInternal.TokenOperation(
- 1,
- 45
- );
+ // mintOperations.operations[1] = IReputationTokensInternal.TokenOperation(
+ // 1,
+ // 45
+ // );
instance.mint(mintOperations);
IReputationTokensInternal.TokensOperations memory mintOperations2;
mintOperations2.to = 0x2643658817324C6536E3A027a15Cd11576Fa5884;
mintOperations2
- .operations = new IReputationTokensInternal.TokenOperation[](2);
+ .operations = new IReputationTokensInternal.TokenOperation[](1);
mintOperations2.operations[0] = IReputationTokensInternal
.TokenOperation(0, 90);
- mintOperations2.operations[1] = IReputationTokensInternal
- .TokenOperation(1, 45);
+ // mintOperations2.operations[1] = IReputationTokensInternal
+ // .TokenOperation(1, 45);
instance.mint(mintOperations2);
// Hats hatsInstance = new Hats("Hats", "ipfs");
diff --git a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx
index a0bdd24..d1d5bc8 100644
--- a/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx
+++ b/packages/nextjs/app/rep-tokens-demo/_components/RepTokensDemo.tsx
@@ -66,8 +66,6 @@ export function RepTokensDemo() {
const singleCard0 = buildTokenCard(tokensData?.tokens[0], tokensData.address, singleCardConfig);
- console.log(singleCard0);
-
return (
<>
diff --git a/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardConfig.ts b/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardConfig.ts
index 5d1ff83..23580b7 100644
--- a/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardConfig.ts
+++ b/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardConfig.ts
@@ -7,7 +7,7 @@ import {
} from "../../../../components/rep-tokens/types/Types";
import { TokenGroupCardConfigProps } from "../../../../components/rep-tokens/types/Types";
-export const balanceProps = {
+export const balanceConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300",
@@ -16,7 +16,7 @@ export const balanceProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const imageProps = {
+export const imageConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300 p-1",
@@ -26,7 +26,7 @@ export const imageProps = {
isPrettyLoading: true,
} as ImageValueCardConfigProp;
-export const nameProps = {
+export const nameConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300",
@@ -35,7 +35,7 @@ export const nameProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const descriptionProps = {
+export const descriptionConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300",
@@ -44,7 +44,7 @@ export const descriptionProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const addressProps = {
+export const addressConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg flex items-center justify-center bg-slate-300",
@@ -53,12 +53,32 @@ export const addressProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
+export const isTradeableConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-indigo-300 ",
+ value: "text-1xl text-center object-center mx-auto font-bold break-all text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
+export const maxMintAmountConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-teal-300",
+ value: "text-1xl text-center object-center mx-auto font-bold text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
export const tokenCardValuesProps = {
- balanceProps,
- imageProps,
- nameProps,
- descriptionProps,
- addressProps,
+ balanceConfigProps,
+ imageConfigProps,
+ nameConfigProps,
+ descriptionConfigProps,
+ addressConfigProps,
+ isTradeableConfigProps,
+ maxMintAmountConfigProps,
} as TokenCardValuesConfigProps;
export const tokenCardConfigProps = {
diff --git a/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardWithNumberOverlayConfig.ts b/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardWithNumberOverlayConfig.ts
index ea859fc..8f96f67 100644
--- a/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardWithNumberOverlayConfig.ts
+++ b/packages/nextjs/app/rep-tokens-demo/_components/configs/MainTokensCardWithNumberOverlayConfig.ts
@@ -7,7 +7,7 @@ import {
} from "../../../../components/rep-tokens/types/Types";
import { TokenGroupCardConfigProps } from "../../../../components/rep-tokens/types/Types";
-export const balanceProps = {
+export const balanceConfigProps = {
isRendering: true,
classes: {
card: "absolute top-1/4 left-1/2 transform -translate-x-1/2 -translate-y-1/3",
@@ -16,7 +16,7 @@ export const balanceProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const imageProps = {
+export const imageConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300 p-1",
@@ -26,7 +26,7 @@ export const imageProps = {
isPrettyLoading: true,
} as ImageValueCardConfigProp;
-export const nameProps = {
+export const nameConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300",
@@ -35,7 +35,7 @@ export const nameProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const descriptionProps = {
+export const descriptionConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300",
@@ -44,7 +44,7 @@ export const descriptionProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const addressProps = {
+export const addressConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg flex items-center justify-center bg-slate-300",
@@ -53,12 +53,32 @@ export const addressProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
+export const isTradeableConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-slate-300 ",
+ value: "text-1xl text-center object-center mx-auto font-bold break-all text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
+export const maxMintAmountConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-slate-300",
+ value: "text-1xl text-center object-center mx-auto font-bold text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
export const tokenCardValuesProps = {
- balanceProps,
- imageProps,
- nameProps,
- descriptionProps,
- addressProps,
+ balanceConfigProps,
+ imageConfigProps,
+ nameConfigProps,
+ descriptionConfigProps,
+ addressConfigProps,
+ isTradeableConfigProps,
+ maxMintAmountConfigProps,
} as TokenCardValuesConfigProps;
export const tokenCardConfigProps = {
diff --git a/packages/nextjs/app/rep-tokens-demo/_components/configs/NavBarCardConfig.ts b/packages/nextjs/app/rep-tokens-demo/_components/configs/NavBarCardConfig.ts
index e8847bd..432b767 100644
--- a/packages/nextjs/app/rep-tokens-demo/_components/configs/NavBarCardConfig.ts
+++ b/packages/nextjs/app/rep-tokens-demo/_components/configs/NavBarCardConfig.ts
@@ -7,7 +7,7 @@ import {
} from "../../../../components/rep-tokens/types/Types";
import { TokenGroupCardConfigProps } from "../../../../components/rep-tokens/types/Types";
-export const balanceProps = {
+export const balanceConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2",
@@ -16,7 +16,7 @@ export const balanceProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const imageProps = {
+export const imageConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-slate-300 p-1",
@@ -27,8 +27,8 @@ export const imageProps = {
} as ImageValueCardConfigProp;
export const tokenCardValuesProps = {
- balanceProps,
- imageProps,
+ balanceConfigProps,
+ imageConfigProps,
} as TokenCardValuesConfigProps;
export const tokenCardConfigProps = {
diff --git a/packages/nextjs/app/rep-tokens-demo/_components/configs/SingleCardConfig.ts b/packages/nextjs/app/rep-tokens-demo/_components/configs/SingleCardConfig.ts
index 9c1e7e9..d9891e5 100644
--- a/packages/nextjs/app/rep-tokens-demo/_components/configs/SingleCardConfig.ts
+++ b/packages/nextjs/app/rep-tokens-demo/_components/configs/SingleCardConfig.ts
@@ -6,7 +6,7 @@ import {
ValueCardConfigProps,
} from "../../../../components/rep-tokens/types/Types";
-export const balanceProps = {
+export const balanceConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-red-300",
@@ -15,7 +15,7 @@ export const balanceProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const imageProps = {
+export const imageConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-cyan-300 p-1",
@@ -25,7 +25,7 @@ export const imageProps = {
isPrettyLoading: true,
} as ImageValueCardConfigProp;
-export const nameProps = {
+export const nameConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-lime-300 ",
@@ -34,7 +34,7 @@ export const nameProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const descriptionProps = {
+export const descriptionConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg bg-violet-300",
@@ -43,7 +43,7 @@ export const descriptionProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
-export const addressProps = {
+export const addressConfigProps = {
isRendering: true,
classes: {
card: "rounded-lg flex items-center justify-center bg-pink-300",
@@ -52,12 +52,32 @@ export const addressProps = {
isPrettyLoading: true,
} as ValueCardConfigProps;
+export const isTradeableConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-indigo-300 ",
+ value: "text-1xl text-center object-center mx-auto font-bold break-all text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
+export const maxMintAmountConfigProps = {
+ isRendering: true,
+ classes: {
+ card: "rounded-lg bg-teal-300",
+ value: "text-1xl text-center object-center mx-auto font-bold text-black",
+ },
+ isPrettyLoading: true,
+} as ValueCardConfigProps;
+
export const tokenCardValuesProps = {
- balanceProps,
- imageProps,
- nameProps,
- descriptionProps,
- addressProps,
+ balanceConfigProps,
+ imageConfigProps,
+ nameConfigProps,
+ descriptionConfigProps,
+ addressConfigProps,
+ isTradeableConfigProps,
+ maxMintAmountConfigProps,
} as TokenCardValuesConfigProps;
export const tokenCardConfigProps = {
diff --git a/packages/nextjs/components/rep-tokens/cards/token-card/TokenCard.tsx b/packages/nextjs/components/rep-tokens/cards/token-card/TokenCard.tsx
index 9865396..91fb2bf 100644
--- a/packages/nextjs/components/rep-tokens/cards/token-card/TokenCard.tsx
+++ b/packages/nextjs/components/rep-tokens/cards/token-card/TokenCard.tsx
@@ -9,6 +9,8 @@ export interface ValuesProps {
descriptionProps?: StringCardProps;
imageProps?: ImageCardProps;
addressProps?: StringCardProps;
+ isTradeableProps?: StringCardProps;
+ maxMintAmountProps?: StringCardProps;
}
export interface TokenCardProps {
@@ -29,6 +31,8 @@ export const TokenCard = ({ props }: TokenCardInternalProps) => {
{props?.valuesProps?.nameProps ?
: <>>}
{props?.valuesProps?.descriptionProps ?
: <>>}
{props?.valuesProps?.addressProps ?
: <>>}
+ {props?.valuesProps?.isTradeableProps ?
: <>>}
+ {props?.valuesProps?.maxMintAmountProps ?
: <>>}
>
);
diff --git a/packages/nextjs/components/rep-tokens/cards/value-cards/BalanceCard.tsx b/packages/nextjs/components/rep-tokens/cards/value-cards/BalanceCard.tsx
index 7b424a6..97f50e4 100644
--- a/packages/nextjs/components/rep-tokens/cards/value-cards/BalanceCard.tsx
+++ b/packages/nextjs/components/rep-tokens/cards/value-cards/BalanceCard.tsx
@@ -13,8 +13,6 @@ export interface BigIntCardPropsInternal {
export const BalanceCard = ({ props }: BigIntCardPropsInternal) => {
let output;
- console.log(props);
-
props?.isPrettyLoading
? props?.value !== undefined
? (output = Number(props?.value))
diff --git a/packages/nextjs/components/rep-tokens/types/Types.tsx b/packages/nextjs/components/rep-tokens/types/Types.tsx
index c45a439..58a652e 100644
--- a/packages/nextjs/components/rep-tokens/types/Types.tsx
+++ b/packages/nextjs/components/rep-tokens/types/Types.tsx
@@ -16,11 +16,13 @@ export interface ImageValueCardConfigProp extends ValueCardConfigProps {
}
export interface TokenCardValuesConfigProps {
- balanceProps?: ValueCardConfigProps;
- imageProps?: ImageValueCardConfigProp;
- nameProps?: ValueCardConfigProps;
- descriptionProps?: ValueCardConfigProps;
- addressProps?: ValueCardConfigProps;
+ balanceConfigProps?: ValueCardConfigProps;
+ imageConfigProps?: ImageValueCardConfigProp;
+ nameConfigProps?: ValueCardConfigProps;
+ descriptionConfigProps?: ValueCardConfigProps;
+ addressConfigProps?: ValueCardConfigProps;
+ isTradeableConfigProps?: ValueCardConfigProps;
+ maxMintAmountConfigProps?: ValueCardConfigProps;
}
export interface TokenCardConfigProps {
diff --git a/packages/nextjs/components/rep-tokens/utils/buildTokensCard.tsx b/packages/nextjs/components/rep-tokens/utils/buildTokensCard.tsx
index acd4540..768355d 100644
--- a/packages/nextjs/components/rep-tokens/utils/buildTokensCard.tsx
+++ b/packages/nextjs/components/rep-tokens/utils/buildTokensCard.tsx
@@ -28,40 +28,54 @@ export function buildTokenCard(token: Token, address?: string, tokenCardProps?:
isPrettyLoading: tokenCardProps?.isPrettyLoading,
cardClasses: tokenCardProps?.cardClasses,
valuesProps: {
- balanceProps: tokenCardProps?.valuesProps?.balanceProps?.isRendering
+ balanceProps: tokenCardProps?.valuesProps?.balanceConfigProps?.isRendering
? {
value: token.balance,
- classes: tokenCardProps?.valuesProps?.balanceProps?.classes,
- isPrettyLoading: tokenCardProps?.valuesProps?.balanceProps?.isPrettyLoading,
+ classes: tokenCardProps?.valuesProps?.balanceConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.balanceConfigProps?.isPrettyLoading,
}
: undefined,
- nameProps: tokenCardProps?.valuesProps?.nameProps?.isRendering
+ nameProps: tokenCardProps?.valuesProps?.nameConfigProps?.isRendering
? {
value: token.name,
- classes: tokenCardProps?.valuesProps?.nameProps?.classes,
- isPrettyLoading: tokenCardProps?.valuesProps?.nameProps?.isPrettyLoading,
+ classes: tokenCardProps?.valuesProps?.nameConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.nameConfigProps?.isPrettyLoading,
}
: undefined,
- descriptionProps: tokenCardProps?.valuesProps?.descriptionProps?.isRendering
+ descriptionProps: tokenCardProps?.valuesProps?.descriptionConfigProps?.isRendering
? {
value: token.description,
- classes: tokenCardProps?.valuesProps?.descriptionProps?.classes,
- isPrettyLoading: tokenCardProps?.valuesProps?.descriptionProps?.isPrettyLoading,
+ classes: tokenCardProps?.valuesProps?.descriptionConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.descriptionConfigProps?.isPrettyLoading,
}
: undefined,
- imageProps: tokenCardProps?.valuesProps?.imageProps?.isRendering
+ imageProps: tokenCardProps?.valuesProps?.imageConfigProps?.isRendering
? {
value: token.image,
- properties: tokenCardProps?.valuesProps?.imageProps?.imageProperties,
- classes: tokenCardProps?.valuesProps?.imageProps?.classes,
- isPrettyLoading: tokenCardProps?.valuesProps?.imageProps?.isPrettyLoading,
+ properties: tokenCardProps?.valuesProps?.imageConfigProps?.imageProperties,
+ classes: tokenCardProps?.valuesProps?.imageConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.imageConfigProps?.isPrettyLoading,
}
: undefined,
- addressProps: tokenCardProps?.valuesProps?.addressProps?.isRendering
+ addressProps: tokenCardProps?.valuesProps?.addressConfigProps?.isRendering
? {
value: address,
- classes: tokenCardProps?.valuesProps?.addressProps?.classes,
- isPrettyLoading: tokenCardProps?.valuesProps?.addressProps?.isPrettyLoading,
+ classes: tokenCardProps?.valuesProps?.addressConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.addressConfigProps?.isPrettyLoading,
+ }
+ : undefined,
+ isTradeableProps: tokenCardProps?.valuesProps?.isTradeableConfigProps?.isRendering
+ ? {
+ value: `Is Tradeable: ${token.properties.isTradeable}`,
+ classes: tokenCardProps?.valuesProps?.isTradeableConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.isTradeableConfigProps?.isPrettyLoading,
+ }
+ : undefined,
+ maxMintAmountProps: tokenCardProps?.valuesProps?.maxMintAmountConfigProps?.isRendering
+ ? {
+ value: `Max Mint Amount Per Tx: ${token.properties.maxMintAmountPerTx}`,
+ classes: tokenCardProps?.valuesProps?.maxMintAmountConfigProps?.classes,
+ isPrettyLoading: tokenCardProps?.valuesProps?.maxMintAmountConfigProps?.isPrettyLoading,
}
: undefined,
},
@@ -72,52 +86,7 @@ export function buildTokenCards(tokens: Token[], address?: string, tokenCardProp
const arr = [];
for (let i = 0; i < tokens.length; i++) {
- const tokenCardProp: TokenCardProps = buildTokenCard(tokens[i], address, tokenCardProps);
-
- // const tokenCardProp: TokenCardProps = {
- // isPrettyLoading: tokenCardProps?.isPrettyLoading,
- // cardClasses: tokenCardProps?.cardClasses,
- // valuesProps: {
- // balanceProps: tokenCardProps?.valuesProps?.balanceProps?.isRendering
- // ? {
- // value: tokens[i].balance,
- // classes: tokenCardProps?.valuesProps?.balanceProps?.classes,
- // isPrettyLoading: tokenCardProps?.valuesProps?.balanceProps?.isPrettyLoading,
- // }
- // : undefined,
- // nameProps: tokenCardProps?.valuesProps?.nameProps?.isRendering
- // ? {
- // value: tokens[i].name,
- // classes: tokenCardProps?.valuesProps?.nameProps?.classes,
- // isPrettyLoading: tokenCardProps?.valuesProps?.nameProps?.isPrettyLoading,
- // }
- // : undefined,
- // descriptionProps: tokenCardProps?.valuesProps?.descriptionProps?.isRendering
- // ? {
- // value: tokens[i].description,
- // classes: tokenCardProps?.valuesProps?.descriptionProps?.classes,
- // isPrettyLoading: tokenCardProps?.valuesProps?.descriptionProps?.isPrettyLoading,
- // }
- // : undefined,
- // imageProps: tokenCardProps?.valuesProps?.imageProps?.isRendering
- // ? {
- // value: tokens[i].image,
- // properties: tokenCardProps?.valuesProps?.imageProps?.imageProperties,
- // classes: tokenCardProps?.valuesProps?.imageProps?.classes,
- // isPrettyLoading: tokenCardProps?.valuesProps?.imageProps?.isPrettyLoading,
- // }
- // : undefined,
- // addressProps: tokenCardProps?.valuesProps?.addressProps?.isRendering
- // ? {
- // value: address,
- // classes: tokenCardProps?.valuesProps?.addressProps?.classes,
- // isPrettyLoading: tokenCardProps?.valuesProps?.addressProps?.isPrettyLoading,
- // }
- // : undefined,
- // },
- // };
-
- arr.push(tokenCardProp);
+ arr.push(buildTokenCard(tokens[i], address, tokenCardProps));
}
return arr;
diff --git a/packages/nextjs/contracts/deployedContracts.ts b/packages/nextjs/contracts/deployedContracts.ts
index 82053ef..87136ac 100644
--- a/packages/nextjs/contracts/deployedContracts.ts
+++ b/packages/nextjs/contracts/deployedContracts.ts
@@ -7,7 +7,7 @@ import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
const deployedContracts = {
5: {
ReputationTokensStandalone: {
- address: "0x5F9e2765DdB28372dF0D67D3B5554143f5Ccd921",
+ address: "0x456CDB742e1Bda13fC3F5DbB6cde9B1F01F2B459",
abi: [
{
type: "constructor",