import fs from 'fs' ; import { ContractAbiDefinition } from 'web3x/contract' ; export function getFromTruffle ( buildFile ) { const { abi , bytecode : initData } = JSON . parse ( fs . readFileSync ( buildFile ) . toString ( ) ) ; return { abi , initData } ; }