Skip to content

Commit edbbff9

Browse files
authored
Merge pull request #50 from macalinao/igm/real-vsr
Use correct voter stake registry IDL
2 parents a00f64f + 5b25447 commit edbbff9

27 files changed

+1141
-225
lines changed

.changeset/deep-rats-invite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@macalinao/clients-voter-stake-registry": minor
3+
---
4+
5+
Use correct Grape IDL for voter stake registry

clients/voter-stake-registry/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![npm version](https://img.shields.io/npm/v/@macalinao/clients-voter-stake-registry.svg)](https://www.npmjs.com/package/@macalinao/clients-voter-stake-registry)
44

5-
TypeScript client for the SPL Governance Voter Stake Registry program, generated using Coda with full ESM support.
5+
TypeScript client for the Realms [Voter Stake Registry program](https://github.com/Grape-Labs/voter-stake-registry/) by Grape, generated using Coda with full ESM support.
66

77
## Installation
88

clients/voter-stake-registry/coda.config.mjs

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import {
1111
fixedSizeTypeNode,
1212
numberTypeNode,
1313
optionTypeNode,
14-
payerValueNode,
1514
pdaLinkNode,
1615
pdaSeedValueNode,
1716
pdaValueNode,
@@ -71,6 +70,7 @@ export default defineConfig({
7170
npmPackageName: "@macalinao/clients-voter-stake-registry",
7271
},
7372
visitors: [
73+
addCustomPDAsVisitor,
7474
addNodesVisitor({
7575
voterStakeRegistry: {
7676
accounts: [
@@ -137,38 +137,11 @@ export default defineConfig({
137137

138138
setInstructionAccountDefaultValuesVisitor([
139139
{
140-
account: "tokenProgram",
141-
defaultValue: publicKeyValueNode(
142-
"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
143-
),
144-
},
145-
{
146-
account: "associatedTokenProgram",
140+
account: "governanceProgramId",
147141
defaultValue: publicKeyValueNode(
148-
"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
142+
"GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw",
149143
),
150144
},
151-
{
152-
account: "systemProgram",
153-
defaultValue: publicKeyValueNode("11111111111111111111111111111111"),
154-
},
155-
{
156-
account: "rent",
157-
defaultValue: publicKeyValueNode(
158-
"SysvarRent111111111111111111111111111111111",
159-
),
160-
},
161-
{
162-
account: "instructions",
163-
defaultValue: publicKeyValueNode(
164-
"Sysvar1nstructions1111111111111111111111111",
165-
),
166-
},
167-
{
168-
account: "payer",
169-
defaultValue: payerValueNode(),
170-
},
171-
172145
{
173146
account: "voter",
174147
instruction: "createVoter",
@@ -192,6 +165,5 @@ export default defineConfig({
192165
]),
193166
},
194167
]),
195-
addCustomPDAsVisitor,
196168
],
197169
});

0 commit comments

Comments
 (0)