Use the little fox (metamask) to sign the information and use vue to display it on the front end

The simple signature verification process was completed during the experiment of the paper before. After a long time and the computer was reinstalled, I recalled it again today.

overall

This demo uses ganache's local Ethereum account, uses remix to write smart contracts and uses metamask to connect remix and ganache and deploy smart contracts and signatures. Use vscode to build a vue framework and display it on the front end.

Ganache

Ganache is a tool for local development and testing of Ethereum applications. It can simulate Ethereum networks and transactions, and provides a visual user interface to facilitate developers to debug and test.
Note the port number here.
Note that the port number

metamask

Little Fox creates a new local connection
dada

account is the account in ganache

insert image description here

remix

Remix connects to metamask and selects the corresponding account
insert image description here
to realize the identity registration function, part of the code
insert image description here

vscode

The front-end interface
insert image description here
calls the little fox signature
insert image description here
signature script:
insert image description here
need to quote web3 and replace abi:
insert image description here

Guess you like

Origin blog.csdn.net/wujian0428/article/details/131827697