Skip to content

Commit

Permalink
Added fusionseries nft changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alkadips committed Sep 28, 2023
1 parent 00643a2 commit c99c44d
Show file tree
Hide file tree
Showing 26 changed files with 400 additions and 245 deletions.
3 changes: 0 additions & 3 deletions layout/AppFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ const AppFooter = () => {
<div className="mt-3 cursor-pointer">Eternum Pass</div>
<div className="mt-3 cursor-pointer">Phygital NFTs</div>
<div className="mt-3 cursor-pointer">Eternnal Soul</div>
<div className="mt-3 cursor-pointer">Access Control</div>
<div className="mt-3 cursor-pointer">TradeHub</div>


</div>
<div className="p-heading">
<div className="font-bold text-2xl ">Contact Us</div>
Expand Down
41 changes: 19 additions & 22 deletions layout/AppFooterDashbord.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const AppFooterDashboard = () => {
}}
className={`${
layoutConfig.colorScheme === "light" ? "buy-back-image-footer" : "dark"
} layout-footer mt-5`}
} layout-footer justify-content-between`}

>
<div>
Expand All @@ -42,22 +42,20 @@ const AppFooterDashboard = () => {
<div>our Revolutionary App Store Explore.</div>
</div>
</div>
<div className="flex" style={{gap:'150px'}}>
<div className="p-heading">
<div className="font-bold text-2xl ">Explore</div>
<div className="mt-3 cursor-pointer">Signature Series</div>
<div className="mt-3 cursor-pointer">Fusion Series</div>
<div className="mt-3 cursor-pointer">Instagen</div>
<div className="mt-3 cursor-pointer">Eternum Pass</div>
<div className="mt-3 cursor-pointer">Phygital NFTs</div>
<div className="mt-3 cursor-pointer">Eternnal Soul</div>
<div className="mt-3 cursor-pointer">Access Control</div>
<div className="mt-3 cursor-pointer">TradeHub</div>
<div className="font-bold text-3xl ">Explore</div>
<div className="mt-3 cursor-pointer text-2xl">Signature Series</div>
<div className="mt-3 cursor-pointer text-2xl">Fusion Series</div>
<div className="mt-3 cursor-pointer text-2xl">Instagen</div>
<div className="mt-3 cursor-pointer text-2xl">Eternum Pass</div>
<div className="mt-3 cursor-pointer text-2xl">Phygital NFTs</div>
<div className="mt-3 cursor-pointer text-2xl">Eternnal Soul</div>
<div className="mt-3 cursor-pointer text-2xl">TradeHub</div>


</div>
<div className="p-heading">
<div className="font-bold text-2xl ">Contact Us</div>
<div className="font-bold text-3xl ">Contact Us</div>

<div className="flex gap-3 items-center mt-5">
<div className="mt-2">
Expand All @@ -69,10 +67,10 @@ const AppFooterDashboard = () => {
: "teliwhite"
}.svg`}
alt="Logo"
height="30"
width="30"
height="50"
width="50"
className="mr-2 border-icon"
style={{padding:'4px'}}
style={{padding:'12px'}}
/>
</Link>
</div>
Expand All @@ -87,10 +85,10 @@ const AppFooterDashboard = () => {
: "tweewhite"
}.svg`}
alt="Logo"
height="30"
width="30"
height="50"
width="50"
className="mr-2 border-icon"
style={{padding:'4px'}}
style={{padding:'12'}}
/>
</Link>

Expand All @@ -105,16 +103,15 @@ const AppFooterDashboard = () => {
: "diswhite"
}.svg`}
alt="Logo"
height="30"
width="30"
height="50"
width="50"
className="mr-2 border-icon"
style={{padding:'4px'}}
style={{padding:'12px'}}
/>
</Link>
</div>
</div>
</div>
</div>



