Skip to content

Commit

Permalink
fix typying issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mmaurello committed Jan 4, 2024
1 parent af364b9 commit a7a551c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
9 changes: 2 additions & 7 deletions packages/sdk/src/contract/contracts/Erc20/Erc20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Contract } from 'ethers';
import {
GetContractReturnType,
PublicClient,
WalletClient,
createPublicClient,
getContract,
http,
Expand All @@ -13,11 +12,7 @@ import { BalanceContractInterface } from '../../contract.interfaces';
import { isEthersContract, isEthersSigner } from '../../contract.utils';
import abi from './Erc20ABI.json';

type Erc20Contract = GetContractReturnType<
typeof abi,
PublicClient,
WalletClient
>;
type Erc20Contract = GetContractReturnType<typeof abi, PublicClient>;

export class Erc20 implements BalanceContractInterface {
readonly address: string;
Expand All @@ -30,8 +25,8 @@ export class Erc20 implements BalanceContractInterface {
if (!config.address) {
throw new Error('Contract address is required');
}

this.address = config.address;

this.#config = config;
this.#contract = isEthersSigner(signer)
? new Contract(this.address, abi, signer)
Expand Down
7 changes: 1 addition & 6 deletions packages/sdk/src/contract/contracts/Xtokens/Xtokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Contract } from 'ethers';
import {
GetContractReturnType,
PublicClient,
WalletClient,
WriteContractReturnType,
createPublicClient,
getContract,
Expand All @@ -15,11 +14,7 @@ import { TransferContractInterface } from '../../contract.interfaces';
import { isEthersContract, isEthersSigner } from '../../contract.utils';
import abi from './XtokensABI.json';

type XtokensContract = GetContractReturnType<
typeof abi,
PublicClient,
WalletClient
>;
type XtokensContract = GetContractReturnType<typeof abi, PublicClient>;

export class Xtokens implements TransferContractInterface {
readonly address = '0x0000000000000000000000000000000000000804';
Expand Down

0 comments on commit a7a551c

Please sign in to comment.