thirdweb

Vyper_contract

Ethereum
etherscanblockscout
Code Snippets

Exchange

(exchange)

payable

i

j

dx

min_dy


The native currency value (in Ether) to send with this transaction (ex: 0.01 to send 0.01 native currency).

Connect Wallet

Use this function in your app


import { prepareContractCall, sendTransaction } from "thirdweb"; const transaction = await prepareContractCall({ contract, method: "function exchange(uint256 i, uint256 j, uint256 dx, uint256 min_dy) payable returns (uint256)", params: [i, j, dx, min_dy] }); const { transactionHash } = await sendTransaction({ transaction, account });