Giter Club home page Giter Club logo

Comments (6)

caffeinum avatar caffeinum commented on June 27, 2024 1

This is fixed in v1.6.0 release:

└─┬ [email protected]
  └── @solidity-parser/[email protected]

just update your dep to the last version:

npm i truffle-flattener

from truffle-flattener.

lancekrogers avatar lancekrogers commented on June 27, 2024

I'm running into the same problem

from truffle-flattener.

dengdeng95 avatar dengdeng95 commented on June 27, 2024

I'm running into the same problem
npx github:fedeb95/truffle-flattener
use this to solve the problem.

from truffle-flattener.

naftalimurgor avatar naftalimurgor commented on June 27, 2024

Hello @dengdeng95 I'm experiencing a similar issue with [email protected] Hardhat has a flattened too. I'll try using the hardhat at the moment.

from truffle-flattener.

naftalimurgor avatar naftalimurgor commented on June 27, 2024

@dengdeng95 @lancekrogers I managed to resolve this issue like this:

  1. npx hardhat to create a new hardhat project, gives a menu to create a project from the command line, very much similar to a truffle project
  2. add @OpenZeppelin contracts using npm like this:
npm install @openzeppelin/[email protected]
  1. copy your old contracts to contracts/ folder
  2. run npx hardhat flatten contracts/NRT.sol > flattened.sol
    The flattened contract shall be output file named flattened.sol in the project root
    The contract names I picked are just arbitrary names I picked, you can use your filenames for the contracts and the output file after the > symbol.
    That's how I resolved this issue

from truffle-flattener.

dengdeng95 avatar dengdeng95 commented on June 27, 2024

@dengdeng95 @lancekrogers I managed to resolve this issue like this:

  1. npx hardhat to create a new hardhat project, gives a menu to create a project from the command line, very much similar to a truffle project
  2. add @OpenZeppelin contracts using npm like this:
npm install @openzeppelin/[email protected]
  1. copy your old contracts to contracts/ folder
  2. run npx hardhat flatten contracts/NRT.sol > flattened.sol
    The flattened contract shall be output file named flattened.sol in the project root
    The contract names I picked are just arbitrary names I picked, you can use your filenames for the contracts and the output file after the > symbol.
    That's how I resolved this issue

npx github:fedeb95/truffle-flattener
This command is ok!

from truffle-flattener.

Related Issues (20)

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.