> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ConstantContractMethod

A pure or view method on a Contract.

## Extends

* [`ContractMethod`](/sdk/content/interfaces/ContractMethod)\<`A`, `R`, `R`>

## Type parameters

| Type parameter         | Value |
| :--------------------- | :---- |
| `A` *extends* `any`\[] | -     |
| `R`                    | `any` |

```ts theme={null}
interface ConstantContractMethod(...args): Promise<R>
```

Call the contract method with arguments.

## Parameters

| Parameter | Type                       | Description                            |
| :-------- | :------------------------- | :------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to call the method with. |

## Returns

`Promise`\<`R`>

A promise resolving to the result of the call.

## Source

[contract/types.ts:217](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L217)

## Properties

| Property   | Type                                                        | Description                                                                     | Inherited from                                                        |
| :--------- | :---------------------------------------------------------- | :------------------------------------------------------------------------------ | :-------------------------------------------------------------------- |
| `fragment` | [`FunctionFragment`](/sdk/content/classes/FunctionFragment) | The fragment of the Contract method. This will throw on ambiguous method names. | [`ContractMethod`](/sdk/content/interfaces/ContractMethod).`fragment` |
| `name`     | `string`                                                    | The name of the Contract method.                                                | [`ContractMethod`](/sdk/content/interfaces/ContractMethod).`name`     |

## Methods

### estimateGas()

```ts theme={null}
estimateGas(...args): Promise<bigint>
```

Estimate the gas to send the contract method with `args`.

#### Parameters

| Parameter | Type                       | Description                            |
| :-------- | :------------------------- | :------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to call the method with. |

#### Returns

`Promise`\<`bigint`>

A promise resolving to the estimated gas.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`estimateGas`](/sdk/content/interfaces/ContractMethod#estimategas)

#### Source

[contract/types.ts:190](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L190)

***

### getFragment()

```ts theme={null}
getFragment(...args): FunctionFragment
```

Returns the fragment constrained by `args`. This can be used to resolve ambiguous method names.

#### Parameters

| Parameter | Type                       | Description                                 |
| :-------- | :------------------------- | :------------------------------------------ |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to constrain the fragment by. |

#### Returns

[`FunctionFragment`](/sdk/content/classes/FunctionFragment)

The constrained fragment.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`getFragment`](/sdk/content/interfaces/ContractMethod#getfragment)

#### Source

[contract/types.ts:155](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L155)

***

### populateTransaction()

```ts theme={null}
populateTransaction(...args): Promise<ContractTransaction>
```

Returns a populated transaction that can be used to perform the contract method with `args`.

#### Parameters

| Parameter | Type                       | Description                                     |
| :-------- | :------------------------- | :---------------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to populate the transaction with. |

#### Returns

`Promise`\<[`ContractTransaction`](/sdk/content/interfaces/ContractTransaction)>

A promise resolving to the populated transaction.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`populateTransaction`](/sdk/content/interfaces/ContractMethod#populatetransaction)

#### Source

[contract/types.ts:163](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L163)

***

### send()

```ts theme={null}
send(...args): Promise<ContractTransactionResponse>
```

Send a transaction for the contract method with `args`.

#### Parameters

| Parameter | Type                       | Description                            |
| :-------- | :------------------------- | :------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to call the method with. |

#### Returns

`Promise`\<[`ContractTransactionResponse`](/sdk/content/classes/ContractTransactionResponse)>

A promise resolving to the transaction response.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`send`](/sdk/content/interfaces/ContractMethod#send)

#### Source

[contract/types.ts:182](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L182)

***

### staticCall()

```ts theme={null}
staticCall(...args): Promise<R>
```

Call the contract method with `args` and return the value.

If the return value is a single type, it will be dereferenced and returned directly, otherwise the full Result
will be returned.

#### Parameters

| Parameter | Type                       | Description                            |
| :-------- | :------------------------- | :------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to call the method with. |

#### Returns

`Promise`\<`R`>

A promise resolving to the result of the static call.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`staticCall`](/sdk/content/interfaces/ContractMethod#staticcall)

#### Source

[contract/types.ts:174](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L174)

***

### staticCallResult()

```ts theme={null}
staticCallResult(...args): Promise<Result>
```

Call the contract method with `args` and return the Result without any dereferencing.

#### Parameters

| Parameter | Type                       | Description                            |
| :-------- | :------------------------- | :------------------------------------- |
| ...`args` | `ContractMethodArgs`\<`A`> | The arguments to call the method with. |

#### Returns

`Promise`\<[`Result`](/sdk/content/classes/Result)>

A promise resolving to the Result of the static call.

#### Inherited from

[`ContractMethod`](/sdk/content/interfaces/ContractMethod).[`staticCallResult`](/sdk/content/interfaces/ContractMethod#staticcallresult)

#### Source

[contract/types.ts:198](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/contract/types.ts#L198)
