Skip to content
This repository was archived by the owner on May 31, 2023. It is now read-only.

Commit 7365077

Browse files
author
Richard Patel
authored
builder: specialize instruction return types (#9)
1 parent 2fcf29e commit 7365077

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

builder.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (i *InstructionBuilder) AddMapping(
4646
fundingKey solana.PublicKey,
4747
tailMappingKey solana.PublicKey,
4848
newMappingKey solana.PublicKey,
49-
) solana.Instruction {
49+
) *Instruction {
5050
return &Instruction{
5151
programKey: i.programKey,
5252
Header: makeCommandHeader(Instruction_AddMapping),
@@ -63,7 +63,7 @@ func (i *InstructionBuilder) AddProduct(
6363
fundingKey solana.PublicKey,
6464
mappingKey solana.PublicKey,
6565
productKey solana.PublicKey,
66-
) solana.Instruction {
66+
) *Instruction {
6767
return &Instruction{
6868
programKey: i.programKey,
6969
Header: makeCommandHeader(Instruction_AddProduct),
@@ -80,7 +80,7 @@ func (i *InstructionBuilder) UpdProduct(
8080
fundingKey solana.PublicKey,
8181
productKey solana.PublicKey,
8282
payload CommandUpdProduct,
83-
) solana.Instruction {
83+
) *Instruction {
8484
return &Instruction{
8585
programKey: i.programKey,
8686
Header: makeCommandHeader(Instruction_UpdProduct),
@@ -98,7 +98,7 @@ func (i *InstructionBuilder) AddPrice(
9898
productKey solana.PublicKey,
9999
priceKey solana.PublicKey,
100100
payload CommandAddPrice,
101-
) solana.Instruction {
101+
) *Instruction {
102102
return &Instruction{
103103
programKey: i.programKey,
104104
Header: makeCommandHeader(Instruction_AddPrice),
@@ -116,7 +116,7 @@ func (i *InstructionBuilder) AddPublisher(
116116
fundingKey solana.PublicKey,
117117
priceKey solana.PublicKey,
118118
payload CommandAddPublisher,
119-
) solana.Instruction {
119+
) *Instruction {
120120
return &Instruction{
121121
programKey: i.programKey,
122122
Header: makeCommandHeader(Instruction_AddPublisher),
@@ -133,7 +133,7 @@ func (i *InstructionBuilder) DelPublisher(
133133
fundingKey solana.PublicKey,
134134
priceKey solana.PublicKey,
135135
payload CommandDelPublisher,
136-
) solana.Instruction {
136+
) *Instruction {
137137
return &Instruction{
138138
programKey: i.programKey,
139139
Header: makeCommandHeader(Instruction_DelPublisher),
@@ -150,7 +150,7 @@ func (i *InstructionBuilder) UpdPrice(
150150
fundingKey solana.PublicKey,
151151
priceKey solana.PublicKey,
152152
payload CommandUpdPrice,
153-
) solana.Instruction {
153+
) *Instruction {
154154
return &Instruction{
155155
programKey: i.programKey,
156156
Header: makeCommandHeader(Instruction_UpdPrice),
@@ -167,7 +167,7 @@ func (i *InstructionBuilder) UpdPrice(
167167
func (i *InstructionBuilder) AggPrice(
168168
fundingKey solana.PublicKey,
169169
priceKey solana.PublicKey,
170-
) solana.Instruction {
170+
) *Instruction {
171171
return &Instruction{
172172
programKey: i.programKey,
173173
Header: makeCommandHeader(Instruction_AggPrice),
@@ -184,7 +184,7 @@ func (i *InstructionBuilder) InitPrice(
184184
fundingKey solana.PublicKey,
185185
priceKey solana.PublicKey,
186186
payload CommandInitPrice,
187-
) solana.Instruction {
187+
) *Instruction {
188188
return &Instruction{
189189
programKey: i.programKey,
190190
Header: makeCommandHeader(Instruction_InitPrice),
@@ -200,7 +200,7 @@ func (i *InstructionBuilder) InitPrice(
200200
func (i *InstructionBuilder) InitTest(
201201
fundingKey solana.PublicKey,
202202
testKey solana.PublicKey,
203-
) solana.Instruction {
203+
) *Instruction {
204204
return &Instruction{
205205
programKey: i.programKey,
206206
Header: makeCommandHeader(Instruction_InitTest),
@@ -216,7 +216,7 @@ func (i *InstructionBuilder) UpdTest(
216216
fundingKey solana.PublicKey,
217217
testKey solana.PublicKey,
218218
payload CommandUpdTest,
219-
) solana.Instruction {
219+
) *Instruction {
220220
return &Instruction{
221221
programKey: i.programKey,
222222
Header: makeCommandHeader(Instruction_UpdTest),
@@ -233,7 +233,7 @@ func (i *InstructionBuilder) SetMinPub(
233233
fundingKey solana.PublicKey,
234234
priceKey solana.PublicKey,
235235
payload CommandSetMinPub,
236-
) solana.Instruction {
236+
) *Instruction {
237237
return &Instruction{
238238
programKey: i.programKey,
239239
Header: makeCommandHeader(Instruction_SetMinPub),

0 commit comments

Comments
 (0)