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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Web Stream Demo</title> | |
</head> | |
<!-- Internal CSS styling --> | |
<style> |
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
require("dotenv").config(); | |
const HDWalletProvider = require('@truffle/hdwallet-provider'); | |
module.exports = { | |
networks: { | |
cronosTestnet: { | |
provider: () => new HDWalletProvider(process.env.PRIVATE_KEY, `https://cronos-testnet-3.crypto.org:8545`), |
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
const SimpleStorage = artifacts.require("SimpleStorage"); | |
module.exports = function (deployer) { | |
deployer.deploy(SimpleStorage); | |
}; |
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
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.6; | |
contract SimpleStorage { | |
string public word; | |
constructor() { | |
word = "Welcome!"; | |
} |
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 { useState } from "react"; | |
import './App.css'; | |
import Web3 from "web3"; | |
import NumberChanger from "../src/artifacts/contracts/NumberChanger.sol/NumberChanger.json"; | |
const contractAddress = "0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"; | |
function App() { | |
const web3 = new Web3("http://localhost:8545"); |
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
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<h1>Welcome to Number Changer</h1> | |
<h3 > | |
Your number is: {number} | |
</h3> | |
<input | |
placeholder="Enter a number" | |
onChange={ (e) => setNewNumber(e.target.value) } |
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 { useState } from "react"; | |
import './App.css'; | |
import Web3 from "web3"; | |
import NumberChanger from "../src/artifacts/contracts/NumberChanger.sol/NumberChanger.json"; | |
const contractAddress = " 0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512"; | |
function App() { | |
const web3 = new Web3("http://localhost:8545"); |
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
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<h1>Welcome to Number Changer</h1> | |
<h3 > | |
Your number is: {number} | |
</h3> | |
<input | |
placeholder="Enter a number" | |
onChange={ (e) => setNewNumber(e.target.value) } |
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 logo from './logo.svg'; | |
import './App.css'; | |
function App() { | |
return ( | |
<div className="App"> | |
<header className="App-header"> | |
<img src={logo} className="App-logo" alt="logo" /> | |
<p> | |
Edit <code>src/App.js</code> and save to reload. | |
</p> |
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 { useState } from "react"; | |
import './App.css'; | |
import Web3 from "web3"; | |
import NumberChanger from "./build/NumberChanger.json"; | |
const contractAddress = "0x7c2481b87100844E11df966BcCD55E82A138Fe84"; | |
function App() { | |
const web3 = new Web3("http://localhost:8545"); |
NewerOlder