Skip to content

Commit

Permalink
chore: rebranding updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Aug 18, 2024
1 parent 1476643 commit 231d525
Show file tree
Hide file tree
Showing 159 changed files with 3,436 additions and 10,366 deletions.
5 changes: 4 additions & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,8 @@
"endOfLine": "lf",
"embeddedLanguageFormatting": "auto",
"singleAttributePerLine": false,
"plugins": ["prettier-plugin-tailwindcss"]
"plugins": [
"prettier-plugin-tailwindcss",
"@trivago/prettier-plugin-sort-imports"
]
}
5 changes: 2 additions & 3 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ export const defaultTheme: ThemeVars = {
...themes.dark,
appBg: "black",
colorSecondary: "#FF4C8B",
brandImage:
"https://github.com/covalenthq/web3-resources/assets/7921710/1ab51c53-1115-4989-8f93-a1e8d13c8640",
brandImage: "../src/static/goldrush-powered-by-covalent.svg",
base: "light",
brandTitle: "GoldRush Kit - powered by Covalent",
brandUrl: "https://github.com/covalenthq/goldrush-kit/",
brandTarget: "https://www.covalenthq.com/",
brandTarget: "https://goldrush.dev",
};

addons.setConfig({
Expand Down
5 changes: 2 additions & 3 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import { type Preview } from "@storybook/react";
import "../src/tailwind-output.css";
import { GoldRushProvider } from "../src/utils/store";
import { defaultTheme } from "./manager";
import { type Preview } from "@storybook/react";
import React from "react";

const Story = ({ storyFn }) => storyFn();
const preview: Preview = {
Expand All @@ -29,7 +29,6 @@ const preview: Preview = {
</GoldRushProvider>
),
],
tags: ["autodocs"],
};

export default preview;
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Changelog for Covalent GoldRush Kit
# Changelog for GoldRush Kit

## 0.6.5

Expand Down
214 changes: 96 additions & 118 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@
<img src="https://img.shields.io/github/license/covalenthq/goldrush-kit" alt="Apache-2.0">
</p>

<h1 align="center">
Beautifully designed React components for your dApp frontend.
</h1>
# GoldRush Kit

<div align="center">
200+ Chains. Open-source. Customizable.
</div>
Beautifully designed React components for your dApp frontend.
200+ Chains. Open-source. Customizable.

<p align="center">
<br />
Expand All @@ -44,170 +41,151 @@ npm install @covalenthq/goldrush-kit

1. Import `GoldRushProvider`

```tsx
import { GoldRushProvider } from "@covalenthq/goldrush-kit";
```
```tsx
import { GoldRushProvider } from "@covalenthq/goldrush-kit";
```

2. Wrap `GoldRushProvider` around the application.
3. Configure the provider and add it to the `apikey` props with your GoldRush API key. You can register for a free key on [GoldRush's website](https://goldrush.dev/platform/apikey).

> **Note:** You should always keep your API key private, never put it directly into your code, especially front end code. Instead, use an environment variable to inject the key into your code.

```tsx
<GoldRushProvider apikey="<YOUR_API_KEY>">{children}</GoldRushProvider>
```
```tsx
<GoldRushProvider apikey="<YOUR_API_KEY>">{children}</GoldRushProvider>
```

4. Add the stylesheet to your application.

```tsx
import "@covalenthq/goldrush-kit/styles.css";
```
```tsx
import "@covalenthq/goldrush-kit/styles.css";
```

5. Add desired components.
> **Note:** If you're using `next.js` versions `^13.0` and are using `app` router, make sure you have `use client;` at the top of the file to disable Next's server component modules. Visit GoldRush's [component documentation](https://goldrush.dev/docs/unified-api/goldrush/kit/gold-rush-provider/) for more information.

```tsx
import {
GoldRushProvider,
NFTWalletCollectionList,
TokenBalancesList,
TokenTransfersList,
AddressActivityList,
} from "@covalenthq/goldrush-kit";
```
> **Note:** If you're using `next.js` versions `^13.0` with the `app` router, make sure you have `use client;` at the top of the file to disable Next's server component modules. Visit GoldRush's [component documentation](https://goldrush.dev/docs/unified-api/goldrush/kit/gold-rush-provider/) for more information.

```tsx
import {
GoldRushProvider,
NFTWalletCollectionList,
TokenBalancesList,
TokenTransfersList,
AddressActivityList,
} from "@covalenthq/goldrush-kit";
```

## Ready-to-go React Component example

Here's a full example to get you started.

Be sure to secure your key to prevent unauthorized use in the GoldRush platform by restricting usage to specific URLs.
Be sure to secure your apikey to prevent unauthorized use in the GoldRush platform by restricting usage to specific URLs.

```tsx
"use client";

import "@covalenthq/goldrush-kit/styles.css";
import {
GoldRushProvider,
NFTWalletCollectionList,
TokenBalancesList,
TokenTransfersList,
AddressActivityList,
} from "@covalenthq/goldrush-kit";
import "@covalenthq/goldrush-kit/styles.css";
const GoldRushExample = () => {
return (
<main className="">
<GoldRushProvider
apikey={process.env.NEXT_PUBLIC_API_KEY}
theme={{
borderRadius: 6,
colors: {
dark: {
primary: "#FF4C8B",
background: "#000426",
foreground: "#FFFFFF",
secondary: "#868E96",
},
light: {
primary: "#00D8D5",
background: "#FFFFFF",
foreground: "#1C2024",
secondary: "#868E96",
},
<GoldRushProvider
apikey={process.env.NEXT_PUBLIC_API_KEY}
theme={{
borderRadius: 6,
colors: {
dark: {
primary: "#FF4C8B",
background: "#000426",
foreground: "#FFFFFF",
secondary: "#868E96",
},
light: {
primary: "#00D8D5",
background: "#FFFFFF",
foreground: "#1C2024",
secondary: "#868E96",
},
mode: "dark",
}}
>
<TokenBalancesList
chain_names={[
"eth-mainnet",
"matic-mainnet",
"bsc-mainnet",
"avalanche-mainnet",
"optimism-mainnet",
]}
hide_small_balances
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
/>

<TokenTransfersList
chain_name="eth-mainnet"
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
contract_address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
/>

<AddressActivityList address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de" />

<NFTWalletCollectionList
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
chain_name="eth-mainnet"
/>
</GoldRushProvider>
</main>
},
mode: "dark",
}}
>
<TokenBalancesList
chain_names={[
"eth-mainnet",
"matic-mainnet",
"bsc-mainnet",
"avalanche-mainnet",
"optimism-mainnet",
]}
hide_small_balances
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
/>
<TokenTransfersList
chain_name="eth-mainnet"
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
contract_address="0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
/>
<AddressActivityList address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de" />
<NFTWalletCollectionList
address="0xfc43f5f9dd45258b3aff31bdbe6561d97e8b71de"
chain_name="eth-mainnet"
/>
</GoldRushProvider>
);
};
export default GoldRushExample;
```

## GoldRush Templates

| Template | Description | Link |
| ------------------------------------- | -------------------------------------------------------- | ---------------------------------------------------------- |
| Wallet & Portfolio UI | Display your tokens and NFTs across multiple chains. | https://github.com/covalenthq/goldrush-wallet-portfolio-ui |
| NFT Collection Gallery & Analytics UI | Display NFTs by collection and see their details. | https://github.com/covalenthq/goldrush-nft-gallery-ui |
| Transaction Receipt View | A beautifully designed view for blockchain transactions. | https://github.com/covalenthq/goldrush-tx-receipt-ui |

## HIGHLIGHT: GoldRush Transaction Receipt View

Designed to transform cluttered blockchain transaction data into meaningful summaries useful to the user. Receipts are fully extensible and enhance the clarity and understanding of various blockchain activities. Imagine a transaction view that shows Game-Fi quest achievements, swap pool position data, or even staking impact on network security—this is all possible with GoldRush-Kit.

https://goldrush-tx-receipt-ui.vercel.app/

https://github.com/covalenthq/goldrush-tx-receipt-ui

## GoldRush Decoder

Decode transaction log events to display them in a human-readable format. Useful for understanding the data that is emitted from smart contracts and is a critical component of any dApp. Works in tandem with GoldRush-Kit to provide a seamless experience for developers and users alike.
## GoldRush Repositories

https://github.com/covalenthq/goldrush-decoder
| Name | Description |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| [TypeScript SDK](https://github.com/covalenthq/covalent-api-sdk-ts) | The fastest way to integrate the GoldRush API for working with blockchain data. |
| [GoldRush Block Explorer](https://github.com/covalenthq/goldrush-block-explorer) | A cross chain block explorer kit that can be customized. |
| [GoldRush Decoder](https://github.com/covalenthq/goldrush-decoder) | Decode unstructured, raw event logs into structured data with a simple API. |
| [GoldRush RevokeHub](https://github.com/covalenthq/goldrush-revokehub) | One-stop platform for managing your digital assets securely and efficiently. |
| [GoldRush Airdrop Assist](https://github.com/covalenthq/goldrush-airdrop-assist) | Effortlessly filter and find all valid addresses for your next airdrop. |

## Build and customize with Storybook

The components used above are built React, Tailwind, and TypeScript. You can preview and customize the components using Storybook.
The components used above are built with `ReactJS` and `TailwindCSS`, using `TypeScript`. You can preview and customize the components using [Storybook](https://storybook.js.org/).

Storybook provides developers with a way to quickly prototype and develop components in isolation, while React provides the tools to quickly build out a web application. Tailwind provides a library of pre-built UI components and utility classes, while TypeScript adds type safety and autocompletion to the development process. Together, these tools provide developers with the tools they need to quickly and easily build complex, modern web applications.
1. **Setup Environmental Variables**: Create and add a `.env` file to the root directory of your project and the listed values from [.env.example](./.env.example) following to the file.

### Storybook Environmental Variable
```
STORYBOOK_GOLDRUSH_API_KEY = "<YOUR_API_KEY>"
```

Create and add a `.env` file to the root directory of your project and the following to the file.
2. **Start development server**

```
STORYBOOK_GOLDUSH_API_KEY = "<YOUR_API_KEY>"
```

### Start

```bash
npm run dev
```
```bash
npm run dev
```

### Build/Bundle Component Library
3. **Build/Bundle Component Library**

```bash
npm run build:library
```
```bash
npm run build:library
```

### Build/Bundle Storybook For Deployment
4. **Build/Bundle Storybook**

```bash
npm run build:storybook
```
```bash
npm run build:storybook
```

## Contributing

Contributions, issues and feature requests are welcome!
Feel free to check <a href="https://github.com/covalenthq/goldrush-kit/issues">issues</a> page.
Feel free to check [issues](https://github.com/covalenthq/goldrush-kit/issues) page.

## Show your support

Expand Down
4 changes: 2 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import tseslint from "typescript-eslint";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import eslintPluginPrettierRecommended from "eslint-plugin-prettier/recommended";
import pluginReactConfig from "eslint-plugin-react/configs/recommended.js";
import tseslint from "typescript-eslint";

export default [
pluginReactConfig,
Expand Down
Loading

0 comments on commit 231d525

Please sign in to comment.