Skip to content

Commit

Permalink
incorporate voting registry with migration to the migration test
Browse files Browse the repository at this point in the history
  • Loading branch information
sotnikov-s committed Aug 26, 2023
1 parent 12124ec commit cbb3efe
Show file tree
Hide file tree
Showing 14 changed files with 694 additions and 385 deletions.
4 changes: 4 additions & 0 deletions contracts_migrate/additional/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Additional contracts used in scope of migration:

- `lockdrop_vault_for_cl_pools.wasm`https://github.com/neutron-org/neutron-dao/pull/71 0edde36c67f4c9c96b68b4fa915003071070300a;
- `vesting_lp_vault_for_cl_pools.wasm`https://github.com/neutron-org/neutron-dao/pull/71 0edde36c67f4c9c96b68b4fa915003071070300a.
Binary file not shown.
Binary file not shown.
5 changes: 5 additions & 0 deletions contracts_migrate/current/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Contract versions currently deployed on Neutron mainnet. Retrieved for each contract to be migrated via:

1. Get contract address from [Mainnet deployments page](https://docs.neutron.org/deployment/mainnet/);
2. Run `neutrond q wasm contract <addr>` for a mainnet node, get the `contract_info.code_id` value;
3. Run `neutrond q wasm code <code_id> <binary_name.wasm>` for a mainnet node.
File renamed without changes.
Binary file not shown.
Binary file added contracts_migrate/current/vesting_lp.wasm
Binary file not shown.
5 changes: 5 additions & 0 deletions contracts_migrate/new/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Contract versions to be migrated to. Origins:

- `neutron_lockdrop.wasm`https://github.com/neutron-org/neutron-tge-contracts/pull/51 201126859f2e03b2da814efe8e9dea6c680fbfaa;
- `neutron_voting_registry.wasm`https://github.com/neutron-org/neutron-dao/pull/75 1d90c078bf277126fb1fc415bc6dc9ab3b4f8e89;
- `vesting_lp.wasm`https://github.com/neutron-org/neutron-tge-contracts/pull/51 201126859f2e03b2da814efe8e9dea6c680fbfaa.
Binary file added contracts_migrate/new/neutron_lockdrop.wasm
Binary file not shown.
Binary file not shown.
Binary file added contracts_migrate/new/vesting_lp.wasm
Binary file not shown.
16 changes: 7 additions & 9 deletions src/helpers/tge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export class Tge {
priceFeed: string;
coinRegistry: string;
astroFactory: string;
astroFactoryCL: string;
vestingAtomLp: string;
vestingUsdcLp: string;
vestingLpVault: string;
Expand Down Expand Up @@ -198,8 +197,8 @@ export class Tge {
for (const contract of [
'TGE_CREDITS',
'TGE_AUCTION',
'TGE_LOCKDROP',
'TGE_LOCKDROP_V2',
'TGE_LOCKDROP_CURRENT',
'TGE_LOCKDROP_NEW',
'TGE_AIRDROP',
'TGE_PRICE_FEED_MOCK',
'ASTRO_PAIR',
Expand All @@ -212,12 +211,11 @@ export class Tge {
'ASTRO_VESTING',
'ASTRO_COIN_REGISTRY',
'VESTING_LP',
'VESTING_LP_V2',
'VESTING_LP_CURRENT',
'VESTING_LP_NEW',
'LOCKDROP_VAULT',
'LOCKDROP_VAULT_V2',
'CREDITS_VAULT',
'VESTING_LP_VAULT',
'VESTING_LP_VAULT_V2',
'ORACLE_HISTORY',
]) {
const codeId = await this.instantiator.storeWasm(
Expand Down Expand Up @@ -379,13 +377,13 @@ export class Tge {

this.contracts.vestingAtomLp = await instantiateVestingLp(
this.instantiator,
this.codeIds.VESTING_LP,
this.codeIds.VESTING_LP_CURRENT,
this.tokenInfoManager.wallet.address.toString(),
'vesting_atom_lp',
);
this.contracts.vestingUsdcLp = await instantiateVestingLp(
this.instantiator,
this.codeIds.VESTING_LP,
this.codeIds.VESTING_LP_CURRENT,
this.tokenInfoManager.wallet.address.toString(),
'vesting_usdc_lp',
);
Expand Down Expand Up @@ -437,7 +435,7 @@ export class Tge {
async deployLockdrop() {
this.contracts.lockdrop = await instantiateLockdrop(
this.instantiator,
this.codeIds.TGE_LOCKDROP,
this.codeIds.TGE_LOCKDROP_CURRENT,
null,
this.tokenInfoManager.wallet.address.toString(),
this.contracts.credits,
Expand Down
26 changes: 18 additions & 8 deletions src/helpers/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,15 @@ export const NeutronContract = {
'cwd_subdao_pre_propose_single_no_timelock.wasm',
SUBDAO_PROPOSAL: 'cwd_subdao_proposal_single.wasm',
SUBDAO_TIMELOCK: 'cwd_subdao_timelock_single.wasm',
LOCKDROP_VAULT: '../contracts_thirdparty/lockdrop_vault.wasm',
LOCKDROP_VAULT_V2: 'lockdrop_vault.wasm',
LOCKDROP_VAULT: 'lockdrop_vault.wasm',
ORACLE_HISTORY: 'astroport_oracle.wasm',
TGE_CREDITS: 'credits.wasm',
TGE_AIRDROP: 'cw20_merkle_airdrop.wasm',
CW4_VOTING: '../contracts_thirdparty/cw4_voting.wasm',
CW4_GROUP: '../contracts_thirdparty/cw4_group.wasm',
CW20_BASE: '../contracts_thirdparty/cw20_base.wasm',
TGE_AUCTION: 'neutron_auction.wasm',
TGE_LOCKDROP: '../contracts_thirdparty/neutron_lockdrop.wasm',
TGE_LOCKDROP_V2: 'neutron_lockdrop.wasm',
TGE_LOCKDROP: 'neutron_lockdrop.wasm',
TGE_PRICE_FEED_MOCK: 'neutron_price_feed_mock.wasm',
ASTRO_PAIR: '../contracts_thirdparty/astroport_pair.wasm',
ASTRO_PAIR_CL: '../contracts_thirdparty/astroport_pair_concentrated.wasm',
Expand All @@ -152,14 +150,26 @@ export const NeutronContract = {
ASTRO_GENERATOR: '../contracts_thirdparty/astroport_generator.wasm',
ASTRO_WHITELIST: '../contracts_thirdparty/astroport_whitelist.wasm',
ASTRO_VESTING: '../contracts_thirdparty/astroport_vesting.wasm',
VESTING_LP: '../contracts_thirdparty/vesting_lp.wasm',
VESTING_LP_V2: 'vesting_lp.wasm',
VESTING_LP_VAULT: '../contracts_thirdparty/vesting_lp_vault.wasm',
VESTING_LP_VAULT_V2: 'vesting_lp_vault.wasm',
VESTING_LP: 'vesting_lp.wasm',
VESTING_LP_VAULT: 'vesting_lp_vault.wasm',
CREDITS_VAULT: 'credits_vault.wasm',
VESTING_INVESTORS: 'vesting_investors.wasm',
INVESTORS_VESTING_VAULT: 'investors_vesting_vault.wasm',
TOKENFACTORY: 'tokenfactory.wasm',

// contracts involved in migration
VOTING_REGISTRY_CURRENT:
'../contracts_migrate/current/neutron_voting_registry.wasm',
VOTING_REGISTRY_NEW: '../contracts_migrate/new/neutron_voting_registry.wasm',
TGE_LOCKDROP_CURRENT: '../contracts_migrate/current/neutron_lockdrop.wasm',
TGE_LOCKDROP_NEW: '../contracts_migrate/new/neutron_lockdrop.wasm',
VESTING_LP_CURRENT: '../contracts_migrate/current/vesting_lp.wasm',
VESTING_LP_NEW: '../contracts_migrate/new/vesting_lp.wasm',

LOCKDROP_VAULT_CL:
'../contracts_migrate/additional/lockdrop_vault_for_cl_pools.wasm',
VESTING_LP_VAULT_CL:
'../contracts_migrate/additional/vesting_lp_vault_for_cl_pools.wasm',
};

export type MultiChoiceOption = {
Expand Down
Loading

0 comments on commit cbb3efe

Please sign in to comment.