Skip to content

Commit edfcb61

Browse files
committed
👀 quick update
1 parent 367d903 commit edfcb61

File tree

6 files changed

+65
-60
lines changed

6 files changed

+65
-60
lines changed

local-tests/setup/networkContext.json

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Allowlist": {
3-
"address": "0x7a2088a1bFc9d81c55368AE168C2C02570cB814F",
3+
"address": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
44
"abi": [
55
{
66
"inputs": [],
@@ -231,7 +231,7 @@
231231
"name": "Allowlist"
232232
},
233233
"LITToken": {
234-
"address": "0x0DCd1Bf9A1b36cE34237eEaFef220932846BCD82",
234+
"address": "0x59b670e9fA9D0A427751Af201D676719a970857b",
235235
"abi": [
236236
{
237237
"inputs": [
@@ -1279,7 +1279,7 @@
12791279
"name": "LITToken"
12801280
},
12811281
"Multisender": {
1282-
"address": "0x4826533B4897376654Bb4d4AD88B7faFD0C98528",
1282+
"address": "0x4c5859f0F772848b2D91F1D83E2Fe57935348029",
12831283
"abi": [
12841284
{
12851285
"anonymous": false,
@@ -1388,7 +1388,7 @@
13881388
"name": "Multisender"
13891389
},
13901390
"PKPHelper": {
1391-
"address": "0xcbEAF3BDe82155F56486Fb5a1072cb8baAf547cc",
1391+
"address": "0x04C89607413713Ec9775E14b954286519d836FEf",
13921392
"abi": [
13931393
{
13941394
"inputs": [
@@ -2370,7 +2370,7 @@
23702370
"name": "PKPHelper"
23712371
},
23722372
"PKPNFT": {
2373-
"address": "0xa82fF9aFd8f496c3d6ac40E2a0F282E47488CFc9",
2373+
"address": "0x99bbA657f2BbC93c02D617f8bA121cB8Fc104Acf",
23742374
"abi": [
23752375
{
23762376
"inputs": [
@@ -3574,7 +3574,7 @@
35743574
"name": "PKPNFT"
35753575
},
35763576
"PKPNFTMetadata": {
3577-
"address": "0x5eb3Bc0a489C5A8288765d2336659EbCA68FCd00",
3577+
"address": "0x82e01223d51Eb87e16A03E24687EDF0F294da6f1",
35783578
"abi": [
35793579
{
35803580
"inputs": [
@@ -3732,7 +3732,7 @@
37323732
"name": "PKPNFTMetadata"
37333733
},
37343734
"PKPPermissions": {
3735-
"address": "0xFD471836031dc5108809D173A067e8486B9047A3",
3735+
"address": "0xdbC43Ba45381e02825b14322cDdd15eC4B3164E6",
37363736
"abi": [
37373737
{
37383738
"inputs": [
@@ -5022,7 +5022,7 @@
50225022
"name": "PKPPermissions"
50235023
},
50245024
"PubkeyRouter": {
5025-
"address": "0x70e0bA845a1A0F2DA3359C97E0285013525FFC49",
5025+
"address": "0x809d550fca64d94Bd9F66E60752A544199cfAC3D",
50265026
"abi": [
50275027
{
50285028
"inputs": [
@@ -5982,7 +5982,7 @@
59825982
"name": "PubkeyRouter"
59835983
},
59845984
"Staking": {
5985-
"address": "0x4A679253410272dd5232B3Ff7cF5dbB88f295319",
5985+
"address": "0x9E545E3C0baAB3E08CdfD552C960A1050f373042",
59865986
"abi": [
59875987
{
59885988
"inputs": [
@@ -6975,13 +6975,13 @@
69756975
{
69766976
"indexed": false,
69776977
"internalType": "uint256",
6978-
"name": "newMaxTripleCount",
6978+
"name": "newMaxPresignCount",
69796979
"type": "uint256"
69806980
},
69816981
{
69826982
"indexed": false,
69836983
"internalType": "uint256",
6984-
"name": "newMinTripleCount",
6984+
"name": "newMinPresignCount",
69856985
"type": "uint256"
69866986
},
69876987
{
@@ -6993,7 +6993,7 @@
69936993
{
69946994
"indexed": false,
69956995
"internalType": "uint256",
6996-
"name": "newMaxTripleConcurrency",
6996+
"name": "newMaxPresignConcurrency",
69976997
"type": "uint256"
69986998
},
69996999
{
@@ -7474,12 +7474,12 @@
74747474
},
74757475
{
74767476
"internalType": "uint256",
7477-
"name": "maxTripleCount",
7477+
"name": "maxPresignCount",
74787478
"type": "uint256"
74797479
},
74807480
{
74817481
"internalType": "uint256",
7482-
"name": "minTripleCount",
7482+
"name": "minPresignCount",
74837483
"type": "uint256"
74847484
},
74857485
{
@@ -7489,7 +7489,7 @@
74897489
},
74907490
{
74917491
"internalType": "uint256",
7492-
"name": "maxTripleConcurrency",
7492+
"name": "maxPresignConcurrency",
74937493
"type": "uint256"
74947494
},
74957495
{
@@ -8719,13 +8719,13 @@
87198719
{
87208720
"indexed": false,
87218721
"internalType": "uint256",
8722-
"name": "newMaxTripleCount",
8722+
"name": "newMaxPresignCount",
87238723
"type": "uint256"
87248724
},
87258725
{
87268726
"indexed": false,
87278727
"internalType": "uint256",
8728-
"name": "newMinTripleCount",
8728+
"name": "newMinPresignCount",
87298729
"type": "uint256"
87308730
},
87318731
{
@@ -8737,7 +8737,7 @@
87378737
{
87388738
"indexed": false,
87398739
"internalType": "uint256",
8740-
"name": "newMaxTripleConcurrency",
8740+
"name": "newMaxPresignConcurrency",
87418741
"type": "uint256"
87428742
},
87438743
{
@@ -9059,6 +9059,11 @@
90599059
"name": "port",
90609060
"type": "uint32"
90619061
},
9062+
{
9063+
"internalType": "address",
9064+
"name": "stakerAddress",
9065+
"type": "address"
9066+
},
90629067
{
90639068
"internalType": "uint256",
90649069
"name": "senderPubKey",
@@ -11411,12 +11416,12 @@
1141111416
},
1141211417
{
1141311418
"internalType": "uint256",
11414-
"name": "maxTripleCount",
11419+
"name": "maxPresignCount",
1141511420
"type": "uint256"
1141611421
},
1141711422
{
1141811423
"internalType": "uint256",
11419-
"name": "minTripleCount",
11424+
"name": "minPresignCount",
1142011425
"type": "uint256"
1142111426
},
1142211427
{
@@ -11426,7 +11431,7 @@
1142611431
},
1142711432
{
1142811433
"internalType": "uint256",
11429-
"name": "maxTripleConcurrency",
11434+
"name": "maxPresignConcurrency",
1143011435
"type": "uint256"
1143111436
},
1143211437
{
@@ -12258,7 +12263,7 @@
1225812263
"name": "ContractResolver"
1225912264
},
1226012265
"PriceFeed": {
12261-
"address": "0x1c85638e118b37167e9298c2268758e058DdfDA0",
12266+
"address": "0xf953b3A269d80e3eB0F2947630Da976B896A8C5b",
1226212267
"abi": [
1226312268
{
1226412269
"inputs": [
@@ -13064,7 +13069,7 @@
1306413069
"name": "PriceFeed"
1306513070
},
1306613071
"Ledger": {
13067-
"address": "0xBEc49fA140aCaA83533fB00A2BB19bDdd0290f25",
13072+
"address": "0x4C2F7092C2aE51D986bEFEe378e50BD4dB99C901",
1306813073
"abi": [
1306913074
{
1307013075
"inputs": [
@@ -14055,4 +14060,4 @@
1405514060
],
1405614061
"name": "Ledger"
1405714062
}
14058-
}
14063+
}

local-tests/setup/shiva-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export class TestnetClient {
127127

128128
/**
129129
* Polls a given testnet for the ACTIVE state
130-
* polls on a 3000 millisecond interval
130+
* polls on a 5000 millisecond interval
131131
*/
132132
public async pollTestnetForActive(): Promise<string> {
133133
let state = 'Busy';
@@ -147,7 +147,7 @@ export class TestnetClient {
147147
console.log(`Poll attempt #${pollCount}: found state to be`, state);
148148

149149
if (state !== 'Active' && state !== 'UNKNOWN') {
150-
await new Promise<void>((resolve) => setTimeout(resolve, 3000));
150+
await new Promise<void>((resolve) => setTimeout(resolve, 5000));
151151
}
152152
}
153153

local-tests/setup/tinny-environment.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,7 @@ export class TinnyEnvironment {
253253
console.log('this.network:', this.network);
254254
const centralisation = CENTRALISATION_BY_NETWORK[this.network];
255255

256-
console.log('this.customNetworkContext:', typeof this.customNetworkContext);
257-
console.log('this.testnet:', typeof this.testnet);
258-
console.log('this._contractContext:', typeof this._contractContext);
256+
console.log('this.testnet:', JSON.stringify(this.testnet));
259257

260258
if (this.network === LIT_NETWORK.Custom || centralisation === 'unknown') {
261259
const networkContext =
@@ -396,7 +394,8 @@ export class TinnyEnvironment {
396394
throw new Error(`Error while creating testnet, aborting test run`);
397395
}
398396

399-
await this.testnet.getTestnetConfig();
397+
const testConfig = await this.testnet.getTestnetConfig();
398+
console.log('testConfig:', JSON.stringify(testConfig));
400399
} else if (this.network === LIT_NETWORK.Custom) {
401400
const context =
402401
this.customNetworkContext || (await import('./networkContext.json'));

packages/constants/src/lib/constants/mappers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export const NETWORK_CONTEXT_BY_NETWORK: {
1111
| typeof datilTest
1212
| typeof datil
1313
| typeof _nagaDev
14-
// | undefined;
14+
| undefined;
1515
} = {
1616
'datil-dev': datilDev,
1717
'datil-test': datilTest,
1818
datil: datil,
1919
'naga-dev': _nagaDev,
20-
custom: _nagaDev,
20+
custom: undefined,
2121
} as const;
2222

2323
export const GLOBAL_OVERWRITE_IPFS_CODE_BY_NETWORK: {

packages/contracts-sdk/src/lib/contracts-sdk.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,9 +1062,10 @@ export class LitContracts {
10621062
};
10631063

10641064
private static _resolveContractContext(
1065-
network: LIT_NETWORK_VALUES
1065+
network: LIT_NETWORK_VALUES,
1066+
networkContext?: LitContractContext | LitContractResolverContext
10661067
): LitContract[] {
1067-
const data = NETWORK_CONTEXT_BY_NETWORK[network];
1068+
const data = networkContext || NETWORK_CONTEXT_BY_NETWORK[network];
10681069

10691070
if (!data) {
10701071
throw new WrongNetworkException(

packages/core/src/lib/lit-core.ts

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -553,32 +553,32 @@ export class LitCore {
553553
);
554554
}
555555

556-
if (this.config.contractContext) {
557-
console.log(
558-
'❓ this.config.contractContext:',
559-
this.config.contractContext
560-
);
561-
console.log(
562-
'? WHAT IS THIS:',
563-
JSON.stringify(this.config.contractContext)
564-
);
565-
// const logAddresses = Object.entries(this.config.contractContext).reduce(
566-
// (output, [key, val]) => {
567-
568-
// console.log('❓ key:', key);
569-
// console.log('❓ val:', val);
570-
571-
// // @ts-expect-error since the object hash returned by `getContractAddresses` is `any`, we have no types here
572-
// output[key] = val.address;
573-
// return output;
574-
// },
575-
// {}
576-
// );
577-
// console.log('❓ logAddresses:', logAddresses);
578-
// if (this.config.litNetwork === LIT_NETWORK.Custom) {
579-
// log('❓ using custom contracts: ', logAddresses);
580-
// }
581-
}
556+
// if (this.config.contractContext) {
557+
// console.log(
558+
// '❓ this.config.contractContext:',
559+
// this.config.contractContext
560+
// );
561+
// console.log(
562+
// '? WHAT IS THIS:',
563+
// JSON.stringify(this.config.contractContext)
564+
// );
565+
// const logAddresses = Object.entries(this.config.contractContext).reduce(
566+
// (output, [key, val]) => {
567+
568+
// console.log('❓ key:', key);
569+
// console.log('❓ val:', val);
570+
571+
// // @ts-expect-error since the object hash returned by `getContractAddresses` is `any`, we have no types here
572+
// output[key] = val.address;
573+
// return output;
574+
// },
575+
// {}
576+
// );
577+
// console.log('❓ logAddresses:', logAddresses);
578+
// if (this.config.litNetwork === LIT_NETWORK.Custom) {
579+
// log('❓ using custom contracts: ', logAddresses);
580+
// }
581+
// }
582582

583583
// Re-use staking contract instance from previous connect() executions that succeeded to improve performance
584584
// noinspection ES6MissingAwait - intentionally not `awaiting` so we can run this in parallel below

0 commit comments

Comments
 (0)