Run the following:
ganache-cli # In its own terminal
# mkdir && cd into a new directory
truffle unbox
npm install [email protected]
Paste into contracts/BsktToken.sol
:
const {ethers} = require('ethers') | |
let node = ethers.utils.HDNode.fromExtendedKey('<xpub...>') | |
// looks like it already uses "m/44'/60'/0'" | |
// "account/chain/address" | |
console.log('node', node) | |
let found = false; | |
for (let account = 0; account < 10; account++) { |
const explorer = require('sol-explore'); | |
const SolidityParser = require('solparse'); | |
const _ = require('underscore'); | |
const soltar = require('soltar'); | |
const Web3 = require('web3'); | |
const web3 = new Web3(); |
Run the following:
ganache-cli # In its own terminal
# mkdir && cd into a new directory
truffle unbox
npm install [email protected]
Paste into contracts/BsktToken.sol
:
pragma solidity 0.5.0; | |
// File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol | |
/** | |
* @title ERC20 interface | |
* @dev see https://github.com/ethereum/EIPs/issues/20 | |
*/ | |
interface IERC20 { | |
function transfer(address to, uint256 value) external returns (bool); |
pragma solidity ^0.4.18; | |
/** | |
* @title Ownable | |
* @dev The Ownable contract has an owner address, and provides basic authorization control | |
* functions, this simplifies the implementation of "user permissions". | |
*/ | |
contract Ownable { | |
address public owner; |
I hereby claim:
To claim this, I am signing this object:
var node = { | |
value: 0, | |
left: null, | |
right: null | |
} | |
var create_node = function(val, l, r) { | |
return {value: val, left: l, right: r} | |
} |