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.5.0; | |
import "truffle/Assert.sol"; | |
import "truffle/DeployedAddresses.sol"; | |
import "../contracts/HelloWorld.sol"; | |
contract TestHelloWorld { | |
function testItGreets() public { | |
// Get the deployed contract | |
HelloWorld helloWorld = HelloWorld(DeployedAddresses.HelloWorld()); |
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 HDWalletProvider = require('truffle-hdwallet-provider-privkey'); | |
const privateKey = "private-key-goes-here"; | |
const endpointUrl = "endpoint-goes-here"; | |
module.exports = { | |
networks: { | |
development: { | |
host: "127.0.0.1", | |
port: 7545, | |
network_id: "5777", |
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
{ | |
"dependencies": { | |
"truffle-hdwallet-provider": "1.0.4", | |
"truffle-hdwallet-provider-privkey": "1.0.3", | |
"web3": "1.0.0-beta.46" | |
} | |
} |
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 path = require("path"); | |
module.exports = { | |
contracts_build_directory: path.join(__dirname, "client/src/contracts"), | |
networks: { | |
development: { | |
host: "127.0.0.1", | |
port: 7545, | |
network_id: "5777", | |
} |
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 HelloWorld = artifacts.require("HelloWorld"); | |
const SimpleStorage = artifacts.require("SimpleStorage"); | |
module.exports = function(deployer) { | |
deployer.deploy(HelloWorld); | |
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
pragma solidity >=0.5.0; | |
contract Background { | |
uint[] private values; | |
function storeValue(uint value) public { | |
values.push(value); | |
} | |
function getValue(uint initial) public view returns(uint) { |
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.5.0; | |
import "./Background.sol"; | |
contract EntryPoint { | |
address public backgroundAddress; | |
constructor(address _background) public{ | |
backgroundAddress = _background; | |
} |
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.5.0; | |
import "truffle/Assert.sol"; | |
import "truffle/DeployedAddresses.sol"; | |
import "../../../contracts/Background.sol"; | |
contract TestBackground { | |
Background public background; |
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.5.0; | |
import "truffle/Assert.sol"; | |
import "truffle/DeployedAddresses.sol"; | |
import "../../../contracts/Background.sol"; | |
import "../../../contracts/EntryPoint.sol"; | |
contract TestEntryPoint { | |
// Ensure that dependency injection working correctly |
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.5.0; | |
import "truffle/Assert.sol"; | |
import "truffle/DeployedAddresses.sol"; | |
import "../../../contracts/Background.sol"; | |
import "../../../contracts/EntryPoint.sol"; | |
contract TestIntegrationEntryPoint { | |
BackgroundTest public backgroundTest; |