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

fix(governance): update vegacaspule 76.preview6 #6294

Merged
merged 6 commits into from
May 23, 2024
Merged
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
10 changes: 5 additions & 5 deletions apps/governance-e2e/cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,20 @@ module.exports = defineConfig({
ethWalletPublicKey: '0xEe7D375bcB50C26d52E1A4a472D8822A2A22d94F',
ethWalletPublicKeyTruncated: '0xEe7D…d94F',
ethStakingBridgeContractAddress:
'0x9135f5afd6F055e731bca2348429482eE614CFfA',
'0x3E29DFc2Acc4b63160aEC422BC3f0Fd29804fD06',
vegaWalletName: 'capsule_wallet',
vegaWalletLocation: '~/.vegacapsule/testnet/wallet',
vegaWalletPassphrase: '123',
vegaWalletMnemonic:
'ozone access unlock valid olympic save include omit supply green clown session',
vegaWalletPublicKey:
'02eceaba4df2bef76ea10caf728d8a099a2aa846cced25737cccaa9812342f65',
'b4f2726571fbe8e33b442dc92ed2d7f0d810e21835b7371a7915a365f07ccd9b',
vegaWalletPublicKeyShort: '02ecea…2f65',
vegaWalletPublicKey2:
'7f9cf07d3a9905b1a61a1069f7a758855da428bc0f4a97de87f48644bfc25535',
'c1607f28ec1d0a0b36842c8327101b18de2c5f172585870912f5959145a9176c',
vegaWalletPublicKey2Short: '7f9cf0…5535',
vegaTokenContractAddress: '0xF41bD86d462D36b997C0bbb4D97a0a3382f205B7',
vegaTokenAddress: '0x67175Da1D5e966e40D11c4B2519392B2058373de',
vegaTokenContractAddress: '0x331BC11227cB7925F90E37949590a34A876464F9',
vegaTokenAddress: '0xFcE3C7CBba976414621887F2D762e7fB0f90b5c1',
txTimeout: { timeout: 70000 },
epochTimeout: { timeout: 12000 },
blockConfirmations: 3,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const usdtSelectValue =
const formValidationError = 'input-error-text';
const txTimeout = Cypress.env('txTimeout');

context(
context.skip(
'Withdrawals - with eth and vega wallet connected',
{ tags: '@slow' },
function () {
Expand Down
24 changes: 8 additions & 16 deletions apps/governance-e2e/src/integration/view/home.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
});

describe('Links and buttons', function () {
// need capsule update - 76.preview.5
it.skip('should have link for proposal page', function () {
it('should have link for proposal page', function () {
cy.getByTestId('home-proposals').within(() => {
cy.get('[href="/proposals"]')
.should('exist')
Expand Down Expand Up @@ -51,25 +50,22 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
cy.getByTestId('view-proposal-btn').should('be.visible');
});
});
// need capsule update - 76.preview.5
it.skip('should have external link for governance', function () {
it('should have external link for governance', function () {
cy.getByTestId('home-proposals').within(() => {
cy.getByTestId('external-link')
.should('have.attr', 'href')
.and('contain', 'https://vega.xyz/governance');
});
});
// need capsule update - 76.preview.5
it.skip('should have link for validator page', function () {
it('should have link for validator page', function () {
cy.getByTestId('home-validators').within(() => {
cy.get('[href="/validators"]')
.first()
.should('exist')
.and('have.text', 'Browse, and stake');
});
});
// need capsule update - 76.preview.5
it.skip('should have external link for validators', function () {
it('should have external link for validators', function () {
cy.getByTestId('home-validators').within(() => {
cy.getByTestId('external-link')
.should('have.attr', 'href')
Expand Down Expand Up @@ -101,17 +97,15 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
cy.wrap($validator).find('a').should('have.attr', 'href');
});
});
// need capsule update - 76.preview.5
it.skip('should have link for rewards page', function () {
it('should have link for rewards page', function () {
cy.getByTestId('home-rewards').within(() => {
cy.get('[href="/rewards"]')
.first()
.should('exist')
.and('have.text', 'See rewards');
});
});
// need capsule update - 76.preview.5
it.skip('should have link for withdrawal page', function () {
it('should have link for withdrawal page', function () {
cy.getByTestId('home-vega-token').within(() => {
cy.get('[href="/token/withdraw"]')
.first()
Expand Down Expand Up @@ -210,17 +204,15 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
.and('have.text', 'Validators');
});
});
// need capsule update - 76.preview.5
it.skip('should have link for rewards page', function () {
it('should have link for rewards page', function () {
cy.getByTestId('menu-drawer').within(() => {
cy.get('[href="/rewards"]')
.first()
.should('exist')
.and('have.text', 'Rewards');
});
});
// need capsule update - 76.preview.5
it.skip('should have link for withdrawal page', function () {
it('should have link for withdrawal page', function () {
cy.getByTestId('menu-drawer').within(() => {
cy.get('[href="/token/withdraw"]')
.first()
Expand Down
9 changes: 3 additions & 6 deletions apps/governance-e2e/src/integration/view/proposal.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@ context(
it('should have governance tab highlighted', function () {
verifyTabHighlighted(navigation.proposals);
});
// need capsule update - 76.preview.5
it.skip('should have GOVERNANCE header visible', function () {
it('should have GOVERNANCE header visible', function () {
verifyPageHeader('Proposals');
});
// need capsule update - 76.preview.5
// 3002-PROP-023 3004-PMAC-002 3005-PASN-002 3006-PASC-002 3007-PNEC-002 3008-PFRO-003
it.skip('new proposal page should have button for link to more information on proposals', function () {
it('new proposal page should have button for link to more information on proposals', function () {
cy.getByTestId('new-proposal-link').click();
cy.url().should('include', '/proposals/propose/raw');
cy.contains('To see Explorer data on proposals visit').within(() => {
Expand Down Expand Up @@ -72,8 +70,7 @@ context(
cy.getByTestId('connect-to-vega-wallet-btn').should('exist');
navigateTo(navigation.proposals);
});
// need capsule update - 76.preview.5
it.skip('should be able to see a working link for - find out more about Vega governance', function () {
it('should be able to see a working link for - find out more about Vega governance', function () {
// 3001-VOTE-001 // 3002-PROP-001
cy.getByTestId(proposalDocumentationLink)
.should('be.visible')
Expand Down
54 changes: 45 additions & 9 deletions vegacapsule/config.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ network "testnet" {
endpoint = "ws://127.0.0.1:8545/"
}

secondary_ethereum {
chain_id = "1450"
network_id = "1451"
endpoint = "http://127.0.0.1:8546/"
}

faucet "faucet-1" {
wallet_pass = "f4uc3tw4ll3t-v3g4-p4ssphr4e3"

Expand All @@ -19,20 +25,49 @@ EOT

pre_start {
docker_service "ganache-1" {
image = "vegaprotocol/ganache:v1.2.4"
cmd = "ganache-cli"
args = [
"--blockTime", "1",
"--chainId", "1440",
"--networkId", "1441",
image = "vegaprotocol/ganache:v1.5.2"
args = [
"--miner.blockTime", "0.5",
"--chain.chainId", "1440",
"--chain.networkId", "1441",
"-h", "0.0.0.0",
"-p", "8545",
"-m", "ozone access unlock valid olympic save include omit supply green clown session",
"--db", "/app/ganache-db",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db",
"--wallet.accountKeysPath", "keys.json"
]
resources {
cpu = 500
memory = 1024
memory_max = 2048
disk = 1024
}
static_port {
value = 8545
to = 8545
}
auth_soft_fail = true
}

docker_service "ganache-2" {
image = "vegaprotocol/ganache:v1.5.2"
args = [
"--miner.blockTime", "0.5",
"--chain.chainId", "1450",
"--chain.networkId", "1451",
"-h", "0.0.0.0",
"-p", "8546",
"--wallet.mnemonic", "ozone access unlock valid olympic save include omit supply green clown session",
"--database.dbPath", "/app/ganache-db-secondary",
"--wallet.accountKeysPath", "keys.json"
]
resources {
cpu = 500
memory = 1024
memory_max = 2048
disk = 1024
}
static_port {
value = 8546
}
auth_soft_fail = true
}
Expand Down Expand Up @@ -60,6 +95,7 @@ EOT

genesis_template_file = "./genesis.tmpl"
smart_contracts_addresses_file = "./public_smart_contracts_addresses.json"
secondary_smart_contracts_addresses_file = "./public_secondary_smart_contracts_addresses.json"

node_set "validators" {
count = 2
Expand Down
45 changes: 33 additions & 12 deletions vegacapsule/genesis.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"name": "BTC (fake)",
"symbol": "fBTC",
"total_supply": "21000000",
"quantum": "0.000015",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "1000000"
Expand All @@ -19,6 +20,7 @@
"name": "DAI (fake)",
"symbol": "fDAI",
"total_supply": "1000000000",
"quantum": "1",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "10000000000"
Expand All @@ -31,6 +33,7 @@
"name": "EURO (fake)",
"symbol": "fEURO",
"total_supply": "1000000000",
"quantum": "1",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "10000000000"
Expand All @@ -43,6 +46,7 @@
"name": "USDC (fake)",
"symbol": "fUSDC",
"total_supply": "1000000000",
"quantum": "1",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "1000000000000"
Expand All @@ -55,6 +59,7 @@
"name": "XYZ (α alpha)",
"symbol": "XYZalpha",
"total_supply": "1000000000",
"quantum": "2",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "100000000000"
Expand All @@ -67,6 +72,7 @@
"name": "XYZ (β beta)",
"symbol": "XYZbeta",
"total_supply": "1000000000",
"quantum": "3",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "100000000000"
Expand All @@ -79,6 +85,7 @@
"name": "XYZ (γ gamma)",
"symbol": "XYZgamma",
"total_supply": "1000000000",
"quantum": "4",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "100000000000"
Expand All @@ -91,6 +98,7 @@
"name": "XYZ (δ delta)",
"symbol": "XYZdelta",
"total_supply": "1000000000",
"quantum": "5",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "100000000000"
Expand All @@ -103,69 +111,80 @@
"name": "XYZ (ε epsilon)",
"symbol": "XYZepsilon",
"total_supply": "1000000000",
"quantum": "6",
"source": {
"builtin_asset": {
"max_faucet_amount_mint": "100000000000"
}
}
},
"{{.GetVegaContractID "tBTC"}}": {
"{{.PrimaryBridge.GetVegaContractID "tBTC"}}": {
"min_lp_stake": "1",
"decimals": 5,
"name": "BTC (local)",
"symbol": "tBTC",
"total_supply": "0",
"quantum": "0.000015",
"source": {
"erc20": {
"contract_address": "{{.GetEthContractAddr "tBTC"}}"
"contract_address": "{{.PrimaryBridge.GetEthContractAddr "tBTC"}}",
"chain_id": "{{.PrimaryBridge.ChainID}}"
}
}
},
"{{.GetVegaContractID "tDAI"}}": {
"{{.PrimaryBridge.GetVegaContractID "tDAI"}}": {
"min_lp_stake": "1",
"decimals": 5,
"name": "DAI (local)",
"symbol": "tDAI",
"total_supply": "0",
"quantum": "1",
"source": {
"erc20": {
"contract_address": "{{.GetEthContractAddr "tDAI"}}"
"contract_address": "{{.PrimaryBridge.GetEthContractAddr "tDAI"}}",
"chain_id": "{{.PrimaryBridge.ChainID}}"
}
}
},
"{{.GetVegaContractID "tEURO"}}": {
"{{.PrimaryBridge.GetVegaContractID "tEURO"}}": {
"min_lp_stake": "1",
"decimals": 5,
"name": "EURO (local)",
"symbol": "tEURO",
"total_supply": "0",
"quantum": "1",
"source": {
"erc20": {
"contract_address": "{{.GetEthContractAddr "tEURO"}}"
"contract_address": "{{.PrimaryBridge.GetEthContractAddr "tEURO"}}",
"chain_id": "{{.PrimaryBridge.ChainID}}"
}
}
},
"{{.GetVegaContractID "tUSDC"}}": {
"{{.PrimaryBridge.GetVegaContractID "tUSDC"}}": {
"min_lp_stake": "1",
"decimals": 5,
"name": "USDC (local)",
"symbol": "tUSDC",
"total_supply": "0",
"quantum": "1",
"source": {
"erc20": {
"contract_address": "{{.GetEthContractAddr "tUSDC"}}"
"contract_address": "{{.PrimaryBridge.GetEthContractAddr "tUSDC"}}",
"chain_id": "{{.PrimaryBridge.ChainID}}"
}
}
},
"{{.GetVegaContractID "VEGA"}}": {
"{{.PrimaryBridge.GetVegaContractID "VEGA"}}": {
"min_lp_stake": "1",
"decimals": 18,
"name": "Vega",
"symbol": "VEGA",
"total_supply": "64999723000000000000000000",
"quantum": "1",
"source": {
"erc20": {
"contract_address": "{{.GetEthContractAddr "VEGA"}}"
"contract_address": "{{.PrimaryBridge.GetEthContractAddr "VEGA"}}",
"chain_id": "{{.PrimaryBridge.ChainID}}"
}
}
}
Expand All @@ -174,8 +193,10 @@
"ReplayAttackThreshold": 30
},
"network_parameters": {
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .NetworkID }}\", \"chain_id\": \"{{ .ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .PrimaryBridge.NetworkID }}\", \"chain_id\": \"{{ .PrimaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.ethereumRpcAndEvmCompatDataSourcesConfig": "{\"configs\": []}",
"blockchains.ethereumConfig": "{\"network_id\": \"{{ .PrimaryBridge.NetworkID }}\", \"chain_id\": \"{{ .PrimaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 3, \"staking_bridge_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "staking_bridge"}}\", \"deployment_block_height\": 0}, \"token_vesting_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "erc20_vesting"}}\", \"deployment_block_height\": 0 }, \"multisig_control_contract\": { \"address\": \"{{.PrimaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }}",
"blockchains.evmBridgeConfigs": "{\"configs\": [{\"network_id\": \"{{ .SecondaryBridge.NetworkID }}\", \"chain_id\": \"{{ .SecondaryBridge.ChainID }}\", \"collateral_bridge_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "erc20_bridge_1"}}\" }, \"confirmations\": 2, \"multisig_control_contract\": { \"address\": \"{{.SecondaryBridge.GetEthContractAddr "MultisigControl"}}\", \"deployment_block_height\": 0 }, \"block_time\": \"10ms\"}]}",
"governance.proposal.asset.minClose": "2s",
"governance.proposal.asset.minEnact": "2s",
"governance.proposal.asset.requiredParticipation": "0.00000000000000000000000015",
Expand All @@ -199,7 +220,7 @@
"market.liquidity.targetstake.triggering.ratio": "0.7",
"market.liquidity.providersFeeCalculationTimeStep": "5s",
"network.checkpoint.timeElapsedBetweenCheckpoints": "10s",
"reward.asset": "{{.GetVegaContractID "VEGA"}}",
"reward.asset": "{{.PrimaryBridge.GetVegaContractID "VEGA"}}",
"reward.staking.delegation.competitionLevel": "3.1",
"reward.staking.delegation.delegatorShare": "0.883",
"reward.staking.delegation.maxPayoutPerParticipant": "700000000000000000000",
Expand Down
Loading
Loading