Skip to content
Open
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
38 changes: 38 additions & 0 deletions scripts/aniketh-vest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import hre from "hardhat";

const ZERO_ADDRESS = "0x78354f8dccb269a615a7e0a24f9b0718fdc3c7a7";
const OLD_ADDRESS = "0xf05849a1140bf8cdcd929c8709da463b630ae56a"; // aniketh old address
const NEW_ADDRESS = "0xFc2A07c3c71B993a623BD33a9fCd6f5f8C3ba3da"; // aniketh new address

async function main() {
if (!ZERO_ADDRESS.length) {
throw new Error("Invalid Vest Address");
}
const [deployer] = await hre.ethers.getSigners();
console.log("I am", deployer.address);

const zero = await hre.ethers.getContractAt("ZeroLend", ZERO_ADDRESS);

//balance of old address
const balance = await zero.balanceOf(OLD_ADDRESS);
console.log("Balance: ", balance.toString());

// msg.sender should be an approved spender
const txBurn = await zero.burnFrom(OLD_ADDRESS, balance);
console.log("zero token minted for: ", txBurn.hash);
await txBurn.wait();

// mint to new address with same balance
const tx = await zero.mint(
balance,
NEW_ADDRESS,
);

console.log("zero token minted for: ", tx.hash);
await tx.wait();
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
47 changes: 47 additions & 0 deletions scripts/gafoor-vest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import hre from "hardhat";
import { parseEther } from "ethers";

const VESTED_ZERO_NFT_ADDRESS = "0x9FA72ea96591e486FF065E7C8A89282dEDfA6C12";
const GAFOOR_ADDRESS = "0xe5CECC31e72F4ecCd717a17b4E62Cb6b4C5125df";

async function main() {
if (!VESTED_ZERO_NFT_ADDRESS.length) {
throw new Error("Invalid Vest Address");
}
const [deployer] = await hre.ethers.getSigners();
console.log("I am", deployer.address);

const vest = await hre.ethers.getContractAt(
"VestedZeroNFT",
VESTED_ZERO_NFT_ADDRESS
);

const allocation = parseEther("233333333");
const upfront = 0;
const cliffDuration = Math.floor(Date.now() / 1000); // Current timestamp
const unlockDate = Math.floor(Date.now() / 1000); // Current timestamp
const linearDuration = Math.floor(new Date("2025-05-06").getTime() / 1000) - unlockDate; // Duration until May 06, 2025
const hasPenalty = false;
const category = 2; // NORMAL category

console.log("Minting NFT for Gafoor's allocation...");

const tx = await vest.mint(
GAFOOR_ADDRESS,
allocation,
upfront,
linearDuration,
cliffDuration,
unlockDate,
hasPenalty,
category
);

await tx.wait();
console.log("Vest minted for: ", tx.hash);
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
53 changes: 53 additions & 0 deletions scripts/harish-vest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import hre from "hardhat";
import { parseEther } from "ethers";

const VESTED_ZERO_NFT_ADDRESS = "0x9FA72ea96591e486FF065E7C8A89282dEDfA6C12";
const HARISH_ADDRESS = "0xe5CECC31e72F4ecCd717a17b4E62Cb6b4C5125df";
const HARISH_TOKEN_ID = 209


async function main() {
if (!VESTED_ZERO_NFT_ADDRESS.length) {
throw new Error("Invalid Vest Address");
}
const [deployer] = await hre.ethers.getSigners();
console.log("I am", deployer.address);

const vest = await hre.ethers.getContractAt(
"VestedZeroNFT",
VESTED_ZERO_NFT_ADDRESS
);

// Since Current allo: 100M. Actual allo: 120M.
const amount = parseEther("20000000");

const detail = await vest.tokenIdToLockDetails(HARISH_TOKEN_ID);
const personDetails = {
who: HARISH_ADDRESS,
pending: amount,
upfront: 0,
linearDuration: detail.linearDuration,
cliffDuration: detail.cliffDuration,
unlockDate: detail.unlockDate,
hasPenalty: detail.hasPenalty,
category: detail.category,
}
const tx = await vest.mint(
personDetails.who,
personDetails.pending,
personDetails.upfront,
personDetails.linearDuration,
personDetails.cliffDuration,
personDetails.unlockDate,
personDetails.hasPenalty,
personDetails.category
);

console.log("Vest minted for: ", tx.hash);
await tx.wait();
}

main().catch((error) => {
console.error(error);
process.exitCode = 1;
});
Loading