Skip to content

Commit

Permalink
added certain properties
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobHomanics committed Feb 1, 2024
1 parent 65e4c52 commit c46cf05
Show file tree
Hide file tree
Showing 11 changed files with 154 additions and 116 deletions.
27 changes: 17 additions & 10 deletions packages/foundry/script/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ export function RepTokensDemo() {

const singleCard0 = buildTokenCard(tokensData?.tokens[0], tokensData.address, singleCardConfig);

console.log(singleCard0);

return (
<>
<div className="flex flex-col justify-center items-center bg-primary bg-[length:100%_100%] py-1 px-5 sm:px-0 lg:py-auto max-w-[100vw] ">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -27,8 +27,8 @@ export const imageProps = {
} as ImageValueCardConfigProp;

export const tokenCardValuesProps = {
balanceProps,
imageProps,
balanceConfigProps,
imageConfigProps,
} as TokenCardValuesConfigProps;

export const tokenCardConfigProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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 ",
Expand All @@ -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",
Expand All @@ -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",
Expand All @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ export interface ValuesProps {
descriptionProps?: StringCardProps;
imageProps?: ImageCardProps;
addressProps?: StringCardProps;
isTradeableProps?: StringCardProps;
maxMintAmountProps?: StringCardProps;
}

export interface TokenCardProps {
Expand All @@ -29,6 +31,8 @@ export const TokenCard = ({ props }: TokenCardInternalProps) => {
{props?.valuesProps?.nameProps ? <StringCard props={props?.valuesProps?.nameProps} /> : <></>}
{props?.valuesProps?.descriptionProps ? <StringCard props={props?.valuesProps?.descriptionProps} /> : <></>}
{props?.valuesProps?.addressProps ? <Address props={props?.valuesProps?.addressProps} /> : <></>}
{props?.valuesProps?.isTradeableProps ? <StringCard props={props?.valuesProps?.isTradeableProps} /> : <></>}
{props?.valuesProps?.maxMintAmountProps ? <StringCard props={props?.valuesProps?.maxMintAmountProps} /> : <></>}
</>
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
12 changes: 7 additions & 5 deletions packages/nextjs/components/rep-tokens/types/Types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit c46cf05

Please sign in to comment.