Skip to content

What's the equivalent to ether's contract.estimateGas? #541

Answered by nasa8x
fseitun-ac asked this question in Q&A
Discussion options

You must be logged in to vote

I found in the provider there is a method estimateGas

    const provider = useProvider();

    provider.estimateGas(
        {
            to?: string,
            from?: string,
            nonce?: BigNumberish,
        
            gasLimit?: BigNumberish,
            gasPrice?: BigNumberish,
        
            data?: BytesLike,
            value?: BigNumberish,
            chainId?: number
        
            type?: number;
            accessList?: AccessListish;
        
            maxPriorityFeePerGas?: BigNumberish;
            maxFeePerGas?: BigNumberish;
        
            customData?: Record<string, any>;
            ccipReadEnabled?: boolean;
        }
    )

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@fseitun-ac
Comment options

Comment options

You must be logged in to vote
1 reply
@fseitun-ac
Comment options

Answer selected by fseitun-ac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants