Skip to content

Commit

Permalink
test: configured to run quebecA tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Sep 19, 2024
1 parent fefa6ea commit b7ad09e
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 34 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ jobs:
env:
# Ternary operator workaround
TEZOS_RPC_${{ matrix.testnet_uppercase }}: ${{ github.event.pull_request.head.repo.fork && format('https://{0}.ecadinfra.com', matrix.testnet) || null }}
integration-tests-testnet-beta-secret-key:
integration-tests-testnet-quebecA-secret-key:
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
include:
- testnet: betanet
testnet_uppercase: BETANET
- testnet: quebecanet
testnet_uppercase: QUEBECANET
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -83,6 +83,6 @@ jobs:
with:
authkey: ${{ secrets.TAILSCALE_AUTHKEY }}
version: 1.32.2
- run: npm -w integration-tests run test:betanet-secret-key
- run: npm -w integration-tests run test:quebecanet-secret-key
env:
RUN_${{ matrix.testnet_uppercase }}_WITH_SECRET_KEY: true
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => {

beforeAll(async () => {
await setup(true);
// There is no baker accept staking in betanet and weeklylnet hence tests will fail
// There is no baker accept staking in quebecanet and weeklylnet hence tests will fail
// Currently TF is a baker that allows staking on parisnet.
if (rpc.includes('paris')) {
knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { ConstantsResponseProto020, ConstantsResponseProto021 } from '@taquito/r
CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
const Tezos = lib;
const parisnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsParisCZ) ? test : test.skip;
const betanet = (networkType == NetworkType.TESTNET && protocol === Protocols.PtBetaaEZ) ? test : test.skip;
const quebecanet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsquebeCa) ? test : test.skip;
const weeklynet = (networkType == NetworkType.TESTNET && protocol === Protocols.ProtoALpha) ? test : test.skip;
describe('Test fetching constants for all protocols on Mainnet', () => {
const rpcUrl = 'https://mainnet.ecadinfra.com/';
Expand Down Expand Up @@ -304,7 +304,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
});
});

