[API Reference](../README.md) > [ContractWrapperBase](../classes/ContractWrapperBase.md)



# Class: ContractWrapperBase


Abstract base class for all Arc contract wrapper classes

Example of how to define a wrapper:

    import { ContractWrapperBase } from "../contractWrapperBase";
    import { ContractWrapperFactory } from "../contractWrapperFactory";

    export class AbsoluteVoteWrapper extends ContractWrapperBase {
      [ wrapper properties and methods ]
    }

    export const AbsoluteVote = new ContractWrapperFactory("AbsoluteVote", AbsoluteVoteWrapper);

## Hierarchy

**ContractWrapperBase**

↳  [AbsoluteVoteWrapper](AbsoluteVoteWrapper.md)




↳  [ContributionRewardWrapper](ContributionRewardWrapper.md)




↳  [GenesisProtocolWrapper](GenesisProtocolWrapper.md)




↳  [GlobalConstraintRegistrarWrapper](GlobalConstraintRegistrarWrapper.md)




↳  [SchemeRegistrarWrapper](SchemeRegistrarWrapper.md)




↳  [TokenCapGCWrapper](TokenCapGCWrapper.md)




↳  [UpgradeSchemeWrapper](UpgradeSchemeWrapper.md)




↳  [VestingSchemeWrapper](VestingSchemeWrapper.md)




↳  [VoteInOrganizationSchemeWrapper](VoteInOrganizationSchemeWrapper.md)




↳  [DaoCreatorWrapper](DaoCreatorWrapper.md)








## Index

### Constructors

