Skip to content

Commit

Permalink
feat: add RpcProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixGibson committed Dec 29, 2023
1 parent a094906 commit 18c41f1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions sdk/packages/instaswap-core/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AccountInterface, BigNumberish, Provider } from "starknet";
import { AccountInterface, BigNumberish, RpcProvider } from "starknet";
import { FeeAmount } from "./constants";

export type Config = {
Expand All @@ -9,7 +9,7 @@ export type Config = {
ekuboCoreAddress: string;
quoterAddress: string;
account: AccountInterface | undefined;
provider?: Provider;
provider?: RpcProvider;
};

export type LiquidityParams = {
Expand Down
7 changes: 3 additions & 4 deletions sdk/packages/interface/src/components/ButtonClick.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useAccount, useConnectors } from "@starknet-react/core";
import { useCallback, useMemo, useState, useEffect } from "react";
import { Contract, uint256, CallData, RawArgs, Call, num } from "starknet";
import { Contract, uint256, CallData, RawArgs, Call, num, RpcProvider } from "starknet";
import { Wrap } from "instaswap-core";
import { FeeAmount, SwapDirection } from "instaswap-core";
import { Provider, constants, cairo } from "starknet";
Expand Down Expand Up @@ -56,9 +56,8 @@ const ButtonClick = () => {
() => "0x1090e3cfd9990c396f246cd1d5c7fb091905cba9f99739653db1f2960a3311f",
[],
);
const provider = new Provider({
sequencer: { network: constants.NetworkName.SN_GOERLI },
});
const infuraKey = "54aff2ddb77a4d01a5b0e61deb37e8d6";
const provider = new RpcProvider({ nodeUrl: 'https://starknet-goerli.infura.io/v3/' + infuraKey });

const config = {
erc1155Address: erc1155_address,
Expand Down

0 comments on commit 18c41f1

Please sign in to comment.