import _ from 'lodash';

export interface ConfigOptions {
  web3Url: string;
  chainName: string;
  walletAddress: string;
  privateKey: string;
  marketplaceAddress: string;
  maximumBlockGas: number;
  gasIncrement: number;
  extraGasPrice: number;
}

let defaultOptions: ConfigOptions = {
  web3Url: '',
  chainName: 'kovan',
  walletAddress: '',
  privateKey: '',
  marketplaceAddress: '0x610a2D32C4d426F3712C4D0B39EdCe82434d7A23',
  maximumBlockGas: 76 * 10 ** 5,
  gasIncrement: 1.5,
  extraGasPrice: 0, // 2 * 10 ** 9,
};

export const updateDefaultOptions = (options) => {
  defaultOptions = _.merge(defaultOptions, options);
};

export default defaultOptions;
