Skip to content

Commit 99b34ad

Browse files
committed
Add Solana getProgramAccounts profiles
1 parent 1106b62 commit 99b34ad

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from locust import task
2+
3+
from chainbench.user.protocol.solana import SolanaUser
4+
from chainbench.user.http import RpcCall
5+
6+
7+
class GetProgramAccounts(SolanaUser):
8+
@task
9+
def get_program_accounts_shark_task(self) -> None:
10+
self.make_rpc_call(
11+
RpcCall(
12+
method="getProgramAccounts",
13+
params=[
14+
"SharkXwkS3h24fJ2LZvgG5tPbsH3BKQYuAtKdqskf1f",
15+
{"encoding": "base64", "commitment": "confirmed"}
16+
],
17+
),
18+
name="getProgramAccounts_shark"
19+
)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
from locust import task
2+
3+
from chainbench.user.protocol.solana import SolanaUser
4+
from chainbench.user.http import RpcCall
5+
6+
7+
class GetProgramAccounts(SolanaUser):
8+
@task
9+
def get_program_accounts_stake_task(self) -> None:
10+
self.make_rpc_call(
11+
RpcCall(
12+
method="getProgramAccounts",
13+
params=[
14+
"Stake11111111111111111111111111111111111111",
15+
{
16+
"encoding": "jsonParsed",
17+
"commitment": "finalized",
18+
"filters": [
19+
{"memcmp": {"bytes": "2K9XJAj3VtojUhyKdXVfGnueSvnyFNfSACkn1CwgBees", "offset": 12}}],
20+
},
21+
],
22+
),
23+
name="getProgramAccounts_stake"
24+
)

0 commit comments

Comments
 (0)