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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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' | 'random';

/**
* The number of milliseconds to wait between each request.
*/
Expand Down
13 changes: 13 additions & 0 deletions local-tests/setup/tinny-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ 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'] || '') as
| 'mainnet'
| 'cloneNet'
| 'random',

// Available Accounts
// ==================
Expand Down Expand Up @@ -242,18 +246,27 @@ export class TinnyEnvironment {
debug: this.processEnvs.DEBUG,
checkNodeAttestation: false, // disable node attestation check for local testing
contractContext: networkContext,
...(this.processEnvs.NETWORK_TYPE !== 'random' && {
networkType: this.processEnvs.NETWORK_TYPE || 'mainnet',
}),
});
} else if (centralisation === 'decentralised') {
this.litNodeClient = new LitNodeClient({
litNetwork: this.network,
checkNodeAttestation: true,
debug: this.processEnvs.DEBUG,
...(this.processEnvs.NETWORK_TYPE !== 'random' && {
networkType: this.processEnvs.NETWORK_TYPE || 'mainnet',
}),
});
} else if (centralisation === 'centralised') {
this.litNodeClient = new LitNodeClient({
litNetwork: this.network,
checkNodeAttestation: false,
debug: this.processEnvs.DEBUG,
...(this.processEnvs.NETWORK_TYPE !== 'random' && {
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": "feature-clonenet",
"@metamask/eth-sig-util": "5.0.2",
"@mysten/sui.js": "^0.37.1",
"@openagenda/verror": "^3.1.4",
Expand Down
4 changes: 1 addition & 3 deletions packages/access-control-conditions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,5 @@
"tags": [
"universal"
],
"version": "7.0.0",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts"
"version": "7.0.0"
}
4 changes: 1 addition & 3 deletions packages/auth-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,5 @@
"tags": [
"browser"
],
"version": "7.0.0",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts"
"version": "7.0.0"
}
4 changes: 1 addition & 3 deletions packages/auth-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@
"crypto": false,
"stream": false
},
"version": "7.0.0",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts"
"version": "7.0.0"
}
4 changes: 1 addition & 3 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,5 @@
"tags": [
"universal"
],
"version": "7.0.0",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts"
"version": "7.0.0"
}
4 changes: 1 addition & 3 deletions packages/contracts-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,5 @@
"tags": [
"universal"
],
"version": "7.0.0",
"main": "./dist/src/index.js",
"typings": "./dist/src/index.d.ts"
"version": "7.0.0"
}
Loading