Skip to content

Commit

Permalink
Fix error with docs build and add CarrotStaker to main client
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Feb 18, 2025
1 parent 55aeede commit f53ce5c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
1 change: 0 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ <h2>Example Script</h2>
PufferClientHelpers,
Chain,
Token,
PufToken,
} from '../dist/main.js';

const depositInput = document.querySelector('#depositInput');
Expand Down
8 changes: 8 additions & 0 deletions lib/api/puffer-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import { NucleusTellerHandler } from '../contracts/handlers/nucleus-teller-handl
import { NucleusAccountantHandler } from '../contracts/handlers/nucleus-accountant-handler';
import { NucleusAtomicQueueHandler } from '../contracts/handlers/nucleus-atomic-queue-handler';
import { MtwCarrotHandler } from '../contracts/handlers/mtw-carrot-handler';
import { CarrotStakingHandler } from '../contracts/handlers/carrot-staking-handler';

/**
* The core class and the main entry point of the Puffer SDK.
Expand Down Expand Up @@ -54,6 +55,8 @@ export class PufferClient {
public nucleusAtomicQueue: NucleusAtomicQueueHandler;
/** Handler for the `mtwCARROT` (Merkl Token Wrapper) contract. */
public mtwCarrot: MtwCarrotHandler;
/** Handler for the `CarrotStaker` contract. */
public carrotStaker: CarrotStakingHandler;

/**
* Create the Puffer Client.
Expand Down Expand Up @@ -150,6 +153,11 @@ export class PufferClient {
this.walletClient,
this.publicClient,
);
this.carrotStaker = new CarrotStakingHandler(
chain,
this.walletClient,
this.publicClient,
);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import {
setupTestPublicClient,
} from '../../../test/setup-test-clients';
import { mockAccount, testingUtils } from '../../../test/setup-tests';
import { CarrotStakerHandler } from './carrot-staker-handler';
import { CarrotStakingHandler } from './carrot-staking-handler';
import { CarrotStaker } from '../abis/mainnet/CarrotStaker';

describe('CarrotStakerHandler', () => {
describe('CarrotStakingHandler', () => {
const contractTestingUtils = testingUtils.generateContractUtils(CarrotStaker);
let handler: CarrotStakerHandler;
let handler: CarrotStakingHandler;
let walletClient: WalletClient;
let publicClient: PublicClient;

beforeEach(() => {
walletClient = setupTestWalletClient();
publicClient = setupTestPublicClient();

handler = new CarrotStakerHandler(
handler = new CarrotStakingHandler(
Chain.Holesky,
walletClient,
publicClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { CarrotStaker } from '../abis/mainnet/CarrotStaker';
/**
* Handler for the `CarrotStaker` contract.
*/
export class CarrotStakerHandler {
export class CarrotStakingHandler {
private viemChain: ViemChain;

/**
Expand Down

0 comments on commit f53ce5c

Please sign in to comment.