Skip to content

Commit

Permalink
Merge pull request #87 from eonian-core/feature/founders-tokens
Browse files Browse the repository at this point in the history
Feature/founders tokens
  • Loading branch information
LeoVS09 authored Jul 2, 2023
2 parents c23afa2 + 7e8fac2 commit af17681
Show file tree
Hide file tree
Showing 42 changed files with 12,929 additions and 434 deletions.
241 changes: 143 additions & 98 deletions packages/contracts/.gas-snapshot

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions packages/contracts/deploy/020_USDT_Vault.deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const func = deployOrUpgrade({
"Eonian USDT Vault Shares", // name
"eonUSDT", // symbol
[], // defaultOperators
100, // vault founder tokens fee 1%
],
});

Expand Down
36 changes: 36 additions & 0 deletions packages/contracts/deploy/040_USDT_VaultFounderToken.deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { deployOrUpgrade } from "../hardhat/deploy-or-upgrade";
import { BlockchainType } from "../hardhat.config";

/**
* Deploy Vault Founder Token contract
*/
const func = deployOrUpgrade({
contract: "VaultFounderToken",
chains: [
BlockchainType.Mainnet,
BlockchainType.Testnet,
BlockchainType.Local,
],
tags: ["asset:USDT"],
dependencies: ["Vault"],
getArgs: () => [
100, // maxCountTokens
12_000, // nextTokenPriceMultiplier
200, // initialTokenPrice
],
afterDeploy: async ({ ethers, deployments: { log } }, Strategy, [vault]) => {
log("Adding Vault to VaultFounderToken");
const Vault = await ethers.getContractAt("Vault", vault.address);
const VaultFounderToken = await ethers.getContract("VaultFounderToken");

const txVault = await Vault.setFounders(VaultFounderToken.address);
const resultAddingVaultFounderToken = await txVault.wait();
log("VaultFounderToken added to vault", resultAddingVaultFounderToken);

const txVaultFounderToken = await VaultFounderToken.setVault(Vault.address);
const resultAddingVault = await txVaultFounderToken.wait();
log("Vault added to VaultFounderToken", resultAddingVault);
},
});

export default func;
Loading

0 comments on commit af17681

Please sign in to comment.