ethers-io / ethers.js

Complete Ethereum library and wallet implementation in JavaScript.
https://ethers.org/
MIT License
7.91k stars 1.84k forks source link

Eip1193Provider is not consistent with the standard #4793

Open xd-shadow opened 2 months ago

xd-shadow commented 2 months ago

Ethers Version

6.13.2

Search Terms

Eip1193Provider

Describe the Problem

According to the EIPs standard (https://eips.ethereum.org/EIPS/eip-1193), Eip1193Provider should include the on and removeListener events. When using TypeScript, this will cause a type error.

Code Snippet

export interface Eip1193Provider {
    /**
     *  See [[link-eip-1193]] for details on this method.
     */
    request(request: { method: string, params?: Array<any> | Record<string, any> }): Promise<any>;
};

Contract ABI

No response

Errors

No response

Environment

Other (please specify)

Environment (Other)

Vue3