diff --git a/.github/workflows/mondaynet.yml b/.github/workflows/mondaynet.yml index b3e8538b64..28c48c01c4 100644 --- a/.github/workflows/mondaynet.yml +++ b/.github/workflows/mondaynet.yml @@ -47,7 +47,7 @@ jobs: working-directory: ./integration-tests env: MONDAYNET: true - run: npm run test:originate-known-contracts + run: npm run originate-known-contracts - if: always() id: integration-tests-mondaynet @@ -58,7 +58,7 @@ jobs: TEZOS_MONDAYNET_TZIP1216CONTRACT_ADDRESS: ${{ steps.originate-contracts-mondaynet.outputs.knownTzip12BigMapOffChainContractAddress }} TEZOS_MONDAYNET_SAPLINGCONTRACT_ADDRESS: ${{ steps.originate-contracts-mondaynet.outputs.knownSaplingContractAddress }} TEZOS_MONDAYNET_ON_CHAIN_VIEW_CONTRACT: ${{ steps.originate-contracts-mondaynet.outputs.knownOnChainViewContractAddress }} - run: npm run test:mondaynet -- --maxWorkers=2 + run: npm run test:weeklynet -- --maxWorkers=2 - name: Slack Notification if: always() diff --git a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts index 5e5ea19ded..8727149479 100644 --- a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts +++ b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts @@ -12,9 +12,10 @@ CONFIGS().forEach(({ rpc }) => { beforeAll(async () => { if(rpc.includes('oxfordnet')){ Tezos = new TezosToolkit('https://rpc.tzkt.io/oxfordnet'); - } - if(rpc.includes('ghostnet')){ + } else if(rpc.includes('ghostnet')){ Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); + } else { + Tezos = new TezosToolkit(rpc); } Tezos.setSignerProvider(new InMemorySigner(aliceSKey)); }); diff --git a/integration-tests/__tests__/contract/operations/update-consensus-key-operation.spec.ts b/integration-tests/__tests__/contract/operations/update-consensus-key-operation.spec.ts index 138947d5e9..1ca206f1da 100644 --- a/integration-tests/__tests__/contract/operations/update-consensus-key-operation.spec.ts +++ b/integration-tests/__tests__/contract/operations/update-consensus-key-operation.spec.ts @@ -1,3 +1,4 @@ +import { TezosToolkit } from '@taquito/taquito'; import { CONFIGS } from '../../../config'; CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { @@ -5,19 +6,24 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { const Tezos = lib; describe(`Test Update Consensus Key using: ${rpc}`, () => { - let pk: string; + let consensusPk: string; + let delegateAccount: TezosToolkit; beforeAll(async () => { await setup(true); try { - const account = await createAddress(); - pk = await account.signer.publicKey(); - const pkh = await account.signer.publicKeyHash(); + delegateAccount = await createAddress(); - const fund = await Tezos.contract.transfer({ amount: 5, to: pkh }); + const consensusAccount = await createAddress(); + consensusPk = await consensusAccount.signer.publicKey(); + + const fund = await Tezos.contract.batch() + .withTransfer({ amount: 2, to: await delegateAccount.signer.publicKeyHash() }) + .withTransfer({ amount: 2, to: await consensusAccount.signer.publicKeyHash()}) + .send(); await fund.confirmation(); - const register = await Tezos.contract.registerDelegate({}); + const register = await delegateAccount.contract.registerDelegate({}); await register.confirmation(); } catch (e) { @@ -27,7 +33,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { }); it('should be able to inject update_consensus_key operation', async () => { - const op = await Tezos.contract.updateConsensusKey({ pk }); + const op = await delegateAccount.contract.updateConsensusKey({ pk: consensusPk }); await op.confirmation(); expect(op.status).toBe('applied'); diff --git a/integration-tests/__tests__/wallet/failing-noop.spec.ts b/integration-tests/__tests__/wallet/failing-noop.spec.ts index 09d11ed0f2..cf64261eaa 100644 --- a/integration-tests/__tests__/wallet/failing-noop.spec.ts +++ b/integration-tests/__tests__/wallet/failing-noop.spec.ts @@ -12,9 +12,10 @@ CONFIGS().forEach(({ rpc }) => { beforeAll(async () => { if(rpc.includes('oxfordnet')){ Tezos = new TezosToolkit('https://rpc.tzkt.io/oxfordnet'); - } - if(rpc.includes('ghostnet')){ + } else if(rpc.includes('ghostnet')){ Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); + } else { + Tezos = new TezosToolkit(rpc); } Tezos.setSignerProvider(new InMemorySigner(aliceSKey)); }); diff --git a/integration-tests/config.ts b/integration-tests/config.ts index c68bd5607b..3d008b5eb6 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -141,7 +141,7 @@ const oxfordnetEphemeral: Config = const oxfordnetSecretKey: Config = { ...oxfordnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-oxfordnet-full:8732' } }; -const nairobinetSecretKey: Config = +const nairobinetSecretKey: Config = defaultConfig({ networkName: 'NAIROBINET', protocol: Protocols.PtNairobi, @@ -154,13 +154,13 @@ const ghostnetEphemeral: Config = defaultConfig({ networkName: 'GHOSTNET', protocol: Protocols.ProxfordY, - defaultRpc: 'http://ecad-ghostnet-rolling:8732', + defaultRpc: 'http://ecad-ghostnet-rolling-2.i.tez.ie:8732', knownContracts: knownContractsPtGhostnet, signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/ghostnet') }); const ghostnetSecretKey: Config = - { ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-ghostnet-rolling:8732' } }; + { ...ghostnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-ghostnet-rolling-2.i.tez.ie:8732' } }; const weeklynetEphemeral: Config = defaultConfig({