Skip to content

Commit

Permalink
prettier format
Browse files Browse the repository at this point in the history
  • Loading branch information
psparacino committed Nov 30, 2022
1 parent 82e9d76 commit fb18dd0
Show file tree
Hide file tree
Showing 67 changed files with 5,273 additions and 4,792 deletions.
2 changes: 1 addition & 1 deletion contracts/InstrumentDeedToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ contract InstrumentDeedToken is ERC721, ERC721Enumerable, ERC721URIStorage, Owna
return tokenId;
}

// TEMPORARY FUNCTION
// TESTING FUNCTION, DELETE

function batchMint(uint _amount, string memory hash) public {
for(uint i = 0; i<= _amount; i++){
Expand Down
22 changes: 9 additions & 13 deletions hardhat.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
require("hardhat-gas-reporter");
require('dotenv').config()
require("dotenv").config();

task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
const accounts = await hre.ethers.getSigners();
Expand All @@ -14,14 +14,14 @@ task("accounts", "Prints the list of accounts", async (taskArgs, hre) => {
module.exports = {
gasReporter: {
enabled: true,
currency: 'USD'
currency: "USD",
},
paths: {
sources: './contracts'
sources: "./contracts",
},
networks: {
hardhat: {
chainId: 31337
chainId: 31337,
},
/*
kovan: {
Expand All @@ -33,18 +33,14 @@ module.exports = {
accounts:[`${process.env.REACT_APP_PRIVATE_KEY}`],
}
*/


},
},
solidity: {
version: '0.8.10'
,
version: "0.8.10",
settings: {
optimizer: {
enabled: true,
runs: 200,
}
}
}
},
},
},
};

52 changes: 25 additions & 27 deletions lib/getPathsAndProps.js
Original file line number Diff line number Diff line change
@@ -1,43 +1,41 @@
import { useItemContext } from "../src/context/ItemContext";
//ethers
import { ethers } from 'ethers';
import { ethers } from "ethers";

//abi
import Provenance from '../artifacts/contracts/Provenance.sol/Provenance.json';
import Provenance from "../artifacts/contracts/Provenance.sol/Provenance.json";

// this needs to be rewritten for non-user specific data only

export async function getProvenanceAddresses() {
const { MothershipContract } = useContractObjectRepo()
const { MothershipContract } = useContractObjectRepo();
// const {mainAccount, setMainAccount, signer, provider} = useHandleEthereum();


const addressArray = await MothershipContract.getOwnersInstruments()

const addressArray = await MothershipContract.getOwnersInstruments();

const paths = addressArray.map((address) => (
{ params: { provenanceAddress: address.toString() },
}))

return { paths, fallback: false }
}
const paths = addressArray.map((address) => ({
params: { provenanceAddress: address.toString() },
}));

return { paths, fallback: false };
}

export function getProvenanceProps(context) {
const { provenanceObjects } = useItemContext();

const ProvenanceFullProps = [];

provenanceObjects.map((array, index) => {
const { ProvenanceContract, ProvenanceProps, ProvenanceOwnerInfo } = array;
ProvenanceFullProps.push({ ProvenanceContract, ProvenanceProps, ProvenanceOwnerInfo })
})
export function getProvenanceProps(context) {
const { provenanceObjects } = useItemContext();

const ProvenanceFullProps = [];

return {
provAddress,
ProvenanceFullProps
}
}

provenanceObjects.map((array, index) => {
const { ProvenanceContract, ProvenanceProps, ProvenanceOwnerInfo } = array;
ProvenanceFullProps.push({
ProvenanceContract,
ProvenanceProps,
ProvenanceOwnerInfo,
});
});

return {
provAddress,
ProvenanceFullProps,
};
}
8 changes: 4 additions & 4 deletions next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module.exports = {
reactStrictMode: true,
react : {
useSuspense: false
react: {
useSuspense: false,
},
images: {
domains: ["gateway.pinata.cloud"]
domains: ["gateway.pinata.cloud"],
},
}
};
44 changes: 17 additions & 27 deletions pages/_app.js
Original file line number Diff line number Diff line change
@@ -1,41 +1,33 @@

import 'bootstrap/dist/css/bootstrap.css';
import '../styles/global.css'
import { useEffect } from 'react';

import "bootstrap/dist/css/bootstrap.css";
import "../styles/global.css";
import { useEffect } from "react";

//temp style imports
import '../src/components/DragAndDrop.css';


import "../src/components/DragAndDrop.css";

//component imports
import NavBar from '../src/components/NavBar/NavBar';
import NavBar from "../src/components/NavBar/NavBar";

//context imports
import { UserContextProvider} from '../src/context/UserContext';
import { ContractContextProvider } from '../src/context/ContractContext';
import { ItemContextProvider } from '../src/context/ItemContext';
import { TransferContextProvider } from '../src/context/TransferContext';
import { UserContextProvider } from "../src/context/UserContext";
import { ContractContextProvider } from "../src/context/ContractContext";
import { ItemContextProvider } from "../src/context/ItemContext";
import { TransferContextProvider } from "../src/context/TransferContext";

// SSR Provider

import { SSRProvider } from 'react-bootstrap';
import { SSRProvider } from "react-bootstrap";

//hook imports
// import useHandleEthereum from "../src/hooks/useHandleEthereum.js";



