Skip to content

Commit

Permalink
chore: Update README (#386)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 authored Oct 30, 2023
1 parent 5eae92f commit c118ba0
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
37 changes: 37 additions & 0 deletions examples/nextjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,43 @@

Use [React](https://react.dev/) and [Next.js](https://nextjs.org/)

## Prepare

### install and build

Install dependencies:

```bash
pnpm install
```

Build package:

```bash
pnpm run -F "./packages/**" -r build
```


### Run the demo application

`cp .env.simple .env` and fill your own configuration:

```bash
NEXT_PUBLIC_GRPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org

NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-ethapi-us.bnbchain.org
NEXT_PUBLIC_GREEN_CHAIN_ID=5600

# BSC End POINT
NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org
NEXT_PUBLIC_BSC_CHAIN_ID=5601
```

> this is TESTNET's configuration.

Run the demo application: `npm run dev`

## Usage case

* tx
Expand Down
29 changes: 27 additions & 2 deletions examples/nodejs/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,34 @@
# GreenField JS SDK Node.js

> NOTICE: Before running, you need to fill your account's private key and address in [env.js](./env.js).

## Prepare

### install and build

Install dependencies:

```bash
pnpm install
```

Build package:

```bash
pnpm run -F "./packages/**" -r build
```

### Run the demo application

Fill your account's private key and address in [env.js](./env.js).

## Execure example

```bash
> node storage.js
```

[More examples](../../packages/js-sdk/tests/)
* [storages.js](./storage.js)
* [account.js](./account.js)
* [policy.js](./policy.js)
* [query.js](./query.js)
* [transfer.js](./transfer.js)

0 comments on commit c118ba0

Please sign in to comment.