Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I tried to call the quote contract method quoteExactInput on the arbitration goerli network, but it failed #361

Open
ruiyeclub opened this issue Sep 27, 2023 · 0 comments

Comments

@ruiyeclub
Copy link

ruiyeclub commented Sep 27, 2023

async quote(encodePath, tokenIn, tokenOut, amountIn, endPoint) {
        const quoterContract = new ethers.Contract(
            '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6',
            Quoter.abi,
            this.getMainnetProvider(endPoint)
        )

        let tokenAmountIn = this.fromReadableAmount(amountIn, tokenIn.decimals).toString()
        const quotedAmountOut = await quoterContract.callStatic.quoteExactInput(
            encodePath,
            tokenAmountIn
        )

        return this.toReadableAmount(quotedAmountOut, tokenOut.decimals)
    }

May I ask what is the contract address of the quote contract in arbitration goerli? If not, how can I obtain the exchange rate between currencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant