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
| const Web3 = require('web3') | |
| let web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")) | |
| let Donation = artifacts.require("./Donation") | |
| contract('Donation', function(accounts) { | |
| var donation | |
| it("Should retrive deployed contract.", function(done) { | |
| Donation.deployed().then(function(instance) { |
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
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
| <title>Simple Contract Deployment</title> | |
| </head> | |
| <script> | |
| window.addEventListener('load', function() { | |
| // Checking if Web3 has been injected by the browser (Mist/MetaMask) |
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.4.4; | |
| contract Migrations { | |
| address public owner; | |
| uint public last_completed_migration; | |
| modifier restricted() { | |
| if (msg.sender == owner) _; | |
| } | |
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
| contract Relay { | |
| address public currentVersion; | |
| address public owner; | |
| function Relay(address initAddr){ | |
| currentVersion = initAddr; | |
| owner = msg.sender; | |
| } | |
| function update(address newAddress){ |
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
| 0x44D84089e32802ac13eE8cc74455C51d9AB549aA |
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
| 0xa4f966F298C182364D9A238aA176667c793AD7D5 |
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
| 0x1313734d2d6625173278978ddaa7b63400462745 |
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
| 0x34e8D99893CcA9a593D905fb9aB07E1E20C0157D |
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
| 0x5432a7a0d8b228166f41f305942ffbfed97bb2d8 |
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
| //const argv = require('minimist')(process.argv.slice(2)); | |
| const Web3 = require("web3") | |
| let web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")) | |
| console.log(web3) | |
| let bip39 = require("bip39") | |
| let hdkey = require('ethereumjs-wallet/hdkey') | |
| let mnemonic = "weather cancel symptom owner lumber bitter bread butter dice trial shrug glance" | |
| let hdwallet = hdkey.fromMasterSeed(bip39.mnemonicToSeed(mnemonic)) | |
| // Set to m/44'/60'/0' for ledger nano s hardware wallet compatibilty |