Skip to content

Instantly share code, notes, and snippets.

@linux08
Last active November 8, 2019 21:51
Show Gist options
  • Save linux08/208f6fe6ab898bf0fa5db5490502a099 to your computer and use it in GitHub Desktop.
Save linux08/208f6fe6ab898bf0fa5db5490502a099 to your computer and use it in GitHub Desktop.
const code =fs.readFileSync('./contracts/StoreHash.sol').toString();
const solc = require('solc');
const compiledCode = solc.compile(code);
const abi =JSON.parse(compiledCode.contracts[':SaveAddress'].interface);
const SavingContract = new web3.eth.Contract(abi, '0xb1caf625d9d29421dfd8dae4a7a9083b4175f80a');
// where 0xb1caf625d9d29421dfd8dae4a7a9083b4175f80a is the ethereum address
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment