From 53b401dcd059234197e0119e7eca2fecc8d19109 Mon Sep 17 00:00:00 2001 From: Jamie Hewitt Date: Fri, 7 May 2021 13:56:35 +0300 Subject: [PATCH] Revert "creating interface for the dispenser contract" This reverts commit 413b17e668a4d92e2ab9d43092b604bc2b2f2914. --- src/dispenser/Dispenser.ts | 45 -------------------------------------- 1 file changed, 45 deletions(-) delete mode 100644 src/dispenser/Dispenser.ts diff --git a/src/dispenser/Dispenser.ts b/src/dispenser/Dispenser.ts deleted file mode 100644 index 31c204958..000000000 --- a/src/dispenser/Dispenser.ts +++ /dev/null @@ -1,45 +0,0 @@ -import Web3 from 'web3' -import { AbiItem } from 'web3-utils/types' - -import defaultDispenserABI from '@oceanprotocol/contracts/artifacts/Dispenser.json' -import defaultDatatokensABI from '@oceanprotocol/contracts/artifacts/DataTokenTemplate.json' -import { Logger, getFairGasPrice } from '../utils' -import wordListDefault from '../data/words.json' -import { TransactionReceipt } from 'web3-core' -import BigNumber from 'bignumber.js' -import Decimal from 'decimal.js' - -/** - * Provides an interface to Dispenser - */ -export class Dispenser { - public GASLIMIT_DEFAULT = 1000000 - public dispenserAddress: string - public dispenserABI: AbiItem | AbiItem[] - public datatokensABI: AbiItem | AbiItem[] - public web3: Web3 - private logger: Logger - public startBlock: number - /** - * Instantiate DataTokens (independently of Ocean). - * @param {String} factoryAddress - * @param {AbiItem | AbiItem[]} factoryABI - * @param {AbiItem | AbiItem[]} datatokensABI - * @param {Web3} web3 - */ - constructor( - dispenserAddress: string, - dispenserABI: AbiItem | AbiItem[], - datatokensABI: AbiItem | AbiItem[], - web3: Web3, - logger: Logger, - startBlock?: number - ) { - this.dispenserAddress = dispenserAddress - this.dispenserABI = dispenserABI || (defaultDispenserABI.abi as AbiItem[]) - this.datatokensABI = datatokensABI || (defaultDatatokensABI.abi as AbiItem[]) - this.web3 = web3 - this.logger = logger - this.startBlock = startBlock || 0 - } -}