ts-abigen
Generate nodejs modules from ethereum smart contracts
Last updated 6 months ago by adisbladis .
Apache-2.0 · Original npm · Tarball · package.json
$ cnpm install ts-abigen 
SYNC missed versions from official npm registry.
  • ts-abigen - Convert solc contract output to typescript interfaces

** Usage First compile your contract #+begin_src shell solc --combined-json=abi,bin --optimize contract.sol > combined.json #+end_src

Then convert contracts to typescript #+begin_src shell ./bin/ts-abigen.js --out ./local_modules/test-contract --name test-contract --combined combined.json #+end_src

Using your contract(s) #+begin_src typescript // Change this to match your contract import { contracts } from './local_modules/test-contract'

const contract = new ExampleContract( 'http://localhost:8545', '0x48624beaad14ea386e2185839aa10c1faf6b973a', {}) //

Promise.resolve() .then(async () => { const z = '0x0000000000000000000000000000000000000000000000000000000000000000' const result = await contract.sanityCheck.call(z, z) console.log(result) }) .then(_ => { process.exit(0) }) .catch(err => { console.error(err) process.exit(1) }) #+end_src

Current Tags

  • 1.0.14                                ...           latest (6 months ago)

15 Versions

  • 1.0.14                                ...           6 months ago
  • 1.0.13                                ...           6 months ago
  • 1.0.12                                ...           7 months ago
  • 1.0.11                                ...           7 months ago
  • 1.0.10                                ...           7 months ago
  • 1.0.9                                ...           7 months ago
  • 1.0.8                                ...           7 months ago
  • 1.0.7                                ...           7 months ago
  • 1.0.6                                ...           7 months ago
  • 1.0.5                                ...           7 months ago
  • 1.0.4                                ...           7 months ago
  • 1.0.3                                ...           7 months ago
  • 1.0.2                                ...           7 months ago
  • 1.0.1                                ...           7 months ago
  • 1.0.0                                ...           7 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 17
Last Day 0
Last Week 16
Last Month 16
Dependencies (19)
Dev Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |