Skip to content

Commit

Permalink
Apply automatic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
massabot committed Dec 12, 2023
1 parent 97d9c86 commit 7505e8f
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assembly/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export * from "./massa/abi/v1/CallRequest";
export * from "./massa/abi/v1/CallResponse";
export * from "./massa/abi/v1/CallerHasWriteAccessRequest";
export * from "./massa/abi/v1/CallerHasWriteAccessResult";
export * from "./massa/abi/v1/ChainIdRequest";
export * from "./massa/abi/v1/ChainIdResult";
export * from "./massa/abi/v1/CheckAddressRequest";
export * from "./massa/abi/v1/CheckAddressResult";
export * from "./massa/abi/v1/CheckNativeAmountRequest";
Expand Down
36 changes: 36 additions & 0 deletions assembly/massa/abi/v1/ChainIdRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Code generated by protoc-gen-as. DO NOT EDIT.
// Versions:
// protoc-gen-as v1.3.0
// protoc v4.23.2

import { Writer, Reader, Protobuf } from "as-proto/assembly";

export class ChainIdRequest {
static encode(message: ChainIdRequest, writer: Writer): void {}

static decode(reader: Reader, length: i32): ChainIdRequest {
const end: usize = length < 0 ? reader.end : reader.ptr + length;
const message = new ChainIdRequest();

while (reader.ptr < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
default:
reader.skipType(tag & 7);
break;
}
}

return message;
}

constructor() {}
}

export function encodeChainIdRequest(message: ChainIdRequest): Uint8Array {
return Protobuf.encode(message, ChainIdRequest.encode);
}

export function decodeChainIdRequest(buffer: Uint8Array): ChainIdRequest {
return Protobuf.decode<ChainIdRequest>(buffer, ChainIdRequest.decode);
}
47 changes: 47 additions & 0 deletions assembly/massa/abi/v1/ChainIdResult.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
// Code generated by protoc-gen-as. DO NOT EDIT.
// Versions:
// protoc-gen-as v1.3.0
// protoc v4.23.2

import { Writer, Reader, Protobuf } from "as-proto/assembly";

export class ChainIdResult {
static encode(message: ChainIdResult, writer: Writer): void {
writer.uint32(8);
writer.uint64(message.id);
}

static decode(reader: Reader, length: i32): ChainIdResult {
const end: usize = length < 0 ? reader.end : reader.ptr + length;
const message = new ChainIdResult();

while (reader.ptr < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1:
message.id = reader.uint64();
break;

default:
reader.skipType(tag & 7);
break;
}
}

return message;
}

id: u64;

constructor(id: u64 = 0) {
this.id = id;
}
}

export function encodeChainIdResult(message: ChainIdResult): Uint8Array {
return Protobuf.encode(message, ChainIdResult.encode);
}

export function decodeChainIdResult(buffer: Uint8Array): ChainIdResult {
return Protobuf.decode<ChainIdResult>(buffer, ChainIdResult.decode);
}
18 changes: 17 additions & 1 deletion assembly/massa/abi/v1/RespResult.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import { VerifySigResult } from "./VerifySigResult";
import { EvmGetAddressFromPubkeyResult } from "./EvmGetAddressFromPubkeyResult";
import { EvmGetPubkeyFromSignatureResult } from "./EvmGetPubkeyFromSignatureResult";
import { IsAddressEoaResult } from "./IsAddressEoaResult";
import { ChainIdResult } from "./ChainIdResult";

export class RespResult {
static encode(message: RespResult, writer: Writer): void {
Expand Down Expand Up @@ -586,6 +587,14 @@ export class RespResult {
IsAddressEoaResult.encode(isAddressEoaResult, writer);
writer.ldelim();
}

const chainIdResult = message.chainIdResult;
if (chainIdResult !== null) {
writer.uint32(506);
writer.fork();
ChainIdResult.encode(chainIdResult, writer);
writer.ldelim();
}
}

static decode(reader: Reader, length: i32): RespResult {
Expand Down Expand Up @@ -1003,6 +1012,10 @@ export class RespResult {
);
break;

case 63:
message.chainIdResult = ChainIdResult.decode(reader, reader.uint32());
break;

default:
reader.skipType(tag & 7);
break;
Expand Down Expand Up @@ -1074,6 +1087,7 @@ export class RespResult {
evmGetAddressFromPubkeyResult: EvmGetAddressFromPubkeyResult | null;
evmGetPubkeyFromSignatureResult: EvmGetPubkeyFromSignatureResult | null;
isAddressEoaResult: IsAddressEoaResult | null;
chainIdResult: ChainIdResult | null;

constructor(
addNativeAmountResult: AddNativeAmountResult | null = null,
Expand Down Expand Up @@ -1137,7 +1151,8 @@ export class RespResult {
verifySigResult: VerifySigResult | null = null,
evmGetAddressFromPubkeyResult: EvmGetAddressFromPubkeyResult | null = null,
evmGetPubkeyFromSignatureResult: EvmGetPubkeyFromSignatureResult | null = null,
isAddressEoaResult: IsAddressEoaResult | null = null
isAddressEoaResult: IsAddressEoaResult | null = null,
chainIdResult: ChainIdResult | null = null
) {
this.addNativeAmountResult = addNativeAmountResult;
this.addressFromPubKeyResult = addressFromPubKeyResult;
Expand Down Expand Up @@ -1202,6 +1217,7 @@ export class RespResult {
this.evmGetAddressFromPubkeyResult = evmGetAddressFromPubkeyResult;
this.evmGetPubkeyFromSignatureResult = evmGetPubkeyFromSignatureResult;
this.isAddressEoaResult = isAddressEoaResult;
this.chainIdResult = chainIdResult;
}
}

Expand Down
2 changes: 1 addition & 1 deletion massa-proto

0 comments on commit 7505e8f

Please sign in to comment.