@snapshot-labs/snapshot.js 0.12.5 → 0.12.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/snapshot.cjs.js +35 -2
- package/dist/snapshot.esm.js +35 -2
- package/dist/snapshot.min.js +1 -1
- package/dist/src/utils/delegation.d.ts +1 -1
- package/package.json +1 -1
- package/src/networks.json +44 -15
- package/src/utils/delegation.ts +7 -4
package/dist/snapshot.cjs.js
CHANGED
|
@@ -2004,6 +2004,21 @@ var networks = {
|
|
|
2004
2004
|
},
|
|
2005
2005
|
start: 2497732,
|
|
2006
2006
|
logo: "ipfs://QmVEgNeQDKnXygeGxfY9FywZpNGQu98ktZtRJ9bToYF6g7"
|
|
2007
|
+
},
|
|
2008
|
+
"252": {
|
|
2009
|
+
key: "252",
|
|
2010
|
+
name: "Fraxtal",
|
|
2011
|
+
shortName: "mainnet",
|
|
2012
|
+
chainId: 252,
|
|
2013
|
+
network: "mainnet",
|
|
2014
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2015
|
+
rpc: [
|
|
2016
|
+
],
|
|
2017
|
+
explorer: {
|
|
2018
|
+
url: "https://fraxscan.com"
|
|
2019
|
+
},
|
|
2020
|
+
start: 1,
|
|
2021
|
+
logo: "ipfs://bafkreieflj4wq6tx7k5kq47z3xnsrdrn2xgm4bxa3uovrnndcb2vqqwlyu"
|
|
2007
2022
|
},
|
|
2008
2023
|
"269": {
|
|
2009
2024
|
key: "269",
|
|
@@ -2505,6 +2520,22 @@ var networks = {
|
|
|
2505
2520
|
},
|
|
2506
2521
|
start: 57500,
|
|
2507
2522
|
logo: "ipfs://bafkreidg4wpewve5mdxrofneqblydkrjl3oevtgpdf3fk3z3vjqam6ocoe"
|
|
2523
|
+
},
|
|
2524
|
+
"2522": {
|
|
2525
|
+
key: "2522",
|
|
2526
|
+
name: "Fraxtal Testnet",
|
|
2527
|
+
shortName: "testnet",
|
|
2528
|
+
chainId: 2522,
|
|
2529
|
+
network: "testnet",
|
|
2530
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2531
|
+
rpc: [
|
|
2532
|
+
],
|
|
2533
|
+
explorer: {
|
|
2534
|
+
url: "https://holesky.fraxscan.com/"
|
|
2535
|
+
},
|
|
2536
|
+
start: 1,
|
|
2537
|
+
logo: "ipfs://bafkreieflj4wq6tx7k5kq47z3xnsrdrn2xgm4bxa3uovrnndcb2vqqwlyu",
|
|
2538
|
+
testnet: true
|
|
2508
2539
|
},
|
|
2509
2540
|
"4200": {
|
|
2510
2541
|
key: "4200",
|
|
@@ -3579,7 +3610,7 @@ function getDelegatesBySpace(network_1, space_1) {
|
|
|
3579
3610
|
}
|
|
3580
3611
|
let pivot = 0;
|
|
3581
3612
|
const result = new Map();
|
|
3582
|
-
const spaceIn = buildSpaceIn(space);
|
|
3613
|
+
const spaceIn = space ? buildSpaceIn(space) : null;
|
|
3583
3614
|
while (true) {
|
|
3584
3615
|
const newResults = yield fetchData({
|
|
3585
3616
|
url: subgraphUrl,
|
|
@@ -3625,7 +3656,6 @@ function fetchData(_a) {
|
|
|
3625
3656
|
delegations: {
|
|
3626
3657
|
__args: {
|
|
3627
3658
|
where: {
|
|
3628
|
-
space_in: spaces,
|
|
3629
3659
|
timestamp_gte: pivot
|
|
3630
3660
|
},
|
|
3631
3661
|
first: PAGE_SIZE,
|
|
@@ -3642,6 +3672,9 @@ function fetchData(_a) {
|
|
|
3642
3672
|
if (snapshot !== 'latest') {
|
|
3643
3673
|
params.delegations.__args.block = { number: snapshot };
|
|
3644
3674
|
}
|
|
3675
|
+
if (spaces !== null) {
|
|
3676
|
+
params.delegations.__args.where.space_in = spaces;
|
|
3677
|
+
}
|
|
3645
3678
|
return (yield subgraphRequest(url, params)).delegations || [];
|
|
3646
3679
|
});
|
|
3647
3680
|
}
|
package/dist/snapshot.esm.js
CHANGED
|
@@ -1994,6 +1994,21 @@ var networks = {
|
|
|
1994
1994
|
},
|
|
1995
1995
|
start: 2497732,
|
|
1996
1996
|
logo: "ipfs://QmVEgNeQDKnXygeGxfY9FywZpNGQu98ktZtRJ9bToYF6g7"
|
|
1997
|
+
},
|
|
1998
|
+
"252": {
|
|
1999
|
+
key: "252",
|
|
2000
|
+
name: "Fraxtal",
|
|
2001
|
+
shortName: "mainnet",
|
|
2002
|
+
chainId: 252,
|
|
2003
|
+
network: "mainnet",
|
|
2004
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2005
|
+
rpc: [
|
|
2006
|
+
],
|
|
2007
|
+
explorer: {
|
|
2008
|
+
url: "https://fraxscan.com"
|
|
2009
|
+
},
|
|
2010
|
+
start: 1,
|
|
2011
|
+
logo: "ipfs://bafkreieflj4wq6tx7k5kq47z3xnsrdrn2xgm4bxa3uovrnndcb2vqqwlyu"
|
|
1997
2012
|
},
|
|
1998
2013
|
"269": {
|
|
1999
2014
|
key: "269",
|
|
@@ -2495,6 +2510,22 @@ var networks = {
|
|
|
2495
2510
|
},
|
|
2496
2511
|
start: 57500,
|
|
2497
2512
|
logo: "ipfs://bafkreidg4wpewve5mdxrofneqblydkrjl3oevtgpdf3fk3z3vjqam6ocoe"
|
|
2513
|
+
},
|
|
2514
|
+
"2522": {
|
|
2515
|
+
key: "2522",
|
|
2516
|
+
name: "Fraxtal Testnet",
|
|
2517
|
+
shortName: "testnet",
|
|
2518
|
+
chainId: 2522,
|
|
2519
|
+
network: "testnet",
|
|
2520
|
+
multicall: "0xcA11bde05977b3631167028862bE2a173976CA11",
|
|
2521
|
+
rpc: [
|
|
2522
|
+
],
|
|
2523
|
+
explorer: {
|
|
2524
|
+
url: "https://holesky.fraxscan.com/"
|
|
2525
|
+
},
|
|
2526
|
+
start: 1,
|
|
2527
|
+
logo: "ipfs://bafkreieflj4wq6tx7k5kq47z3xnsrdrn2xgm4bxa3uovrnndcb2vqqwlyu",
|
|
2528
|
+
testnet: true
|
|
2498
2529
|
},
|
|
2499
2530
|
"4200": {
|
|
2500
2531
|
key: "4200",
|
|
@@ -3569,7 +3600,7 @@ function getDelegatesBySpace(network_1, space_1) {
|
|
|
3569
3600
|
}
|
|
3570
3601
|
let pivot = 0;
|
|
3571
3602
|
const result = new Map();
|
|
3572
|
-
const spaceIn = buildSpaceIn(space);
|
|
3603
|
+
const spaceIn = space ? buildSpaceIn(space) : null;
|
|
3573
3604
|
while (true) {
|
|
3574
3605
|
const newResults = yield fetchData({
|
|
3575
3606
|
url: subgraphUrl,
|
|
@@ -3615,7 +3646,6 @@ function fetchData(_a) {
|
|
|
3615
3646
|
delegations: {
|
|
3616
3647
|
__args: {
|
|
3617
3648
|
where: {
|
|
3618
|
-
space_in: spaces,
|
|
3619
3649
|
timestamp_gte: pivot
|
|
3620
3650
|
},
|
|
3621
3651
|
first: PAGE_SIZE,
|
|
@@ -3632,6 +3662,9 @@ function fetchData(_a) {
|
|
|
3632
3662
|
if (snapshot !== 'latest') {
|
|
3633
3663
|
params.delegations.__args.block = { number: snapshot };
|
|
3634
3664
|
}
|
|
3665
|
+
if (spaces !== null) {
|
|
3666
|
+
params.delegations.__args.where.space_in = spaces;
|
|
3667
|
+
}
|
|
3635
3668
|
return (yield subgraphRequest(url, params)).delegations || [];
|
|
3636
3669
|
});
|
|
3637
3670
|
}
|