Repository: ecadlabs/taquito
Pull request #1436 (2022-03-03 21:48:18)

Removed certain domains to optimize search results as well as indexing cost
#1411 
Thank you for your contribution to Taquito.

Before submitting this PR, please make sure:

- [ ] Your code builds cleanly without any errors or warnings
- [ ] You have added unit tests
- [ ] You have added integration tests (if relevant/appropriate)
- [ ] All public methods or types have TypeDoc coverage with a complete description, and ideally an @example
- [ ] You have added or updated corresponding documentation
- [ ] If relevant, you have written a first draft summary describing the change for inclusion in Release Notes. 

## Release Note Draft Snippet

__If relevant, please write a summary of your change that will be suitable for
inclusion in the Release Notes for the next Taquito release.__



Patch:
diff --git a/packages/taquito/src/batch/rpc-batch-provider.ts b/packages/taquito/src/batch/rpc-batch-provider.ts
index 041a843af..6f04bcbf7 100644
--- a/packages/taquito/src/batch/rpc-batch-provider.ts
+++ b/packages/taquito/src/batch/rpc-batch-provider.ts
@@ -1,7 +1,7 @@
 import { Context } from '../context';
 import { ContractStorageType, DefaultContractType } from '../contract/contract';
 import { ContractMethod } from '../contract/contract-methods/contract-method-flat-param';
