Skip to content

Commit

Permalink
ci: initial configuration of oxford2 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hui-an-yang committed Dec 14, 2023
1 parent bcebcae commit c2d2a57
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
include:
- testnet: nairobinet
testnet_uppercase: NAIROBINET
- testnet: oxfordnet
testnet_uppercase: OXFORDNET
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -72,6 +74,10 @@ jobs:
testnet: nairobinet
testnet_uppercase: NAIROBINET
flextesa_docker_image: oxheadalpha/flextesa:20230607
- protocol: Oxford
testnet: oxfordnet
testnet_uppercase: OXFORDNET
flextesa_docker_image: oxheadalpha/flextesa:latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,15 @@
"octez",
"opkind",
"originations",
"oxfordnet",
"oxheadalpha",
"Pkhfrom",
"precommit",
"prevalidated",
"prevalidation",
"println",
"Protofire",
"ProxfordY",
"PtNairobi",
"refetched",
"rollups",
Expand Down
25 changes: 21 additions & 4 deletions integration-tests/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 { knownContractsProxfordY } from './known-contracts-ProxfordY';

const nodeCrypto = require('crypto');

Expand Down Expand Up @@ -145,10 +146,22 @@ const nairobinetEphemeral: Config =
const nairobinetSecretKey: Config =
{ ...nairobinetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-nairobinet-full:8732' } };

const oxfordnetEphemeral: Config =
defaultConfig({
networkName: 'OXFORDNET',
protocol: Protocols.ProxfordY,
defaultRpc: 'http://ecad-oxfordnet-full.i.tez.ie:8732',
knownContracts: knownContractsProxfordY,
signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/oxfordnet')
});

const oxfordnetSecretKey: Config =
{ ...oxfordnetEphemeral, ...{ signerConfig: defaultSecretKey }, ...{ defaultRpc: 'http://ecad-oxfordnet-full:8732' } };

const ghostnetEphemeral: Config =
defaultConfig({
networkName: 'GHOSTNET',
protocol: Protocols.PtMumbai2,
protocol: Protocols.PtNairobi,
defaultRpc: 'http://ecad-ghostnet-rolling:8732',
knownContracts: knownContractsPtGhostnet,
signerConfig: defaultEphemeralConfig('https://keygen.ecadinfra.com/ghostnet')
Expand All @@ -172,21 +185,25 @@ const mondaynetSecretKey: Config =
const providers: Config[] = [];

if (process.env['RUN_WITH_SECRET_KEY']) {
providers.push(nairobinetSecretKey);
providers.push(nairobinetSecretKey, oxfordnetSecretKey);
} 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']) {
providers.push(mondaynetEphemeral);
} else {
providers.push(nairobinetEphemeral);
providers.push(nairobinetEphemeral, oxfordnetEphemeral);
}

const setupForger = (Tezos: TezosToolkit, forger: ForgerType): void => {
Expand Down Expand Up @@ -215,7 +232,7 @@ const setupSignerWithFreshKey = async (
headers: requestHeaders,
json: false,
});

const signer = new InMemorySigner(key!);
Tezos.setSignerProvider(signer);
} catch (e) {
Expand Down
8 changes: 8 additions & 0 deletions integration-tests/known-contracts-ProxfordY.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { KnownContracts } from './known-contracts';
export const knownContractsProxfordY: KnownContracts = {
contract: "KT1UTWPed6L8pNmWJJhPgwLELxmpua18nvZB",
bigMapContract: "KT1TpJY5K5wg9dYgMhLpcvmPnreE4trxkCdh",
tzip12BigMapOffChainContract: "KT1PxJcsmPm365VGCbopTz7411kwF7u1mFkv",
saplingContract: "KT1PPnjL9TudMnZ23UmnGkCLbZ7TiMjNUVhe",
onChainViewContractAddress: "KT1Mc9DhvGtZPCg5TobjZdgHheCmDERUYCTj",
};
8 changes: 0 additions & 8 deletions integration-tests/known-contracts-PtMumbai2.ts

This file was deleted.

11 changes: 8 additions & 3 deletions integration-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"name": "integration-tests",
"scripts": {
"test": "jest",
"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: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:oxfordnet": "OXFORDNET=true jest",
"test:oxfordnet-secret-key": "RUN_OXFORDNET_WITH_SECRET_KEY=true jest --runInBand",
"test:mondaynet": "MONDAYNET=true jest",
"test:mondaynet-secret-key": "RUN_MONDAYNET_WITH_SECRET_KEY=true jest --runInBand",
"test": "jest"
"test:ghostnet": "GHOSTNET=true jest",
"test:ghostnet-secret-key": "RUN_GHSOTNET_WITH_SECRET_KEY=true jest --runInBand",

"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"
},
"version": "17.5.0",
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion packages/taquito-local-forging/src/protocols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export enum ProtocolsHash {
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf',
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -35,7 +36,8 @@ const protoLevel: Record<ProtocolsHash, number> = {
PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16,
PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16,
PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 18,
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 20,
};

export function ProtoInferiorTo(a: ProtocolsHash, b: ProtocolsHash): boolean {
Expand Down
4 changes: 3 additions & 1 deletion packages/taquito-michel-codec/src/michelson-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,7 @@ export enum Protocol {
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf',
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK', // temporary protocol hash
}

Expand Down Expand Up @@ -432,7 +433,8 @@ const protoLevel: Record<ProtocolID, number> = {
PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc: 16,
PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1: 16,
PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf: 17,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 18,
ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH: 19,
ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK: 20,
};

export function ProtoGreaterOrEqual(a: ProtocolID, b: ProtocolID): boolean {
Expand Down
9 changes: 6 additions & 3 deletions packages/taquito/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ export const DEFAULT_GAS_LIMIT = {
DELEGATION: 10600,
ORIGINATION: 10600,
TRANSFER: 10600,
/* This is used for gas_limit. There is no harm in setting a higher limit.
Only if an account has a balance that is very close to the total gas consumption,
/* This is used for gas_limit. There is no harm in setting a higher limit.
Only if an account has a balance that is very close to the total gas consumption,
then this margin can fail the operation.
Another benefit of this higher value is that then Dapps build with Taquito 17 can
still work with Mumbainet, as this value is higher than the reveal cost in Mumbai.
Expand Down Expand Up @@ -46,6 +46,7 @@ export enum Protocols {
PtMumbaii = 'PtMumbaiiFFEGbew1rRjzSPyzRbA51Tm3RVZL5suHPxSZYDhCEc',
PtMumbai2 = 'PtMumbai2TmsJHNGRkD8v8YDbtao7BLUC3wjASn1inAKLFCjaH1',
PtNairobi = 'PtNairobiyssHuh87hEhfVBGCVrK3WnS8Z2FT4ymB5tAa4r1nQf',
ProxfordY = 'ProxfordYmVfjWnRcgjWH36fW6PArwqykTFzotUxRs6gmTcZDuH',
ProtoALpha = 'ProtoALphaALphaALphaALphaALphaALphaALphaALphaDdp3zK',
}

Expand All @@ -64,7 +65,8 @@ export const protocols = {
'015': [Protocols.PtLimaPtL],
'016': [Protocols.PtMumbai2], // mumbai v2
'017': [Protocols.PtNairobi],
'018': [Protocols.ProtoALpha],
'019': [Protocols.ProxfordY],
'020': [Protocols.ProtoALpha],
};

export enum ChainIds {
Expand All @@ -83,6 +85,7 @@ export enum ChainIds {
MUMBAINET = 'NetXQw6nWSnrJ5t',
MUMBAINET2 = 'NetXgbcrNtXD2yA',
NAIROBINET = 'NetXyuzvDo2Ugzb',
OXFORDNET2 = 'NetXxWsskGahzQB',
}

export const getRevealGasLimit = (address: string) =>
Expand Down

0 comments on commit c2d2a57

Please sign in to comment.