a aahed aahing aardvark aardvarks aardwolf abaci aback abacus abacuses
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 Web3 = require('web3'); | |
const web3 = new Web3('http://localhost'); | |
const abi = [{"constant": true,"inputs": [],"name": "t","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "pure","type": "function"}]; | |
const addr = "0x9f1a96f41d3dcbc0a77a75af071f0cf8c046cac4"; | |
contract = web3.eth.Contract(abi, addr); | |
contract.methods.t().call({from: web3.eth.getAccounts()[0]}).then(console.log); | |
//outputs: true |
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.1; | |
contract Test { | |
function t() public pure returns (bool){ | |
return true; | |
} | |
} |
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
#!/bin/bash | |
#assumes geth is in path | |
mkdir /tmp/geth | |
geth account new --datadir /tmp/geth << EOF | grep ^Address | cut -d'{' -f2 | cut -d'}' -f1 > /tmp/geth/accounts.txt | |
EOF |
NewerOlder