-import { ContractProvider } from '../contract/interface';
+import { EstimationProvider, ContractProvider } from '../contract/interface';
 import {
   createOriginationOperation,
   createRegisterGlobalConstantOperation,
@@ -25,14 +25,13 @@ import {
 } from '../operations/types';
 import { OpKind } from '@taquito/rpc';
 import { ContractMethodObject } from '../contract/contract-methods/contract-method-object-param';
-import {
-  validateAddress,
-  validateKeyHash,
-  InvalidAddressError,
-  InvalidKeyHashError,
-  ValidationResult,
-} from '@taquito/utils';
-import { EstimationProvider } from '../estimate/estimate-provider-interface';
+import { 
+  validateAddress, 
+  validateKeyHash, 
+  InvalidAddressError, 
+  InvalidKeyHashError, 
+  ValidationResult 
+} from '@taquito/utils'
 
 export const BATCH_KINDS = [
   OpKind.ACTIVATION,
@@ -61,7 +60,7 @@ export class OperationBatch extends OperationEmitter {
    */
   withTransfer(params: TransferParams) {
     if (validateAddress(params.to) !== ValidationResult.VALID) {
-      throw new InvalidAddressError(`Invalid 'to' address: ${params.to}`);
+      throw new InvalidAddressError(`Invalid 'to' address: ${params.to}`)
     }
     this.operations.push({ kind: OpKind.TRANSACTION, ...params });
     return this;
@@ -73,9 +72,7 @@ export class OperationBatch extends OperationEmitter {
    *
    * @param params Transfer operation parameter
    */
-  withContractCall(
-    params: ContractMethod<ContractProvider> | ContractMethodObject<ContractProvider>
-  ) {
+  withContractCall(params: ContractMethod<ContractProvider> | ContractMethodObject<ContractProvider>) {
     return this.withTransfer(params.toTransferParams());
   }
 
@@ -116,9 +113,7 @@ export class OperationBatch extends OperationEmitter {
    *
    * @param params Origination operation parameter
    */
-  withOrigination<TContract extends DefaultContractType = DefaultContractType>(
-    params: OriginateParams<ContractStorageType<TContract>>
-  ) {
+  withOrigination<TContract extends DefaultContractType = DefaultContractType>(params: OriginateParams<ContractStorageType<TContract>>) {
     this.operations.push({ kind: OpKind.ORIGINATION, ...params });
     return this;
   }
@@ -129,7 +124,7 @@ export class OperationBatch extends OperationEmitter {
    *
    * @param params RegisterGlobalConstant operation parameter
    */
-  withRegisterGlobalConstant(params: RegisterGlobalConstantParams) {
+   withRegisterGlobalConstant(params: RegisterGlobalConstantParams) {
     this.operations.push({ kind: OpKind.REGISTER_GLOBAL_CONSTANT, ...params });
     return this;
   }
@@ -143,9 +138,8 @@ export class OperationBatch extends OperationEmitter {
       case OpKind.ORIGINATION:
         return createOriginationOperation(
           await this.context.parser.prepareCodeOrigination({
-            ...param,
-          })
-        );
+          ...param,
+        }));
       case OpKind.DELEGATION:
         return createSetDelegateOperation({
           ...param,
@@ -220,9 +214,9 @@ export class OperationBatch extends OperationEmitter {
       i++;
     }
     if (revealNeeded) {
-      const reveal: withKind<RevealParams, OpKind.REVEAL> = { kind: OpKind.REVEAL };
+      const reveal: withKind<RevealParams, OpKind.REVEAL> = { kind: OpKind.REVEAL }
       const estimatedReveal = await this.estimate(reveal, async () => estimates[0]);
-      ops.unshift(await createRevealOperation({ ...estimatedReveal }, publicKeyHash, publicKey));
+      ops.unshift(await createRevealOperation({ ...estimatedReveal }, publicKeyHash, publicKey))
     }
 
     const source = (params && params.source) || publicKeyHash;
@@ -237,7 +231,7 @@ export class OperationBatch extends OperationEmitter {
 }
 
 export class RPCBatchProvider {
-  constructor(private context: Context, private estimator: EstimationProvider) {}
+  constructor(private context: Context, private estimator: EstimationProvider) { }
 
   /***
    *
diff --git a/packages/taquito/src/context.ts b/packages/taquito/src/context.ts
index 5ebb14514..164ca4cfd 100644
--- a/packages/taquito/src/context.ts
+++ b/packages/taquito/src/context.ts
@@ -7,7 +7,7 @@ import { Signer } from './signer/interface';
 import { NoopSigner } from './signer/noop';
 import { OperationFactory } from './wallet/operation-factory';
 import { RpcTzProvider } from './tz/rpc-tz-provider';
-import { RPCEstimateProvider } from './estimate/rpc-estimate-provider';
+import { RPCEstimateProvider } from './contract/rpc-estimate-provider';
 import { RpcContractProvider } from './contract/rpc-contract-provider';
 import { RPCBatchProvider } from './batch/rpc-batch-provider';
 
@@ -229,7 +229,7 @@ export class Context {
   }
 
   /**
-   * @description Allows extensions set on the TezosToolkit to inject logic into the context
+   * @description Allows extensions set on the TezosToolkit to inject logic into the context 
    */
   registerProviderDecorator(fx: (context: Context) => Context) {
     this.providerDecorator.push(fx);
diff --git a/packages/taquito/src/estimate/estimate.ts b/packages/taquito/src/contract/estimate.ts
similarity index 81%
rename from packages/taquito/src/estimate/estimate.ts
rename to packages/taquito/src/contract/estimate.ts
index eb9f162eb..0a23874e7 100644
--- a/packages/taquito/src/estimate/estimate.ts
+++ b/packages/taquito/src/contract/estimate.ts
@@ -5,11 +5,11 @@ const MINIMAL_FEE_PER_GAS_MUTEZ = 0.1;
 const GAS_BUFFER = 100;
 
 export interface EstimateProperties {
-  milligasLimit: number;
-  storageLimit: number;
-  opSize: number;
-  minimalFeePerStorageByteMutez: number;
-  baseFeeMutez?: number;
+  milligasLimit: number,
+  storageLimit: number,
+  opSize: number,
+  minimalFeePerStorageByteMutez: number,
+  baseFeeMutez?: number
 }
 
 /**
@@ -79,14 +79,13 @@ export class Estimate {
    * @description The limit on the amount of [gas](https://tezos.gitlab.io/user/glossary.html#gas) a given operation can consume.
    */
   get gasLimit() {
-    return this.roundUp(Number(this._milligasLimit) / 1000 + GAS_BUFFER);
+    return this.roundUp(Number(this._milligasLimit)/1000 + GAS_BUFFER);
   }
 
   private get operationFeeMutez() {
     return (
-      (Number(this._milligasLimit) / 1000 + GAS_BUFFER) * MINIMAL_FEE_PER_GAS_MUTEZ +
-      Number(this.opSize) * MINIMAL_FEE_PER_BYTE_MUTEZ
-    );
+      (Number(this._milligasLimit)/1000 + GAS_BUFFER) * MINIMAL_FEE_PER_GAS_MUTEZ + Number(this.opSize) * MINIMAL_FEE_PER_BYTE_MUTEZ
+      );
   }
 
   private roundUp(nanotez: number) {
@@ -124,8 +123,8 @@ export class Estimate {
   }
 
   /**
-   * @description Since Delphinet, consumed gas is provided in milligas for more precision.
-   * This function returns an estimation of the gas that operation will consume in milligas.
+   * @description Since Delphinet, consumed gas is provided in milligas for more precision. 
+   * This function returns an estimation of the gas that operation will consume in milligas. 
    */
   get consumedMilligas() {
     return Number(this._milligasLimit);
@@ -138,37 +137,19 @@ export class Estimate {
     let minimalFeePerStorageByteMutez = 0;
     let baseFeeMutez: number | undefined;
 
-    estimateProperties.forEach((estimate) => {
+    estimateProperties.forEach(estimate => {
       milligasLimit += estimate.milligasLimit;
       storageLimit += estimate.storageLimit;
       opSize += estimate.opSize;
-      minimalFeePerStorageByteMutez = Math.max(
-        estimate.minimalFeePerStorageByteMutez,
-        minimalFeePerStorageByteMutez
-      );
+      minimalFeePerStorageByteMutez = Math.max(estimate.minimalFeePerStorageByteMutez, minimalFeePerStorageByteMutez);
       if (estimate.baseFeeMutez) {
         baseFeeMutez = baseFeeMutez ? baseFeeMutez + estimate.baseFeeMutez : estimate.baseFeeMutez;
       }
-    });
-    return new Estimate(
-      milligasLimit,
-      storageLimit,
-      opSize,
-      minimalFeePerStorageByteMutez,
-      baseFeeMutez
-    );
+    })
+    return new Estimate(milligasLimit, storageLimit, opSize, minimalFeePerStorageByteMutez, baseFeeMutez);
   }
 
   static createArrayEstimateInstancesFromProperties(estimateProperties: EstimateProperties[]) {
-    return estimateProperties.map(
-      (x) =>
-        new Estimate(
-          x.milligasLimit,
-          x.storageLimit,
-          x.opSize,
-          x.minimalFeePerStorageByteMutez,
-          x.baseFeeMutez
-        )
-    );
+    return estimateProperties.map(x => new Estimate(x.milligasLimit, x.storageLimit, x.opSize, x.minimalFeePerStorageByteMutez, x.baseFeeMutez))
   }
 }
diff --git a/packages/taquito/src/contract/interface.ts b/packages/taquito/src/contract/interface.ts
index 2b43c92fe..269f8350e 100644
--- a/packages/taquito/src/contract/interface.ts
+++ b/packages/taquito/src/contract/interface.ts
@@ -17,9 +17,74 @@ import {
   RegisterGlobalConstantParams,
 } from '../operations/types';
 import { ContractAbstraction, ContractStorageType, DefaultContractType } from './contract';
+import { Estimate } from './estimate';
 
 export type ContractSchema = Schema | unknown;
 
+export interface EstimationProvider {
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for an origination operation
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation
+   *
+   * @param Estimate
+   */
+  originate(params: OriginateParams): Promise<Estimate>;
+
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for an transfer operation
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation
+   *
+   * @param Estimate
+   */
+  transfer({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise<Estimate>;
+
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for a delegate operation
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation
+   *
+   * @param Estimate
+   */
+  setDelegate(params: DelegateParams): Promise<Estimate>;
+
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for a delegate operation
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation
+   *
+   * @param Estimate
+   */
+  registerDelegate(params?: RegisterDelegateParams): Promise<Estimate>;
+
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for a reveal operation
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
+   *
+   * @param Estimate
+   */
+  reveal(params?: RevealParams): Promise<Estimate | undefined> ;
+
+  batch(params: ParamsWithKind[]): Promise<Estimate[]>;
+
+  /**
+   *
+   * @description Estimate gasLimit, storageLimit and fees for registering an expression (registerGlobalConstant operation) 
+   *
+   * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
+   *
+   * @param params registerGlobalConstant operation parameter
+   */
+  registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<Estimate>;
+}
+
 export interface StorageProvider {
   /**
    *
@@ -57,12 +122,7 @@ export interface StorageProvider {
    *
    * @see https://tezos.gitlab.io/api/rpc.html#get-block-id-context-big-maps-big-map-id-script-expr
    */
-  getBigMapKeyByID<T>(
-    id: string,
-    keyToEncode: BigMapKeyType,
-    schema: Schema,
-    block?: number
-  ): Promise<T>;
+  getBigMapKeyByID<T>(id: string, keyToEncode: BigMapKeyType, schema: Schema, block?: number): Promise<T>;
 
   /**
    *
@@ -76,13 +136,7 @@ export interface StorageProvider {
    * @returns An object containing the keys queried in the big map and their value in a well-formatted JSON object format
    *
    */
-  getBigMapKeysByID<T>(
-    id: string,
-    keysToEncode: Array<BigMapKeyType>,
-    schema: Schema,
-    block?: number,
-    batchSize?: number
-  ): Promise<MichelsonMap<MichelsonMapKey, T | undefined>>;
+   getBigMapKeysByID<T>(id: string, keysToEncode: Array<BigMapKeyType>, schema: Schema, block?: number, batchSize?: number): Promise<MichelsonMap<MichelsonMapKey, T | undefined>>;
 
   /**
    *
@@ -92,7 +146,7 @@ export interface StorageProvider {
    * @param block optional block level to fetch the value from
    *
    */
-  getSaplingDiffByID(id: string, block?: number): Promise<SaplingDiffResponse>;
+   getSaplingDiffByID(id: string, block?: number): Promise<SaplingDiffResponse>;
 }
 
 export interface ContractProvider extends StorageProvider {
@@ -104,9 +158,7 @@ export interface ContractProvider extends StorageProvider {
    *
    * @param OriginationOperation Originate operation parameter
    */
-  originate<TContract extends DefaultContractType = DefaultContractType>(
-    contract: OriginateParams<ContractStorageType<TContract>>
-  ): Promise<OriginationOperation<TContract>>;
+  originate<TContract extends DefaultContractType = DefaultContractType>(contract: OriginateParams<ContractStorageType<TContract>>): Promise<OriginationOperation<TContract>>;
 
   /**
    *
@@ -148,13 +200,7 @@ export interface ContractProvider extends StorageProvider {
    */
   reveal(params: RevealParams): Promise<RevealOperation>;
 
-  at<T extends ContractAbstraction<ContractProvider>>(
-    address: string,
-    contractAbstractionComposer?: (
-      abs: ContractAbstraction<ContractProvider>,
-      context: Context
-    ) => T
-  ): Promise<T>;
+  at<T extends ContractAbstraction<ContractProvider>>(address: string, contractAbstractionComposer?: (abs: ContractAbstraction<ContractProvider>, context: Context) => T): Promise<T>;
 
   /**
    *
@@ -162,7 +208,7 @@ export interface ContractProvider extends StorageProvider {
    *
    * @param params List of operation to batch together
    */
-  batch(params?: ParamsWithKind[]): OperationBatch;
+  batch(params?: ParamsWithKind[]): OperationBatch ;
 
   /**
    *
@@ -172,7 +218,5 @@ export interface ContractProvider extends StorageProvider {
    *
    * @param params registerGlobalConstant operation parameter
    */
-  registerGlobalConstant(
-    params: RegisterGlobalConstantParams
-  ): Promise<RegisterGlobalConstantOperation>;
+  registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<RegisterGlobalConstantOperation>;
 }
diff --git a/packages/taquito/src/estimate/naive-estimate-provider.ts b/packages/taquito/src/contract/naive-estimate-provider.ts
similarity index 88%
rename from packages/taquito/src/estimate/naive-estimate-provider.ts
rename to packages/taquito/src/contract/naive-estimate-provider.ts
index 9db721089..3e4cc507c 100644
--- a/packages/taquito/src/estimate/naive-estimate-provider.ts
+++ b/packages/taquito/src/contract/naive-estimate-provider.ts
@@ -1,22 +1,19 @@
 import { DEFAULT_FEE, DEFAULT_GAS_LIMIT, DEFAULT_STORAGE_LIMIT, Protocols } from '../constants';
-import {
-  OriginateParams,
-  TransferParams,
-  ParamsWithKind,
-  RegisterGlobalConstantParams,
-} from '../operations/types';
+import { OriginateParams, TransferParams, ParamsWithKind, RegisterGlobalConstantParams } from '../operations/types';
 import { Estimate } from './estimate';
-import { EstimationProvider } from '../estimate/estimate-provider-interface';
+import { EstimationProvider } from './interface';
 
 /**
  * @description Naïve implementation of an estimate provider. Will work for basic transaction but your operation risk to fail if they are more complex (smart contract interaction)
- *
+ * 
  * @deprecated Deprecated in favor of RPCEstimateProvider
  */
 export class NaiveEstimateProvider implements EstimationProvider {
   private _costPerByte: number;
-  constructor(private readonly protocol: Protocols) {
-    this._costPerByte = 250;
+  constructor(
+    private readonly protocol: Protocols,
+  ) {
+      this._costPerByte = 250;
   }
   registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<Estimate> {
     throw new Error(`Unsupported operation kind: ${(params as any).kind}`);
@@ -92,13 +89,7 @@ export class NaiveEstimateProvider implements EstimationProvider {
    * @param Estimate
    */
   async reveal() {
-    return new Estimate(
-      DEFAULT_GAS_LIMIT.REVEAL * 1000,
-      DEFAULT_STORAGE_LIMIT.REVEAL,
-      64,
-      this._costPerByte,
-      DEFAULT_FEE.REVEAL
-    );
+    return new Estimate(DEFAULT_GAS_LIMIT.REVEAL * 1000, DEFAULT_STORAGE_LIMIT.REVEAL, 64, this._costPerByte, DEFAULT_FEE.REVEAL);
   }
 
   async batch(params: ParamsWithKind[]) {
diff --git a/packages/taquito/src/contract/rpc-contract-provider.ts b/packages/taquito/src/contract/rpc-contract-provider.ts
index 52805642e..cdd5cc6b0 100644
--- a/packages/taquito/src/contract/rpc-contract-provider.ts
+++ b/packages/taquito/src/contract/rpc-contract-provider.ts
@@ -1,6 +1,6 @@
 import { HttpResponseError, STATUS_CODE } from '@taquito/http-utils';
 import { BigMapKeyType, MichelsonMap, MichelsonMapKey, Schema } from '@taquito/michelson-encoder';
-import { OpKind, ScriptResponse } from '@taquito/rpc';
+import { MichelsonV1Expression, OpKind, ScriptResponse } from '@taquito/rpc';
 import { encodeExpr } from '@taquito/utils';
 import { OperationBatch } from '../batch/rpc-batch-provider';
 import { Context } from '../context';
@@ -24,7 +24,7 @@ import {
 } from '../operations/types';
 import { DefaultContractType, ContractStorageType, ContractAbstraction } from './contract';
 import { InvalidDelegationSource } from './errors';
-import { ContractProvider, ContractSchema, StorageProvider } from './interface';
+import { ContractProvider, ContractSchema, EstimationProvider, StorageProvider } from './interface';
 import {
   createOriginationOperation,
   createRegisterDelegateOperation,
@@ -41,7 +41,6 @@ import {
   InvalidAddressError,
   ValidationResult,
 } from '@taquito/utils';
-import { EstimationProvider } from '../estimate/estimate-provider-interface';
 export class RpcContractProvider
   extends OperationEmitter
   implements ContractProvider, StorageProvider
diff --git a/packages/taquito/src/estimate/rpc-estimate-provider.ts b/packages/taquito/src/contract/rpc-estimate-provider.ts
similarity index 99%
rename from packages/taquito/src/estimate/rpc-estimate-provider.ts
rename to packages/taquito/src/contract/rpc-estimate-provider.ts
index 5a11c90d9..3a3b230c6 100644
--- a/packages/taquito/src/estimate/rpc-estimate-provider.ts
+++ b/packages/taquito/src/contract/rpc-estimate-provider.ts
@@ -20,7 +20,7 @@ import {
   RegisterGlobalConstantParams,
 } from '../operations/types';
 import { Estimate, EstimateProperties } from './estimate';
-import { EstimationProvider } from '../estimate/estimate-provider-interface';
+import { EstimationProvider } from './interface';
 import {
   createOriginationOperation,
   createRegisterDelegateOperation,
@@ -28,7 +28,7 @@ import {
   createSetDelegateOperation,
   createTransferOperation,
   createRegisterGlobalConstantOperation,
-} from '../contract/prepare';
+} from './prepare';
 import { validateAddress, InvalidAddressError, ValidationResult } from '@taquito/utils';
 
 interface Limits {
diff --git a/packages/taquito/src/estimate/estimate-provider-interface.ts b/packages/taquito/src/estimate/estimate-provider-interface.ts
deleted file mode 100644
index f0c2491f2..000000000
--- a/packages/taquito/src/estimate/estimate-provider-interface.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import {
-  OriginateParams,
-  TransferParams,
-  DelegateParams,
-  RegisterDelegateParams,
-  ParamsWithKind,
-} from '../operations';
-import { RevealParams, RegisterGlobalConstantParams } from '../operations/types';
-import { Estimate } from './estimate';
-
-export interface EstimationProvider {
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for an origination operation
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation
-   *
-   * @param Estimate
-   */
-  originate(params: OriginateParams): Promise<Estimate>;
-
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for an transfer operation
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation
-   *
-   * @param Estimate
-   */
-  transfer({ fee, storageLimit, gasLimit, ...rest }: TransferParams): Promise<Estimate>;
-
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for a delegate operation
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation
-   *
-   * @param Estimate
-   */
-  setDelegate(params: DelegateParams): Promise<Estimate>;
-
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for a delegate operation
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation
-   *
-   * @param Estimate
-   */
-  registerDelegate(params?: RegisterDelegateParams): Promise<Estimate>;
-
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for a reveal operation
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
-   *
-   * @param Estimate
-   */
-  reveal(params?: RevealParams): Promise<Estimate | undefined>;
-
-  batch(params: ParamsWithKind[]): Promise<Estimate[]>;
-
-  /**
-   *
-   * @description Estimate gasLimit, storageLimit and fees for registering an expression (registerGlobalConstant operation)
-   *
-   * @returns An estimation of gasLimit, storageLimit and fees for the operation or undefined if the account is already revealed
-   *
-   * @param params registerGlobalConstant operation parameter
-   */
-  registerGlobalConstant(params: RegisterGlobalConstantParams): Promise<Estimate>;
-}
diff --git a/packages/taquito/src/estimate/index.ts b/packages/taquito/src/estimate/index.ts
deleted file mode 100644
index 03cebd867..000000000
--- a/packages/taquito/src/estimate/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './estimate';
-export * from './estimate-provider-interface';
-export * from './naive-estimate-provider';
-export * from './rpc-estimate-provider';
diff --git a/packages/taquito/src/operations/operation-emitter.ts b/packages/taquito/src/operations/operation-emitter.ts
index 140c1015b..1cc73e73e 100644
--- a/packages/taquito/src/operations/operation-emitter.ts
+++ b/packages/taquito/src/operations/operation-emitter.ts
@@ -7,7 +7,7 @@ import {
 } from '@taquito/rpc';
 import { Protocols } from '../constants';
 import { Context } from '../context';
-import { Estimate } from '../estimate/estimate';
+import { Estimate } from '../contract/estimate';
 import { flattenErrors, TezosOperationError, TezosPreapplyFailureError } from './operation-errors';
 import {
   ForgedBytes,
diff --git a/packages/taquito/src/taquito.ts b/packages/taquito/src/taquito.ts
index 8a2bee707..99fb48713 100644
--- a/packages/taquito/src/taquito.ts
+++ b/packages/taquito/src/taquito.ts
@@ -8,7 +8,7 @@ import { Forger } from '@taquito/local-forging';
 import { RPCBatchProvider } from './batch/rpc-batch-provider';
 import { Protocols } from './constants';
 import { ConfigConfirmation, Context, TaquitoProvider } from './context';
-import { ContractProvider } from './contract/interface';
+import { ContractProvider, EstimationProvider } from './contract/interface';
 import { Extension } from './extension/extension';
 import { format } from './format';
 import { GlobalConstantsProvider } from './global-constants/interface-global-constants-provider';
@@ -26,7 +26,6 @@ import { VERSION } from './version';
 import { LegacyWalletProvider, Wallet, WalletProvider } from './wallet';
 import { OperationFactory } from './wallet/operation-factory';
 import { TaquitoLocalForger } from './forger/taquito-local-forger';
-import { EstimationProvider } from './estimate/estimate-provider-interface';
 
 export { MichelsonMap, UnitValue } from '@taquito/michelson-encoder';
 export { Forger, ForgeParams, ForgeResponse } from '@taquito/local-forging';
@@ -58,7 +57,6 @@ export * from './global-constants/error';
 export * from './global-constants/interface-global-constants-provider';
 export * from './read-provider/interface';
 export * from './read-provider/rpc-read-adapter';
-export * from './estimate';
 
 export interface SetProviderOptions {
   forger?: Forger;
diff --git a/website/config.json b/website/config.json
index 6c5cc634a..e89876121 100644
--- a/website/config.json
+++ b/website/config.json
@@ -1,13 +1,16 @@
 {
   "index_name": "taquito",
   "start_urls": [
-    "https://tezostaquito.io"
+    "https://tezostaquito.io/docs"
   ],
   "sitemap_urls": [
     "https://tezostaquito.io/sitemap.xml"
   ],
   "sitemap_alternate_links": true,
-  "stop_urls": [],
+  "stop_urls": [
+    "https://tezostaquito.io/docs/next",
+    "https://tezostaquito.io/docs/([0-9][0-9].([0-9]{1}[0-9]?).([0-9]{1}[0-9]?))"
+  ],
   "selectors": {
     "lvl0": {
       "selector": "(//ul[contains(@class,'menu__list')]//a[contains(@class, 'menu__link menu__link--sublist menu__link--active')]/text() | //nav[contains(@class, 'navbar')]//a[contains(@class, 'navbar__link--active')]/text())[last()]",


Test patch:
diff --git a/packages/taquito/test/batch/rpc-batch-provider.spec.ts b/packages/taquito/test/batch/rpc-batch-provider.spec.ts
index 71f03fcb7..ea9563ec3 100644
--- a/packages/taquito/test/batch/rpc-batch-provider.spec.ts
+++ b/packages/taquito/test/batch/rpc-batch-provider.spec.ts
@@ -1,6 +1,6 @@
 import { OperationBatch } from '../../src/batch/rpc-batch-provider';
 import { Context } from '../../src/context';
-import { Estimate } from '../../src/estimate/estimate';
+import { Estimate } from '../../src/contract/estimate';
 import { OpKind, ParamsWithKind } from '../../src/operations/types';
 
 /**
diff --git a/packages/taquito/test/estimate/estimate.spec.ts b/packages/taquito/test/contract/estimate.spec.ts
similarity index 97%
rename from packages/taquito/test/estimate/estimate.spec.ts
rename to packages/taquito/test/contract/estimate.spec.ts
index 66293e3de..96cc323cf 100644
--- a/packages/taquito/test/estimate/estimate.spec.ts
+++ b/packages/taquito/test/contract/estimate.spec.ts
@@ -1,4 +1,4 @@
-import { Estimate } from '../../src/estimate/estimate';
+import { Estimate } from '../../src/contract/estimate';
 
 describe('Estimate', () => {
   it('Calculate fees in mutez properly for Carthagenet', () => {
diff --git a/packages/taquito/test/contract/rpc-contract-provider.spec.ts b/packages/taquito/test/contract/rpc-contract-provider.spec.ts
index a4b3d1781..123077cb8 100644
--- a/packages/taquito/test/contract/rpc-contract-provider.spec.ts
+++ b/packages/taquito/test/contract/rpc-contract-provider.spec.ts
@@ -16,7 +16,7 @@ import {
 import BigNumber from 'bignumber.js';
 import { Context } from '../../src/context';
 import { ContractMethod } from '../../src/contract/contract-methods/contract-method-flat-param';
-import { Estimate } from '../../src/estimate/estimate';
+import { Estimate } from '../../src/contract/estimate';
 import {
   Protocols,
   DEFAULT_STORAGE_LIMIT,
diff --git a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts b/packages/taquito/test/contract/rpc-estimate-provider.spec.ts
similarity index 99%
rename from packages/taquito/test/estimate/rpc-estimate-provider.spec.ts
rename to packages/taquito/test/contract/rpc-estimate-provider.spec.ts
index 649ccba15..19215ca53 100644
--- a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts
+++ b/packages/taquito/test/contract/rpc-estimate-provider.spec.ts
@@ -1,6 +1,6 @@
 import { Context } from '../../src/context';
-import { RPCEstimateProvider } from '../../src/estimate/rpc-estimate-provider';
-import { miStr, ligoSample } from '../contract/data';
+import { RPCEstimateProvider } from '../../src/contract/rpc-estimate-provider';
+import { miStr, ligoSample } from './data';
 import BigNumber from 'bignumber.js';
 import {
   preapplyResultFrom,
@@ -15,7 +15,7 @@ import {
   registerGlobalConstantNoReveal,
   registerGlobalConstantWithReveal,
   registerGlobalConstantWithError,
-} from '../contract/helper';
+} from './helper';
 import { OpKind } from '@taquito/rpc';
 
 /**
diff --git a/packages/taquito/test/taquito.spec.ts b/packages/taquito/test/taquito.spec.ts
index 49eb7cf3b..db7fe353f 100644
--- a/packages/taquito/test/taquito.spec.ts
+++ b/packages/taquito/test/taquito.spec.ts
@@ -4,7 +4,7 @@ import { RpcContractProvider } from '../src/contract/rpc-contract-provider';
 import { PollingSubscribeProvider } from '../src/subscribe/polling-subcribe-provider';
 import { NoopSigner } from '../src/signer/noop';
 import { RpcClient } from '@taquito/rpc';
-import { RPCEstimateProvider } from '../src/estimate/rpc-estimate-provider';
+import { RPCEstimateProvider } from '../src/contract/rpc-estimate-provider';
 import { OperationFactory } from '../src/wallet/operation-factory';
 import { NoopGlobalConstantsProvider } from '../src/global-constants/noop-global-constants-provider';
 import { TaquitoLocalForger } from '../src/forger/taquito-local-forger';