-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from eonian-core/feature/founders-tokens
Feature/founders tokens
- Loading branch information
Showing
42 changed files
with
12,929 additions
and
434 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
packages/contracts/deploy/040_USDT_VaultFounderToken.deploy.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
Oops, something went wrong.