import Web3 from 'web3' ; export const getTransaction = function ( transactionHash , url ) { if ( ! transactionHash ) { throw new Error ( '[getTransactionObject] txHash required' ) ; } if ( ! url ) { throw new Error ( '[getTransactionObject] URL required' ) ; } const web3 = new Web3 ( url ) ; return web3 . eth . getTransaction ( transactionHash ) ; } ; export const getReceipt = function ( transactionHash , url ) { if ( ! transactionHash ) { throw new Error ( '[getTransactionObject] txHash required' ) ; } if ( ! url ) { throw new Error ( '[getTransactionObject] URL required' ) ; } const web3 = new Web3 ( url ) ; return web3 . eth . getTransactionReceipt ( transactionHash ) ; } ;