From 98787515238cfb2735345a54be9bdcf0bf9c1386 Mon Sep 17 00:00:00 2001 From: chmanie Date: Wed, 30 Oct 2024 06:44:37 +0000 Subject: [PATCH] chore: generate docs --- .../api/interfaces/ColonyNetworkClient.md | 6 ++ .../api/interfaces/NetworkClientOptions.md | 6 ++ packages/sdk/docs/api/README.md | 11 +++- packages/sdk/docs/api/classes/Colony.md | 8 +++ .../sdk/docs/api/classes/ColonyNetwork.md | 43 +------------ .../docs/api/classes/CustomColonyNetwork.md | 63 ------------------- .../sdk/docs/api/classes/CustomContract.md | 14 +++-- .../sdk/docs/api/classes/MetaTxCreator.md | 2 +- packages/sdk/docs/api/classes/TxCreator.md | 2 +- .../sdk/docs/api/classes/VotingReputation.md | 8 +-- ...nyNetworkOptions.md => ContractOptions.md} | 4 +- .../docs/api/interfaces/TxCreatorConfig.md | 4 +- 12 files changed, 50 insertions(+), 121 deletions(-) delete mode 100644 packages/sdk/docs/api/classes/CustomColonyNetwork.md rename packages/sdk/docs/api/interfaces/{ColonyNetworkOptions.md => ContractOptions.md} (88%) diff --git a/packages/colony-js/docs/api/interfaces/ColonyNetworkClient.md b/packages/colony-js/docs/api/interfaces/ColonyNetworkClient.md index ff1b5a644..a5edf6133 100644 --- a/packages/colony-js/docs/api/interfaces/ColonyNetworkClient.md +++ b/packages/colony-js/docs/api/interfaces/ColonyNetworkClient.md @@ -285,6 +285,12 @@ IColonyNetwork.deployTransaction ___ +### disableVersionCheck + +• **disableVersionCheck**: `boolean` + +___ + ### estimateGas • **estimateGas**: `ExtendedEstimate` diff --git a/packages/colony-js/docs/api/interfaces/NetworkClientOptions.md b/packages/colony-js/docs/api/interfaces/NetworkClientOptions.md index 247a5b188..245cc6472 100644 --- a/packages/colony-js/docs/api/interfaces/NetworkClientOptions.md +++ b/packages/colony-js/docs/api/interfaces/NetworkClientOptions.md @@ -2,6 +2,12 @@ ## Properties +### disableVersionCheck + +• `Optional` **disableVersionCheck**: `boolean` + +___ + ### networkAddress • `Optional` **networkAddress**: `string` diff --git a/packages/sdk/docs/api/README.md b/packages/sdk/docs/api/README.md index a9d50912d..98cb7d5b2 100644 --- a/packages/sdk/docs/api/README.md +++ b/packages/sdk/docs/api/README.md @@ -45,7 +45,6 @@ - [ColonyNetwork](classes/ColonyNetwork.md) - [ColonyToken](classes/ColonyToken.md) - [ColonyTxCreator](classes/ColonyTxCreator.md) -- [CustomColonyNetwork](classes/CustomColonyNetwork.md) - [CustomContract](classes/CustomContract.md) - [ERC20Token](classes/ERC20Token.md) - [ERC2612Token](classes/ERC2612Token.md) @@ -87,9 +86,9 @@ - [ColonyMetaTransaction](interfaces/ColonyMetaTransaction.md) - [ColonyMetadata](interfaces/ColonyMetadata.md) - [ColonyMultiFilter](interfaces/ColonyMultiFilter.md) -- [ColonyNetworkOptions](interfaces/ColonyNetworkOptions.md) - [ColonyTopic](interfaces/ColonyTopic.md) - [ColonyTransaction](interfaces/ColonyTransaction.md) +- [ContractOptions](interfaces/ContractOptions.md) - [ContractReceipt](interfaces/ContractReceipt.md) - [ContractTransaction](interfaces/ContractTransaction.md) - [DataTypeMap](interfaces/DataTypeMap.md) @@ -116,6 +115,14 @@ ## Type Aliases +### Abi + +Ƭ **Abi**: readonly (`AbiConstructor` \| `AbiError` \| `AbiEvent` \| `AbiFallback` \| `AbiFunction` \| `AbiReceive`)[] + +Contract [ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html#json) + +___ + ### Data Ƭ **Data**: [`AnnotationData`](interfaces/AnnotationData.md) \| [`ColonyData`](interfaces/ColonyData.md) \| [`DecisionData`](interfaces/DecisionData.md) \| [`DomainData`](interfaces/DomainData.md) \| [`MiscData`](interfaces/MiscData.md) diff --git a/packages/sdk/docs/api/classes/Colony.md b/packages/sdk/docs/api/classes/Colony.md index 3fb71855d..a43546081 100644 --- a/packages/sdk/docs/api/classes/Colony.md +++ b/packages/sdk/docs/api/classes/Colony.md @@ -18,6 +18,14 @@ A shortcut to the [ColonyNetwork](ColonyNetwork.md) instance ___ +### config + +• **config**: `ContractConfig` + +The colony's contract config (taken from ColonyNetwork) + +___ + ### ext • **ext**: [`SupportedExtensions`](../interfaces/SupportedExtensions.md) diff --git a/packages/sdk/docs/api/classes/ColonyNetwork.md b/packages/sdk/docs/api/classes/ColonyNetwork.md index 7c2d22982..cd39fcf37 100644 --- a/packages/sdk/docs/api/classes/ColonyNetwork.md +++ b/packages/sdk/docs/api/classes/ColonyNetwork.md @@ -28,33 +28,7 @@ const colonyNetwork = new ColonyNetwork(provider); | Name | Type | Description | | :------ | :------ | :------ | | `signerOrProvider` | [`SignerOrProvider`](../README.md#signerorprovider) | An _ethers_ compatible Signer or Provider instance | -| `options?` | [`ColonyNetworkOptions`](../interfaces/ColonyNetworkOptions.md) | Optional custom [ColonyNetworkOptions](../interfaces/ColonyNetworkOptions.md) | - -## Properties - -### ipfs - -• **ipfs**: [`IpfsMetadata`](IpfsMetadata.md) - -The IPFS adapter for Metadata. Defaults to a read-only adapter - -___ - -### network - -• **network**: [`Network`](../enums/Network.md) - -The network the client is connected to. Defaults to Arbitrum One - -___ - -### signerOrProvider - -• **signerOrProvider**: [`SignerOrProvider`](../README.md#signerorprovider) - -An ethers.js [Signer](https://docs.ethers.org/v5/api/signer/#Signer) or [Provider](https://docs.ethers.org/v5/api/providers/). - -E.g. a [Wallet](https://docs.ethers.org/v5/api/signer/#Wallet) or a [Web3Provider](https://docs.ethers.org/v5/api/providers/other/#Web3Provider) (MetaMask) +| `options?` | [`ContractOptions`](../interfaces/ContractOptions.md) | Optional custom ColonyNetworkOptions | ## Methods @@ -298,21 +272,6 @@ A Colony abstaction instance of the MetaColony ___ -### getSigner - -▸ **getSigner**(): `Signer` - -Get the signer that was provided when the ColonyNetwork was instantiated. -Throws if the Signer is only a (read-only) Provider - -#### Returns - -`Signer` - -An Ethers.js compatible Signer instance - -___ - ### getTokenLocking ▸ **getTokenLocking**(): `Promise`<[`TokenLocking`](TokenLocking.md)\> diff --git a/packages/sdk/docs/api/classes/CustomColonyNetwork.md b/packages/sdk/docs/api/classes/CustomColonyNetwork.md deleted file mode 100644 index deecc5b10..000000000 --- a/packages/sdk/docs/api/classes/CustomColonyNetwork.md +++ /dev/null @@ -1,63 +0,0 @@ -# Class: CustomColonyNetwork - -## Constructors - -### constructor - -• **new CustomColonyNetwork**(`signerOrProvider`, `abi`, `options?`) - -Creates a new custom instance of the custom ColonyNetwork - -#### Parameters - -| Name | Type | Description | -| :------ | :------ | :------ | -| `signerOrProvider` | [`SignerOrProvider`](../README.md#signerorprovider) | An _ethers_ compatible Signer or Provider instance | -| `abi` | `ContractInterface` | JSON ABI of the custom ColonyNetwork contract | -| `options?` | [`ColonyNetworkOptions`](../interfaces/ColonyNetworkOptions.md) | Optional custom [ColonyNetworkOptions](../interfaces/ColonyNetworkOptions.md) | - -## Properties - -### ipfs - -• **ipfs**: [`IpfsMetadata`](IpfsMetadata.md) - -The IPFS adapter for Metadata. Defaults to a read-only adapter - -___ - -### network - -• **network**: [`Network`](../enums/Network.md) - -The network the client is connected to. Defaults to Gnosis chain - -___ - -### signerOrProvider - -• **signerOrProvider**: [`SignerOrProvider`](../README.md#signerorprovider) - -An ethers.js [Signer](https://docs.ethers.org/v5/api/signer/#Signer) or [Provider](https://docs.ethers.org/v5/api/providers/). - -E.g. a [Wallet](https://docs.ethers.org/v5/api/signer/#Wallet) or a [Web3Provider](https://docs.ethers.org/v5/api/providers/other/#Web3Provider) (MetaMask) - -## Methods - -### getInternalNetworkContract - -▸ **getInternalNetworkContract**(): `IColonyNetwork` - -#### Returns - -`IColonyNetwork` - -___ - -### getSigner - -▸ **getSigner**(): `Signer` - -#### Returns - -`Signer` diff --git a/packages/sdk/docs/api/classes/CustomContract.md b/packages/sdk/docs/api/classes/CustomContract.md index 7b7b9f676..ebe4bc8b8 100644 --- a/packages/sdk/docs/api/classes/CustomContract.md +++ b/packages/sdk/docs/api/classes/CustomContract.md @@ -4,13 +4,13 @@ | Name | Type | | :------ | :------ | -| `A` | extends `Abi` | +| `A` | extends [`Abi`](../README.md#abi) | ## Constructors ### constructor -• **new CustomContract**<`A`\>(`colonyNetwork`, `address`, `abi`) +• **new CustomContract**<`A`\>(`address`, `abi`, `config`) Creates a new instance of a custom contract @@ -21,15 +21,15 @@ From here you should be able to instantiate all the required instances for Colon | Name | Type | | :------ | :------ | -| `A` | extends `Abi` | +| `A` | extends [`Abi`](../README.md#abi) | #### Parameters | Name | Type | Description | | :------ | :------ | :------ | -| `colonyNetwork` | [`ColonyNetwork`](ColonyNetwork.md) \| [`CustomColonyNetwork`](CustomColonyNetwork.md) | [ColonyNetwork](ColonyNetwork.md) instance | | `address` | \`0x${string}\` | Address of the deployed contract | | `abi` | `A` | JSON ABI of the contract | +| `config` | `ContractConfig` | An instance of a ContractConfig (mind: _not_ ContractOptions!) | ## Properties @@ -37,6 +37,12 @@ From here you should be able to instantiate all the required instances for Colon • **address**: \`0x${string}\` +___ + +### config + +• **config**: `ContractConfig` + ## Methods ### createTxCreator diff --git a/packages/sdk/docs/api/classes/MetaTxCreator.md b/packages/sdk/docs/api/classes/MetaTxCreator.md index e953edf3b..837c271b2 100644 --- a/packages/sdk/docs/api/classes/MetaTxCreator.md +++ b/packages/sdk/docs/api/classes/MetaTxCreator.md @@ -49,7 +49,7 @@ Learn more about these functions in their individual documentation | :------ | :------ | | `«destructured»` | `Object` | | › `args` | `unknown`[] \| () => `Promise`<`unknown`[]\> | -| › `colonyNetwork` | [`ColonyNetwork`](ColonyNetwork.md) \| [`CustomColonyNetwork`](CustomColonyNetwork.md) | +| › `config` | `ContractConfig` | | › `contract` | `C` | | › `eventData?` | (`receipt`: [`ContractReceipt`](../interfaces/ContractReceipt.md)) => `Promise`<`E`\> | | › `metadataType?` | `MD` | diff --git a/packages/sdk/docs/api/classes/TxCreator.md b/packages/sdk/docs/api/classes/TxCreator.md index dde92a942..6c9c536c6 100644 --- a/packages/sdk/docs/api/classes/TxCreator.md +++ b/packages/sdk/docs/api/classes/TxCreator.md @@ -46,7 +46,7 @@ Learn more about these functions in their individual documentation | :------ | :------ | | `«destructured»` | `Object` | | › `args` | `unknown`[] \| () => `Promise`<`unknown`[]\> | -| › `colonyNetwork` | [`ColonyNetwork`](ColonyNetwork.md) \| [`CustomColonyNetwork`](CustomColonyNetwork.md) | +| › `config` | `ContractConfig` | | › `contract` | `C` | | › `eventData?` | (`receipt`: [`ContractReceipt`](../interfaces/ContractReceipt.md)) => `Promise`<`E`\> | | › `metadataType?` | `MD` | diff --git a/packages/sdk/docs/api/classes/VotingReputation.md b/packages/sdk/docs/api/classes/VotingReputation.md index 708ace9fc..b81d320bb 100644 --- a/packages/sdk/docs/api/classes/VotingReputation.md +++ b/packages/sdk/docs/api/classes/VotingReputation.md @@ -7,7 +7,7 @@ The `VotingReputation` extension allows any member of a Colony to propose a Moti ### Extension parameters Before the `VotingReputation` extension can be used you need to initialize it using a few parameters that heavily influence the Motion lifecycle. -For that please see the [initialize](VotingReputation.md#initialize) function and also [this document](https://docs.colony.io/use/governance/motions-and-disputes/parameters) for an in-depth explanation of the various parameters. +For that please see the [initialize](VotingReputation.md#initialize) function and also [this document](https://docs.colony.io/learn/governance/parameters) for an in-depth explanation of the various parameters. ### What is a Motion? @@ -18,7 +18,7 @@ Motions that pass (the outcome is _Yay_) will execute the `action` once they are :::info -The exact lifecycle is determined by the parameters that were set when the `VotingReputation` extension was installed for the Colony. You can find a detailed explanation of all the parameters [here](https://colony.gitbook.io/colony/extensions/governance/parameters). +The exact lifecycle is determined by the parameters that were set when the `VotingReputation` extension was installed for the Colony. You can find a detailed explanation of all the parameters [here](https://docs.colony.io/learn/governance/parameters). ::: @@ -356,7 +356,7 @@ ___ Get the initialized configuration options Get the configuration options that were set when the extension was initialized. -For more information on the individual values see https://docs.colony.io/use/governance/motions-and-disputes/parameters +For more information on the individual values see https://docs.colony.io/learn/governance/parameters #### Returns @@ -518,7 +518,7 @@ Before you can use the extension you need to initialize it by calling this funct - Fractions are in wei to allow for precise adjustments (you can use the `w` helper method to specify fractions - see example) - All periods values are given in seconds -See also [this page](https://docs.colony.io/use/governance/motions-and-disputes/parameters) for a detailed explanation of the parameters. +See also [this page](https://docs.colony.io/learn/governance/parameters) for a detailed explanation of the parameters. **`Example`** diff --git a/packages/sdk/docs/api/interfaces/ColonyNetworkOptions.md b/packages/sdk/docs/api/interfaces/ContractOptions.md similarity index 88% rename from packages/sdk/docs/api/interfaces/ColonyNetworkOptions.md rename to packages/sdk/docs/api/interfaces/ContractOptions.md index b8111172c..520d76eeb 100644 --- a/packages/sdk/docs/api/interfaces/ColonyNetworkOptions.md +++ b/packages/sdk/docs/api/interfaces/ContractOptions.md @@ -1,6 +1,6 @@ -# Interface: ColonyNetworkOptions +# Interface: ContractOptions -Additional options for the [ColonyNetwork](../classes/ColonyNetwork.md) +Additional options for instatiating Contracts within the Colony Network ## Properties diff --git a/packages/sdk/docs/api/interfaces/TxCreatorConfig.md b/packages/sdk/docs/api/interfaces/TxCreatorConfig.md index 542c7415d..aa68471e8 100644 --- a/packages/sdk/docs/api/interfaces/TxCreatorConfig.md +++ b/packages/sdk/docs/api/interfaces/TxCreatorConfig.md @@ -17,9 +17,9 @@ ___ -### colonyNetwork +### config -• **colonyNetwork**: [`ColonyNetwork`](../classes/ColonyNetwork.md) +• **config**: `ContractConfig` ___