This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as ethers from 'ethers'; | |
| import { | |
| ExternalProvider, | |
| JsonRpcSigner, | |
| Network, | |
| Web3Provider | |
| } from '@ethersproject/providers'; | |
| import { useState } from 'react'; | |
| declare global { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity >=0.7.0 <0.9.0; | |
| contract Chat { | |
| // ... | |
| // We can use an autoincremental id for each new message. | |
| uint lastMessageId; | |
| function sendMessage(string _text) public { |