Skip to content

Commit

Permalink
🔥 (refactor): remove references to goerli
Browse files Browse the repository at this point in the history
  • Loading branch information
nickadamson committed Dec 28, 2023
1 parent d93279c commit 06e6cd0
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .changeset/shaggy-lies-poke.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"@valorem-labs-inc/react-hooks": patch
---

add arbitrum sepolia deployments
add arbitrum sepolia deployments; drop arbitrum goerli
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@connectrpc/connect-query": "0.5.3",
"@connectrpc/connect-web": "^1.2.0",
"@tanstack/react-query": "^4.36.1",
"@valorem-labs-inc/sdk": "^0.0.11-alpha.2",
"@valorem-labs-inc/sdk": "^0.0.11-alpha.3",
"@wagmi/core": "^1.4.12",
"abitype": "0.8.7",
"connectkit": "^1.5.3",
Expand Down
11 changes: 4 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/hooks/useRFQ.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe('useRFQ', () => {
useRFQ({
quoteRequest: new QuoteRequest({
ulid: undefined,
chainId: toH256(BigInt(421613)),
chainId: toH256(BigInt(421614)),
seaportAddress: toH160(hexToBigInt(SEAPORT_ADDRESS)),
takerAddress: toH160(
hexToBigInt('0xb5CF0aC8935Ac3f238B972e465c98BA7E23Dd346'),
Expand Down
8 changes: 4 additions & 4 deletions test/WagmiProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { PropsWithChildren } from 'react';
import { WagmiConfig, createConfig, configureChains } from 'wagmi';
import { publicProvider } from 'wagmi/providers/public';
import { arbitrumGoerli } from 'viem/chains';
import { arbitrumSepolia } from 'viem/chains';
import { createWalletClient, http } from 'viem';
import { privateKeyToAccount } from 'viem/accounts';
import { MockConnector } from 'wagmi/connectors/mock';
Expand All @@ -11,7 +11,7 @@ import { MockConnector } from 'wagmi/connectors/mock';
* Uses the publicProvider as the default provider for transactions.
*/
const { publicClient, webSocketPublicClient } = configureChains(
[arbitrumGoerli],
[arbitrumSepolia],
[publicProvider()],
);

Expand All @@ -27,10 +27,10 @@ const PRIVATE_KEY =
* It creates a wallet client with a given private key and associated chain.
*/
const mockConnector = new MockConnector({
chains: [arbitrumGoerli],
chains: [arbitrumSepolia],
options: {
walletClient: createWalletClient({
chain: arbitrumGoerli,
chain: arbitrumSepolia,
account: privateKeyToAccount(PRIVATE_KEY),
transport: http(),
}),
Expand Down
13 changes: 10 additions & 3 deletions test/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { WagmiProvider } from './WagmiProvider';
import { FC, PropsWithChildren } from 'react';
import { ValoremProvider } from '../src/context';
import { LogLevel } from '../src/context/Logger';
import { SupportedAsset } from '@valorem-labs-inc/sdk';

/**
* A wrapper component that encapsulates the ValoremProvider within the WagmiProvider.
Expand Down Expand Up @@ -59,6 +60,12 @@ export function renderHook<TResult, TProps>(
// Re-export act and cleanup from the testing library for convenience.
export { act, cleanup } from '@testing-library/react';

// Addresses for mock USDC and WETH on Arbitrum Goerli used for testing purposes.
export const USDC_ADDRESS = '0x8AE0EeedD35DbEFe460Df12A20823eFDe9e03458';
export const WETH_ADDRESS = '0x618b9a2Db0CF23Bb20A849dAa2963c72770C1372';
// Addresses for mock USDC and WETH on Arbitrum Sepolia used for testing purposes.
export const USDC_ADDRESS = SupportedAsset.fromSymbolAndChainId(
'USDC',
421614,
).address;
export const WETH_ADDRESS = SupportedAsset.fromSymbolAndChainId(
'WETH',
421614,
).address;
1 change: 0 additions & 1 deletion wagmi.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export default defineConfig({
address: {
1: CLEAR_ADDRESS,
42161: CLEAR_ADDRESS,
421613: CLEAR_ADDRESS,
421614: CLEAR_ADDRESS,
31337: FOUNDRY_CLEAR_ADDRESS,
},
Expand Down

0 comments on commit 06e6cd0

Please sign in to comment.