Mick00 / carfax-on-blockchain

Typescript version of Scaffold-Eth 🏗
MIT License
0 stars 0 forks source link

Add a car #28

Closed Mick00 closed 2 years ago

Mick00 commented 2 years ago

We have the Car NFT contract to tokenize cars and upload Metadata to IPFS and maintain the odometer with the smart contract.

The registrar front end will need an interface to let contributor register the cars before creating reports. You can check if a car has already been registered by calling the serialNumberToCar method on the Car contract. Upload of the metadata should if the car is already registered.

The Metadata on the car will be uploaded in JSON on IPFS in the following format: { "make":"Chevrolet", "model":"Cobalt", "year":"2010", "color":"black", "serial_number":"dwnajdnwoand" } To create a car, you have to call the register method of the car contract. It will require to pass in the serial number, the odometer value and the hash of the uploaded metadata.