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

Feature/founders tokens #87

Merged
merged 40 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1d9c75e
added abstract SBT token contract
wer32dr Apr 29, 2023
6f861b2
added limited VaultFounderToken contract
wer32dr May 2, 2023
b46e35e
added possibility to change URI to token owner only
wer32dr May 3, 2023
fc5ce97
added ERC5484 as SBT standart
wer32dr May 7, 2023
0198cae
added event according IERC5484 specification
wer32dr May 7, 2023
4bd6f0c
added IVaultLifecycle.sol without overriding yet
wer32dr May 13, 2023
050eb87
added proper inheritance between Vault and IVaultLifecycle
wer32dr May 15, 2023
39c0d81
fix compilation
wer32dr May 17, 2023
f735958
fix circular dependency
wer32dr May 24, 2023
c143c9c
fixed linter issues
wer32dr May 25, 2023
604509c
addressing review comments
wer32dr May 30, 2023
6f54140
Merge branch 'main' into feature/founders-tokens
wer32dr May 30, 2023
640febe
added extra text coverage
wer32dr Jun 5, 2023
d693377
initial version for RewardHolder
wer32dr Jun 8, 2023
fa4bd2e
added revard holder logic with tests
wer32dr Jun 17, 2023
796234f
Merge branch 'main' into feature/founders-tokens
wer32dr Jun 17, 2023
4c5a016
rebase on main with fixes conflicts
wer32dr Jun 17, 2023
18087c2
Deployed contracts to Preview / Sepolia Testnet
github-actions[bot] Jun 17, 2023
222f8a0
Save gas usage snapshot
github-actions[bot] Jun 17, 2023
da256f6
added RewardHolder to FaultFounderToken
wer32dr Jun 24, 2023
43cd251
Deployed contracts to Preview / Sepolia Testnet
github-actions[bot] Jun 24, 2023
72cd890
Merge remote-tracking branch 'origin/main' into feature/founders-tokens
wer32dr Jun 24, 2023
1847e7b
fixed integration tests
wer32dr Jun 25, 2023
800c467
Deployed contracts to Preview / Sepolia Testnet
github-actions[bot] Jun 27, 2023
2a1a37f
Save gas usage snapshot
github-actions[bot] Jun 27, 2023
e2c604f
fixed changed initialization way from permissions point of view
wer32dr Jun 30, 2023
e0dcc7c
Merge branch 'main' into feature/founders-tokens
wer32dr Jun 30, 2023
3dfd132
merged master branch into current branch
wer32dr Jun 30, 2023
4423629
Deployed contracts to Preview / Sepolia Testnet
github-actions[bot] Jun 30, 2023
225193d
Save gas usage snapshot
github-actions[bot] Jun 30, 2023
e047b7a
addressed critical issue with claimReward
wer32dr Jul 1, 2023
6b43674
addressed some review comments
wer32dr Jul 2, 2023
2a9ac4b
Merge branch 'development' into feature/founders-tokens
wer32dr Jul 2, 2023
f510f81
addressed some review comments
wer32dr Jul 2, 2023
7e3128c
minor fixes added
wer32dr Jul 2, 2023
bc044da
renamed struct accroding review recommendation
wer32dr Jul 2, 2023
7a6fdc7
🐛 fix(ERC5484Upgradeable.sol): remove redundant initialization code
LeoVS09 Jul 2, 2023
83ba51f
Merge branch 'feature/founders-tokens' into fix/founders-token-contract
LeoVS09 Jul 2, 2023
1f7d830
Merge pull request #117 from eonian-core/fix/founders-token-contract
LeoVS09 Jul 2, 2023
7e8fac2
fixed unit tests after merging fix branch
wer32dr Jul 2, 2023
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
215 changes: 129 additions & 86 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
53 changes: 53 additions & 0 deletions packages/contracts/deploy/040_USDT_VaultFounderToken.deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
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);

const grantMinterRole = await VaultFounderToken.grantRole(
VaultFounderToken.MINTER_ROLE(),
Vault.address
);
const resultGrantMinterRole = await grantMinterRole.wait();
log("VaultFounderToken grant MINTER_ROLE to Vault", resultGrantMinterRole);

const grantBalanceUpdaterRole = await VaultFounderToken.grantRole(
VaultFounderToken.BALANCE_UPDATER_ROLE(),
Vault.address
);
const resultGrantBalanceUpdaterRole = await grantBalanceUpdaterRole.wait();
log(
"VaultFounderToken grant BALANCE_UPDATER_ROLE to Vault",
resultGrantBalanceUpdaterRole
);
wer32dr marked this conversation as resolved.
Show resolved Hide resolved
},
});

export default func;
Loading
Loading