I hereby claim:
- I am bogdanhabic on github.
- I am bogdanhabic (https://keybase.io/bogdanhabic) on keybase.
- I have a public key ASAvSYxQ9KZuVHljYShJ8AbiHspxtwhGi427AKwpgcJsrQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
pragma solidity ^0.4.24; | |
contract Calculator { | |
uint c; | |
function add(uint a, uint b) public { | |
c = a + b; | |
} | |
function sub(uint a, uint b) public { |
module.exports = { | |
networks: { | |
ganache: { | |
host: "127.0.0.1", | |
port: 8545, | |
network_id: "*", | |
}, | |
tenderly: { | |
host: "127.0.0.1", | |
port: 9545, |
var Calculator = artifacts.require("./Calculator.sol"); | |
contract('Calculator', function (accounts) { | |
it("shouldn't allow division by zero", async function () { | |
let error; | |
const fail = await Calculator.new(); | |
try { | |
await fail.div(5, 0); | |
} catch (e) { | |
error = e; |
var Calculator = artifacts.require("./Calculator.sol"); | |
contract('Calculator', function (accounts) { | |
it("shouldn't allow division by zero", async function () { | |
const fail = await Calculator.new(); | |
await fail.div(5, 0); | |
}); | |
}); |
var Calculator = artifacts.require('Calculator'); | |
module.exports = function (deployer) { | |
deployer.deploy(Calculator); | |
}; |
pragma solidity ^0.4.24; | |
contract Calculator { | |
uint c; | |
function add(uint a, uint b) public { | |
c = a + b; | |
} | |
function sub(uint a, uint b) public { |
pragma solidity >=0.4.21 <0.6.0; | |
contract TennisMatch { | |
address public owner; | |
uint8 public playerAScore = 0; | |
uint8 public playerAGamesWon = 0; | |
uint8 public playerBScore = 0; | |
uint8 public playerBGamesWon = 0; |
pragma solidity >=0.4.21 <0.6.0; | |
contract TennisMatch { | |
address public owner; | |
uint8 public playerAScore = 0; | |
uint8 public playerAGamesWon = 0; | |
uint8 public playerBScore = 0; | |
uint8 public playerBGamesWon = 0; |
// We require the Hardhat Runtime Environment explicitly here. This is optional | |
// but useful for running the script in a standalone fashion through `node <script>`. | |
// When running the script with `hardhat run <script>` you'll find the Hardhat | |
// Runtime Environment's members available in the global scope. | |
const hre = require("@nomiclabs/hardhat"); | |
async function main() { | |
// Hardhat always runs the compile task when running scripts through it. | |
// If this runs in a standalone fashion you may want to call compile manually | |
// to make sure everything is compiled |