Skip to content

Commit e43b5a2

Browse files
authored
Merge pull request #1388 from PhilippeR26/NewRPC08Methods
fix: new rpc08 methods are not accessible in RpcProvider
2 parents 6486e4b + 9a0f0fa commit e43b5a2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/provider/rpc.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -688,9 +688,9 @@ export class RpcProvider implements ProviderInterface {
688688
/**
689689
* Given an l1 tx hash, returns the associated l1_handler tx hashes and statuses for all L1 -> L2 messages sent by the l1 transaction, ordered by the l1 tx sending order
690690
*/
691-
public getL1MessagesStatus(transactionHash: BigNumberish) {
691+
public async getL1MessagesStatus(transactionHash: BigNumberish): Promise<RPC.L1L2MessagesStatus> {
692692
if (this.channel instanceof RPC08.RpcChannel) {
693-
this.channel.getMessagesStatus(transactionHash);
693+
return this.channel.getMessagesStatus(transactionHash);
694694
}
695695

696696
throw new LibraryError('Unsupported method for RPC version');
@@ -699,14 +699,14 @@ export class RpcProvider implements ProviderInterface {
699699
/**
700700
* Get merkle paths in one of the state tries: global state, classes, individual contract
701701
*/
702-
public getStorageProof(
702+
public async getStorageProof(
703703
classHashes: BigNumberish[],
704704
contractAddresses: BigNumberish[],
705705
contractsStorageKeys: RPC.CONTRACT_STORAGE_KEYS[],
706706
blockIdentifier?: BlockIdentifier
707-
) {
707+
): Promise<RPC.StorageProof> {
708708
if (this.channel instanceof RPC08.RpcChannel) {
709-
this.channel.getStorageProof(
709+
return this.channel.getStorageProof(
710710
classHashes,
711711
contractAddresses,
712712
contractsStorageKeys,
@@ -720,9 +720,9 @@ export class RpcProvider implements ProviderInterface {
720720
/**
721721
* Get the contract class definition in the given block associated with the given hash
722722
*/
723-
public getCompiledCasm(classHash: BigNumberish) {
723+
public async getCompiledCasm(classHash: BigNumberish): Promise<RPC.CASM_COMPILED_CONTRACT_CLASS> {
724724
if (this.channel instanceof RPC08.RpcChannel) {
725-
this.channel.getCompiledCasm(classHash);
725+
return this.channel.getCompiledCasm(classHash);
726726
}
727727

728728
throw new LibraryError('Unsupported method for RPC version');

0 commit comments

Comments
 (0)