Skip to content

Commit 5d621f8

Browse files
authored
Add load test for provider (#115)
1 parent 79a2eeb commit 5d621f8

File tree

7 files changed

+268
-95
lines changed

7 files changed

+268
-95
lines changed

scripts/opportunity-provider/README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,14 @@ $PERMIT2 $AMOUNT
2828

2929
### Provide Opportunity
3030

31-
Then update the `opportunity.json` and `config.json` files for the opportunity you want to provide, and then run the following command:
31+
Then update the `opportunities.json` and `config.json` files for the opportunity you want to provide, and then run the following command:
3232

3333
```
34-
$ npm run opportunity-provider
34+
$ npm run opportunity-provider -- --private-key $PRIVATE_KEY
35+
```
36+
37+
To create and submit random opportunities for load test, first update the `tokens.json` file, and use the following command:
38+
39+
```
40+
$ npm run opportunity-provider -- --private-key $PRIVATE_KEY --load-test --count 10
3541
```
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"serverUrl": "https://pyth-express-relay-mainnet.asymmetric.re",
3+
"opportunityProvider": "0x621330D0ECd449A06b72f41C1A93626cCEC53ccA",
4+
"permit2": "0x000000000022D473030F116dDEE9F6B43aC78BA3",
5+
"chainNetworkId": 34443,
6+
"chainId": "mode",
7+
"rpcUrl": "https://mainnet.mode.network/"
8+
}

0 commit comments

Comments
 (0)