Coder Social home page Coder Social logo

truffle-plugin-abigen's Introduction

truffle-plugin-abigen

This truffle plugin generates the required files needed to use Geths abigen to generate contract bindings in golang.

Installation

  1. Install the plugin with npm
    npm install @chainsafe/truffle-plugin-abigen
  2. Add the plugin to your truffle.js or truffle-config.js file
    module.exports = {
      /* ... rest of truffle-config */
    
      plugins: [
        "@chainsafe/truffle-plugin-abigen"
      ]
    }

Usage

Before running ensure that you've compiled your contracts:

truffle compile

To generate specific contract bindings:

truffle run abigen SomeContractName AnotherContractName

Alternatively, to generate bindings for all your contracts:

truffle run abigen

Debugging

You can pass an optional --debug flag into the plugin to display debug messages during the verification process. This is generally not necessary, but can be used to provide additional information when the plugin appears to malfunction.

truffle-plugin-abigen's People

Contributors

gregthegreek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

truffle-plugin-abigen's Issues

For the imports as well please

is it possible to also have this build against whatever imports are used in the contracts as well?

import '@foo/bar/Something.sol';

and also have the abigen respective files be built against Something.sol

thank you so much for this package,

When `abigenBindings` directory doesn't exist `truffle run abigen` fails

Hi,
Thanks for the great package!

I found when abigenBindings directory doesn't exist truffle run abigen fails.

const createDirectories = () => {
try {
fs.rmdirSync(BUILD_PATH, { recursive: true });
fs.mkdirSync(BUILD_PATH);
fs.mkdirSync(ABI_PATH);
fs.mkdirSync(BIN_PATH);
} catch (e) {
logger.error(e)
}
}

That's because in createDirectories fs.rmdirSync throw an error so fs.mkdirSyncs are not evaled.

Please document to create abigenBindings directory or fix the function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.