Skip to content
Open
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
5 changes: 5 additions & 0 deletions .idea/.gitignore

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

12 changes: 12 additions & 0 deletions .idea/gkpart.iml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backend/imgs/5c1bef3e5a70a41c0eec05a36aeaef8f.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backend/imgs/8b3efcfc726b49cffbf004c6e22aa2fb.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backend/imgs/dc417e1a5185cfdf6539b924eb3a904f.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added backend/imgs/dcbbe423994dd1badf7a8535cb9769cd.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion backend/routes/db.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"1":{"name":"Japan street sunset","description":"Lorem Ipsum is simply dummy text of the printing and typesetting industry.","image":"https://cdnb.artstation.com/p/assets/images/images/040/889/485/large/arseniy-chebynkin-bar-ext-sunset.jpg?1630162839"},"2":{"name":"lib","description":"aaaaaaa","image":"http://localhost:3333/images/fd7f6b6065596a70ba50ef834b28fb31.jpg"},"3":{"name":"unkown","description":"blocks in chain","image":"http://localhost:3333/images/c43952e6ff79e27d8e70656483859a90.png"}}
{"1":{"name":"1","description":"1","image":"http://localhost:3333/images/33632e14580cfacf11fc1487161caad2.jpeg"},"2":{"name":"shui","description":"cool","image":"http://localhost:3333/images/5c1bef3e5a70a41c0eec05a36aeaef8f.jpg"},"3":{"name":"123","description":"123456","image":"http://localhost:3333/images/dcbbe423994dd1badf7a8535cb9769cd.jpg"},"4":{"name":"4","description":"4","image":"http://localhost:3333/images/dc417e1a5185cfdf6539b924eb3a904f.jpg"},"5":{"name":"5","description":"5","image":"http://localhost:3333/images/e331165ea33bd772038209da75214cdb.jpeg"},"6":{"name":"10","description":"1000","image":"http://localhost:3333/images/0d8fce239dbfc7a92d9919c50cbad60c.png"},"7":{"name":"账户2","description":"hello","image":"http://localhost:3333/images/8b3efcfc726b49cffbf004c6e22aa2fb.jpg"}}
2 changes: 1 addition & 1 deletion client/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>NFT交易平台</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
5 changes: 4 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import Header from "./components/Header/index";
import Home from "./pages/Home/index";
import CreateNFT from "./pages/CreateNFT/index";
import Item from "./pages/Item/index";

import Transfer from "./pages/Transfer/index"
import "./App.css";
import MyNFTs from "./pages/My NFTs";


