Skip to content

Commit

Permalink
corrected import statement for require
Browse files Browse the repository at this point in the history
  • Loading branch information
web3js-org committed Nov 30, 2023
1 parent d4a0527 commit 92fd7d0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ Next, create a new file called `compile.js` in your project directory and add th
// This code will compile smart contract and generate its ABI and bytecode
// Alternatively, you can use something like `npm i solc && npx solcjs MyContract.sol --bin --abi`

import solc from 'solc';
import path from 'path';
import fs from 'fs';
const solc = require( 'solc');
const path = require('path');
const fs = require('fs');

const fileName = 'MyContract.sol';
const contractName = 'MyContract';
Expand Down

0 comments on commit 92fd7d0

Please sign in to comment.