betanet(`should successfully fetch all constants for Betanet
quebecanet(`should successfully fetch all constants for quebecanet
using ${rpc}`, async () => {
Tezos.setRpcProvider(rpc);
const constants: ConstantsResponseProto021 = await Tezos.rpc.getConstants();
Expand Down Expand Up @@ -443,7 +443,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => {
smart_rollup_riscv_pvm_enable: true,
smart_rollup_stake_amount: '32000000',
smart_rollup_timeout_period_in_blocks: 781,
testnet_dictator: 'tz1Xf8zdT3DbAX9cHw3c3CXh79rc4nK4gCe8',
testnet_dictator: 'tz1e1TX7KghsqWUBXWmBTAAtPK3W6JTbNc82',
vdf_difficulty: new BigNumber(10000000),
zk_rollup_enable: true,
zk_rollup_max_ticket_payload_size: 2048,
Expand Down
6 changes: 3 additions & 3 deletions integration-tests/__tests__/rpc/nodes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ CONFIGS().forEach(
}) => {
const Tezos = lib;
const unrestrictedRPCNode = rpc.endsWith("ecadinfra.com") ? test.skip : test;
const betanet = protocol === Protocols.PtBetaaEZ ? test : test.skip;
const quebecanet = protocol === Protocols.PsquebeCa ? test : test.skip;
let ticketContract: DefaultContractType;

beforeAll(async () => {
Expand Down Expand Up @@ -66,7 +66,7 @@ CONFIGS().forEach(
expect(balance).toBeDefined();
});

betanet(`Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds`, async () => {
quebecanet(`Verify that rpcClient.getSpendable for knownBaker returns the spendable balance excluding frozen bonds`, async () => {
const balance = await rpcClient.getSpendable(knownBaker);
expect(balance).toBeDefined();
});
Expand All @@ -76,7 +76,7 @@ CONFIGS().forEach(
expect(balance).toBeDefined();
});

betanet(`Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance`, async () => {
quebecanet(`Verify that rpcClient.getSpendableAndFrozenBonds for knownBaker returns the full balance`, async () => {
const balance = await rpcClient.getSpendableAndFrozenBonds(knownBaker);
expect(balance).toBeDefined();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => {
beforeAll(async () => {
await setup(true);
try {
// There is no baker accept staking in betanet and weeklylnet hence tests will fail
// There is no baker accept staking in quebecanet and weeklylnet hence tests will fail
// Currently TF is a baker that allows staking on parisnet.
if (rpc.includes('paris')) {
knownBaker = 'tz3Q67aMz7gSMiQRcW729sXSfuMtkyAHYfqc' // TF
Expand Down
16 changes: 8 additions & 8 deletions integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { KnownContracts } from './known-contracts';
import { knownContractsProtoALph } from './known-contracts-ProtoALph';
import { knownContractsPtGhostnet } from './known-contracts-PtGhostnet';
import { knownContractsPsParisCZ } from './known-contracts-PsParisCZ';
import { knownContractsPtBetaaEZ } from './known-contracts-PtBetaaEZ';
import { knownContractsPsquebeCa } from './known-contracts-PsquebeCa';

const nodeCrypto = require('crypto');

Expand Down Expand Up @@ -141,12 +141,12 @@ const parisnetEphemeral: Config =
const parisnetSecretKey: Config =
{ ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://rpc.pariscnet.teztnets.com/' } };

const betanetSecretKey: Config =
const quebecASecretKey: Config =
defaultConfig({
networkName: 'BETANET',
protocol: Protocols.PtBetaaEZ,
defaultRpc: 'https://rpc.betanet-2024-08-29.teztnets.com',
knownContracts: knownContractsPtBetaaEZ,
networkName: 'QUEBECANET',
protocol: Protocols.PsquebeCa,
defaultRpc: ' https://rpc.quebecanet.teztnets.com',
knownContracts: knownContractsPsquebeCa,
signerConfig: defaultSecretKey
})

Expand Down Expand Up @@ -182,8 +182,8 @@ if (process.env['RUN_WITH_SECRET_KEY']) {
providers.push(parisnetSecretKey);
} else if (process.env['RUN_GHOSTNET_WITH_SECRET_KEY']) {
providers.push(ghostnetSecretKey);
} else if (process.env['RUN_BETANET_WITH_SECRET_KEY']) {
providers.push(betanetSecretKey);
} else if (process.env['RUN_QUEBECANET_WITH_SECRET_KEY']) {
providers.push(quebecASecretKey);
} else if (process.env['RUN_WEEKLYNET_WITH_SECRET_KEY']) {
providers.push(weeklynetSecretKey);
} else if (process.env['PARISNET']) {
Expand Down
8 changes: 8 additions & 0 deletions integration-tests/known-contracts-PsquebeCa.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { KnownContracts } from './known-contracts';
export const knownContractsPsquebeCa: KnownContracts = {
contract: "KT1L88d1qjSZSYKNF1q1sVLZPt2dpXe5SjVB",
bigMapContract: "KT1WJ73jt8rDYm9ga1HuyDXdkANW9U4YDPJH",
tzip12BigMapOffChainContract: "KT1AWk4RroBa1m7aVxcJ2Rguux7K5KtYM87S",
saplingContract: "KT1Mc6xAyxqnC5a6QxswyUGPmQhQRkvvAwx4",
onChainViewContractAddress: "KT1FJhDmrYz8vLiLHNfuKZyWDirkyHzZZUdi",
};
8 changes: 0 additions & 8 deletions integration-tests/known-contracts-PtBetaaEZ.ts

This file was deleted.

2 changes: 1 addition & 1 deletion integration-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"test:secret-key": "RUN_WITH_SECRET_KEY=true jest --runInBand",
"test:parisnet": "PARISNET=true jest",
"test:parisnet-secret-key": "RUN_PARISNET_WITH_SECRET_KEY=true jest --runInBand",
"test:betanet-secret-key": "RUN_BETANET_WITH_SECRET_KEY=true jest --runInBand",
"test:quebecanet-secret-key": "RUN_QUEBECANET_WITH_SECRET_KEY=true jest --runInBand",
"test:weeklynet": "WEEKLYNET=true jest",
"test:weeklynet-secret-key": "RUN_WEEKLYNET_WITH_SECRET_KEY=true jest --runInBand",
"test:ghostnet": "GHOSTNET=true jest",
Expand Down
4 changes: 2 additions & 2 deletions packages/taquito-local-forging/src/protocols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export enum ProtocolsHash {
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ',
PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi',
PtBetaaEZ = 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT',
PsquebeCa = 'PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -42,7 +42,7 @@ const protoLevel: Record<ProtocolsHash, number> = {
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19,
PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20,
PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20,
PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT: 21,
PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT: 21,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 22,
};

Expand Down
6 changes: 3 additions & 3 deletions packages/taquito/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export enum Protocols {
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ',
PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi',
PtBetaaEZ = 'PtBetaaEZxGcn9JDpkpAZ6E92Kh7bQb5FDoTCeYhmkfcwNehZcT',
PsquebeCa = 'PsquebeCaYyvBEESCaXL8B8Tn8BcEhps2Zke1xMVtyr7X4qMfxT',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -91,7 +91,7 @@ export const protocols = {
'017': [Protocols.PtNairobi],
'019': [Protocols.ProxfordY],
'020': [Protocols.PtParisBx, Protocols.PsParisCZ],
'021': [Protocols.PtBetaaEZ],
'021': [Protocols.PsquebeCa],
'022': [Protocols.ProtoALpha],
};

Expand All @@ -114,7 +114,7 @@ export enum ChainIds {
OXFORDNET2 = 'NetXxWsskGahzQB',
PARISBNET = 'NetXo8SqH1c38SS',
PARISCNET = 'NetXXWAHLEvre9b',
BETANET = 'NetXsTfFgyGbHTz',
QUEBECANET = 'NetXsTfFgyGbHTz',
}

// A fixed fee reveal operation gasLimit accepted by both simulate and injection endpoint is between 1.2-5 times of actual gas consumption (3.5 fails occasionally with gas exhausted; 4 fails occasionally with fee too low)
Expand Down

0 comments on commit b7ad09e

Please sign in to comment.