@@ -12,6 +12,14 @@ export interface MsgSubmitScavenge {
1212
1313export interface MsgSubmitScavengeResponse { }
1414
15+ export interface MsgCommitSolution {
16+ creator : string ;
17+ solutionHash : string ;
18+ solutionScavengerHash : string ;
19+ }
20+
21+ export interface MsgCommitSolutionResponse { }
22+
1523const baseMsgSubmitScavenge : object = {
1624 creator : "" ,
1725 solutionHash : "" ,
@@ -177,12 +185,168 @@ export const MsgSubmitScavengeResponse = {
177185 } ,
178186} ;
179187
188+ const baseMsgCommitSolution : object = {
189+ creator : "" ,
190+ solutionHash : "" ,
191+ solutionScavengerHash : "" ,
192+ } ;
193+
194+ export const MsgCommitSolution = {
195+ encode ( message : MsgCommitSolution , writer : Writer = Writer . create ( ) ) : Writer {
196+ if ( message . creator !== "" ) {
197+ writer . uint32 ( 10 ) . string ( message . creator ) ;
198+ }
199+ if ( message . solutionHash !== "" ) {
200+ writer . uint32 ( 18 ) . string ( message . solutionHash ) ;
201+ }
202+ if ( message . solutionScavengerHash !== "" ) {
203+ writer . uint32 ( 26 ) . string ( message . solutionScavengerHash ) ;
204+ }
205+ return writer ;
206+ } ,
207+
208+ decode ( input : Reader | Uint8Array , length ?: number ) : MsgCommitSolution {
209+ const reader = input instanceof Uint8Array ? new Reader ( input ) : input ;
210+ let end = length === undefined ? reader . len : reader . pos + length ;
211+ const message = { ...baseMsgCommitSolution } as MsgCommitSolution ;
212+ while ( reader . pos < end ) {
213+ const tag = reader . uint32 ( ) ;
214+ switch ( tag >>> 3 ) {
215+ case 1 :
216+ message . creator = reader . string ( ) ;
217+ break ;
218+ case 2 :
219+ message . solutionHash = reader . string ( ) ;
220+ break ;
221+ case 3 :
222+ message . solutionScavengerHash = reader . string ( ) ;
223+ break ;
224+ default :
225+ reader . skipType ( tag & 7 ) ;
226+ break ;
227+ }
228+ }
229+ return message ;
230+ } ,
231+
232+ fromJSON ( object : any ) : MsgCommitSolution {
233+ const message = { ...baseMsgCommitSolution } as MsgCommitSolution ;
234+ if ( object . creator !== undefined && object . creator !== null ) {
235+ message . creator = String ( object . creator ) ;
236+ } else {
237+ message . creator = "" ;
238+ }
239+ if ( object . solutionHash !== undefined && object . solutionHash !== null ) {
240+ message . solutionHash = String ( object . solutionHash ) ;
241+ } else {
242+ message . solutionHash = "" ;
243+ }
244+ if (
245+ object . solutionScavengerHash !== undefined &&
246+ object . solutionScavengerHash !== null
247+ ) {
248+ message . solutionScavengerHash = String ( object . solutionScavengerHash ) ;
249+ } else {
250+ message . solutionScavengerHash = "" ;
251+ }
252+ return message ;
253+ } ,
254+
255+ toJSON ( message : MsgCommitSolution ) : unknown {
256+ const obj : any = { } ;
257+ message . creator !== undefined && ( obj . creator = message . creator ) ;
258+ message . solutionHash !== undefined &&
259+ ( obj . solutionHash = message . solutionHash ) ;
260+ message . solutionScavengerHash !== undefined &&
261+ ( obj . solutionScavengerHash = message . solutionScavengerHash ) ;
262+ return obj ;
263+ } ,
264+
265+ fromPartial ( object : DeepPartial < MsgCommitSolution > ) : MsgCommitSolution {
266+ const message = { ...baseMsgCommitSolution } as MsgCommitSolution ;
267+ if ( object . creator !== undefined && object . creator !== null ) {
268+ message . creator = object . creator ;
269+ } else {
270+ message . creator = "" ;
271+ }
272+ if ( object . solutionHash !== undefined && object . solutionHash !== null ) {
273+ message . solutionHash = object . solutionHash ;
274+ } else {
275+ message . solutionHash = "" ;
276+ }
277+ if (
278+ object . solutionScavengerHash !== undefined &&
279+ object . solutionScavengerHash !== null
280+ ) {
281+ message . solutionScavengerHash = object . solutionScavengerHash ;
282+ } else {
283+ message . solutionScavengerHash = "" ;
284+ }
285+ return message ;
286+ } ,
287+ } ;
288+
289+ const baseMsgCommitSolutionResponse : object = { } ;
290+
291+ export const MsgCommitSolutionResponse = {
292+ encode (
293+ _ : MsgCommitSolutionResponse ,
294+ writer : Writer = Writer . create ( )
295+ ) : Writer {
296+ return writer ;
297+ } ,
298+
299+ decode (
300+ input : Reader | Uint8Array ,
301+ length ?: number
302+ ) : MsgCommitSolutionResponse {
303+ const reader = input instanceof Uint8Array ? new Reader ( input ) : input ;
304+ let end = length === undefined ? reader . len : reader . pos + length ;
305+ const message = {
306+ ...baseMsgCommitSolutionResponse ,
307+ } as MsgCommitSolutionResponse ;
308+ while ( reader . pos < end ) {
309+ const tag = reader . uint32 ( ) ;
310+ switch ( tag >>> 3 ) {
311+ default :
312+ reader . skipType ( tag & 7 ) ;
313+ break ;
314+ }
315+ }
316+ return message ;
317+ } ,
318+
319+ fromJSON ( _ : any ) : MsgCommitSolutionResponse {
320+ const message = {
321+ ...baseMsgCommitSolutionResponse ,
322+ } as MsgCommitSolutionResponse ;
323+ return message ;
324+ } ,
325+
326+ toJSON ( _ : MsgCommitSolutionResponse ) : unknown {
327+ const obj : any = { } ;
328+ return obj ;
329+ } ,
330+
331+ fromPartial (
332+ _ : DeepPartial < MsgCommitSolutionResponse >
333+ ) : MsgCommitSolutionResponse {
334+ const message = {
335+ ...baseMsgCommitSolutionResponse ,
336+ } as MsgCommitSolutionResponse ;
337+ return message ;
338+ } ,
339+ } ;
340+
180341/** Msg defines the Msg service. */
181342export interface Msg {
182- /** this line is used by starport scaffolding # proto/tx/rpc */
183343 SubmitScavenge (
184344 request : MsgSubmitScavenge
185345 ) : Promise < MsgSubmitScavengeResponse > ;
346+ /** this line is used by starport scaffolding # proto/tx/rpc */
347+ CommitSolution (
348+ request : MsgCommitSolution
349+ ) : Promise < MsgCommitSolutionResponse > ;
186350}
187351
188352export class MsgClientImpl implements Msg {
@@ -203,6 +367,20 @@ export class MsgClientImpl implements Msg {
203367 MsgSubmitScavengeResponse . decode ( new Reader ( data ) )
204368 ) ;
205369 }
370+
371+ CommitSolution (
372+ request : MsgCommitSolution
373+ ) : Promise < MsgCommitSolutionResponse > {
374+ const data = MsgCommitSolution . encode ( request ) . finish ( ) ;
375+ const promise = this . rpc . request (
376+ "scavenge.scavenge.Msg" ,
377+ "CommitSolution" ,
378+ data
379+ ) ;
380+ return promise . then ( ( data ) =>
381+ MsgCommitSolutionResponse . decode ( new Reader ( data ) )
382+ ) ;
383+ }
206384}
207385
208386interface Rpc {
0 commit comments