Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Update to toolkit v6 (#29)
Browse files Browse the repository at this point in the history
  • Loading branch information
fadeev authored Apr 1, 2024
1 parent dc33bd0 commit 170cea0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 20 deletions.
5 changes: 4 additions & 1 deletion app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ export default function Index({ children }: RootLayoutProps) {
if (!isConnected) {
return setBalances([])
}
const b = await client.getBalances(address, btc)
const b = await client.getBalances({
evmAddress: address,
btcAddress: btc,
})
setBalances(b)
} catch (e) {
console.log(e)
Expand Down
4 changes: 2 additions & 2 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import {
import { WagmiConfig, configureChains, createConfig } from "wagmi"
import {
bscTestnet,
goerli,
polygonMumbai,
sepolia,
zetachainAthensTestnet,
} from "wagmi/chains"
import { publicProvider } from "wagmi/providers/public"
Expand All @@ -33,7 +33,7 @@ interface RootLayoutProps {

const { chains, publicClient, webSocketPublicClient } = configureChains(
[
goerli,
sepolia,
polygonMumbai,
bscTestnet,
{
Expand Down
2 changes: 1 addition & 1 deletion components/transfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ const Transfer = () => {
parseFloat(sourceAmount) > 0 && setDestinationAmountIsLoading(true)
const rpc = getEndpoints("evm", "zeta_testnet")[0]?.url
const provider = new ethers.providers.StaticJsonRpcProvider(rpc)
const routerAddress = getAddress("uniswapv2Router02", "zeta_testnet")
const routerAddress = getAddress("uniswapV2Router02", "zeta_testnet")
const router = new ethers.Contract(
routerAddress as any,
UniswapV2Factory.abi,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@uniswap/v3-core": "^1.0.1",
"@uniswap/v3-sdk": "^3.10.0",
"@zetachain/example-contracts": "1.0.0-rc1",
"@zetachain/toolkit": "6.0.0-rc3",
"@zetachain/toolkit": "6.0.0",
"bech32": "^2.0.0",
"class-variance-authority": "^0.4.0",
"clsx": "^1.2.1",
Expand Down Expand Up @@ -85,4 +85,4 @@
"tailwindcss": "^3.3.2",
"typescript": "^5.2.2"
}
}
}
28 changes: 14 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3664,31 +3664,31 @@
typescript "5.0.4"
zod "3.19.1"

"@zetachain/networks@4.0.0-rc1":
version "4.0.0-rc1"
resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-4.0.0-rc1.tgz#0ec6efabaa78d7124f5adb9218f25d85e252087b"
integrity sha512-Zl8cZc5PdKI46KZqPeIu7DmpSqUkXN07L9Yxy/Lp233L9pZKWUVr7RnEq2HUaN9F6gqtxlofNtKBFopphm1pEQ==
"@zetachain/networks@6.0.0":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@zetachain/networks/-/networks-6.0.0.tgz#ae5d3cd1678b32510edfaa71f8f4a6f4cbc1d9ab"
integrity sha512-yKFVP/yJDp76Q5lBGfZSpY/KO3TZ9ldo0lhE4MpBW43EsBxOZWixg6sqb56mcU/gg1lbWG8sHHWtYFK51SByjQ==
dependencies:
dotenv "^16.1.4"

"@zetachain/protocol-contracts@5.0.0-rc6":
version "5.0.0-rc6"
resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-5.0.0-rc6.tgz#1ec1419a71cdea831ac8de159bfbffae257785f5"
integrity sha512-NIN3mkR4csq1yGtv9miOWKHj2S6azTo/QET7ALKh5dxPnpCmTHx9Lgf+xuDa95W/Tbw8BAGHdRoyp0z3j72kXQ==
"@zetachain/protocol-contracts@7.0.0-rc1":
version "7.0.0-rc1"
resolved "https://registry.yarnpkg.com/@zetachain/protocol-contracts/-/protocol-contracts-7.0.0-rc1.tgz#588483d1ec70e572b7e40e84ef5b34282b0ab375"
integrity sha512-vgS+Pjh4MysOyw8WbqTQVBsHJYqKvMcdV7cNVqxaTJd/dl2ak7NNvsIeaeUnxQrp8XfQol2B8GXJpVLM6MK/dg==

"@zetachain/[email protected]-rc3":
version "6.0.0-rc3"
resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-6.0.0-rc3.tgz#20c19eac528b836d781fa2c51ba16d574f565fd0"
integrity sha512-tyQkrLJnGBQ7LoH3tKqGwM3jaAm1Z85ZgtGfjjeLJNgsTo9urYZ2g++XhxjaQJKlE80295ieyZ2RwfyPAPvIkw==
"@zetachain/[email protected]":
version "6.0.0"
resolved "https://registry.yarnpkg.com/@zetachain/toolkit/-/toolkit-6.0.0.tgz#385cfd11f1ac39cbb6ca6410109523e2ab6f8841"
integrity sha512-JAtl7CX8cMJ+iw/byjcbLqgCfPS87vkdYCZOPBBOudqUySPTz4owqVgGZB/xYRyXBsF0KW0F6R65sc+fleQ86A==
dependencies:
"@inquirer/prompts" "^2.1.1"
"@inquirer/select" "1.1.3"
"@nomiclabs/hardhat-ethers" "^2.2.3"
"@openzeppelin/contracts" "^4.9.2"
"@uniswap/v2-periphery" "^1.1.0-beta.0"
"@zetachain/faucet-cli" "^4.0.1"
"@zetachain/networks" "4.0.0-rc1"
"@zetachain/protocol-contracts" "5.0.0-rc6"
"@zetachain/networks" "6.0.0"
"@zetachain/protocol-contracts" "7.0.0-rc1"
axios "^1.4.0"
bech32 "^2.0.0"
bip39 "^3.1.0"
Expand Down

0 comments on commit 170cea0

Please sign in to comment.