function App() {
Expand All @@ -18,6 +19,8 @@ function App() {
<Route path="/" exact component={Home} />
<Route path="/create-nft" component={CreateNFT} />
<Route path="/nft/:nftId" component={Item} />
<Route path="/my-nft" component={MyNFTs} />
<Route path="/transfer" component={Transfer} />
<Route>404 Not Found!</Route>
</Switch>
</Router>
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/Card/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const Card = ({ tokenId, name, image, price, owner, isForSale }) => {
viewBox="0 0 400 426.6"
titleAccess="ETH"
/>
<span>{Web3.utils.fromWei(String(price), "ether")}.120000</span>
<span>{Web3.utils.fromWei(String(price), "ether")}
{price}
</span>
</Typography>
<Divider className={classes.divider} light />
<Typography
Expand Down
77 changes: 76 additions & 1 deletion client/src/components/Header/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,51 @@ import Typography from "@material-ui/core/Typography";
import CssBaseline from "@material-ui/core/CssBaseline";
import useScrollTrigger from "@material-ui/core/useScrollTrigger";
import AccountBalanceWalletIcon from '@material-ui/icons/AccountBalanceWallet';

import Button from '@material-ui/core/Button';
import ClickAwayListener from '@material-ui/core/ClickAwayListener';
import Grow from '@material-ui/core/Grow';
import Paper from '@material-ui/core/Paper';
import Popper from '@material-ui/core/Popper';
import MenuItem from '@material-ui/core/MenuItem';
import MenuList from '@material-ui/core/MenuList';
import {useStyles} from './styles.js'

import logo from '../../assets/Logo.svg';

const Header = () => {
const classes = useStyles();
const account = useSelector((state) => state.allNft.account);
const [open, setOpen] = React.useState(false);
const anchorRef = React.useRef(null);

const handleToggle = () => {
setOpen((prevOpen) => !prevOpen);
};

const handleClose = (event) => {
if (anchorRef.current && anchorRef.current.contains(event.target)) {
return;
}

setOpen(false);
};

function handleListKeyDown(event) {
if (event.key === 'Tab') {
event.preventDefault();
setOpen(false);
}
}

// return focus to the button when we transitioned from !open -> open
const prevOpen = React.useRef(open);
React.useEffect(() => {
if (prevOpen.current === true && open === false) {
anchorRef.current.focus();
}

prevOpen.current = open;
}, [open]);

return (
<React.Fragment>
Expand All @@ -24,6 +61,44 @@ const Header = () => {
<Link to="/">
<img src={logo} alt="Galerie" className={classes.logo}/>
</Link>
<div className={classes.root}>
<div>
<Button
variant="contained" color="primary"
ref={anchorRef}
aria-controls={open ? 'menu-list-grow' : undefined}
aria-haspopup="true"
onClick={handleToggle}
>
Menu
</Button>
<Popper open={open} anchorEl={anchorRef.current} role={undefined} transition disablePortal>
{({ TransitionProps, placement }) => (
<Grow
{...TransitionProps}
style={{ transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' }}
>
<Paper>
<ClickAwayListener onClickAway={handleClose}>
<MenuList autoFocusItem={open} id="menu-list-grow" onKeyDown={handleListKeyDown}>
<Link to="/create-nft">
<MenuItem onClick={handleClose}> Mint your art</MenuItem>
</Link>
<Link to="/my-nft">
<MenuItem onClick={handleClose}> My NFTs</MenuItem>
</Link>
<Link to="/transfer">
<MenuItem onClick={handleClose}> Transfer </MenuItem>
</Link>

</MenuList>
</ClickAwayListener>
</Paper>
</Grow>
)}
</Popper>
</div>
</div>
<div className={classes.account}>
<AccountBalanceWalletIcon titleAccess="Wallet Address" className={classes.walletIcon}/>
<Typography variant="subtitle1">{account.slice(0,7)}...{account.slice(-4)}</Typography>
Expand Down
13 changes: 10 additions & 3 deletions client/src/components/Header/styles.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { makeStyles } from '@material-ui/core/styles';

const useStyles = makeStyles({
const useStyles = makeStyles((theme) =>({
header: {
background: '#3F51B5'
},
Expand All @@ -14,7 +14,14 @@ const useStyles = makeStyles({
},
walletIcon: {
marginRight: "0.4rem",
}
});
},
root: {
display: "flex",
marginLeft: "75rem",
},
paper: {
marginRight: theme.spacing(2),
},
}));

export { useStyles };
14 changes: 8 additions & 6 deletions client/src/contracts/Address.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"contractName": "Address",
"abi": [],
"metadata": "{\"compiler\":{\"version\":\"0.8.7+commit.e28d00a7\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Address.sol\":\"Address\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x3b4820cac4f127869f6eb496c1d74fa6ac86ed24071e0f94742e6aef20e7252c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://23e1c7303c30a2ef9c9b3f861cda15c78e4c9697b4a7988f2bf7b21c392a02fb\",\"dweb:/ipfs/QmWQJh5MsXJZjSTzAs9n5gtrqWYgXwkBa6xfwD5KKGQgSC\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201ff9cb264245318e9b05ff061165b15ecdf2494194cca0974b49b09fcd82b25464736f6c63430008070033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212201ff9cb264245318e9b05ff061165b15ecdf2494194cca0974b49b09fcd82b25464736f6c63430008070033",
"metadata": "{\"compiler\":{\"version\":\"0.8.13+commit.abaa5c0e\"},\"language\":\"Solidity\",\"output\":{\"abi\":[],\"devdoc\":{\"details\":\"Collection of functions related to the address type\",\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"@openzeppelin/contracts/utils/Address.sol\":\"Address\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\"},\"optimizer\":{\"enabled\":false,\"runs\":200},\"remappings\":[]},\"sources\":{\"@openzeppelin/contracts/utils/Address.sol\":{\"keccak256\":\"0x3b4820cac4f127869f6eb496c1d74fa6ac86ed24071e0f94742e6aef20e7252c\",\"license\":\"MIT\",\"urls\":[\"bzz-raw://23e1c7303c30a2ef9c9b3f861cda15c78e4c9697b4a7988f2bf7b21c392a02fb\",\"dweb:/ipfs/QmWQJh5MsXJZjSTzAs9n5gtrqWYgXwkBa6xfwD5KKGQgSC\"]}},\"version\":1}",
"bytecode": "0x60566050600b82828239805160001a6073146043577f4e487b7100000000000000000000000000000000000000000000000000000000600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d497061189998709c6437a11470db179941fbfb3b2933068022fc866b03045864736f6c634300080d0033",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212203d497061189998709c6437a11470db179941fbfb3b2933068022fc866b03045864736f6c634300080d0033",
"immutableReferences": {},
"generatedSources": [],
"deployedGeneratedSources": [],
Expand Down Expand Up @@ -36,6 +36,7 @@
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Address",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
Expand Down Expand Up @@ -4046,6 +4047,7 @@
{
"abstract": false,
"baseContracts": [],
"canonicalName": "Address",
"contractDependencies": [],
"contractKind": "library",
"documentation": {
Expand Down Expand Up @@ -8033,11 +8035,11 @@
},
"compiler": {
"name": "solc",
"version": "0.8.7+commit.e28d00a7.Emscripten.clang"
"version": "0.8.13+commit.abaa5c0e.Emscripten.clang"
},
"networks": {},
"schemaVersion": "3.4.1",
"updatedAt": "2021-08-25T12:11:03.743Z",
"schemaVersion": "3.4.5",
"updatedAt": "2022-04-12T03:18:09.715Z",
"devdoc": {
"details": "Collection of functions related to the address type",
"kind": "dev",
Expand Down
6,127 changes: 3,102 additions & 3,025 deletions client/src/contracts/ArtMarketplace.json

Large diffs are not rendered by default.

Loading