Skip to content

Instantly share code, notes, and snippets.

View mihairadulescu's full-sized avatar
🦉

Mihai Radulescu mihairadulescu

🦉
View GitHub Profile
@mihairadulescu
mihairadulescu / task-contract.sol
Last active April 23, 2021 15:45
Contract Example
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);
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')