Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

modify README chapter #18

Merged
merged 1 commit into from
Mar 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Verse-Proxy can control following items.
- jsonrpc method
- transaction's from, to, value
- address which can deploy smart contract

- transaction access rate

## Verse Proxy Build Steps

Expand Down Expand Up @@ -73,6 +73,12 @@ docker run --name verse-proxy -d -p $PORT:$PORT -v $PWD/src/config:/usr/src/app/

## Control items

### Set allowed header
You can set whether you inherit proxy request's host header on verse request at `src/config/configuration.ts`.
```typescript
inheritHostHeader: true,
```

### Set allowed verse request methods
You can set allowed verse request methods by regex at `src/config/configuration.ts`.
```typescript
Expand Down Expand Up @@ -131,7 +137,7 @@ export const getTxAllowList = (): Array<TransactionAllow> => {
```

```typescript
// ! is denial.
// ! is exception_pattern.

// 0xaf395754eB6F542742784cE7702940C60465A46a are not allowed to be transacted.
// But any address other than 0xaf395754eB6F542742784cE7702940C60465A46a are allowed to be transacted.
Expand Down Expand Up @@ -172,7 +178,7 @@ export const getTxAllowList = (): Array<TransactionAllow> => {
```

```typescript
// You can not set setting with address and address_denial.
// You can not set setting with normal_address and exception_pattern.
export const getTxAllowList = (): Array<TransactionAllow> => {
return [
{
Expand Down Expand Up @@ -236,8 +242,11 @@ export const getTxAllowList = (): Array<TransactionAllow> => {
| lt | txValue < condition is allowed |
| lte | txValue <= condition is allowed |

#### Deployer
You can control deployer of a verse.
#### Transaction access rate limit(Option)
If you set transaction access rate limit, follow [Transaction access rate limit](https://github.com/oasysgames/verse-proxy/blob/master/docs/RateLimit.md)

### Set contract deployer
You can control deployer of a verse at `src/config/transactionAllowList.ts`.

```typescript
// Only 0xaf395754eB6F542742784cE7702940C60465A46a can deploy
Expand All @@ -258,16 +267,7 @@ export const getDeployAllowList = (): Array<string> => {
};
```

### Transaction access rate limit(Option)
If you set transaction access rate limit, follow [Transaction access rate limit](/docs/RateLimit.md)

### Set allowed header
You can set whether you inherit proxy request's host header on verse request at `src/config/configuration.ts`.
```typescript
inheritHostHeader: true,
```

### Batch Request
## Batch Request
You can execute batch requests to the proxy.

If you want to make many transaction batch requests, change the parse limit in the body by environment variable.
Expand Down