Skip to content

Commit

Permalink
feat: rename YieldStreamerV2 to YieldStreamer
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsenych-cw committed Nov 18, 2024
1 parent ae3df8b commit 4ed450c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions contracts/YieldStreamerV2.sol → contracts/YieldStreamer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import { YieldStreamerConfiguration } from "./YieldStreamerConfiguration.sol";
import { YieldStreamerInitialization } from "./YieldStreamerInitialization.sol";

/**
* @title YieldStreamerV2 contract
* @title YieldStreamer contract
* @author CloudWalk Inc. (See https://www.cloudwalk.io)
* @dev This contract is the main entry point for the yield streamer v2
* and combines the primary, configuration, and initialization functionalities.
*/
contract YieldStreamerV2 is
contract YieldStreamer is
UUPSExtUpgradeable,
AccessControlExtUpgradeable,
PausableExtUpgradeable,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ pragma solidity 0.8.24;

import { SafeCast } from "@openzeppelin/contracts/utils/math/SafeCast.sol";

import { YieldStreamerV2 } from "./YieldStreamerV2.sol";
import { YieldStreamer } from "../YieldStreamer.sol";

/**
* @title YieldStreamerV2Harness contract
* @title YieldStreamerHarness contract
* @author CloudWalk Inc. (See https://www.cloudwalk.io)
* @dev A test harness contract that extends YieldStreamerV2 for testing purposes.
* @dev A test harness contract that extends YieldStreamer for testing purposes.
* Implements additional functions to manipulate and inspect internal state during testing.
* This contract should not be used in production environments.
*/
contract YieldStreamerV2Harness is YieldStreamerV2 {
contract YieldStreamerHarness is YieldStreamer {
// -------------------- Libraries ----------------------------- //

using SafeCast for uint256;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

pragma solidity 0.8.24;

import { YieldStreamerV2 } from "./YieldStreamerV2.sol";
import { YieldStreamer } from "../YieldStreamer.sol";

/**
* @title YieldStreamerV2Testable contract
* @title YieldStreamerTestable contract
* @author CloudWalk Inc. (See https://www.cloudwalk.io)
* @dev Implements additional functions to test private and internal functions of base contracts.
*/
contract YieldStreamerV2Testable is YieldStreamerV2 {
contract YieldStreamerTestable is YieldStreamer {
// ------------------ Yield calculation ----------------------- //

function getAccruePreview(
Expand Down
10 changes: 5 additions & 5 deletions test/YieldStreamer.schedule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async function setUpFixture<T>(func: () => Promise<T>): Promise<T> {
}
}

describe("YieldStreamerV2 - Deposit/Withdraw Simulation Tests", function () {
describe("YieldStreamer - Deposit/Withdraw Simulation Tests", function () {
let user: SignerWithAddress;
let adjustedBlockTime: number;
const EXPECTED_VERSION: Version = {
Expand All @@ -184,17 +184,17 @@ describe("YieldStreamerV2 - Deposit/Withdraw Simulation Tests", function () {
});

/**
* Deploys the YieldStreamerV2 contract for testing.
* @returns The deployed YieldStreamerV2 contract instance.
* Deploys the YieldStreamer contract for testing.
* @returns The deployed YieldStreamer contract instance.
*/
async function deployContracts(): Promise<{ erc20Token: Contract; yieldStreamer: Contract }> {
const ERC20TokenMock = await ethers.getContractFactory("ERC20TokenMock");
const YieldStreamerV2 = await ethers.getContractFactory("YieldStreamerV2");
const YieldStreamer = await ethers.getContractFactory("YieldStreamer");

const erc20Token = await ERC20TokenMock.deploy("Mock Token", "MTK");
await erc20Token.waitForDeployment();

const yieldStreamer: Contract = await upgrades.deployProxy(YieldStreamerV2, [erc20Token.target]);
const yieldStreamer: Contract = await upgrades.deployProxy(YieldStreamer, [erc20Token.target]);
await yieldStreamer.waitForDeployment();

await erc20Token.setHook(yieldStreamer.target);
Expand Down
4 changes: 2 additions & 2 deletions test/YieldStreamerHarness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function checkEquality<T extends Record<string, unknown>>(actualObject: T, expec
});
}

describe("YieldStreamerV2Harness", function () {
describe("YieldStreamerHarness", function () {
// Errors of the lib contracts
const REVERT_ERROR_IF_CONTRACT_INITIALIZATION_IS_INVALID = "InvalidInitialization";

Expand All @@ -92,7 +92,7 @@ describe("YieldStreamerV2Harness", function () {
[deployer] = await ethers.getSigners();

// Contract factories with the explicitly specified deployer account
yieldStreamerHarnessFactory = await ethers.getContractFactory("YieldStreamerV2Harness");
yieldStreamerHarnessFactory = await ethers.getContractFactory("YieldStreamerHarness");
});

async function deployContracts(): Promise<{ yieldStreamerHarness: Contract; tokenMock: Contract }> {
Expand Down
4 changes: 2 additions & 2 deletions test/YieldStreamerTestable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ interface ClaimPreview {
caps: bigint[];
}

describe("YieldStreamerV2Testable", async () => {
describe("YieldStreamerTestable", async () => {
let yieldStreamerTestableFactory: ContractFactory;

before(async () => {
yieldStreamerTestableFactory = await ethers.getContractFactory("YieldStreamerV2Testable");
yieldStreamerTestableFactory = await ethers.getContractFactory("YieldStreamerTestable");
});

async function deployContracts(): Promise<{ yieldStreamerTestable: Contract; tokenMock: Contract }> {
Expand Down

0 comments on commit 4ed450c

Please sign in to comment.