Skip to content

Commit

Permalink
Merge pull request #3 from Jimmy-chy/nft1
Browse files Browse the repository at this point in the history
MetaMask可以显示token,NFT二次交易还未能实现
Jimmy-chy authored May 28, 2022
2 parents 511b2f2 + 2dac939 commit 201bf4a
Showing 53 changed files with 29,252 additions and 5,962 deletions.
12 changes: 12 additions & 0 deletions .idea/IdeaProjects.iml

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

2 changes: 1 addition & 1 deletion .idea/modules.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.
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/988bfe25b3bfa09c8dffe6dce66920be.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.
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":"2440","price":"200","image":"http://localhost:3333/images/4867f572ef9d32499994864fd55ad0ec.jpeg"},"2":{"name":"2","description":"2440","price":"31415926","image":"http://localhost:3333/images/c8028aaf536d200f37d8507e74bbe318.jpeg"},"3":{"name":"1878-01","description":"1878","price":"1878","image":"http://localhost:3333/images/63292b1740a336c179c0af85fc647ead.jpg"},"4":{"name":"1878-02","description":"1878","price":"3000000000000000000","image":"http://localhost:3333/images/7dca7f4a5a62a56282e0a4803fab9007.jpg"},"5":{"name":"d41E-01","description":"d41E","price":"33333333333333333333333","image":"http://localhost:3333/images/929c7ce3da830d1699942efa2dcd476e.jpeg"},"6":{"name":"d41E-02","description":"d41E","price":"2222222222222","image":"http://localhost:3333/images/41b6b652809c8812c51e962fe4e2a2ec.jpeg"},"7":{"name":"test-d41E","description":"d41E","price":"22000000000000000000","image":"http://localhost:3333/images/254abb9ba4d67d0ad8b7bb6d8285403e.jpg"},"8":{"name":"123","description":"12","price":"22222222223","image":"http://localhost:3333/images/de452812375ecfc8c4fc0450e0ee2fff.jpeg"},"9":{"name":"price3","description":"test","image":"http://localhost:3333/images/5890094013edaba118f264c40f6fa5ec.jpg"},"10":{"name":"price4-A2de","description":"A2de","image":"http://localhost:3333/images/e33c734242764b494b02f4921e53d6bf.jpg"},"11":{"name":"11","description":"11","image":"http://localhost:3333/images/794c17d4f6f6bf3367155bf9e97786db.jpeg"}}
3 changes: 2 additions & 1 deletion backend/routes/tokensRoutes.js
Original file line number Diff line number Diff line change
@@ -21,13 +21,14 @@ const tokensRoutes = (app) => {
// CREATE
app.post('/tokens', upload.single('img'), (req, res) => {
const { filename } = req.file;
const { tokenId, name, description } = req.body;
const { tokenId, name, description ,price} = req.body;

// const tokenId = uuidv4();

tokens[tokenId] = {
name,
description,
price,
image: req.protocol + '://' + req.get('host') + "/images/" + filename
};

Loading

0 comments on commit 201bf4a

Please sign in to comment.