This file contains 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.8.3; | |
import "./Model.sol"; | |
contract Task { | |
Model.Task task; | |
mapping(address=> Model.Task[]) tasks; | |
event TaskStarted (address indexed owner, Model.Task task); | |
event TaskStopped (address indexed owner, Model.Task task); |
This file contains 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 React from 'react' | |
import Web3 from 'web3' | |
import {Button} from '@material-ui/core' | |
import {abi} from './abi' | |
const onClick = () => { | |
const web3 = new Web3(Web3.givenProvider) | |
const contract = new web3.eth.Contract(abi, '0x42F0A5c2007847a2c15D9ba75f1B028324b54dA2') |