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

Random swap script for testnet #309

Merged
merged 8 commits into from
Oct 15, 2024
Merged
1 change: 1 addition & 0 deletions cron/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
USER_MNEMONIC=
45 changes: 45 additions & 0 deletions cron/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
A standalone subproject for scripts that can be executed without compiling the sdk.

## Getting started

### Prerequisites

-Node v20 ([node](https://nodejs.org/en/download/package-manager))

#### Node

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.0/install.sh | bash &&
nvm install 20

```

### Fetch dependencies

```bash
npm i
```

### Fill in your mnemonic

In the *.env* file add your own mnemonic in the following line:
```
DEPLOYER_MNEMONIC=add your mnemonic here this is the right place for twelve words
Copy link
Collaborator

@zielvna zielvna Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like it was changed to USER_MNEMONIC

```

Mnemonic is only required if scripts perform operations other than queries.

### Available scripts

#### random-swap-testnet.ts
Perform random swaps on Invariant testnet using only our faucet tokens.
```bash
npm run random-swap-testnet
```

#### validate-state.ts
Validate the integrity of the protocol's state. Performs only query operations.

```bash
npm run validate-state
```
Loading
Loading