In complete typings for viem

オープン
#59 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

Start by reading the ResponseListener typings shown in the issue and locating their definition in the functions-toolkit package. Check how the listener uses its provider and whether the viem client can be supported alongside ethers. Done means viem users can pass a client without a type mismatch; the issue names no test or implementation file to guide verification.

索引モデルが issue の本文から書いたものです。

説明

chainlink ts sdk have in complete typings with viem for example

import type { providers } from 'ethers';
import { type FunctionsResponse } from './types';
export declare class ResponseListener {
    private functionsRouter;
    private provider;
    constructor({ provider, functionsRouterAddress, }: {
        provider: providers.Provider;
        functionsRouterAddress: string;
    });
    listenForResponse(requestId: string, timeout?: number): Promise<FunctionsResponse>;
    listenForResponseFromTransaction(txHash: string, timeout?: number, confirmations?: number, checkInterval?: number): Promise<FunctionsResponse>;
    listenForResponses(subscriptionId: number | string, callback: (functionsResponse: FunctionsResponse) => any): void;
    stopListeningForResponses(): void;
}

Response listener accepts provider that i asume is a json rpc provider but when i pass a from viem it's mis matched types

import { createPublicClient, http } from 'viem'
import { mainnet } from 'viem/chains'
 
const client = createPublicClient({ 
  chain: mainnet, 
  transport: http('https://eth-mainnet.g.alchemy.com/v2/<apiKey>') 
}) 

here client is equalent to json rpc provider from ethers

主要言語
TypeScript
スター
36
フォーク
15
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

smartcontractkit/functions-toolkit のほかの issue

smartcontractkit/functions-toolkit の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。