Skip to content

Commit

Permalink
Rename CHAIN_ADDRESSES to CONTRACT_ADDRESSES as it's more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
9inpachi committed Jul 12, 2024
1 parent c66328c commit 3934093
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion lib/contracts/addresses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
6 changes: 3 additions & 3 deletions lib/contracts/handlers/puf-locker-handler.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 */
Expand Down
8 changes: 4 additions & 4 deletions lib/contracts/handlers/puffer-depositor-handler.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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,
Expand All @@ -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 */
Expand Down Expand Up @@ -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 */
Expand Down
6 changes: 3 additions & 3 deletions lib/contracts/handlers/puffer-l2-depositor-handler.ts
Original file line number Diff line number Diff line change
@@ -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';

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 */
Expand Down
4 changes: 2 additions & 2 deletions lib/contracts/handlers/puffer-vault-handler.ts
Original file line number Diff line number Diff line change
@@ -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';

/**
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion lib/contracts/tokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export enum Token {
USDC = 'USDC',
DAI = 'DAI',
ETH = 'ETH',
WETH = 'wETH',
WETH = 'WETH',
stETH = 'stETH',
wstETH = 'wstETH',
pufETH = 'pufETH',
Expand Down

0 comments on commit 3934093

Please sign in to comment.