diff --git a/assembly/index.ts b/assembly/index.ts index 5ddbcb9..006ec74 100644 --- a/assembly/index.ts +++ b/assembly/index.ts @@ -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"; diff --git a/assembly/massa/abi/v1/ChainIdRequest.ts b/assembly/massa/abi/v1/ChainIdRequest.ts new file mode 100644 index 0000000..6ab758c --- /dev/null +++ b/assembly/massa/abi/v1/ChainIdRequest.ts @@ -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(buffer, ChainIdRequest.decode); +} diff --git a/assembly/massa/abi/v1/ChainIdResult.ts b/assembly/massa/abi/v1/ChainIdResult.ts new file mode 100644 index 0000000..0804a60 --- /dev/null +++ b/assembly/massa/abi/v1/ChainIdResult.ts @@ -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(buffer, ChainIdResult.decode); +} diff --git a/assembly/massa/abi/v1/RespResult.ts b/assembly/massa/abi/v1/RespResult.ts index edbb589..ccd9960 100644 --- a/assembly/massa/abi/v1/RespResult.ts +++ b/assembly/massa/abi/v1/RespResult.ts @@ -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 { @@ -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 { @@ -1003,6 +1012,10 @@ export class RespResult { ); break; + case 63: + message.chainIdResult = ChainIdResult.decode(reader, reader.uint32()); + break; + default: reader.skipType(tag & 7); break; @@ -1074,6 +1087,7 @@ export class RespResult { evmGetAddressFromPubkeyResult: EvmGetAddressFromPubkeyResult | null; evmGetPubkeyFromSignatureResult: EvmGetPubkeyFromSignatureResult | null; isAddressEoaResult: IsAddressEoaResult | null; + chainIdResult: ChainIdResult | null; constructor( addNativeAmountResult: AddNativeAmountResult | null = null, @@ -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; @@ -1202,6 +1217,7 @@ export class RespResult { this.evmGetAddressFromPubkeyResult = evmGetAddressFromPubkeyResult; this.evmGetPubkeyFromSignatureResult = evmGetPubkeyFromSignatureResult; this.isAddressEoaResult = isAddressEoaResult; + this.chainIdResult = chainIdResult; } } diff --git a/massa-proto b/massa-proto index ff02e85..cb5671f 160000 --- a/massa-proto +++ b/massa-proto @@ -1 +1 @@ -Subproject commit ff02e85b149354a5e102f55aef862994488f7bd1 +Subproject commit cb5671fd6499c2f47d13d812fadf029e511b2ab2