From 39340937ae31056b8c2916027e171b355c2065cc Mon Sep 17 00:00:00 2001 From: Fawad Ali Date: Fri, 12 Jul 2024 14:13:32 +0200 Subject: [PATCH] Rename CHAIN_ADDRESSES to CONTRACT_ADDRESSES as it's more descriptive --- lib/contracts/addresses.ts | 2 +- lib/contracts/handlers/puf-locker-handler.ts | 6 +++--- lib/contracts/handlers/puffer-depositor-handler.ts | 8 ++++---- lib/contracts/handlers/puffer-l2-depositor-handler.ts | 6 +++--- lib/contracts/handlers/puffer-vault-handler.ts | 4 ++-- lib/contracts/tokens.ts | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/lib/contracts/addresses.ts b/lib/contracts/addresses.ts index 6ce77de..d167785 100644 --- a/lib/contracts/addresses.ts +++ b/lib/contracts/addresses.ts @@ -2,7 +2,7 @@ import { Chain } from '../chains/constants'; // Source of truth: // https://github.com/PufferFinance/Deployments-and-ACL/tree/main/docs/deployments -export const CHAIN_ADDRESSES = { +export const CONTRACT_ADDRESSES = { [Chain.Mainnet]: { PufferVault: '0xD9A442856C234a39a81a089C06451EBAa4306a72', PufferDepositor: '0x4aa799c5dfc01ee7d790e3bf1a7c2257ce1dceff', diff --git a/lib/contracts/handlers/puf-locker-handler.ts b/lib/contracts/handlers/puf-locker-handler.ts index 3821429..b224fce 100644 --- a/lib/contracts/handlers/puf-locker-handler.ts +++ b/lib/contracts/handlers/puf-locker-handler.ts @@ -1,7 +1,7 @@ import { WalletClient, PublicClient, getContract, Address, padHex } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants'; import { PUF_LOCKER_ABIS } from '../abis/puf-locker-abis'; -import { CHAIN_ADDRESSES } from '../addresses'; +import { CONTRACT_ADDRESSES } from '../addresses'; import { PufToken, TOKENS_ADDRESSES } from '../tokens'; import { ERC20PermitHandler } from './erc20-permit-handler'; @@ -44,7 +44,7 @@ export class PufLockerHandler { */ public getContract() { return getContract({ - address: CHAIN_ADDRESSES[this.chain].PufLocker as Address, + address: CONTRACT_ADDRESSES[this.chain].PufLocker as Address, abi: PUF_LOCKER_ABIS[this.chain].PufLocker, client: { wallet: this.walletClient, @@ -174,7 +174,7 @@ export class PufLockerHandler { .withToken(pufToken) .getPermitSignature( walletAddress, - CHAIN_ADDRESSES[this.chain].PufLocker as Address, + CONTRACT_ADDRESSES[this.chain].PufLocker as Address, value, ); /* istanbul ignore next */ diff --git a/lib/contracts/handlers/puffer-depositor-handler.ts b/lib/contracts/handlers/puffer-depositor-handler.ts index d35a60b..ca53a95 100644 --- a/lib/contracts/handlers/puffer-depositor-handler.ts +++ b/lib/contracts/handlers/puffer-depositor-handler.ts @@ -1,7 +1,7 @@ import { Address, PublicClient, WalletClient, getContract } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants'; import { PUFFER_DEPOSITOR_ABIS } from '../abis/puffer-depositor-abis'; -import { CHAIN_ADDRESSES } from '../addresses'; +import { CONTRACT_ADDRESSES } from '../addresses'; import { ERC20PermitHandler } from './erc20-permit-handler'; import { Token } from '../tokens'; @@ -44,7 +44,7 @@ export class PufferDepositorHandler { */ public getContract() { return getContract({ - address: CHAIN_ADDRESSES[this.chain].PufferDepositor as Address, + address: CONTRACT_ADDRESSES[this.chain].PufferDepositor as Address, abi: PUFFER_DEPOSITOR_ABIS[this.chain].PufferDepositor, client: { wallet: this.walletClient, @@ -71,7 +71,7 @@ export class PufferDepositorHandler { .withToken(Token.stETH) .getPermitSignature( walletAddress, - CHAIN_ADDRESSES[this.chain].PufferDepositor as Address, + CONTRACT_ADDRESSES[this.chain].PufferDepositor as Address, value, ); /* istanbul ignore next */ @@ -115,7 +115,7 @@ export class PufferDepositorHandler { .withToken(Token.wstETH) .getPermitSignature( walletAddress, - CHAIN_ADDRESSES[this.chain].PufferDepositor as Address, + CONTRACT_ADDRESSES[this.chain].PufferDepositor as Address, value, ); /* istanbul ignore next */ diff --git a/lib/contracts/handlers/puffer-l2-depositor-handler.ts b/lib/contracts/handlers/puffer-l2-depositor-handler.ts index 7faf65d..37df201 100644 --- a/lib/contracts/handlers/puffer-l2-depositor-handler.ts +++ b/lib/contracts/handlers/puffer-l2-depositor-handler.ts @@ -1,7 +1,7 @@ import { WalletClient, PublicClient, getContract, Address, padHex } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants'; import { PUFFER_L2_DEPOSITOR_ABIS } from '../abis/puffer-depositor-abis'; -import { CHAIN_ADDRESSES } from '../addresses'; +import { CONTRACT_ADDRESSES } from '../addresses'; import { TOKENS_ADDRESSES, Token } from '../tokens'; import { ERC20PermitHandler } from './erc20-permit-handler'; @@ -44,7 +44,7 @@ export class PufferL2DepositorHandler { */ public getContract() { return getContract({ - address: CHAIN_ADDRESSES[this.chain].PufferL2Depositor as Address, + address: CONTRACT_ADDRESSES[this.chain].PufferL2Depositor as Address, abi: PUFFER_L2_DEPOSITOR_ABIS[this.chain].PufferL2Depositor, client: { wallet: this.walletClient, @@ -130,7 +130,7 @@ export class PufferL2DepositorHandler { .withToken(token) .getPermitSignature( walletAddress, - CHAIN_ADDRESSES[this.chain].PufferL2Depositor as Address, + CONTRACT_ADDRESSES[this.chain].PufferL2Depositor as Address, value, ); /* istanbul ignore next */ diff --git a/lib/contracts/handlers/puffer-vault-handler.ts b/lib/contracts/handlers/puffer-vault-handler.ts index 08cd2f5..9bd47eb 100644 --- a/lib/contracts/handlers/puffer-vault-handler.ts +++ b/lib/contracts/handlers/puffer-vault-handler.ts @@ -1,6 +1,6 @@ import { Address, PublicClient, WalletClient, getContract } from 'viem'; import { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants'; -import { CHAIN_ADDRESSES } from '../addresses'; +import { CONTRACT_ADDRESSES } from '../addresses'; import { PUFFER_VAULT_ABIS } from '../abis/puffer-vault-abis'; /** @@ -36,7 +36,7 @@ export class PufferVaultHandler { */ public getContract() { return getContract({ - address: CHAIN_ADDRESSES[this.chain].PufferVault as Address, + address: CONTRACT_ADDRESSES[this.chain].PufferVault as Address, abi: PUFFER_VAULT_ABIS[this.chain].PufferVaultV2, client: { wallet: this.walletClient, diff --git a/lib/contracts/tokens.ts b/lib/contracts/tokens.ts index 24c1700..c67f830 100644 --- a/lib/contracts/tokens.ts +++ b/lib/contracts/tokens.ts @@ -6,7 +6,7 @@ export enum Token { USDC = 'USDC', DAI = 'DAI', ETH = 'ETH', - WETH = 'wETH', + WETH = 'WETH', stETH = 'stETH', wstETH = 'wstETH', pufETH = 'pufETH',