Implement the Add Puppy feature for the contract owner (foundation).
Created a Form on /add-puppy page, which has name, birthday, description and image slots for content maintainer calling the createPuppy method of our contract.
Although the image feature was expected to use ipfs storage, but I found it has some troubles after trying some packages, so I finally choose the old way: imgur API, which has a on-line server-side upload API made by myself 3 years ago on heroku.
Migrate some files to typescript to prevent some unexpected wrong-type error during development process: TransactionContext.
Compress & move images to /public folder for faster loading speed.
Add a favicon.ico for title use instead of the origin 512x512 high-resolution logo used only on Footer.
Description
Implement the
Add Puppy
feature for the contract owner (foundation).Created a Form on
/add-puppy
page, which hasname
,birthday
,description
andimage
slots for content maintainer calling thecreatePuppy
method of our contract.Although the
image
feature was expected to useipfs
storage, but I found it has some troubles after trying some packages, so I finally choose the old way:imgur
API, which has a on-line server-side upload API made by myself 3 years ago on heroku.Migrate some files to typescript to prevent some unexpected wrong-type error during development process:
TransactionContext
.Compress & move images to
/public
folder for faster loading speed.favicon.ico
for title use instead of the origin 512x512 high-resolution logo used only on Footer.How to verify?
screenshots