Skip to content

Commit

Permalink
Merge pull request #288 from TrueBlocks/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
tjayrush authored Dec 17, 2022
2 parents 887ce90 + d2d9297 commit 70da290
Show file tree
Hide file tree
Showing 15 changed files with 307 additions and 248 deletions.
20 changes: 10 additions & 10 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ In the interest of fostering an open and welcoming environment, we as contributo

Examples of behavior that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
- The use of sexualized language or imagery and unwelcome sexual attention or advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Our Responsibilities

Expand Down
36 changes: 16 additions & 20 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
## How to contribute to TrueBlocks
# How to contribute to TrueBlocks

#### **Commit and Branching Guidelines**
## Commit and Branching Guidelines

[Commit Message Guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53)

[Branching Conventions](https://github.com/TrueBlocks/trueblocks-core/blob/master/docs/BRANCHING.md)

#### **Did you find a bug?**
## Did you find a bug?

* **Do not open up a GitHub issue if the bug is a security vulnerability in TrueBlocks**. Contact through our website instead.
- **Do not open up a GitHub issue if the bug is a security vulnerability in TrueBlocks**. Contact through our website instead.
- Search for previously reported [Issues](https://github.com/TrueBlocks/trueblocks-core/issues). If you find something, please add your comments.
- If you don't find an existing issue, [open a new one](https://github.com/TrueBlocks/trueblocks-core/issues/new).

* Search for previously reported [Issues](https://github.com/TrueBlocks/trueblocks-core/issues). If you find something, please add your comments.
## Did you fix a bug?

* If you don't find an existing issue, [open a new one](https://github.com/TrueBlocks/trueblocks-core/issues/new).
- Open a pull request with the patch.
- Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
- Before submitting, read [Contributing](http://github.com/TrueBlocks/trueblocks-core/CONTRIBUTING.md). Please use our coding and testing guidelines.

#### **Did you fix a bug?**
## Did you make a formatting or cosmetic change?

* Open a pull request with the patch.
- We use an automated formatters, therefor formatting-only changes will generally be closed without merging.

* Ensure the PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
## Would do have a feature request?

* Before submitting, read [Contributing](http://github.com/TrueBlocks/trueblocks-core/CONTRIBUTING.md). Please use our coding and testing guidelines.
- Suggest your change by creating a [Feature Request](https://github.com/TrueBlocks/trueblocks-core/issues/new) and start writing code.

#### **Did you make a formatting or cosmetic change?**
## Do you have questions about the source code?

* We use an automated formatters, therefor formatting-only changes will generally be closed without merging.

#### **Would do have a feature request?**

* Suggest your change by creating a [Feature Request](https://github.com/TrueBlocks/trueblocks-core/issues/new) and start writing code.

#### **Do you have questions about the source code?**

* Please join us in our [Discord server](https://discord.gg/zGh6PdN).
- Please join us in our [Discord server](https://discord.gg/zGh6PdN).

Thanks! :heart: :heart: :heart:

Expand Down
388 changes: 194 additions & 194 deletions LICENSE

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,20 +87,14 @@ We love contributors. Please see information about our [work flow](https://githu
4. Push back to the original branch: `git push origin TrueBlocks/trueblocks-core`
5. Create the pull request.

## Contact

If you have questions, comments, or complaints, please join the discussion on our discord server which is [linked from our website](https://trueblocks.io).

## List of Contributors

Thanks to the following people who have contributed to this project:

- **Thomas Jay Rush** - [tjayrush](https://github.com/tjayrush)
- **Ed Mazurek** - [wildmolasses](https://github.com/wildmolasses)
- **Dawid Szlachta** - [dszlachta](https://github.com/dszlachta)

See also the list of [contributors](https://github.com/TrueBlocks/trueblocks-explorer/contributors) who participated in this project.

* [@tjayrush](https://github.com/tjayrush)
* [@dszlachta](https://github.com/dszlachta)
* [@wildmolasses](https://github.com/wildmolasses)

## Contact

If you have questions, comments, or complaints, please join the discussion on our discord server which is [linked from our website](https://trueblocks.io).
28 changes: 28 additions & 0 deletions src/sdk/generated_ts/paths/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import * as ApiCallers from "../lib/api_callers";
import { Status } from "../types";

export function getConfig(
parameters?: {
modes?: string[],
module?: string[],
details?: boolean,
terse?: boolean,
chain: string,
noHeader?: boolean,
fmt?: string,
verbose?: boolean,
logLevel?: number,
wei?: boolean,
ether?: boolean,
dollars?: boolean,
raw?: boolean,
toFile?: boolean,
},
options?: RequestInit,
) {
return ApiCallers.fetch<Status[]>(
{
endpoint: '/config', method: 'get', parameters, options,
},
);
}
2 changes: 1 addition & 1 deletion src/sdk/generated_ts/paths/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export * from './traces';
export * from './when';
export * from './state';
export * from './tokens';
export * from './status';
export * from './config';
export * from './scrape';
export * from './chunks';
export * from './init';
Expand Down
1 change: 1 addition & 0 deletions src/sdk/generated_ts/paths/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function getList(
count?: boolean,
appearances?: boolean,
silent?: boolean,
noZero?: boolean,
firstRecord?: number,
maxRecords?: number,
firstBlock?: number,
Expand Down
6 changes: 3 additions & 3 deletions src/sdk/generated_ts/paths/status.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as ApiCallers from "../lib/api_callers";
import { Status } from "../types";
import * as ApiCallers from '../lib/api_callers';
import { Status } from '../types';

export function getStatus(
export function getConfig(
parameters?: {
modes?: string[],
details?: boolean,
Expand Down
25 changes: 25 additions & 0 deletions src/sdk/generated_ts/types/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import {
Cache, Chain, Key, timestamp,
} from '.';

export type Config = {
clientVersion: string
clientIds: string
trueblocksVersion: string
rpcProvider: string
configPath: string
cachePath: string
indexPath: string
host: string
isTesting: boolean
isApi: boolean
isScraping: boolean
isArchive: boolean
isTracing: boolean
hasEskey: boolean
hasPinkey: boolean
ts: timestamp
chains: Chain[]
caches: Cache[]
keys?: Key[]
}
3 changes: 2 additions & 1 deletion src/sdk/generated_ts/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ export * from './traceAction'
export * from './traceResult'
export * from './datedBlock'
export * from './state'
export * from './result'
export * from './transfer'
export * from './result'
export * from './token'
export * from './status'
export * from './cache'
export * from './pinnedChunk'
export * from './manifest'
export * from './chain'
export * from './key'
export * from './cacheEntry'
export * from './function'
export * from './parameter'
8 changes: 8 additions & 0 deletions src/sdk/generated_ts/types/key.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import "../types";

export type Key = {
provider: string
apiKey: string
jwt: string
secret: string
}
5 changes: 4 additions & 1 deletion src/sdk/generated_ts/types/status.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { timestamp, Chain, Cache } from "../types";
import {
Cache, Chain, Key, timestamp,
} from '.';

export type Status = {
clientVersion: string
Expand All @@ -19,4 +21,5 @@ export type Status = {
ts: timestamp
chains: Chain[]
caches: Cache[]
keys?: Key[]
}
5 changes: 3 additions & 2 deletions src/ui/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@ant-design/icons';
import {
Chain,
getStatus, Status, SuccessResponse,
getConfig, Status, SuccessResponse,
} from '@sdk';
import {
Layout,
Expand Down Expand Up @@ -95,7 +95,8 @@ export const App = () => {

useEffect(() => {
const fetchStatus = async () => {
const statusResponse = wrapResponse(await getStatus({
const statusResponse = wrapResponse(await getConfig({
modes: ['show'],
chain: chain.chain,
fmt: 'json',
}));
Expand Down
7 changes: 4 additions & 3 deletions src/ui/views/Dashboard/Tabs/Monitors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import React, {

import { PlusCircleFilled, SearchOutlined } from '@ant-design/icons';
import {
Chain, getStatus, Monitor, Status,
Chain, getConfig, Monitor, Status,
} from '@sdk';
import {
Button, Input,
Expand Down Expand Up @@ -39,9 +39,10 @@ export const Monitors = () => {
const [selectedNameTags] = useState('');
const [loadingEdit, setLoadingEdit] = useState(false);

const monitorsCall = useSdk(() => getStatus({
const monitorsCall = useSdk(() => getConfig({
chain: chain.chain,
modes: ['monitors'],
modes: ['show'],
module: ['monitors'],
details: true,
}), undefined, []) as CallStatus<Status[]>;
if (isFailedCall(monitorsCall)) {
Expand Down
7 changes: 4 additions & 3 deletions src/ui/views/Settings/Tabs/Indexes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useMemo } from 'react';

import { getStatus, PinnedChunk } from '@sdk';
import { getConfig, PinnedChunk } from '@sdk';
import { ColumnsType } from 'antd/lib/table';

import { BaseView } from '@components/BaseView';
Expand All @@ -26,9 +26,10 @@ import { IndexTable } from './SubTabs/IndexTable';

export const IndexesView = () => {
const { chain } = useGlobalState();
const statusCall = useSdk(() => getStatus({
const statusCall = useSdk(() => getConfig({
chain: chain.chain,
modes: ['index'],
modes: ['show'],
module: ['index'],
details: true,
}));

Expand Down

0 comments on commit 70da290

Please sign in to comment.