This repository has been archived by the owner on May 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1406 from connext/1405-pre-collateralization
✨ Add new collateralization config and admin endpoints
- Loading branch information
Showing
16 changed files
with
294 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Node | ||
|
||
## Configuration | ||
|
||
### Environment Variables | ||
|
||
The following environment variables are used by the node: | ||
|
||
| Variable Name | Type | Description | Example | | ||
| --------------------------------------- | ----------- | ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `INDRA_ADMIN_TOKEN` | String | Token for administrative functions. | cxt1234 | | ||
| `INDRA_CHAIN_PROVIDERS` | JSON String | Mapping of chainId to ethProviderUrl | '{"1":"https://mainnet.infura.io/v3/TOKEN","4":"https://rinkeby.infura.io/v3/TOKEN"}' | | ||
| `INDRA_CONTRACT_ADDRESSES` | JSON String | Contract information, keyed by chainId | '{ "1337": { "ChallengeRegistry": { "address": "0x8CdaF0CD259887258Bc13a92C0a6dA92698644C0", "creationCodeHash": "0x42eba77f58ecb5c1352e9a62df1eed73aa1a89890ff73be1939f884f62d88c46", "runtimeCodeHash": "0xc38bff65185807f2babc2ae1334b0bdcf5fe0192ae041e3033b2084c61f80950", "txHash": "0x89f705aefdffa59061d97488e4507a7af4a4751462e100b8ed3fb1f5cc2238af" }, ...}' | | ||
| `INDRA_DEFAULT_REBALANCE_PROFILE_ETH` | JSON String | Rebalance Profile to use by default | '{"collateralizeThreshold":"500000000000","target":"1500000000000","reclaimThreshold":"10000000000000"}' | | ||
| `INDRA_DEFAULT_REBALANCE_PROFILE_TOKEN` | JSON String | Rebalance Profile to use by default (real units) | '{"collateralizeThreshold":"500000000000","target":"1500000000000","reclaimThreshold":"10000000000000"} | | ||
| `INDRA_LOG_LEVEL` | Number | Log level - 1 = Error, 4 = Debug | 3 | | ||
| `INDRA_MNEMONIC_FILE` | | ||
| `INDRA_NATS_JWT_SIGNER_PRIVATE_KEY` | | ||
| `INDRA_NATS_JWT_SIGNER_PUBLIC_KEY` | | ||
| `INDRA_NATS_SERVERS` | | ||
| `INDRA_NATS_WS_ENDPOINT` | | ||
| `INDRA_PG_DATABASE` | | ||
| `INDRA_PG_HOST` | | ||
| `INDRA_PG_PASSWORD_FILE` | | ||
| `INDRA_PG_PORT` | | ||
| `INDRA_PG_USERNAME` | | ||
| `INDRA_PORT` | | ||
| `INDRA_REDIS_URL` | | ||
| | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,37 @@ | ||
### ADMIN REQUESTS | ||
|
||
### | ||
# Force uninstall deposit app (only works if node has deposit rights) | ||
|
||
POST http://localhost:3000/api/admin/uninstall-deposit | ||
Content-Type: application/json | ||
x-auth-token: cxt1234 | ||
|
||
{ | ||
"multisigAddress": "0x93a8eAFC6436F3e238d962Cb429893ec22875705", | ||
"assetId": "0x4E72770760c011647D4873f60A3CF6cDeA896CD8" | ||
} | ||
} | ||
|
||
### | ||
# Set rebalance profile | ||
|
||
POST http://localhost:3000/api/admin/rebalance-profile | ||
Content-Type: application/json | ||
x-auth-token: cxt1234 | ||
|
||
{ | ||
"multisigAddress": "0x93a8eAFC6436F3e238d962Cb429893ec22875705", | ||
"rebalanceProfile": { | ||
"assetId": "0x4E72770760c011647D4873f60A3CF6cDeA896CD8", | ||
"collateralizeThreshold": "5", | ||
"target": "15", | ||
"reclaimThreshold": "0" | ||
} | ||
} | ||
|
||
### | ||
# GET rebalance profile | ||
|
||
GET http://localhost:3000/api/admin/rebalance-profile/0x93a8eAFC6436F3e238d962Cb429893ec22875705/0x0000000000000000000000000000000000000000 | ||
Content-Type: application/json | ||
x-auth-token: cxt1234 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.