Date: Fri, 3 Aug 2018 11:14:16 +0200
Subject: Fix-up Order-utils doc page
---
packages/website/ts/containers/order_utils_documentation.ts | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts
index 9af863d8a..2b9465d92 100644
--- a/packages/website/ts/containers/order_utils_documentation.ts
+++ b/packages/website/ts/containers/order_utils_documentation.ts
@@ -17,8 +17,6 @@ const InstallationMarkdownV1 = require('md/docs/order_utils/1.0.0/installation')
const markdownSections = {
introduction: 'introduction',
installation: 'installation',
- usage: 'usage',
- types: 'types',
};
const docsInfoConfig: DocsInfoConfig = {
@@ -29,8 +27,6 @@ const docsInfoConfig: DocsInfoConfig = {
markdownMenu: {
introduction: [markdownSections.introduction],
install: [markdownSections.installation],
- usage: [markdownSections.usage],
- types: [markdownSections.types],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
@@ -38,7 +34,7 @@ const docsInfoConfig: DocsInfoConfig = {
[markdownSections.installation]: InstallationMarkdownV1,
},
},
- markdownSections: markdownSections,
+ markdownSections,
typeConfigs: {
typeNameToExternalLink: {
BigNumber: constants.URL_BIGNUMBERJS_GITHUB,
--
cgit
From 4a2a22a43b5d904834cddae5768d9adf3efedf30 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 11:44:50 +0200
Subject: Refactor logic for clarity
---
packages/react-docs/src/utils/typedoc_utils.ts | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
index f1f42c36d..ad794c0fa 100644
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ b/packages/react-docs/src/utils/typedoc_utils.ts
@@ -437,18 +437,23 @@ export const typeDocUtils = {
return typeDocUtils._convertType(t, sections, sectionName, docId);
});
- const isConstructor = false;
+ let indexSignatureIfExists;
+ let methodIfExists;
const doesIndexSignatureExist =
!_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature);
- let indexSignatureIfExists;
if (doesIndexSignatureExist) {
const indexSignature = entity.declaration.indexSignature as TypeDocNode;
indexSignatureIfExists = typeDocUtils._convertIndexSignature(indexSignature, sections, sectionName, docId);
+ } else if (!_.isUndefined(entity.declaration)) {
+ const isConstructor = false;
+ methodIfExists = typeDocUtils._convertMethod(
+ entity.declaration,
+ isConstructor,
+ sections,
+ sectionName,
+ docId,
+ );
}
- const methodIfExists =
- !_.isUndefined(entity.declaration) && !doesIndexSignatureExist
- ? typeDocUtils._convertMethod(entity.declaration, isConstructor, sections, sectionName, docId)
- : undefined;
const elementTypeIfExists = !_.isUndefined(entity.elementType)
? {
--
cgit
From e4aed98a3dbbe95c7cac877bcbe06f51f3de81ba Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 12:40:01 +0200
Subject: Add missing type exports
---
packages/sol-compiler/src/index.ts | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/packages/sol-compiler/src/index.ts b/packages/sol-compiler/src/index.ts
index de2de796e..89d529887 100644
--- a/packages/sol-compiler/src/index.ts
+++ b/packages/sol-compiler/src/index.ts
@@ -1,2 +1,9 @@
export { Compiler } from './compiler';
-export { CompilerOptions, ContractArtifact, ContractNetworks } from './utils/types';
+
+export {
+ CompilerOptions,
+ ContractArtifact,
+ ContractNetworks,
+ GeneratedCompilerOptions,
+ ContractNetworkData,
+} from './utils/types';
--
cgit
From d4bd4ec441317c916e515ba0c6f48d63ea8665f9 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 12:40:35 +0200
Subject: Add comments for types and unnest type declarations
---
packages/sol-compiler/src/utils/types.ts | 44 ++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/packages/sol-compiler/src/utils/types.ts b/packages/sol-compiler/src/utils/types.ts
index 4321a2235..e2e7a4e53 100644
--- a/packages/sol-compiler/src/utils/types.ts
+++ b/packages/sol-compiler/src/utils/types.ts
@@ -7,22 +7,39 @@ export enum AbiType {
Fallback = 'fallback',
}
+/**
+ * This type defines the schema of the artifact.json file generated by Sol-compiler
+ * schemaVersion: The version of the artifact schema
+ * contractName: The contract name it represents
+ * networks: Network specific information by network (address, id, constructor args, etc...)
+ * compilerOutput: The Solidity compiler output generated from the specified compiler input
+ * description (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description)
+ * compiler: The compiler settings used
+ * sourceCodes: The source code of the contract and all it's dependencies
+ * sources: A mapping from source filePath to sourceMap id
+ * sourceTreeHashHex: A unique hash generated from the contract source and that of it's dependencies.
+ * If any of the sources change, the hash would change notifying us that a re-compilation is necessary
+ */
export interface ContractArtifact extends ContractVersionData {
schemaVersion: string;
contractName: string;
networks: ContractNetworks;
}
+export interface GeneratedCompilerOptions {
+ name: 'solc';
+ version: string;
+ settings: solc.CompilerSettings;
+}
+
+export interface Source {
+ id: number;
+}
+
export interface ContractVersionData {
- compiler: {
- name: 'solc';
- version: string;
- settings: solc.CompilerSettings;
- };
+ compiler: GeneratedCompilerOptions;
sources: {
- [sourceName: string]: {
- id: number;
- };
+ [sourceName: string]: Source;
};
sourceCodes: {
[sourceName: string]: string;
@@ -47,6 +64,17 @@ export interface SolcErrors {
[key: string]: boolean;
}
+/**
+ * Options you can specify (as flags or in a compiler.json file) when invoking sol-compiler
+ * contractsDir: Directory containing your project's Solidity contracts. Can contain nested directories.
+ * artifactsDir: Directory where you want the generated artifacts.json written to
+ * compilerSettings: Desired settings to pass to the Solidity compiler during compilation.
+ * (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description)
+ * contracts: List of contract names you wish to compile, or alternatively ['*'] to compile all contracts in the
+ * specified directory.
+ * solcVersion: If you don't want to compile each contract with the Solidity version specified in-file, you can force all
+ * contracts to compile with the the version specified here.
+ */
export interface CompilerOptions {
contractsDir?: string;
artifactsDir?: string;
--
cgit
From 8c96a31152064a94513c72daec1a66510a49fde4 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 12:40:47 +0200
Subject: Fix sol-compiler doc configs
---
packages/website/ts/containers/sol_compiler_documentation.ts | 4 ----
1 file changed, 4 deletions(-)
diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts
index 635c2112b..dda3840c7 100644
--- a/packages/website/ts/containers/sol_compiler_documentation.ts
+++ b/packages/website/ts/containers/sol_compiler_documentation.ts
@@ -18,8 +18,6 @@ const markdownSections = {
introduction: 'introduction',
installation: 'installation',
usage: 'usage',
- compiler: 'compiler',
- types: docConstants.TYPES_SECTION_NAME,
};
const docsInfoConfig: DocsInfoConfig = {
@@ -31,8 +29,6 @@ const docsInfoConfig: DocsInfoConfig = {
introduction: [markdownSections.introduction],
install: [markdownSections.installation],
usage: [markdownSections.usage],
- compiler: [markdownSections.compiler],
- types: [markdownSections.types],
},
sectionNameToMarkdownByVersion: {
'0.0.1': {
--
cgit
From d136df7679b85eff054178ae8103ecd1f3b324f9 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 13:02:14 +0200
Subject: Color-code basic type arrays orange aswell
---
packages/react-docs/src/components/type.tsx | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx
index ea66c7b1e..40564c0d6 100644
--- a/packages/react-docs/src/components/type.tsx
+++ b/packages/react-docs/src/components/type.tsx
@@ -12,6 +12,8 @@ import { Signature } from './signature';
import { constants } from '../utils/constants';
import { TypeDefinition } from './type_definition';
+const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean'];
+
export interface TypeProps {
type: TypeDef;
docsInfo: DocsInfo;
@@ -73,6 +75,9 @@ export function Type(props: TypeProps): any {
case TypeDocTypes.Array:
typeName = type.elementType.name;
+ if (_.includes(basicJsTypes, typeName)) {
+ typeNameColor = colors.orange;
+ }
break;
case TypeDocTypes.Union:
--
cgit
From 13520dbd94831cd93e419d000e933bfb75c99e84 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 13:02:29 +0200
Subject: Add missing types to sol-cov index.ts
---
packages/sol-cov/src/index.ts | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/packages/sol-cov/src/index.ts b/packages/sol-cov/src/index.ts
index 0e70878ad..35135c295 100644
--- a/packages/sol-cov/src/index.ts
+++ b/packages/sol-cov/src/index.ts
@@ -5,4 +5,15 @@ export { RevertTraceSubprovider } from './revert_trace_subprovider';
export { SolCompilerArtifactAdapter } from './artifact_adapters/sol_compiler_artifact_adapter';
export { TruffleArtifactAdapter } from './artifact_adapters/truffle_artifact_adapter';
export { AbstractArtifactAdapter } from './artifact_adapters/abstract_artifact_adapter';
-export { ContractData, TraceInfo, Subtrace, SourceRange, Coverage } from './types';
+export {
+ ContractData,
+ TraceInfo,
+ Subtrace,
+ SourceRange,
+ Coverage,
+ TraceInfoNewContract,
+ TraceInfoExistingContract,
+ SingleFileSourceRange,
+} from './types';
+export { StructLog, JSONRPCRequestPayload, Provider } from 'ethereum-types';
+export { ErrorCallback, NextCallback } from '@0xproject/subproviders';
--
cgit
From 406b7c33f553ab40aee5e1fe068b9f3d190a4fdd Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 13:27:08 +0200
Subject: Re-order subproviders index.ts and add missing types
---
packages/subproviders/src/index.ts | 32 ++++++++++++++++++++------------
1 file changed, 20 insertions(+), 12 deletions(-)
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 905590539..eb9347bdb 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -1,11 +1,21 @@
import Eth from '@ledgerhq/hw-app-eth';
import TransportU2F from '@ledgerhq/hw-transport-u2f';
+import { LedgerEthereumClient } from './types';
+
export import Web3ProviderEngine = require('web3-provider-engine');
-export { ECSignature } from '@0xproject/types';
-import { LedgerEthereumClient } from './types';
+/**
+ * A factory method for creating a LedgerEthereumClient usable in a browser context.
+ * @return LedgerEthereumClient A browser client for the LedgerSubprovider
+ */
+export async function ledgerEthereumBrowserClientFactoryAsync(): Promise {
+ const ledgerConnection = await TransportU2F.create();
+ const ledgerEthClient = new Eth(ledgerConnection);
+ return ledgerEthClient;
+}
export { prependSubprovider } from './utils/subprovider_utils';
+
export { EmptyWalletSubprovider } from './subproviders/empty_wallet_subprovider';
export { FakeGasEstimateSubprovider } from './subproviders/fake_gas_estimate_subprovider';
export { SignerSubprovider } from './subproviders/signer';
@@ -18,6 +28,7 @@ export { NonceTrackerSubprovider } from './subproviders/nonce_tracker';
export { PrivateKeyWalletSubprovider } from './subproviders/private_key_wallet';
export { MnemonicWalletSubprovider } from './subproviders/mnemonic_wallet';
export { EthLightwalletSubprovider } from './subproviders/eth_lightwallet_subprovider';
+
export {
Callback,
ErrorCallback,
@@ -28,16 +39,13 @@ export {
LedgerSubproviderConfigs,
PartialTxParams,
DerivedHDKeyInfo,
+ JSONRPCRequestPayloadWithMethod,
+ ECSignatureString,
+ AccountFetchingConfigs,
+ LedgerEthereumClientFactoryAsync,
+ OnNextCompleted,
} from './types';
-/**
- * A factory method for creating a LedgerEthereumClient usable in a browser context.
- * @return LedgerEthereumClient A browser client for the LedgerSubprovider
- */
-export async function ledgerEthereumBrowserClientFactoryAsync(): Promise {
- const ledgerConnection = await TransportU2F.create();
- const ledgerEthClient = new Eth(ledgerConnection);
- return ledgerEthClient;
-}
+export { ECSignature } from '@0xproject/types';
-export { JSONRPCRequestPayload, Provider } from 'ethereum-types';
+export { JSONRPCRequestPayload, Provider, JSONRPCResponsePayload, JSONRPCErrorCallback } from 'ethereum-types';
--
cgit
From 10f6647ab3ac17e25a755d9d1424c53f88e7151c Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 13:27:20 +0200
Subject: Add missing types to web3-wrapper index.ts
---
packages/web3-wrapper/src/index.ts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/packages/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts
index b6d1bf1b2..89cf566db 100644
--- a/packages/web3-wrapper/src/index.ts
+++ b/packages/web3-wrapper/src/index.ts
@@ -13,4 +13,13 @@ export {
FilterObject,
CallData,
TransactionReceiptWithDecodedLogs,
+ BlockWithTransactionData,
+ LogTopic,
+ JSONRPCRequestPayload,
+ TransactionReceiptStatus,
+ LogWithDecodedArgs,
+ DecodedLogArgs,
+ StructLog,
+ JSONRPCErrorCallback,
+ BlockParamLiteral,
} from 'ethereum-types';
--
cgit
From 3ee3fc2fb35b5ecc8237363d6307b7135ed4f927 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 17:13:10 +0200
Subject: Add missing doc comments
---
.../src/contract_wrappers/erc20_proxy_wrapper.ts | 8 ++++++++
.../src/contract_wrappers/erc20_token_wrapper.ts | 8 ++++++++
.../src/contract_wrappers/erc721_proxy_wrapper.ts | 8 ++++++++
.../src/contract_wrappers/erc721_token_wrapper.ts | 8 ++++++++
.../src/contract_wrappers/ether_token_wrapper.ts | 8 ++++++++
.../src/contract_wrappers/exchange_wrapper.ts | 17 +++++++++++++++--
packages/contracts/test/utils/erc20_wrapper.ts | 6 ++++++
packages/sol-cov/src/trace_collection_subprovider.ts | 1 +
.../src/subproviders/eth_lightwallet_subprovider.ts | 5 +++++
packages/subproviders/src/subproviders/ganache.ts | 2 +-
.../src/subproviders/redundant_subprovider.ts | 2 +-
.../subproviders/src/subproviders/rpc_subprovider.ts | 6 +++++-
packages/subproviders/src/subproviders/subprovider.ts | 6 ++++++
packages/web3-wrapper/src/web3_wrapper.ts | 1 +
14 files changed, 81 insertions(+), 5 deletions(-)
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
index 821d1a8a2..d60d4339b 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts
@@ -16,6 +16,14 @@ export class ERC20ProxyWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi;
private _erc20ProxyContractIfExists?: ERC20ProxyContract;
private _contractAddressIfExists?: string;
+ /**
+ * Instantiate ERC20ProxyWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.erc20Proxy).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ */
constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) {
super(web3Wrapper, networkId);
this._contractAddressIfExists = contractAddressIfExists;
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
index 17bda5085..7ff0ee72e 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts
@@ -34,6 +34,14 @@ export class ERC20TokenWrapper extends ContractWrapper {
public UNLIMITED_ALLOWANCE_IN_BASE_UNITS = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
private _tokenContractsByAddress: { [address: string]: ERC20TokenContract };
private _erc20ProxyWrapper: ERC20ProxyWrapper;
+ /**
+ * Instantiate ERC20TokenWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.erc20Token).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc20ProxyWrapper The ERC20ProxyWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
index 38ecd4687..c17905cb7 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts
@@ -16,6 +16,14 @@ export class ERC721ProxyWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC20Proxy.compilerOutput.abi;
private _erc721ProxyContractIfExists?: ERC721ProxyContract;
private _contractAddressIfExists?: string;
+ /**
+ * Instantiate ERC721ProxyWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.erc721Proxy).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ */
constructor(web3Wrapper: Web3Wrapper, networkId: number, contractAddressIfExists?: string) {
super(web3Wrapper, networkId);
this._contractAddressIfExists = contractAddressIfExists;
diff --git a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
index 7231e0bde..6e0eede70 100644
--- a/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts
@@ -33,6 +33,14 @@ export class ERC721TokenWrapper extends ContractWrapper {
public abi: ContractAbi = artifacts.ERC721Token.compilerOutput.abi;
private _tokenContractsByAddress: { [address: string]: ERC721TokenContract };
private _erc721ProxyWrapper: ERC721ProxyWrapper;
+ /**
+ * Instantiate ERC721TokenWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.erc721Token).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc721ProxyWrapper The ERC721ProxyWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
index 5046d3667..d7b6effd8 100644
--- a/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts
@@ -24,6 +24,14 @@ export class EtherTokenWrapper extends ContractWrapper {
[address: string]: WETH9Contract;
} = {};
private _erc20TokenWrapper: ERC20TokenWrapper;
+ /**
+ * Instantiate EtherTokenWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.etherToken).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param erc20TokenWrapper The ERC20TokenWrapper instance to use
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
diff --git a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
index 3e7619228..5beb35a27 100644
--- a/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
+++ b/packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts
@@ -34,6 +34,17 @@ export class ExchangeWrapper extends ContractWrapper {
private _exchangeContractIfExists?: ExchangeContract;
private _contractAddressIfExists?: string;
private _zrxContractAddressIfExists?: string;
+ /**
+ * Instantiate ExchangeWrapper. We recommend you don't instantiate this yourself, rather
+ * use it through the ContractWrappers class property (contractWrappers.exchange).
+ * @param web3Wrapper Web3Wrapper instance to use
+ * @param networkId Desired networkId
+ * @param contractAddressIfExists The exchange contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ * @param zrxContractAddressIfExists The ZRXToken contract address to use. This is usually pulled from
+ * the artifacts but needs to be specified when using with your own custom testnet.
+ * @param blockPollingIntervalMs The block polling interval to use for active subscriptions
+ */
constructor(
web3Wrapper: Web3Wrapper,
networkId: number,
@@ -626,7 +637,7 @@ export class ExchangeWrapper extends ContractWrapper {
}
/**
* Batch version of cancelOrderAsync. Executes multiple cancels atomically in a single transaction.
- * @param orders An array of orders to cancel.
+ * @param orders An array of orders to cancel.Optional arguments this method accepts.
* @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@@ -665,6 +676,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param leftSignedOrder First order to match.
* @param rightSignedOrder Second order to match.
* @param takerAddress The address that sends the transaction and gets the spread.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
@@ -723,6 +735,7 @@ export class ExchangeWrapper extends ContractWrapper {
* @param signerAddress Address that should have signed the given hash.
* @param signature Proof that the hash has been signed by signer.
* @param senderAddress Address that should send the transaction.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @returns Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
@@ -881,7 +894,7 @@ export class ExchangeWrapper extends ContractWrapper {
/**
* Cancel a given order.
* @param order An object that conforms to the Order or SignedOrder interface. The order you would like to cancel.
- * @param transactionOpts Optional arguments this method accepts.
+ * @param orderTransactionOpts Optional arguments this method accepts.
* @return Transaction hash.
*/
@decorators.asyncZeroExErrorHandler
diff --git a/packages/contracts/test/utils/erc20_wrapper.ts b/packages/contracts/test/utils/erc20_wrapper.ts
index 424aae579..95b31dfa6 100644
--- a/packages/contracts/test/utils/erc20_wrapper.ts
+++ b/packages/contracts/test/utils/erc20_wrapper.ts
@@ -20,6 +20,12 @@ export class ERC20Wrapper {
private readonly _dummyTokenContracts: DummyERC20TokenContract[];
private _proxyContract?: ERC20ProxyContract;
private _proxyIdIfExists?: string;
+ /**
+ *
+ * @param provider Web3 provider to use for all JSON RPC requests
+ * @param tokenOwnerAddresses
+ * @param contractOwnerAddress
+ */
constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
this._dummyTokenContracts = [];
this._web3Wrapper = new Web3Wrapper(provider);
diff --git a/packages/sol-cov/src/trace_collection_subprovider.ts b/packages/sol-cov/src/trace_collection_subprovider.ts
index b530b59db..5a101dfeb 100644
--- a/packages/sol-cov/src/trace_collection_subprovider.ts
+++ b/packages/sol-cov/src/trace_collection_subprovider.ts
@@ -109,6 +109,7 @@ export abstract class TraceCollectionSubprovider extends Subprovider {
* Set's the subprovider's engine to the ProviderEngine it is added to.
* This is only called within the ProviderEngine source code, do not call
* directly.
+ * @param engine The ProviderEngine this subprovider is added to
*/
public setEngine(engine: Provider): void {
super.setEngine(engine);
diff --git a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
index 454dae58e..17fe59368 100644
--- a/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
+++ b/packages/subproviders/src/subproviders/eth_lightwallet_subprovider.ts
@@ -14,6 +14,11 @@ import { PrivateKeyWalletSubprovider } from './private_key_wallet';
export class EthLightwalletSubprovider extends BaseWalletSubprovider {
private readonly _keystore: lightwallet.keystore;
private readonly _pwDerivedKey: Uint8Array;
+ /**
+ *
+ * @param keystore The EthLightWallet keystore you wish to use
+ * @param pwDerivedKey The password derived key to use
+ */
constructor(keystore: lightwallet.keystore, pwDerivedKey: Uint8Array) {
super();
this._keystore = keystore;
diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts
index 986094dba..2b8544f8b 100644
--- a/packages/subproviders/src/subproviders/ganache.ts
+++ b/packages/subproviders/src/subproviders/ganache.ts
@@ -24,7 +24,7 @@ export class GanacheSubprovider extends Subprovider {
* It is called internally by the ProviderEngine when it is this subproviders
* turn to handle a JSON RPC request.
* @param payload JSON RPC payload
- * @param next Callback to call if this subprovider decides not to handle the request
+ * @param _next Callback to call if this subprovider decides not to handle the request
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
diff --git a/packages/subproviders/src/subproviders/redundant_subprovider.ts b/packages/subproviders/src/subproviders/redundant_subprovider.ts
index 7aa6226d5..59a2986f8 100644
--- a/packages/subproviders/src/subproviders/redundant_subprovider.ts
+++ b/packages/subproviders/src/subproviders/redundant_subprovider.ts
@@ -34,7 +34,7 @@ export class RedundantSubprovider extends Subprovider {
}
/**
* Instantiates a new RedundantSubprovider
- * @param endpoints JSON RPC endpoints to attempt. Attempts are made in the order of the endpoints.
+ * @param subproviders Subproviders to attempt the request with
*/
constructor(subproviders: Subprovider[]) {
super();
diff --git a/packages/subproviders/src/subproviders/rpc_subprovider.ts b/packages/subproviders/src/subproviders/rpc_subprovider.ts
index d874c6f05..18d6da307 100644
--- a/packages/subproviders/src/subproviders/rpc_subprovider.ts
+++ b/packages/subproviders/src/subproviders/rpc_subprovider.ts
@@ -15,6 +15,10 @@ import { Subprovider } from './subprovider';
export class RPCSubprovider extends Subprovider {
private readonly _rpcUrl: string;
private readonly _requestTimeoutMs: number;
+ /**
+ * @param rpcUrl URL to the backing Ethereum node to which JSON RPC requests should be sent
+ * @param requestTimeoutMs Amount of miliseconds to wait before timing out the JSON RPC request
+ */
constructor(rpcUrl: string, requestTimeoutMs: number = 20000) {
super();
assert.isString('rpcUrl', rpcUrl);
@@ -27,7 +31,7 @@ export class RPCSubprovider extends Subprovider {
* It is called internally by the ProviderEngine when it is this subproviders
* turn to handle a JSON RPC request.
* @param payload JSON RPC payload
- * @param next Callback to call if this subprovider decides not to handle the request
+ * @param _next Callback to call if this subprovider decides not to handle the request
* @param end Callback to call if subprovider handled the request and wants to pass back the request.
*/
// tslint:disable-next-line:prefer-function-over-method async-suffix
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index 5dc273569..53a3d07ea 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -32,6 +32,11 @@ export abstract class Subprovider {
// 16 digits
return datePart + extraPart;
}
+ /**
+ * @param payload JSON RPC request payload
+ * @param next A callback to pass the request to the next subprovider in the stack
+ * @param end A callback called once the subprovider is done handling the request
+ */
// tslint:disable-next-line:async-suffix
public abstract async handleRequest(
payload: JSONRPCRequestPayload,
@@ -55,6 +60,7 @@ export abstract class Subprovider {
* Set's the subprovider's engine to the ProviderEngine it is added to.
* This is only called within the ProviderEngine source code, do not call
* directly.
+ * @param engine The ProviderEngine this subprovider is added to
*/
public setEngine(engine: Provider): void {
this.engine = engine;
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
index dd35e2094..ea78f8801 100644
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ b/packages/web3-wrapper/src/web3_wrapper.ts
@@ -237,6 +237,7 @@ export class Web3Wrapper {
/**
* Retrieves an accounts Ether balance in wei
* @param owner Account whose balance you wish to check
+ * @param defaultBlock The block depth at which to fetch the balance (default=latest)
* @returns Balance in wei
*/
public async getBalanceInWeiAsync(owner: string, defaultBlock?: BlockParam): Promise {
--
cgit
From b8c8258404fa7959b71dd9e87fba16d32b57a868 Mon Sep 17 00:00:00 2001
From: Fabio Berger
Date: Fri, 3 Aug 2018 17:13:38 +0200
Subject: Don't render object literal properties that start with underscore
since are private
---
packages/react-docs/src/components/property_block.tsx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx
index 074c59c5f..ea80ba7b7 100644
--- a/packages/react-docs/src/components/property_block.tsx
+++ b/packages/react-docs/src/components/property_block.tsx
@@ -48,7 +48,8 @@ export class PropertyBlock extends React.Component