From 9e07e3cd625d73ad55725b5738626ee037ccc0cb Mon Sep 17 00:00:00 2001 From: Daniele Lisi <22307776+danielelisi@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:21:40 +0200 Subject: [PATCH 1/2] Add configuration for running integration tests against Oxfordnet --- .github/workflows/main.yml | 4 +++- integration-tests/config.ts | 4 ++++ integration-tests/known-contracts-Proxford.ts | 5 +++++ integration-tests/package.json | 2 ++ packages/taquito-local-forging/src/protocols.ts | 4 +++- packages/taquito-michel-codec/src/michelson-types.ts | 4 +++- packages/taquito/src/constants.ts | 5 ++++- 7 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 integration-tests/known-contracts-Proxford.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36bf06b111..c121c6e162 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,6 +45,8 @@ jobs: include: - testnet: nairobinet testnet_uppercase: NAIROBINET + - testnet: oxfordnet + testnet_uppercase: OXFORDNET steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 @@ -128,4 +130,4 @@ jobs: TEZOS_RPC_${{ matrix.testnet_uppercase }}: http://localhost:20000 POLLING_INTERVAL_MILLISECONDS: 100 RPC_CACHE_MILLISECONDS: 0 - TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb \ No newline at end of file + TEZOS_BAKER: tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb diff --git a/integration-tests/config.ts b/integration-tests/config.ts index 310c36d72f..851eb2e009 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -175,12 +175,16 @@ if (process.env['RUN_WITH_SECRET_KEY']) { providers.push(nairobinetSecretKey); } else if (process.env['RUN_NAIROBINET_WITH_SECRET_KEY']) { providers.push(nairobinetSecretKey); +} else if (process.env['RUN_OXFORDNET_WITH_SECRET_KEY']) { + providers.push(oxfordnetSecretKey); } else if (process.env['RUN_GHOSTNET_WITH_SECRET_KEY']) { providers.push(ghostnetSecretKey); } else if (process.env['RUN_MONDAYNET_WITH_SECRET_KEY']) { providers.push(mondaynetSecretKey); } else if (process.env['NAIROBINET']) { providers.push(nairobinetEphemeral); +} else if (process.env['OXFORDNET']) { + providers.push(oxfordnetEphemeral); } else if (process.env['GHOSTNET']) { providers.push(ghostnetEphemeral); } else if (process.env['MONDAYNET']) { diff --git a/integration-tests/known-contracts-Proxford.ts b/integration-tests/known-contracts-Proxford.ts new file mode 100644 index 0000000000..c7574e7cb8 --- /dev/null +++ b/integration-tests/known-contracts-Proxford.ts @@ -0,0 +1,5 @@ +export const knownContractProxford = "KT1TU9LydXWri8CBTQmzwnwjCm3dK8jt1LQA"; +export const knownBigMapContractProxford = "KT1MYLamQavaVMYqgn9f4gMgHzEZfQD73qYs"; +export const knownTzip12BigMapOffChainContractProxford = "KT1XX1JK4C7aPL2joE7nfeWRwPdrJYwroAUa"; +export const knownSaplingContractProxford = "KT1MfFxdU3kpXMSmHZN4tYBbYkGRAbLt5Q1Y"; +export const knownOnChainViewContractAddressProxford = "KT1TYMtN2yFQDmk82VFymQeZapp6BF1NsZ7B"; diff --git a/integration-tests/package.json b/integration-tests/package.json index 9a62460eb6..eef69a2de1 100644 --- a/integration-tests/package.json +++ b/integration-tests/package.json @@ -4,6 +4,8 @@ "test:secret-key": "RUN_WITH_SECRET_KEY=true jest --runInBand", "test:nairobinet": "NAIROBINET=true jest", "test:nairobinet-secret-key": "RUN_NAIROBINET_WITH_SECRET_KEY=true jest --runInBand", + "test:oxfordnet": "OXFORDNET=true jest", + "test:oxfordnet-secret-key": "RUN_OXFORDNET_WITH_SECRET_KEY=true jest --runInBand", "test:originate-known-contracts": "node -r ts-node/register originate-known-contracts.ts", "originate-known-contracts-and-run-test": "node -r ts-node/register originate-known-contracts.ts && jest", "test:mondaynet": "MONDAYNET=true jest", diff --git a/packages/taquito-local-forging/src/protocols.ts b/packages/taquito-local-forging/src/protocols.ts index 3c5023ce69..9ac6682eec 100644 --- a/packages/taquito-local-forging/src/protocols.ts +++ b/packages/taquito-local-forging/src/protocols.ts @@ -15,6 +15,7 @@ export enum ProtocolsHash { PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc', PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', + Proxford = 'ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -35,7 +36,8 @@ const protoLevel: Record = { PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16, PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16, PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17, - ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 18, + ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8: 18, + ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 19, }; export function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean { diff --git a/packages/taquito-michel-codec/src/michelson-types.ts b/packages/taquito-michel-codec/src/michelson-types.ts index 3dbb4e9914..1627634f46 100644 --- a/packages/taquito-michel-codec/src/michelson-types.ts +++ b/packages/taquito-michel-codec/src/michelson-types.ts @@ -402,6 +402,7 @@ export enum Protocol { PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc', PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', + Proxford = 'ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash } @@ -434,7 +435,8 @@ const protoLevel: Record = { PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16, PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16, PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17, - ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 18, + ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8: 18, + ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 19, }; export function ProtoGreaterOrEqual(a: ProtocolID, b: ProtocolID): boolean { diff --git a/packages/taquito/src/constants.ts b/packages/taquito/src/constants.ts index 6127ec379c..3a2675177e 100644 --- a/packages/taquito/src/constants.ts +++ b/packages/taquito/src/constants.ts @@ -46,6 +46,7 @@ export enum Protocols { PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc', PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1', PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf', + Proxford = 'ProxfordSW2S7fvchT1Zgj2avb5UES194neRyYVXoaDGvF9egt8', ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', } @@ -64,7 +65,8 @@ export const protocols = { '015': [Protocols.PtLimaPtL], '016': [Protocols.PtMumbai2], // mumbai v2 '017': [Protocols.PtNairobi], - '018': [Protocols.ProtoALpha], + '018': [Protocols.Proxford], + '019': [Protocols.ProtoALpha], }; export enum ChainIds { @@ -83,6 +85,7 @@ export enum ChainIds { MUMBAINET = 'NetXQw6nWSnrJ5t', MUMBAINET2 = 'NetXgbcrNtXD2yA', NAIROBINET = 'NetXyuzvDo2Ugzb', + OXFORDNET = 'NetXH6zDyMzRsUy', } export const getRevealGasLimit = (address: string) => From 512a6147c5fc892f4870509442231e7a8feba643 Mon Sep 17 00:00:00 2001 From: Daniele Lisi <22307776+danielelisi@users.noreply.github.com> Date: Fri, 1 Sep 2023 20:38:41 +0200 Subject: [PATCH 2/2] Resolve merge conflicts --- integration-tests/config.ts | 13 +++++++++++++ integration-tests/known-contracts-Proxford.ts | 13 ++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/integration-tests/config.ts b/integration-tests/config.ts index 851eb2e009..b71fe8bf6e 100644 --- a/integration-tests/config.ts +++ b/integration-tests/config.ts @@ -8,6 +8,7 @@ import { KnownContracts } from './known-contracts'; import { knownContractsProtoALph } from './known-contracts-ProtoALph'; import { knownContractsPtGhostnet } from './known-contracts-PtGhostnet'; import { knownContractsPtNairobi } from './known-contracts-PtNairobi'; +import { knownContractsProxford } from './known-contracts-Proxford'; const nodeCrypto = require('crypto'); @@ -145,6 +146,18 @@ const nairobinetEphemeral: Config = const nairobinetSecretKey: Config = { ...nairobinetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-nairobinet-full:8732' } }; +const oxfordnetEphemeral: Config = + defaultConfig({ + networkName: 'OXFORDNET', + protocol: Protocols.Proxford, + defaultRpc: 'http://ecad-oxfordnet-full.i.tez.ie:8732', + knownContracts: knownContractsProxford, + signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/oxfordnet') + }); + +const oxfordnetSecretKey: Config = + { ...oxfordnetEphemeral, ...{ signerConfig: defaultSecretKey } }; + const ghostnetEphemeral: Config = defaultConfig({ networkName: 'GHOSTNET', diff --git a/integration-tests/known-contracts-Proxford.ts b/integration-tests/known-contracts-Proxford.ts index c7574e7cb8..d201838544 100644 --- a/integration-tests/known-contracts-Proxford.ts +++ b/integration-tests/known-contracts-Proxford.ts @@ -1,5 +1,8 @@ -export const knownContractProxford = "KT1TU9LydXWri8CBTQmzwnwjCm3dK8jt1LQA"; -export const knownBigMapContractProxford = "KT1MYLamQavaVMYqgn9f4gMgHzEZfQD73qYs"; -export const knownTzip12BigMapOffChainContractProxford = "KT1XX1JK4C7aPL2joE7nfeWRwPdrJYwroAUa"; -export const knownSaplingContractProxford = "KT1MfFxdU3kpXMSmHZN4tYBbYkGRAbLt5Q1Y"; -export const knownOnChainViewContractAddressProxford = "KT1TYMtN2yFQDmk82VFymQeZapp6BF1NsZ7B"; +import { KnownContracts } from './known-contracts'; +export const knownContractsProxford: KnownContracts = { + contract: "KT1TU9LydXWri8CBTQmzwnwjCm3dK8jt1LQA", + bigMapContract: "KT1MYLamQavaVMYqgn9f4gMgHzEZfQD73qYs", + tzip12BigMapOffChainContract: "KT1XX1JK4C7aPL2joE7nfeWRwPdrJYwroAUa", + saplingContract: "KT1MfFxdU3kpXMSmHZN4tYBbYkGRAbLt5Q1Y", + onChainViewContractAddress: "KT1TYMtN2yFQDmk82VFymQeZapp6BF1NsZ7B" +};