Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3s4 contract and tests with deployment #53

Merged
merged 8 commits into from
Apr 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
494 changes: 494 additions & 0 deletions contracts/HoprStakeSeason3.sol

Large diffs are not rendered by default.

500 changes: 500 additions & 0 deletions contracts/HoprStakeSeason4.sol

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions deploy/002_xHOPR-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
log: true,
});
};
main.tags = ['xHOPR'];
main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
3 changes: 3 additions & 0 deletions deploy/003_wxHOPR-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
log: true,
});
};
main.tags = ['wxHOPR'];
main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
4 changes: 4 additions & 0 deletions deploy/004_HOPRBoost-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deploy } = deployments;
const { deployer, admin } = await getNamedAccounts();

console.log(`hoprbost ${admin}`)
await deploy("HoprBoost", {
from: deployer,
args: [admin, ""],
log: true,
});
};
main.tags = ['HoprBoost'];
main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
17 changes: 5 additions & 12 deletions deploy/005_HOPRStake-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,21 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;

const { deploy } = deployments;
const { deployer, admin, alice } = await getNamedAccounts();
const { deployer, admin } = await getNamedAccounts();

const HoprBoost = await deployments.get("HoprBoost");
const xHOPR = await deployments.get("xHOPR");
const wxHOPR = await deployments.get("wxHOPR");

// We verify the address we will be passing to our contract
console.table([
['From Deployments', 'Addresses'],
['wxHOPR', wxHOPR.address],
['xHOPR', xHOPR.address],
['HoprBoost', HoprBoost.address],
['Deployer', deployer],
['Admin', admin],
['Alice', alice]
])

await deploy("HoprStake", {
from: deployer,
args: [HoprBoost.address, admin, xHOPR.address, wxHOPR.address],
log: true,
});
};

main.tags = ['HoprStake'];
main.dependencies = ['xHOPR', 'wxHOPR', 'HoprBoost'];
main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
16 changes: 4 additions & 12 deletions deploy/006_HOPRStake2-contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,20 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;

const { deploy } = deployments;
const { deployer, admin, alice } = await getNamedAccounts();
const { deployer, admin } = await getNamedAccounts();

const HoprBoost = await deployments.get("HoprBoost");
const xHOPR = await deployments.get("xHOPR");
const wxHOPR = await deployments.get("wxHOPR");

// We verify the address we will be passing to our contract
console.table([
['From Deployments', 'Addresses'],
['wxHOPR', wxHOPR.address],
['xHOPR', xHOPR.address],
['HoprBoost', HoprBoost.address],
['Deployer', deployer],
['Admin', admin],
['Alice', alice]
])

await deploy("HoprStake2", {
from: deployer,
args: [HoprBoost.address, admin, xHOPR.address, wxHOPR.address],
log: true,
});
};
main.tags = ['HoprStake2'];
main.dependencies = ['xHOPR', 'wxHOPR', 'HoprBoost'];
main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
26 changes: 26 additions & 0 deletions deploy/007_HOPRStakeS3-contract.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";


const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;

const { deploy } = deployments;
const { deployer, admin } = await getNamedAccounts();

const HoprBoost = await deployments.get("HoprBoost");
const xHOPR = await deployments.get("xHOPR");
const wxHOPR = await deployments.get("wxHOPR");

await deploy("HoprStakeSeason3", {
from: deployer,
args: [HoprBoost.address, admin, xHOPR.address, wxHOPR.address],
log: true,
});
};

main.tags = ['HoprStakeSeason3'];
main.dependencies = ['xHOPR', 'wxHOPR', 'HoprBoost'];
// main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production || !!env.network.tags.staging

export default main;
25 changes: 25 additions & 0 deletions deploy/008_HOPRStakeS4-contract.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";


const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;

const { deploy } = deployments;
const { deployer, admin } = await getNamedAccounts();

const HoprBoost = await deployments.get("HoprBoost");
const xHOPR = await deployments.get("xHOPR");
const wxHOPR = await deployments.get("wxHOPR");

await deploy("HoprStakeSeason4", {
from: deployer,
args: [HoprBoost.address, admin, xHOPR.address, wxHOPR.address],
log: true,
});
};

main.tags = ['HoprStakeSeason4'];
main.dependencies = ['xHOPR', 'wxHOPR', 'HoprBoost'];
// main.skip = async (env: HardhatRuntimeEnvironment) => !!env.network.tags.production
export default main;
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,18 @@ const main: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const HoprBoost = await deployments.get("HoprBoost");
const HoprStake = await deployments.get("HoprStake");
const HoprStake2 = await deployments.get("HoprStake2");
const HoprStakeSeason3 = await deployments.get("HoprStakeSeason3");
const HoprStakeSeason4 = await deployments.get("HoprStakeSeason4");

console.table([
["xHOPR", xHOPR.address],
["wxHOPR", wxHOPR.address],
["HoprBoost", HoprBoost.address],
["HoprStake", HoprStake.address],
["HoprStake2", HoprStake2.address],
["HoprStakeSeason3", HoprStakeSeason3.address],
["HoprStakeSeason4", HoprStakeSeason4.address],
]);
};
main.runAtTheEnd = true;
export default main;
96 changes: 48 additions & 48 deletions deployments/goerli/HoprBoost.json

Large diffs are not rendered by default.

118 changes: 59 additions & 59 deletions deployments/goerli/HoprStake.json

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions deployments/goerli/HoprStake2.json

Large diffs are not rendered by default.

Loading