Skip to content

Commit

Permalink
upd tests paths
Browse files Browse the repository at this point in the history
  • Loading branch information
olegkron committed Dec 1, 2024
1 parent f9661e2 commit 2edc4be
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion test/hardhat/DexSwap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe("swap", () => {
it("should swap", async () => {
try {
const { abi: ConceroOrchestratorAbi } = await import(
"../artifacts/contracts/InfraOrchestrator.sol/InfraOrchestrator.json"
"../../artifacts/contracts/InfraOrchestrator.sol/InfraOrchestrator.json"
);

await approveToken(publicClient, walletClient, srcTokenAddress, srcTokenAmount);
Expand Down
4 changes: 2 additions & 2 deletions test/hardhat/testnet/ParentPoolStartAndCompleteDeposit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { getFallbackClients } from "../../../utils";
import { conceroNetworks } from "../../../constants";

const usdcAmount = parseUnits("10", 6);
const usdcTokenAddress = process.env.USDC_BASE_SEPOLIA as Address;
const poolAddress = process.env.PARENT_POOL_PROXY_BASE_SEPOLIA as Address;
const usdcTokenAddress = process.env.USDC_BASE_SEPOLIA;
const poolAddress = process.env.PARENT_POOL_PROXY_BASE_SEPOLIA;

describe("start deposit usdc to parent pool\n", async () => {
const { abi: ParentPoolAbi } = await import("../../../artifacts/contracts/ParentPool.sol/ParentPool.json");
Expand Down
14 changes: 4 additions & 10 deletions test/hardhat/utils/approve.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
import { Address, erc20Abi } from "viem";
import { WalletClient } from "viem/clients/createWalletClient";
import { PublicClient } from "viem/clients/createPublicClient";
import { HttpTransport } from "viem/clients/transports/http";
import { Chain } from "viem/types/chain";
import type { Account } from "viem/accounts/types";
import { RpcSchema } from "viem/types/eip1193";
import { Address, erc20Abi, WalletClient, PublicClient, HttpTransport, Chain, Account, RpcSchema } from "viem";

export async function approve(
erc20TokenAddress: Address | string,
contractAddress: Address | string,
erc20TokenAddress: Address,
contractAddress: Address,
amount: BigInt,
walletClient: WalletClient,
publicClient: PublicClient<HttpTransport, Chain, Account, RpcSchema>,
Expand All @@ -28,7 +22,7 @@ export async function approve(
const tokenHash = await walletClient.writeContract({
abi: erc20Abi,
functionName: "approve",
address: erc20TokenAddress as `0x${string}`,
address: erc20TokenAddress,
args: [contractAddress, amount],
});

Expand Down

0 comments on commit 2edc4be

Please sign in to comment.