Skip to content

Commit

Permalink
Ethereum: generate docs & fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
welldan97 committed Jul 26, 2024
1 parent f297962 commit b1ac024
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 17 deletions.
11 changes: 7 additions & 4 deletions book/docs/classes/ethereum_src.EthereumStaker.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Builds a staking transaction.
| `params` | `Object` | Parameters for building the transaction |
| `params.delegatorAddress` | \`0x$\{string}\` | The delegator (wallet) address to stake from |
| `params.validatorAddress` | \`0x$\{string}\` | The validator (vault) address to stake with |
| `params.amount` | `string` | The amount to stake, specified in `ETH` |
| `params.amount` | `string` | The amount to stake, specified in `ETH`. E.g. "1" - 1 ETH |
| `params.referrer?` | \`0x$\{string}\` | (Optional) The address of the referrer. This is used to track the origin of transactions, providing insights into which sources or campaigns are driving activity. This can be useful for analytics and optimizing user acquisition strategies |

### Returns
Expand Down Expand Up @@ -136,7 +136,7 @@ method.
| `params` | `Object` | Parameters for building the transaction |
| `params.delegatorAddress` | \`0x$\{string}\` | The delegator (wallet) address that is unstaking |
| `params.validatorAddress` | \`0x$\{string}\` | The validator (vault) address to unstake from |
| `params.amount` | `string` | The amount to unstake, specified in `ETH` |
| `params.amount` | `string` | The amount to unstake, specified in `ETH`. E.g. "1" - 1 ETH |

### Returns

Expand Down Expand Up @@ -186,7 +186,7 @@ Builds a mint transaction.
| `params` | `Object` | Parameters for building the transaction |
| `params.delegatorAddress` | \`0x$\{string}\` | The delegator (wallet) address |
| `params.validatorAddress` | \`0x$\{string}\` | The validator (vault) address to mint shares for |
| `params.amount` | `string` | The amount to mint, specified in `osETH` |
| `params.amount` | `string` | The amount to mint, specified in `osETH`. E.g. "1" - 1 osETH |
| `params.referrer?` | \`0x$\{string}\` | (Optional) The address of the referrer. This is used to track the origin of transactions, providing insights into which sources or campaigns are driving activity. This can be useful for analytics and optimizing user acquisition strategies. |

### Returns
Expand All @@ -210,7 +210,7 @@ Builds a burn transaction.
| `params` | `Object` | Parameters for building the transaction |
| `params.delegatorAddress` | \`0x$\{string}\` | The delegator (wallet) address |
| `params.validatorAddress` | \`0x$\{string}\` | The validator (vault) address to burn shares from |
| `params.amount` | `string` | The amount to burn, specified in `osETH` |
| `params.amount` | `string` | The amount to burn, specified in `osETH`. E.g. "1" - 1 osETH |

### Returns

Expand Down Expand Up @@ -415,6 +415,9 @@ Signs a transaction using the provided signer.
| `params.signer` | `Signer` | A signer instance. |
| `params.signerAddress` | \`0x$\{string}\` | The address of the signer |
| `params.tx` | [`Transaction`](../interfaces/ethereum_src.Transaction.md) | The transaction to sign |
| `params.fees?` | `Object` | (Optional) The fees to include in the transaction |
| `params.fees.baseFeeMultiplier?` | `number` | - |
| `params.fees.defaultPriorityFee?` | `string` | - |

### Returns

Expand Down
9 changes: 0 additions & 9 deletions book/docs/interfaces/ethereum_src.Transaction.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,12 @@ Represents an Ethereum transaction.

### Properties

- [account](ethereum_src.Transaction.md#account)
- [to](ethereum_src.Transaction.md#to)
- [value](ethereum_src.Transaction.md#value)
- [data](ethereum_src.Transaction.md#data)

## Properties

### account

**account**: \`0x$\{string}\`

The account (sender) address in hexadecimal format.

___

### to

**to**: \`0x$\{string}\`
Expand Down
2 changes: 1 addition & 1 deletion packages/ethereum/src/lib/methods/buildStakeTx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { keeperABI } from '../contracts/keeperAbi'
import { getHarvestParams } from '../utils/getHarvestParams'
import { Transaction } from '../types/transaction'

export async function buildStakeTx(request: {
export async function buildStakeTx (request: {
connector: StakewiseConnector
userAccount: Hex
vault: Hex
Expand Down
3 changes: 0 additions & 3 deletions packages/ethereum/src/staker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ export class EthereumStaker {
validatorAddress: Hex
amount: string // ETH assets
}): Promise<{ tx: Transaction }> {
this.validateAmount(params.amount)
const tx = await buildUnstakeTx({
connector: this.connector,
userAccount: params.delegatorAddress,
Expand Down Expand Up @@ -181,7 +180,6 @@ export class EthereumStaker {
amount: string // osETH shares
referrer?: Hex
}): Promise<{ tx: Transaction }> {
this.validateAmount(params.amount)
const tx = await buildMintTx({
connector: this.connector,
userAccount: params.delegatorAddress,
Expand All @@ -208,7 +206,6 @@ export class EthereumStaker {
validatorAddress: Hex
amount: string // osETH shares
}): Promise<{ tx: Transaction }> {
this.validateAmount(params.amount)
const tx = await buildBurnTx({
connector: this.connector,
userAccount: params.delegatorAddress,
Expand Down

0 comments on commit b1ac024

Please sign in to comment.