Skip to content

Commit bfae71e

Browse files
authored
Merge pull request #69 from Golem-Base/develop
Develop -> main
2 parents 403bd30 + 8ec9487 commit bfae71e

File tree

166 files changed

+2436
-196
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+2436
-196
lines changed

configs/app/features/gasTracker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ const units = ((): Array<GasUnit> => {
1111
const envValue = getEnvValue('NEXT_PUBLIC_GAS_TRACKER_UNITS');
1212
if (!envValue) {
1313
if (chainConfig.isTestnet) {
14-
return [ 'gwei' ];
14+
return [ 'wei' ];
1515
}
16-
return [ 'usd', 'gwei' ];
16+
return [ 'usd', 'wei' ];
1717
}
1818

1919
const units = parseEnvJson<Array<GasUnit>>(envValue)?.filter((type) => GAS_UNITS.includes(type)) || [];

configs/envs/.env.golembase_l3_local

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ NEXT_PUBLIC_FONT_FAMILY_BODY={'name':'Inter','url':'https://fonts.googleapis.com
5353
NEXT_PUBLIC_MAX_CONTENT_WIDTH_ENABLED=true
5454

5555
# Homepage Configuration
56-
NEXT_PUBLIC_HOMEPAGE_STATS=['total_blocks','average_block_time','total_txs','wallet_addresses','gas_tracker','chain_id','total_gas_used']
56+
NEXT_PUBLIC_HOMEPAGE_STATS=['total_blocks','average_block_time','total_txs','wallet_addresses','gas_tracker','chain_id','total_gas_used','golembase_storage_limit','golembase_used_slots','golembase_active_entities_size','golembase_active_entities_count']
5757

5858
# SEO and Meta
5959
NEXT_PUBLIC_PROMOTE_BLOCKSCOUT_IN_TITLE=false

docs/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
## Description and Related Issue(s)
22

3-
*[Provide a brief description of the changes or enhancements introduced by this pull request and explain motivation behind them. Cite any related issue(s) or bug(s) that it addresses using the [format](https://blog.github.com/2013-05-14-closing-issues-via-pull-requests/) `Fixes #123` or `Resolves #456`.]*
3+
*[Provide a brief description of the changes or enhancements introduced by this pull request and explain motivation behind them. Cite any related issue(s) or bug(s) that it addresses using the [format](https://blog.github.com/2013-05-14-closing-issues-via-pull-requests/) `Fixes #123` or `Resolves #456`. Specify the changes or additions made in this pull request.]*
44

5-
### Proposed Changes
6-
*[Specify the changes or additions made in this pull request. Please mention if any changes were made to the ENV variables]*
7-
8-
### Breaking or Incompatible Changes
5+
### Breaking or Incompatible Changes (if any, otherwise remove this section)
96
*[Describe any breaking or incompatible changes introduced by this pull request. Specify how users might need to modify their code or configurations to accommodate these changes.]*
107

11-
### Additional Information
12-
*[Include any additional information, context, or screenshots that may be helpful for reviewers.]*
13-
148
## Checklist for PR author
159
- [ ] I have tested these changes locally.
1610
- [ ] I added tests to cover any new functionality, following this [guide](./CONTRIBUTING.md#writing--running-tests)

icons/chart-pie.svg

Lines changed: 4 additions & 0 deletions
Loading

icons/database.svg

Lines changed: 5 additions & 0 deletions
Loading

icons/flame.svg

Lines changed: 2 additions & 2 deletions
Loading

icons/layers.svg

Lines changed: 5 additions & 0 deletions
Loading

icons/network.svg

Lines changed: 6 additions & 0 deletions
Loading

icons/trophy.svg

Lines changed: 4 additions & 0 deletions
Loading

lib/api/services/golem-base-indexer.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ApiResource } from '../types';
22
import type * as golemBaseIndexer from '@golembase/l3-indexer-types';
3-
import type { GolemBaseIndexerOpsFilters } from 'types/api/golemBaseIndexer';
3+
import type { GolemBaseIndexerOpsFilters, GolemBaseIndexerSpendersFilters } from 'types/api/golemBaseIndexer';
44

55
import type { PaginatedResponse } from './paginationConverter';
66

@@ -12,6 +12,10 @@ export const GOLEM_BASE_INDEXER_API_RESOURCES = {
1212
entities: {
1313
path: '/api/v1/entities',
1414
},
15+
operation: {
16+
path: '/api/v1/operation/:tx_hash/:op_index',
17+
pathParams: [ 'tx_hash' as const, 'op_index' as const ],
18+
},
1519
operations: {
1620
path: '/api/v1/operations',
1721
filterFields: [ 'operation' as const, 'block_hash' as const, 'transaction_hash' as const, 'sender' as const, 'entity_key' as const ],
@@ -21,6 +25,10 @@ export const GOLEM_BASE_INDEXER_API_RESOURCES = {
2125
path: '/api/v1/operations/count',
2226
filterFields: [ 'operation' as const, 'block_hash' as const, 'transaction_hash' as const, 'sender' as const, 'entity_key' as const ],
2327
},
28+
biggestSpenders: {
29+
path: '/api/v1/leaderboard/biggest-spenders',
30+
paginated: true,
31+
},
2432
} satisfies Record<string, ApiResource>;
2533

2634
export type GolemBaseIndexerApiResourceName = `golemBaseIndexer:${ keyof typeof GOLEM_BASE_INDEXER_API_RESOURCES }`;
@@ -29,13 +37,16 @@ export type GolemBaseIndexerApiResourceName = `golemBaseIndexer:${ keyof typeof
2937
export type GolemBaseIndexerApiResourcePayload<R extends GolemBaseIndexerApiResourceName> =
3038
R extends 'golemBaseIndexer:entity' ? golemBaseIndexer.FullEntity :
3139
R extends 'golemBaseIndexer:entities' ? golemBaseIndexer.ListEntitiesResponse :
40+
R extends 'golemBaseIndexer:operation' ? golemBaseIndexer.EntityHistoryEntry :
3241
R extends 'golemBaseIndexer:operations' ? PaginatedResponse<golemBaseIndexer.ListOperationsResponse> :
3342
R extends 'golemBaseIndexer:operationsCount' ? golemBaseIndexer.CountOperationsResponse :
43+
R extends 'golemBaseIndexer:biggestSpenders' ? PaginatedResponse<golemBaseIndexer.ListBiggestSpendersResponse> :
3444
never;
3545
/* eslint-enable @stylistic/indent */
3646

3747
/* eslint-disable @stylistic/indent */
3848
export type GolemBaseIndexerApiPaginationFilters<R extends GolemBaseIndexerApiResourceName> =
3949
R extends 'golemBaseIndexer:operations' ? GolemBaseIndexerOpsFilters :
50+
R extends 'golemBaseIndexer:biggestSpenders' ? GolemBaseIndexerSpendersFilters :
4051
never;
4152
/* eslint-enable @stylistic/indent */

0 commit comments

Comments
 (0)