Skip to content

Commit a7e0cb5

Browse files
committed
Update guides and code to use PufferClient.vault
1 parent 800450d commit a7e0cb5

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

docs/docs/getting-started.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const [walletAddress] = await pufferClient.requestAddresses();
7878
Mint pufETH to your `walletAddress` or set a target recipient:
7979

8080
```ts
81-
const { transact, estimate } = pufferClient.depositETH(walletAddress);
81+
const { transact, estimate } = pufferClient.vault.depositETH(walletAddress);
8282

8383
// Returns gas estimate of the transaction.
8484
const gasEstimate = await estimate();

docs/docs/guides/depositing-eth.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const [walletAddress] = await pufferClient.requestAddresses();
2929
With your address at hand, make the transaction to deposit ETH to mint pufETH.
3030

3131
```ts
32-
const { transact, estimate } = pufferClient.depositETH(walletAddress);
32+
const { transact, estimate } = pufferClient.vault.depositETH(walletAddress);
3333

3434
const weiAmount = new BigInt(1e18);
3535

@@ -42,7 +42,7 @@ const txHash = await transact(weiAmount);
4242
Alternatively, you can set the pufETH recipient to a different address.
4343

4444
```ts
45-
const { transact, estimate } = pufferClient.depositETH(recipientAddress);
45+
const { transact, estimate } = pufferClient.vault.depositETH(recipientAddress);
4646

4747
const weiAmount = new BigInt(1e18);
4848

lib/api/puffer-client.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe('PufferClient', () => {
3838
walletClient,
3939
publicClient,
4040
);
41-
const { transact, estimate } = pufferClient.depositETH(mockAddress);
41+
const { transact, estimate } = pufferClient.vault.depositETH(mockAddress);
4242

4343
expect(await transact(BigInt(1))).toBe(mockAddress);
4444
expect(await estimate()).toBe(mockGas);

lib/api/puffer-client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import {
66
http,
77
} from 'viem';
88
import { Chain, VIEM_CHAINS } from '../chains/constants';
9-
import { PufferVaultHandler } from '../contracts/puffer-vault-handler';
9+
import { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';
1010

1111
/**
1212
* The core class and the main entry point of the Puffer SDK.

lib/contracts/puffer-vault-handler.ts lib/contracts/handlers/puffer-vault-handler.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
WalletClient,
66
getContract,
77
} from 'viem';
8-
import { CHAIN_ABIS } from './abis/abis';
9-
import { Chain, VIEM_CHAINS } from '../chains/constants';
10-
import { CHAIN_ADDRESSES } from './addresses';
8+
import { CHAIN_ABIS } from '../abis/abis';
9+
import { Chain, VIEM_CHAINS } from '../../chains/constants';
10+
import { CHAIN_ADDRESSES } from '../addresses';
1111

1212
/**
1313
* Handler for the `PufferVaultV2` contract exposing methods to interact

0 commit comments

Comments
 (0)