Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/clonenet #724

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
569 changes: 569 additions & 0 deletions local-tests/setup/networkContext.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions local-tests/setup/tinny-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export interface ProcessEnvs {
*/
NETWORK: LIT_NETWORK_VALUES;

NETWORK_TYPE: 'mainnet' | 'cloneNet';

/**
* The number of milliseconds to wait between each request.
*/
Expand Down
6 changes: 6 additions & 0 deletions local-tests/setup/tinny-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ export class TinnyEnvironment {
TIME_TO_RELEASE_KEY: parseInt(process.env['TIME_TO_RELEASE_KEY']) || 10000,
RUN_IN_BAND: process.env['RUN_IN_BAND'] === 'true',
RUN_IN_BAND_INTERVAL: parseInt(process.env['RUN_IN_BAND_INTERVAL']) || 5000,
NETWORK_TYPE: (process.env['NETWORK_TYPE'] || 'mainnet') as
| 'mainnet'
| 'cloneNet',

// Available Accounts
// ==================
Expand Down Expand Up @@ -242,18 +245,21 @@ export class TinnyEnvironment {
debug: this.processEnvs.DEBUG,
checkNodeAttestation: false, // disable node attestation check for local testing
contractContext: networkContext,
networkType: this.processEnvs.NETWORK_TYPE || 'mainnet',
});
} else if (centralisation === 'decentralised') {
this.litNodeClient = new LitNodeClient({
litNetwork: this.network,
checkNodeAttestation: true,
debug: this.processEnvs.DEBUG,
networkType: this.processEnvs.NETWORK_TYPE || 'mainnet',
});
} else if (centralisation === 'centralised') {
this.litNodeClient = new LitNodeClient({
litNetwork: this.network,
checkNodeAttestation: false,
debug: this.processEnvs.DEBUG,
networkType: this.processEnvs.NETWORK_TYPE || 'mainnet',
});
} else {
throw new Error(`Network not supported: "${this.network}"`);
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@cosmjs/stargate": "0.30.1",
"@dotenvx/dotenvx": "^1.6.4",
"@lit-protocol/accs-schemas": "^0.0.19",
"@lit-protocol/contracts": "^0.0.63",
"@lit-protocol/contracts": "^0.0.73",
"@metamask/eth-sig-util": "5.0.2",
"@mysten/sui.js": "^0.37.1",
"@openagenda/verror": "^3.1.4",
Expand Down
Loading
Loading