* [constructor](ContractWrapperBase.md#constructor)


### Properties

* [contract](ContractWrapperBase.md#contract)
* [factory](ContractWrapperBase.md#factory)
* [friendlyName](ContractWrapperBase.md#friendlyName)
* [name](ContractWrapperBase.md#name)


### Accessors

* [address](ContractWrapperBase.md#address)


### Methods

* [getController](ContractWrapperBase.md#getController)
* [getParameters](ContractWrapperBase.md#getParameters)
* [getParametersArray](ContractWrapperBase.md#getParametersArray)
* [getSchemeParametersHash](ContractWrapperBase.md#getSchemeParametersHash)
* [hydrateFromAt](ContractWrapperBase.md#hydrateFromAt)
* [hydrateFromDeployed](ContractWrapperBase.md#hydrateFromDeployed)
* [hydrateFromNew](ContractWrapperBase.md#hydrateFromNew)
* [setParameters](ContractWrapperBase.md#setParameters)



---
## Constructors
<a id="constructor"></a>


### ⊕ **new ContractWrapperBase**(solidityContract: *`any`*): [ContractWrapperBase](ContractWrapperBase.md)


*Defined in [contractWrapperBase.ts:46](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L46)*



ContractWrapperFactory constructs this


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| solidityContract | `any`   |  The json contract truffle artifact |





**Returns:** [ContractWrapperBase](ContractWrapperBase.md)

---


## Properties
<a id="contract"></a>

###  contract

**●  contract**:  *`any`* 

*Defined in [contractWrapperBase.ts:46](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L46)*



The underlying truffle contract object. Use this to access parts of the contract that aren't accessible via the wrapper.




___

<a id="factory"></a>

### «Abstract» factory

**●  factory**:  *[ContractWrapperFactory](ContractWrapperFactory.md)`any`* 

*Defined in [contractWrapperBase.ts:29](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L29)*



The wrapper factor class providing static methods `at(someAddress)`, `new()` and `deployed()`.




___

<a id="friendlyName"></a>

### «Abstract» friendlyName

**●  friendlyName**:  *`string`* 

*Defined in [contractWrapperBase.ts:37](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L37)*



A more friendly name for the contract.




___

<a id="name"></a>

### «Abstract» name

**●  name**:  *`string`* 

*Defined in [contractWrapperBase.ts:33](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L33)*



The name of the contract.




___


## Accessors
<a id="address"></a>

###  address


getaddress(): [Address](../#Address)

*Defined in [contractWrapperBase.ts:41](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L41)*



The address of the contract




**Returns:** [Address](../#Address)



___


## Methods
<a id="getController"></a>

###  getController

► **getController**(avatarAddress: *[Address](../#Address)*): `Promise`.<`any`>



*Defined in [contractWrapperBase.ts:142](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L142)*



Returns the controller associated with the given avatar


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| avatarAddress | [Address](../#Address)   |  - |





**Returns:** `Promise`.<`any`>





___

<a id="getParameters"></a>

###  getParameters

► **getParameters**(paramsHash: *[Hash](../#Hash)*): `Promise`.<`any`>



*Defined in [contractWrapperBase.ts:116](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L116)*



Given a hash, returns the associated parameters as an object.


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| paramsHash | [Hash](../#Hash)   |  - |





**Returns:** `Promise`.<`any`>





___

<a id="getParametersArray"></a>

###  getParametersArray

► **getParametersArray**(paramsHash: *[Hash](../#Hash)*): `Promise`.<`Array`.<`any`>>



*Defined in [contractWrapperBase.ts:134](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L134)*



Given a hash, returns the associated parameters as an array, ordered by the order in which the parameters appear in the contract's Parameters struct.


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| paramsHash | [Hash](../#Hash)   |  - |





**Returns:** `Promise`.<`Array`.<`any`>>





___

<a id="getSchemeParametersHash"></a>

###  getSchemeParametersHash

► **getSchemeParametersHash**(avatarAddress: *[Address](../#Address)*): `Promise`.<[Hash](../#Hash)>



*Defined in [contractWrapperBase.ts:124](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L124)*



Given an avatar address, returns the schemes parameters hash


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| avatarAddress | [Address](../#Address)   |  - |





**Returns:** `Promise`.<[Hash](../#Hash)>





___

<a id="hydrateFromAt"></a>

###  hydrateFromAt

► **hydrateFromAt**(address: *`string`*): `Promise`.<`any`>



*Defined in [contractWrapperBase.ts:76](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L76)*



Initialize from a given address on the current network.


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| address | `string`   |  of the deployed contract |





**Returns:** `Promise`.<`any`>
this






___

<a id="hydrateFromDeployed"></a>

###  hydrateFromDeployed

► **hydrateFromDeployed**(): `Promise`.<`any`>



*Defined in [contractWrapperBase.ts:91](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L91)*



Initialize as it was migrated by Arc.js on the current network.




**Returns:** `Promise`.<`any`>
this






___

<a id="hydrateFromNew"></a>

###  hydrateFromNew

► **hydrateFromNew**(...rest: *`Array`.<`any`>*): `Promise`.<`any`>



*Defined in [contractWrapperBase.ts:60](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L60)*



Initialize from a newly-migrated instance. This will migrate a new instance of the contract to the net.


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| rest | `Array`.<`any`>   |  - |





**Returns:** `Promise`.<`any`>
this






___

<a id="setParameters"></a>

###  setParameters

► **setParameters**(...params: *`Array`.<`any`>*): `Promise`.<[ArcTransactionDataResult](ArcTransactionDataResult.md)[Hash](../#Hash)>



*Defined in [contractWrapperBase.ts:108](https://github.com/daostack/arc.js/blob/77005d4/lib/contractWrapperBase.ts#L108)*



Call setParameters on this.contract. Returns promise of ArcTransactionDataResult <hash>where Result is the parameters hash.</hash>


**Parameters:**

| Param | Type | Description |
| ------ | ------ | ------ |
| params | `Array`.<`any`>   |  -- parameters as the contract.setParameters function expects them. |





**Returns:** `Promise`.<[ArcTransactionDataResult](ArcTransactionDataResult.md)[Hash](../#Hash)>





___


