From d631b4e4a504f2c2e3be83ab4f55dcf09cce6d0f Mon Sep 17 00:00:00 2001 From: hui-an-yang <106410553+hui-an-yang@users.noreply.github.com> Date: Fri, 22 Sep 2023 10:30:08 -0700 Subject: [PATCH] 2597 oxford remove get origination proof (#2664) * refactor: updated rpc types to accomdate both attestation and endorement * fix: fixed annots on option test fail * revert: unintional attestation file change * revert: unintional cspell.json changes * fix: remove getOriginationProof RPC endpoint and ref in smartRollupOriginate op BREAKING CHANGE: 1. rpc endpoint getOriginationProof removal 2. * fix: removed commitment property in SmartRollupCement for oxford re #2597 * test: updated consumedMilligas assertion in contract-estimation-tests.spec.ts --- docs/rpc_package.md | 12 +--- docs/smart_rollups.md | 9 ++- ...tract-batch-smart-rollup-originate.spec.ts | 2 - .../contract-estimation-tests.spec.ts | 8 +-- .../contract-smart-rollup-originate.spec.ts | 1 - integration-tests/data/allTestsCases.ts | 2 - integration-tests/data/metadataViews.ts | 59 ++++--------------- integration-tests/rpc-nodes.spec.ts | 11 ---- .../src/rpc-wrapper.ts | 7 --- .../src/schema/operation.ts | 1 - .../test/taquito-local-forging.spec.ts | 5 -- .../taquito-rpc/src/rpc-client-interface.ts | 3 - .../src/rpc-client-modules/rpc-cache.ts | 28 +-------- packages/taquito-rpc/src/taquito-rpc.ts | 22 ------- packages/taquito-rpc/src/types.ts | 57 ++++++++---------- .../taquito-rpc/test/data/rpc-responses.ts | 3 - packages/taquito-rpc/test/taquito-rpc.spec.ts | 12 ++-- .../taquito/src/batch/rpc-batch-provider.ts | 4 +- packages/taquito/src/contract/prepare.ts | 6 +- .../src/contract/rpc-contract-provider.ts | 7 +-- .../smart-rollup-originate-operation.ts | 4 -- packages/taquito/src/operations/types.ts | 7 +-- .../taquito/src/prepare/prepare-provider.ts | 6 -- .../test/batch/rpc-batch-provider.spec.ts | 6 -- packages/taquito/test/contract/helper.ts | 2 - .../contract/rpc-contract-provider.spec.ts | 19 +----- .../estimate/rpc-estimate-provider.spec.ts | 3 - .../test/prepare/prepare-provider.spec.ts | 6 -- 28 files changed, 56 insertions(+), 256 deletions(-) diff --git a/docs/rpc_package.md b/docs/rpc_package.md index fdab4086d4..4cf27205f7 100644 --- a/docs/rpc_package.md +++ b/docs/rpc_package.md @@ -96,7 +96,7 @@ const packedData = await client.packData({ data: { string: 'test' }, type: { pri console.log('-- Packed data:', packedData); ``` -You can simulate the `PACK` instruction from Michelson with the `packData` method. +You can simulate the `PACK` instruction from Michelson with the `packData` method. This function will execute Tzip4 views normally referred to as 'Lambda Views'. You can learn more about Tzip4 [here](https://gitlab.com/tezos/tzip/-/blob/master/proposals/tzip-4/tzip-4.md#view-entrypoints) ```js @@ -111,16 +111,6 @@ const view = await client.runView({ }); ``` -You can obtain the `Origination Proof` for the `smart_rollup_originate` batch operation (not needed for the `smart_rollup_originate` alone) - -This function will obtain the proof needed for the `smart_rollup_originate` batch method -```js -const originationProof = await client.getOriginationProof({ - kernel: 'your kernel', - kind: 'PVM kind' -}) -``` - ## Full documentation diff --git a/docs/smart_rollups.md b/docs/smart_rollups.md index efb75fd3dd..aa9749bb9a 100644 --- a/docs/smart_rollups.md +++ b/docs/smart_rollups.md @@ -1,6 +1,6 @@ --- title: Smart Rollups -author: Davis Sawali +author: Davis Sawali --- # Smart Optimistic Rollups @@ -28,8 +28,7 @@ await op.confirmation(); ##### please note - `pvmKind` at this time the only PVM supported is `wasm_2_0_0` - `kernel` is passed as a hexadecimal string examples can be found at [this tezos docs endpoint](https://tezos.gitlab.io/mumbai/smart_rollups.html?highlight=smart%20rollup%20originate#id1) -- `parametersType` is a MichelsonV1Expression to define the type. -- **Please note** `originationProof` is needed origination in `batch` which can be obtained with the `rpc.getOriginationProof({kernel, kind: PVMKind})` +- `parametersType` is a MichelsonV1Expression to define the type. For more information in regards to Smart Rollup Origination please refer to the this [link](https://tezos.gitlab.io/mumbai/smart_rollups.html?highlight=smart%20rollup%20originate#id1) @@ -43,9 +42,9 @@ The main use case of sending messages, is usually to denote contract calls. Thes MESSAGE='[{\ "destination" : "${CONTRACT}", \ "parameters" : "\"Hello world\"", \ - "entrypoint" : "default" + "entrypoint" : "default" }]' -``` +``` If you read closely, the message includes a `destination`, a `parameter`, and an `entrypoint` property. All components needed to **call an entrypoint** of a contract. diff --git a/integration-tests/contract-batch-smart-rollup-originate.spec.ts b/integration-tests/contract-batch-smart-rollup-originate.spec.ts index 9fbb4b0685..3cdfbc2e14 100644 --- a/integration-tests/contract-batch-smart-rollup-originate.spec.ts +++ b/integration-tests/contract-batch-smart-rollup-originate.spec.ts @@ -13,14 +13,12 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { it('should be able to batch smart rollup originate with other operations', async (done) => { const kernel = '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a' - const originationProof = await Tezos.rpc.getOriginationProof({ kernel, kind: PvmKind.WASM2}) const batch = Tezos.contract .batch() .withSmartRollupOriginate({ pvmKind: PvmKind.WASM2, kernel, - originationProof, parametersType: { prim: 'bytes' }, }) .withOrigination({ diff --git a/integration-tests/contract-estimation-tests.spec.ts b/integration-tests/contract-estimation-tests.spec.ts index fa858995e8..0d9cc4e4bf 100644 --- a/integration-tests/contract-estimation-tests.spec.ts +++ b/integration-tests/contract-estimation-tests.spec.ts @@ -106,7 +106,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(472); expect(estimate.totalCost).toEqual(472); expect(estimate.usingBaseFeeMutez).toEqual(472); - expect(estimate.consumedMilligas).toEqual(1356379); + expect(estimate.consumedMilligas).toEqual(1356465); done(); }); @@ -124,7 +124,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(543); expect(estimate.totalCost).toEqual(129043); expect(estimate.usingBaseFeeMutez).toEqual(543); - expect(estimate.consumedMilligas).toEqual(1470914); + expect(estimate.consumedMilligas).toEqual(1471000); done(); }); @@ -138,7 +138,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(519); expect(estimate.totalCost).toEqual(79769); expect(estimate.usingBaseFeeMutez).toEqual(519); - expect(estimate.consumedMilligas).toEqual(1767492); + expect(estimate.consumedMilligas).toEqual(1767578); done(); }); @@ -152,7 +152,7 @@ CONFIGS().forEach(({ lib, setup, knownBaker, createAddress, rpc }) => { expect(estimate.minimalFeeMutez).toEqual(637); expect(estimate.totalCost).toEqual(159137); expect(estimate.usingBaseFeeMutez).toEqual(637); - expect(estimate.consumedMilligas).toEqual(2293140); + expect(estimate.consumedMilligas).toEqual(2293226); // Do the actual operation const op2 = await contract.methods.do(originate2()).send(); await op2.confirmation(); diff --git a/integration-tests/contract-smart-rollup-originate.spec.ts b/integration-tests/contract-smart-rollup-originate.spec.ts index 75a5660cd7..7b25b7f3d2 100644 --- a/integration-tests/contract-smart-rollup-originate.spec.ts +++ b/integration-tests/contract-smart-rollup-originate.spec.ts @@ -20,7 +20,6 @@ CONFIGS().forEach(({ lib, rpc, setup }) => { await op.confirmation(); expect(op.status).toEqual('applied'); - expect(op.originationProof).toBeDefined(); expect(op.kernel).toEqual('23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a'); done(); }); diff --git a/integration-tests/data/allTestsCases.ts b/integration-tests/data/allTestsCases.ts index 2a297a1c9a..482be9d14d 100644 --- a/integration-tests/data/allTestsCases.ts +++ b/integration-tests/data/allTestsCases.ts @@ -1363,8 +1363,6 @@ export const commonCases: TestCase[] = [ pvm_kind: PvmKind.WASM2, kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea18030fab8a3adde4b553c4d391e9cd19ee13b17941c1f49c040d621bbfbea964993810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', parameters_ty: { prim: 'bytes', }, diff --git a/integration-tests/data/metadataViews.ts b/integration-tests/data/metadataViews.ts index c8a9c23e0c..b3fe89a501 100644 --- a/integration-tests/data/metadataViews.ts +++ b/integration-tests/data/metadataViews.ts @@ -42,8 +42,7 @@ export const metadataViewsExample1 = { michelsonStorageView: { returnType: { prim: 'bytes', - args: [], - annots: [ '%returnedBytes' ] + args: [] }, code: [ { @@ -66,12 +65,7 @@ export const metadataViewsExample1 = { annots: [] } ], - annotations: [ - { - name: '%returnedBytes', - description: 'A bytes constant.' - } - ] + annotations: [] } } ] @@ -83,8 +77,7 @@ export const metadataViewsExample1 = { michelsonStorageView: { returnType: { prim: 'bytes', - args: [], - annots: [ '%returnedBytes' ] + args: [] }, code: [ { @@ -108,12 +101,7 @@ export const metadataViewsExample1 = { annots: [] } ], - annotations: [ - { - name: '%returnedBytes', - description: 'A bytes constant.' - } - ] + annotations: [] } } ] @@ -126,7 +114,6 @@ export const metadataViewsExample1 = { returnType: { prim: 'bytes', args: [], - annots: [ '%returnedBytes' ] }, code: [ { @@ -150,12 +137,7 @@ export const metadataViewsExample1 = { annots: [] } ], - annotations: [ - { - name: '%returnedBytes', - description: 'A bytes constant.' - } - ] + annotations: [] } } ] @@ -168,7 +150,6 @@ export const metadataViewsExample1 = { returnType: { prim: 'bytes', args: [], - annots: [ '%returnedBytes' ] }, code: [ { @@ -192,12 +173,7 @@ export const metadataViewsExample1 = { annots: [] } ], - annotations: [ - { - name: '%returnedBytes', - description: 'A bytes constant.' - } - ] + annotations: [] } } ] @@ -210,7 +186,6 @@ export const metadataViewsExample1 = { returnType: { prim: 'bytes', args: [], - annots: [ '%returnedBytes' ] }, code: [ { @@ -234,12 +209,7 @@ export const metadataViewsExample1 = { annots: [] } ], - annotations: [ - { - name: '%returnedBytes', - description: 'A bytes constant.' - } - ] + annotations: [] } } ] @@ -276,7 +246,7 @@ export const metadataViewsExample2 = { { michelsonStorageView: { parameter: { prim: 'int', args: [], annots: [ '%the_decisive_argument' ] }, - returnType: { prim: 'int', args: [], annots: [ '%negative_even_number' ] }, + returnType: { prim: 'int', args: [] }, code: [ { prim: 'CAR', args: [], annots: [] }, { prim: 'DUP', args: [], annots: [] }, @@ -303,10 +273,6 @@ export const metadataViewsExample2 = { { name: '%the_decisive_argument', description: 'The integer argument if >0 this will fail.' - }, - { - name: '%negative_even_number', - description: 'The result, if any, is twice the argument (%the_decisive_argument).' } ] } @@ -602,18 +568,13 @@ export const metadataViewsExample2 = { implementations: [ { michelsonStorageView: { - returnType: { prim: 'address', args: [], annots: [ '%ret' ] }, + returnType: { prim: 'address', args: [] }, code: [ { prim: 'DROP', args: [], annots: [] }, { prim: 'SELF', args: [], annots: [] }, { prim: 'ADDRESS', args: [], annots: [] } ], - annotations: [ - { - name: '%ret', - description: 'The address of the (any) contract, re-obtained in Michelson.' - } - ] + annotations: [] } } ] diff --git a/integration-tests/rpc-nodes.spec.ts b/integration-tests/rpc-nodes.spec.ts index df5ef68a38..758ecc1b9b 100644 --- a/integration-tests/rpc-nodes.spec.ts +++ b/integration-tests/rpc-nodes.spec.ts @@ -510,17 +510,6 @@ CONFIGS().forEach( expect(pendingOperations2.branch_refused).toBeInstanceOf(Array); done(); }) - - it('Verify that rpcClient.getOriginationProof will retrieve the proof needed for smart rollup originate', async (done) => { - const proof = await rpcClient.getOriginationProof({ - kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', - kind: PvmKind.WASM2 - }) - const hexRegex = RegExp('^[a-fA-F0-9]+$'); - expect(proof).toBeDefined(); - expect(hexRegex.test(proof)).toEqual(true); - done(); - }) }); }); } diff --git a/packages/taquito-contracts-library/src/rpc-wrapper.ts b/packages/taquito-contracts-library/src/rpc-wrapper.ts index eacbf95073..f0fb87a0ed 100644 --- a/packages/taquito-contracts-library/src/rpc-wrapper.ts +++ b/packages/taquito-contracts-library/src/rpc-wrapper.ts @@ -47,7 +47,6 @@ import { PendingOperationsV1, PendingOperationsV2, PendingOperationsQueryArguments, - OriginationProofParams, RPCSimulateOperationParam, } from '@taquito/rpc'; import { ContractsLibrary } from './taquito-contracts-library'; @@ -322,10 +321,4 @@ export class RpcWrapperContractsLibrary implements RpcClientInterface { ): Promise { return this.rpc.getPendingOperations(args); } - async getOriginationProof( - params: OriginationProofParams, - { block }: RPCOptions = defaultRPCOptions - ): Promise { - return this.rpc.getOriginationProof(params, { block }); - } } diff --git a/packages/taquito-local-forging/src/schema/operation.ts b/packages/taquito-local-forging/src/schema/operation.ts index 54563bc1ce..90aaae1c19 100644 --- a/packages/taquito-local-forging/src/schema/operation.ts +++ b/packages/taquito-local-forging/src/schema/operation.ts @@ -168,7 +168,6 @@ export const SmartRollupOriginateSchema = { storage_limit: CODEC.ZARITH, pvm_kind: CODEC.PVM_KIND, kernel: CODEC.PADDED_BYTES, - origination_proof: CODEC.PADDED_BYTES, parameters_ty: CODEC.VALUE, }; diff --git a/packages/taquito-local-forging/test/taquito-local-forging.spec.ts b/packages/taquito-local-forging/test/taquito-local-forging.spec.ts index edcb35890f..bce9fc4a92 100644 --- a/packages/taquito-local-forging/test/taquito-local-forging.spec.ts +++ b/packages/taquito-local-forging/test/taquito-local-forging.spec.ts @@ -296,8 +296,6 @@ describe('Forge and parse operations default protocol', () => { pvm_kind: 'wasm_2_0_0', kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea18030fab8a3adde4b553c4d391e9cd19ee13b17941c1f49c040d621bbfbea964993810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', parameters_ty: { prim: 'bytes', }, @@ -308,9 +306,6 @@ describe('Forge and parse operations default protocol', () => { expect(forged).toContain( '0000035323212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a' ); - expect(forged).toContain( - '000000770300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea18030fab8a3adde4b553c4d391e9cd19ee13b17941c1f49c040d621bbfbea964993810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9' - ); expect(forged).toContain('000000020369'); }); diff --git a/packages/taquito-rpc/src/rpc-client-interface.ts b/packages/taquito-rpc/src/rpc-client-interface.ts index f19a7df211..6081a1e0e2 100644 --- a/packages/taquito-rpc/src/rpc-client-interface.ts +++ b/packages/taquito-rpc/src/rpc-client-interface.ts @@ -47,7 +47,6 @@ import { PendingOperationsV1, PendingOperationsV2, PendingOperationsQueryArguments, - OriginationProofParams, RPCSimulateOperationParam, } from './types'; @@ -129,7 +128,6 @@ export interface RpcClientInterface { getPendingOperations( args: PendingOperationsQueryArguments ): Promise; - getOriginationProof(params: OriginationProofParams, options?: RPCOptions): Promise; } export enum RPCMethodName { @@ -171,5 +169,4 @@ export enum RPCMethodName { GET_TICKET_BALANCE = 'getTicketBalance', GET_ALL_TICKET_BALANCES = 'getAllTicketBalances', GET_PENDING_OPERATIONS = 'getPendingOperations', - GET_ORIGINATION_PROOF = 'getOriginationProof', } diff --git a/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts b/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts index 8f2bf12474..191ca7448c 100644 --- a/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts +++ b/packages/taquito-rpc/src/rpc-client-modules/rpc-cache.ts @@ -49,7 +49,6 @@ import { PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, - OriginationProofParams, RPCSimulateOperationParam, } from '../types'; import { InvalidAddressError, InvalidContractAddressError } from '@taquito/core'; @@ -73,8 +72,7 @@ type RpcMethodParam = | BigMapKey | BakingRightsQueryArguments | PendingOperationsQueryArguments - | EndorsingRightsQueryArguments - | OriginationProofParams; + | EndorsingRightsQueryArguments; const defaultTtl = 1000; @@ -1232,28 +1230,4 @@ export class RpcClientCache implements RpcClientInterface { return response; } } - - /** - * - * @param params contains the PVM kind and kernel to generate the origination proof from - * @description rpc call to generate the origination proof needed for the smart rollup originate operation - * @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes - */ - async getOriginationProof( - params: OriginationProofParams, - { block }: RPCOptions = defaultRPCOptions - ): Promise { - const key = this.formatCacheKey( - this.rpcClient.getRpcUrl(), - RPCMethodName.GET_ORIGINATION_PROOF, - [block, params] - ); - if (this.has(key)) { - return this.get(key); - } else { - const response = this.rpcClient.getOriginationProof(params, { block }); - this.put(key, response); - return response; - } - } } diff --git a/packages/taquito-rpc/src/taquito-rpc.ts b/packages/taquito-rpc/src/taquito-rpc.ts index b659e56f3e..f18856e281 100644 --- a/packages/taquito-rpc/src/taquito-rpc.ts +++ b/packages/taquito-rpc/src/taquito-rpc.ts @@ -60,7 +60,6 @@ import { PendingOperationsQueryArguments, PendingOperationsV1, PendingOperationsV2, - OriginationProofParams, RPCSimulateOperationParam, } from './types'; import { castToBigNumber } from './utils/utils'; @@ -1180,25 +1179,4 @@ export class RpcClient implements RpcClientInterface { query: args, }); } - - /** - * - * @param params contains the PVM kind and kernel to generate the origination proof from - * @description rpc call to generate the origination proof needed for a smart rollup originate operation - * @see https://tezos.gitlab.io/protocols/016_mumbai.html#rpc-changes - */ - async getOriginationProof( - params: OriginationProofParams, - { block }: { block: string } = defaultRPCOptions - ): Promise { - return this.httpBackend.createRequest( - { - url: this.createURL( - `/chains/${this.chain}/blocks/${block}/context/smart_rollups/all/origination_proof` - ), - method: 'POST', - }, - params - ); - } } diff --git a/packages/taquito-rpc/src/types.ts b/packages/taquito-rpc/src/types.ts index c8e614882f..6a9ab8dcf1 100644 --- a/packages/taquito-rpc/src/types.ts +++ b/packages/taquito-rpc/src/types.ts @@ -19,27 +19,27 @@ interface INodeExtender { type OtherEltsInner = | { - value: any; - } + value: any; + } | { - inode_extender: INodeExtender; - }; + inode_extender: INodeExtender; + }; export type OtherElts = | { - node: [string, { value: string } | { node: string }][]; - } + node: [string, { value: string } | { node: string }][]; + } | { - other_elts: OtherEltsInner; - }; + other_elts: OtherEltsInner; + }; type State = | { - inode: Inode; - } + inode: Inode; + } | { - other_elts: OtherElts; - }; + other_elts: OtherElts; + }; export interface Inode { length: string; @@ -48,11 +48,11 @@ export interface Inode { type TxRollupProofContextHash = | { - value: string; - } + value: string; + } | { - node: string; - }; + node: string; + }; export interface TxRollupProof { version: number; @@ -482,7 +482,6 @@ export interface OperationContentsSmartRollupOriginate { storage_limit: string; pvm_kind: PvmKind; kernel: string; - origination_proof: string; parameters_ty: MichelsonV1Expression; } @@ -527,7 +526,6 @@ export interface OperationContentsSmartRollupCement { gas_limit: string; storage_limit: string; rollup: string; - commitment: string; } export interface OperationContentsSmartRollupRefute { @@ -1070,7 +1068,6 @@ export interface OperationContentsAndResultSmartRollupOriginate { storage_limit: string; pvm_kind: PvmKind; kernel: string; - origination_proof: string; parameters_ty: MichelsonV1Expression; metadata: OperationContentsAndResultMetadataSmartRollupOriginate; } @@ -1119,7 +1116,6 @@ export interface OperationContentsAndResultSmartRollupCement { gas_limit: string; storage_limit: string; rollup: string; - commitment: string; metadata: OperationContentsAndResultMetadataSmartRollupCement; } @@ -1423,13 +1419,13 @@ export interface ScriptedContracts { export type BondId = | { - smart_rollup?: never; - tx_rollup: string; - } + smart_rollup?: never; + tx_rollup: string; + } | { - smart_rollup: string; - tx_rollup?: never; - }; + smart_rollup: string; + tx_rollup?: never; + }; export interface OperationBalanceUpdatesItem { kind: BalanceUpdateKindEnum; @@ -2193,10 +2189,10 @@ export interface ConstantsResponseProto010 extends ConstantsResponseProto009 { } // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ConstantsResponseProto009 extends ConstantsResponseProto008 {} +export interface ConstantsResponseProto009 extends ConstantsResponseProto008 { } // eslint-disable-next-line @typescript-eslint/no-empty-interface -export interface ConstantsResponseProto008 extends ConstantsResponseProto007 {} +export interface ConstantsResponseProto008 extends ConstantsResponseProto007 { } export interface ConstantsResponseProto007 extends Omit { @@ -2443,11 +2439,6 @@ export enum PvmKind { ARITH = 'arith', } -export interface OriginationProofParams { - kind: PvmKind; - kernel: string; -} - export interface SmartRollupPublishCommitment { compressed_state: string; inbox_level: number; diff --git a/packages/taquito-rpc/test/data/rpc-responses.ts b/packages/taquito-rpc/test/data/rpc-responses.ts index c0b01d97cb..3dcd71d4bb 100644 --- a/packages/taquito-rpc/test/data/rpc-responses.ts +++ b/packages/taquito-rpc/test/data/rpc-responses.ts @@ -5659,8 +5659,6 @@ export const smartRollupOriginateResponse = { pvm_kind: 'wasm_2_0_0', kernel: '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a', - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea18030fab8a3adde4b553c4d391e9cd19ee13b17941c1f49c040d621bbfbea964993810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', parameters_ty: { prim: 'bytes', }, @@ -5895,7 +5893,6 @@ export const smartRollupCementResponse = { gas_limit: '6986', storage_limit: '0', rollup: 'sr1CCHLfB1jjz4ikB2bm4XGPvTjafVgUzhLB', - commitment: 'src12mERNVEb3N1EVmbUbudctzajiezmd3q6EsgLexkgxNCHK8PNBi', metadata: { balance_updates: [ { diff --git a/packages/taquito-rpc/test/taquito-rpc.spec.ts b/packages/taquito-rpc/test/taquito-rpc.spec.ts index caba30d1aa..b3ea27a8d0 100644 --- a/packages/taquito-rpc/test/taquito-rpc.spec.ts +++ b/packages/taquito-rpc/test/taquito-rpc.spec.ts @@ -3950,8 +3950,8 @@ describe('RpcClient test', () => { const balanceUpdate = 'metadata' in response.contents[0] ? (response.contents[0]['metadata'][ - 'balance_updates' - ] as OperationMetadataBalanceUpdates[]) + 'balance_updates' + ] as OperationMetadataBalanceUpdates[]) : []; expect(balanceUpdate![0]['category']).toEqual(METADATA_BALANCE_UPDATES_CATEGORY.STORAGE_FEES); expect(balanceUpdate![1]['category']).toEqual(METADATA_BALANCE_UPDATES_CATEGORY.BLOCK_FEES); @@ -4012,8 +4012,8 @@ describe('RpcClient test', () => { const balanceUpdate = 'metadata' in response.contents[0] ? (response.contents[0]['metadata'][ - 'balance_updates' - ] as OperationMetadataBalanceUpdates[]) + 'balance_updates' + ] as OperationMetadataBalanceUpdates[]) : []; expect(balanceUpdate![0]['category']).toEqual(METADATA_BALANCE_UPDATES_CATEGORY.STORAGE_FEES); expect(balanceUpdate![1]['category']).toEqual(METADATA_BALANCE_UPDATES_CATEGORY.BLOCK_FEES); @@ -4323,9 +4323,6 @@ describe('RpcClient test', () => { expect(content.kernel).toEqual( '23212f7573722f62696e2f656e762073680a6578706f7274204b45524e454c3d22303036313733366430313030303030303031323830373630303337663766376630313766363030323766376630313766363030353766376637663766376630313766363030313766303036303031376630313766363030323766376630303630303030303032363130333131373336643631373237343566373236663663366337353730356636333666373236353061373236353631363435663639366537303735373430303030313137333664363137323734356637323666366336633735373035663633366637323635306337373732363937343635356636663735373437303735373430303031313137333664363137323734356637323666366336633735373035663633366637323635306237333734366637323635356637373732363937343635303030323033303530343033303430353036303530333031303030313037313430323033366436353664303230303061366236353732366536353663356637323735366530303036306161343031303432613031303237663431666130303266303130303231303132303030326630313030323130323230303132303032343730343430343165343030343131323431303034316534303034313030313030323161306230623038303032303030343163343030366230623530303130353766343166653030326430303030323130333431666330303266303130303231303232303030326430303030323130343230303032663031303032313035323030313130303432313036323030343230303334363034343032303030343130313661323030313431303136623130303131613035323030353230303234363034343032303030343130373661323030363130303131613062306230623164303130313766343164633031343138343032343139303163313030303231303034313834303232303030313030353431383430323130303330623062333830353030343165343030306231323266366236353732366536353663326636353665373632663732363536323666366637343030343166383030306230323030303130303431666130303062303230303032303034316663303030623032303030303030343166653030306230313031220a' ); - expect(content.origination_proof).toEqual( - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea18030fab8a3adde4b553c4d391e9cd19ee13b17941c1f49c040d621bbfbea964993810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9' - ); expect(content.parameters_ty).toEqual({ prim: 'bytes' }); const soruResult = content.metadata.operation_result; @@ -4467,7 +4464,6 @@ describe('RpcClient test', () => { expect(content.gas_limit).toEqual('6986'); expect(content.storage_limit).toEqual('0'); expect(content.rollup).toEqual('sr1CCHLfB1jjz4ikB2bm4XGPvTjafVgUzhLB'); - expect(content.commitment).toEqual('src12mERNVEb3N1EVmbUbudctzajiezmd3q6EsgLexkgxNCHK8PNBi'); const soruResult = content.metadata.operation_result; diff --git a/packages/taquito/src/batch/rpc-batch-provider.ts b/packages/taquito/src/batch/rpc-batch-provider.ts index 593c298da1..2950a64e8f 100644 --- a/packages/taquito/src/batch/rpc-batch-provider.ts +++ b/packages/taquito/src/batch/rpc-batch-provider.ts @@ -24,7 +24,7 @@ import { TransferTicketParams, IncreasePaidStorageParams, SmartRollupAddMessagesParams, - SmartRollupOriginateParamsWithProof, + SmartRollupOriginateParams, } from '../operations/types'; import { OpKind } from '@taquito/rpc'; import { ContractMethodObject } from '../contract/contract-methods/contract-method-object-param'; @@ -194,7 +194,7 @@ export class OperationBatch extends Provider { * * @param params Smart Rollup Originate operation parameter */ - withSmartRollupOriginate(params: SmartRollupOriginateParamsWithProof) { + withSmartRollupOriginate(params: SmartRollupOriginateParams) { this.operations.push({ kind: OpKind.SMART_ROLLUP_ORIGINATE, ...params }); return this; } diff --git a/packages/taquito/src/contract/prepare.ts b/packages/taquito/src/contract/prepare.ts index 96955e3bb7..fd326cdb4d 100644 --- a/packages/taquito/src/contract/prepare.ts +++ b/packages/taquito/src/contract/prepare.ts @@ -28,7 +28,7 @@ import { SmartRollupAddMessagesParams, RPCSmartRollupAddMessagesOperation, RPCSmartRollupOriginateOperation, - SmartRollupOriginateParamsWithProof, + SmartRollupOriginateParams, ActivationParams, RPCActivateOperation, } from '../operations/types'; @@ -324,9 +324,8 @@ export const createSmartRollupOriginateOperation = async ({ storageLimit, pvmKind, kernel, - originationProof, parametersType, -}: SmartRollupOriginateParamsWithProof) => { +}: SmartRollupOriginateParams) => { return { kind: OpKind.SMART_ROLLUP_ORIGINATE, source, @@ -335,7 +334,6 @@ export const createSmartRollupOriginateOperation = async ({ storage_limit: storageLimit, pvm_kind: pvmKind, kernel, - origination_proof: originationProof, parameters_ty: parametersType, } as RPCSmartRollupOriginateOperation; }; diff --git a/packages/taquito/src/contract/rpc-contract-provider.ts b/packages/taquito/src/contract/rpc-contract-provider.ts index 35dfed1195..d8948ae3f0 100644 --- a/packages/taquito/src/contract/rpc-contract-provider.ts +++ b/packages/taquito/src/contract/rpc-contract-provider.ts @@ -657,13 +657,8 @@ export class RpcContractProvider extends Provider implements ContractProvider, S params, this.estimator.smartRollupOriginate.bind(this.estimator) ); - const originationProof = await this.rpc.getOriginationProof({ - kind: params.pvmKind, - kernel: params.kernel, - }); - const completeParams = { ...params, originationProof }; - const prepared = await this.prepare.smartRollupOriginate({ ...completeParams, ...estimate }); + const prepared = await this.prepare.smartRollupOriginate({ ...params, ...estimate }); const content = prepared.opOb.contents.find( (op) => op.kind === OpKind.SMART_ROLLUP_ORIGINATE ) as OperationContentsSmartRollupOriginate; diff --git a/packages/taquito/src/operations/smart-rollup-originate-operation.ts b/packages/taquito/src/operations/smart-rollup-originate-operation.ts index 54da137a02..e42b34bb88 100644 --- a/packages/taquito/src/operations/smart-rollup-originate-operation.ts +++ b/packages/taquito/src/operations/smart-rollup-originate-operation.ts @@ -74,10 +74,6 @@ export class SmartRollupOriginateOperation return this.params.kernel; } - get originationProof() { - return this.params.origination_proof; - } - get errors() { return this.operationResults?.errors; } diff --git a/packages/taquito/src/operations/types.ts b/packages/taquito/src/operations/types.ts index 619bdb9bed..9dd87a8134 100644 --- a/packages/taquito/src/operations/types.ts +++ b/packages/taquito/src/operations/types.ts @@ -26,7 +26,7 @@ export type ParamsWithKind = | withKind | withKind | withKind - | withKind; + | withKind; export type ParamsWithKindExtended = ParamsWithKind | withKind; @@ -536,10 +536,6 @@ export interface SmartRollupOriginateParams { parametersType: MichelsonV1Expression; } -export interface SmartRollupOriginateParamsWithProof extends SmartRollupOriginateParams { - originationProof: string; -} - export interface RPCSmartRollupOriginateOperation { kind: OpKind.SMART_ROLLUP_ORIGINATE; source: string; @@ -548,7 +544,6 @@ export interface RPCSmartRollupOriginateOperation { storage_limit: number; pvm_kind: PvmKind; kernel: string; - origination_proof: string; parameters_ty: MichelsonV1Expression; } diff --git a/packages/taquito/src/prepare/prepare-provider.ts b/packages/taquito/src/prepare/prepare-provider.ts index b32bc70037..5686f1f8f6 100644 --- a/packages/taquito/src/prepare/prepare-provider.ts +++ b/packages/taquito/src/prepare/prepare-provider.ts @@ -905,18 +905,12 @@ export class PrepareProvider extends Provider implements PreparationProvider { }: SmartRollupOriginateParams): Promise { const { pkh } = await this.getKeys(); - const originationProof = await this.rpc.getOriginationProof({ - kind: rest.pvmKind, - kernel: rest.kernel, - }); - const protocolConstants = await this.context.readProvider.getProtocolConstants('head'); const DEFAULT_PARAMS = await this.getAccountLimits(pkh, protocolConstants); const op = await createSmartRollupOriginateOperation({ ...mergeLimits({ fee, storageLimit, gasLimit }, DEFAULT_PARAMS), ...rest, - originationProof, }); const operation = await this.addRevealOperationIfNeeded(op, pkh); diff --git a/packages/taquito/test/batch/rpc-batch-provider.spec.ts b/packages/taquito/test/batch/rpc-batch-provider.spec.ts index 7a2646231b..fb2ad3c2f7 100644 --- a/packages/taquito/test/batch/rpc-batch-provider.spec.ts +++ b/packages/taquito/test/batch/rpc-batch-provider.spec.ts @@ -663,7 +663,6 @@ describe('OperationBatch test', () => { kind: OpKind.SMART_ROLLUP_ORIGINATE, pvmKind: PvmKind.WASM2, kernel: '1234567890', - originationProof: '0987654321', parametersType: { prim: 'bytes' }, }, ]; @@ -681,7 +680,6 @@ describe('OperationBatch test', () => { gas_limit: '1330', storage_limit: '93', kernel: '1234567890', - origination_proof: '0987654321', parameters_ty: { prim: 'bytes' }, pvm_kind: 'wasm_2_0_0', counter: '1', @@ -704,7 +702,6 @@ describe('OperationBatch test', () => { kind: OpKind.SMART_ROLLUP_ORIGINATE, pvmKind: PvmKind.WASM2, kernel: '1234567890', - originationProof: '0987654321', parametersType: { prim: 'bytes' }, gasLimit: 1100, fee: 399, @@ -725,7 +722,6 @@ describe('OperationBatch test', () => { gas_limit: '1100', storage_limit: '95', kernel: '1234567890', - origination_proof: '0987654321', parameters_ty: { prim: 'bytes' }, pvm_kind: 'wasm_2_0_0', counter: '1', @@ -749,7 +745,6 @@ describe('OperationBatch test', () => { kind: OpKind.SMART_ROLLUP_ORIGINATE, pvmKind: PvmKind.WASM2, kernel: '1234567890', - originationProof: '0987654321', parametersType: { prim: 'bytes' }, }, ]; @@ -776,7 +771,6 @@ describe('OperationBatch test', () => { gas_limit: '1330', storage_limit: '93', kernel: '1234567890', - origination_proof: '0987654321', parameters_ty: { prim: 'bytes' }, pvm_kind: 'wasm_2_0_0', counter: '2', diff --git a/packages/taquito/test/contract/helper.ts b/packages/taquito/test/contract/helper.ts index bf3a22a062..7789324efa 100644 --- a/packages/taquito/test/contract/helper.ts +++ b/packages/taquito/test/contract/helper.ts @@ -1758,8 +1758,6 @@ export const smartRollupOriginateWithReveal = { pvm_kind: 'wasm_2_0_0', kernel: '0061736d0100000001280760037f7f7f017f60027f7f017f60057f7f7f7f7f017f60017f0060017f017f60027f7f0060000002610311736d6172745f726f6c6c75705f636f72650a726561645f696e707574000011736d6172745f726f6c6c75705f636f72650c77726974655f6f7574707574000111736d6172745f726f6c6c75705f636f72650b73746f72655f77726974650002030504030405060503010001071402036d656d02000a6b65726e656c5f72756e00060aa401042a01027f41fa002f0100210120002f010021022001200247044041e4004112410041e400410010021a0b0b0800200041c4006b0b5001057f41fe002d0000210341fc002f0100210220002d0000210420002f0100210520011004210620042003460440200041016a200141016b10011a0520052002460440200041076a200610011a0b0b0b1d01017f41dc0141840241901c100021004184022000100541840210030b0b38050041e4000b122f6b65726e656c2f656e762f7265626f6f740041f8000b0200010041fa000b0200020041fc000b0200000041fe000b0101', - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', parameters_ty: { prim: 'bytes', }, diff --git a/packages/taquito/test/contract/rpc-contract-provider.spec.ts b/packages/taquito/test/contract/rpc-contract-provider.spec.ts index 8433d0d2eb..f0b6953dec 100644 --- a/packages/taquito/test/contract/rpc-contract-provider.spec.ts +++ b/packages/taquito/test/contract/rpc-contract-provider.spec.ts @@ -49,7 +49,6 @@ describe('RpcContractProvider test', () => { getSaplingDiffById: jest.Mock; getProtocols: jest.Mock; getCurrentPeriod: jest.Mock; - getOriginationProof: jest.Mock; getConstants: jest.Mock; }; @@ -110,7 +109,6 @@ describe('RpcContractProvider test', () => { getSaplingDiffById: jest.fn(), getProtocols: jest.fn(), getCurrentPeriod: jest.fn(), - getOriginationProof: jest.fn(), getConstants: jest.fn(), }; @@ -1498,9 +1496,7 @@ describe('RpcContractProvider test', () => { it('Should have correct returned values with origination being estimated', async (done) => { const estimate = new Estimate(1230000, 10000, 100, 100); mockEstimate.smartRollupOriginate.mockResolvedValue(estimate); - mockRpcClient.getOriginationProof.mockResolvedValue( - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9' - ); + const smartRollupOriginate = await rpcContractProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, kernel: @@ -1523,8 +1519,6 @@ describe('RpcContractProvider test', () => { parameters_ty: { prim: 'bytes', }, - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', counter: '2', fee: '433', gas_limit: '1330', @@ -1545,9 +1539,7 @@ describe('RpcContractProvider test', () => { it('Should have correct returned values with origination with reveal with specified values for estimate', async (done) => { const estimate = new Estimate(1230000, 10000, 100, 100); mockEstimate.smartRollupOriginate.mockResolvedValue(estimate); - mockRpcClient.getOriginationProof.mockResolvedValue( - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9' - ); + const smartRollupOriginate = await rpcContractProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, kernel: @@ -1573,8 +1565,6 @@ describe('RpcContractProvider test', () => { parameters_ty: { prim: 'bytes', }, - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', counter: '2', fee: '9999', gas_limit: '12345', @@ -1599,9 +1589,6 @@ describe('RpcContractProvider test', () => { mockEstimate.smartRollupOriginate.mockResolvedValue(estimate); mockReadProvider.isAccountRevealed.mockResolvedValue(true); - mockRpcClient.getOriginationProof.mockResolvedValue( - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9' - ); const smartRollupOriginate = await rpcContractProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, kernel: @@ -1623,8 +1610,6 @@ describe('RpcContractProvider test', () => { parameters_ty: { prim: 'bytes', }, - origination_proof: - '0300020c4a316fa1079bfc23dac5ecc609ab10e26490e378a81e774c51176040bea180467070f4682a44b982768d522ec6380982f446488c0176ed7c13aa1d6c12a03a810764757261626c658108726561646f6e6c79d00b749948da9186d29aed2f9327b46793f18b1e6499c40f0ddbf0bf785e85e2e9', counter: '1', fee: '433', gas_limit: '1330', diff --git a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts b/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts index 7f794e784d..84683f47f8 100644 --- a/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts +++ b/packages/taquito/test/estimate/rpc-estimate-provider.spec.ts @@ -1167,7 +1167,6 @@ describe('RPCEstimateProvider test wallet', () => { getChainId: jest.Mock; getConstants: jest.Mock; getProtocols: jest.Mock; - getOriginationProof: jest.Mock; }; let mockForger: { @@ -1195,7 +1194,6 @@ describe('RPCEstimateProvider test wallet', () => { getChainId: jest.fn(), getConstants: jest.fn(), getProtocols: jest.fn(), - getOriginationProof: jest.fn(), }; mockForger = { @@ -1568,7 +1566,6 @@ describe('RPCEstimateProvider test wallet', () => { smart_rollup_origination_size: new BigNumber(6314), }); mockRpcClient.simulateOperation.mockResolvedValue(smartRollupOriginateWithReveal); - mockRpcClient.getOriginationProof.mockResolvedValue('987654321'); const estimate = await estimateProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, diff --git a/packages/taquito/test/prepare/prepare-provider.spec.ts b/packages/taquito/test/prepare/prepare-provider.spec.ts index 0568530098..ee2a298753 100644 --- a/packages/taquito/test/prepare/prepare-provider.spec.ts +++ b/packages/taquito/test/prepare/prepare-provider.spec.ts @@ -33,7 +33,6 @@ describe('PrepareProvider test', () => { getCurrentPeriod: jest.Mock; getConstants: jest.Mock; getManagerKey: jest.Mock; - getOriginationProof: jest.Mock; forgeOperations: jest.Mock; }; @@ -67,7 +66,6 @@ describe('PrepareProvider test', () => { getCurrentPeriod: jest.fn(), getConstants: jest.fn(), getManagerKey: jest.fn(), - getOriginationProof: jest.fn(), forgeOperations: jest.fn(), }; @@ -1039,7 +1037,6 @@ describe('PrepareProvider test', () => { describe('SmartRollupOriginate', () => { it('Should prepare smartRollupOriginate without reveal', async (done) => { mockReadProvider.isAccountRevealed.mockResolvedValue(true); - mockRpcClient.getOriginationProof.mockResolvedValue('987654321'); const prepared = await prepareProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, @@ -1056,7 +1053,6 @@ describe('PrepareProvider test', () => { kind: 'smart_rollup_originate', pvm_kind: 'wasm_2_0_0', kernel: '123456789', - origination_proof: '987654321', parameters_ty: { prim: 'bytes', }, @@ -1076,7 +1072,6 @@ describe('PrepareProvider test', () => { it('Should prepare smartRollupOriginate with reveal', async (done) => { mockReadProvider.isAccountRevealed.mockResolvedValue(false); - mockRpcClient.getOriginationProof.mockResolvedValue('987654321'); const prepared = await prepareProvider.smartRollupOriginate({ pvmKind: PvmKind.WASM2, @@ -1102,7 +1097,6 @@ describe('PrepareProvider test', () => { kind: 'smart_rollup_originate', pvm_kind: 'wasm_2_0_0', kernel: '123456789', - origination_proof: '987654321', parameters_ty: { prim: 'bytes', },