diff --git a/integration-tests/__tests__/contract/batch/batch-api.spec.ts b/integration-tests/__tests__/contract/batch/batch-api.spec.ts index b9f79d8336..be3e6fd62c 100644 --- a/integration-tests/__tests__/contract/batch/batch-api.spec.ts +++ b/integration-tests/__tests__/contract/batch/batch-api.spec.ts @@ -28,8 +28,8 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, createAddress }) => { it('Verify a batch of transfers and origination operations using a combination of the two notations (array of operation with kind mixed with withTransfer method)', async () => { /** Tests the usage of a mix of the 2 possible notations for batched operations - * See for details on the 2 notations: - * https://tezostaquito.io/docs/batch_API#--the-array-of-transactions-method + * See for details on the 2 notations: + * https://tezostaquito.io/docs/batch_API#--the-array-of-transactions-method * https://tezostaquito.io/docs/batch_API#--the-withtransfer-method */ const op = await Tezos.batch([ @@ -101,7 +101,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, createAddress }) => { code: managerCode, init: { "string": await Tezos.signer.publicKeyHash() }, }) - + await op.confirmation(); const contract = await op.contract(); expect(op.status).toEqual('applied') @@ -124,7 +124,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, createAddress }) => { code: managerCode, init: { "string": await Tezos.signer.publicKeyHash() }, }) - + await op.confirmation(); const contract = await op.contract(); expect(op.status).toEqual('applied') diff --git a/integration-tests/__tests__/contract/batch/batch.spec.ts b/integration-tests/__tests__/contract/batch/batch.spec.ts index aa3316ef83..48927e74f9 100644 --- a/integration-tests/__tests__/contract/batch/batch.spec.ts +++ b/integration-tests/__tests__/contract/batch/batch.spec.ts @@ -123,7 +123,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, knownContract, createAddress } code: managerCode, init: { string: await Tezos.signer.publicKeyHash() } }); - + await op.confirmation(); const contract = await op.contract(); expect(op.status).toEqual('applied'); @@ -186,6 +186,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBaker, knownContract, createAddress } code: managerCode, init: { "string": await Tezos.signer.publicKeyHash() }, }) + await op.confirmation(); const contract = await op.contract(); const estimateOp = await Tezos.estimate.batch([ diff --git a/integration-tests/__tests__/contract/big-map-access-by-index.spec.ts b/integration-tests/__tests__/contract/big-map-access-by-index.spec.ts index e2c5db45ff..c60f297f0e 100644 --- a/integration-tests/__tests__/contract/big-map-access-by-index.spec.ts +++ b/integration-tests/__tests__/contract/big-map-access-by-index.spec.ts @@ -6,7 +6,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { const Tezos = lib; describe(`Test contract origination and accessing big map abstraction by index through contract api using: ${rpc}`, () => { - // In this scenario the code of the contract doesn't have annotation in its storage, so Taquito references element by indexes. + // In this scenario the code of the contract doesn't have annotation in its storage, so Taquito references element by indexes. beforeEach(async () => { await setup() @@ -19,6 +19,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { code: tokenCode, init: tokenInit(`${await Tezos.signer.publicKeyHash()}`), }) + await op.confirmation() const contract = await op.contract() // Fetch the storage of the newly deployed contract @@ -52,6 +53,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { code: tokenCode, init: tokenInit(`${await Tezos.signer.publicKeyHash()}`), }) + await op.confirmation() const contract = await op.contract() // Fetch the storage of the newly deployed contract diff --git a/integration-tests/__tests__/contract/big-map.spec.ts b/integration-tests/__tests__/contract/big-map.spec.ts index 7f7de018a7..904f286d98 100644 --- a/integration-tests/__tests__/contract/big-map.spec.ts +++ b/integration-tests/__tests__/contract/big-map.spec.ts @@ -9,7 +9,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { const Tezos = lib; describe(`Test contract origination with initialized Maps with variants of data through contract api using: ${rpc}`, () => { - /** The purpose of the test is to make sure that the keys in the map are properly ordered by Taquito before injection of the operation, + /** The purpose of the test is to make sure that the keys in the map are properly ordered by Taquito before injection of the operation, * If the keys are not ordered, the node will reject the operation. */ beforeEach(async () => { @@ -69,7 +69,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { }), }, }); - + await op.confirmation(); await op.contract(); expect(op.hash).toBeDefined(); expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); @@ -95,6 +95,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { 3: '3', }, }); + await op.confirmation(); const contract = await op.contract(); interface StorageType { @@ -190,6 +191,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { code: tokenCode, init: tokenInit(`${await Tezos.signer.publicKeyHash()}`), }); + await op.confirmation(); const contract = await op.contract(); // Fetch the storage of the newly deployed contract @@ -221,6 +223,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { code: tokenCode, init: tokenInit(`${await Tezos.signer.publicKeyHash()}`), }); + await op.confirmation(); const contract = await op.contract(); // Fetch the storage of the newly deployed contract @@ -252,7 +255,7 @@ CONFIGS().forEach(({ lib, rpc, setup, knownBigMapContract }) => { 3: '3', }, }); - + await op.confirmation(); await op.contract(); expect(op.hash).toBeDefined(); expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); diff --git a/integration-tests/__tests__/contract/byte-as-Uint8Array.spec.ts b/integration-tests/__tests__/contract/byte-as-Uint8Array.spec.ts index 5352f3f08c..7307f575e5 100644 --- a/integration-tests/__tests__/contract/byte-as-Uint8Array.spec.ts +++ b/integration-tests/__tests__/contract/byte-as-Uint8Array.spec.ts @@ -26,6 +26,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: code, storage: value }); + await op.confirmation(); const contract = await op.contract(); const contractAbs = await Tezos.contract.at(contract.address); diff --git a/integration-tests/__tests__/contract/call-method-manual-steps.spec.ts b/integration-tests/__tests__/contract/call-method-manual-steps.spec.ts index ade28fb657..91d84b1776 100644 --- a/integration-tests/__tests__/contract/call-method-manual-steps.spec.ts +++ b/integration-tests/__tests__/contract/call-method-manual-steps.spec.ts @@ -17,9 +17,10 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code, storage: 10 }); + await opOrigination.confirmation(); const contract = await opOrigination.contract(); - // Let's say we want to call the default entry point of the presented contract, and we want to obtain the operation hash before injecting the operation to the node. + // Let's say we want to call the default entry point of the presented contract, and we want to obtain the operation hash before injecting the operation to the node. // Currently, if we do `await contract.methods.default(5).send()`, we won't be able to obtain the operation hash before the operation gets injected. // This plan to be addressed in issue #432 @@ -34,7 +35,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { // We estimate the fees for the operation const estimate = await Tezos.estimate.transfer(transferParams); - // The createTransferOperation function returns RPCTransferOperation where we include the estimated fees + // The createTransferOperation function returns RPCTransferOperation where we include the estimated fees const rpcTransferOperation = await createTransferOperation({ ...transferParams, fee: estimate.suggestedFeeMutez, @@ -90,5 +91,3 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { } }); - - diff --git a/integration-tests/__tests__/contract/call-with-xtz-amount.spec.ts b/integration-tests/__tests__/contract/call-with-xtz-amount.spec.ts index a0333c55bf..50cb3b669a 100644 --- a/integration-tests/__tests__/contract/call-with-xtz-amount.spec.ts +++ b/integration-tests/__tests__/contract/call-with-xtz-amount.spec.ts @@ -21,6 +21,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: depositContractCode, init: depositContractStorage, }); + await op.confirmation(); const contract = await op.contract(); const operation = await contract.methods.deposit(null).send({ amount: 1 }); diff --git a/integration-tests/__tests__/contract/encode-long-numeral.spec.ts b/integration-tests/__tests__/contract/encode-long-numeral.spec.ts index 4585b50f7d..9be8e8d59d 100644 --- a/integration-tests/__tests__/contract/encode-long-numeral.spec.ts +++ b/integration-tests/__tests__/contract/encode-long-numeral.spec.ts @@ -13,6 +13,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code, storage: 1000000000000000000000000000000000000000000000000000000 }); + await op.confirmation(); const contract = await op.contract(); const operation = await contract.methods @@ -34,6 +35,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code, storage: 1000000000000000000000000000000000000000000000000000000 }).send(); + await op.confirmation(); const contract = await op.contract(); const operation = await contract.methods diff --git a/integration-tests/__tests__/contract/failwith.spec.ts b/integration-tests/__tests__/contract/failwith.spec.ts index 84d6312039..e737cee0c8 100644 --- a/integration-tests/__tests__/contract/failwith.spec.ts +++ b/integration-tests/__tests__/contract/failwith.spec.ts @@ -14,6 +14,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: failwithContractCode, storage: null }) + await op.confirmation() const contract = await op.contract() expect(op.hash).toBeDefined(); expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY) diff --git a/integration-tests/__tests__/contract/fetch-multiple-big-map-keys.spec.ts b/integration-tests/__tests__/contract/fetch-multiple-big-map-keys.spec.ts index fdc856139e..69ec849af5 100644 --- a/integration-tests/__tests__/contract/fetch-multiple-big-map-keys.spec.ts +++ b/integration-tests/__tests__/contract/fetch-multiple-big-map-keys.spec.ts @@ -32,6 +32,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { 3: '3' } }); + await op.confirmation(); const contract = await op.contract(); interface StorageType { diff --git a/integration-tests/__tests__/contract/manager-that-calls-failwith-contract.spec.ts b/integration-tests/__tests__/contract/manager-that-calls-failwith-contract.spec.ts index 1adabf259e..18ed12ad57 100644 --- a/integration-tests/__tests__/contract/manager-that-calls-failwith-contract.spec.ts +++ b/integration-tests/__tests__/contract/manager-that-calls-failwith-contract.spec.ts @@ -11,15 +11,15 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { describe(`Test contract origination of a contract that calls 2nd contract that FAILs through contract api: ${rpc}`, () => { beforeEach(async () => { - await setup(); - + await setup(); + try { const op = await Tezos.contract.originate({ balance: "1", code: failwithContractCode, storage: null }); - + await op.confirmation(); contract = await op.contract(); opManager = await Tezos.contract.originate({ @@ -27,7 +27,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: managerCode, init: { "string": await Tezos.signer.publicKeyHash() }, }); - + await opManager.confirmation(); } catch(e) { console.log(`Error when preparing the test: ${e}`); } diff --git a/integration-tests/__tests__/contract/multisig-set-and-remove-delegate.spec.ts b/integration-tests/__tests__/contract/multisig-set-and-remove-delegate.spec.ts index 01a8f7e40c..8051ab6422 100644 --- a/integration-tests/__tests__/contract/multisig-set-and-remove-delegate.spec.ts +++ b/integration-tests/__tests__/contract/multisig-set-and-remove-delegate.spec.ts @@ -44,6 +44,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { keys: [await account1.signer.publicKey(), await account2.signer.publicKey(), await account3.signer.publicKey()] } }) + await op2.confirmation(); const contract = await op2.contract(); expect(op2.status).toEqual('applied') diff --git a/integration-tests/__tests__/contract/multisig-transfer-implicit.spec.ts b/integration-tests/__tests__/contract/multisig-transfer-implicit.spec.ts index c73867d14d..63e016be12 100644 --- a/integration-tests/__tests__/contract/multisig-transfer-implicit.spec.ts +++ b/integration-tests/__tests__/contract/multisig-transfer-implicit.spec.ts @@ -24,6 +24,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { keys: [await account1.signer.publicKey(), await account2.signer.publicKey(), await account3.signer.publicKey()] } }) + await op.confirmation(); const contract = await op.contract(); expect(op.status).toEqual('applied') diff --git a/integration-tests/__tests__/contract/multisig-transfer-to-contract.spec.ts b/integration-tests/__tests__/contract/multisig-transfer-to-contract.spec.ts index 6b40a31b40..f3260ccf82 100644 --- a/integration-tests/__tests__/contract/multisig-transfer-to-contract.spec.ts +++ b/integration-tests/__tests__/contract/multisig-transfer-to-contract.spec.ts @@ -24,6 +24,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress, knownContract }) => { keys: [await account1.signer.publicKey(), await account2.signer.publicKey(), await account3.signer.publicKey()] } }) + await op.confirmation(); const contract = await op.contract(); expect(op.status).toEqual('applied') diff --git a/integration-tests/__tests__/contract/no-annotations-call-by-index-methodsObject.spec.ts b/integration-tests/__tests__/contract/no-annotations-call-by-index-methodsObject.spec.ts index 8ffe09a20b..096976adb9 100644 --- a/integration-tests/__tests__/contract/no-annotations-call-by-index-methodsObject.spec.ts +++ b/integration-tests/__tests__/contract/no-annotations-call-by-index-methodsObject.spec.ts @@ -4,7 +4,7 @@ import { noAnnotCode, noAnnotInit } from "../../data/token_without_annotation"; CONFIGS().forEach(({ lib, rpc, setup }) => { const Tezos = lib; describe(`Test contract origination with no annotations calling methods by index using methodObjects through contract api: ${rpc}`, () => { - /** The goal of the test is to verify a contract entrypoint call using the methodsObject method (contract.methodsObject) + /** The goal of the test is to verify a contract entrypoint call using the methodsObject method (contract.methodsObject) * in case of a contract having no annotation in its code. */ beforeEach(async () => { @@ -29,6 +29,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: noAnnotCode, init: noAnnotInit(await Tezos.signer.publicKeyHash()) }) + await op.confirmation() const contract = await op.contract() // Make a transfer diff --git a/integration-tests/__tests__/contract/no-annotations-call-by-index.spec.ts b/integration-tests/__tests__/contract/no-annotations-call-by-index.spec.ts index e62f62c733..2bdaa7173d 100644 --- a/integration-tests/__tests__/contract/no-annotations-call-by-index.spec.ts +++ b/integration-tests/__tests__/contract/no-annotations-call-by-index.spec.ts @@ -27,6 +27,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: noAnnotCode, init: noAnnotInit(await Tezos.signer.publicKeyHash()) }) + await op.confirmation() const contract = await op.contract() // Make a transfer diff --git a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts index cf040e7793..5e5ea19ded 100644 --- a/integration-tests/__tests__/contract/operations/failing-noop.spec.ts +++ b/integration-tests/__tests__/contract/operations/failing-noop.spec.ts @@ -3,14 +3,19 @@ import { OpKind, TezosToolkit } from "@taquito/taquito"; import { InMemorySigner } from "@taquito/signer"; import { verifySignature } from "@taquito/utils"; -CONFIGS().forEach(({ rpc, lib }) => { +CONFIGS().forEach(({ rpc }) => { const aliceSKey = 'edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq' describe(`Test failing_noop through contract api using: ${rpc}`, () => { let Tezos: TezosToolkit; beforeAll(async () => { - Tezos = lib; + if(rpc.includes('oxfordnet')){ + Tezos = new TezosToolkit('https://rpc.tzkt.io/oxfordnet'); + } + if(rpc.includes('ghostnet')){ + Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); + } Tezos.setSignerProvider(new InMemorySigner(aliceSKey)); }); @@ -37,7 +42,7 @@ CONFIGS().forEach(({ rpc, lib }) => { let Mainnet: TezosToolkit; beforeAll(async () => { - Mainnet = new TezosToolkit('https://rpc.tzkt.io/mainnet'); // this is an archive node public rpc url for mainnet + Mainnet = new TezosToolkit('https://rpc.tzkt.io/mainnet'); // this is a mainnet archive history mode public rpc node url Mainnet.setSignerProvider(new InMemorySigner(aliceSKey)); }); diff --git a/integration-tests/__tests__/contract/operations/smart-rollup-originate.spec.ts b/integration-tests/__tests__/contract/operations/smart-rollup-originate.spec.ts index 6ce37cbf2d..df1bdc0901 100644 --- a/integration-tests/__tests__/contract/operations/smart-rollup-originate.spec.ts +++ b/integration-tests/__tests__/contract/operations/smart-rollup-originate.spec.ts @@ -17,7 +17,8 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { }); await op.confirmation(); - + expect(op.hash).toBeDefined(); + expect(op.includedInBlock).toBeLessThan(Number.POSITIVE_INFINITY); expect(op.status).toEqual('applied'); expect(op.kernel).toEqual('23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a'); }); diff --git a/integration-tests/__tests__/contract/originate-and-call-contract-lambda-rec.spec.ts b/integration-tests/__tests__/contract/originate-and-call-contract-lambda-rec.spec.ts index 96ae8a3673..f74dabfd57 100644 --- a/integration-tests/__tests__/contract/originate-and-call-contract-lambda-rec.spec.ts +++ b/integration-tests/__tests__/contract/originate-and-call-contract-lambda-rec.spec.ts @@ -27,7 +27,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: reduceMap, storage: [1] }); - + await deployContract.confirmation(); const contract = await deployContract.contract(); const op = await contract.methodsObject.default({ diff --git a/integration-tests/__tests__/contract/permits.spec.ts b/integration-tests/__tests__/contract/permits.spec.ts index 776062bce6..83abad6820 100644 --- a/integration-tests/__tests__/contract/permits.spec.ts +++ b/integration-tests/__tests__/contract/permits.spec.ts @@ -68,7 +68,7 @@ const create_bytes_to_sign = async (Tezos: TezosToolkit, contractAddress: string }; const sigParamPacked = packDataBytes(sigParamData, sigParamType); - // signs the hash + // signs the hash const signature = await Tezos.signer.sign(sigParamPacked.bytes); return signature.sig @@ -314,6 +314,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { //Mint 10 tokens to bootstrap 2 const mint_contract = await LocalTez1.contract.at(fa12_contract.address); const mint = await mint_contract.methods.mint(bootstrap2_address, 10).send(); + await mint.confirmation(); expect(mint.hash).toBeDefined(); expect(mint.status).toEqual('applied'); await mint.confirmation(); diff --git a/integration-tests/__tests__/contract/unit-as-param.spec.ts b/integration-tests/__tests__/contract/unit-as-param.spec.ts index 90d32694a1..0415e37112 100644 --- a/integration-tests/__tests__/contract/unit-as-param.spec.ts +++ b/integration-tests/__tests__/contract/unit-as-param.spec.ts @@ -15,6 +15,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: depositContractCode, init: depositContractStorage }) + await op.confirmation() const contract = await op.contract() const operation = await contract.methods.deposit(null).send({ amount: 1, }); diff --git a/integration-tests/__tests__/sapling/sapling-batched-transactions.spec.ts b/integration-tests/__tests__/sapling/sapling-batched-transactions.spec.ts index 6636a8901e..c31e6ffe39 100644 --- a/integration-tests/__tests__/sapling/sapling-batched-transactions.spec.ts +++ b/integration-tests/__tests__/sapling/sapling-batched-transactions.spec.ts @@ -42,7 +42,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: singleSaplingStateContractJProtocol(4), init: '{}' }); - + await saplingContractOrigination.confirmation(); saplingContract = await saplingContractOrigination.contract(); const mnemonic1: string = bip39.generateMnemonic(); @@ -326,4 +326,3 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { }); }); - diff --git a/integration-tests/__tests__/sapling/sapling-transactions-contract-with-multiple-sapling-states.spec.ts b/integration-tests/__tests__/sapling/sapling-transactions-contract-with-multiple-sapling-states.spec.ts index 0ce2692b95..65cdc8e781 100644 --- a/integration-tests/__tests__/sapling/sapling-transactions-contract-with-multiple-sapling-states.spec.ts +++ b/integration-tests/__tests__/sapling/sapling-transactions-contract-with-multiple-sapling-states.spec.ts @@ -30,7 +30,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { right: SaplingStateValue } }); - + await saplingContractOrigination.confirmation(); saplingContract = await saplingContractOrigination.contract(); // Instantiate an InMemorySpendingKey from a spending key for Alice diff --git a/integration-tests/__tests__/sapling/sapling-transactions-contract-with-single-state.spec.ts b/integration-tests/__tests__/sapling/sapling-transactions-contract-with-single-state.spec.ts index b7f871be46..a2db75ea8d 100644 --- a/integration-tests/__tests__/sapling/sapling-transactions-contract-with-single-state.spec.ts +++ b/integration-tests/__tests__/sapling/sapling-transactions-contract-with-single-state.spec.ts @@ -24,7 +24,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { code: singleSaplingStateContractJProtocol(), init: '{}' }); - + await saplingContractOrigination.confirmation(); saplingContract = await saplingContractOrigination.contract(); // Generate a spending key and an InMemorySpendingKey instance for Bob using a mnemonic @@ -139,7 +139,7 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { paymentAddress: alicePaymentAddress, isSpent: true }, - { // This input is a payback for when Alice sent 2 tz to bob (3tz - 2tz = 1tz). + { // This input is a payback for when Alice sent 2 tz to bob (3tz - 2tz = 1tz). // Alice consumed the 3tz input and received 1tz back. value: new BigNumber(1000000), memo: '', @@ -262,4 +262,3 @@ CONFIGS().forEach(({ lib, rpc, setup, createAddress }) => { }); }); - diff --git a/integration-tests/__tests__/sapling/sapling-transactions-proof-using-proving-key.spec.ts b/integration-tests/__tests__/sapling/sapling-transactions-proof-using-proving-key.spec.ts index d39ffa87f4..6ff3e6375e 100644 --- a/integration-tests/__tests__/sapling/sapling-transactions-proof-using-proving-key.spec.ts +++ b/integration-tests/__tests__/sapling/sapling-transactions-proof-using-proving-key.spec.ts @@ -26,7 +26,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { code: singleSaplingStateContractJProtocol(), init: '{}' }); - + await saplingContractOrigination.confirmation(); saplingContract = await saplingContractOrigination.contract(); // Generate a spending key and an InMemorySpendingKey instance for Bob using a mnemonic @@ -142,7 +142,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { paymentAddress: alicePaymentAddress, isSpent: true }, - { // This input is a payback for when Alice sent 2 tz to bob (3tz - 2tz = 1tz). + { // This input is a payback for when Alice sent 2 tz to bob (3tz - 2tz = 1tz). // Alice consumed the 3tz input and received 1tz back. value: new BigNumber(1000000), memo: '', @@ -269,4 +269,3 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { }); }); - diff --git a/integration-tests/__tests__/signer-mnemonic.spec.ts b/integration-tests/__tests__/signer-mnemonic.spec.ts index 522a8dafe9..12389e843b 100644 --- a/integration-tests/__tests__/signer-mnemonic.spec.ts +++ b/integration-tests/__tests__/signer-mnemonic.spec.ts @@ -22,7 +22,7 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { funderPKH = await Funder.signer.publicKeyHash(); /** - * Create 3 TezosToolkits with signer providers of different curves + * Create 3 TezosToolkits with signer providers of different curves * and Fund them with the Funder account */ Tez1 = new TezosToolkit(rpc); @@ -57,21 +57,21 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { it('should create a signer instance (ed25519) using the fromMnemonic method and successfully sign an op', async () => { const op = await Tez1.contract.transfer({ to: funderPKH, amount: 0.1 }); - op.confirmation(); + await op.confirmation(); expect(op.hash).toBeDefined(); }); it('should create a signer instance (secp256k1) using the fromMnemonic method and successfully sign an op', async () => { const op = await Tez2.contract.transfer({ to: funderPKH, amount: 0.1 }); - op.confirmation(); + await op.confirmation(); expect(op.hash).toBeDefined(); }); it('should create a signer instance (p256) using the fromMnemonic method and successfully sign an op', async () => { const op = await Tez3.contract.transfer({ to: funderPKH, amount: 0.1 }); - op.confirmation(); + await op.confirmation(); expect(op.hash).toBeDefined(); }); diff --git a/integration-tests/__tests__/wallet/failing-noop.spec.ts b/integration-tests/__tests__/wallet/failing-noop.spec.ts index 63a0389a8f..09d11ed0f2 100644 --- a/integration-tests/__tests__/wallet/failing-noop.spec.ts +++ b/integration-tests/__tests__/wallet/failing-noop.spec.ts @@ -3,14 +3,19 @@ import { OpKind, TezosToolkit } from "@taquito/taquito"; import { InMemorySigner } from "@taquito/signer"; import { verifySignature } from "@taquito/utils"; -CONFIGS().forEach(({ rpc, lib }) => { +CONFIGS().forEach(({ rpc }) => { const aliceSKey = 'edsk3QoqBuvdamxouPhin7swCvkQNgq4jP5KZPbwWNnwdZpSpJiEbq' describe(`Test failing_noop through wallet api using: ${rpc}`, () => { let Tezos: TezosToolkit; beforeAll(async () => { - Tezos = lib; + if(rpc.includes('oxfordnet')){ + Tezos = new TezosToolkit('https://rpc.tzkt.io/oxfordnet'); + } + if(rpc.includes('ghostnet')){ + Tezos = new TezosToolkit('https://rpc.tzkt.io/ghostnet'); + } Tezos.setSignerProvider(new InMemorySigner(aliceSKey)); }); diff --git a/integration-tests/config.ts b/integration-tests/config.ts index 69e70e361f..69a8e8fdd3 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -143,7 +143,7 @@ const oxfordnetSecretKey: Config = const ghostnetEphemeral: Config = defaultConfig({ networkName: 'GHOSTNET', - protocol: Protocols.PtNairobi, + protocol: Protocols.ProxfordY, defaultRpc: 'http://ecad-ghostnet-rolling:8732', knownContracts: knownContractsPtGhostnet, signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/ghostnet') diff --git a/integration-tests/known-contracts-PtGhostnet.ts b/integration-tests/known-contracts-PtGhostnet.ts index 68994a5cd3..72f9e4e32c 100644 --- a/integration-tests/known-contracts-PtGhostnet.ts +++ b/integration-tests/known-contracts-PtGhostnet.ts @@ -1,8 +1,8 @@ import { KnownContracts } from './known-contracts'; export const knownContractsPtGhostnet: KnownContracts = { - contract: "KT1HwcBvLjyQZi6CapBfCt5xiXSW5KcaJ4A5", - bigMapContract: "KT1Dig4sQxbZaZjo9X18etvpEWN1eGKxTVk2", - tzip12BigMapOffChainContract: "KT1NMtSQq484bDYSFvNrBjfkGtpug2Fm1rrr", - saplingContract: "KT1ToBD7bovonshNrxs3i4KMFuZ8PE2LUmQf", - onChainViewContractAddress: "KT1R5spjSabhD9q8cwZfCvssuvUoHmEd6KNv", + contract: "KT1BsqmT6DBccRXNk2DVjhHcEkdPgWfugJAY", + bigMapContract: "KT1VWyGgTWPSmSnMFMYT5zeByX2tyqnLMWLy", + tzip12BigMapOffChainContract: "KT1JQQipASBXEvdWxRjUPjmTY6z4o8UWmZtA", + saplingContract: "KT1F8BoKHeFTPDsTwSQmThwjSBjAjYgGgAGy", + onChainViewContractAddress: "KT1LdBJDGN9svUfootxSGksoC7d78gNuzVXV", } diff --git a/integration-tests/originate-known-contracts.ts b/integration-tests/originate-known-contracts.ts index 63655e3f31..946ed90d83 100644 --- a/integration-tests/originate-known-contracts.ts +++ b/integration-tests/originate-known-contracts.ts @@ -39,6 +39,7 @@ CONFIGS().forEach(({ lib, setup, protocol }) => { let originateKnownContract = async (contractName: string, tezos: TezosToolkit, contractOriginateParams: OriginateParams): Promise => { try { const operation = await tezos.contract.originate(contractOriginateParams); + await operation.confirmation(); const contract = await operation.contract(); console.log(`known ${contractName} address: ${contract.address}`); // Set the contract's address for subsequent GitHub actions diff --git a/packages/taquito/test/parser/michel-codec-parser.spec.ts b/packages/taquito/test/parser/michel-codec-parser.spec.ts index 64c2a556dd..30e63c98c7 100644 --- a/packages/taquito/test/parser/michel-codec-parser.spec.ts +++ b/packages/taquito/test/parser/michel-codec-parser.spec.ts @@ -141,7 +141,6 @@ describe('MichelCodec parser', () => { } catch (err: any) { expect(err).toBeInstanceOf(InvalidCodeParameter); expect(err.message).toContain('Unable to parse'); - console.log(err.data); } });