Expand Down
53 changes: 30 additions & 23 deletions layout/AppTopbar.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@
import Link from "next/link";
import { classNames } from "primereact/utils";
import React, { useContext, useEffect, useRef, useState } from "react";
import React, {
useContext,
useEffect,
useRef,
useState,
} from "react";
import { LayoutContext } from "./context/layoutcontext";
import Image from "next/image";
import AppConfig from "./AppConfig";
import { useAccount, useDisconnect } from "wagmi";
import { ConnectButton } from "@rainbow-me/rainbowkit";
import { useRouter, withRouter } from "next/router";
import { toast } from "react-toastify";
function AppTopbar(props) {
const { isConnected } = useAccount();
const { isConnected } = useAccount();
const { disconnect } = useDisconnect();
const { layoutConfig, layoutState } = useContext(LayoutContext);
const [toggle, setToggle] = useState(false);
const topbarmenuRef = useRef(null);
const [plan, setsetPlan] = useState(null);

const router = useRouter();
useEffect(() => {
setsetPlan(
Expand All @@ -24,10 +29,14 @@ function AppTopbar(props) {
router.push("/");
}
}, []);
const logout = () => {
disconnect, localStorage.clear();
const logout=()=>{
disconnect,
localStorage.clear();
router.push("/");
};
}
const notify = ()=>{
toast.TYPE.WARNING;
}
return (
<div className="layout-topbar">
<Link href="/launchpad" className="layout-topbar-logo">
Expand All @@ -50,17 +59,15 @@ function AppTopbar(props) {
>
<Link
onClick={() =>
isConnected
? null
: setmodelmsg("Please connect your Wallet")
isConnected ? null : 'Please Connect to Your wallet'
}
href={
isConnected && !plan ? "/buySubscription" : "/storefrontDashboard"
}
href={isConnected && !plan ? "/buySubscription" : "/storefrontDashboard"}
>
<span className="font-bold text-white text-2xl">Launch</span>
</Link>
{model && (
<BuyAsset open={model} setOpen={setmodel} message={modelmsg} />
)}

{/* <Link
onClick={() =>
isConnected ? null : alert("Please connect to Your wallet")
Expand All @@ -71,7 +78,9 @@ function AppTopbar(props) {
</Link> */}

<div>
<ConnectButton className="connect-wallet" />
<ConnectButton
className="connect-wallet"
/>
</div>
<div onClick={() => setToggle(!toggle)}>
<img className="cursor-pointer" src="/profile.png"></img>
Expand Down Expand Up @@ -99,7 +108,7 @@ function AppTopbar(props) {
</div>
<div className="border-bottom-das"></div>

<div style={{ color: "black" }} className="flex gap-2 mt-2 ">
<div style={{ color: "black" }} className="flex gap-2 mt-2 ">
<div>
<i className="pi pi-eye"></i>
</div>
Expand All @@ -108,25 +117,23 @@ function AppTopbar(props) {
<div className="font-bold">View profile</div>
</div>
</Link>

</div>
<div className="border-bottom-das"></div>

<div
onClick={logout}
style={{ color: "black" }}
className="flex gap-2 mt-2 p-heading"
>
<div onClick={logout} style={{ color: "black" }} className="flex gap-2 mt-2 p-heading">
<div>
<i className="pi pi-sign-out"></i>
</div>
<div className=" cursor-pointer">
<div className="font-bold ">Logout</div>
</div>
<div className=" cursor-pointer">
<div className="font-bold ">Logout</div>
</div>
</div>
</div>
)}
<div>
<AppConfig />
{/* <DarkTheme/> */}
</div>
</div>
</div>
Expand Down
36 changes: 36 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"react-dom": "^18.2.0",
"react-icons": "^4.7.1",
"react-redux": "^8.0.5",
"react-toastify": "^9.1.3",
"react-transition-group": "^4.4.5",
"wagmi": "^0.5.12",
"web3": "^1.10.2"
Expand Down
3 changes: 3 additions & 0 deletions pages/_app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ import { Provider } from "react-redux";
import { alchemyProvider } from "wagmi/providers/alchemy";
import { publicProvider } from "wagmi/providers/public";
import "../styles/demo/LoadingSpinner.css";
// import 'react-toastify/dist/ReactToastify.css';
import '../node_modules/react-toastify/dist/ReactToastify.css'


import store from "../store";
import {
Expand Down
26 changes: 18 additions & 8 deletions pages/accessMasterRole.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import React, { useContext, useState } from "react";
import React, { useContext, useEffect, useState } from "react";
import accessMasterAbi from "../artifacts/contracts/accessmaster/AccessMaster.sol/AccessMaster.json";
import { InputText } from "primereact/inputtext";
const accessMaterAddress = process.env.NEXT_PUBLIC_FLOW_ACCESS_Master_ADDRESS;
import { useAccount, useEnsName } from "wagmi";
import { Button } from "primereact/button";
import Sidemenu from "./sidemenu";
Expand All @@ -10,27 +9,36 @@ import { ethers } from "ethers";
import { LayoutContext } from "../layout/context/layoutcontext";
import LayoutDashbord from "../Components/LayoutDashbord";
import { withRouter } from "next/router";
import { getAccessMasterByStorefrontID } from "../utils/util";
function AccessMasterRole(props) {
const { address } = useAccount();
const { data: ensName } = useEnsName({ address });
const [loading, setLoading] = useState(false);
const [loading1, setLoading1] = useState(false);
const [role, setRole] = useState("");
const [accessMasterAddress, setAccessMasterAddress] = useState("");
const { layoutConfig } = useContext(LayoutContext);
const [userAdddress, setuserAdddress] = useState('0x83AD8ddAdb013fbA80DE0d802FD4fB1a949AD79f');

const [userAdddress, setuserAdddress] = useState(address);
useEffect(() => {
getAccessMasterByStorefrontID(props.router.query.storefrontId).then(
(response) => {
setAccessMasterAddress(response[0]?.contractAddress);
}
);

}, []);
const revokeRoleData = async () => {
const provider = new ethers.providers.Web3Provider(window.ethereum);
console.log("provider", provider);
const signer = provider.getSigner();
const accessmasterContarct = new ethers.Contract(
accessMaterAddress,
accessMasterAddress,
accessMasterAbi.abi,
signer
);
setLoading1(true);
const revokerole = await accessmasterContarct.revokeRole(
await accessmasterContarct.FLOW_CREATOR_ROLE(),
await accessmasterContarct.FLOW_ADMIN_ROLE(),
address
);
setTimeout(() => {
Expand All @@ -41,16 +49,18 @@ const [loading, setLoading] = useState(false);
const provider = new ethers.providers.Web3Provider(window.ethereum);
const signer = provider.getSigner();
const accessmasterContarct = new ethers.Contract(
accessMaterAddress,
accessMasterAddress,
accessMasterAbi.abi,
signer
);
setLoading(true);

const grantrole = await accessmasterContarct.grantRole(
await accessmasterContarct.FLOW_CREATOR_ROLE(),
address
'0x83AD8ddAdb013fbA80DE0d802FD4fB1a949AD79f'
);
console.log('res',grantrole);

setTimeout(() => {
setLoading(false);
}, 2000);
Expand Down
13 changes: 8 additions & 5 deletions pages/addStorefront.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,22 @@ function AddStorefront() {
const valid = onClickButton();
if (valid) {
const storefronts = await getStorefrontData();

if (
storefronts?.find(
(sf) => sf.name?.toLowerCase() === contractName?.toLowerCase()
)
) {
alert(
`Storefront name'${contractName}'is already exist Please Enter Anather name`
);
const showSuccessPro = () => {
toast.current.show({
severity: "warn",
detail: `Storefront name '${contractName}' is already exist Please Enter Another name`,
life: 10000,
});
};
showSuccessPro();
setTimeout(() => {
setLoading(false);
}, 2000);

return;
}

Expand Down
Loading

0 comments on commit c99c44d

Please sign in to comment.