MCPcopy Create free account

hub / github.com/0xProject/0x-examples / functions

Functions122 in github.com/0xProject/0x-examples

↓ 11 callersMethodcatch
(error: unknown)
gasless-v2-trading-bot/src/engine/monitor.ts:123
↓ 6 callersMethodgetQuotes
* Get multiple quotes for a cross-chain swap
cross-chain-headless-example/src/crossChainClient.ts:22
↓ 6 callersFunctionloadConfig
()
cross-chain-headless-example/src/config.ts:95
↓ 6 callersMethodmonitorTransaction
* Monitor a cross-chain transaction until completion
cross-chain-headless-example/src/crossChainClient.ts:90
↓ 5 callersFunctionbuyTokenInfo
(chainId: number)
swap-v2-permit2-next-app/app/components/quote.tsx:42
↓ 5 callersFunctionbuyTokenInfo
(chainId: number)
swap-v2-allowance-holder-next-app/app/components/quote.tsx:42
↓ 5 callersFunctionsellTokenInfo
(chainId: number)
swap-v2-permit2-next-app/app/components/quote.tsx:35
↓ 5 callersFunctionsellTokenInfo
(chainId: number)
swap-v2-allowance-holder-next-app/app/components/quote.tsx:35
↓ 4 callersFunctionfetchJsonOrThrow
(res: Response)
gasless-v2-headless-example/index.ts:58
↓ 4 callersMethodstopMonitoring
()
gasless-v2-trading-bot/src/engine/monitor.ts:106
↓ 3 callersMethodcompleteTrade
( publicKey: `0x${string}`, orderId: Types.ObjectId, amount: number, newPrice: number, dec
gasless-v2-trading-bot/src/engine/index.ts:226
↓ 3 callersFunctionfetchJson
(res: Response)
gasless-v2-erc4337-smart-account/src/index.ts:30
↓ 3 callersFunctionformatAmount
(amount: string, decimals = 6)
cross-chain-streaming-next-app/src/components/QuoteCard.tsx:28
↓ 2 callersFunctionapprovalSplitSigDataToSubmit
(object: any)
gasless-v2-headless-example/index.ts:197
↓ 2 callersFunctiondecodePubkey
(bytes: number[])
solana-example/src/index.ts:47
↓ 2 callersFunctionexecuteSwap
(sellTokenType: TokenType)
swap-v2-permit2-headless-example/index.ts:76
↓ 2 callersFunctionexecuteTrade
( tokenApprovalRequired: boolean, gaslessApprovalAvailable: boolean )
gasless-v2-headless-example/index.ts:118
↓ 2 callersMethodfetchNewPrice
()
gasless-v2-trading-bot/src/engine/monitor.ts:113
↓ 2 callersFunctionfetchStatus
(tradeHash: string)
gasless-v2-headless-example/index.ts:259
↓ 2 callersFunctionformatTax
(taxBps: string)
swap-v2-permit2-next-app/app/components/price.tsx:219
↓ 2 callersFunctionformatTax
(taxBps: string)
swap-v2-permit2-next-app/app/components/quote.tsx:102
↓ 2 callersFunctionformatTax
(taxBps: string)
swap-v2-allowance-holder-next-app/app/components/price.tsx:219
↓ 2 callersFunctionformatTax
(taxBps: string)
swap-v2-allowance-holder-next-app/app/components/quote.tsx:102
↓ 2 callersFunctiongetERC20Price
* Fetches the price of an ERC20 token in terms of USDC. * * @param address - The contract address of the ERC20 token. * @param decimals - The numbe
gasless-v2-trading-bot/src/utils/getERC20Price.ts:33
↓ 2 callersFunctiongetRpcUrl
(chainId: number)
swap-v2-permit2-next-app/app/providers.tsx:47
↓ 2 callersFunctiongetRpcUrl
(chainId: number)
swap-v2-allowance-holder-next-app/app/providers.tsx:47
↓ 2 callersFunctionsignApprovalObject
()
gasless-v2-headless-example/index.ts:163
↓ 2 callersFunctionsignTradeObject
()
gasless-v2-headless-example/index.ts:152
↓ 2 callersFunctionsplitSignature
(signatureHex: Hex)
gasless-v2-headless-example/utils/signature.ts:28
↓ 2 callersFunctionsplitSignature
(signatureHex: Hex)
gasless-v2-trading-bot/src/utils/signature.ts:35
↓ 2 callersFunctionstandardApproval
()
gasless-v2-headless-example/index.ts:174
↓ 2 callersFunctionstartStatusCheck
(successfulTradeHash: string | undefined)
gasless-v2-headless-example/index.ts:290
↓ 2 callersFunctionsubmitTrade
( tradeDataToSubmit: any, approvalDataToSubmit: any )
gasless-v2-headless-example/index.ts:226
↓ 2 callersMethodswap
* Executes a swap operation for ERC20 tokens. * * @param erc20Address - The address of the ERC20 token contract. * @param amount - The amount
gasless-v2-trading-bot/src/engine/0xservice.ts:74
↓ 2 callersFunctiontokensByChain
(chainId: number)
swap-v2-permit2-next-app/app/components/price.tsx:111
↓ 2 callersFunctiontokensByChain
(chainId: number)
swap-v2-allowance-holder-next-app/app/components/price.tsx:111
↓ 2 callersFunctiontradeSplitSigDataToSubmit
(object: any)
gasless-v2-headless-example/index.ts:211
↓ 1 callersFunctionarbitrumToTronExample
* Example: Arbitrum to Tron cross-chain swap * Swaps USDC on Arbitrum to USDT on Tron
cross-chain-headless-example/src/fromEvmToTron.ts:23
↓ 1 callersFunctionbaseToArbitrumExample
* Example: Base to Arbitrum cross-chain swap * Swaps WETH on Base to USDC on Arbitrum
cross-chain-headless-example/src/fromEvmToEvm.ts:22
↓ 1 callersFunctionbaseToSolanaExample
* Example: Base to Solana cross-chain swap * Swaps WETH on Base to USDC on Solana
cross-chain-headless-example/src/fromEvmToSolana.ts:22
↓ 1 callersFunctionbuildInstructions
( instructionsData: Instruction[] )
solana-example/src/index.ts:51
↓ 1 callersFunctionconnect
()
gasless-v2-trading-bot/src/db/index.ts:22
↓ 1 callersFunctionexecuteSwap
()
solana-example/src/index.ts:98
↓ 1 callersFunctionfetchConfig
()
solana-example/src/config.ts:32
↓ 1 callersFunctionfetchStatusPeriodically
(tradeHash: string)
gasless-v2-headless-example/index.ts:271
↓ 1 callersFunctionformatGas
(gasWei: string)
cross-chain-streaming-next-app/src/components/QuoteCard.tsx:36
↓ 1 callersFunctionformatTime
(seconds: number)
cross-chain-streaming-next-app/src/components/QuoteCard.tsx:20
↓ 1 callersFunctiongetQuote
()
solana-example/src/index.ts:23
↓ 1 callersMethodgetStatus
* Get the status of a cross-chain transaction
cross-chain-headless-example/src/crossChainClient.ts:56
↓ 1 callersFunctionhandleBuyTokenChange
(e: ChangeEvent<HTMLSelectElement>)
swap-v2-permit2-next-app/app/components/price.tsx:107
↓ 1 callersFunctionhandleBuyTokenChange
(e: ChangeEvent<HTMLSelectElement>)
swap-v2-allowance-holder-next-app/app/components/price.tsx:107
↓ 1 callersFunctionisNative
(tokenAddress: string)
swap-v2-permit2-next-app/app/components/price.tsx:26
↓ 1 callersFunctionisNative
(tokenAddress: string)
swap-v2-allowance-holder-next-app/app/components/price.tsx:26
↓ 1 callersMethodisValidContractAddress
* Validates Ethereum contract address. * @param address - The contract address to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:7
↓ 1 callersMethodisValidETHAmount
* Validates amount in ETH. * @param amount - The amount of ETH to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:47
↓ 1 callersMethodisValidPrivateKey
* Validates Ethereum private key. * @param privateKey - The private key to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:17
↓ 1 callersMethodisValidStopLoss
* Validates stop loss value. * @param sl - Stop Loss value to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:27
↓ 1 callersMethodisValidTakeProfit
* Validates take profit value. * @param tp - Take Profit value to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:37
↓ 1 callersMethodisValidTimeout
* Validates timeout value. * @param timeout - The timeout value to validate. * @returns true if valid, false otherwise.
gasless-v2-trading-bot/src/utils/validate.ts:57
↓ 1 callersFunctionmain
()
gasless-v2-erc4337-smart-account/src/address.ts:11
↓ 1 callersFunctionmain
()
gasless-v2-erc4337-smart-account/src/index.ts:38
↓ 1 callersFunctionmain
()
swap-v2-permit2-next-app/app/components/price.tsx:154
↓ 1 callersFunctionmain
()
swap-v2-permit2-next-app/app/components/quote.tsx:66
↓ 1 callersFunctionmain
()
swap-v2-permit2-headless-example/index.ts:229
↓ 1 callersFunctionmain
()
gasless-v2-headless-example/index.ts:71
↓ 1 callersFunctionmain
()
swap-v2-allowance-holder-next-app/app/components/price.tsx:154
↓ 1 callersFunctionmain
()
swap-v2-allowance-holder-next-app/app/components/quote.tsx:66
↓ 1 callersFunctionmain
()
swap-v2-allowance-holder-quicknode-headless-example/index.ts:52
↓ 1 callersFunctionmain
()
swap-v2-allowance-holder-headless-example/index.ts:56
↓ 1 callersFunctionpadSignature
* Sometimes signatures are split without leading bytes on the `r` and/or `s` fields. * * Add them if they don't exist.
gasless-v2-headless-example/utils/signature.ts:45
↓ 1 callersFunctionpadSignature
* Sometimes signatures are split without leading bytes on the `r` and/or `s` fields. * * Add them if they don't exist.
gasless-v2-trading-bot/src/utils/signature.ts:52
↓ 1 callersFunctionresolveAddressLookupTables
( keys: string[] )
solana-example/src/index.ts:69
↓ 1 callersFunctionsolanaToBaseExample
* Example: Solana to Base cross-chain swap * Swaps WSOL on Solana to USDC on Base
cross-chain-headless-example/src/fromSolanaToEvm.ts:20
↓ 1 callersFunctionsolanaToBaseWithGasPayerExample
* Example: Solana to Base cross-chain swap with separate gas payer * Swaps WSOL on Solana to USDC on Base using a separate private key for paying gas
cross-chain-headless-example/src/fromSolanaToEvmWithGasPayer.ts:16
↓ 1 callersMethodstartMonitoring
()
gasless-v2-trading-bot/src/engine/monitor.ts:68
↓ 1 callersFunctionstartStreaming
()
cross-chain-streaming-next-app/src/components/StreamingQuote.tsx:79
↓ 1 callersMethodstartTrade
* Initiates the trading process. This function connects to the blockchain, * retrieves or creates a user, checks for existing incomplete orders, an
gasless-v2-trading-bot/src/engine/index.ts:50
↓ 1 callersFunctiontronToArbitrumExample
* Example: Tron to Arbitrum cross-chain swap * Swaps USDT on Tron to USDC on Arbitrum
cross-chain-headless-example/src/fromTronToEvm.ts:24
↓ 1 callersFunctionuseTokenBalance
({ address, tokenAddress, enabled = true, }: { address: Address | undefined; tokenAddress: string;
swap-v2-permit2-next-app/app/components/price.tsx:31
↓ 1 callersFunctionuseTokenBalance
({ address, tokenAddress, enabled = true, }: { address: Address | undefined; tokenAddress: string;
swap-v2-allowance-holder-next-app/app/components/price.tsx:31
FunctionApproveOrReviewButton
({ taker, onClick, sellTokenAddress, disabled, price, }: { taker: Address; onCli
swap-v2-permit2-next-app/app/components/price.tsx:485
FunctionApproveOrReviewButton
({ taker, onClick, sellTokenAddress, disabled, price, }: { taker: Address; onCli
swap-v2-allowance-holder-next-app/app/components/price.tsx:485
FunctionDEFAULT_BUY_TOKEN
(chainId: number)
swap-v2-permit2-next-app/app/components/price.tsx:70
FunctionDEFAULT_BUY_TOKEN
(chainId: number)
swap-v2-allowance-holder-next-app/app/components/price.tsx:70
FunctionGET
(request: NextRequest)
swap-v2-permit2-next-app/app/api/price/route.ts:3
FunctionGET
(request: NextRequest)
swap-v2-permit2-next-app/app/api/quote/route.ts:3
FunctionGET
(request: NextRequest)
swap-v2-allowance-holder-next-app/app/api/price/route.ts:3
FunctionGET
(request: NextRequest)
swap-v2-allowance-holder-next-app/app/api/quote/route.ts:3
FunctionHome
()
cross-chain-streaming-next-app/src/app/page.tsx:6
FunctionPage
()
swap-v2-permit2-next-app/app/page.tsx:12
FunctionPage
()
swap-v2-allowance-holder-next-app/app/page.tsx:12
FunctionPriceView
({ price, taker, setPrice, setFinalize, chainId, }: { price: any; taker: Address | undefined;
swap-v2-permit2-next-app/app/components/price.tsx:76
FunctionPriceView
({ price, taker, setPrice, setFinalize, chainId, }: { price: any; taker: Address | undefined;
swap-v2-allowance-holder-next-app/app/components/price.tsx:76
FunctionProviders
({ children }: { children: React.ReactNode })
swap-v2-permit2-next-app/app/providers.tsx:80
FunctionProviders
({ children }: { children: React.ReactNode })
swap-v2-allowance-holder-next-app/app/providers.tsx:80
FunctionQuoteCard
({ quote }: QuoteCardProps)
cross-chain-streaming-next-app/src/components/QuoteCard.tsx:19
FunctionQuoteView
({ taker, price, quote, setQuote, chainId, }: { taker: Address | undefined; price: PriceResponse
swap-v2-permit2-next-app/app/components/quote.tsx:20
FunctionQuoteView
({ taker, price, quote, setQuote, chainId, }: { taker: Address | undefined; price: PriceResponse
swap-v2-allowance-holder-next-app/app/components/quote.tsx:20
FunctionRootLayout
({ children }: { children: React.ReactNode })
swap-v2-permit2-next-app/app/layout.tsx:5
FunctionRootLayout
({ children, }: Readonly<{ children: React.ReactNode; }>)
cross-chain-streaming-next-app/src/app/layout.tsx:20
next →1–100 of 122, ranked by callers