Skip to content

Commit

Permalink
Add faucet, fix codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
af-afk committed Jun 21, 2024
1 parent 1c194d4 commit 83ad553
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 8 deletions.
20 changes: 15 additions & 5 deletions web/src/app/_layout/FaucetDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,26 @@ export const FaucetDropdown = () => {
"-mt-2 flex w-[--radix-dropdown-menu-trigger-width] flex-col gap-0.5 rounded-2xl rounded-t-none border border-t-0 border-black bg-black p-2 text-xs text-white",
)}
>
<a href={"https://bwarelabs.com/faucets/arbitrum-stylus-testnet"}>
<a rel="noopener noreferrer" target="_blank" href="https://faucet.superposition.so">
<DropdownMenu.Item className="flex cursor-pointer flex-row items-center gap-1 p-1 text-xs">
Ether
SPN faucet
</DropdownMenu.Item>
</a>
<Link href={"/faucet"}>
<a rel="noopener noreferrer" target="_blank" href="https://wspn.long.so">
<DropdownMenu.Item className="flex cursor-pointer flex-row items-center gap-1 p-1 text-xs">
FLY staker tokens
Create WSPN
</DropdownMenu.Item>
</Link>
</a>
<a rel="noopener noreferrer" target="_blank" href="https://sepolia.arbiscan.io/address/0x980b62da83eff3d4576c647993b0c1d7faf17c73#writeProxyContract">
<DropdownMenu.Item className="flex cursor-pointer flex-row items-center gap-1 p-1 text-xs">
Arbitrum Sepolia Create WETH
</DropdownMenu.Item>
</a>
<a rel="noopener noreferrer" target="_blank" href="https://faucet.circle.com/">
<DropdownMenu.Item className="flex cursor-pointer flex-row items-center gap-1 p-1 text-xs">
Arbitrum Sepolia USDC faucet
</DropdownMenu.Item>
</a>
</DropdownMenu.Content>
</DropdownMenu.Portal>
</DropdownMenu.Root>
Expand Down
2 changes: 2 additions & 0 deletions web/src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Metadata } from "next";
import LongTail from "@/assets/icons/long-tail.svg";
import { MobileNetworkSelection } from "@/app/_layout/MobileNetworkSelection";
import { DemoData } from "@/app/_layout/DemoData";
import { FaucetDropdown } from "@/app/_layout/FaucetDropdown";
import { NetworkSelection } from "@/app/_layout/NetworkSelection";
import { ConnectWalletButton } from "@/app/_layout/ConnectWalletButton";
import { NavigationMenu } from "@/app/_layout/NavigationMenu";
Expand Down Expand Up @@ -94,6 +95,7 @@ export default async function RootLayout({
<DemoData />
</div>
<div className="flex flex-row items-center gap-4">
<FaucetDropdown />
<NetworkSelection />
<ConnectWalletButton />
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/src/gql/gql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const documents = {
"\n fragment SwapProPoolFragment on SeawaterPool {\n address\n token {\n address\n }\n priceOverTime {\n daily\n monthly\n }\n volumeOverTime {\n monthly {\n timestamp\n token1 {\n valueUsd\n }\n fusdc {\n valueUsd\n }\n }\n daily {\n timestamp # TODO: timestamp is always 0\n token1 {\n valueUsd\n }\n fusdc {\n valueUsd\n }\n }\n }\n liquidityOverTime {\n daily {\n timestamp\n fusdc {\n valueUsd\n }\n }\n monthly {\n timestamp\n fusdc {\n valueUsd\n }\n }\n }\n }\n": types.SwapProPoolFragmentFragmentDoc,
"\n fragment SwapProTransactionsFragment on SeawaterSwap {\n timestamp\n amountIn {\n valueScaled\n token {\n symbol\n }\n }\n amountOut {\n valueScaled\n token {\n symbol\n }\n }\n }\n": types.SwapProTransactionsFragmentFragmentDoc,
"\n query AllData {\n pools {\n # used for the pool selector\n address\n\n # add general fragments here\n ...SwapProPoolFragment\n ...AllPoolsFragment\n ...SelectPrimeAssetFragment\n ...SwapExploreFragment\n ...ManagePoolFragment\n ...SwapFormFragment\n ...StakeFormFragment\n }\n }\n": types.AllDataDocument,
"\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n": types.ForUserDocument,
"\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet, first: 10) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n": types.ForUserDocument,
};

/**
Expand Down Expand Up @@ -108,7 +108,7 @@ export function graphql(source: "\n query AllData {\n pools {\n # used
/**
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
*/
export function graphql(source: "\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n"): (typeof documents)["\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n"];
export function graphql(source: "\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet, first: 10) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n"): (typeof documents)["\n query ForUser($wallet: String!) {\n getSwapsForUser(wallet: $wallet, first: 10) {\n swaps {\n # add transaction fragments here\n ...SwapProTransactionsFragment\n ...TradeTabTransactionsFragment\n }\n }\n\n getWallet(address: $wallet) {\n # add wallet fragments here\n ...MyPositionsWalletFragment\n ...MyPositionsInventoryWalletFragment\n ...PositionsFragment\n ...WithdrawPositionsFragment\n ...DepositPositionsFragment\n }\n }\n"];

export function graphql(source: string) {
return (documents as any)[source] ?? {};
Expand Down
Loading

0 comments on commit 83ad553

Please sign in to comment.