import fs from 'fs' ; import { ContractAbiDefinition } from 'web3x/contract/abi' ; export function getFromFiles ( abiFile , initDataFile ? ) { const abi = JSON . parse ( fs . readFileSync ( abiFile ) . toString ( ) ) ; if ( initDataFile ) { const initData = fs . readFileSync ( initDataFile ) . toString ( ) ; return { abi , initData } ; } return { abi } ; }