Skip to content

Commit

Permalink
Rename getDepositStatus to getDepositState
Browse files Browse the repository at this point in the history
The new function getDepositStatus is changed to getDepositState to match the smart contract nomenclature.
The documentation is also updated.
  • Loading branch information
JSanchezFDZ committed Sep 5, 2024
1 parent 08653f8 commit 9e5ac4e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ for reference.
- [extraDataEncoder](EthereumL1BitcoinDepositor.md#extradataencoder)
- [getAddress](EthereumL1BitcoinDepositor.md#getaddress)
- [getChainIdentifier](EthereumL1BitcoinDepositor.md#getchainidentifier)
- [getDepositStatus](EthereumL1BitcoinDepositor.md#getdepositstatus)
- [getDepositState](EthereumL1BitcoinDepositor.md#getDepositState)
- [getEvents](EthereumL1BitcoinDepositor.md#getevents)
- [initializeDeposit](EthereumL1BitcoinDepositor.md#initializedeposit)

Expand Down Expand Up @@ -189,9 +189,9 @@ ___

___

### getDepositStatus
### getDepositState

**getDepositStatus**(`depositId`): `Promise`\<[`DepositState`](../enums/DepositState.md)\>
**getDepositState**(`depositId`): `Promise`\<[`DepositState`](../enums/DepositState.md)\>

#### Parameters

Expand All @@ -207,7 +207,7 @@ ___

#### Implementation of

[L1BitcoinDepositor](../interfaces/L1BitcoinDepositor.md).[getDepositStatus](../interfaces/L1BitcoinDepositor.md#getdepositstatus)
[L1BitcoinDepositor](../interfaces/L1BitcoinDepositor.md).[getDepositState](../interfaces/L1BitcoinDepositor.md#getDepositState)

#### Defined in

Expand Down
12 changes: 6 additions & 6 deletions typescript/api-reference/interfaces/L1BitcoinDepositor.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ specific to the given L2 chain, deployed on the L1 chain.

- [extraDataEncoder](L1BitcoinDepositor.md#extradataencoder)
- [getChainIdentifier](L1BitcoinDepositor.md#getchainidentifier)
- [getDepositStatus](L1BitcoinDepositor.md#getdepositstatus)
- [getDepositState](L1BitcoinDepositor.md#getDepositState)
- [initializeDeposit](L1BitcoinDepositor.md#initializedeposit)

## Methods
Expand Down Expand Up @@ -51,23 +51,23 @@ Gets the chain-specific identifier of this contract.

___

### getDepositStatus
### getDepositState

**getDepositStatus**(`depositId`): `Promise`\<[`DepositState`](../enums/DepositState.md)\>
**getDepositState**(`depositId`): `Promise`\<[`DepositState`](../enums/DepositState.md)\>

Gets the deposit status for the given deposit identifier.
Gets the deposit state for the given deposit identifier.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `depositId` | `string` | Identifier of the deposit to get the status for. |
| `depositId` | `string` | Identifier of the deposit to get the state for. |

#### Returns

`Promise`\<[`DepositState`](../enums/DepositState.md)\>

The status of the deposit.
The state of the deposit.

#### Defined in

Expand Down
8 changes: 4 additions & 4 deletions typescript/src/lib/contracts/cross-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,11 @@ export enum DepositState {
*/
export interface L1BitcoinDepositor {
/**
* Gets the deposit status for the given deposit identifier.
* @param depositId Identifier of the deposit to get the status for.
* @returns The status of the deposit.
* Gets the deposit state for the given deposit identifier.
* @param depositId Identifier of the deposit to get the state for.
* @returns The state of the deposit.
*/
getDepositStatus(depositId: string): Promise<DepositState>
getDepositState(depositId: string): Promise<DepositState>

/**
* Gets the chain-specific identifier of this contract.
Expand Down
4 changes: 2 additions & 2 deletions typescript/src/lib/ethereum/l1-bitcoin-depositor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ export class EthereumL1BitcoinDepositor

// eslint-disable-next-line valid-jsdoc
/**
* @see {L1BitcoinDepositor#getDepositStatus}
* @see {L1BitcoinDepositor#getDepositState}
*/
getDepositStatus(depositId: string): Promise<DepositState> {
getDepositState(depositId: string): Promise<DepositState> {
return this._instance.deposits(depositId)
}

Expand Down
2 changes: 1 addition & 1 deletion typescript/test/utils/mock-cross-chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class MockL1BitcoinDepositor implements L1BitcoinDepositor {
this.#encoder = encoder
}

getDepositStatus(depositId: string): Promise<DepositState> {
getDepositState(depositId: string): Promise<DepositState> {
throw new Error("Not supported")
}

Expand Down

0 comments on commit 9e5ac4e

Please sign in to comment.