# FunctionCallWeight

[**promise**](/near-sdk-js/promise.md) • **Docs**

***

[near-sdk-js v2.0.0](/near-sdk-js/packages.md) / [promise](/near-sdk-js/promise.md) / FunctionCallWeight

## Class: FunctionCallWeight

A function call weight promise action.

### Extends

* [`PromiseAction`](/near-sdk-js/promise/classes/promiseaction.md)

### Constructors

#### new FunctionCallWeight()

> **new FunctionCallWeight**(`functionName`, `args`, `amount`, `gas`, `weight`): [`FunctionCallWeight`](/near-sdk-js/promise/classes/functioncallweight.md)

**Parameters**

• **functionName**: `string`

The name of the function to be called.

• **args**: `string`

The utf-8 string arguments to be passed to the function.

• **amount**: `bigint`

The amount of NEAR to attach to the call.

• **gas**: `bigint`

The amount of Gas to attach to the call.

• **weight**: `bigint`

The weight of unused Gas to use.

**Returns**

[`FunctionCallWeight`](/near-sdk-js/promise/classes/functioncallweight.md)

**Overrides**

[`PromiseAction`](/near-sdk-js/promise/classes/promiseaction.md).[`constructor`](/near-sdk-js/promise/classes/promiseaction.md#constructors)

**Defined in**

[packages/near-sdk-js/src/promise.ts:124](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L124)

### Properties

#### amount

> **amount**: `bigint`

The amount of NEAR to attach to the call.

**Defined in**

[packages/near-sdk-js/src/promise.ts:127](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L127)

***

#### args

> **args**: `string`

The utf-8 string arguments to be passed to the function.

**Defined in**

[packages/near-sdk-js/src/promise.ts:126](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L126)

***

#### functionName

> **functionName**: `string`

The name of the function to be called.

**Defined in**

[packages/near-sdk-js/src/promise.ts:125](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L125)

***

#### gas

> **gas**: `bigint`

The amount of Gas to attach to the call.

**Defined in**

[packages/near-sdk-js/src/promise.ts:128](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L128)

***

#### weight

> **weight**: `bigint`

The weight of unused Gas to use.

**Defined in**

[packages/near-sdk-js/src/promise.ts:129](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L129)

### Methods

#### add()

> **add**(`promiseIndex`): `void`

The method that describes how a promise action adds it's *action* to the promise batch with the provided index.

**Parameters**

• **promiseIndex**: [`PromiseIndex`](/near-sdk-js/utils/type-aliases/promiseindex.md)

The index of the promise batch to attach the action to.

**Returns**

`void`

**Overrides**

[`PromiseAction`](/near-sdk-js/promise/classes/promiseaction.md).[`add`](/near-sdk-js/promise/classes/promiseaction.md#add)

**Defined in**

[packages/near-sdk-js/src/promise.ts:134](https://github.com/near/near-sdk-js/blob/b58ac04fc6dff2f1120e9098c0cb059493486598/packages/near-sdk-js/src/promise.ts#L134)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://near-sdk-js.gitbook.io/near-sdk-js/promise/classes/functioncallweight.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