function TrackYourAxe({ Component, pageProps }) {

// const {mainAccount, setMainAccount, signer, provider} = useHandleEthereum();


useEffect(() => {
import("bootstrap/dist/js/bootstrap");
}, []);

return (
<>
<SSRProvider>
Expand All @@ -45,15 +37,13 @@ function TrackYourAxe({ Component, pageProps }) {
<TransferContextProvider>
<NavBar />
<Component {...pageProps} />
</TransferContextProvider>
</ItemContextProvider>
</ContractContextProvider>
</UserContextProvider>
</SSRProvider>
</TransferContextProvider>
</ItemContextProvider>
</ContractContextProvider>
</UserContextProvider>
</SSRProvider>
</>


)
);
}

export default TrackYourAxe;
100 changes: 61 additions & 39 deletions pages/about/About.jsx
Original file line number Diff line number Diff line change
@@ -1,52 +1,74 @@
import * as React from "react";
import Link from "next/link";
import Link from "next/link";
import Image from "next/image";
import { Container } from "react-bootstrap";

import ethPowerUsage from '../../public/images/eth_power_usage.jpg'
import styles from './About.module.css';
import ethPowerUsage from "../../public/images/eth_power_usage.jpg";
import styles from "./About.module.css";

function About() {
return (
<Container>
<main className={styles.bodyText}>
<h1>Track Your...What?</h1>
<p>
Track Your Axe is an innovative blockchain-based solution verifying
ownership of musical instruments and items by creating a verifiable
history (provenance) of ownership.
</p>

return (
<Container>
<main className={styles.bodyText}>
<h1>Track Your...What?</h1>
<p>
Track Your Axe is an innovative blockchain-based solution verifying ownership of musical instruments and items by creating a verifiable history (provenance) of ownership.
</p>
<h2>How Does it Work?</h2>
<p>
Track Your Axe uses a public, trustless database, i.e. a blockchain,
to publicly store and record ownership of all items listed. This
registry tracks ownership history, item details, item images over
time, and location.
</p>
<hr />

<h2>How Does it Work?</h2>
<p >
Track Your Axe uses a public, trustless database, i.e. a blockchain, to publicly store and record ownership of all items listed. This registry tracks ownership history, item details, item images over time, and location.
</p>
<hr />
<h4>Is that Secure?</h4>
<p>
Indeed! To get technical about it, the 'deed' to the Provenance is,
technically, and NFT (non-fungible token). The code used to generate
this NFT is industry-standard and audited by third-parties, so your
ownership of the token is secure. This token is the used as the
indicator of ownership of the provenance itself, which exists at it's
own unique location on the blockchain.
</p>
<p>
The provenance is human-readable on the blockchain (the link to each
contract can be found on your item page) so you can visit it if you
wish, but if you don't wish to go that far, all the information is
displayed on this site.
</p>

<h4>Is that Secure?</h4>
<p>
Indeed! To get technical about it, the 'deed' to the Provenance is, technically, and NFT (non-fungible token). The code used to generate this NFT is industry-standard and audited by third-parties, so your ownership of the token is secure. This token is the used as the indicator of ownership of the provenance itself, which exists at it's own unique location on the blockchain.
</p>
<p>
The provenance is human-readable on the blockchain (the link to each contract can be found on your item page) so you can visit it if you wish, but if you don't wish to go that far, all the information is displayed on this site.
</p>
<h4>Why bother? And isn't blockchain bad for the planet?!?</h4>
<Image src={ethPowerUsage} />
<p>
Some instruments are so famous they are a household name; Lucille
comes to mind. However the number of instruments and artifacts that
trade hands daily is legion, and these instruments hold significant
cultural and monetary value. TYA allows for an indestrucible record
and lineage of these items and instruments and their history.
</p>
<p>
Additionally, there are a number of financial incentives to
registering your instrument on TYA. (list insurance, value of horn,
etc){" "}
</p>
<h4>
But, really, what about the planet?! and isn't blockchain expensive?!
</h4>
<p>blah blah blah, yadda yadda</p>

<h4>Why bother? And isn't blockchain bad for the planet?!?</h4>
<Image src={ethPowerUsage} />
<p>
Some instruments are so famous they are a household name; Lucille comes to mind. However the number of instruments and artifacts that trade hands daily is legion, and these instruments hold significant cultural and monetary value. TYA allows for
an indestrucible record and lineage of these items and instruments and their history.
</p>
<p>Additionally, there are a number of financial incentives to registering your instrument on TYA. (list insurance, value of horn, etc) </p>
<h4>But, really, what about the planet?! and isn't blockchain expensive?!</h4>
<p>blah blah blah, yadda yadda</p>

<h4>Ok, fine. So how do I register my instruments and items?</h4>
<p>Excellent question! Visit the tutorial page: <Link href='/'>here</Link> </p>
</main>

</Container>
);

<h4>Ok, fine. So how do I register my instruments and items?</h4>
<p>
Excellent question! Visit the tutorial page:{" "}
<Link href="/">here</Link>{" "}
</p>
</main>
</Container>
);
}

export default About;
4 changes: 2 additions & 2 deletions pages/about/About.module.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.bodyText p {
text-align: left;
}
text-align: left;
}
4 changes: 2 additions & 2 deletions pages/about/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import About from './About.jsx';
import About from "./About.jsx";

export default About;
export default About;
2 changes: 1 addition & 1 deletion pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: "John Doe" });
}
26 changes: 8 additions & 18 deletions pages/guides/how-it-works.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
function HowItWorksGuide() {


return (

<div className="WalletInfo" id="bootstrap-overrides">

TEST

</div>





);
}

export default HowItWorksGuide;
return (
<div className="WalletInfo" id="bootstrap-overrides">
TEST
</div>
);
}

export default HowItWorksGuide;
Loading

0 comments on commit fb18dd0

Please sign in to comment.