diff --git a/integration-tests/__tests__/contract/estimation-tests.spec.ts b/integration-tests/__tests__/contract/estimation-tests.spec.ts index d167dc228e..383f14ac40 100644 --- a/integration-tests/__tests__/contract/estimation-tests.spec.ts +++ b/integration-tests/__tests__/contract/estimation-tests.spec.ts @@ -41,11 +41,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer({ to: await Tezos.signer.publicKeyHash(), amount: 0.019 }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(188); + expect(estimate.suggestedFeeMutez).toEqual(186); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(168); - expect(estimate.totalCost).toEqual(168); - expect(estimate.usingBaseFeeMutez).toEqual(168); + expect(estimate.minimalFeeMutez).toEqual(166); + expect(estimate.totalCost).toEqual(166); + expect(estimate.usingBaseFeeMutez).toEqual(166); expect(estimate.consumedMilligas).toEqual(100040); }); @@ -53,11 +53,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer({ to: await (await createAddress()).signer.publicKeyHash(), amount: 0.017 }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(277); - expect(estimate.suggestedFeeMutez).toEqual(188); + expect(estimate.suggestedFeeMutez).toEqual(186); expect(estimate.burnFeeMutez).toEqual(69250); - expect(estimate.minimalFeeMutez).toEqual(168); - expect(estimate.totalCost).toEqual(69418); - expect(estimate.usingBaseFeeMutez).toEqual(168); + expect(estimate.minimalFeeMutez).toEqual(166); + expect(estimate.totalCost).toEqual(69416); + expect(estimate.usingBaseFeeMutez).toEqual(166); expect(estimate.consumedMilligas).toEqual(100040); }); @@ -69,11 +69,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { }); expect(estimate.gasLimit).toEqual(677); expect(estimate.storageLimit).toEqual(591); - expect(estimate.suggestedFeeMutez).toEqual(537); + expect(estimate.suggestedFeeMutez).toEqual(535); expect(estimate.burnFeeMutez).toEqual(147750); - expect(estimate.minimalFeeMutez).toEqual(517); - expect(estimate.totalCost).toEqual(148267); - expect(estimate.usingBaseFeeMutez).toEqual(517); + expect(estimate.minimalFeeMutez).toEqual(515); + expect(estimate.totalCost).toEqual(148265); + expect(estimate.usingBaseFeeMutez).toEqual(515); expect(estimate.consumedMilligas).toEqual(676402); }); @@ -84,25 +84,25 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { }); expect(estimate.gasLimit).toEqual(100); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(183); + expect(estimate.suggestedFeeMutez).toEqual(181); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(163); - expect(estimate.totalCost).toEqual(163); - expect(estimate.usingBaseFeeMutez).toEqual(163); + expect(estimate.minimalFeeMutez).toEqual(161); + expect(estimate.totalCost).toEqual(161); + expect(estimate.usingBaseFeeMutez).toEqual(161); expect(estimate.consumedMilligas).toEqual(100000); }); it('Verify .estimate.transfer for internal transfer to allocated implicit', async () => { const tx = contract.methods.do(MANAGER_LAMBDA.transferImplicit(knownBaker, 5)).toTransferParams(); const estimate = await LowAmountTez.estimate.transfer(tx); - expect(estimate.gasLimit).toEqual(1457); + expect(estimate.gasLimit).toEqual(1456); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(396); + expect(estimate.suggestedFeeMutez).toEqual(394); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(376); - expect(estimate.totalCost).toEqual(376); - expect(estimate.usingBaseFeeMutez).toEqual(376); - expect(estimate.consumedMilligas).toEqual(1456142); + expect(estimate.minimalFeeMutez).toEqual(374); + expect(estimate.totalCost).toEqual(374); + expect(estimate.usingBaseFeeMutez).toEqual(374); + expect(estimate.consumedMilligas).toEqual(1455970); }); it('Verify .estimate.transfer for multiple internal transfers to unallocated account', async () => { @@ -114,12 +114,12 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(1571); expect(estimate.storageLimit).toEqual(534); - expect(estimate.suggestedFeeMutez).toEqual(467); + expect(estimate.suggestedFeeMutez).toEqual(465); expect(estimate.burnFeeMutez).toEqual(133500); - expect(estimate.minimalFeeMutez).toEqual(447); - expect(estimate.totalCost).toEqual(133947); - expect(estimate.usingBaseFeeMutez).toEqual(447); - expect(estimate.consumedMilligas).toEqual(1570671); + expect(estimate.minimalFeeMutez).toEqual(445); + expect(estimate.totalCost).toEqual(133945); + expect(estimate.usingBaseFeeMutez).toEqual(445); + expect(estimate.consumedMilligas).toEqual(1570499); }); it('Verify .estimate.transfer for internal origination', async () => { @@ -127,12 +127,12 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(1867); expect(estimate.storageLimit).toEqual(337); - expect(estimate.suggestedFeeMutez).toEqual(443); + expect(estimate.suggestedFeeMutez).toEqual(441); expect(estimate.burnFeeMutez).toEqual(84250); - expect(estimate.minimalFeeMutez).toEqual(423); - expect(estimate.totalCost).toEqual(84673); - expect(estimate.usingBaseFeeMutez).toEqual(423); - expect(estimate.consumedMilligas).toEqual(1866766); + expect(estimate.minimalFeeMutez).toEqual(421); + expect(estimate.totalCost).toEqual(84671); + expect(estimate.usingBaseFeeMutez).toEqual(421); + expect(estimate.consumedMilligas).toEqual(1866594); }); it('Verify .estimate.transfer for multiple internal originations', async () => { @@ -140,12 +140,12 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { const estimate = await LowAmountTez.estimate.transfer(tx); expect(estimate.gasLimit).toEqual(2392); expect(estimate.storageLimit).toEqual(654); - expect(estimate.suggestedFeeMutez).toEqual(561); + expect(estimate.suggestedFeeMutez).toEqual(559); expect(estimate.burnFeeMutez).toEqual(163500); - expect(estimate.minimalFeeMutez).toEqual(541); - expect(estimate.totalCost).toEqual(164041); - expect(estimate.usingBaseFeeMutez).toEqual(541); - expect(estimate.consumedMilligas).toEqual(2391919); + expect(estimate.minimalFeeMutez).toEqual(539); + expect(estimate.totalCost).toEqual(164039); + expect(estimate.usingBaseFeeMutez).toEqual(539); + expect(estimate.consumedMilligas).toEqual(2391747); // Do the actual operation const op2 = await contract.methods.do(originate2()).send(); await op2.confirmation(); @@ -176,11 +176,11 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { let estimate = await LowAmountTez.estimate.transfer({ to: await Tezos.signer.publicKeyHash(), mutez: true, amount: amt - (1382 + getRevealFee(await LowAmountTez.signer.publicKeyHash())) }); expect(estimate.gasLimit).toEqual(101); expect(estimate.storageLimit).toEqual(0); - expect(estimate.suggestedFeeMutez).toEqual(187); + expect(estimate.suggestedFeeMutez).toEqual(185); expect(estimate.burnFeeMutez).toEqual(0); - expect(estimate.minimalFeeMutez).toEqual(167); - expect(estimate.totalCost).toEqual(167); - expect(estimate.usingBaseFeeMutez).toEqual(167); + expect(estimate.minimalFeeMutez).toEqual(165); + expect(estimate.totalCost).toEqual(165); + expect(estimate.usingBaseFeeMutez).toEqual(165); expect(estimate.consumedMilligas).toEqual(100040); }); diff --git a/integration-tests/__tests__/contract/operations/staking.spec.ts b/integration-tests/__tests__/contract/operations/staking.spec.ts index f2efd57afb..e9e11bda5b 100644 --- a/integration-tests/__tests__/contract/operations/staking.spec.ts +++ b/integration-tests/__tests__/contract/operations/staking.spec.ts @@ -1,11 +1,7 @@ import { CONFIGS } from "../../../config"; -import { Protocols } from '@taquito/taquito'; -import { ProtoGreaterOrEqual } from '@taquito/michel-codec'; -CONFIGS().forEach(({ lib, rpc, setup, knownBaker, protocol }) => { +CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { const Tezos = lib; - const parisAndAlpha = ProtoGreaterOrEqual(protocol, Protocols.PtParisBx) ? test : test.skip; - describe(`Staking pseudo operations: ${rpc}`, () => { beforeAll(async () => { @@ -19,7 +15,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, protocol }) => { await delegateOp.confirmation(); }); - parisAndAlpha('should throw an error when the destination specified is not the same as source', async () => { + it('should throw an error when the destination specified is not the same as source', async () => { expect(async () => { const op = await Tezos.contract.stake({ amount: 0.1, @@ -28,7 +24,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, protocol }) => { }).rejects.toThrow(); }); - parisAndAlpha('should be able to stake funds to a designated delegate', async () => { + it('should be able to stake funds to a designated delegate', async () => { const op = await Tezos.contract.stake({ amount: 0.1 }); @@ -38,7 +34,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, protocol }) => { expect(op.status).toEqual('applied'); }); - parisAndAlpha('should be able to unstake funds from a designated delegate', async () => { + it('should be able to unstake funds from a designated delegate', async () => { const op = await Tezos.contract.unstake({ amount: 0.1 }); @@ -48,7 +44,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, protocol }) => { expect(op.status).toEqual('applied'); }); - parisAndAlpha('should be able to finalize_unstake funds from a designated delegate', async () => { + it('should be able to finalize_unstake funds from a designated delegate', async () => { const op = await Tezos.contract.finalizeUnstake({}); await op.confirmation(); diff --git a/integration-tests/__tests__/local-forging.spec.ts b/integration-tests/__tests__/local-forging.spec.ts index 7d48812076..e368aff827 100644 --- a/integration-tests/__tests__/local-forging.spec.ts +++ b/integration-tests/__tests__/local-forging.spec.ts @@ -1,23 +1,12 @@ import { CONFIGS } from "../config"; -import { commonCases, parisCases } from '../data/allTestsCases'; +import { commonCases } from '../data/allTestsCases'; import { LocalForger, ProtocolsHash } from '@taquito/local-forging' -import { Protocols, TezosToolkit } from "@taquito/taquito"; -import { ProtoGreaterOrEqual } from '@taquito/michel-codec'; +import { TezosToolkit } from "@taquito/taquito"; CONFIGS().forEach(({ rpc, protocol }) => { const Tezos = new TezosToolkit(rpc); - const parisAndAlpha = ProtoGreaterOrEqual(protocol, Protocols.PtParisBx) ? test : test.skip describe(`Test local forger: ${rpc}`, () => { - parisCases.forEach(({ name, operation, expected }) => { - parisAndAlpha(`Verify that .forge for local forge will return same result as for network forge for rpc: ${name} (${rpc})`, async () => { - const localForger = new LocalForger(protocol as unknown as ProtocolsHash); - const result = await localForger.forge(operation); - const rpcResult = await Tezos.rpc.forgeOperations(operation); - expect(result).toEqual(rpcResult); - expect(await localForger.parse(rpcResult)).toEqual(expected || operation); - }); - }); // all protocols commonCases.forEach(({ name, operation, expected }) => { it(`Verify that .forge for local forge will return same result as for network forge for rpc: ${name} (${rpc})`, async () => { diff --git a/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts b/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts index 1e73c67d43..22be7ce02f 100644 --- a/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts +++ b/integration-tests/__tests__/rpc/get-protocol-constants.spec.ts @@ -5,7 +5,7 @@ import { ConstantsResponseProto019, ConstantsResponseProto020 } from '@taquito/r CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { const Tezos = lib; - const parisnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PtParisBx) ? test : test.skip; + const parisnet = (networkType == NetworkType.TESTNET && protocol === Protocols.PsParisCZ) ? 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/'; @@ -162,7 +162,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { const constants: ConstantsResponseProto020 = await Tezos.rpc.getConstants(); expect(constants).toEqual({ adaptive_issuance_activation_vote_enable: true, - adaptive_issuance_force_activation: false, + adaptive_issuance_force_activation: true, adaptive_issuance_launch_ema_threshold: 0, adaptive_rewards_params: { center_dz: { @@ -170,7 +170,7 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { numerator: "1", }, growth_rate: { - denominator: "25", + denominator: "100", numerator: "1", }, issuance_ratio_final_max: { @@ -210,21 +210,21 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { michelson_maximum_type_size: 2001, smart_rollup_max_wrapped_proof_binary_size: 30000, smart_rollup_max_number_of_messages_per_level: '1000000', - blocks_per_cycle: 12288, - blocks_per_commitment: 96, + blocks_per_cycle: 128, + blocks_per_commitment: 16, blocks_preservation_cycles: 1, - nonce_revelation_threshold: 768, + nonce_revelation_threshold: 32, ns_enable: true, cycles_per_voting_period: 1, hard_gas_limit_per_operation: new BigNumber(1040000), - hard_gas_limit_per_block: new BigNumber(1733333), + hard_gas_limit_per_block: new BigNumber(5200000), proof_of_work_threshold: new BigNumber(-1), minimal_stake: new BigNumber(6000000000), origination_size: 257, cost_per_byte: new BigNumber(250), hard_storage_limit_per_operation: new BigNumber(60000), percentage_of_frozen_deposits_slashed_per_double_attestation: 5000, - percentage_of_frozen_deposits_slashed_per_double_baking: 500, + percentage_of_frozen_deposits_slashed_per_double_baking: 700, minimal_frozen_stake: '600000000', limit_of_delegation_over_baking: 9, liquidity_baking_subsidy: new BigNumber(5000000), @@ -232,18 +232,18 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { attesting_reward_weight: 10240, baking_reward_bonus_weight: 5120, baking_reward_fixed_portion_weight: 5120, - base_total_issued_per_minute: "80007812", + base_total_issued_per_minute: "85007812", seed_nonce_revelation_tip_weight: 1, vdf_revelation_tip_weight: 1, }, min_proposal_quorum: 500, edge_of_staking_over_delegation: 2, global_limit_of_staking_over_baking: 5, - liquidity_baking_toggle_ema_threshold: 1000000000, - max_operations_time_to_live: 360, - minimal_block_delay: new BigNumber(5), - delay_increment_per_round: new BigNumber(2), - delegate_parameters_activation_delay: 5, + liquidity_baking_toggle_ema_threshold: 100000, + max_operations_time_to_live: 120, + minimal_block_delay: new BigNumber(7), + delay_increment_per_round: new BigNumber(7), + delegate_parameters_activation_delay: 3, direct_ticket_spending_enable: false, consensus_committee_size: 7000, consensus_threshold: 4667, @@ -271,11 +271,11 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { }, quorum_max: 7000, quorum_min: 2000, - smart_rollup_arith_pvm_enable: false, - smart_rollup_challenge_window_in_blocks: 241920, - smart_rollup_commitment_period_in_blocks: 180, - smart_rollup_max_lookahead_in_blocks: 518400, - smart_rollup_max_active_outbox_levels: 241920, + smart_rollup_arith_pvm_enable: true, + smart_rollup_challenge_window_in_blocks: 40, + smart_rollup_commitment_period_in_blocks: 20, + smart_rollup_max_lookahead_in_blocks: 30000, + smart_rollup_max_active_outbox_levels: 20160, smart_rollup_max_outbox_messages_per_level: 100, smart_rollup_max_number_of_cemented_commitments: 5, smart_rollup_max_number_of_parallel_games: 32, @@ -285,19 +285,18 @@ CONFIGS().forEach(({ lib, protocol, rpc, networkType }) => { smart_rollup_private_enable: true, smart_rollup_reveal_activation_level: { dal_attested_slots_validity_lag: 241920, - dal_page: 8193, - dal_parameters: 8193, + dal_page: 1, + dal_parameters: 1, metadata: 0, raw_data: { Blake2B: 0, }, }, - smart_rollup_riscv_pvm_enable: false, - smart_rollup_stake_amount: '10000000000', - smart_rollup_timeout_period_in_blocks: 120960, - testnet_dictator: 'tz1Xf8zdT3DbAX9cHw3c3CXh79rc4nK4gCe8', - vdf_difficulty: new BigNumber(10000000000), - zk_rollup_enable: false, + smart_rollup_riscv_pvm_enable: true, + smart_rollup_stake_amount: '32000000', + smart_rollup_timeout_period_in_blocks: 500, + vdf_difficulty: new BigNumber(10000000), + zk_rollup_enable: true, zk_rollup_max_ticket_payload_size: 2048, zk_rollup_min_pending_to_process: 10, zk_rollup_origination_size: 4000, diff --git a/integration-tests/__tests__/rpc/nodes.spec.ts b/integration-tests/__tests__/rpc/nodes.spec.ts index 3dc85adba9..082d689a80 100644 --- a/integration-tests/__tests__/rpc/nodes.spec.ts +++ b/integration-tests/__tests__/rpc/nodes.spec.ts @@ -1,11 +1,10 @@ import { CONFIGS } from '../../config'; -import { DefaultContractType, Protocols } from "@taquito/taquito"; +import { DefaultContractType } from "@taquito/taquito"; import { RpcClientCache, RpcClient, RPCRunViewParam, RPCRunScriptViewParam, PendingOperationsV1, PendingOperationsV2, PvmKind } from '@taquito/rpc'; import { encodeExpr } from '@taquito/utils'; import { Schema } from '@taquito/michelson-encoder'; import { tokenBigmapCode, tokenBigmapStorage } from '../../data/token_bigmap'; import { ticketCode, ticketStorage } from '../../data/code_with_ticket'; -import { ProtoGreaterOrEqual } from '@taquito/michel-codec'; CONFIGS().forEach( ({ @@ -21,7 +20,6 @@ CONFIGS().forEach( }) => { const Tezos = lib; const unrestrictedRPCNode = rpc.endsWith("ecadinfra.com") ? test.skip : test; - const parisAndAlpha = ProtoGreaterOrEqual(protocol, Protocols.PtParisBx) ? test : test.skip; let ticketContract: DefaultContractType; @@ -156,7 +154,7 @@ CONFIGS().forEach( const allDelegates = await rpcClient.getAllDelegates(); expect(allDelegates).toBeDefined(); - const allViableDelegates = await rpcClient.getAllDelegates({active: true, with_minimal_stake: true}); + const allViableDelegates = await rpcClient.getAllDelegates({ active: true, with_minimal_stake: true }); expect(allViableDelegates).toBeDefined(); expect(allViableDelegates.length).toBeLessThanOrEqual(allDelegates.length); @@ -482,9 +480,15 @@ CONFIGS().forEach( expect(ticketBalances[0].amount).toBeDefined(); }); - parisAndAlpha(`Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for ${rpc}`, async () => { + it(`Verify that rpcClient.getAdaptiveIssuanceLaunchCycle will retrieve launch cycle 6 for ${rpc}`, async () => { const launchCycle = await rpcClient.getAdaptiveIssuanceLaunchCycle(); - expect(launchCycle).toEqual(6); + if (rpc.includes('ghostnet')) { + expect(launchCycle).toEqual(1054); + } else if (rpc.includes('parisnet')) { + expect(launchCycle).toEqual(6); + } else if (rpc.includes('mondaynet') || rpc.includes('weeklynet')) { + expect(launchCycle).toEqual(5); + } }) it('Verify that rpcClient.getPendingOperations v1 will retrieve the pending operations in mempool with property applied', async () => { diff --git a/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts b/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts index c2bfaea3c8..879f56a684 100644 --- a/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts +++ b/integration-tests/__tests__/wallet/staking-pseudo-operations.spec.ts @@ -1,11 +1,8 @@ import { CONFIGS } from '../../config'; -import { Protocols } from '@taquito/taquito'; -import { ProtoGreaterOrEqual } from '@taquito/michel-codec'; import { InvalidStakingAddressError, InvalidFinalizeUnstakeAmountError } from '@taquito/core'; -CONFIGS().forEach(({ lib, rpc, setup, protocol, knownBaker }) => { +CONFIGS().forEach(({ lib, rpc, setup, knownBaker }) => { const Tezos = lib; - const parisAndAlpha = ProtoGreaterOrEqual(protocol, Protocols.PtParisBx) ? test : test.skip; describe(`Test staking pseudo operations using: ${rpc}`, () => { beforeAll(async () => { await setup(true); @@ -20,7 +17,7 @@ CONFIGS().forEach(({ lib, rpc, setup, protocol, knownBaker }) => { } }); - parisAndAlpha(`should be able to stake successfully: ${rpc}`, async () => { + it(`should be able to stake successfully: ${rpc}`, async () => { const op = await Tezos.wallet.stake({ amount: 3 }).send() await op.confirmation(); expect(await op.status()).toBe('applied'); @@ -30,7 +27,7 @@ CONFIGS().forEach(({ lib, rpc, setup, protocol, knownBaker }) => { expect(Math.round(stakedBalance.toNumber() / 1000000)).toEqual(3); }); - parisAndAlpha(`should be able to unstake successfully: ${rpc}`, async () => { + it(`should be able to unstake successfully: ${rpc}`, async () => { const op = await Tezos.wallet.unstake({ amount: 1 }).send() await op.confirmation(); expect(await op.status()).toBe('applied'); @@ -40,13 +37,13 @@ CONFIGS().forEach(({ lib, rpc, setup, protocol, knownBaker }) => { expect(Math.round(UnstakedBalance.toNumber() / 1000000)).toEqual(1); }); - parisAndAlpha(`should be able to finalizeUnstake successfully: ${rpc}`, async () => { + it(`should be able to finalizeUnstake successfully: ${rpc}`, async () => { const op = await Tezos.wallet.finalizeUnstake({}).send() await op.confirmation(); expect(await op.status()).toBe('applied'); }); - parisAndAlpha('should throw error when param is against pseudo operation', async () => { + it('should throw error when param is against pseudo operation', async () => { expect(async () => { const op = await Tezos.wallet.stake({ amount: 1, to: 'tz1PZY3tEWmXGasYeehXYqwXuw2Z3iZ6QDnA' }).send(); }).rejects.toThrow(InvalidStakingAddressError); diff --git a/integration-tests/config.ts b/integration-tests/config.ts index d8245cd0f0..74761019b3 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -7,7 +7,7 @@ import { RpcClient, RpcClientCache } from '@taquito/rpc'; import { KnownContracts } from './known-contracts'; import { knownContractsProtoALph } from './known-contracts-ProtoALph'; import { knownContractsPtGhostnet } from './known-contracts-PtGhostnet'; -import { knownContractsPtParisBx } from './known-contracts-PtParisBx'; +import { knownContractsPsParisCZ } from './known-contracts-PsParisCZ'; import { knownContractsPtNairobi } from './known-contracts-PtNairobi'; const nodeCrypto = require('crypto'); @@ -117,7 +117,7 @@ const defaultConfig = ({ rpc: process.env[`TEZOS_RPC_${networkName}`] || defaultRpc, pollingIntervalMilliseconds: process.env[`POLLING_INTERVAL_MILLISECONDS`] || undefined, rpcCacheMilliseconds: process.env[`RPC_CACHE_MILLISECONDS`] || '1000', - knownBaker: process.env[`TEZOS_BAKER`] || (networkName === 'WEEKLYNET' ? 'tz1ck3EJwzFpbLVmXVuEn5Ptwzc6Aj14mHSH' : 'tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD'), + knownBaker: process.env[`TEZOS_BAKER`] || (networkName === 'WEEKLYNET' ? 'tz1ck3EJwzFpbLVmXVuEn5Ptwzc6Aj14mHSH' : 'tz1TnEtqDV9mZyts2pfMy6Jw1BTPs4LMjL8M'), // tz1TnEtqDV9mZyts2pfMy6Jw1BTPs4LMjL8M aka teztnetsbaker is a placeholder for tz1cjyja1TU6fiyiFav3mFAdnDsCReJ12hPD on parisc protocol knownContract: process.env[`TEZOS_${networkName}_CONTRACT_ADDRESS`] || knownContracts.contract, knownBigMapContract: process.env[`TEZOS_${networkName}_BIGMAPCONTRACT_ADDRESS`] || knownContracts.bigMapContract, knownTzip1216Contract: process.env[`TEZOS_${networkName}_TZIP1216CONTRACT_ADDRESS`] || knownContracts.tzip12BigMapOffChainContract, @@ -132,14 +132,14 @@ const defaultConfig = ({ const parisnetEphemeral: Config = defaultConfig({ networkName: 'PARISNET', - protocol: Protocols.PtParisBx, - defaultRpc: 'http://parisnet.i.ecadinfra.com:8732/', - knownContracts: knownContractsPtParisBx, - signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/parisnet') + protocol: Protocols.PsParisCZ, + defaultRpc: 'https://rpc.pariscnet.teztnets.com/', + knownContracts: knownContractsPsParisCZ, + signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/pariscnet') }); const parisnetSecretKey: Config = - { ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://parisnet.i.ecadinfra.com:8732/' } }; + { ...parisnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'https://rpc.pariscnet.teztnets.com/' } }; const nairobinetSecretKey: Config = defaultConfig({ diff --git a/integration-tests/data/allTestsCases.ts b/integration-tests/data/allTestsCases.ts index f47cfd39fd..c11b1e7c17 100644 --- a/integration-tests/data/allTestsCases.ts +++ b/integration-tests/data/allTestsCases.ts @@ -49,46 +49,6 @@ interface TestCase { expected?: object; } -export const parisCases: TestCase[] = [ - { - name: 'Attestation With Dal operation', - operation: { - branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX', - contents: [ - { - kind: OpKind.ATTESTATION_WITH_DAL, - slot: 0, - level: 66299, - round: 5, - block_payload_hash: 'vh3FEkypvxUYLwjGYd2Sme7aWyfX8npDsqxcL6imVpBWnAZeNn2n', - dal_attestation: '10' - } - ] - } - }, - { - name: 'Dal Publish Commitment operation1', - operation: { - branch: 'BMT5yA3UH3CJkaYJBq33Q1BNZU6NL4zZNBhCHKwxygSm59P1x9M', - contents: [ - { - kind: OpKind.DAL_PUBLISH_COMMITMENT, - source: 'tz1Mp9zrMAJ3jckh3juLXGobfDv6oyUycfSy', - fee: '513', - counter: '67', - gas_limit: '1433', - storage_limit: '0', - slot_header: { - slot_index: 10, - commitment: 'sh1vHbHrPSt7eWqYJmM9EUk5scjbvR5PKBckJxmmDJzYHHBkca8Lz4hxXX6zpW5wbhJhswJd4v', - commitment_proof: '90c6576ad09e11b14eb464cdd214fe061ba8e8e5a3175e29fe7ff40526f90c2f2f4e02fe9fe03f7adb0fe286d7828b970eb1979f0f65ca3637a51d5456b442377d20397eb1b02544c2e435d79e156881443179fe16b32ad9e9501622a647c2ce' - } - } - ] - } - }, -] - export const commonCases: TestCase[] = [ { name: 'Delegation', @@ -1624,4 +1584,41 @@ export const commonCases: TestCase[] = [ }] }, }, + { + name: 'Attestation With Dal operation', + operation: { + branch: 'BLzyjjHKEKMULtvkpSHxuZxx6ei6fpntH2BTkYZiLgs8zLVstvX', + contents: [ + { + kind: OpKind.ATTESTATION_WITH_DAL, + slot: 0, + level: 66299, + round: 5, + block_payload_hash: 'vh3FEkypvxUYLwjGYd2Sme7aWyfX8npDsqxcL6imVpBWnAZeNn2n', + dal_attestation: '10' + } + ] + } + }, + { + name: 'Dal Publish Commitment operation1', + operation: { + branch: 'BMT5yA3UH3CJkaYJBq33Q1BNZU6NL4zZNBhCHKwxygSm59P1x9M', + contents: [ + { + kind: OpKind.DAL_PUBLISH_COMMITMENT, + source: 'tz1Mp9zrMAJ3jckh3juLXGobfDv6oyUycfSy', + fee: '513', + counter: '67', + gas_limit: '1433', + storage_limit: '0', + slot_header: { + slot_index: 10, + commitment: 'sh1vHbHrPSt7eWqYJmM9EUk5scjbvR5PKBckJxmmDJzYHHBkca8Lz4hxXX6zpW5wbhJhswJd4v', + commitment_proof: '90c6576ad09e11b14eb464cdd214fe061ba8e8e5a3175e29fe7ff40526f90c2f2f4e02fe9fe03f7adb0fe286d7828b970eb1979f0f65ca3637a51d5456b442377d20397eb1b02544c2e435d79e156881443179fe16b32ad9e9501622a647c2ce' + } + } + ] + } + }, ]; diff --git a/integration-tests/known-contracts-PsParisCZ.ts b/integration-tests/known-contracts-PsParisCZ.ts new file mode 100644 index 0000000000..b0023382d3 --- /dev/null +++ b/integration-tests/known-contracts-PsParisCZ.ts @@ -0,0 +1,8 @@ +import { KnownContracts } from './known-contracts'; +export const knownContractsPsParisCZ: KnownContracts = { + contract: "KT1QmqnevBBLDYj3v8dd5mNP1qrpovbn9K3c", + bigMapContract: "KT1NUfVXTTeAV9ktcqhMtgE6qzZnJ67t9XSj", + tzip12BigMapOffChainContract: "KT1WCxQmh7C3mBySMwPtGG3yt7jAyboUBHkb", + saplingContract: "KT1MPrPW9qL4VSNmy55Pi6wJN5gVNHQzbEZi", + onChainViewContractAddress: "KT1FXE4bisom2L7V8WC7DJ9NLkNYfwHFmD1h", +}; diff --git a/integration-tests/known-contracts-PtParisBx.ts b/integration-tests/known-contracts-PtParisBx.ts deleted file mode 100644 index 75c50efb15..0000000000 --- a/integration-tests/known-contracts-PtParisBx.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { KnownContracts } from './known-contracts'; -export const knownContractsPtParisBx: KnownContracts = { - contract: "KT1ThHYHrNMiSuMG2Ba1HtHTWYyRtojWn44b", - bigMapContract: "KT1ACeLXs4fA3fakG4vhNumSfT7HxaApKjE3", - tzip12BigMapOffChainContract: "KT1HSPysYK1G2wLGPXjgbYTqpDyv49U3xVEo", - saplingContract: "KT1TirpKfRqAW1jXAr3RwAZB2kF3r5FJHuST", - onChainViewContractAddress: "KT1Ev43gMu5kwHNYp2kg6TXbQZtyKGMu2U9a", -}; diff --git a/packages/taquito-local-forging/src/protocols.ts b/packages/taquito-local-forging/src/protocols.ts index 57ef667405..db42478da9 100644 --- a/packages/taquito-local-forging/src/protocols.ts +++ b/packages/taquito-local-forging/src/protocols.ts @@ -16,8 +16,8 @@ export enum ProtocolsHash { PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', - PtParisBQ = 'PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -39,8 +39,8 @@ const protoLevel: Record = { PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16, PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17, ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19, - PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz: 20, PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20, + PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20, ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 21, }; diff --git a/packages/taquito-local-forging/src/taquito-local-forging.ts b/packages/taquito-local-forging/src/taquito-local-forging.ts index 41e70ff5b0..d217f7b12f 100644 --- a/packages/taquito-local-forging/src/taquito-local-forging.ts +++ b/packages/taquito-local-forging/src/taquito-local-forging.ts @@ -22,7 +22,7 @@ export * from './interface'; export { VERSION } from './version'; export { ProtocolsHash } from './protocols'; -const PROTOCOL_CURRENT = ProtocolsHash.PtParisBx; +const PROTOCOL_CURRENT = ProtocolsHash.PsParisCZ; export function getCodec(codec: CODEC, _proto: ProtocolsHash) { return { diff --git a/packages/taquito-michel-codec/src/michelson-types.ts b/packages/taquito-michel-codec/src/michelson-types.ts index 3e55746ba8..86f87cdb02 100644 --- a/packages/taquito-michel-codec/src/michelson-types.ts +++ b/packages/taquito-michel-codec/src/michelson-types.ts @@ -404,12 +404,12 @@ export enum Protocol { PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', - PtParisBQ = 'PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash } -export const DefaultProtocol = Protocol.Psithaca2; +export const DefaultProtocol = Protocol.PsParisCZ; export type ProtocolID = `${Protocol}`; @@ -439,8 +439,8 @@ const protoLevel: Record = { PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16, PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17, ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19, - PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz: 20, PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ: 20, + PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi: 20, ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 21, }; @@ -454,4 +454,4 @@ export function ProtoInferiorTo(a: ProtocolID, b: ProtocolID): boolean { export interface ProtocolOptions { protocol?: ProtocolID; -} \ No newline at end of file +} diff --git a/packages/taquito-rpc/test/taquito-rpc.spec.ts b/packages/taquito-rpc/test/taquito-rpc.spec.ts index 97dd62269b..1caf8f8b16 100644 --- a/packages/taquito-rpc/test/taquito-rpc.spec.ts +++ b/packages/taquito-rpc/test/taquito-rpc.spec.ts @@ -3097,7 +3097,7 @@ describe('RpcClient test', () => { it('should query the right url and property for operation, proto 20, attestation_with_dal', async () => { httpBackend.createRequest.mockReturnValue( Promise.resolve({ - protocol: 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', chain_id: 'NetXo8SqH1c38SS', hash: 'BKsCfYZrh417adJiKbGsyhVG2XrvUBJDhhkCAkZQzWzkEHCejXr', header: { @@ -3121,7 +3121,7 @@ describe('RpcClient test', () => { operations: [ [ { - protocol: 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', chain_id: 'NetXo8SqH1c38SS', hash: 'opSmHyeasw4QcJ4Jc2qi6arNeSQMhFRjHBdFYWXGoMydLkgVRtb', branch: 'BLHyjaqV2FhuHLQL3CBjWJqgZZ77BxcNxh3ehXcNYMQjjqAPwqA', @@ -3164,7 +3164,7 @@ describe('RpcClient test', () => { it('should query the right url and property for operation, proto 20, dal_publish_commitment', async () => { httpBackend.createRequest.mockReturnValue( Promise.resolve({ - protocol: 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + protocol: 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', chain_id: 'NetXo8SqH1c38SS', hash: 'BKsCfYZrh417adJiKbGsyhVG2XrvUBJDhhkCAkZQzWzkEHCejXr', header: { diff --git a/packages/taquito/src/constants.ts b/packages/taquito/src/constants.ts index a912d53020..ab25cdc4c2 100644 --- a/packages/taquito/src/constants.ts +++ b/packages/taquito/src/constants.ts @@ -68,8 +68,8 @@ export enum Protocols { PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH', - PtParisBQ = 'PtParisBQscdCm6Cfow6ndeU6wKJyA3aV1j4D3gQBQMsTQyJCrz', PtParisBx = 'PtParisBxoLz5gzMmn3d9WBQNoPSZakgnkMC2VNuQ3KXfUtUQeZ', + PsParisCZ = 'PsParisCZo7KAh1Z1smVd9ZMZ1HHn5gkzbM94V3PLCpknFWhUAi', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -89,7 +89,8 @@ export const protocols = { '016': [Protocols.PtMumbai2], // mumbai v2 '017': [Protocols.PtNairobi], '019': [Protocols.ProxfordY], - '020': [Protocols.ProtoALpha], + '020': [Protocols.PtParisBx, Protocols.PsParisCZ], + '021': [Protocols.ProtoALpha], }; export enum ChainIds { @@ -109,7 +110,8 @@ export enum ChainIds { MUMBAINET2 = 'NetXgbcrNtXD2yA', NAIROBINET = 'NetXyuzvDo2Ugzb', OXFORDNET2 = 'NetXxWsskGahzQB', - PARISNET = 'NetXo8SqH1c38SS', + PARISBNET = 'NetXo8SqH1c38SS', + PARISCNET = 'NetXXWAHLEvre9b', } // 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)