Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] [Typescript] Implement gas price multiplier #1265

Merged
merged 1 commit into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 103 additions & 0 deletions docs/sdk/typescript/classes/base.BaseEthersClient.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
[@human-protocol/sdk](../README.md) / [Modules](../modules.md) / [base](../modules/base.md) / BaseEthersClient

# Class: BaseEthersClient

[base](../modules/base.md).BaseEthersClient

## Introduction

This class is used as a base class for other clients making on-chain calls.

## Hierarchy

- **`BaseEthersClient`**

↳ [`EscrowClient`](escrow.EscrowClient.md)

↳ [`KVStoreClient`](kvstore.KVStoreClient.md)

↳ [`StakingClient`](staking.StakingClient.md)

## Table of contents

### Constructors

- [constructor](base.BaseEthersClient.md#constructor)

### Properties

- [gasPriceMultiplier](base.BaseEthersClient.md#gaspricemultiplier)
- [networkData](base.BaseEthersClient.md#networkdata)
- [signerOrProvider](base.BaseEthersClient.md#signerorprovider)

### Methods

- [gasPriceOptions](base.BaseEthersClient.md#gaspriceoptions)

## Constructors

### constructor

• **new BaseEthersClient**(`signerOrProvider`, `networkData`, `gasPriceMultiplier?`)

**BaseClient constructor**

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `signerOrProvider` | `Signer` \| `Provider` | The Signer or Provider object to interact with the Ethereum network |
| `networkData` | `NetworkData` | The network information required to connect to the contracts |
| `gasPriceMultiplier?` | `number` | The multiplier to apply to the gas price |

#### Defined in

base.ts:24

## Properties

### gasPriceMultiplier

• `Protected` `Optional` **gasPriceMultiplier**: `number`

#### Defined in

base.ts:14

___

### networkData

• **networkData**: `NetworkData`

#### Defined in

base.ts:15

___

### signerOrProvider

• `Protected` **signerOrProvider**: `Signer` \| `Provider`

#### Defined in

base.ts:13

## Methods

### gasPriceOptions

▸ `Protected` **gasPriceOptions**(): `Promise`<`Partial`<`Overrides`\>\>

Adjust the gas price, and return as an option to be passed to a transaction

#### Returns

`Promise`<`Partial`<`Overrides`\>\>

Returns the gas price options

#### Defined in

base.ts:39
12 changes: 6 additions & 6 deletions docs/sdk/typescript/classes/encryption.Encryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Constructor for the Encryption class.

#### Defined in

[encryption.ts:53](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L53)
[encryption.ts:53](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L53)

## Properties

Expand All @@ -87,7 +87,7 @@ Constructor for the Encryption class.

#### Defined in

[encryption.ts:46](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L46)
[encryption.ts:46](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L46)

## Methods

Expand Down Expand Up @@ -136,7 +136,7 @@ const resultMessage = await encription.decrypt('message');

#### Defined in

[encryption.ts:180](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L180)
[encryption.ts:180](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L180)

___

Expand Down Expand Up @@ -172,7 +172,7 @@ const resultMessage = await encription.sign('message');

#### Defined in

[encryption.ts:217](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L217)
[encryption.ts:217](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L217)

___

Expand Down Expand Up @@ -234,7 +234,7 @@ const resultMessage = await encription.signAndEncrypt('message', publicKeys);

#### Defined in

[encryption.ts:129](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L129)
[encryption.ts:129](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L129)

___

Expand All @@ -259,4 +259,4 @@ Builds an Encryption instance by decrypting the private key from an encrypted pr

#### Defined in

[encryption.ts:64](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L64)
[encryption.ts:64](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L64)
8 changes: 4 additions & 4 deletions docs/sdk/typescript/classes/encryption.EncryptionUtils.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const result = await EncriptionUtils.encrypt('message', publicKeys);

#### Defined in

[encryption.ts:422](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L422)
[encryption.ts:422](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L422)

___

Expand Down Expand Up @@ -152,7 +152,7 @@ const result = await EncriptionUtils.generateKeyPair(name, email, passphrase);

#### Defined in

[encryption.ts:360](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L360)
[encryption.ts:360](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L360)

___

Expand Down Expand Up @@ -184,7 +184,7 @@ const signedData = await EncriptionUtils.getSignedData('message');

#### Defined in

[encryption.ts:317](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L317)
[encryption.ts:317](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L317)

___

Expand Down Expand Up @@ -229,4 +229,4 @@ const result = await EncriptionUtils.verify('message', publicKey);

#### Defined in

[encryption.ts:284](https://github.com/humanprotocol/human-protocol/blob/930bec07/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L284)
[encryption.ts:284](https://github.com/humanprotocol/human-protocol/blob/b4448a8b/packages/sdk/typescript/human-protocol-sdk/src/encryption.ts#L284)
Loading
Loading