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 Base { | |
uint x; | |
constructor() public { | |
x = 10; | |
} | |
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
// ===== DO NOT MODIFY THIS FILE ===== | |
var assert = require('assert') | |
const Web3 = require('web3') | |
const App = require('../scripts/app.helper.js') | |
let accounts = [] | |
/* |
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 Base { | |
uint public num; | |
address public sender; | |
function setNum(uint _num) public { | |
num = _num; | |
sender = msg.sender; | |
} |
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
[ | |
{ | |
"constant": false, | |
"inputs": [ | |
{ | |
"internalType": "uint256", | |
"name": "x", | |
"type": "uint256" | |
} | |
], |
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.5.0; | |
contract Child { | |
address creator; | |
event newChild(address _a); | |
constructor() | |
public | |
{ |
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
// ===== DO NOT MODIFY THIS FILE ===== | |
const BN = web3.utils.BN | |
const SupplyChain = artifacts.require('SupplyChain') | |
contract('SupplyChain', accounts => { | |
const owner = accounts[0] | |
const alice = accounts[1] | |
const bob = accounts[2] | |
const price = '1000' |
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
// This is an automated testing file for this repo: https://github.com/ConsenSys-Academy/event-ticket-exercise | |
var EventTicketsV2 = artifacts.require('EventTicketsV2') | |
let catchRevert = require("./exceptionsHelpers.js").catchRevert | |
const BN = web3.utils.BN | |
contract('EventTicketV2', function(accounts) { | |
const deployAccount = accounts[0] | |
const firstAccount = accounts[3] |
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
/* | |
This is one of the test files for the event tickets exercise here: https://github.com/ConsenSys-Academy/event-ticket-exercise | |
*/ | |
var EventTickets = artifacts.require('EventTickets') | |
let catchRevert = require("./exceptionsHelpers.js").catchRevert | |
const BN = web3.utils.BN | |
contract('EventTicket', function(accounts) { | |
const firstAccount = accounts[0] |
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
/* | |
This is the test file for the Supply Chain Exercise: https://github.com/ConsenSys-Academy/supply-chain-exercise | |
This test file has been updated for Truffle version 5.0. If your tests are failing, make sure that you are | |
using Truffle version 5.0. You can check this by running "truffle version" in the terminal. If version 5 is not | |
installed, you can uninstall the existing version with `npm uninstall -g truffle` and install the latest version (5.0) | |
with `npm install -g truffle`. | |
*/ | |
let BN = web3.utils.BN | |
let SupplyChain = artifacts.require('SupplyChain') |
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
/* | |
This test file has been updated for Truffle version 5.0. If your tests are failing, make sure that you are | |
using Truffle version 5.0. You can check this by running "trufffle version" in the terminal. If version 5 is not | |
installed, you can uninstall the existing version with `npm uninstall -g truffle` and install the latest version (5.0) | |
with `npm install -g truffle`. | |
*/ | |
var SimpleBank = artifacts.require("./SimpleBank.sol"); | |
const { expectRevert } = require('@openzeppelin/test-helpers'); | |
contract("SimpleBank", function (accounts) { |
NewerOlder