Welcome to my website!
\nHere is some content.
\ndiff --git a/.autodoc/docs/data/args.json b/.autodoc/docs/data/args.json
deleted file mode 100644
index 9e212768b..000000000
--- a/.autodoc/docs/data/args.json
+++ /dev/null
@@ -1 +0,0 @@
-{"space":"cosine","numDimensions":1536}
\ No newline at end of file
diff --git a/.autodoc/docs/data/docstore.json b/.autodoc/docs/data/docstore.json
deleted file mode 100644
index 51370c446..000000000
--- a/.autodoc/docs/data/docstore.json
+++ /dev/null
@@ -1 +0,0 @@
-[["0",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/components/AnalyticsProvider.tsx)\n\nThis code is a module that provides analytics functionality to a larger project called \"zoo\". The module uses the React library and the \"wagmi\" library to access user account data. It also uses the \"@datadog/browser-rum\" library to send analytics data to the Datadog service.\n\nThe module exports two components: \"initializeAnalytics\" and \"AnalyticsProvider\". The \"initializeAnalytics\" function initializes the Datadog library with the provided configuration options. It checks if the library has already been initialized and if the required configuration options are present. If the library has not been initialized and the configuration options are present, it initializes the library and starts a session replay recording.\n\nThe \"AnalyticsProvider\" component is a React functional component that takes a \"children\" prop and returns it. It also uses the \"useEffect\" hook to set the user ID in the Datadog library when the \"accountData\" changes. The \"accountData\" is obtained using the \"useAccount\" hook from the \"wagmi\" library. The user ID is set to the lowercase version of the user's Ethereum address.\n\nThis module can be used in the larger \"zoo\" project to track user interactions, frustrations, and resource usage. It can also be used to replay user sessions for debugging purposes. The \"initializeAnalytics\" function should be called once when the application starts, and the \"AnalyticsProvider\" component should be used to wrap the components that need to send analytics data. Here is an example of how to use the \"AnalyticsProvider\" component:\n\n```\nimport AnalyticsProvider from './analytics-provider'\n\nfunction App() {\n return (\n
...
\n >\n )\n}\n```\n## Questions: \n 1. What is the purpose of this code?\n- This code renders the `` section of an HTML page, including meta tags, title, and favicon.\n\n2. What are the configurable options in this code?\n- The code has configurable options for custom meta tags, title, and keywords in `pages/_document.ts`.\n\n3. What is the significance of the `ogImage` parameter?\n- The `ogImage` parameter is the URL of the Open Graph image to be displayed in social media shares.","metadata":{"source":".autodoc/docs/markdown/app/components/Head.md"}}],["4",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/components/Layout.tsx)\n\nThe code above defines a React component called `Layout` that serves as a layout wrapper for other components in the `zoo` project. The component imports the `Box` component from the `components/primitives` module and the `FC` and `ReactNode` types from the `react` module. It also imports the `Navbar` component from a local file called `navbar`.\n\nThe `Layout` component takes a single prop called `children`, which is of type `ReactNode`. This prop is used to render the child components that are wrapped by the `Layout` component.\n\nThe `Layout` component returns a JSX expression that renders a `Box` component with some CSS styles. The `Box` component serves as a container for the entire layout. It has a background color of `$neutralBg`, which is a CSS variable that is defined elsewhere in the project. It also has a height and minimum height of 100% to ensure that it takes up the full height of the viewport. Additionally, it has a padding top of 80 pixels to create some space between the top of the layout and the content.\n\nInside the `Box` component, there is another `Box` component that serves as a container for the content of the layout. This inner `Box` component has a maximum width of 1920 pixels and is horizontally centered using the `mx` CSS property. Inside this container, there is a `Navbar` component that is imported from a local file called `navbar`. The `Navbar` component is responsible for rendering the navigation bar at the top of the layout. Finally, the `children` prop is rendered inside a `main` element, which serves as the main content area of the layout.\n\nOverall, the `Layout` component provides a consistent layout structure for other components in the `zoo` project. It ensures that all components are rendered inside a container with a consistent background color, padding, and maximum width. It also provides a navigation bar at the top of the layout that is consistent across all pages. Developers can use this component as a wrapper for their components to ensure a consistent layout structure throughout the project. For example, a developer could use the `Layout` component to wrap a `HomePage` component like this:\n\n```\nimport Layout from './Layout'\nimport HomePage from './HomePage'\n\nconst App = () => {\n return (\nThis is the content of the modal.
\nThis is an example modal.
\n{collection.description}
\nHere is some content.
\n{user.bio}
\nHere is some collapsible content
\nThis is a flexible layout
\nContent for Tab 1
\nSelected chain: {chain.name}
\n \n{currentChain.description}
\nLoading...
\n )}\nPrimary Fee: {openseaFees.primaryFee}
\nSecondary Fee: {openseaFees.secondaryFee}
\nPosted {
This is a sample web app that uses the zoo manifest file.
\n \n\n```\n\nIn this example, the web app includes a link to the \"manifest.json\" file, which contains the code we discussed earlier. This allows the web app to use the specified icons and colors, and to be displayed as a standalone app.\n## Questions: \n 1. What is the purpose of this code?\n This code is a JSON object that defines various properties of icons and colors for a web app.\n\n2. Where is this code used in the project?\n It is not clear from this code snippet where it is used in the project. It could be part of a configuration file or a script that generates HTML code.\n\n3. Are there any dependencies or requirements for this code to work properly?\n It is not clear from this code snippet if there are any dependencies or requirements for this code to work properly. It is possible that other parts of the project rely on this code to be present and correctly formatted.","metadata":{"source":".autodoc/docs/markdown/app/public/site.md"}}],["126",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.client.config.ts)\n\nThis file is responsible for configuring the initialization of Sentry on the client side of the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. \n\nThe code imports the necessary modules from the `@sentry/nextjs` and `@sentry/integrations` packages. It then calls the `Sentry.init()` method to initialize Sentry with the provided configuration options. \n\nThe `dsn` option specifies the Data Source Name (DSN) for Sentry, which is a unique identifier for the project. This value is retrieved from the `NEXT_PUBLIC_SENTRY_DSN` environment variable. \n\nThe `tracesSampleRate` option determines the percentage of transactions that will be sent to Sentry for performance monitoring. In this case, it is set to 1, meaning that all transactions will be sent. \n\nThe `debug` option controls whether or not debug information will be printed to the console during setup. It is set to false in this case. \n\nThe `replaysOnErrorSampleRate` option determines the percentage of errors that will be recorded for session replay. It is set to 1.0, meaning that all errors will be recorded. \n\nThe `replaysSessionSampleRate` option determines the percentage of sessions that will be recorded for session replay. It is set to 0.1, meaning that only 10% of sessions will be recorded. \n\nThe `integrations` option is an array of integrations that will be used with Sentry. In this case, two integrations are included: `Replay` and `CaptureConsoleIntegration`. The `Replay` integration enables session replay, which allows developers to see a video of a user's session leading up to an error. The `CaptureConsoleIntegration` integration captures console messages of a specified level (in this case, only `error` messages are captured) and sends them to Sentry for monitoring. \n\nOverall, this file sets up Sentry with the necessary configuration options and integrations to monitor errors and performance in the zoo project. Developers can use Sentry to identify and fix issues in their application, improving the overall user experience. \n\nExample usage:\n\n```javascript\nimport * as Sentry from '@sentry/nextjs'\n\n// Initialize Sentry with custom configuration options\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 1,\n debug: false,\n replaysOnErrorSampleRate: 1.0,\n replaysSessionSampleRate: 0.1,\n integrations: [\n new Sentry.Replay({\n maskAllText: true,\n blockAllMedia: true,\n }),\n new Sentry.CaptureConsoleIntegration({\n levels: ['error'],\n }),\n ],\n})\n\n// Log an error to the console\nconsole.error('An error occurred')\n\n// Sentry will capture the error and send it for monitoring\n```\n## Questions: \n 1. What is Sentry and how does it work with Next.js?\n- Sentry is a tool for error tracking and monitoring. This code initializes Sentry on the client side of a Next.js application, allowing it to capture and report errors that occur in the user's browser.\n\n2. What is the purpose of the `tracesSampleRate` option?\n- The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. In this code, it is set to 1, meaning that all requests will be traced. This value should be adjusted in production to avoid excessive data usage.\n\n3. What is the `CaptureConsoleIntegration` and what does it do?\n- The `CaptureConsoleIntegration` is an integration provided by Sentry that captures console messages (such as `console.error()`) and sends them to Sentry for error tracking. In this code, it is configured to only capture `error` messages.","metadata":{"source":".autodoc/docs/markdown/app/sentry.client.config.md"}}],["127",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.edge.config.ts)\n\nThis code initializes Sentry for edge features in the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. The configuration added in this file will be used whenever one of the edge features is loaded. This configuration is also required when running the project locally.\n\nThe code imports the Sentry library using the '@sentry/nextjs' package. It then calls the 'init' method on the Sentry object and passes in an object with configuration options. \n\nThe 'dsn' option is set to the value of the 'NEXT_PUBLIC_SENTRY_DSN' environment variable. This is the Data Source Name (DSN) for the Sentry project, which is used to identify and send error reports to the correct project.\n\nThe 'tracesSampleRate' option is set to 1, which means that all transactions will be sent to Sentry. This option can be adjusted in production to reduce the amount of data sent to Sentry.\n\nThe 'debug' option is set to false, which means that no additional information will be printed to the console during setup.\n\nOverall, this code ensures that Sentry is properly configured for edge features in the zoo project, allowing developers to monitor and fix errors in their application. \n\nExample usage:\n\n```\nimport * as Sentry from '@sentry/nextjs'\n\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 1,\n debug: false,\n})\n\n// Example code that could potentially throw an error\ntry {\n // some code here\n} catch (error) {\n Sentry.captureException(error)\n}\n```\n## Questions: \n 1. What is Sentry and why is it being used in this project?\n - Sentry is a tool used for error tracking and monitoring. It is being initialized in this project for edge features such as middleware and edge routes.\n \n2. What is the purpose of the `tracesSampleRate` option and why is it set to 1?\n - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. It is set to 1 in this code, meaning that all requests will be traced.\n\n3. What is the purpose of the `debug` option and why is it set to false?\n - The `debug` option is used to print useful information to the console while setting up Sentry. It is set to false in this code, meaning that this information will not be printed.","metadata":{"source":".autodoc/docs/markdown/app/sentry.edge.config.md"}}],["128",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.server.config.ts)\n\nThis file is responsible for configuring the initialization of Sentry on the server. Sentry is a tool that helps developers monitor and fix errors in their applications. The code imports the Sentry library from the '@sentry/nextjs' package and initializes it with a configuration object. \n\nThe configuration object contains three properties: \n1. dsn: This property is set to the value of the environment variable NEXT_PUBLIC_SENTRY_DSN. This is the Data Source Name (DSN) that Sentry uses to identify the project and send error reports to the correct location. \n2. tracesSampleRate: This property is set to 1, which means that all requests will be traced by Sentry. In production, this value should be adjusted to a lower value to reduce the amount of data sent to Sentry and improve performance. Alternatively, the tracesSampler property can be used to provide greater control over which requests are traced. \n3. debug: This property is set to false, which means that Sentry will not print any useful information to the console during setup. This can be set to true during development to help with debugging.\n\nThis code is an important part of the larger project because it enables developers to monitor and fix errors in the application. By configuring Sentry on the server, developers can receive real-time notifications of errors and quickly identify and fix issues. \n\nHere is an example of how this code might be used in a larger project: \n\n```\n// server.js\n\nimport express from 'express'\nimport * as Sentry from '@sentry/nextjs'\nimport { createServer } from 'http'\n\nconst app = express()\n\n// Initialize Sentry\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 0.5,\n debug: true,\n})\n\n// Add Sentry middleware to the express app\napp.use(Sentry.Handlers.requestHandler())\n\n// Define routes\napp.get('/', (req, res) => {\n res.send('Hello World!')\n})\n\n// Add Sentry error handling middleware to the express app\napp.use(Sentry.Handlers.errorHandler())\n\n// Create server and listen on port 3000\nconst server = createServer(app)\nserver.listen(3000, () => {\n console.log('Server listening on port 3000')\n})\n```\n\nIn this example, the code initializes Sentry with a DSN from an environment variable and sets the tracesSampleRate to 0.5. It then adds Sentry middleware to the express app to handle requests and errors. Finally, it creates a server and listens on port 3000. \n\nOverall, this code is an essential part of any project that uses Sentry for error monitoring and provides developers with a powerful tool for identifying and fixing issues in their applications.\n## Questions: \n 1. What is Sentry and why is it being used in this project?\n - Sentry is a tool for error tracking and monitoring. It is being used in this project to handle errors that occur on the server and provide useful information for debugging.\n\n2. What is the purpose of the `tracesSampleRate` option and why is it set to 1?\n - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. A value of 1 means that all requests will be traced. This may be adjusted in production to reduce the amount of data collected.\n\n3. What is the significance of the `debug` option and why is it set to false?\n - The `debug` option controls whether or not Sentry will print useful information to the console during setup. It is set to false in this code to prevent cluttering the console with unnecessary information.","metadata":{"source":".autodoc/docs/markdown/app/sentry.server.config.md"}}],["129",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/stitches.config.ts)\n\nThis code is responsible for creating and configuring the theme for the `zoo` project. It uses the `@stitches/react` library to create a theme object that contains various properties such as colors, fonts, sizes, and media queries. The `createStitches` function is used to create the theme object and also returns several utility functions that can be used to create styles for components.\n\nThe `colors` property of the theme object is defined using the `@radix-ui/colors` library, which provides a set of predefined color scales. These color scales are then combined and aliased to create the final color palette for the project. The `createTheme` function is used to create a dark theme that is a variation of the main theme.\n\nThe `utils` property of the theme object contains various utility functions that can be used to create styles for components. These functions include margin, padding, width, height, and grid-related functions. The `media` property contains various media queries that can be used to create responsive styles for components.\n\nThe `globalCss` function is used to apply a global CSS reset to the project. The `Inter` font from Google Fonts is also imported and used as the default font for the project.\n\nOverall, this code provides a centralized way to manage the theme for the `zoo` project. It allows for easy customization of the color palette and provides utility functions that can be used to create consistent styles for components. Here is an example of how the `styled` function can be used to create a styled component using the theme:\n\n```\nimport { styled } from 'zoo'\n\nconst Button = styled('button', {\n backgroundColor: '$primary1',\n color: '$whiteA11',\n padding: '$2',\n borderRadius: '$radii',\n '&:hover': {\n backgroundColor: '$primary2',\n },\n})\n```\n## Questions: \n 1. What is the purpose of the `createStitches` function and what does it return?\n- The `createStitches` function is used to create a styling system for the project using the `@stitches/react` library. It returns an object with several properties including `createTheme`, `keyframes`, `styled`, `globalCss`, and `getCssText`.\n\n2. What is the purpose of the `utils` object within the `createStitches` function?\n- The `utils` object contains utility functions that can be used to generate CSS properties for margin, padding, dimensions, and grid. These functions can be used within the `styled` function to create custom styles.\n\n3. What is the purpose of the `darkTheme` object and how is it different from the default theme?\n- The `darkTheme` object is an alternative theme that can be used for dark mode. It contains different color values for the same color aliases used in the default theme, as well as some additional color values for accent and panel styling.","metadata":{"source":".autodoc/docs/markdown/app/stitches.config.md"}}],["130",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/tsconfig.json)\n\nThis code is a configuration file for the TypeScript compiler. It specifies the compiler options and the files to be included or excluded from the compilation process. \n\nThe \"compilerOptions\" object contains various settings for the compiler, such as the target version of ECMAScript to compile to, the libraries to include, whether to allow JavaScript files to be compiled, and whether to enforce strict type checking. \n\nThe \"include\" and \"exclude\" arrays specify the files to be included or excluded from the compilation process. In this case, the \"include\" array includes all TypeScript and TypeScript React files in the project, while the \"exclude\" array excludes the \"node_modules\" directory. \n\nThis configuration file is an important part of the TypeScript project, as it ensures that the TypeScript code is compiled correctly and efficiently. It can be used in conjunction with other tools and frameworks to build and deploy TypeScript applications. \n\nFor example, in a Node.js project, this configuration file can be used with the \"tsc\" command to compile TypeScript files into JavaScript files that can be executed by Node.js. \n\n```\n// Example usage of the TypeScript compiler with this configuration file\ntsc\n```\n\nOverall, this code is a crucial part of the TypeScript project and ensures that the TypeScript code is compiled correctly and efficiently.\n## Questions: \n 1. What is the purpose of this code file?\n - This code file is a configuration file for TypeScript compiler options for the project called zoo.\n\n2. What version of ECMAScript is being targeted?\n - The code is targeting ECMAScript 5.\n\n3. What files are being included and excluded in the compilation process?\n - The code includes all TypeScript and TypeScript React files with the extensions `.ts` and `.tsx`, as well as a file called `next-env.d.ts`. It excludes the `node_modules` directory.","metadata":{"source":".autodoc/docs/markdown/app/tsconfig.md"}}],["131",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/types/ExpirationOption.ts)\n\nThis code defines a TypeScript type called `ExpirationOption`. This type is used to represent an option for an expiration date in the larger project. \n\nThe `ExpirationOption` type has four properties: `text`, `value`, `relativeTime`, and `relativeTimeUnit`. The `text` property is a string that represents the text that will be displayed for the expiration option. The `value` property is a string that represents the value that will be sent to the server when the expiration option is selected. The `relativeTime` property is a number or null that represents the relative time for the expiration option. The `relativeTimeUnit` property is a `ManipulateType` or null that represents the unit of time for the relative time.\n\nThis type can be used in the larger project to represent expiration options for various features such as subscriptions, memberships, or trial periods. For example, if the project has a subscription feature, the `ExpirationOption` type can be used to represent the different subscription plans available to the user. Each subscription plan can have its own `text`, `value`, `relativeTime`, and `relativeTimeUnit` properties.\n\nHere is an example of how the `ExpirationOption` type can be used in the larger project:\n\n```\nconst subscriptionOptions: ExpirationOption[] = [\n {\n text: 'Monthly Subscription',\n value: 'monthly',\n relativeTime: 1,\n relativeTimeUnit: 'month'\n },\n {\n text: 'Annual Subscription',\n value: 'annual',\n relativeTime: 1,\n relativeTimeUnit: 'year'\n },\n {\n text: 'Lifetime Subscription',\n value: 'lifetime',\n relativeTime: null,\n relativeTimeUnit: null\n }\n]\n```\n\nIn this example, an array of `ExpirationOption` objects is defined to represent the different subscription options available to the user. The first two options have a relative time of 1 month or 1 year, while the third option represents a lifetime subscription with no expiration.\n## Questions: \n 1. What is the purpose of the `ExpirationOption` type?\n - The `ExpirationOption` type is used to represent an option for an expiration date, including its text, value, relative time, and relative time unit.\n\n2. What is the `ManipulateType` import used for?\n - The `ManipulateType` import is used to define the type of the `relativeTimeUnit` property in the `ExpirationOption` type.\n\n3. What library is the `ManipulateType` import from?\n - The `ManipulateType` import is from the `dayjs` library, which is likely used for working with dates and times in the project.","metadata":{"source":".autodoc/docs/markdown/app/types/ExpirationOption.md"}}],["132",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/app/types/reservoir.d.ts)\n\nThe code defines a type called `ArrayItemTypes` which takes in a generic type `T` that extends an array of any type. The type `infer` is used to extract the type of the array elements and assign it to the type variable `U`. The conditional type `T extends (infer U)[] ? U : never` checks if `T` is an array and if so, returns the type `U` (i.e., the type of the array elements). If `T` is not an array, it returns `never`. \n\nThis type can be useful in a larger project where there is a need to extract the type of elements from an array. For example, consider a function that takes in an array of numbers and returns the sum of the elements. Instead of explicitly defining the type of the array elements as `number`, the `ArrayItemTypes` type can be used to extract the type of the elements dynamically. \n\n```typescript\nfunction sumArrayCheck out our latest products!
\n\t\n\tScientific Name: Elephas Maximus Sumatranus
\nSumatran elephants feed on a variety of plants and deposit seeds wherever they go, contributing to a healthy forest ecosystem. They also share their lush forest habitat with other endangered species.
\n` tag. The \"desc\" property is used to display a brief description of the animal in another `
` tag. By using the data from the JSON object, the webpage can provide valuable information about endangered animals to users.\n## Questions: \n 1. What is the purpose of this code?\n- This code defines a list of animals in a zoo, along with their images and descriptions.\n\n2. What information is included in the animal descriptions?\n- The animal descriptions include the scientific name of the species, as well as information about their habitat, diet, and conservation status.\n\n3. Are there any other types of data that could be included for each animal?\n- Depending on the needs of the project, additional data such as the animal's lifespan, behavior, or physical characteristics could be included for each animal.","metadata":{"source":".autodoc/docs/markdown/core/src/animals.md"}}],["521",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/animation/index.tsx)\n\nThis code is a collection of functions that use the GreenSock Animation Platform (GSAP) library to create various fade-in animations triggered by scrolling. The `import` statements at the beginning of the file bring in the necessary modules from the GSAP library, including the `ScrollTrigger` plugin. The `registerPlugin` method is then called to register the `ScrollTrigger` plugin with GSAP.\n\nThe `fadeInOnScroll` function takes an HTML element as a parameter and returns a GSAP animation that fades in the element when it enters the viewport during scrolling. The `duration` parameter sets the length of the animation, and the `y` parameter determines the distance the element moves vertically as it fades in. The `scrollTrigger` object specifies the trigger element, the point at which the animation should start (`start: \"top 90%\"`), and the toggle actions that should occur when the element enters and leaves the viewport.\n\nThe `fadeInFromRight` and `fadeInFromLeft` functions are similar to `fadeInOnScroll`, but they animate the element sliding in from the right or left side of the screen, respectively. The `x` parameter determines the distance the element moves horizontally as it fades in.\n\nThe `fadeInFromRightFast` and `fadeInFromLeftFast` functions are similar to their non-\"Fast\" counterparts, but they have shorter animation durations and use a different easing function (`Power4.easeInOut`) for a snappier animation.\n\nThe `fadeInOnScrollAndStagger` function is similar to `fadeInOnScroll`, but it also applies a stagger effect to the animation, causing the elements to fade in one after another with a slight delay. The `trigger` parameter specifies the element that triggers the animation, and the `end` parameter specifies the point at which the animation should end.\n\nThese functions can be used in a larger project to add visual interest and interactivity to a webpage. For example, they could be used to animate the appearance of images or text as the user scrolls down the page. Here is an example of how the `fadeInOnScroll` function could be used to fade in an HTML element with the ID \"myElement\" when it enters the viewport during scrolling:\n\n```\nimport { fadeInOnScroll } from \"zoo\";\n\nconst myElement = document.querySelector(\"#myElement\");\nfadeInOnScroll(myElement);\n```\n## Questions: \n 1. What is the purpose of the `gsap` and `ScrollTrigger` imports?\n- The `gsap` and `ScrollTrigger` imports are used for animation and scroll-triggered animation respectively.\n\n2. What do the `fadeInFromRight`, `fadeInFromRightFast`, `fadeInFromLeft`, and `fadeInFromLeftFast` functions do?\n- These functions animate an element's opacity and position (either from the left or right) when it enters the viewport during scrolling.\n\n3. What is the purpose of the `stagger` property in the `fadeInOnScrollAndStagger` function?\n- The `stagger` property is used to apply a staggered animation effect to multiple elements, with a specified delay between each element's animation.","metadata":{"source":".autodoc/docs/markdown/core/src/animation/index.md"}}],["522",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/animation/loading-circle.json)\n\nThe code is a JSON file that defines an animation project called \"347-loader-18\". The project has a single composition called \"Watermark\" that contains two layers. The first layer is an empty layer called \"comp_0\" that has no content. The second layer is a shape layer called \"Shape Layer 9\" that contains an animated ellipse with a stroke and fill. \n\nThe stroke and fill colors of the ellipse are controlled by two color effects called \"Primary\" and \"Secondary\" respectively. These effects are linked to color controls that can be adjusted to change the colors of the ellipse. The stroke width of the ellipse is controlled by a slider effect called \"Stroke\". The size of the ellipse is fixed at 57x57 pixels, but its position and scale can be adjusted using the \"Axis\" and \"Scale\" effects respectively. \n\nThe purpose of this code is to define an animated loading icon that can be used in a larger project. The loading icon can be customized by adjusting the color, stroke width, position, and scale of the ellipse. The code can be imported into an animation software like Adobe After Effects to create the actual animation. \n\nHere is an example of how the color of the ellipse can be changed using the \"Primary\" effect:\n\n```\nvar primaryColor = [1, 0, 0]; // set primary color to red\nvar primaryEffect = thisComp.layer('Color & Stroke Change').effect('Primary')('Color');\nprimaryEffect.setValue(primaryColor);\n```\n\nThis code sets the primary color of the ellipse to red by getting a reference to the \"Primary\" effect and calling its `setValue()` method with an array of RGB values.\n## Questions: \n 1. What is the purpose of this code?\n- This code appears to be defining the properties and animations for a shape layer in an Adobe After Effects project.\n\n2. What effects or controls are being applied to the shape layer?\n- The shape layer has a \"Color & Stroke Change\" effect applied to it, which includes controls for primary and secondary colors, stroke width, and scale.\n\n3. What is the significance of the \"NULL 2\" and \"NULL\" layers?\n- These layers appear to be null objects used to control the position, scale, and rotation of the shape layer. \"NULL 2\" is used to control the position and scale, while \"NULL\" is used to control the rotation.","metadata":{"source":".autodoc/docs/markdown/core/src/animation/loading-circle.md"}}],["523",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/bootstrap.ts)\n\nThis code file contains a set of functions and extensions to existing classes that are used in the larger zoo project. \n\nThe first section of the code imports various dependencies, including `BigNumber` and `Fraction` from the `@ethersproject/bignumber` package, as well as `React` and `Zero` from other packages. It also imports a function called `parseUnits` from `@ethersproject/units`. \n\nThe next section of the code checks if the code is running in a browser environment and in development mode. If so, it imports and runs a package called `why-did-you-render`, which is used for debugging and optimizing React components. \n\nThe remaining code defines several extensions to the `BigNumber` and `String` classes. \n\nThe `mulDiv` function extends the `BigNumber` class and takes two arguments, `multiplier` and `divisor`, both of which are `BigNumberish` types. It returns a new `BigNumber` that is the result of multiplying the original `BigNumber` by the `multiplier` and dividing by the `divisor`. If the `divisor` is zero or negative, it returns `Zero`. \n\nThe `toFraction` function also extends the `BigNumber` class and takes an optional argument `decimals`, which defaults to 18. It returns a new `Fraction` object that represents the `BigNumber` as a fraction with the specified number of decimal places. \n\nThe `toFixed` function extends the `BigNumber` class and takes two optional arguments, `decimals` and `maxFractions`, both of which default to 18 and 8, respectively. It returns a string representation of the `BigNumber` with the specified number of decimal places and maximum number of fractions. \n\nThe `toBigNumber` function extends the `String` class and takes an argument `decimals`. It attempts to parse the string as a `BigNumber` with the specified number of decimal places using the `parseUnits` function. If parsing fails, it returns `BigNumber.from(0)`.\n\nThese extensions to the `BigNumber` and `String` classes provide additional functionality that is used throughout the zoo project. For example, the `mulDiv` function is used to calculate the price of tokens in various trading pairs, while the `toFraction` and `toFixed` functions are used to format token amounts and prices for display. The `toBigNumber` function is used to convert user input from strings to `BigNumber` objects.\n## Questions: \n 1. What is the purpose of the `Fraction` entity and how is it used in this code?\n - The `Fraction` entity is imported from `./entities/Fraction` and is used to convert a `BigNumber` to a fraction with a specified number of decimals.\n2. What is the significance of the `mulDiv` function added to the `BigNumber` prototype?\n - The `mulDiv` function multiplies a `BigNumber` by a multiplier and divides it by a divisor, returning the result as a `BigNumber`. If the divisor is zero or negative, it returns `Zero`.\n3. Why is the `whyDidYouRender` library being used in this code, and what options are being passed to it?\n - The `whyDidYouRender` library is being used to track unnecessary re-renders in development mode. The options being passed to it include tracking all pure components, tracking hooks, logging owner reasons, and collapsing groups.","metadata":{"source":".autodoc/docs/markdown/core/src/bootstrap.md"}}],["524",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Copy.tsx)\n\nThe `CopyHelper` component is a reusable React component that provides a UI for copying text to the clipboard. It is designed to be used in other parts of the `zoo` project where copying text is required. \n\nThe component imports two icons from the `@heroicons/react/outline` package: `CheckCircleIcon` and `ClipboardCopyIcon`. It also imports the `useCopyClipboard` hook from a custom `useCopyClipboard` module, the `classNames` function from a custom `functions` module, and the `Typography` component from a custom `Typography` module. Additionally, it imports the `useLingui` hook and `t` function from the `@lingui/react` and `@lingui/macro` packages respectively.\n\nThe `CopyHelper` component takes three props: `className`, `toCopy`, and `children`. `className` is an optional string that can be used to add additional CSS classes to the component. `toCopy` is a required string that represents the text to be copied to the clipboard. `children` is an optional prop that can be used to pass in additional React components to be rendered alongside the copy icon.\n\nThe component uses the `useCopyClipboard` hook to manage the state of whether or not the text has been copied to the clipboard. It also uses the `useLingui` hook to provide internationalization support for the \"Copied\" text that is displayed when the text is successfully copied.\n\nThe component renders a `div` element with a `classNames` function that combines the default classes with any additional classes passed in via the `className` prop. The `onClick` event is set to call the `setCopied` function with the `toCopy` prop as an argument when the component is clicked.\n\nIf the text has been successfully copied, the component renders a `div` element with the \"Copied\" text and a `CheckCircleIcon`. If the text has not been copied, the component renders a `div` element with any additional components passed in via the `children` prop and a `ClipboardCopyIcon`.\n\nOverall, the `CopyHelper` component provides a simple and reusable UI for copying text to the clipboard, with support for internationalization and customization via the `className` and `children` props. An example usage of this component would be in a form where a user needs to copy a generated code or URL to the clipboard.\n## Questions: \n 1. What does this code do?\n - This code exports a React component called `CopyHelper` that provides a UI for copying text to the clipboard and displaying a success message upon successful copy.\n\n2. What dependencies does this code rely on?\n - This code relies on several external dependencies, including `@heroicons/react/outline`, `react`, `useCopyClipboard`, `../../functions`, `../Typography`, `@lingui/react`, and `@lingui/macro`.\n\n3. What props does the `CopyHelper` component accept?\n - The `CopyHelper` component accepts three props: `className` (optional), `toCopy` (required), and `children` (optional). The `toCopy` prop specifies the text to be copied to the clipboard, and the `children` prop is used to render any additional content alongside the copy icon.","metadata":{"source":".autodoc/docs/markdown/core/src/components/AccountDetails/Copy.md"}}],["525",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Transaction.tsx)\n\nThe `Transaction` component is a React functional component that displays information about a transaction on the Ethereum blockchain. It imports several dependencies from various packages, including `@zoolabs/zdk`, `@heroicons/react/outline`, and `@lingui/react`. \n\nThe component takes a single prop, `hash`, which is the hash of the transaction to display. It then uses several hooks to retrieve information about the transaction from the Redux store, including `useActiveWeb3React` and `useAllTransactions`. \n\nThe component then renders a div that displays the transaction summary and status. The summary is either the transaction hash or a user-defined summary if one exists. The status is displayed as an icon, with different icons representing pending, successful, cancelled, or failed transactions. \n\nIf the transaction was submitted using the Archer network, additional information is displayed, including the nonce and tip amount. If the transaction is pending, the component also displays a countdown timer indicating how long until the transaction expires. If the transaction has expired, the component displays an \"Expired\" message. \n\nFinally, if the transaction is pending, the component allows the user to cancel the transaction by clicking a \"Cancel\" button. This sends a request to the Archer network to cancel the transaction, and updates the transaction status in the Redux store. \n\nThis component is likely used in other parts of the project to display information about transactions, such as in a transaction history or on a confirmation page after submitting a transaction.\n## Questions: \n 1. What is the purpose of the `Transaction` component?\n- The `Transaction` component is used to display information about a transaction, including its status, summary, and deadline.\n\n2. What is the `calculateSecondsUntilDeadline` function used for?\n- The `calculateSecondsUntilDeadline` function is used to calculate the number of seconds until a transaction's deadline, which is used to determine whether the transaction has expired.\n\n3. What is the `cancelPending` function used for?\n- The `cancelPending` function is used to cancel a pending transaction by sending a request to the Archer Relay API with the transaction's raw data and authorization headers. If the cancellation is successful, the transaction is marked as cancelled in the application state.","metadata":{"source":".autodoc/docs/markdown/core/src/components/AccountDetails/Transaction.md"}}],["526",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/index.tsx)\n\nThe code is a React component that renders the account details of a user's wallet. It imports various dependencies such as React, Image, and Button from different modules. It also imports some functions and constants from other files such as `getExplorerLink` and `SUPPORTED_WALLETS`. \n\nThe component takes in several props such as `toggleWalletModal`, `pendingTransactions`, `confirmedTransactions`, `ENSName`, and `openOptions`. It then uses these props to render the account details of the user's wallet. \n\nThe component first uses the `useActiveWeb3React` hook to get the current chain ID, account, and connector of the user's wallet. It then uses the `useSelector` hook to get the user's ZOO balance from the Redux store. \n\nThe component then defines several functions such as `formatConnectorName` and `getStatusIcon` that are used to format and display the user's wallet connector and status icon. \n\nThe component then renders the user's account details such as their wallet address, balance, and recent transactions. It also provides buttons to disconnect the wallet, change the wallet, view the wallet on an explorer, and copy the wallet address. \n\nThe component also defines a `WalletIcon` component that renders the icon of the user's wallet connector. It also defines a `renderTransactions` function that renders the user's recent transactions. \n\nOverall, this component is an important part of the larger project as it provides users with a way to view and manage their wallet details and transactions. It can be used in various parts of the project such as the wallet modal and the dashboard. \n\nExample usage:\n\n```jsx\nimport AccountDetails from \"./components/AccountDetails\";\n\nfunction App() {\n return (\n
This is my page content.
\nSome text goes here.
\n \n{isZooSelected ? 'ZOO' : 'BNB'} selected
\nThis is the content of the expert mode panel.
\nCurrent gas price:
Check out our social media pages for the latest updates.
\nModal content goes here
\n \n{building.address}
\nThis is the main content of my website.
\nModal content goes here.
\nThis is the content of the modal.
\nThis is some text inside the paper element.
\nYou entered: {percentValue}%
\n{data.description}
\nCurrent value:
\n{diet}
\nFrom | \nTo | \nValue | \nDate | \nTransaction Hash | \n
---|
Name | \nHabitat | \n
---|---|
Lion | \nAfrica | \n
Panda | \nAsia | \n
A new version of the app is available!
\nThis is some text that will be styled differently in dark mode.
\nHover over this text to see a tooltip!
\nWallet connected
\n ) : (\n \n )}\nThis page displays analytics for the SushiSwap Liquidity Pair (SLP).
\nThis is where you can view all your analytics data.
\nPrice Impact:
\n | \n \n | \n \n | \n
---|---|---|
{item.name} | \n{item.age} | \n{item.date} | \n
Pending rewards: {pendingRewards}
\nThis is the production environment.
\n ) : (\nThis is not the production environment.
\n )}\nImmediate: {data.immediate}
\nRapid: {data.rapid}
\nFast: {data.fast}
\nStandard: {data.standard}
\nSlow: {data.slow}
\nSlower: {data.slower}
\nSlowest: {data.slowest}
\nDebounced value: {debouncedValue}
\nYou are using an Argent wallet!
:You are not using an Argent wallet.
}\nLast valid input: {lastValidInput}
\nLast selected option: {lastSelectedOption}
\nSmall screen
}\n {isMedium &&Medium screen
}\n {isLarge &&Large screen
}\nApproval state: {approvalState}
\n \n \n \nToken 1: {poolData.token0}
\nToken 2: {poolData.token1}
\nReserves: {poolData.reserves.toString()}
\nTotal supply: {poolData.totalSupply.toString()}
\nCurrent count: {count}
\nPrevious count: {prevCount}
\n \nrequestSort('name')}>\n Name {sortConfig && sortConfig.key === 'name' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>}\n | \nrequestSort('age')}>\n Age {sortConfig && sortConfig.key === 'age' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>}\n | \n
---|---|
{item.name} | \n{item.age} | \n
Current allowance: {allowance}
\n \n \n \nHello World!
}\nCurrent allowance: {allowance?.toSignificant(4)}
\nThere are pending transactions. Please wait...
\n ) : (\n \n )}\nWindow width: {width}
\nWindow height: {height}
\nThis is some content for my page.
\nExplore our collection of exotic animals.
\n \n );\n};\n\nexport default HomePage;\n```\n## Questions: \n 1. What is the purpose of the `Layout` component?\n- The `Layout` component is responsible for rendering the main layout of the application, including the header, main content, popups, and footer.\n\n2. What is the significance of the `useEffect` hook in this code?\n- The `useEffect` hook is used to update the gas price in the network state whenever the `library` object changes. \n\n3. What is the purpose of the `bg` prop in the `Layout` component?\n- The `bg` prop is used to set the background color of the main content area, with a default value of black.","metadata":{"source":".autodoc/docs/markdown/core/src/layouts/Default/index.md"}}],["947",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/layouts/Drop/index.tsx)\n\nThis code defines a React component called `DropLayout` that is used to render a layout for a specific page in the larger project. The component imports several other components from the project's `components` directory, including `Footer`, `Header`, `Main`, and `Popups`. It also imports a custom hook called `useActiveWeb3React` and an action creator function called `updateGasPrice` from the project's `hooks` and `state/network/actions` directories, respectively.\n\nThe `DropLayout` component takes three props: `children`, `banner`, and `isMarginTop`. The `children` prop is used to render any child components that are passed to `DropLayout`. The `banner` prop is an optional prop that can be used to specify a banner image for the page. The `isMarginTop` prop is a boolean that determines whether or not to add a top margin to the `Main` component.\n\nThe `useEffect` hook is used to call the `updateGasPrice` function whenever the `library` object (which is obtained from the `useActiveWeb3React` hook) changes. This function is responsible for updating the gas price used for transactions on the Ethereum network.\n\nThe `return` statement renders the layout for the page. It consists of a `div` element that contains the `Header`, `Main`, `Popups`, and `Footer` components. The `Header` component is rendered with a transparent background and the `banner` prop (if provided). The `Main` component is rendered with a background color of \"bg-drop\" and the `children` prop. The `Popups` component is used to render any popups that may appear on the page. Finally, the `Footer` component is rendered at the bottom of the page.\n\nThis component can be used in the larger project to provide a consistent layout for pages that require a banner image, a specific background color, and a fixed set of components (i.e. `Header`, `Main`, `Popups`, and `Footer`). Developers can use this component by importing it and passing any necessary props to it. For example:\n\n```\nimport DropLayout from \"./DropLayout\";\n\nfunction MyPage() {\n return (\nThis is some content for my page.
\nThis is some content.
\n \n );\n}\n```\n## Questions: \n 1. What is the purpose of the `Layout` component?\n- The `Layout` component is responsible for rendering the overall layout of the application, including the header, main content, and footer.\n\n2. What are the optional props that can be passed to the `Layout` component?\n- The `Layout` component accepts three optional props: `left`, `children`, and `right`. `left` and `right` are JSX elements that will be rendered in the left and right columns of the layout, respectively. `children` is a React child or an array of React children that will be rendered in the main content area.\n\n3. What is the purpose of the `useRouter` hook from the `next/router` module?\n- The `useRouter` hook is used to access the Next.js router object, which provides information about the current route and allows for programmatic navigation. In this code, it is used to determine the current route and apply appropriate styling to the navigation links.","metadata":{"source":".autodoc/docs/markdown/core/src/layouts/Kashi/index.md"}}],["951",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/core/src/layouts/Miso/index.tsx)\n\nThe code above defines a React component called `Layout` that is used to render the layout of a web page. The component imports three other components: `Footer`, `Header`, and `Popups`. These components are located in the `components` directory of the `zoo` project, which suggests that this `Layout` component is part of a larger web application.\n\nThe `Layout` component takes a single prop called `children`, which is used to render the content of the web page. The `children` prop is enclosed in empty tags (`<>...>`) to allow for the rendering of multiple child components.\n\nThe `Layout` component returns a `div` element that has a class of `z-0` and is styled to be a flex container with a column direction (`flex-col`). The `div` element takes up the full width and height of the screen and has both horizontal and vertical scrolling enabled. \n\nInside the `div` element, there are four child components: `Header`, `main`, `Popups`, and `Footer`. The `Header` component is rendered with a prop called `banner` set to `false`, which suggests that the `Header` component may have a banner that can be toggled on or off. The `main` component is a flex container that takes up the remaining space in the `div` element and is styled to grow to the maximum height of its content. The `Popups` component is used to render any popups that may appear on the web page, and the `Footer` component is used to render the footer of the web page.\n\nOverall, the `Layout` component is a reusable component that can be used to render the layout of any web page in the `zoo` project. It provides a consistent layout across all pages and allows for the easy rendering of child components. Here is an example of how the `Layout` component can be used:\n\n```\nimport Layout from \"./Layout\";\nimport HomePage from \"./HomePage\";\n\nconst App = () => {\n return (\nThis is the content of my modal window.
\nCurrent bid: 1 ETH
\n \n {showModal &&Index | \nName | \nFloor Price | \n24h Volume | \n
---|---|---|---|
Here you can buy and sell unique digital assets.
\nPlease wait while we process your payment...
\nSelected currency: {selectedCurrency ? selectedCurrency.symbol : 'None'}
\n {/* rest of payment form */}\nRank | \nColumn A | \nColumn B | \nColumn C | \nColumn D | \nColumn E | \n
---|
Column A | \nColumn B | \nColumn C | \nColumn D | \nActions | \n
---|
Name | \nAge | \n\n | \n
---|
...
\nLoaded!
}\n{bid ? `Current bid: ${bid.amount}` : \"No bids yet\"}
\n \n {isModalOpen && (\nToken ID: {tokenId}
\nAmount: {amount}
\nThis is a great app that does amazing things.
\n \n\n```\n\nIn this example, the `link` element with `rel=\"manifest\"` specifies the location of the metadata file, and the `link` element with `rel=\"icon\"` specifies the location of a favicon that can be used to represent the application in the browser's UI. \n\nOverall, this code is an important part of a web application's infrastructure, as it provides information that can be used to optimize the user experience and make the application more accessible and user-friendly.\n## Questions: \n 1. What is the purpose of this code?\n This code is a JSON file that defines the name, icons, theme color, background color, and display settings for a web application.\n\n2. What are the dimensions of the icons?\n The icons have two different sizes: 192x192 and 512x512.\n\n3. What does the \"display\" property mean?\n The \"display\" property is set to \"standalone\", which means that the web application should be launched in a standalone mode, without any browser UI elements.","metadata":{"source":".autodoc/docs/markdown/foundation/public/favicon/site.md"}}],["1291",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/robots.txt)\n\nThis code is a robots.txt file that is used to communicate with web crawlers or robots that visit a website. The purpose of this file is to provide instructions to these robots on which pages or sections of the website they are allowed to access and index. \n\nThe first line of the code, \"User-agent: *\", specifies that the following instructions apply to all robots that visit the website. The next line, \"Allow: /\", allows all robots to access all pages and sections of the website. \n\nThe following lines specify the host and sitemap of the website. The \"Host\" line specifies the URL of the website that the robots should visit. The \"Sitemap\" line specifies the location of the sitemap file, which contains a list of all the pages on the website that the robots should index. \n\nThis code is important for search engine optimization (SEO) as it helps ensure that the website is properly indexed by search engines. By providing clear instructions to robots on which pages to index, the website can improve its search engine rankings and visibility. \n\nAn example of how this code may be used in the larger project is if the zoo website has multiple sections or pages that are not meant to be indexed by search engines, such as administrative pages or pages with sensitive information. The robots.txt file can be used to block these pages from being indexed, ensuring that they remain private and secure. \n\nOverall, the robots.txt file is a crucial component of any website's SEO strategy, and this code provides clear instructions to robots on how to properly index the zoo website.\n## Questions: \n 1. **What is the purpose of this code?**\\\nA smart developer might wonder what this code is for and how it fits into the overall project. Based on the content, it appears to be a robots.txt file that specifies which pages of the website can be crawled by search engines.\n\n2. **What does the \"User-agent\" and \"Allow\" directives mean?**\\\nA smart developer might be curious about the meaning of the \"User-agent\" and \"Allow\" directives in the code. The \"User-agent\" directive specifies which search engine robots are allowed to access the site, while the \"Allow\" directive specifies which pages or directories are allowed to be crawled.\n\n3. **Why is the \"Host\" and \"Sitemap\" specified in the code?**\\\nA smart developer might question why the \"Host\" and \"Sitemap\" are specified in the code. The \"Host\" directive specifies the domain name of the website, while the \"Sitemap\" directive specifies the location of the sitemap file that contains a list of all the pages on the website. This information is useful for search engines to properly index the site.","metadata":{"source":".autodoc/docs/markdown/foundation/public/robots.md"}}],["1292",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/sitemap-0.xml)\n\nThis code is an XML sitemap file that provides information about the URLs of a website to search engines. The sitemap is a list of URLs that are organized in a specific format to help search engines crawl and index the website more efficiently. \n\nThe file starts with an XML declaration that specifies the version and encoding of the document. The root element of the document is `urlset`, which is defined by the `http://www.sitemaps.org/schemas/sitemap/0.9` namespace. The `urlset` element contains a list of `url` elements, each of which represents a URL on the website. \n\nEach `url` element contains a `loc` element that specifies the URL of the page, a `changefreq` element that indicates how frequently the page is likely to change, a `priority` element that indicates the relative priority of the page compared to other pages on the site, and a `lastmod` element that specifies the date and time the page was last modified. \n\nThis sitemap file can be used by search engines to discover and index the pages on the website more efficiently. It can also be used by website owners to monitor the crawling and indexing of their site. \n\nFor example, a website owner can submit the sitemap file to Google Search Console to monitor the indexing status of their site. They can also use the sitemap to identify any crawl errors or indexing issues that may be preventing their site from appearing in search results. \n\nOverall, this sitemap file is an important component of a website's SEO strategy, as it helps search engines discover and index the pages on the site more efficiently.\n## Questions: \n 1. What is the purpose of this code?\n \n This code is an XML sitemap that lists the URLs of various pages on the website `https://tsnext-tw.thcl.dev` along with some metadata such as the last modification date and priority.\n\n2. What is the significance of the `changefreq`, `priority`, and `lastmod` elements?\n \n The `changefreq` element indicates how frequently the page is likely to change, the `priority` element indicates the relative importance of the page compared to other pages on the site, and the `lastmod` element indicates the date and time when the page was last modified.\n\n3. Is there any reason why some URLs have additional path components (e.g. `/animals/Carousel`) while others do not?\n \n It's possible that the additional path components correspond to different sections or categories of the website, but without more context it's difficult to say for sure.","metadata":{"source":".autodoc/docs/markdown/foundation/public/sitemap-0.md"}}],["1293",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/sitemap.xml)\n\nThis code is an XML file that contains a sitemap index for a website. The sitemap index is a list of all the sitemaps for the website, which are XML files that contain information about the website's pages and how they are organized. \n\nThe XML file starts with a declaration that specifies the version of XML being used and the character encoding. The sitemap index is then defined using the \"sitemapindex\" tag, which is part of the sitemap schema. The schema defines the structure and elements that can be used in a sitemap or sitemap index.\n\nWithin the sitemap index, there is a single sitemap defined using the \"sitemap\" tag. The \"loc\" element within the sitemap tag specifies the URL of the sitemap file. In this case, the URL is \"https://tsnext-tw.thcl.dev/sitemap-0.xml\". \n\nThis code is important for search engine optimization (SEO) because it helps search engines like Google understand the structure of the website and how its pages are organized. By providing a sitemap index, the website owner can ensure that all of their pages are being indexed by search engines and that the search engines are able to find the most important pages on the site. \n\nIn the larger project, this code would be used in conjunction with other sitemap files to provide a comprehensive list of all the pages on the website. The sitemap files would be generated automatically by a tool or plugin that crawls the website and extracts information about each page. The sitemap index would then be submitted to search engines like Google using the Google Search Console, which would help the website get indexed more quickly and accurately. \n\nExample usage:\n\n```xml\n\nCheck out our latest fundraising campaign:
\nLearn about our mission and subscribe to our newsletter:
\n{animal.description}
\n \n >\n );\n}\n```\n## Questions: \n 1. What is the purpose of this code?\n \n This code defines a React component called `Seo` that generates meta tags for search engine optimization (SEO) and social media sharing. It uses default values for the meta tags, but allows for customization through props.\n\n2. What is the `defaultMeta` object and what does it contain?\n \n `defaultMeta` is an object that contains default values for the meta tags generated by the `Seo` component. It includes values for the page title, site name, description, URL, image, and other properties related to SEO and social media sharing.\n\n3. What is the purpose of the `favicons` array?\n \n The `favicons` array contains a list of links to various favicon images used by the website. These images are used to represent the website in browser tabs, bookmarks, and other places where a small icon is needed. The array includes links to images of different sizes and formats to ensure compatibility with different devices and browsers.","metadata":{"source":".autodoc/docs/markdown/foundation/src/components/Seo.md"}}],["1308",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/foundation/src/components/Skeleton.tsx)\n\nThis code defines a React component called `Skeleton` that renders a rectangular box with a shimmering effect. The purpose of this component is to provide a visual placeholder for content that is being loaded asynchronously, so that the user knows that something is happening and doesn't get confused by a blank screen.\n\nThe component takes in a `className` prop, which can be used to add additional CSS classes to the component, and any other props that would normally be passed to a `div` element. The `className` prop is passed to a utility function called `clsxm`, which concatenates the classes together with a space separator. This allows the user to easily add their own custom styles to the component.\n\nThe component renders a `div` element with a background image that consists of a linear gradient that goes from a light gray color to a slightly darker gray color and back to the light gray color. This creates the shimmering effect, as the background appears to move from left to right. The `backgroundSize` property is set to `700px 100%` to ensure that the gradient covers the entire width of the component, and the `backgroundRepeat` property is set to `no-repeat` to prevent the gradient from repeating.\n\nOverall, this component is a simple but effective way to provide visual feedback to the user while content is being loaded. It can be used in a variety of contexts, such as when fetching data from an API or when rendering a complex UI that takes a while to load. Here is an example of how the `Skeleton` component could be used in a React application:\n\n```jsx\nimport React, { useState, useEffect } from 'react';\nimport Skeleton from './Skeleton';\n\nfunction App() {\n const [isLoading, setIsLoading] = useState(true);\n const [data, setData] = useState([]);\n\n useEffect(() => {\n fetch('https://api.example.com/data')\n .then(response => response.json())\n .then(data => {\n setData(data);\n setIsLoading(false);\n });\n }, []);\n\n return (\nThis is my component.
\nCheck out our
Welcome to the homepage!
\nMy content
\".\n## Questions: \n 1. What is the purpose of this code?\n - This code defines a React component called `Content` that takes in a `title` and `content` as props and returns a styled div with the `title` displayed in a large font and the `content` displayed in a smaller font with HTML formatting.\n\n2. What styling classes are being used in this code?\n - The code uses several Tailwind CSS classes for styling, including `bg-black`, `md:px-64`, `max-md:flex-col`, `max-md:px-4`, `py-20`, `relative`, `md:w-1/2`, `max-md:w-full`, `md:pr-32`, `max-md:pb-8`, `text-white`, `text-4xl`, `w-1/2`, `flex`, `justify-between`, `space-x-16`, `flex-1`, `text-xl`, and `md:columns-2`.\n\n3. What is the purpose of the `dangerouslySetInnerHTML` prop?\n - The `dangerouslySetInnerHTML` prop is used to render the `content` prop as HTML, which allows for the use of HTML tags and formatting within the `content` string. However, it is important to note that using this prop can pose a security risk if the `content` string is not properly sanitized.","metadata":{"source":".autodoc/docs/markdown/foundation/src/pages/animals/Content.md"}}],["1334",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/foundation/src/pages/animals/Header.tsx)\n\nThe `Header` function in this code file is a React component that renders a header section for a website. The header includes an image that flips when clicked, a title, a description, and two links for purchasing and adding items to a cart. The header also includes a navigation bar for mobile devices that displays links to different animal pages.\n\nThe `useState` hook is used to create a state variable `flip` that is initially set to `false`. This variable is used to determine whether the image should be flipped or not. When the image is clicked, the `setFlip` function is called with the opposite value of `flip`, which causes the image to flip.\n\nThe `ReactCardFlip` component is used to create a flipping effect for the image. It takes two `Image` components as children, each with a different image source. When the `isFlipped` prop is set to `true`, the second `Image` component is displayed, and when it is set to `false`, the first `Image` component is displayed.\n\nThe `Link` components are used to create two buttons for purchasing and adding items to a cart. They are styled with different colors and borders to differentiate them. The `href` prop is set to `#` for both links, indicating that they are not functional in this code file.\n\nThe navigation bar for mobile devices is created using `Link` components that link to different animal pages. The `className` prop is used to style the links with white text and a black background. The `active` class is added to the second link to indicate the current page.\n\nThis `Header` component can be used in a larger project as a reusable header section for different pages. The image, title, and description can be customized for each page, and the links can be made functional by adding appropriate URLs. The navigation bar can also be customized with different links and styles. Here is an example of how this component can be used in a larger project:\n\n```\nimport Header from './Header';\n\nfunction HomePage() {\n return (\nExplore our collection of rare and endangered animals.
\nWelcome to the Zoo Labs Foundation website!
\n\n This is the Terms of Service page for Zoo Labs Foundation. By using our website or services, you agree to the terms of this agreement. We may update this agreement from time to time, so please review it periodically to stay informed about any changes.
\n 1. Acceptance of Terms
\nBy using our website or services, you agree to the terms of this agreement. If you do not agree to these terms, you should not use our website or services.
\n2. Use of Website and Services
\nYou may use our website and services only for lawful purposes and in accordance with these terms. You agree not to use our website or services:
\n(a) In any way that violates any applicable federal, state, local, or international law or regulation.
\n(b) To engage in any conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
\n(c) To impersonate or attempt to impersonate Zoo Labs Foundation, a Zoo Labs Foundation employee, another user, or any other person or entity.
\n(d) To engage in any other conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
\n3. Intellectual Property
\nThe website and its entire contents, features, and functionality (including but not limited to all information, software, text, displays, images, video, and audio, and the design, selection, and arrangement thereof), are owned by Zoo Labs Foundation, its licensors, or other providers of such material and are protected by United States and international copyright, trademark, patent, trade secret, and other intellectual property or proprietary rights laws.
\n4. Disclaimer of Warranties
\nYOUR USE OF THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE IS AT YOUR OWN RISK. THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE ARE PROVIDED ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS, WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. NEITHER ZOO LABS FOUNDATION NOR ANY PERSON ASSOCIATED WITH ZOO LABS FOUNDATION MAKES ANY WARRANTY OR REPRESENTATION WITH RESPECT TO THE COMPLETENESS, SECURITY, RELIABILITY, QUALITY, ACCURACY, OR AVAILABILITY OF THE WEBSITE. WITHOUT LIMITING THE FOREGOING, NEITHER ZOO LABS FOUNDATION NOR ANYONE ASSOCIATED WITH ZOO LABS FOUNDATION REPRESENTS OR WARRANTS THAT THE WEBSITE, ITS CONTENT, OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL BE ACCURATE, RELIABLE, ERROR-FREE, OR UNINTERRUPTED, THAT DEFECTS WILL BE CORRECTED, THAT OUR SITE OR THE SERVER THAT MAKES IT AVAILABLE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR THAT THE WEBSITE OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL OTHERWISE MEET YOUR NEEDS OR EXPECTATIONS.
\n5. Limitation of Liability
\nIN NO EVENT WILL ZOO LABS FOUNDATION, ITS AFFILIATES, OR THEIR LICENSORS, SERVICE PROVIDERS, EMPLOYEES, AGENTS, OFFICERS, OR DIRECTORS BE LIABLE FOR DAMAGES OF ANY KIND, UNDER ANY LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH YOUR USE, OR INABILITY TO USE, THE WEBSITE, ANY WEBSITES LINKED TO IT, ANY CONTENT ON THE WEBSITE OR SUCH OTHER WEBSITES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO, PERSONAL INJURY, PAIN AND SUFFERING, EMOTIONAL DISTRESS, LOSS OF REVENUE, LOSS OF PROFITS, LOSS OF BUSINESS OR ANTICIPATED SAVINGS, LOSS OF USE, LOSS OF GOODWILL, LOSS OF DATA, AND WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE.
\n6. Indemnification
\nYou agree to defend, indemnify, and hold harmless Zoo Labs Foundation, its affiliates, licensors, and service providers, and its and their respective officers, directors, employees, contractors, agents, licensors, suppliers, successors, and assigns from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys' fees) arising out of or relating to your violation of these terms or your use of the website or services, including, but not limited to, any use of the website's content, services, and products other than as expressly authorized in these terms or your use of any information obtained from the website.
\n7. Governing Law and Jurisdiction
\nAll matters relating to the website and these terms and any dispute or claim arising therefrom or related thereto (in each case, including non-contractual disputes or claims), shall be governed by and construed in accordance with the internal laws of the State of California without giving effect to any choice or conflict of law provision or rule (whether of the State of California or any other jurisdiction). Any legal suit, action, or proceeding arising out of, or related to, these terms or the website shall be instituted exclusively in the federal courts of the United States or the courts of the State of California in each case located in the City and County of San Francisco although we retain the right to bring any suit, action, or proceeding against you for breach of these terms in your country of residence or any other relevant country. You waive any and all objections to the exercise of jurisdiction over you by such courts and to venue in such courts.
\n8. Changes to These Terms
\nWe may revise and update these terms from time to time in our sole discretion. All changes are effective immediately when we post them, and apply to all access to and use of the website thereafter. Your continued use of the website following the posting of revised terms means that you accept and agree to the changes. You are expected to check this page from time to time so you are aware of any changes, as they are binding on you.
\n9. Contact Us
\nIf you have any questions, concerns, or requests regarding these terms or our privacy practices, please contact us at:\nZoo Labs Foundation
\n\nhello@zoo.ngo
\n415-373-2496
\n\nWe will make every effort to respond to your inquiries and address any concerns as quickly as possible.
\n\n
This is some sample text.
\n \n\n```\n\nIn this example, the font file is preloaded using the `link` element with the `rel` attribute set to \"preload\". This tells the browser to fetch the font file as soon as possible, but not to block the rendering of the page. The `as` attribute is set to \"font\" to indicate that this is a font file, and the `type` attribute is set to \"font/woff2\" to specify the file type. The `crossorigin` attribute is included to allow the font file to be loaded from a different domain if necessary.\n\nOverall, this code is a small but important part of a larger project that aims to optimize the performance of a web page by reducing the number of requests made to the server. By specifying a cache control directive for the font file, the browser can store it locally and avoid requesting it from the server on subsequent page loads, resulting in faster page load times and a better user experience.\n## Questions: \n 1. What is the purpose of this code?\n This code defines a JSON object with a single header that specifies the cache control settings for a font file.\n\n2. Where is this code used in the project?\n It is unclear where this code is used in the project without additional context.\n\n3. Are there any other headers or files that have cache control settings defined?\n It is unclear if there are any other headers or files with cache control settings defined without additional context or inspection of other files in the project.","metadata":{"source":".autodoc/docs/markdown/foundation/vercel.md"}}],["1354",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/gulpfile.js)\n\nThis code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS using the csso plugin. The compiled CSS is then saved to the `public` directory. \n\nThe task starts by requiring the necessary dependencies: `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`. \n\nThe `gulp.task` function defines a new task called `less`. This task takes all Less files in the `src/themes` directory that end with `-theme.less` and compiles them into CSS. The `debug` function is used to log the names of the Less files being processed. \n\nThe `gulpless` function is used to compile the Less files into CSS. The `javascriptEnabled` option is set to `true` to enable JavaScript evaluation in Less files. The `less-plugin-npm-import` plugin is used to allow importing of Less files from installed npm packages using the `~` prefix. \n\nThe resulting CSS is then piped through the `postcss` function, which applies the `autoprefixer` plugin to add vendor prefixes to CSS rules. \n\nFinally, the `csso` function is used to minify the CSS. The `debug` option is set to `true` to log the size reduction achieved by the minification. \n\nThe resulting CSS is saved to the `public` directory using the `gulp.dest` function. \n\nThis task can be used as part of a larger build process for a web application that uses Less for styling. It allows developers to write Less code and have it automatically compiled and minified into CSS that is ready for production use. \n\nExample usage:\n\n```\n// gulpfile.js\n\nconst gulp = require('gulp');\nconst lessTask = require('./zoo/less-task');\n\ngulp.task('build', gulp.series(lessTask));\n```\n\nThis code defines a `build` task that runs the `less` task defined in the `less-task.js` file located in the `zoo` directory. When the `build` task is run, all Less files in the `src/themes` directory are compiled and minified into CSS and saved to the `public` directory.\n## Questions: \n 1. What is the purpose of this code?\n This code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS before outputting it to a `public` directory.\n\n2. What are the dependencies required for this code to run?\n This code requires several dependencies to run, including `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`.\n\n3. What is the input and output of this code?\n The input of this code is any Less files located in the `src/themes` directory that match the pattern `*-theme.less`. The output of this code is minified CSS files that are output to the `public` directory.","metadata":{"source":".autodoc/docs/markdown/lab/gulpfile.md"}}],["1355",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/index.html)\n\nThis code is an HTML template file for a web application called \"Lab\". The file contains metadata and links to various resources that are used by the web application. The purpose of this file is to provide a basic structure for the web application and to ensure that all necessary resources are included.\n\nThe file starts with a DOCTYPE declaration that specifies the version of HTML being used. The next section contains the head element, which includes various meta tags that provide information about the web application, such as the character set, viewport settings, and theme color. The head element also includes links to the favicon and apple-touch-icon, which are small images that are used to represent the web application in the browser and on mobile devices.\n\nThe next section of the file includes a link to the manifest.json file, which provides metadata about the web application that is used when it is installed on a user's device. The manifest.json file includes information such as the name of the web application, its icons, and its start URL.\n\nThe body element of the file contains a div element with an id of \"root\". This is where the content of the web application will be rendered. The file also includes a noscript element that displays a message if JavaScript is not enabled in the user's browser.\n\nFinally, the file includes a comment that provides instructions for starting the development server and building the web application for production.\n\nOverall, this file is an essential part of the web application and provides a basic structure and necessary resources for the application to function properly. Developers can use this file as a starting point for building their web application and customize it as needed. For example, they can add additional meta tags, links to external resources, and modify the content of the body element to create a unique user interface.\n## Questions: \n 1. What is the purpose of this HTML file?\n \n This HTML file serves as a template for a web app created using scaffold-eth, with metadata for mobile devices and desktops, and a title of \"Lab\".\n\n2. What is the significance of the %PUBLIC_URL% placeholder in the code?\n \n The %PUBLIC_URL% placeholder is used to reference files inside the `public` folder during the build, and will be replaced with the URL of the `public` folder. This allows for correct referencing of files with client-side routing and a non-root public URL.\n\n3. What are the recommended commands for development and production of this web app?\n \n The recommended commands for development are `npm start` or `yarn start`, and for production are `npm run build` or `yarn build`.","metadata":{"source":".autodoc/docs/markdown/lab/public/index.md"}}],["1356",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/manifest.json)\n\nThis code is a JSON object that defines the configuration for a web application. Specifically, it sets the metadata for the application's icons, name, start URL, display mode, and theme and background colors. \n\nThe `short_name` and `name` properties define the name of the application, with the former being a shorter version that may be used in places where space is limited. The `icons` property is an array of objects that define the icons for the application, with each object specifying the source file, size, and type. This allows the application to have different icons for different devices and contexts. \n\nThe `start_url` property specifies the URL that the application should load when it is launched. In this case, it is set to \".\" which means the application will load the index.html file in the root directory. \n\nThe `display` property specifies the display mode for the application, with \"standalone\" meaning that the application should be launched in its own window without any browser UI. This is useful for creating web applications that look and feel like native applications. \n\nThe `theme_color` and `background_color` properties define the colors for the application's theme and background, respectively. These colors can be used to customize the appearance of the application and provide a consistent look and feel across different devices and platforms. \n\nOverall, this code is an important part of the configuration for a web application and helps to ensure that the application looks and behaves consistently across different devices and contexts. Here is an example of how this code might be used in an HTML file:\n\n```html\n\n\n \n \n \nThis is a web application that uses the latest web technologies.
\n \n\n```\n\nIn this example, the `link` element specifies the location of the `manifest.json` file that contains the configuration for the application. This allows the browser to load the correct icons and other metadata for the application.\n## Questions: \n 1. What is the purpose of this code?\n This code is a JSON file that defines the metadata for a web application, including its name, icons, start URL, and display settings.\n\n2. What is the significance of the different icon sizes and types?\n The different icon sizes and types allow the web application to be displayed properly on different devices and platforms, such as desktops, mobile devices, and browsers.\n\n3. What is the difference between \"display\" and \"background_color\"?\n \"Display\" refers to how the web application should be displayed to the user, such as in a standalone window or as part of a browser tab. \"Background_color\" refers to the color of the background of the web application.","metadata":{"source":".autodoc/docs/markdown/lab/public/manifest.md"}}],["1357",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/robots.txt)\n\nThis code is a standard robots.txt file that is used to communicate with web crawlers and search engines about which pages or sections of a website should be crawled and indexed. The file starts with a comment that provides a link to the official documentation for the robots.txt protocol.\n\nThe first line of the file specifies the user-agent that the following rules apply to. In this case, the wildcard symbol (*) is used to indicate that the rules apply to all user-agents. \n\nThe following lines contain the rules for the web crawlers and search engines. Each rule consists of a directive and a value. The most common directives are \"Disallow\" and \"Allow\". The \"Disallow\" directive tells the web crawler not to crawl a specific page or section of the website, while the \"Allow\" directive tells the web crawler that it is allowed to crawl a specific page or section of the website.\n\nIn this specific file, there are no rules specified, which means that all pages and sections of the website are allowed to be crawled by any web crawler or search engine.\n\nThis file is an important part of any website as it helps to ensure that search engines are able to crawl and index the website correctly. Without a robots.txt file, search engines may crawl and index pages that should not be visible to the public, such as admin pages or pages with sensitive information.\n\nAn example of how this file can be used in the larger project is to specify rules for specific user-agents. For example, if there is a web crawler that is causing issues with the website, the robots.txt file can be updated to disallow that specific user-agent from crawling the website. This can help to improve the performance and security of the website.\n## Questions: \n 1. What is the purpose of this code and how does it relate to the overall functionality of the zoo project?\n - This code is the contents of a `robots.txt` file, which is used to instruct web crawlers on which pages of a website they are allowed to access. It is important for the SEO and security of the website, but does not directly relate to the functionality of the zoo project.\n \n2. Why is the `User-agent: *` line included and what does it mean?\n - The `User-agent: *` line specifies that the following rules apply to all web crawlers. This means that any crawler that accesses the website will be subject to the rules outlined in the `robots.txt` file.\n \n3. Are there any other rules or directives that could be included in this `robots.txt` file?\n - Yes, there are several other directives that can be included in a `robots.txt` file, such as `Disallow` to block specific pages or directories, `Allow` to override a `Disallow` directive, and `Sitemap` to specify the location of the website's sitemap. However, it is up to the website owner to determine which directives are necessary for their specific website.","metadata":{"source":".autodoc/docs/markdown/lab/public/robots.md"}}],["1358",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/create_contracts.js)\n\nThis code checks if a file called \"hardhat_contracts.json\" exists in the \"./src/contracts/\" directory. If the file does not exist, the code creates an empty JSON object and writes it to the file. \n\nThis code is likely used in a larger project to ensure that a specific file exists and is properly formatted before other parts of the project attempt to read from or write to it. The file \"hardhat_contracts.json\" may contain important information or configurations for the project, and this code ensures that it is present and ready to be used. \n\nHere is an example of how this code may be used in a larger project:\n\n```javascript\nconst fs = require(\"fs\");\n\nfunction readContracts() {\n let contracts = {};\n\n if (fs.existsSync(\"./src/contracts/hardhat_contracts.json\")) {\n try {\n contracts = JSON.parse(fs.readFileSync(\"./src/contracts/hardhat_contracts.json\"));\n } catch (error) {\n console.log(error);\n }\n } else {\n console.log(\"src/contracts/hardhat_contracts.json not found.\");\n }\n\n return contracts;\n}\n\nfunction writeContracts(contracts) {\n try {\n fs.writeFileSync(\"./src/contracts/hardhat_contracts.json\", JSON.stringify(contracts));\n console.log(\"src/contracts/hardhat_contracts.json updated.\");\n } catch (error) {\n console.log(error);\n }\n}\n\nlet contracts = readContracts();\n\n// Do something with contracts...\n\nwriteContracts(contracts);\n```\n\nIn this example, the `readContracts` function first checks if the \"hardhat_contracts.json\" file exists and is properly formatted. If it is, the function reads the contents of the file and returns it as a JSON object. If the file does not exist or is not properly formatted, the function returns an empty object.\n\nThe `writeContracts` function takes a JSON object as an argument and writes it to the \"hardhat_contracts.json\" file. \n\nThe `contracts` variable is initialized by calling `readContracts`, and then some operation is performed on it. Finally, the updated `contracts` object is written back to the \"hardhat_contracts.json\" file by calling `writeContracts`. \n\nOverall, this code ensures that the \"hardhat_contracts.json\" file exists and is properly formatted, allowing other parts of the project to safely read from and write to it.\n## Questions: \n 1. What is the purpose of this code?\n This code checks if a file called \"hardhat_contracts.json\" exists in the \"./src/contracts/\" directory, and if it doesn't, it creates an empty JSON file with that name.\n\n2. What happens if there is an error while writing the file?\n If there is an error while writing the file, the error message will be logged to the console.\n\n3. What is the expected output of this code?\n If the file doesn't exist and is successfully created, the message \"src/contracts/hardhat_contracts.json created.\" will be logged to the console. If the file already exists, nothing will happen. If there is an error while writing the file, the error message will be logged to the console.","metadata":{"source":".autodoc/docs/markdown/lab/scripts/create_contracts.md"}}],["1359",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/ipfs.js)\n\nThis code is a script that deploys a web application to the InterPlanetary File System (IPFS) and publishes it to the IPNS (InterPlanetary Name System). IPFS is a distributed file system that allows users to store and access files in a decentralized manner. IPNS is a naming system built on top of IPFS that allows users to create human-readable names for IPFS content.\n\nThe script uses the ipfs-http-client library to interact with the IPFS network. It also uses the chalk and readline libraries for console output formatting. The script defines the IPFS gateway and IPNS gateway URLs, as well as the options for adding files to IPFS.\n\nThe `pushDirectoryToIPFS` function takes a path to a directory and recursively adds its contents to IPFS using the `ipfs.add` method. The function returns the response from IPFS, which includes the content identifier (CID) of the added content.\n\nThe `publishHashToIPNS` function takes an IPFS hash (CID) and publishes it to IPNS using the `ipfs.name.publish` method. The function returns the response from IPFS, which includes the IPNS name.\n\nThe `nodeMayAllowPublish` function checks if the IPFS node allows publishing IPNS names. It does this by comparing the node's host URL to a blacklist of known nodes that do not allow IPNS publishing.\n\nThe `deploy` function deploys the web application to IPFS and publishes it to IPNS. It first adds the contents of the `./build` directory to IPFS using `pushDirectoryToIPFS`. If the add operation fails, the function returns false. Otherwise, it publishes the IPFS hash to IPNS using `publishHashToIPNS` if the IPFS node allows it. Finally, the function outputs the IPFS and IPNS URLs for accessing the deployed application.\n\nTo use this script, the user needs to have an IPFS node running. They can then run the script to deploy their web application to IPFS and publish it to IPNS. The script can be integrated into a larger project as part of a continuous deployment pipeline to automatically deploy new versions of the application to IPFS and IPNS.\n## Questions: \n 1. What is the purpose of this code?\n \n This code is used to deploy an application to IPFS (InterPlanetary File System) and publish it to IPNS (InterPlanetary Name System) for easy access.\n\n2. What are the dependencies of this code?\n \n This code depends on the `ipfs-http-client`, `chalk`, and `readline` packages.\n\n3. What is the difference between IPFS and IPNS?\n \n IPFS is a distributed file system that allows users to store and access files in a decentralized manner, while IPNS is a naming system that allows users to assign human-readable names to IPFS content. IPNS names can be updated to point to new content, while IPFS content is immutable.","metadata":{"source":".autodoc/docs/markdown/lab/scripts/ipfs.md"}}],["1360",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/s3.js)\n\nThis code is responsible for creating an AWS S3 bucket and uploading a directory to it. The code first imports the necessary dependencies, including the `s3-folder-upload` package and the `fs` module. It then sets the name of the directory to be uploaded to the `build` directory and the name of the S3 bucket to be created to `testbucket.xyz`. \n\nThe code then checks if a bucket name has been set and exits the process if it has not. It also reads the AWS credentials from a file called `aws.json` and sets the bucket name in the credentials object. \n\nThe code then creates an S3 service object and uses it to create a new bucket with the specified name. It also sets the bucket's website configuration to use `index.html` as the index document and `index.html` as the error document. \n\nOnce the bucket is created, the code uploads the contents of the `build` directory to the bucket using the `s3FolderUpload` function from the `s3-folder-upload` package. \n\nThis code can be used as part of a larger project to automate the deployment of a static website to an S3 bucket. By running this code, developers can create a new bucket and upload the contents of the `build` directory to it with a single command. \n\nExample usage:\n\n```\n// Import the code from the file\nconst deployToS3 = require('./path/to/s3.js');\n\n// Call the function to create the bucket and upload the directory\ndeployToS3();\n```\n## Questions: \n 1. What is the purpose of this code?\n \n This code is used to create an S3 bucket and upload a directory to it.\n\n2. What is the significance of the `aws.json` file?\n \n The `aws.json` file contains the AWS credentials required to access the S3 bucket. It is read by the code to authenticate the user.\n\n3. What are the options available for the `s3FolderUpload` method?\n \n The `s3FolderUpload` method takes an optional `options` parameter that can be used to configure the upload process. The available options are `useFoldersForFileTypes` and `useIAMRoleCredentials`.","metadata":{"source":".autodoc/docs/markdown/lab/scripts/s3.md"}}],["1361",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/watch.js)\n\nThe code above is a Node.js script that watches for changes in a specific directory and runs a command to compile and generate new files whenever a change is detected. The purpose of this script is to automate the process of compiling and generating files, which can be time-consuming and error-prone if done manually.\n\nThe script uses two Node.js modules: `node-watch` and `child_process`. `node-watch` is used to watch for changes in the `./src/themes` directory, while `child_process` is used to execute the command to compile and generate files.\n\nThe `run` function is responsible for executing the command to compile and generate files. It uses the `exec` method from the `child_process` module to run the command `npx gulp less`. This command is used to compile `.less` files into `.css` files using the Gulp task runner. The function also logs the output of the command to the console.\n\nThe `watch` function is used to watch for changes in the `./src/themes` directory. Whenever a change is detected, the function logs the name of the file that was changed to the console and calls the `run` function to compile and generate new files.\n\nFinally, the script calls the `run` function once at the beginning to compile and generate files for the first time.\n\nThis script can be used in a larger project to automate the process of compiling and generating files whenever changes are made to the source files. For example, in a web development project, this script can be used to compile `.less` files into `.css` files whenever changes are made to the `.less` files. This can save time and reduce errors by automating a repetitive and error-prone task.\n## Questions: \n 1. What does this code do?\n This code sets up a watch on the `./src/themes` directory and runs a Gulp task to compile LESS files whenever a change is detected in that directory.\n\n2. What dependencies does this code have?\n This code requires the `node-watch` and `child_process` modules to be installed.\n\n3. What command should be run to start this code?\n This code can be started by running the file with Node.js (`node filename.js`) or by incorporating it into a larger Node.js project.","metadata":{"source":".autodoc/docs/markdown/lab/scripts/watch.md"}}],["1362",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/lab/src/App.css)\n\nThe code provided is a CSS file that defines the styling for the `.App` class. The purpose of this code is to center the text within any HTML element that has the `.App` class applied to it. This code can be used in conjunction with HTML and JavaScript to create a user interface for a web application. \n\nFor example, if we have an HTML file with the following code:\n\n```\nExplore our collection of animals.
\nCurrent amount: {amount} ETH
\nCurrent value: ${amount * price}
\nExplore our collection of animals and exhibits.
\nAddress: {address}
\nBalance: {balance}
\nContract is deployed!
:Contract is not deployed.
}\nCurrent price: {price}
\nCurrent gas price: {gasPrice} wei
\nCount: {count}
\n \nAddress: {address}
\nENS Name: {ensName}
\nNonce: {nonce}
\nSigned transaction: {signedTx}
\nCurrent block number: {blockNumber}
\nCount: {count}
\nThis text is highlighted
\nTotal price: {totalPrice}
\nTotal: {data.total}
\n \nText copied to clipboard!
}\n{token.description}
\nPrice: {token.market.floorAsk.price.amount}
\n {token.isInCart ? (\n \n ) : (\n \n )}\nCount: {count}
\n \nLoading...
}\n {royaltyInfo.error &&Error: {royaltyInfo.error.message}
}\n {royaltyInfo.data && (\nPosted {
This is a post
\n{response.collection.description}
\nThis token is banned on OpenSea.
\n } else {\n returnThis token is not banned on OpenSea.
\n }\n}\n```\n## Questions: \n 1. What is the purpose of this code?\n This code is a React hook that checks if a given token on a given contract is banned on OpenSea.\n\n2. What is the '@reservoir0x/reservoir-sdk' package used for?\n The '@reservoir0x/reservoir-sdk' package is used to check if a given token is banned on OpenSea.\n\n3. What happens if either the contract or tokenId parameters are not provided?\n If either the contract or tokenId parameters are not provided, the hook will return false for isBanned.","metadata":{"source":".autodoc/docs/markdown/ui/src/hooks/useTokenOpenseaBanned.md"}}],["1473",{"pageContent":"[View code on GitHub](zoo-labs/zoo/blob/master/ui/src/hooks/useTokens.ts)\n\nThis code exports a function that retrieves token details from a Reservoir API endpoint. The function takes in three optional parameters: `options`, `swrOptions`, and `chainId`. \n\n`options` is an object that contains query parameters to be sent with the API request. If `options` is not provided or is falsey, the function returns null. \n\n`swrOptions` is an object that contains options for the SWR library, which is used to handle caching and revalidation of the API response. The default options are set to revalidate on mount and not on the first page. \n\n`chainId` is an optional parameter that specifies the ID of the chain to use for the API request. If `chainId` is provided, the function searches for the chain with the matching ID in the client's list of chains. If `chainId` is not provided, the function uses the current chain from the client. \n\nThe function then calls `useInfiniteApi` from the `./` module, passing in a callback function and the `swrOptions` object. The callback function takes in two parameters: `pageIndex` and `previousPageData`. `pageIndex` is the index of the current page being fetched, and `previousPageData` is the data from the previous page. \n\nThe callback function constructs the API endpoint URL using the `chain` object and the `/tokens/v6` endpoint path. It then sets the query parameters using the `options` object and the `setParams` function from the `@reservoir0x/reservoir-sdk` module. If `normalizeRoyalties` is not specified in the query parameters and the client has a `normalizeRoyalties` property, the function sets `normalizeRoyalties` to the client's value. \n\nIf `previousPageData` is truthy and has a `continuation` property, the function sets the `continuation` query parameter to the value of `previousPageData.continuation`. This allows the function to fetch subsequent pages of data. If `previousPageData` is falsy and `pageIndex` is greater than 0, the function returns null. \n\nThe callback function then returns an array containing the constructed URL, the chain's API key, and the client's version. This array is used by `useInfiniteApi` to make the API request. \n\nThe function then extracts the `tokens` array from the API response data and returns an object containing the `response` object from `useInfiniteApi` and the `tokens` array. \n\nThis function can be used to fetch token details from the Reservoir API and handle pagination of the response data using the SWR library. An example usage of this function might look like:\n\n```\nimport useTokens from './useTokens'\n\nfunction TokenList() {\n const { data, error, size, setSize } = useTokens({ limit: 10 })\n\n if (error) returnHere's a cool hexagon icon:
\nCapital: {country.capital}
\nPopulation: {country.population}
\nCan you spot the bird in this image?
\nThis is the content of my modal.
\nPrice: $10.00
\nSelected currency: {selectedCurrency.symbol}
\nCollapsible content goes here
\nValue: {value}
\n...
\n >\n )\n}\n```", - "questions": "1. What is the purpose of this code?\n- This code renders the `` section of an HTML page, including meta tags, title, and favicon.\n\n2. What are the configurable options in this code?\n- The code has configurable options for custom meta tags, title, and keywords in `pages/_document.ts`.\n\n3. What is the significance of the `ogImage` parameter?\n- The `ogImage` parameter is the URL of the Open Graph image to be displayed in social media shares.", - "checksum": "4fadf2b40b3c5cbfc5567c7fb02f0d60" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/components/Layout.json b/.autodoc/docs/json/app/components/Layout.json deleted file mode 100644 index feb5b8901..000000000 --- a/.autodoc/docs/json/app/components/Layout.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "Layout.tsx", - "filePath": "app/components/Layout.tsx", - "url": "zoo-labs/zoo/blob/master/app/components/Layout.tsx", - "summary": "The code above defines a React component called `Layout` that serves as a layout wrapper for other components in the `zoo` project. The component imports the `Box` component from the `components/primitives` module and the `FC` and `ReactNode` types from the `react` module. It also imports the `Navbar` component from a local file called `navbar`.\n\nThe `Layout` component takes a single prop called `children`, which is of type `ReactNode`. This prop is used to render the child components that are wrapped by the `Layout` component.\n\nThe `Layout` component returns a JSX expression that renders a `Box` component with some CSS styles. The `Box` component serves as a container for the entire layout. It has a background color of `$neutralBg`, which is a CSS variable that is defined elsewhere in the project. It also has a height and minimum height of 100% to ensure that it takes up the full height of the viewport. Additionally, it has a padding top of 80 pixels to create some space between the top of the layout and the content.\n\nInside the `Box` component, there is another `Box` component that serves as a container for the content of the layout. This inner `Box` component has a maximum width of 1920 pixels and is horizontally centered using the `mx` CSS property. Inside this container, there is a `Navbar` component that is imported from a local file called `navbar`. The `Navbar` component is responsible for rendering the navigation bar at the top of the layout. Finally, the `children` prop is rendered inside a `main` element, which serves as the main content area of the layout.\n\nOverall, the `Layout` component provides a consistent layout structure for other components in the `zoo` project. It ensures that all components are rendered inside a container with a consistent background color, padding, and maximum width. It also provides a navigation bar at the top of the layout that is consistent across all pages. Developers can use this component as a wrapper for their components to ensure a consistent layout structure throughout the project. For example, a developer could use the `Layout` component to wrap a `HomePage` component like this:\n\n```\nimport Layout from './Layout'\nimport HomePage from './HomePage'\n\nconst App = () => {\n return (\nThis is the content of the modal.
\nThis is an example modal.
\n{collection.description}
\nHere is some content.
\n{user.bio}
\nHere is some collapsible content
\nThis is a flexible layout
\nContent for Tab 1
\nSelected chain: {chain.name}
\n \n{currentChain.description}
\nLoading...
\n )}\nPrimary Fee: {openseaFees.primaryFee}
\nSecondary Fee: {openseaFees.secondaryFee}
\nPosted {
This is a sample web app that uses the zoo manifest file.
\n \n\n```\n\nIn this example, the web app includes a link to the \"manifest.json\" file, which contains the code we discussed earlier. This allows the web app to use the specified icons and colors, and to be displayed as a standalone app.", - "questions": "1. What is the purpose of this code?\n This code is a JSON object that defines various properties of icons and colors for a web app.\n\n2. Where is this code used in the project?\n It is not clear from this code snippet where it is used in the project. It could be part of a configuration file or a script that generates HTML code.\n\n3. Are there any dependencies or requirements for this code to work properly?\n It is not clear from this code snippet if there are any dependencies or requirements for this code to work properly. It is possible that other parts of the project rely on this code to be present and correctly formatted.", - "checksum": "0a7ce2e82b0357ebf2602e9d6fad7789" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/sentry.client.config.json b/.autodoc/docs/json/app/sentry.client.config.json deleted file mode 100644 index 9461cbf12..000000000 --- a/.autodoc/docs/json/app/sentry.client.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "sentry.client.config.ts", - "filePath": "app/sentry.client.config.ts", - "url": "zoo-labs/zoo/blob/master/app/sentry.client.config.ts", - "summary": "This file is responsible for configuring the initialization of Sentry on the client side of the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. \n\nThe code imports the necessary modules from the `@sentry/nextjs` and `@sentry/integrations` packages. It then calls the `Sentry.init()` method to initialize Sentry with the provided configuration options. \n\nThe `dsn` option specifies the Data Source Name (DSN) for Sentry, which is a unique identifier for the project. This value is retrieved from the `NEXT_PUBLIC_SENTRY_DSN` environment variable. \n\nThe `tracesSampleRate` option determines the percentage of transactions that will be sent to Sentry for performance monitoring. In this case, it is set to 1, meaning that all transactions will be sent. \n\nThe `debug` option controls whether or not debug information will be printed to the console during setup. It is set to false in this case. \n\nThe `replaysOnErrorSampleRate` option determines the percentage of errors that will be recorded for session replay. It is set to 1.0, meaning that all errors will be recorded. \n\nThe `replaysSessionSampleRate` option determines the percentage of sessions that will be recorded for session replay. It is set to 0.1, meaning that only 10% of sessions will be recorded. \n\nThe `integrations` option is an array of integrations that will be used with Sentry. In this case, two integrations are included: `Replay` and `CaptureConsoleIntegration`. The `Replay` integration enables session replay, which allows developers to see a video of a user's session leading up to an error. The `CaptureConsoleIntegration` integration captures console messages of a specified level (in this case, only `error` messages are captured) and sends them to Sentry for monitoring. \n\nOverall, this file sets up Sentry with the necessary configuration options and integrations to monitor errors and performance in the zoo project. Developers can use Sentry to identify and fix issues in their application, improving the overall user experience. \n\nExample usage:\n\n```javascript\nimport * as Sentry from '@sentry/nextjs'\n\n// Initialize Sentry with custom configuration options\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 1,\n debug: false,\n replaysOnErrorSampleRate: 1.0,\n replaysSessionSampleRate: 0.1,\n integrations: [\n new Sentry.Replay({\n maskAllText: true,\n blockAllMedia: true,\n }),\n new Sentry.CaptureConsoleIntegration({\n levels: ['error'],\n }),\n ],\n})\n\n// Log an error to the console\nconsole.error('An error occurred')\n\n// Sentry will capture the error and send it for monitoring\n```", - "questions": "1. What is Sentry and how does it work with Next.js?\n- Sentry is a tool for error tracking and monitoring. This code initializes Sentry on the client side of a Next.js application, allowing it to capture and report errors that occur in the user's browser.\n\n2. What is the purpose of the `tracesSampleRate` option?\n- The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. In this code, it is set to 1, meaning that all requests will be traced. This value should be adjusted in production to avoid excessive data usage.\n\n3. What is the `CaptureConsoleIntegration` and what does it do?\n- The `CaptureConsoleIntegration` is an integration provided by Sentry that captures console messages (such as `console.error()`) and sends them to Sentry for error tracking. In this code, it is configured to only capture `error` messages.", - "checksum": "b2633cb0de46e45b91b7beb68538572c" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/sentry.edge.config.json b/.autodoc/docs/json/app/sentry.edge.config.json deleted file mode 100644 index ff549a27e..000000000 --- a/.autodoc/docs/json/app/sentry.edge.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "sentry.edge.config.ts", - "filePath": "app/sentry.edge.config.ts", - "url": "zoo-labs/zoo/blob/master/app/sentry.edge.config.ts", - "summary": "This code initializes Sentry for edge features in the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. The configuration added in this file will be used whenever one of the edge features is loaded. This configuration is also required when running the project locally.\n\nThe code imports the Sentry library using the '@sentry/nextjs' package. It then calls the 'init' method on the Sentry object and passes in an object with configuration options. \n\nThe 'dsn' option is set to the value of the 'NEXT_PUBLIC_SENTRY_DSN' environment variable. This is the Data Source Name (DSN) for the Sentry project, which is used to identify and send error reports to the correct project.\n\nThe 'tracesSampleRate' option is set to 1, which means that all transactions will be sent to Sentry. This option can be adjusted in production to reduce the amount of data sent to Sentry.\n\nThe 'debug' option is set to false, which means that no additional information will be printed to the console during setup.\n\nOverall, this code ensures that Sentry is properly configured for edge features in the zoo project, allowing developers to monitor and fix errors in their application. \n\nExample usage:\n\n```\nimport * as Sentry from '@sentry/nextjs'\n\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 1,\n debug: false,\n})\n\n// Example code that could potentially throw an error\ntry {\n // some code here\n} catch (error) {\n Sentry.captureException(error)\n}\n```", - "questions": "1. What is Sentry and why is it being used in this project?\n - Sentry is a tool used for error tracking and monitoring. It is being initialized in this project for edge features such as middleware and edge routes.\n \n2. What is the purpose of the `tracesSampleRate` option and why is it set to 1?\n - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. It is set to 1 in this code, meaning that all requests will be traced.\n\n3. What is the purpose of the `debug` option and why is it set to false?\n - The `debug` option is used to print useful information to the console while setting up Sentry. It is set to false in this code, meaning that this information will not be printed.", - "checksum": "a0e15264066dc64d043c937560b11de2" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/sentry.server.config.json b/.autodoc/docs/json/app/sentry.server.config.json deleted file mode 100644 index 30ce5585d..000000000 --- a/.autodoc/docs/json/app/sentry.server.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "sentry.server.config.ts", - "filePath": "app/sentry.server.config.ts", - "url": "zoo-labs/zoo/blob/master/app/sentry.server.config.ts", - "summary": "This file is responsible for configuring the initialization of Sentry on the server. Sentry is a tool that helps developers monitor and fix errors in their applications. The code imports the Sentry library from the '@sentry/nextjs' package and initializes it with a configuration object. \n\nThe configuration object contains three properties: \n1. dsn: This property is set to the value of the environment variable NEXT_PUBLIC_SENTRY_DSN. This is the Data Source Name (DSN) that Sentry uses to identify the project and send error reports to the correct location. \n2. tracesSampleRate: This property is set to 1, which means that all requests will be traced by Sentry. In production, this value should be adjusted to a lower value to reduce the amount of data sent to Sentry and improve performance. Alternatively, the tracesSampler property can be used to provide greater control over which requests are traced. \n3. debug: This property is set to false, which means that Sentry will not print any useful information to the console during setup. This can be set to true during development to help with debugging.\n\nThis code is an important part of the larger project because it enables developers to monitor and fix errors in the application. By configuring Sentry on the server, developers can receive real-time notifications of errors and quickly identify and fix issues. \n\nHere is an example of how this code might be used in a larger project: \n\n```\n// server.js\n\nimport express from 'express'\nimport * as Sentry from '@sentry/nextjs'\nimport { createServer } from 'http'\n\nconst app = express()\n\n// Initialize Sentry\nSentry.init({\n dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,\n tracesSampleRate: 0.5,\n debug: true,\n})\n\n// Add Sentry middleware to the express app\napp.use(Sentry.Handlers.requestHandler())\n\n// Define routes\napp.get('/', (req, res) => {\n res.send('Hello World!')\n})\n\n// Add Sentry error handling middleware to the express app\napp.use(Sentry.Handlers.errorHandler())\n\n// Create server and listen on port 3000\nconst server = createServer(app)\nserver.listen(3000, () => {\n console.log('Server listening on port 3000')\n})\n```\n\nIn this example, the code initializes Sentry with a DSN from an environment variable and sets the tracesSampleRate to 0.5. It then adds Sentry middleware to the express app to handle requests and errors. Finally, it creates a server and listens on port 3000. \n\nOverall, this code is an essential part of any project that uses Sentry for error monitoring and provides developers with a powerful tool for identifying and fixing issues in their applications.", - "questions": "1. What is Sentry and why is it being used in this project?\n - Sentry is a tool for error tracking and monitoring. It is being used in this project to handle errors that occur on the server and provide useful information for debugging.\n\n2. What is the purpose of the `tracesSampleRate` option and why is it set to 1?\n - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. A value of 1 means that all requests will be traced. This may be adjusted in production to reduce the amount of data collected.\n\n3. What is the significance of the `debug` option and why is it set to false?\n - The `debug` option controls whether or not Sentry will print useful information to the console during setup. It is set to false in this code to prevent cluttering the console with unnecessary information.", - "checksum": "ccf808d00ecd0ea1167b2069fdf55efb" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/stitches.config.json b/.autodoc/docs/json/app/stitches.config.json deleted file mode 100644 index 1979a5e2f..000000000 --- a/.autodoc/docs/json/app/stitches.config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "stitches.config.ts", - "filePath": "app/stitches.config.ts", - "url": "zoo-labs/zoo/blob/master/app/stitches.config.ts", - "summary": "This code is responsible for creating and configuring the theme for the `zoo` project. It uses the `@stitches/react` library to create a theme object that contains various properties such as colors, fonts, sizes, and media queries. The `createStitches` function is used to create the theme object and also returns several utility functions that can be used to create styles for components.\n\nThe `colors` property of the theme object is defined using the `@radix-ui/colors` library, which provides a set of predefined color scales. These color scales are then combined and aliased to create the final color palette for the project. The `createTheme` function is used to create a dark theme that is a variation of the main theme.\n\nThe `utils` property of the theme object contains various utility functions that can be used to create styles for components. These functions include margin, padding, width, height, and grid-related functions. The `media` property contains various media queries that can be used to create responsive styles for components.\n\nThe `globalCss` function is used to apply a global CSS reset to the project. The `Inter` font from Google Fonts is also imported and used as the default font for the project.\n\nOverall, this code provides a centralized way to manage the theme for the `zoo` project. It allows for easy customization of the color palette and provides utility functions that can be used to create consistent styles for components. Here is an example of how the `styled` function can be used to create a styled component using the theme:\n\n```\nimport { styled } from 'zoo'\n\nconst Button = styled('button', {\n backgroundColor: '$primary1',\n color: '$whiteA11',\n padding: '$2',\n borderRadius: '$radii',\n '&:hover': {\n backgroundColor: '$primary2',\n },\n})\n```", - "questions": "1. What is the purpose of the `createStitches` function and what does it return?\n- The `createStitches` function is used to create a styling system for the project using the `@stitches/react` library. It returns an object with several properties including `createTheme`, `keyframes`, `styled`, `globalCss`, and `getCssText`.\n\n2. What is the purpose of the `utils` object within the `createStitches` function?\n- The `utils` object contains utility functions that can be used to generate CSS properties for margin, padding, dimensions, and grid. These functions can be used within the `styled` function to create custom styles.\n\n3. What is the purpose of the `darkTheme` object and how is it different from the default theme?\n- The `darkTheme` object is an alternative theme that can be used for dark mode. It contains different color values for the same color aliases used in the default theme, as well as some additional color values for accent and panel styling.", - "checksum": "62913d4ca4d7adb72e17af427520510c" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/tsconfig.json b/.autodoc/docs/json/app/tsconfig.json deleted file mode 100644 index cdfd01d6f..000000000 --- a/.autodoc/docs/json/app/tsconfig.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "tsconfig.json", - "filePath": "app/tsconfig.json", - "url": "zoo-labs/zoo/blob/master/app/tsconfig.json", - "summary": "This code is a configuration file for the TypeScript compiler. It specifies the compiler options and the files to be included or excluded from the compilation process. \n\nThe \"compilerOptions\" object contains various settings for the compiler, such as the target version of ECMAScript to compile to, the libraries to include, whether to allow JavaScript files to be compiled, and whether to enforce strict type checking. \n\nThe \"include\" and \"exclude\" arrays specify the files to be included or excluded from the compilation process. In this case, the \"include\" array includes all TypeScript and TypeScript React files in the project, while the \"exclude\" array excludes the \"node_modules\" directory. \n\nThis configuration file is an important part of the TypeScript project, as it ensures that the TypeScript code is compiled correctly and efficiently. It can be used in conjunction with other tools and frameworks to build and deploy TypeScript applications. \n\nFor example, in a Node.js project, this configuration file can be used with the \"tsc\" command to compile TypeScript files into JavaScript files that can be executed by Node.js. \n\n```\n// Example usage of the TypeScript compiler with this configuration file\ntsc\n```\n\nOverall, this code is a crucial part of the TypeScript project and ensures that the TypeScript code is compiled correctly and efficiently.", - "questions": "1. What is the purpose of this code file?\n - This code file is a configuration file for TypeScript compiler options for the project called zoo.\n\n2. What version of ECMAScript is being targeted?\n - The code is targeting ECMAScript 5.\n\n3. What files are being included and excluded in the compilation process?\n - The code includes all TypeScript and TypeScript React files with the extensions `.ts` and `.tsx`, as well as a file called `next-env.d.ts`. It excludes the `node_modules` directory.", - "checksum": "33ba263e3e822f2a605ba34d84c0ee22" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/types/ExpirationOption.json b/.autodoc/docs/json/app/types/ExpirationOption.json deleted file mode 100644 index a53e05b9a..000000000 --- a/.autodoc/docs/json/app/types/ExpirationOption.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "ExpirationOption.ts", - "filePath": "app/types/ExpirationOption.ts", - "url": "zoo-labs/zoo/blob/master/app/types/ExpirationOption.ts", - "summary": "This code defines a TypeScript type called `ExpirationOption`. This type is used to represent an option for an expiration date in the larger project. \n\nThe `ExpirationOption` type has four properties: `text`, `value`, `relativeTime`, and `relativeTimeUnit`. The `text` property is a string that represents the text that will be displayed for the expiration option. The `value` property is a string that represents the value that will be sent to the server when the expiration option is selected. The `relativeTime` property is a number or null that represents the relative time for the expiration option. The `relativeTimeUnit` property is a `ManipulateType` or null that represents the unit of time for the relative time.\n\nThis type can be used in the larger project to represent expiration options for various features such as subscriptions, memberships, or trial periods. For example, if the project has a subscription feature, the `ExpirationOption` type can be used to represent the different subscription plans available to the user. Each subscription plan can have its own `text`, `value`, `relativeTime`, and `relativeTimeUnit` properties.\n\nHere is an example of how the `ExpirationOption` type can be used in the larger project:\n\n```\nconst subscriptionOptions: ExpirationOption[] = [\n {\n text: 'Monthly Subscription',\n value: 'monthly',\n relativeTime: 1,\n relativeTimeUnit: 'month'\n },\n {\n text: 'Annual Subscription',\n value: 'annual',\n relativeTime: 1,\n relativeTimeUnit: 'year'\n },\n {\n text: 'Lifetime Subscription',\n value: 'lifetime',\n relativeTime: null,\n relativeTimeUnit: null\n }\n]\n```\n\nIn this example, an array of `ExpirationOption` objects is defined to represent the different subscription options available to the user. The first two options have a relative time of 1 month or 1 year, while the third option represents a lifetime subscription with no expiration.", - "questions": "1. What is the purpose of the `ExpirationOption` type?\n - The `ExpirationOption` type is used to represent an option for an expiration date, including its text, value, relative time, and relative time unit.\n\n2. What is the `ManipulateType` import used for?\n - The `ManipulateType` import is used to define the type of the `relativeTimeUnit` property in the `ExpirationOption` type.\n\n3. What library is the `ManipulateType` import from?\n - The `ManipulateType` import is from the `dayjs` library, which is likely used for working with dates and times in the project.", - "checksum": "27d1bcf5f73fe2072a520118e3043375" -} \ No newline at end of file diff --git a/.autodoc/docs/json/app/types/reservoir.d.json b/.autodoc/docs/json/app/types/reservoir.d.json deleted file mode 100644 index ad1f30295..000000000 --- a/.autodoc/docs/json/app/types/reservoir.d.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "reservoir.d.ts", - "filePath": "app/types/reservoir.d.ts", - "url": "zoo-labs/zoo/blob/master/app/types/reservoir.d.ts", - "summary": "The code defines a type called `ArrayItemTypes` which takes in a generic type `T` that extends an array of any type. The type `infer` is used to extract the type of the array elements and assign it to the type variable `U`. The conditional type `T extends (infer U)[] ? U : never` checks if `T` is an array and if so, returns the type `U` (i.e., the type of the array elements). If `T` is not an array, it returns `never`. \n\nThis type can be useful in a larger project where there is a need to extract the type of elements from an array. For example, consider a function that takes in an array of numbers and returns the sum of the elements. Instead of explicitly defining the type of the array elements as `number`, the `ArrayItemTypes` type can be used to extract the type of the elements dynamically. \n\n```typescript\nfunction sumArrayCheck out our latest products!
\n\t\n\tScientific Name: Elephas Maximus Sumatranus
\nSumatran elephants feed on a variety of plants and deposit seeds wherever they go, contributing to a healthy forest ecosystem. They also share their lush forest habitat with other endangered species.
\n` tag. The \"desc\" property is used to display a brief description of the animal in another `
` tag. By using the data from the JSON object, the webpage can provide valuable information about endangered animals to users.", - "questions": "1. What is the purpose of this code?\n- This code defines a list of animals in a zoo, along with their images and descriptions.\n\n2. What information is included in the animal descriptions?\n- The animal descriptions include the scientific name of the species, as well as information about their habitat, diet, and conservation status.\n\n3. Are there any other types of data that could be included for each animal?\n- Depending on the needs of the project, additional data such as the animal's lifespan, behavior, or physical characteristics could be included for each animal.", - "checksum": "7b13de114d26de8f615b01ae9cebcdfa" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/animation/index.json b/.autodoc/docs/json/core/src/animation/index.json deleted file mode 100644 index 84af70a94..000000000 --- a/.autodoc/docs/json/core/src/animation/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "index.tsx", - "filePath": "core/src/animation/index.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/animation/index.tsx", - "summary": "This code is a collection of functions that use the GreenSock Animation Platform (GSAP) library to create various fade-in animations triggered by scrolling. The `import` statements at the beginning of the file bring in the necessary modules from the GSAP library, including the `ScrollTrigger` plugin. The `registerPlugin` method is then called to register the `ScrollTrigger` plugin with GSAP.\n\nThe `fadeInOnScroll` function takes an HTML element as a parameter and returns a GSAP animation that fades in the element when it enters the viewport during scrolling. The `duration` parameter sets the length of the animation, and the `y` parameter determines the distance the element moves vertically as it fades in. The `scrollTrigger` object specifies the trigger element, the point at which the animation should start (`start: \"top 90%\"`), and the toggle actions that should occur when the element enters and leaves the viewport.\n\nThe `fadeInFromRight` and `fadeInFromLeft` functions are similar to `fadeInOnScroll`, but they animate the element sliding in from the right or left side of the screen, respectively. The `x` parameter determines the distance the element moves horizontally as it fades in.\n\nThe `fadeInFromRightFast` and `fadeInFromLeftFast` functions are similar to their non-\"Fast\" counterparts, but they have shorter animation durations and use a different easing function (`Power4.easeInOut`) for a snappier animation.\n\nThe `fadeInOnScrollAndStagger` function is similar to `fadeInOnScroll`, but it also applies a stagger effect to the animation, causing the elements to fade in one after another with a slight delay. The `trigger` parameter specifies the element that triggers the animation, and the `end` parameter specifies the point at which the animation should end.\n\nThese functions can be used in a larger project to add visual interest and interactivity to a webpage. For example, they could be used to animate the appearance of images or text as the user scrolls down the page. Here is an example of how the `fadeInOnScroll` function could be used to fade in an HTML element with the ID \"myElement\" when it enters the viewport during scrolling:\n\n```\nimport { fadeInOnScroll } from \"zoo\";\n\nconst myElement = document.querySelector(\"#myElement\");\nfadeInOnScroll(myElement);\n```", - "questions": "1. What is the purpose of the `gsap` and `ScrollTrigger` imports?\n- The `gsap` and `ScrollTrigger` imports are used for animation and scroll-triggered animation respectively.\n\n2. What do the `fadeInFromRight`, `fadeInFromRightFast`, `fadeInFromLeft`, and `fadeInFromLeftFast` functions do?\n- These functions animate an element's opacity and position (either from the left or right) when it enters the viewport during scrolling.\n\n3. What is the purpose of the `stagger` property in the `fadeInOnScrollAndStagger` function?\n- The `stagger` property is used to apply a staggered animation effect to multiple elements, with a specified delay between each element's animation.", - "checksum": "021c556c41a5a4153328312e4e01bf74" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/animation/loading-circle.json b/.autodoc/docs/json/core/src/animation/loading-circle.json deleted file mode 100644 index c7f150bdd..000000000 --- a/.autodoc/docs/json/core/src/animation/loading-circle.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "loading-circle.json", - "filePath": "core/src/animation/loading-circle.json", - "url": "zoo-labs/zoo/blob/master/core/src/animation/loading-circle.json", - "summary": "The code is a JSON file that defines an animation project called \"347-loader-18\". The project has a single composition called \"Watermark\" that contains two layers. The first layer is an empty layer called \"comp_0\" that has no content. The second layer is a shape layer called \"Shape Layer 9\" that contains an animated ellipse with a stroke and fill. \n\nThe stroke and fill colors of the ellipse are controlled by two color effects called \"Primary\" and \"Secondary\" respectively. These effects are linked to color controls that can be adjusted to change the colors of the ellipse. The stroke width of the ellipse is controlled by a slider effect called \"Stroke\". The size of the ellipse is fixed at 57x57 pixels, but its position and scale can be adjusted using the \"Axis\" and \"Scale\" effects respectively. \n\nThe purpose of this code is to define an animated loading icon that can be used in a larger project. The loading icon can be customized by adjusting the color, stroke width, position, and scale of the ellipse. The code can be imported into an animation software like Adobe After Effects to create the actual animation. \n\nHere is an example of how the color of the ellipse can be changed using the \"Primary\" effect:\n\n```\nvar primaryColor = [1, 0, 0]; // set primary color to red\nvar primaryEffect = thisComp.layer('Color & Stroke Change').effect('Primary')('Color');\nprimaryEffect.setValue(primaryColor);\n```\n\nThis code sets the primary color of the ellipse to red by getting a reference to the \"Primary\" effect and calling its `setValue()` method with an array of RGB values.", - "questions": "1. What is the purpose of this code?\n- This code appears to be defining the properties and animations for a shape layer in an Adobe After Effects project.\n\n2. What effects or controls are being applied to the shape layer?\n- The shape layer has a \"Color & Stroke Change\" effect applied to it, which includes controls for primary and secondary colors, stroke width, and scale.\n\n3. What is the significance of the \"NULL 2\" and \"NULL\" layers?\n- These layers appear to be null objects used to control the position, scale, and rotation of the shape layer. \"NULL 2\" is used to control the position and scale, while \"NULL\" is used to control the rotation.", - "checksum": "5a20ce95c492cf90aebdaf1bd881c537" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/bootstrap.json b/.autodoc/docs/json/core/src/bootstrap.json deleted file mode 100644 index 024e57bf8..000000000 --- a/.autodoc/docs/json/core/src/bootstrap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "bootstrap.ts", - "filePath": "core/src/bootstrap.ts", - "url": "zoo-labs/zoo/blob/master/core/src/bootstrap.ts", - "summary": "This code file contains a set of functions and extensions to existing classes that are used in the larger zoo project. \n\nThe first section of the code imports various dependencies, including `BigNumber` and `Fraction` from the `@ethersproject/bignumber` package, as well as `React` and `Zero` from other packages. It also imports a function called `parseUnits` from `@ethersproject/units`. \n\nThe next section of the code checks if the code is running in a browser environment and in development mode. If so, it imports and runs a package called `why-did-you-render`, which is used for debugging and optimizing React components. \n\nThe remaining code defines several extensions to the `BigNumber` and `String` classes. \n\nThe `mulDiv` function extends the `BigNumber` class and takes two arguments, `multiplier` and `divisor`, both of which are `BigNumberish` types. It returns a new `BigNumber` that is the result of multiplying the original `BigNumber` by the `multiplier` and dividing by the `divisor`. If the `divisor` is zero or negative, it returns `Zero`. \n\nThe `toFraction` function also extends the `BigNumber` class and takes an optional argument `decimals`, which defaults to 18. It returns a new `Fraction` object that represents the `BigNumber` as a fraction with the specified number of decimal places. \n\nThe `toFixed` function extends the `BigNumber` class and takes two optional arguments, `decimals` and `maxFractions`, both of which default to 18 and 8, respectively. It returns a string representation of the `BigNumber` with the specified number of decimal places and maximum number of fractions. \n\nThe `toBigNumber` function extends the `String` class and takes an argument `decimals`. It attempts to parse the string as a `BigNumber` with the specified number of decimal places using the `parseUnits` function. If parsing fails, it returns `BigNumber.from(0)`.\n\nThese extensions to the `BigNumber` and `String` classes provide additional functionality that is used throughout the zoo project. For example, the `mulDiv` function is used to calculate the price of tokens in various trading pairs, while the `toFraction` and `toFixed` functions are used to format token amounts and prices for display. The `toBigNumber` function is used to convert user input from strings to `BigNumber` objects.", - "questions": "1. What is the purpose of the `Fraction` entity and how is it used in this code?\n - The `Fraction` entity is imported from `./entities/Fraction` and is used to convert a `BigNumber` to a fraction with a specified number of decimals.\n2. What is the significance of the `mulDiv` function added to the `BigNumber` prototype?\n - The `mulDiv` function multiplies a `BigNumber` by a multiplier and divides it by a divisor, returning the result as a `BigNumber`. If the divisor is zero or negative, it returns `Zero`.\n3. Why is the `whyDidYouRender` library being used in this code, and what options are being passed to it?\n - The `whyDidYouRender` library is being used to track unnecessary re-renders in development mode. The options being passed to it include tracking all pure components, tracking hooks, logging owner reasons, and collapsing groups.", - "checksum": "e44cde837bcad5d2e85ea53ad4aa9b00" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/components/AccountDetails/Copy.json b/.autodoc/docs/json/core/src/components/AccountDetails/Copy.json deleted file mode 100644 index 7da2d4763..000000000 --- a/.autodoc/docs/json/core/src/components/AccountDetails/Copy.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "Copy.tsx", - "filePath": "core/src/components/AccountDetails/Copy.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Copy.tsx", - "summary": "The `CopyHelper` component is a reusable React component that provides a UI for copying text to the clipboard. It is designed to be used in other parts of the `zoo` project where copying text is required. \n\nThe component imports two icons from the `@heroicons/react/outline` package: `CheckCircleIcon` and `ClipboardCopyIcon`. It also imports the `useCopyClipboard` hook from a custom `useCopyClipboard` module, the `classNames` function from a custom `functions` module, and the `Typography` component from a custom `Typography` module. Additionally, it imports the `useLingui` hook and `t` function from the `@lingui/react` and `@lingui/macro` packages respectively.\n\nThe `CopyHelper` component takes three props: `className`, `toCopy`, and `children`. `className` is an optional string that can be used to add additional CSS classes to the component. `toCopy` is a required string that represents the text to be copied to the clipboard. `children` is an optional prop that can be used to pass in additional React components to be rendered alongside the copy icon.\n\nThe component uses the `useCopyClipboard` hook to manage the state of whether or not the text has been copied to the clipboard. It also uses the `useLingui` hook to provide internationalization support for the \"Copied\" text that is displayed when the text is successfully copied.\n\nThe component renders a `div` element with a `classNames` function that combines the default classes with any additional classes passed in via the `className` prop. The `onClick` event is set to call the `setCopied` function with the `toCopy` prop as an argument when the component is clicked.\n\nIf the text has been successfully copied, the component renders a `div` element with the \"Copied\" text and a `CheckCircleIcon`. If the text has not been copied, the component renders a `div` element with any additional components passed in via the `children` prop and a `ClipboardCopyIcon`.\n\nOverall, the `CopyHelper` component provides a simple and reusable UI for copying text to the clipboard, with support for internationalization and customization via the `className` and `children` props. An example usage of this component would be in a form where a user needs to copy a generated code or URL to the clipboard.", - "questions": "1. What does this code do?\n - This code exports a React component called `CopyHelper` that provides a UI for copying text to the clipboard and displaying a success message upon successful copy.\n\n2. What dependencies does this code rely on?\n - This code relies on several external dependencies, including `@heroicons/react/outline`, `react`, `useCopyClipboard`, `../../functions`, `../Typography`, `@lingui/react`, and `@lingui/macro`.\n\n3. What props does the `CopyHelper` component accept?\n - The `CopyHelper` component accepts three props: `className` (optional), `toCopy` (required), and `children` (optional). The `toCopy` prop specifies the text to be copied to the clipboard, and the `children` prop is used to render any additional content alongside the copy icon.", - "checksum": "953b534a454250ff1f907499611adad6" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/components/AccountDetails/Transaction.json b/.autodoc/docs/json/core/src/components/AccountDetails/Transaction.json deleted file mode 100644 index bb104a68c..000000000 --- a/.autodoc/docs/json/core/src/components/AccountDetails/Transaction.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "Transaction.tsx", - "filePath": "core/src/components/AccountDetails/Transaction.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Transaction.tsx", - "summary": "The `Transaction` component is a React functional component that displays information about a transaction on the Ethereum blockchain. It imports several dependencies from various packages, including `@zoolabs/zdk`, `@heroicons/react/outline`, and `@lingui/react`. \n\nThe component takes a single prop, `hash`, which is the hash of the transaction to display. It then uses several hooks to retrieve information about the transaction from the Redux store, including `useActiveWeb3React` and `useAllTransactions`. \n\nThe component then renders a div that displays the transaction summary and status. The summary is either the transaction hash or a user-defined summary if one exists. The status is displayed as an icon, with different icons representing pending, successful, cancelled, or failed transactions. \n\nIf the transaction was submitted using the Archer network, additional information is displayed, including the nonce and tip amount. If the transaction is pending, the component also displays a countdown timer indicating how long until the transaction expires. If the transaction has expired, the component displays an \"Expired\" message. \n\nFinally, if the transaction is pending, the component allows the user to cancel the transaction by clicking a \"Cancel\" button. This sends a request to the Archer network to cancel the transaction, and updates the transaction status in the Redux store. \n\nThis component is likely used in other parts of the project to display information about transactions, such as in a transaction history or on a confirmation page after submitting a transaction.", - "questions": "1. What is the purpose of the `Transaction` component?\n- The `Transaction` component is used to display information about a transaction, including its status, summary, and deadline.\n\n2. What is the `calculateSecondsUntilDeadline` function used for?\n- The `calculateSecondsUntilDeadline` function is used to calculate the number of seconds until a transaction's deadline, which is used to determine whether the transaction has expired.\n\n3. What is the `cancelPending` function used for?\n- The `cancelPending` function is used to cancel a pending transaction by sending a request to the Archer Relay API with the transaction's raw data and authorization headers. If the cancellation is successful, the transaction is marked as cancelled in the application state.", - "checksum": "29f122a65361e82e621569001f722ba0" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/components/AccountDetails/index.json b/.autodoc/docs/json/core/src/components/AccountDetails/index.json deleted file mode 100644 index 3d8971f58..000000000 --- a/.autodoc/docs/json/core/src/components/AccountDetails/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "index.tsx", - "filePath": "core/src/components/AccountDetails/index.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/components/AccountDetails/index.tsx", - "summary": "The code is a React component that renders the account details of a user's wallet. It imports various dependencies such as React, Image, and Button from different modules. It also imports some functions and constants from other files such as `getExplorerLink` and `SUPPORTED_WALLETS`. \n\nThe component takes in several props such as `toggleWalletModal`, `pendingTransactions`, `confirmedTransactions`, `ENSName`, and `openOptions`. It then uses these props to render the account details of the user's wallet. \n\nThe component first uses the `useActiveWeb3React` hook to get the current chain ID, account, and connector of the user's wallet. It then uses the `useSelector` hook to get the user's ZOO balance from the Redux store. \n\nThe component then defines several functions such as `formatConnectorName` and `getStatusIcon` that are used to format and display the user's wallet connector and status icon. \n\nThe component then renders the user's account details such as their wallet address, balance, and recent transactions. It also provides buttons to disconnect the wallet, change the wallet, view the wallet on an explorer, and copy the wallet address. \n\nThe component also defines a `WalletIcon` component that renders the icon of the user's wallet connector. It also defines a `renderTransactions` function that renders the user's recent transactions. \n\nOverall, this component is an important part of the larger project as it provides users with a way to view and manage their wallet details and transactions. It can be used in various parts of the project such as the wallet modal and the dashboard. \n\nExample usage:\n\n```jsx\nimport AccountDetails from \"./components/AccountDetails\";\n\nfunction App() {\n return (\n
This is my page content.
\nSome text goes here.
\n \n{isZooSelected ? 'ZOO' : 'BNB'} selected
\nThis is the content of the expert mode panel.
\nCurrent gas price:
Check out our social media pages for the latest updates.
\nModal content goes here
\n \n{building.address}
\nThis is the main content of my website.
\nModal content goes here.
\nThis is the content of the modal.
\nThis is some text inside the paper element.
\nYou entered: {percentValue}%
\n{data.description}
\nCurrent value:
\n{diet}
\nFrom | \nTo | \nValue | \nDate | \nTransaction Hash | \n
---|
Name | \nHabitat | \n
---|---|
Lion | \nAfrica | \n
Panda | \nAsia | \n
A new version of the app is available!
\nThis is some text that will be styled differently in dark mode.
\nHover over this text to see a tooltip!
\nWallet connected
\n ) : (\n \n )}\nThis page displays analytics for the SushiSwap Liquidity Pair (SLP).
\nThis is where you can view all your analytics data.
\nPrice Impact:
\n | \n \n | \n \n | \n
---|---|---|
{item.name} | \n{item.age} | \n{item.date} | \n
Pending rewards: {pendingRewards}
\nThis is the production environment.
\n ) : (\nThis is not the production environment.
\n )}\nImmediate: {data.immediate}
\nRapid: {data.rapid}
\nFast: {data.fast}
\nStandard: {data.standard}
\nSlow: {data.slow}
\nSlower: {data.slower}
\nSlowest: {data.slowest}
\nDebounced value: {debouncedValue}
\nYou are using an Argent wallet!
:You are not using an Argent wallet.
}\nLast valid input: {lastValidInput}
\nLast selected option: {lastSelectedOption}
\nSmall screen
}\n {isMedium &&Medium screen
}\n {isLarge &&Large screen
}\nApproval state: {approvalState}
\n \n \n \nToken 1: {poolData.token0}
\nToken 2: {poolData.token1}
\nReserves: {poolData.reserves.toString()}
\nTotal supply: {poolData.totalSupply.toString()}
\nCurrent count: {count}
\nPrevious count: {prevCount}
\n \nrequestSort('name')}>\n Name {sortConfig && sortConfig.key === 'name' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>}\n | \nrequestSort('age')}>\n Age {sortConfig && sortConfig.key === 'age' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>}\n | \n
---|---|
{item.name} | \n{item.age} | \n
Current allowance: {allowance}
\n \n \n \nHello World!
}\nCurrent allowance: {allowance?.toSignificant(4)}
\nThere are pending transactions. Please wait...
\n ) : (\n \n )}\nWindow width: {width}
\nWindow height: {height}
\nThis is some content for my page.
\nExplore our collection of exotic animals.
\n \n );\n};\n\nexport default HomePage;\n```", - "questions": "1. What is the purpose of the `Layout` component?\n- The `Layout` component is responsible for rendering the main layout of the application, including the header, main content, popups, and footer.\n\n2. What is the significance of the `useEffect` hook in this code?\n- The `useEffect` hook is used to update the gas price in the network state whenever the `library` object changes. \n\n3. What is the purpose of the `bg` prop in the `Layout` component?\n- The `bg` prop is used to set the background color of the main content area, with a default value of black.", - "checksum": "ea4c38392f5f29d90720a3c5cc3ca400" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/layouts/Drop/index.json b/.autodoc/docs/json/core/src/layouts/Drop/index.json deleted file mode 100644 index d76c97570..000000000 --- a/.autodoc/docs/json/core/src/layouts/Drop/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "index.tsx", - "filePath": "core/src/layouts/Drop/index.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/layouts/Drop/index.tsx", - "summary": "This code defines a React component called `DropLayout` that is used to render a layout for a specific page in the larger project. The component imports several other components from the project's `components` directory, including `Footer`, `Header`, `Main`, and `Popups`. It also imports a custom hook called `useActiveWeb3React` and an action creator function called `updateGasPrice` from the project's `hooks` and `state/network/actions` directories, respectively.\n\nThe `DropLayout` component takes three props: `children`, `banner`, and `isMarginTop`. The `children` prop is used to render any child components that are passed to `DropLayout`. The `banner` prop is an optional prop that can be used to specify a banner image for the page. The `isMarginTop` prop is a boolean that determines whether or not to add a top margin to the `Main` component.\n\nThe `useEffect` hook is used to call the `updateGasPrice` function whenever the `library` object (which is obtained from the `useActiveWeb3React` hook) changes. This function is responsible for updating the gas price used for transactions on the Ethereum network.\n\nThe `return` statement renders the layout for the page. It consists of a `div` element that contains the `Header`, `Main`, `Popups`, and `Footer` components. The `Header` component is rendered with a transparent background and the `banner` prop (if provided). The `Main` component is rendered with a background color of \"bg-drop\" and the `children` prop. The `Popups` component is used to render any popups that may appear on the page. Finally, the `Footer` component is rendered at the bottom of the page.\n\nThis component can be used in the larger project to provide a consistent layout for pages that require a banner image, a specific background color, and a fixed set of components (i.e. `Header`, `Main`, `Popups`, and `Footer`). Developers can use this component by importing it and passing any necessary props to it. For example:\n\n```\nimport DropLayout from \"./DropLayout\";\n\nfunction MyPage() {\n return (\nThis is some content for my page.
\nThis is some content.
\n \n );\n}\n```", - "questions": "1. What is the purpose of the `Layout` component?\n- The `Layout` component is responsible for rendering the overall layout of the application, including the header, main content, and footer.\n\n2. What are the optional props that can be passed to the `Layout` component?\n- The `Layout` component accepts three optional props: `left`, `children`, and `right`. `left` and `right` are JSX elements that will be rendered in the left and right columns of the layout, respectively. `children` is a React child or an array of React children that will be rendered in the main content area.\n\n3. What is the purpose of the `useRouter` hook from the `next/router` module?\n- The `useRouter` hook is used to access the Next.js router object, which provides information about the current route and allows for programmatic navigation. In this code, it is used to determine the current route and apply appropriate styling to the navigation links.", - "checksum": "0402e4e701f93c8eec736e763e76c5cf" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/layouts/Miso/index.json b/.autodoc/docs/json/core/src/layouts/Miso/index.json deleted file mode 100644 index bd9533e86..000000000 --- a/.autodoc/docs/json/core/src/layouts/Miso/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "index.tsx", - "filePath": "core/src/layouts/Miso/index.tsx", - "url": "zoo-labs/zoo/blob/master/core/src/layouts/Miso/index.tsx", - "summary": "The code above defines a React component called `Layout` that is used to render the layout of a web page. The component imports three other components: `Footer`, `Header`, and `Popups`. These components are located in the `components` directory of the `zoo` project, which suggests that this `Layout` component is part of a larger web application.\n\nThe `Layout` component takes a single prop called `children`, which is used to render the content of the web page. The `children` prop is enclosed in empty tags (`<>...>`) to allow for the rendering of multiple child components.\n\nThe `Layout` component returns a `div` element that has a class of `z-0` and is styled to be a flex container with a column direction (`flex-col`). The `div` element takes up the full width and height of the screen and has both horizontal and vertical scrolling enabled. \n\nInside the `div` element, there are four child components: `Header`, `main`, `Popups`, and `Footer`. The `Header` component is rendered with a prop called `banner` set to `false`, which suggests that the `Header` component may have a banner that can be toggled on or off. The `main` component is a flex container that takes up the remaining space in the `div` element and is styled to grow to the maximum height of its content. The `Popups` component is used to render any popups that may appear on the web page, and the `Footer` component is used to render the footer of the web page.\n\nOverall, the `Layout` component is a reusable component that can be used to render the layout of any web page in the `zoo` project. It provides a consistent layout across all pages and allows for the easy rendering of child components. Here is an example of how the `Layout` component can be used:\n\n```\nimport Layout from \"./Layout\";\nimport HomePage from \"./HomePage\";\n\nconst App = () => {\n return (\nThis is the content of my modal window.
\nCurrent bid: 1 ETH
\n \n {showModal &&Index | \nName | \nFloor Price | \n24h Volume | \n
---|---|---|---|
Here you can buy and sell unique digital assets.
\nPlease wait while we process your payment...
\nSelected currency: {selectedCurrency ? selectedCurrency.symbol : 'None'}
\n {/* rest of payment form */}\nRank | \nColumn A | \nColumn B | \nColumn C | \nColumn D | \nColumn E | \n
---|
Column A | \nColumn B | \nColumn C | \nColumn D | \nActions | \n
---|
Name | \nAge | \n\n | \n
---|
{metadata.description}
\n Visit Zoo\n >\n )\n}\n\nexport async function getStaticProps() {\n const res = await fetch('/api/metadata')\n const metadata = await res.json()\n return {\n props: {\n metadata\n }\n }\n}\n\nexport default ZooPage\n```\n\nIn this example, the ZooPage component fetches the metadata from the /api/metadata API route and uses it to populate the page's title, description, and Open Graph tags. The metadata is also used to display the project's name and description on the page, as well as to provide a link to the project's external URL.", - "questions": "1. What is the purpose of the `withSentry` function imported from `@sentry/nextjs`?\n - The `withSentry` function is likely used to add Sentry error tracking to the `handler` function.\n\n2. What is the purpose of the commented out code related to `req.query.type` and the switch statement?\n - It is unclear without more context, but it appears that the code may have been used to handle different types of requests based on the `type` parameter in the query string.\n\n3. What is the expected output of the `handler` function?\n - The `handler` function is expected to respond to requests with a JSON object containing metadata about the project, including a name, description, and potentially other properties.", - "checksum": "7c0ce28f16c50e411d50ea0aa9501082" -} \ No newline at end of file diff --git a/.autodoc/docs/json/core/src/pages/api/moonpay.json b/.autodoc/docs/json/core/src/pages/api/moonpay.json deleted file mode 100644 index 3220e57a7..000000000 --- a/.autodoc/docs/json/core/src/pages/api/moonpay.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "moonpay.ts", - "filePath": "core/src/pages/api/moonpay.ts", - "url": "zoo-labs/zoo/blob/master/core/src/pages/api/moonpay.ts", - "summary": "This code defines an API route for the Next.js project that returns an HTML iframe containing a MoonPay button. The MoonPay button is imported from a component called `MoonpayBtn` and is rendered within the `MonComp` string. The `allow` attribute of the iframe specifies the permissions required for the iframe to function properly, including accelerometer, autoplay, camera, gyroscope, and payment. The `src` attribute of the iframe specifies the URL of the MoonPay sandbox environment, along with an API key and a currency code. \n\nWhen a request is made to this API route, the `moonpay` function is executed. The function extracts the `address` property from the request body and uses it to construct the `MonComp` string. The function then sends the `MonComp` string as the response to the request. \n\nThis code can be used in the larger project to provide a way for users to purchase cryptocurrency using MoonPay. The `MoonpayBtn` component can be customized to fit the design of the project, and the `moonpay` API route can be integrated into the project's payment flow. For example, a user could click on a \"Buy Crypto\" button in the project's UI, which would trigger a request to the `moonpay` API route. The `moonpay` function would then return the HTML iframe containing the MoonPay button, which the user could interact with to complete the purchase. \n\nExample usage:\n\n```javascript\nimport MoonpayBtn from \"components/Moonpaybtn/MoonpayBtn\";\n\nfunction BuyCrypto() {\n const handlePurchase = async () => {\n const response = await fetch(\"/api/moonpay\", {\n method: \"POST\",\n body: JSON.stringify({ address: \"0x123abc\" }),\n });\n const html = await response.text();\n document.getElementById(\"moonpay-container\").innerHTML = html;\n };\n\n return (\nYou do not have access to this section.
}\nCheck back soon for updates!
\nLearn more about our project by reading our white paper.
\nCurrent price: {barData?.price}
\nHistorical prices:
\nLoading...
;\n if (error) returnError :(
;\n\n const { bar } = data;\n\n return (\nTotal Supply: {bar.totalSupply}
\nRatio: {bar.ratio}
\nxSushi Minted: {bar.xSushiMinted}
\nxSushi Burned: {bar.xSushiBurned}
\nSushi Staked: {bar.sushiStaked}
\nSushi Staked USD: {bar.sushiStakedUSD}
\nSushi Harvested: {bar.sushiHarvested}
\nSushi Harvested USD: {bar.sushiHarvestedUSD}
\nxSushi Age: {bar.xSushiAge}
\nxSushi Age Destroyed: {bar.xSushiAgeDestroyed}
\nLoading...
;\n if (error) returnError :(
;\n\n return (\nPool ID: {pool.id}
\nPair: {pool.pair}
\nAllocation Point: {pool.allocPoint}
\nSLP Balance: {pool.slpBalance}
\nLoading...
;\n if (error) returnError :(
;\n\n return (\nPool ID: {pool.id}
\nAssets: {pool.pair}
\nAllocation: {pool.allocPoint}
\nBalance: {pool.balance}
\nCurrent gas price: {gasPrice}
\n handleGasPriceChange(Number(e.target.value))} />\nWelcome to the Zoo!
\n...
\nLoaded!
}\n{bid ? `Current bid: ${bid.amount}` : \"No bids yet\"}
\n \n {isModalOpen && (\nToken ID: {tokenId}
\nAmount: {amount}
\nThis is a great app that does amazing things.
\n \n\n```\n\nIn this example, the `link` element with `rel=\"manifest\"` specifies the location of the metadata file, and the `link` element with `rel=\"icon\"` specifies the location of a favicon that can be used to represent the application in the browser's UI. \n\nOverall, this code is an important part of a web application's infrastructure, as it provides information that can be used to optimize the user experience and make the application more accessible and user-friendly.", - "questions": "1. What is the purpose of this code?\n This code is a JSON file that defines the name, icons, theme color, background color, and display settings for a web application.\n\n2. What are the dimensions of the icons?\n The icons have two different sizes: 192x192 and 512x512.\n\n3. What does the \"display\" property mean?\n The \"display\" property is set to \"standalone\", which means that the web application should be launched in a standalone mode, without any browser UI elements.", - "checksum": "026fb70eda306d2efab048bf1363d02c" -} \ No newline at end of file diff --git a/.autodoc/docs/json/foundation/public/robots.json b/.autodoc/docs/json/foundation/public/robots.json deleted file mode 100644 index 4cb2dae56..000000000 --- a/.autodoc/docs/json/foundation/public/robots.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "robots.txt", - "filePath": "foundation/public/robots.txt", - "url": "zoo-labs/zoo/blob/master/foundation/public/robots.txt", - "summary": "This code is a robots.txt file that is used to communicate with web crawlers or robots that visit a website. The purpose of this file is to provide instructions to these robots on which pages or sections of the website they are allowed to access and index. \n\nThe first line of the code, \"User-agent: *\", specifies that the following instructions apply to all robots that visit the website. The next line, \"Allow: /\", allows all robots to access all pages and sections of the website. \n\nThe following lines specify the host and sitemap of the website. The \"Host\" line specifies the URL of the website that the robots should visit. The \"Sitemap\" line specifies the location of the sitemap file, which contains a list of all the pages on the website that the robots should index. \n\nThis code is important for search engine optimization (SEO) as it helps ensure that the website is properly indexed by search engines. By providing clear instructions to robots on which pages to index, the website can improve its search engine rankings and visibility. \n\nAn example of how this code may be used in the larger project is if the zoo website has multiple sections or pages that are not meant to be indexed by search engines, such as administrative pages or pages with sensitive information. The robots.txt file can be used to block these pages from being indexed, ensuring that they remain private and secure. \n\nOverall, the robots.txt file is a crucial component of any website's SEO strategy, and this code provides clear instructions to robots on how to properly index the zoo website.", - "questions": "1. **What is the purpose of this code?**\\\nA smart developer might wonder what this code is for and how it fits into the overall project. Based on the content, it appears to be a robots.txt file that specifies which pages of the website can be crawled by search engines.\n\n2. **What does the \"User-agent\" and \"Allow\" directives mean?**\\\nA smart developer might be curious about the meaning of the \"User-agent\" and \"Allow\" directives in the code. The \"User-agent\" directive specifies which search engine robots are allowed to access the site, while the \"Allow\" directive specifies which pages or directories are allowed to be crawled.\n\n3. **Why is the \"Host\" and \"Sitemap\" specified in the code?**\\\nA smart developer might question why the \"Host\" and \"Sitemap\" are specified in the code. The \"Host\" directive specifies the domain name of the website, while the \"Sitemap\" directive specifies the location of the sitemap file that contains a list of all the pages on the website. This information is useful for search engines to properly index the site.", - "checksum": "f9b9239bf9955cc5f58709d2c00d3418" -} \ No newline at end of file diff --git a/.autodoc/docs/json/foundation/public/sitemap-0.json b/.autodoc/docs/json/foundation/public/sitemap-0.json deleted file mode 100644 index c83659a42..000000000 --- a/.autodoc/docs/json/foundation/public/sitemap-0.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "sitemap-0.xml", - "filePath": "foundation/public/sitemap-0.xml", - "url": "zoo-labs/zoo/blob/master/foundation/public/sitemap-0.xml", - "summary": "This code is an XML sitemap file that provides information about the URLs of a website to search engines. The sitemap is a list of URLs that are organized in a specific format to help search engines crawl and index the website more efficiently. \n\nThe file starts with an XML declaration that specifies the version and encoding of the document. The root element of the document is `urlset`, which is defined by the `http://www.sitemaps.org/schemas/sitemap/0.9` namespace. The `urlset` element contains a list of `url` elements, each of which represents a URL on the website. \n\nEach `url` element contains a `loc` element that specifies the URL of the page, a `changefreq` element that indicates how frequently the page is likely to change, a `priority` element that indicates the relative priority of the page compared to other pages on the site, and a `lastmod` element that specifies the date and time the page was last modified. \n\nThis sitemap file can be used by search engines to discover and index the pages on the website more efficiently. It can also be used by website owners to monitor the crawling and indexing of their site. \n\nFor example, a website owner can submit the sitemap file to Google Search Console to monitor the indexing status of their site. They can also use the sitemap to identify any crawl errors or indexing issues that may be preventing their site from appearing in search results. \n\nOverall, this sitemap file is an important component of a website's SEO strategy, as it helps search engines discover and index the pages on the site more efficiently.", - "questions": "1. What is the purpose of this code?\n \n This code is an XML sitemap that lists the URLs of various pages on the website `https://tsnext-tw.thcl.dev` along with some metadata such as the last modification date and priority.\n\n2. What is the significance of the `changefreq`, `priority`, and `lastmod` elements?\n \n The `changefreq` element indicates how frequently the page is likely to change, the `priority` element indicates the relative importance of the page compared to other pages on the site, and the `lastmod` element indicates the date and time when the page was last modified.\n\n3. Is there any reason why some URLs have additional path components (e.g. `/animals/Carousel`) while others do not?\n \n It's possible that the additional path components correspond to different sections or categories of the website, but without more context it's difficult to say for sure.", - "checksum": "86fe2f0c85b136c94e79af6331c78fcc" -} \ No newline at end of file diff --git a/.autodoc/docs/json/foundation/public/sitemap.json b/.autodoc/docs/json/foundation/public/sitemap.json deleted file mode 100644 index d0bcf0e7e..000000000 --- a/.autodoc/docs/json/foundation/public/sitemap.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "sitemap.xml", - "filePath": "foundation/public/sitemap.xml", - "url": "zoo-labs/zoo/blob/master/foundation/public/sitemap.xml", - "summary": "This code is an XML file that contains a sitemap index for a website. The sitemap index is a list of all the sitemaps for the website, which are XML files that contain information about the website's pages and how they are organized. \n\nThe XML file starts with a declaration that specifies the version of XML being used and the character encoding. The sitemap index is then defined using the \"sitemapindex\" tag, which is part of the sitemap schema. The schema defines the structure and elements that can be used in a sitemap or sitemap index.\n\nWithin the sitemap index, there is a single sitemap defined using the \"sitemap\" tag. The \"loc\" element within the sitemap tag specifies the URL of the sitemap file. In this case, the URL is \"https://tsnext-tw.thcl.dev/sitemap-0.xml\". \n\nThis code is important for search engine optimization (SEO) because it helps search engines like Google understand the structure of the website and how its pages are organized. By providing a sitemap index, the website owner can ensure that all of their pages are being indexed by search engines and that the search engines are able to find the most important pages on the site. \n\nIn the larger project, this code would be used in conjunction with other sitemap files to provide a comprehensive list of all the pages on the website. The sitemap files would be generated automatically by a tool or plugin that crawls the website and extracts information about each page. The sitemap index would then be submitted to search engines like Google using the Google Search Console, which would help the website get indexed more quickly and accurately. \n\nExample usage:\n\n```xml\n\nCheck out our latest fundraising campaign:
\nLearn about our mission and subscribe to our newsletter:
\n{animal.description}
\n \n >\n );\n}\n```", - "questions": "1. What is the purpose of this code?\n \n This code defines a React component called `Seo` that generates meta tags for search engine optimization (SEO) and social media sharing. It uses default values for the meta tags, but allows for customization through props.\n\n2. What is the `defaultMeta` object and what does it contain?\n \n `defaultMeta` is an object that contains default values for the meta tags generated by the `Seo` component. It includes values for the page title, site name, description, URL, image, and other properties related to SEO and social media sharing.\n\n3. What is the purpose of the `favicons` array?\n \n The `favicons` array contains a list of links to various favicon images used by the website. These images are used to represent the website in browser tabs, bookmarks, and other places where a small icon is needed. The array includes links to images of different sizes and formats to ensure compatibility with different devices and browsers.", - "checksum": "3a287c586a6e27777a4595618e2e44a8" -} \ No newline at end of file diff --git a/.autodoc/docs/json/foundation/src/components/Skeleton.json b/.autodoc/docs/json/foundation/src/components/Skeleton.json deleted file mode 100644 index 8164acc59..000000000 --- a/.autodoc/docs/json/foundation/src/components/Skeleton.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "Skeleton.tsx", - "filePath": "foundation/src/components/Skeleton.tsx", - "url": "zoo-labs/zoo/blob/master/foundation/src/components/Skeleton.tsx", - "summary": "This code defines a React component called `Skeleton` that renders a rectangular box with a shimmering effect. The purpose of this component is to provide a visual placeholder for content that is being loaded asynchronously, so that the user knows that something is happening and doesn't get confused by a blank screen.\n\nThe component takes in a `className` prop, which can be used to add additional CSS classes to the component, and any other props that would normally be passed to a `div` element. The `className` prop is passed to a utility function called `clsxm`, which concatenates the classes together with a space separator. This allows the user to easily add their own custom styles to the component.\n\nThe component renders a `div` element with a background image that consists of a linear gradient that goes from a light gray color to a slightly darker gray color and back to the light gray color. This creates the shimmering effect, as the background appears to move from left to right. The `backgroundSize` property is set to `700px 100%` to ensure that the gradient covers the entire width of the component, and the `backgroundRepeat` property is set to `no-repeat` to prevent the gradient from repeating.\n\nOverall, this component is a simple but effective way to provide visual feedback to the user while content is being loaded. It can be used in a variety of contexts, such as when fetching data from an API or when rendering a complex UI that takes a while to load. Here is an example of how the `Skeleton` component could be used in a React application:\n\n```jsx\nimport React, { useState, useEffect } from 'react';\nimport Skeleton from './Skeleton';\n\nfunction App() {\n const [isLoading, setIsLoading] = useState(true);\n const [data, setData] = useState([]);\n\n useEffect(() => {\n fetch('https://api.example.com/data')\n .then(response => response.json())\n .then(data => {\n setData(data);\n setIsLoading(false);\n });\n }, []);\n\n return (\nThis is my component.
\nCheck out our
Welcome to the homepage!
\nMy content
\".", - "questions": "1. What is the purpose of this code?\n - This code defines a React component called `Content` that takes in a `title` and `content` as props and returns a styled div with the `title` displayed in a large font and the `content` displayed in a smaller font with HTML formatting.\n\n2. What styling classes are being used in this code?\n - The code uses several Tailwind CSS classes for styling, including `bg-black`, `md:px-64`, `max-md:flex-col`, `max-md:px-4`, `py-20`, `relative`, `md:w-1/2`, `max-md:w-full`, `md:pr-32`, `max-md:pb-8`, `text-white`, `text-4xl`, `w-1/2`, `flex`, `justify-between`, `space-x-16`, `flex-1`, `text-xl`, and `md:columns-2`.\n\n3. What is the purpose of the `dangerouslySetInnerHTML` prop?\n - The `dangerouslySetInnerHTML` prop is used to render the `content` prop as HTML, which allows for the use of HTML tags and formatting within the `content` string. However, it is important to note that using this prop can pose a security risk if the `content` string is not properly sanitized.", - "checksum": "b0c5d51f97ec0aeb46a7712cd02deecd" -} \ No newline at end of file diff --git a/.autodoc/docs/json/foundation/src/pages/animals/Header.json b/.autodoc/docs/json/foundation/src/pages/animals/Header.json deleted file mode 100644 index 1b4332445..000000000 --- a/.autodoc/docs/json/foundation/src/pages/animals/Header.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "Header.tsx", - "filePath": "foundation/src/pages/animals/Header.tsx", - "url": "zoo-labs/zoo/blob/master/foundation/src/pages/animals/Header.tsx", - "summary": "The `Header` function in this code file is a React component that renders a header section for a website. The header includes an image that flips when clicked, a title, a description, and two links for purchasing and adding items to a cart. The header also includes a navigation bar for mobile devices that displays links to different animal pages.\n\nThe `useState` hook is used to create a state variable `flip` that is initially set to `false`. This variable is used to determine whether the image should be flipped or not. When the image is clicked, the `setFlip` function is called with the opposite value of `flip`, which causes the image to flip.\n\nThe `ReactCardFlip` component is used to create a flipping effect for the image. It takes two `Image` components as children, each with a different image source. When the `isFlipped` prop is set to `true`, the second `Image` component is displayed, and when it is set to `false`, the first `Image` component is displayed.\n\nThe `Link` components are used to create two buttons for purchasing and adding items to a cart. They are styled with different colors and borders to differentiate them. The `href` prop is set to `#` for both links, indicating that they are not functional in this code file.\n\nThe navigation bar for mobile devices is created using `Link` components that link to different animal pages. The `className` prop is used to style the links with white text and a black background. The `active` class is added to the second link to indicate the current page.\n\nThis `Header` component can be used in a larger project as a reusable header section for different pages. The image, title, and description can be customized for each page, and the links can be made functional by adding appropriate URLs. The navigation bar can also be customized with different links and styles. Here is an example of how this component can be used in a larger project:\n\n```\nimport Header from './Header';\n\nfunction HomePage() {\n return (\nExplore our collection of rare and endangered animals.
\nWelcome to the Zoo Labs Foundation website!
\n\n This is the Terms of Service page for Zoo Labs Foundation. By using our website or services, you agree to the terms of this agreement. We may update this agreement from time to time, so please review it periodically to stay informed about any changes.
\n 1. Acceptance of Terms
\nBy using our website or services, you agree to the terms of this agreement. If you do not agree to these terms, you should not use our website or services.
\n2. Use of Website and Services
\nYou may use our website and services only for lawful purposes and in accordance with these terms. You agree not to use our website or services:
\n(a) In any way that violates any applicable federal, state, local, or international law or regulation.
\n(b) To engage in any conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
\n(c) To impersonate or attempt to impersonate Zoo Labs Foundation, a Zoo Labs Foundation employee, another user, or any other person or entity.
\n(d) To engage in any other conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
\n3. Intellectual Property
\nThe website and its entire contents, features, and functionality (including but not limited to all information, software, text, displays, images, video, and audio, and the design, selection, and arrangement thereof), are owned by Zoo Labs Foundation, its licensors, or other providers of such material and are protected by United States and international copyright, trademark, patent, trade secret, and other intellectual property or proprietary rights laws.
\n4. Disclaimer of Warranties
\nYOUR USE OF THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE IS AT YOUR OWN RISK. THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE ARE PROVIDED ON AN \"AS IS\" AND \"AS AVAILABLE\" BASIS, WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. NEITHER ZOO LABS FOUNDATION NOR ANY PERSON ASSOCIATED WITH ZOO LABS FOUNDATION MAKES ANY WARRANTY OR REPRESENTATION WITH RESPECT TO THE COMPLETENESS, SECURITY, RELIABILITY, QUALITY, ACCURACY, OR AVAILABILITY OF THE WEBSITE. WITHOUT LIMITING THE FOREGOING, NEITHER ZOO LABS FOUNDATION NOR ANYONE ASSOCIATED WITH ZOO LABS FOUNDATION REPRESENTS OR WARRANTS THAT THE WEBSITE, ITS CONTENT, OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL BE ACCURATE, RELIABLE, ERROR-FREE, OR UNINTERRUPTED, THAT DEFECTS WILL BE CORRECTED, THAT OUR SITE OR THE SERVER THAT MAKES IT AVAILABLE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR THAT THE WEBSITE OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL OTHERWISE MEET YOUR NEEDS OR EXPECTATIONS.
\n5. Limitation of Liability
\nIN NO EVENT WILL ZOO LABS FOUNDATION, ITS AFFILIATES, OR THEIR LICENSORS, SERVICE PROVIDERS, EMPLOYEES, AGENTS, OFFICERS, OR DIRECTORS BE LIABLE FOR DAMAGES OF ANY KIND, UNDER ANY LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH YOUR USE, OR INABILITY TO USE, THE WEBSITE, ANY WEBSITES LINKED TO IT, ANY CONTENT ON THE WEBSITE OR SUCH OTHER WEBSITES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO, PERSONAL INJURY, PAIN AND SUFFERING, EMOTIONAL DISTRESS, LOSS OF REVENUE, LOSS OF PROFITS, LOSS OF BUSINESS OR ANTICIPATED SAVINGS, LOSS OF USE, LOSS OF GOODWILL, LOSS OF DATA, AND WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE.
\n6. Indemnification
\nYou agree to defend, indemnify, and hold harmless Zoo Labs Foundation, its affiliates, licensors, and service providers, and its and their respective officers, directors, employees, contractors, agents, licensors, suppliers, successors, and assigns from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys' fees) arising out of or relating to your violation of these terms or your use of the website or services, including, but not limited to, any use of the website's content, services, and products other than as expressly authorized in these terms or your use of any information obtained from the website.
\n7. Governing Law and Jurisdiction
\nAll matters relating to the website and these terms and any dispute or claim arising therefrom or related thereto (in each case, including non-contractual disputes or claims), shall be governed by and construed in accordance with the internal laws of the State of California without giving effect to any choice or conflict of law provision or rule (whether of the State of California or any other jurisdiction). Any legal suit, action, or proceeding arising out of, or related to, these terms or the website shall be instituted exclusively in the federal courts of the United States or the courts of the State of California in each case located in the City and County of San Francisco although we retain the right to bring any suit, action, or proceeding against you for breach of these terms in your country of residence or any other relevant country. You waive any and all objections to the exercise of jurisdiction over you by such courts and to venue in such courts.
\n8. Changes to These Terms
\nWe may revise and update these terms from time to time in our sole discretion. All changes are effective immediately when we post them, and apply to all access to and use of the website thereafter. Your continued use of the website following the posting of revised terms means that you accept and agree to the changes. You are expected to check this page from time to time so you are aware of any changes, as they are binding on you.
\n9. Contact Us
\nIf you have any questions, concerns, or requests regarding these terms or our privacy practices, please contact us at:\nZoo Labs Foundation
\n\nhello@zoo.ngo
\n415-373-2496
\n\nWe will make every effort to respond to your inquiries and address any concerns as quickly as possible.
\n\n
This is some sample text.
\n \n\n```\n\nIn this example, the font file is preloaded using the `link` element with the `rel` attribute set to \"preload\". This tells the browser to fetch the font file as soon as possible, but not to block the rendering of the page. The `as` attribute is set to \"font\" to indicate that this is a font file, and the `type` attribute is set to \"font/woff2\" to specify the file type. The `crossorigin` attribute is included to allow the font file to be loaded from a different domain if necessary.\n\nOverall, this code is a small but important part of a larger project that aims to optimize the performance of a web page by reducing the number of requests made to the server. By specifying a cache control directive for the font file, the browser can store it locally and avoid requesting it from the server on subsequent page loads, resulting in faster page load times and a better user experience.", - "questions": "1. What is the purpose of this code?\n This code defines a JSON object with a single header that specifies the cache control settings for a font file.\n\n2. Where is this code used in the project?\n It is unclear where this code is used in the project without additional context.\n\n3. Are there any other headers or files that have cache control settings defined?\n It is unclear if there are any other headers or files with cache control settings defined without additional context or inspection of other files in the project.", - "checksum": "78b14238e33d0b5e0c796bf8659b7960" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/gulpfile.json b/.autodoc/docs/json/lab/gulpfile.json deleted file mode 100644 index 7d99159f4..000000000 --- a/.autodoc/docs/json/lab/gulpfile.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "gulpfile.js", - "filePath": "lab/gulpfile.js", - "url": "zoo-labs/zoo/blob/master/lab/gulpfile.js", - "summary": "This code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS using the csso plugin. The compiled CSS is then saved to the `public` directory. \n\nThe task starts by requiring the necessary dependencies: `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`. \n\nThe `gulp.task` function defines a new task called `less`. This task takes all Less files in the `src/themes` directory that end with `-theme.less` and compiles them into CSS. The `debug` function is used to log the names of the Less files being processed. \n\nThe `gulpless` function is used to compile the Less files into CSS. The `javascriptEnabled` option is set to `true` to enable JavaScript evaluation in Less files. The `less-plugin-npm-import` plugin is used to allow importing of Less files from installed npm packages using the `~` prefix. \n\nThe resulting CSS is then piped through the `postcss` function, which applies the `autoprefixer` plugin to add vendor prefixes to CSS rules. \n\nFinally, the `csso` function is used to minify the CSS. The `debug` option is set to `true` to log the size reduction achieved by the minification. \n\nThe resulting CSS is saved to the `public` directory using the `gulp.dest` function. \n\nThis task can be used as part of a larger build process for a web application that uses Less for styling. It allows developers to write Less code and have it automatically compiled and minified into CSS that is ready for production use. \n\nExample usage:\n\n```\n// gulpfile.js\n\nconst gulp = require('gulp');\nconst lessTask = require('./zoo/less-task');\n\ngulp.task('build', gulp.series(lessTask));\n```\n\nThis code defines a `build` task that runs the `less` task defined in the `less-task.js` file located in the `zoo` directory. When the `build` task is run, all Less files in the `src/themes` directory are compiled and minified into CSS and saved to the `public` directory.", - "questions": "1. What is the purpose of this code?\n This code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS before outputting it to a `public` directory.\n\n2. What are the dependencies required for this code to run?\n This code requires several dependencies to run, including `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`.\n\n3. What is the input and output of this code?\n The input of this code is any Less files located in the `src/themes` directory that match the pattern `*-theme.less`. The output of this code is minified CSS files that are output to the `public` directory.", - "checksum": "a3c62c455d3b001f2bba7c4bc16270f4" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/public/index.json b/.autodoc/docs/json/lab/public/index.json deleted file mode 100644 index 029c5a8d4..000000000 --- a/.autodoc/docs/json/lab/public/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "index.html", - "filePath": "lab/public/index.html", - "url": "zoo-labs/zoo/blob/master/lab/public/index.html", - "summary": "This code is an HTML template file for a web application called \"Lab\". The file contains metadata and links to various resources that are used by the web application. The purpose of this file is to provide a basic structure for the web application and to ensure that all necessary resources are included.\n\nThe file starts with a DOCTYPE declaration that specifies the version of HTML being used. The next section contains the head element, which includes various meta tags that provide information about the web application, such as the character set, viewport settings, and theme color. The head element also includes links to the favicon and apple-touch-icon, which are small images that are used to represent the web application in the browser and on mobile devices.\n\nThe next section of the file includes a link to the manifest.json file, which provides metadata about the web application that is used when it is installed on a user's device. The manifest.json file includes information such as the name of the web application, its icons, and its start URL.\n\nThe body element of the file contains a div element with an id of \"root\". This is where the content of the web application will be rendered. The file also includes a noscript element that displays a message if JavaScript is not enabled in the user's browser.\n\nFinally, the file includes a comment that provides instructions for starting the development server and building the web application for production.\n\nOverall, this file is an essential part of the web application and provides a basic structure and necessary resources for the application to function properly. Developers can use this file as a starting point for building their web application and customize it as needed. For example, they can add additional meta tags, links to external resources, and modify the content of the body element to create a unique user interface.", - "questions": "1. What is the purpose of this HTML file?\n \n This HTML file serves as a template for a web app created using scaffold-eth, with metadata for mobile devices and desktops, and a title of \"Lab\".\n\n2. What is the significance of the %PUBLIC_URL% placeholder in the code?\n \n The %PUBLIC_URL% placeholder is used to reference files inside the `public` folder during the build, and will be replaced with the URL of the `public` folder. This allows for correct referencing of files with client-side routing and a non-root public URL.\n\n3. What are the recommended commands for development and production of this web app?\n \n The recommended commands for development are `npm start` or `yarn start`, and for production are `npm run build` or `yarn build`.", - "checksum": "9e542d2c2949f0c657ef1ac3337d0d2d" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/public/manifest.json b/.autodoc/docs/json/lab/public/manifest.json deleted file mode 100644 index 5b3e67a96..000000000 --- a/.autodoc/docs/json/lab/public/manifest.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "manifest.json", - "filePath": "lab/public/manifest.json", - "url": "zoo-labs/zoo/blob/master/lab/public/manifest.json", - "summary": "This code is a JSON object that defines the configuration for a web application. Specifically, it sets the metadata for the application's icons, name, start URL, display mode, and theme and background colors. \n\nThe `short_name` and `name` properties define the name of the application, with the former being a shorter version that may be used in places where space is limited. The `icons` property is an array of objects that define the icons for the application, with each object specifying the source file, size, and type. This allows the application to have different icons for different devices and contexts. \n\nThe `start_url` property specifies the URL that the application should load when it is launched. In this case, it is set to \".\" which means the application will load the index.html file in the root directory. \n\nThe `display` property specifies the display mode for the application, with \"standalone\" meaning that the application should be launched in its own window without any browser UI. This is useful for creating web applications that look and feel like native applications. \n\nThe `theme_color` and `background_color` properties define the colors for the application's theme and background, respectively. These colors can be used to customize the appearance of the application and provide a consistent look and feel across different devices and platforms. \n\nOverall, this code is an important part of the configuration for a web application and helps to ensure that the application looks and behaves consistently across different devices and contexts. Here is an example of how this code might be used in an HTML file:\n\n```html\n\n\n \n \n \nThis is a web application that uses the latest web technologies.
\n \n\n```\n\nIn this example, the `link` element specifies the location of the `manifest.json` file that contains the configuration for the application. This allows the browser to load the correct icons and other metadata for the application.", - "questions": "1. What is the purpose of this code?\n This code is a JSON file that defines the metadata for a web application, including its name, icons, start URL, and display settings.\n\n2. What is the significance of the different icon sizes and types?\n The different icon sizes and types allow the web application to be displayed properly on different devices and platforms, such as desktops, mobile devices, and browsers.\n\n3. What is the difference between \"display\" and \"background_color\"?\n \"Display\" refers to how the web application should be displayed to the user, such as in a standalone window or as part of a browser tab. \"Background_color\" refers to the color of the background of the web application.", - "checksum": "39ebd33361817aea509cbac2cf419033" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/public/robots.json b/.autodoc/docs/json/lab/public/robots.json deleted file mode 100644 index 4bceb8c33..000000000 --- a/.autodoc/docs/json/lab/public/robots.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "robots.txt", - "filePath": "lab/public/robots.txt", - "url": "zoo-labs/zoo/blob/master/lab/public/robots.txt", - "summary": "This code is a standard robots.txt file that is used to communicate with web crawlers and search engines about which pages or sections of a website should be crawled and indexed. The file starts with a comment that provides a link to the official documentation for the robots.txt protocol.\n\nThe first line of the file specifies the user-agent that the following rules apply to. In this case, the wildcard symbol (*) is used to indicate that the rules apply to all user-agents. \n\nThe following lines contain the rules for the web crawlers and search engines. Each rule consists of a directive and a value. The most common directives are \"Disallow\" and \"Allow\". The \"Disallow\" directive tells the web crawler not to crawl a specific page or section of the website, while the \"Allow\" directive tells the web crawler that it is allowed to crawl a specific page or section of the website.\n\nIn this specific file, there are no rules specified, which means that all pages and sections of the website are allowed to be crawled by any web crawler or search engine.\n\nThis file is an important part of any website as it helps to ensure that search engines are able to crawl and index the website correctly. Without a robots.txt file, search engines may crawl and index pages that should not be visible to the public, such as admin pages or pages with sensitive information.\n\nAn example of how this file can be used in the larger project is to specify rules for specific user-agents. For example, if there is a web crawler that is causing issues with the website, the robots.txt file can be updated to disallow that specific user-agent from crawling the website. This can help to improve the performance and security of the website.", - "questions": "1. What is the purpose of this code and how does it relate to the overall functionality of the zoo project?\n - This code is the contents of a `robots.txt` file, which is used to instruct web crawlers on which pages of a website they are allowed to access. It is important for the SEO and security of the website, but does not directly relate to the functionality of the zoo project.\n \n2. Why is the `User-agent: *` line included and what does it mean?\n - The `User-agent: *` line specifies that the following rules apply to all web crawlers. This means that any crawler that accesses the website will be subject to the rules outlined in the `robots.txt` file.\n \n3. Are there any other rules or directives that could be included in this `robots.txt` file?\n - Yes, there are several other directives that can be included in a `robots.txt` file, such as `Disallow` to block specific pages or directories, `Allow` to override a `Disallow` directive, and `Sitemap` to specify the location of the website's sitemap. However, it is up to the website owner to determine which directives are necessary for their specific website.", - "checksum": "c7397796d19d876ede3a9fc669bf6a60" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/scripts/create_contracts.json b/.autodoc/docs/json/lab/scripts/create_contracts.json deleted file mode 100644 index 8093e952f..000000000 --- a/.autodoc/docs/json/lab/scripts/create_contracts.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "create_contracts.js", - "filePath": "lab/scripts/create_contracts.js", - "url": "zoo-labs/zoo/blob/master/lab/scripts/create_contracts.js", - "summary": "This code checks if a file called \"hardhat_contracts.json\" exists in the \"./src/contracts/\" directory. If the file does not exist, the code creates an empty JSON object and writes it to the file. \n\nThis code is likely used in a larger project to ensure that a specific file exists and is properly formatted before other parts of the project attempt to read from or write to it. The file \"hardhat_contracts.json\" may contain important information or configurations for the project, and this code ensures that it is present and ready to be used. \n\nHere is an example of how this code may be used in a larger project:\n\n```javascript\nconst fs = require(\"fs\");\n\nfunction readContracts() {\n let contracts = {};\n\n if (fs.existsSync(\"./src/contracts/hardhat_contracts.json\")) {\n try {\n contracts = JSON.parse(fs.readFileSync(\"./src/contracts/hardhat_contracts.json\"));\n } catch (error) {\n console.log(error);\n }\n } else {\n console.log(\"src/contracts/hardhat_contracts.json not found.\");\n }\n\n return contracts;\n}\n\nfunction writeContracts(contracts) {\n try {\n fs.writeFileSync(\"./src/contracts/hardhat_contracts.json\", JSON.stringify(contracts));\n console.log(\"src/contracts/hardhat_contracts.json updated.\");\n } catch (error) {\n console.log(error);\n }\n}\n\nlet contracts = readContracts();\n\n// Do something with contracts...\n\nwriteContracts(contracts);\n```\n\nIn this example, the `readContracts` function first checks if the \"hardhat_contracts.json\" file exists and is properly formatted. If it is, the function reads the contents of the file and returns it as a JSON object. If the file does not exist or is not properly formatted, the function returns an empty object.\n\nThe `writeContracts` function takes a JSON object as an argument and writes it to the \"hardhat_contracts.json\" file. \n\nThe `contracts` variable is initialized by calling `readContracts`, and then some operation is performed on it. Finally, the updated `contracts` object is written back to the \"hardhat_contracts.json\" file by calling `writeContracts`. \n\nOverall, this code ensures that the \"hardhat_contracts.json\" file exists and is properly formatted, allowing other parts of the project to safely read from and write to it.", - "questions": "1. What is the purpose of this code?\n This code checks if a file called \"hardhat_contracts.json\" exists in the \"./src/contracts/\" directory, and if it doesn't, it creates an empty JSON file with that name.\n\n2. What happens if there is an error while writing the file?\n If there is an error while writing the file, the error message will be logged to the console.\n\n3. What is the expected output of this code?\n If the file doesn't exist and is successfully created, the message \"src/contracts/hardhat_contracts.json created.\" will be logged to the console. If the file already exists, nothing will happen. If there is an error while writing the file, the error message will be logged to the console.", - "checksum": "ed362f0bc90380f5609b8a97282eb4df" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/scripts/ipfs.json b/.autodoc/docs/json/lab/scripts/ipfs.json deleted file mode 100644 index a594f5040..000000000 --- a/.autodoc/docs/json/lab/scripts/ipfs.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "ipfs.js", - "filePath": "lab/scripts/ipfs.js", - "url": "zoo-labs/zoo/blob/master/lab/scripts/ipfs.js", - "summary": "This code is a script that deploys a web application to the InterPlanetary File System (IPFS) and publishes it to the IPNS (InterPlanetary Name System). IPFS is a distributed file system that allows users to store and access files in a decentralized manner. IPNS is a naming system built on top of IPFS that allows users to create human-readable names for IPFS content.\n\nThe script uses the ipfs-http-client library to interact with the IPFS network. It also uses the chalk and readline libraries for console output formatting. The script defines the IPFS gateway and IPNS gateway URLs, as well as the options for adding files to IPFS.\n\nThe `pushDirectoryToIPFS` function takes a path to a directory and recursively adds its contents to IPFS using the `ipfs.add` method. The function returns the response from IPFS, which includes the content identifier (CID) of the added content.\n\nThe `publishHashToIPNS` function takes an IPFS hash (CID) and publishes it to IPNS using the `ipfs.name.publish` method. The function returns the response from IPFS, which includes the IPNS name.\n\nThe `nodeMayAllowPublish` function checks if the IPFS node allows publishing IPNS names. It does this by comparing the node's host URL to a blacklist of known nodes that do not allow IPNS publishing.\n\nThe `deploy` function deploys the web application to IPFS and publishes it to IPNS. It first adds the contents of the `./build` directory to IPFS using `pushDirectoryToIPFS`. If the add operation fails, the function returns false. Otherwise, it publishes the IPFS hash to IPNS using `publishHashToIPNS` if the IPFS node allows it. Finally, the function outputs the IPFS and IPNS URLs for accessing the deployed application.\n\nTo use this script, the user needs to have an IPFS node running. They can then run the script to deploy their web application to IPFS and publish it to IPNS. The script can be integrated into a larger project as part of a continuous deployment pipeline to automatically deploy new versions of the application to IPFS and IPNS.", - "questions": "1. What is the purpose of this code?\n \n This code is used to deploy an application to IPFS (InterPlanetary File System) and publish it to IPNS (InterPlanetary Name System) for easy access.\n\n2. What are the dependencies of this code?\n \n This code depends on the `ipfs-http-client`, `chalk`, and `readline` packages.\n\n3. What is the difference between IPFS and IPNS?\n \n IPFS is a distributed file system that allows users to store and access files in a decentralized manner, while IPNS is a naming system that allows users to assign human-readable names to IPFS content. IPNS names can be updated to point to new content, while IPFS content is immutable.", - "checksum": "441044fd027ef487351330aff7c75d6a" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/scripts/s3.json b/.autodoc/docs/json/lab/scripts/s3.json deleted file mode 100644 index a81a80f14..000000000 --- a/.autodoc/docs/json/lab/scripts/s3.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "s3.js", - "filePath": "lab/scripts/s3.js", - "url": "zoo-labs/zoo/blob/master/lab/scripts/s3.js", - "summary": "This code is responsible for creating an AWS S3 bucket and uploading a directory to it. The code first imports the necessary dependencies, including the `s3-folder-upload` package and the `fs` module. It then sets the name of the directory to be uploaded to the `build` directory and the name of the S3 bucket to be created to `testbucket.xyz`. \n\nThe code then checks if a bucket name has been set and exits the process if it has not. It also reads the AWS credentials from a file called `aws.json` and sets the bucket name in the credentials object. \n\nThe code then creates an S3 service object and uses it to create a new bucket with the specified name. It also sets the bucket's website configuration to use `index.html` as the index document and `index.html` as the error document. \n\nOnce the bucket is created, the code uploads the contents of the `build` directory to the bucket using the `s3FolderUpload` function from the `s3-folder-upload` package. \n\nThis code can be used as part of a larger project to automate the deployment of a static website to an S3 bucket. By running this code, developers can create a new bucket and upload the contents of the `build` directory to it with a single command. \n\nExample usage:\n\n```\n// Import the code from the file\nconst deployToS3 = require('./path/to/s3.js');\n\n// Call the function to create the bucket and upload the directory\ndeployToS3();\n```", - "questions": "1. What is the purpose of this code?\n \n This code is used to create an S3 bucket and upload a directory to it.\n\n2. What is the significance of the `aws.json` file?\n \n The `aws.json` file contains the AWS credentials required to access the S3 bucket. It is read by the code to authenticate the user.\n\n3. What are the options available for the `s3FolderUpload` method?\n \n The `s3FolderUpload` method takes an optional `options` parameter that can be used to configure the upload process. The available options are `useFoldersForFileTypes` and `useIAMRoleCredentials`.", - "checksum": "2284ef8ee65a266d9281066dcc09faf3" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/scripts/watch.json b/.autodoc/docs/json/lab/scripts/watch.json deleted file mode 100644 index 67b595f49..000000000 --- a/.autodoc/docs/json/lab/scripts/watch.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "watch.js", - "filePath": "lab/scripts/watch.js", - "url": "zoo-labs/zoo/blob/master/lab/scripts/watch.js", - "summary": "The code above is a Node.js script that watches for changes in a specific directory and runs a command to compile and generate new files whenever a change is detected. The purpose of this script is to automate the process of compiling and generating files, which can be time-consuming and error-prone if done manually.\n\nThe script uses two Node.js modules: `node-watch` and `child_process`. `node-watch` is used to watch for changes in the `./src/themes` directory, while `child_process` is used to execute the command to compile and generate files.\n\nThe `run` function is responsible for executing the command to compile and generate files. It uses the `exec` method from the `child_process` module to run the command `npx gulp less`. This command is used to compile `.less` files into `.css` files using the Gulp task runner. The function also logs the output of the command to the console.\n\nThe `watch` function is used to watch for changes in the `./src/themes` directory. Whenever a change is detected, the function logs the name of the file that was changed to the console and calls the `run` function to compile and generate new files.\n\nFinally, the script calls the `run` function once at the beginning to compile and generate files for the first time.\n\nThis script can be used in a larger project to automate the process of compiling and generating files whenever changes are made to the source files. For example, in a web development project, this script can be used to compile `.less` files into `.css` files whenever changes are made to the `.less` files. This can save time and reduce errors by automating a repetitive and error-prone task.", - "questions": "1. What does this code do?\n This code sets up a watch on the `./src/themes` directory and runs a Gulp task to compile LESS files whenever a change is detected in that directory.\n\n2. What dependencies does this code have?\n This code requires the `node-watch` and `child_process` modules to be installed.\n\n3. What command should be run to start this code?\n This code can be started by running the file with Node.js (`node filename.js`) or by incorporating it into a larger Node.js project.", - "checksum": "ff45a02977f7eca60453e9fbd557fe0d" -} \ No newline at end of file diff --git a/.autodoc/docs/json/lab/src/App.json b/.autodoc/docs/json/lab/src/App.json deleted file mode 100644 index eac20a6b8..000000000 --- a/.autodoc/docs/json/lab/src/App.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "App.css", - "filePath": "lab/src/App.css", - "url": "zoo-labs/zoo/blob/master/lab/src/App.css", - "summary": "The code provided is a CSS file that defines the styling for the `.App` class. The purpose of this code is to center the text within any HTML element that has the `.App` class applied to it. This code can be used in conjunction with HTML and JavaScript to create a user interface for a web application. \n\nFor example, if we have an HTML file with the following code:\n\n```\nExplore our collection of animals.
\nCurrent amount: {amount} ETH
\nCurrent value: ${amount * price}
\nExplore our collection of animals and exhibits.
\nAddress: {address}
\nBalance: {balance}
\nContract is deployed!
:Contract is not deployed.
}\nCurrent price: {price}
\nCurrent gas price: {gasPrice} wei
\nCount: {count}
\n \nAddress: {address}
\nENS Name: {ensName}
\nNonce: {nonce}
\nSigned transaction: {signedTx}
\nCurrent block number: {blockNumber}
\nCount: {count}
\nThis text is highlighted
\nTotal price: {totalPrice}
\nTotal: {data.total}
\n \nText copied to clipboard!
}\n{token.description}
\nPrice: {token.market.floorAsk.price.amount}
\n {token.isInCart ? (\n \n ) : (\n \n )}\nCount: {count}
\n \nLoading...
}\n {royaltyInfo.error &&Error: {royaltyInfo.error.message}
}\n {royaltyInfo.data && (\nPosted {
This is a post
\n{response.collection.description}
\nThis token is banned on OpenSea.
\n } else {\n returnThis token is not banned on OpenSea.
\n }\n}\n```", - "questions": "1. What is the purpose of this code?\n This code is a React hook that checks if a given token on a given contract is banned on OpenSea.\n\n2. What is the '@reservoir0x/reservoir-sdk' package used for?\n The '@reservoir0x/reservoir-sdk' package is used to check if a given token is banned on OpenSea.\n\n3. What happens if either the contract or tokenId parameters are not provided?\n If either the contract or tokenId parameters are not provided, the hook will return false for isBanned.", - "checksum": "8176c4ffed07435e86e51d6bbab67085" -} \ No newline at end of file diff --git a/.autodoc/docs/json/ui/src/hooks/useTokens.json b/.autodoc/docs/json/ui/src/hooks/useTokens.json deleted file mode 100644 index 694fd2403..000000000 --- a/.autodoc/docs/json/ui/src/hooks/useTokens.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "fileName": "useTokens.ts", - "filePath": "ui/src/hooks/useTokens.ts", - "url": "zoo-labs/zoo/blob/master/ui/src/hooks/useTokens.ts", - "summary": "This code exports a function that retrieves token details from a Reservoir API endpoint. The function takes in three optional parameters: `options`, `swrOptions`, and `chainId`. \n\n`options` is an object that contains query parameters to be sent with the API request. If `options` is not provided or is falsey, the function returns null. \n\n`swrOptions` is an object that contains options for the SWR library, which is used to handle caching and revalidation of the API response. The default options are set to revalidate on mount and not on the first page. \n\n`chainId` is an optional parameter that specifies the ID of the chain to use for the API request. If `chainId` is provided, the function searches for the chain with the matching ID in the client's list of chains. If `chainId` is not provided, the function uses the current chain from the client. \n\nThe function then calls `useInfiniteApi` from the `./` module, passing in a callback function and the `swrOptions` object. The callback function takes in two parameters: `pageIndex` and `previousPageData`. `pageIndex` is the index of the current page being fetched, and `previousPageData` is the data from the previous page. \n\nThe callback function constructs the API endpoint URL using the `chain` object and the `/tokens/v6` endpoint path. It then sets the query parameters using the `options` object and the `setParams` function from the `@reservoir0x/reservoir-sdk` module. If `normalizeRoyalties` is not specified in the query parameters and the client has a `normalizeRoyalties` property, the function sets `normalizeRoyalties` to the client's value. \n\nIf `previousPageData` is truthy and has a `continuation` property, the function sets the `continuation` query parameter to the value of `previousPageData.continuation`. This allows the function to fetch subsequent pages of data. If `previousPageData` is falsy and `pageIndex` is greater than 0, the function returns null. \n\nThe callback function then returns an array containing the constructed URL, the chain's API key, and the client's version. This array is used by `useInfiniteApi` to make the API request. \n\nThe function then extracts the `tokens` array from the API response data and returns an object containing the `response` object from `useInfiniteApi` and the `tokens` array. \n\nThis function can be used to fetch token details from the Reservoir API and handle pagination of the response data using the SWR library. An example usage of this function might look like:\n\n```\nimport useTokens from './useTokens'\n\nfunction TokenList() {\n const { data, error, size, setSize } = useTokens({ limit: 10 })\n\n if (error) returnHere's a cool hexagon icon:
\nCapital: {country.capital}
\nPopulation: {country.population}
\nCan you spot the bird in this image?
\nThis is the content of my modal.
\nPrice: $10.00
\nSelected currency: {selectedCurrency.symbol}
\nCollapsible content goes here
\nValue: {value}
\n...
- > - ) -} -``` -## Questions: - 1. What is the purpose of this code? -- This code renders the `` section of an HTML page, including meta tags, title, and favicon. - -2. What are the configurable options in this code? -- The code has configurable options for custom meta tags, title, and keywords in `pages/_document.ts`. - -3. What is the significance of the `ogImage` parameter? -- The `ogImage` parameter is the URL of the Open Graph image to be displayed in social media shares. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/components/Layout.md b/.autodoc/docs/markdown/app/components/Layout.md deleted file mode 100644 index 0ec8ab4c5..000000000 --- a/.autodoc/docs/markdown/app/components/Layout.md +++ /dev/null @@ -1,35 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/components/Layout.tsx) - -The code above defines a React component called `Layout` that serves as a layout wrapper for other components in the `zoo` project. The component imports the `Box` component from the `components/primitives` module and the `FC` and `ReactNode` types from the `react` module. It also imports the `Navbar` component from a local file called `navbar`. - -The `Layout` component takes a single prop called `children`, which is of type `ReactNode`. This prop is used to render the child components that are wrapped by the `Layout` component. - -The `Layout` component returns a JSX expression that renders a `Box` component with some CSS styles. The `Box` component serves as a container for the entire layout. It has a background color of `$neutralBg`, which is a CSS variable that is defined elsewhere in the project. It also has a height and minimum height of 100% to ensure that it takes up the full height of the viewport. Additionally, it has a padding top of 80 pixels to create some space between the top of the layout and the content. - -Inside the `Box` component, there is another `Box` component that serves as a container for the content of the layout. This inner `Box` component has a maximum width of 1920 pixels and is horizontally centered using the `mx` CSS property. Inside this container, there is a `Navbar` component that is imported from a local file called `navbar`. The `Navbar` component is responsible for rendering the navigation bar at the top of the layout. Finally, the `children` prop is rendered inside a `main` element, which serves as the main content area of the layout. - -Overall, the `Layout` component provides a consistent layout structure for other components in the `zoo` project. It ensures that all components are rendered inside a container with a consistent background color, padding, and maximum width. It also provides a navigation bar at the top of the layout that is consistent across all pages. Developers can use this component as a wrapper for their components to ensure a consistent layout structure throughout the project. For example, a developer could use the `Layout` component to wrap a `HomePage` component like this: - -``` -import Layout from './Layout' -import HomePage from './HomePage' - -const App = () => { - return ( -This is the content of the modal.
-This is an example modal.
-{collection.description}
-Here is some content.
-{user.bio}
-Here is some collapsible content
-This is a flexible layout
-Content for Tab 1
-Selected chain: {chain.name}
- -{currentChain.description}
-Loading...
- )} -Primary Fee: {openseaFees.primaryFee}
-Secondary Fee: {openseaFees.secondaryFee}
-Posted {
This is a sample web app that uses the zoo manifest file.
- - -``` - -In this example, the web app includes a link to the "manifest.json" file, which contains the code we discussed earlier. This allows the web app to use the specified icons and colors, and to be displayed as a standalone app. -## Questions: - 1. What is the purpose of this code? - This code is a JSON object that defines various properties of icons and colors for a web app. - -2. Where is this code used in the project? - It is not clear from this code snippet where it is used in the project. It could be part of a configuration file or a script that generates HTML code. - -3. Are there any dependencies or requirements for this code to work properly? - It is not clear from this code snippet if there are any dependencies or requirements for this code to work properly. It is possible that other parts of the project rely on this code to be present and correctly formatted. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/sentry.client.config.md b/.autodoc/docs/markdown/app/sentry.client.config.md deleted file mode 100644 index cecdc39c1..000000000 --- a/.autodoc/docs/markdown/app/sentry.client.config.md +++ /dev/null @@ -1,57 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.client.config.ts) - -This file is responsible for configuring the initialization of Sentry on the client side of the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. - -The code imports the necessary modules from the `@sentry/nextjs` and `@sentry/integrations` packages. It then calls the `Sentry.init()` method to initialize Sentry with the provided configuration options. - -The `dsn` option specifies the Data Source Name (DSN) for Sentry, which is a unique identifier for the project. This value is retrieved from the `NEXT_PUBLIC_SENTRY_DSN` environment variable. - -The `tracesSampleRate` option determines the percentage of transactions that will be sent to Sentry for performance monitoring. In this case, it is set to 1, meaning that all transactions will be sent. - -The `debug` option controls whether or not debug information will be printed to the console during setup. It is set to false in this case. - -The `replaysOnErrorSampleRate` option determines the percentage of errors that will be recorded for session replay. It is set to 1.0, meaning that all errors will be recorded. - -The `replaysSessionSampleRate` option determines the percentage of sessions that will be recorded for session replay. It is set to 0.1, meaning that only 10% of sessions will be recorded. - -The `integrations` option is an array of integrations that will be used with Sentry. In this case, two integrations are included: `Replay` and `CaptureConsoleIntegration`. The `Replay` integration enables session replay, which allows developers to see a video of a user's session leading up to an error. The `CaptureConsoleIntegration` integration captures console messages of a specified level (in this case, only `error` messages are captured) and sends them to Sentry for monitoring. - -Overall, this file sets up Sentry with the necessary configuration options and integrations to monitor errors and performance in the zoo project. Developers can use Sentry to identify and fix issues in their application, improving the overall user experience. - -Example usage: - -```javascript -import * as Sentry from '@sentry/nextjs' - -// Initialize Sentry with custom configuration options -Sentry.init({ - dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, - tracesSampleRate: 1, - debug: false, - replaysOnErrorSampleRate: 1.0, - replaysSessionSampleRate: 0.1, - integrations: [ - new Sentry.Replay({ - maskAllText: true, - blockAllMedia: true, - }), - new Sentry.CaptureConsoleIntegration({ - levels: ['error'], - }), - ], -}) - -// Log an error to the console -console.error('An error occurred') - -// Sentry will capture the error and send it for monitoring -``` -## Questions: - 1. What is Sentry and how does it work with Next.js? -- Sentry is a tool for error tracking and monitoring. This code initializes Sentry on the client side of a Next.js application, allowing it to capture and report errors that occur in the user's browser. - -2. What is the purpose of the `tracesSampleRate` option? -- The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. In this code, it is set to 1, meaning that all requests will be traced. This value should be adjusted in production to avoid excessive data usage. - -3. What is the `CaptureConsoleIntegration` and what does it do? -- The `CaptureConsoleIntegration` is an integration provided by Sentry that captures console messages (such as `console.error()`) and sends them to Sentry for error tracking. In this code, it is configured to only capture `error` messages. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/sentry.edge.config.md b/.autodoc/docs/markdown/app/sentry.edge.config.md deleted file mode 100644 index 9268608e5..000000000 --- a/.autodoc/docs/markdown/app/sentry.edge.config.md +++ /dev/null @@ -1,41 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.edge.config.ts) - -This code initializes Sentry for edge features in the zoo project. Sentry is a tool that helps developers monitor and fix errors in their applications. The configuration added in this file will be used whenever one of the edge features is loaded. This configuration is also required when running the project locally. - -The code imports the Sentry library using the '@sentry/nextjs' package. It then calls the 'init' method on the Sentry object and passes in an object with configuration options. - -The 'dsn' option is set to the value of the 'NEXT_PUBLIC_SENTRY_DSN' environment variable. This is the Data Source Name (DSN) for the Sentry project, which is used to identify and send error reports to the correct project. - -The 'tracesSampleRate' option is set to 1, which means that all transactions will be sent to Sentry. This option can be adjusted in production to reduce the amount of data sent to Sentry. - -The 'debug' option is set to false, which means that no additional information will be printed to the console during setup. - -Overall, this code ensures that Sentry is properly configured for edge features in the zoo project, allowing developers to monitor and fix errors in their application. - -Example usage: - -``` -import * as Sentry from '@sentry/nextjs' - -Sentry.init({ - dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, - tracesSampleRate: 1, - debug: false, -}) - -// Example code that could potentially throw an error -try { - // some code here -} catch (error) { - Sentry.captureException(error) -} -``` -## Questions: - 1. What is Sentry and why is it being used in this project? - - Sentry is a tool used for error tracking and monitoring. It is being initialized in this project for edge features such as middleware and edge routes. - -2. What is the purpose of the `tracesSampleRate` option and why is it set to 1? - - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. It is set to 1 in this code, meaning that all requests will be traced. - -3. What is the purpose of the `debug` option and why is it set to false? - - The `debug` option is used to print useful information to the console while setting up Sentry. It is set to false in this code, meaning that this information will not be printed. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/sentry.server.config.md b/.autodoc/docs/markdown/app/sentry.server.config.md deleted file mode 100644 index 378b97289..000000000 --- a/.autodoc/docs/markdown/app/sentry.server.config.md +++ /dev/null @@ -1,59 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/sentry.server.config.ts) - -This file is responsible for configuring the initialization of Sentry on the server. Sentry is a tool that helps developers monitor and fix errors in their applications. The code imports the Sentry library from the '@sentry/nextjs' package and initializes it with a configuration object. - -The configuration object contains three properties: -1. dsn: This property is set to the value of the environment variable NEXT_PUBLIC_SENTRY_DSN. This is the Data Source Name (DSN) that Sentry uses to identify the project and send error reports to the correct location. -2. tracesSampleRate: This property is set to 1, which means that all requests will be traced by Sentry. In production, this value should be adjusted to a lower value to reduce the amount of data sent to Sentry and improve performance. Alternatively, the tracesSampler property can be used to provide greater control over which requests are traced. -3. debug: This property is set to false, which means that Sentry will not print any useful information to the console during setup. This can be set to true during development to help with debugging. - -This code is an important part of the larger project because it enables developers to monitor and fix errors in the application. By configuring Sentry on the server, developers can receive real-time notifications of errors and quickly identify and fix issues. - -Here is an example of how this code might be used in a larger project: - -``` -// server.js - -import express from 'express' -import * as Sentry from '@sentry/nextjs' -import { createServer } from 'http' - -const app = express() - -// Initialize Sentry -Sentry.init({ - dsn: process.env.NEXT_PUBLIC_SENTRY_DSN, - tracesSampleRate: 0.5, - debug: true, -}) - -// Add Sentry middleware to the express app -app.use(Sentry.Handlers.requestHandler()) - -// Define routes -app.get('/', (req, res) => { - res.send('Hello World!') -}) - -// Add Sentry error handling middleware to the express app -app.use(Sentry.Handlers.errorHandler()) - -// Create server and listen on port 3000 -const server = createServer(app) -server.listen(3000, () => { - console.log('Server listening on port 3000') -}) -``` - -In this example, the code initializes Sentry with a DSN from an environment variable and sets the tracesSampleRate to 0.5. It then adds Sentry middleware to the express app to handle requests and errors. Finally, it creates a server and listens on port 3000. - -Overall, this code is an essential part of any project that uses Sentry for error monitoring and provides developers with a powerful tool for identifying and fixing issues in their applications. -## Questions: - 1. What is Sentry and why is it being used in this project? - - Sentry is a tool for error tracking and monitoring. It is being used in this project to handle errors that occur on the server and provide useful information for debugging. - -2. What is the purpose of the `tracesSampleRate` option and why is it set to 1? - - The `tracesSampleRate` option determines the percentage of requests that will be traced by Sentry. A value of 1 means that all requests will be traced. This may be adjusted in production to reduce the amount of data collected. - -3. What is the significance of the `debug` option and why is it set to false? - - The `debug` option controls whether or not Sentry will print useful information to the console during setup. It is set to false in this code to prevent cluttering the console with unnecessary information. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/stitches.config.md b/.autodoc/docs/markdown/app/stitches.config.md deleted file mode 100644 index daebbbf2b..000000000 --- a/.autodoc/docs/markdown/app/stitches.config.md +++ /dev/null @@ -1,34 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/stitches.config.ts) - -This code is responsible for creating and configuring the theme for the `zoo` project. It uses the `@stitches/react` library to create a theme object that contains various properties such as colors, fonts, sizes, and media queries. The `createStitches` function is used to create the theme object and also returns several utility functions that can be used to create styles for components. - -The `colors` property of the theme object is defined using the `@radix-ui/colors` library, which provides a set of predefined color scales. These color scales are then combined and aliased to create the final color palette for the project. The `createTheme` function is used to create a dark theme that is a variation of the main theme. - -The `utils` property of the theme object contains various utility functions that can be used to create styles for components. These functions include margin, padding, width, height, and grid-related functions. The `media` property contains various media queries that can be used to create responsive styles for components. - -The `globalCss` function is used to apply a global CSS reset to the project. The `Inter` font from Google Fonts is also imported and used as the default font for the project. - -Overall, this code provides a centralized way to manage the theme for the `zoo` project. It allows for easy customization of the color palette and provides utility functions that can be used to create consistent styles for components. Here is an example of how the `styled` function can be used to create a styled component using the theme: - -``` -import { styled } from 'zoo' - -const Button = styled('button', { - backgroundColor: '$primary1', - color: '$whiteA11', - padding: '$2', - borderRadius: '$radii', - '&:hover': { - backgroundColor: '$primary2', - }, -}) -``` -## Questions: - 1. What is the purpose of the `createStitches` function and what does it return? -- The `createStitches` function is used to create a styling system for the project using the `@stitches/react` library. It returns an object with several properties including `createTheme`, `keyframes`, `styled`, `globalCss`, and `getCssText`. - -2. What is the purpose of the `utils` object within the `createStitches` function? -- The `utils` object contains utility functions that can be used to generate CSS properties for margin, padding, dimensions, and grid. These functions can be used within the `styled` function to create custom styles. - -3. What is the purpose of the `darkTheme` object and how is it different from the default theme? -- The `darkTheme` object is an alternative theme that can be used for dark mode. It contains different color values for the same color aliases used in the default theme, as well as some additional color values for accent and panel styling. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/tsconfig.md b/.autodoc/docs/markdown/app/tsconfig.md deleted file mode 100644 index 98b58b8ac..000000000 --- a/.autodoc/docs/markdown/app/tsconfig.md +++ /dev/null @@ -1,27 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/tsconfig.json) - -This code is a configuration file for the TypeScript compiler. It specifies the compiler options and the files to be included or excluded from the compilation process. - -The "compilerOptions" object contains various settings for the compiler, such as the target version of ECMAScript to compile to, the libraries to include, whether to allow JavaScript files to be compiled, and whether to enforce strict type checking. - -The "include" and "exclude" arrays specify the files to be included or excluded from the compilation process. In this case, the "include" array includes all TypeScript and TypeScript React files in the project, while the "exclude" array excludes the "node_modules" directory. - -This configuration file is an important part of the TypeScript project, as it ensures that the TypeScript code is compiled correctly and efficiently. It can be used in conjunction with other tools and frameworks to build and deploy TypeScript applications. - -For example, in a Node.js project, this configuration file can be used with the "tsc" command to compile TypeScript files into JavaScript files that can be executed by Node.js. - -``` -// Example usage of the TypeScript compiler with this configuration file -tsc -``` - -Overall, this code is a crucial part of the TypeScript project and ensures that the TypeScript code is compiled correctly and efficiently. -## Questions: - 1. What is the purpose of this code file? - - This code file is a configuration file for TypeScript compiler options for the project called zoo. - -2. What version of ECMAScript is being targeted? - - The code is targeting ECMAScript 5. - -3. What files are being included and excluded in the compilation process? - - The code includes all TypeScript and TypeScript React files with the extensions `.ts` and `.tsx`, as well as a file called `next-env.d.ts`. It excludes the `node_modules` directory. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/types/ExpirationOption.md b/.autodoc/docs/markdown/app/types/ExpirationOption.md deleted file mode 100644 index ccf51a28c..000000000 --- a/.autodoc/docs/markdown/app/types/ExpirationOption.md +++ /dev/null @@ -1,43 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/types/ExpirationOption.ts) - -This code defines a TypeScript type called `ExpirationOption`. This type is used to represent an option for an expiration date in the larger project. - -The `ExpirationOption` type has four properties: `text`, `value`, `relativeTime`, and `relativeTimeUnit`. The `text` property is a string that represents the text that will be displayed for the expiration option. The `value` property is a string that represents the value that will be sent to the server when the expiration option is selected. The `relativeTime` property is a number or null that represents the relative time for the expiration option. The `relativeTimeUnit` property is a `ManipulateType` or null that represents the unit of time for the relative time. - -This type can be used in the larger project to represent expiration options for various features such as subscriptions, memberships, or trial periods. For example, if the project has a subscription feature, the `ExpirationOption` type can be used to represent the different subscription plans available to the user. Each subscription plan can have its own `text`, `value`, `relativeTime`, and `relativeTimeUnit` properties. - -Here is an example of how the `ExpirationOption` type can be used in the larger project: - -``` -const subscriptionOptions: ExpirationOption[] = [ - { - text: 'Monthly Subscription', - value: 'monthly', - relativeTime: 1, - relativeTimeUnit: 'month' - }, - { - text: 'Annual Subscription', - value: 'annual', - relativeTime: 1, - relativeTimeUnit: 'year' - }, - { - text: 'Lifetime Subscription', - value: 'lifetime', - relativeTime: null, - relativeTimeUnit: null - } -] -``` - -In this example, an array of `ExpirationOption` objects is defined to represent the different subscription options available to the user. The first two options have a relative time of 1 month or 1 year, while the third option represents a lifetime subscription with no expiration. -## Questions: - 1. What is the purpose of the `ExpirationOption` type? - - The `ExpirationOption` type is used to represent an option for an expiration date, including its text, value, relative time, and relative time unit. - -2. What is the `ManipulateType` import used for? - - The `ManipulateType` import is used to define the type of the `relativeTimeUnit` property in the `ExpirationOption` type. - -3. What library is the `ManipulateType` import from? - - The `ManipulateType` import is from the `dayjs` library, which is likely used for working with dates and times in the project. \ No newline at end of file diff --git a/.autodoc/docs/markdown/app/types/reservoir.d.md b/.autodoc/docs/markdown/app/types/reservoir.d.md deleted file mode 100644 index 208a8c16a..000000000 --- a/.autodoc/docs/markdown/app/types/reservoir.d.md +++ /dev/null @@ -1,34 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/app/types/reservoir.d.ts) - -The code defines a type called `ArrayItemTypes` which takes in a generic type `T` that extends an array of any type. The type `infer` is used to extract the type of the array elements and assign it to the type variable `U`. The conditional type `T extends (infer U)[] ? U : never` checks if `T` is an array and if so, returns the type `U` (i.e., the type of the array elements). If `T` is not an array, it returns `never`. - -This type can be useful in a larger project where there is a need to extract the type of elements from an array. For example, consider a function that takes in an array of numbers and returns the sum of the elements. Instead of explicitly defining the type of the array elements as `number`, the `ArrayItemTypes` type can be used to extract the type of the elements dynamically. - -```typescript -function sumArrayCheck out our latest products!
- -Scientific Name: Elephas Maximus Sumatranus
-Sumatran elephants feed on a variety of plants and deposit seeds wherever they go, contributing to a healthy forest ecosystem. They also share their lush forest habitat with other endangered species.
-` tag. The "desc" property is used to display a brief description of the animal in another `
` tag. By using the data from the JSON object, the webpage can provide valuable information about endangered animals to users. -## Questions: - 1. What is the purpose of this code? -- This code defines a list of animals in a zoo, along with their images and descriptions. - -2. What information is included in the animal descriptions? -- The animal descriptions include the scientific name of the species, as well as information about their habitat, diet, and conservation status. - -3. Are there any other types of data that could be included for each animal? -- Depending on the needs of the project, additional data such as the animal's lifespan, behavior, or physical characteristics could be included for each animal. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/animation/index.md b/.autodoc/docs/markdown/core/src/animation/index.md deleted file mode 100644 index 2b448e413..000000000 --- a/.autodoc/docs/markdown/core/src/animation/index.md +++ /dev/null @@ -1,29 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/animation/index.tsx) - -This code is a collection of functions that use the GreenSock Animation Platform (GSAP) library to create various fade-in animations triggered by scrolling. The `import` statements at the beginning of the file bring in the necessary modules from the GSAP library, including the `ScrollTrigger` plugin. The `registerPlugin` method is then called to register the `ScrollTrigger` plugin with GSAP. - -The `fadeInOnScroll` function takes an HTML element as a parameter and returns a GSAP animation that fades in the element when it enters the viewport during scrolling. The `duration` parameter sets the length of the animation, and the `y` parameter determines the distance the element moves vertically as it fades in. The `scrollTrigger` object specifies the trigger element, the point at which the animation should start (`start: "top 90%"`), and the toggle actions that should occur when the element enters and leaves the viewport. - -The `fadeInFromRight` and `fadeInFromLeft` functions are similar to `fadeInOnScroll`, but they animate the element sliding in from the right or left side of the screen, respectively. The `x` parameter determines the distance the element moves horizontally as it fades in. - -The `fadeInFromRightFast` and `fadeInFromLeftFast` functions are similar to their non-"Fast" counterparts, but they have shorter animation durations and use a different easing function (`Power4.easeInOut`) for a snappier animation. - -The `fadeInOnScrollAndStagger` function is similar to `fadeInOnScroll`, but it also applies a stagger effect to the animation, causing the elements to fade in one after another with a slight delay. The `trigger` parameter specifies the element that triggers the animation, and the `end` parameter specifies the point at which the animation should end. - -These functions can be used in a larger project to add visual interest and interactivity to a webpage. For example, they could be used to animate the appearance of images or text as the user scrolls down the page. Here is an example of how the `fadeInOnScroll` function could be used to fade in an HTML element with the ID "myElement" when it enters the viewport during scrolling: - -``` -import { fadeInOnScroll } from "zoo"; - -const myElement = document.querySelector("#myElement"); -fadeInOnScroll(myElement); -``` -## Questions: - 1. What is the purpose of the `gsap` and `ScrollTrigger` imports? -- The `gsap` and `ScrollTrigger` imports are used for animation and scroll-triggered animation respectively. - -2. What do the `fadeInFromRight`, `fadeInFromRightFast`, `fadeInFromLeft`, and `fadeInFromLeftFast` functions do? -- These functions animate an element's opacity and position (either from the left or right) when it enters the viewport during scrolling. - -3. What is the purpose of the `stagger` property in the `fadeInOnScrollAndStagger` function? -- The `stagger` property is used to apply a staggered animation effect to multiple elements, with a specified delay between each element's animation. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/animation/loading-circle.md b/.autodoc/docs/markdown/core/src/animation/loading-circle.md deleted file mode 100644 index 6704003f5..000000000 --- a/.autodoc/docs/markdown/core/src/animation/loading-circle.md +++ /dev/null @@ -1,26 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/animation/loading-circle.json) - -The code is a JSON file that defines an animation project called "347-loader-18". The project has a single composition called "Watermark" that contains two layers. The first layer is an empty layer called "comp_0" that has no content. The second layer is a shape layer called "Shape Layer 9" that contains an animated ellipse with a stroke and fill. - -The stroke and fill colors of the ellipse are controlled by two color effects called "Primary" and "Secondary" respectively. These effects are linked to color controls that can be adjusted to change the colors of the ellipse. The stroke width of the ellipse is controlled by a slider effect called "Stroke". The size of the ellipse is fixed at 57x57 pixels, but its position and scale can be adjusted using the "Axis" and "Scale" effects respectively. - -The purpose of this code is to define an animated loading icon that can be used in a larger project. The loading icon can be customized by adjusting the color, stroke width, position, and scale of the ellipse. The code can be imported into an animation software like Adobe After Effects to create the actual animation. - -Here is an example of how the color of the ellipse can be changed using the "Primary" effect: - -``` -var primaryColor = [1, 0, 0]; // set primary color to red -var primaryEffect = thisComp.layer('Color & Stroke Change').effect('Primary')('Color'); -primaryEffect.setValue(primaryColor); -``` - -This code sets the primary color of the ellipse to red by getting a reference to the "Primary" effect and calling its `setValue()` method with an array of RGB values. -## Questions: - 1. What is the purpose of this code? -- This code appears to be defining the properties and animations for a shape layer in an Adobe After Effects project. - -2. What effects or controls are being applied to the shape layer? -- The shape layer has a "Color & Stroke Change" effect applied to it, which includes controls for primary and secondary colors, stroke width, and scale. - -3. What is the significance of the "NULL 2" and "NULL" layers? -- These layers appear to be null objects used to control the position, scale, and rotation of the shape layer. "NULL 2" is used to control the position and scale, while "NULL" is used to control the rotation. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/bootstrap.md b/.autodoc/docs/markdown/core/src/bootstrap.md deleted file mode 100644 index a2f485e21..000000000 --- a/.autodoc/docs/markdown/core/src/bootstrap.md +++ /dev/null @@ -1,26 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/bootstrap.ts) - -This code file contains a set of functions and extensions to existing classes that are used in the larger zoo project. - -The first section of the code imports various dependencies, including `BigNumber` and `Fraction` from the `@ethersproject/bignumber` package, as well as `React` and `Zero` from other packages. It also imports a function called `parseUnits` from `@ethersproject/units`. - -The next section of the code checks if the code is running in a browser environment and in development mode. If so, it imports and runs a package called `why-did-you-render`, which is used for debugging and optimizing React components. - -The remaining code defines several extensions to the `BigNumber` and `String` classes. - -The `mulDiv` function extends the `BigNumber` class and takes two arguments, `multiplier` and `divisor`, both of which are `BigNumberish` types. It returns a new `BigNumber` that is the result of multiplying the original `BigNumber` by the `multiplier` and dividing by the `divisor`. If the `divisor` is zero or negative, it returns `Zero`. - -The `toFraction` function also extends the `BigNumber` class and takes an optional argument `decimals`, which defaults to 18. It returns a new `Fraction` object that represents the `BigNumber` as a fraction with the specified number of decimal places. - -The `toFixed` function extends the `BigNumber` class and takes two optional arguments, `decimals` and `maxFractions`, both of which default to 18 and 8, respectively. It returns a string representation of the `BigNumber` with the specified number of decimal places and maximum number of fractions. - -The `toBigNumber` function extends the `String` class and takes an argument `decimals`. It attempts to parse the string as a `BigNumber` with the specified number of decimal places using the `parseUnits` function. If parsing fails, it returns `BigNumber.from(0)`. - -These extensions to the `BigNumber` and `String` classes provide additional functionality that is used throughout the zoo project. For example, the `mulDiv` function is used to calculate the price of tokens in various trading pairs, while the `toFraction` and `toFixed` functions are used to format token amounts and prices for display. The `toBigNumber` function is used to convert user input from strings to `BigNumber` objects. -## Questions: - 1. What is the purpose of the `Fraction` entity and how is it used in this code? - - The `Fraction` entity is imported from `./entities/Fraction` and is used to convert a `BigNumber` to a fraction with a specified number of decimals. -2. What is the significance of the `mulDiv` function added to the `BigNumber` prototype? - - The `mulDiv` function multiplies a `BigNumber` by a multiplier and divides it by a divisor, returning the result as a `BigNumber`. If the divisor is zero or negative, it returns `Zero`. -3. Why is the `whyDidYouRender` library being used in this code, and what options are being passed to it? - - The `whyDidYouRender` library is being used to track unnecessary re-renders in development mode. The options being passed to it include tracking all pure components, tracking hooks, logging owner reasons, and collapsing groups. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/components/AccountDetails/Copy.md b/.autodoc/docs/markdown/core/src/components/AccountDetails/Copy.md deleted file mode 100644 index 3498a0afb..000000000 --- a/.autodoc/docs/markdown/core/src/components/AccountDetails/Copy.md +++ /dev/null @@ -1,24 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Copy.tsx) - -The `CopyHelper` component is a reusable React component that provides a UI for copying text to the clipboard. It is designed to be used in other parts of the `zoo` project where copying text is required. - -The component imports two icons from the `@heroicons/react/outline` package: `CheckCircleIcon` and `ClipboardCopyIcon`. It also imports the `useCopyClipboard` hook from a custom `useCopyClipboard` module, the `classNames` function from a custom `functions` module, and the `Typography` component from a custom `Typography` module. Additionally, it imports the `useLingui` hook and `t` function from the `@lingui/react` and `@lingui/macro` packages respectively. - -The `CopyHelper` component takes three props: `className`, `toCopy`, and `children`. `className` is an optional string that can be used to add additional CSS classes to the component. `toCopy` is a required string that represents the text to be copied to the clipboard. `children` is an optional prop that can be used to pass in additional React components to be rendered alongside the copy icon. - -The component uses the `useCopyClipboard` hook to manage the state of whether or not the text has been copied to the clipboard. It also uses the `useLingui` hook to provide internationalization support for the "Copied" text that is displayed when the text is successfully copied. - -The component renders a `div` element with a `classNames` function that combines the default classes with any additional classes passed in via the `className` prop. The `onClick` event is set to call the `setCopied` function with the `toCopy` prop as an argument when the component is clicked. - -If the text has been successfully copied, the component renders a `div` element with the "Copied" text and a `CheckCircleIcon`. If the text has not been copied, the component renders a `div` element with any additional components passed in via the `children` prop and a `ClipboardCopyIcon`. - -Overall, the `CopyHelper` component provides a simple and reusable UI for copying text to the clipboard, with support for internationalization and customization via the `className` and `children` props. An example usage of this component would be in a form where a user needs to copy a generated code or URL to the clipboard. -## Questions: - 1. What does this code do? - - This code exports a React component called `CopyHelper` that provides a UI for copying text to the clipboard and displaying a success message upon successful copy. - -2. What dependencies does this code rely on? - - This code relies on several external dependencies, including `@heroicons/react/outline`, `react`, `useCopyClipboard`, `../../functions`, `../Typography`, `@lingui/react`, and `@lingui/macro`. - -3. What props does the `CopyHelper` component accept? - - The `CopyHelper` component accepts three props: `className` (optional), `toCopy` (required), and `children` (optional). The `toCopy` prop specifies the text to be copied to the clipboard, and the `children` prop is used to render any additional content alongside the copy icon. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/components/AccountDetails/Transaction.md b/.autodoc/docs/markdown/core/src/components/AccountDetails/Transaction.md deleted file mode 100644 index 914fabaa1..000000000 --- a/.autodoc/docs/markdown/core/src/components/AccountDetails/Transaction.md +++ /dev/null @@ -1,22 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/Transaction.tsx) - -The `Transaction` component is a React functional component that displays information about a transaction on the Ethereum blockchain. It imports several dependencies from various packages, including `@zoolabs/zdk`, `@heroicons/react/outline`, and `@lingui/react`. - -The component takes a single prop, `hash`, which is the hash of the transaction to display. It then uses several hooks to retrieve information about the transaction from the Redux store, including `useActiveWeb3React` and `useAllTransactions`. - -The component then renders a div that displays the transaction summary and status. The summary is either the transaction hash or a user-defined summary if one exists. The status is displayed as an icon, with different icons representing pending, successful, cancelled, or failed transactions. - -If the transaction was submitted using the Archer network, additional information is displayed, including the nonce and tip amount. If the transaction is pending, the component also displays a countdown timer indicating how long until the transaction expires. If the transaction has expired, the component displays an "Expired" message. - -Finally, if the transaction is pending, the component allows the user to cancel the transaction by clicking a "Cancel" button. This sends a request to the Archer network to cancel the transaction, and updates the transaction status in the Redux store. - -This component is likely used in other parts of the project to display information about transactions, such as in a transaction history or on a confirmation page after submitting a transaction. -## Questions: - 1. What is the purpose of the `Transaction` component? -- The `Transaction` component is used to display information about a transaction, including its status, summary, and deadline. - -2. What is the `calculateSecondsUntilDeadline` function used for? -- The `calculateSecondsUntilDeadline` function is used to calculate the number of seconds until a transaction's deadline, which is used to determine whether the transaction has expired. - -3. What is the `cancelPending` function used for? -- The `cancelPending` function is used to cancel a pending transaction by sending a request to the Archer Relay API with the transaction's raw data and authorization headers. If the cancellation is successful, the transaction is marked as cancelled in the application state. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/components/AccountDetails/index.md b/.autodoc/docs/markdown/core/src/components/AccountDetails/index.md deleted file mode 100644 index 6c9864515..000000000 --- a/.autodoc/docs/markdown/core/src/components/AccountDetails/index.md +++ /dev/null @@ -1,44 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/components/AccountDetails/index.tsx) - -The code is a React component that renders the account details of a user's wallet. It imports various dependencies such as React, Image, and Button from different modules. It also imports some functions and constants from other files such as `getExplorerLink` and `SUPPORTED_WALLETS`. - -The component takes in several props such as `toggleWalletModal`, `pendingTransactions`, `confirmedTransactions`, `ENSName`, and `openOptions`. It then uses these props to render the account details of the user's wallet. - -The component first uses the `useActiveWeb3React` hook to get the current chain ID, account, and connector of the user's wallet. It then uses the `useSelector` hook to get the user's ZOO balance from the Redux store. - -The component then defines several functions such as `formatConnectorName` and `getStatusIcon` that are used to format and display the user's wallet connector and status icon. - -The component then renders the user's account details such as their wallet address, balance, and recent transactions. It also provides buttons to disconnect the wallet, change the wallet, view the wallet on an explorer, and copy the wallet address. - -The component also defines a `WalletIcon` component that renders the icon of the user's wallet connector. It also defines a `renderTransactions` function that renders the user's recent transactions. - -Overall, this component is an important part of the larger project as it provides users with a way to view and manage their wallet details and transactions. It can be used in various parts of the project such as the wallet modal and the dashboard. - -Example usage: - -```jsx -import AccountDetails from "./components/AccountDetails"; - -function App() { - return ( -
This is my page content.
-Some text goes here.
- -{isZooSelected ? 'ZOO' : 'BNB'} selected
-This is the content of the expert mode panel.
-Current gas price:
Check out our social media pages for the latest updates.
-Modal content goes here
- -{building.address}
-This is the main content of my website.
-Modal content goes here.
-This is the content of the modal.
-This is some text inside the paper element.
-You entered: {percentValue}%
-{data.description}
-Current value:
-{diet}
-From | -To | -Value | -Date | -Transaction Hash | -
---|
Name | -Habitat | -
---|---|
Lion | -Africa | -
Panda | -Asia | -
A new version of the app is available!
-This is some text that will be styled differently in dark mode.
-Hover over this text to see a tooltip!
-Wallet connected
- ) : ( - - )} -This page displays analytics for the SushiSwap Liquidity Pair (SLP).
-This is where you can view all your analytics data.
-Price Impact:
- |
-
- |
-
- |
-
---|---|---|
{item.name} | -{item.age} | -{item.date} | -
Pending rewards: {pendingRewards}
-This is the production environment.
- ) : ( -This is not the production environment.
- )} -Immediate: {data.immediate}
-Rapid: {data.rapid}
-Fast: {data.fast}
-Standard: {data.standard}
-Slow: {data.slow}
-Slower: {data.slower}
-Slowest: {data.slowest}
-Debounced value: {debouncedValue}
-You are using an Argent wallet!
:You are not using an Argent wallet.
} -Last valid input: {lastValidInput}
-Last selected option: {lastSelectedOption}
-Small screen
} - {isMedium &&Medium screen
} - {isLarge &&Large screen
} -Approval state: {approvalState}
- - - -Token 1: {poolData.token0}
-Token 2: {poolData.token1}
-Reserves: {poolData.reserves.toString()}
-Total supply: {poolData.totalSupply.toString()}
-Current count: {count}
-Previous count: {prevCount}
- -requestSort('name')}> - Name {sortConfig && sortConfig.key === 'name' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>} - | -requestSort('age')}> - Age {sortConfig && sortConfig.key === 'age' && sortConfig.direction === 'ascending' ? <>▲> : <>▼>} - | -
---|---|
{item.name} | -{item.age} | -
Current allowance: {allowance}
- - - -Hello World!
} -Current allowance: {allowance?.toSignificant(4)}
-There are pending transactions. Please wait...
- ) : ( - - )} -Window width: {width}
-Window height: {height}
-This is some content for my page.
-Explore our collection of exotic animals.
- - ); -}; - -export default HomePage; -``` -## Questions: - 1. What is the purpose of the `Layout` component? -- The `Layout` component is responsible for rendering the main layout of the application, including the header, main content, popups, and footer. - -2. What is the significance of the `useEffect` hook in this code? -- The `useEffect` hook is used to update the gas price in the network state whenever the `library` object changes. - -3. What is the purpose of the `bg` prop in the `Layout` component? -- The `bg` prop is used to set the background color of the main content area, with a default value of black. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/layouts/Drop/index.md b/.autodoc/docs/markdown/core/src/layouts/Drop/index.md deleted file mode 100644 index c08d02af6..000000000 --- a/.autodoc/docs/markdown/core/src/layouts/Drop/index.md +++ /dev/null @@ -1,33 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/layouts/Drop/index.tsx) - -This code defines a React component called `DropLayout` that is used to render a layout for a specific page in the larger project. The component imports several other components from the project's `components` directory, including `Footer`, `Header`, `Main`, and `Popups`. It also imports a custom hook called `useActiveWeb3React` and an action creator function called `updateGasPrice` from the project's `hooks` and `state/network/actions` directories, respectively. - -The `DropLayout` component takes three props: `children`, `banner`, and `isMarginTop`. The `children` prop is used to render any child components that are passed to `DropLayout`. The `banner` prop is an optional prop that can be used to specify a banner image for the page. The `isMarginTop` prop is a boolean that determines whether or not to add a top margin to the `Main` component. - -The `useEffect` hook is used to call the `updateGasPrice` function whenever the `library` object (which is obtained from the `useActiveWeb3React` hook) changes. This function is responsible for updating the gas price used for transactions on the Ethereum network. - -The `return` statement renders the layout for the page. It consists of a `div` element that contains the `Header`, `Main`, `Popups`, and `Footer` components. The `Header` component is rendered with a transparent background and the `banner` prop (if provided). The `Main` component is rendered with a background color of "bg-drop" and the `children` prop. The `Popups` component is used to render any popups that may appear on the page. Finally, the `Footer` component is rendered at the bottom of the page. - -This component can be used in the larger project to provide a consistent layout for pages that require a banner image, a specific background color, and a fixed set of components (i.e. `Header`, `Main`, `Popups`, and `Footer`). Developers can use this component by importing it and passing any necessary props to it. For example: - -``` -import DropLayout from "./DropLayout"; - -function MyPage() { - return ( -This is some content for my page.
-This is some content.
- - ); -} -``` -## Questions: - 1. What is the purpose of the `Layout` component? -- The `Layout` component is responsible for rendering the overall layout of the application, including the header, main content, and footer. - -2. What are the optional props that can be passed to the `Layout` component? -- The `Layout` component accepts three optional props: `left`, `children`, and `right`. `left` and `right` are JSX elements that will be rendered in the left and right columns of the layout, respectively. `children` is a React child or an array of React children that will be rendered in the main content area. - -3. What is the purpose of the `useRouter` hook from the `next/router` module? -- The `useRouter` hook is used to access the Next.js router object, which provides information about the current route and allows for programmatic navigation. In this code, it is used to determine the current route and apply appropriate styling to the navigation links. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/layouts/Miso/index.md b/.autodoc/docs/markdown/core/src/layouts/Miso/index.md deleted file mode 100644 index 29bcae264..000000000 --- a/.autodoc/docs/markdown/core/src/layouts/Miso/index.md +++ /dev/null @@ -1,37 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/layouts/Miso/index.tsx) - -The code above defines a React component called `Layout` that is used to render the layout of a web page. The component imports three other components: `Footer`, `Header`, and `Popups`. These components are located in the `components` directory of the `zoo` project, which suggests that this `Layout` component is part of a larger web application. - -The `Layout` component takes a single prop called `children`, which is used to render the content of the web page. The `children` prop is enclosed in empty tags (`<>...>`) to allow for the rendering of multiple child components. - -The `Layout` component returns a `div` element that has a class of `z-0` and is styled to be a flex container with a column direction (`flex-col`). The `div` element takes up the full width and height of the screen and has both horizontal and vertical scrolling enabled. - -Inside the `div` element, there are four child components: `Header`, `main`, `Popups`, and `Footer`. The `Header` component is rendered with a prop called `banner` set to `false`, which suggests that the `Header` component may have a banner that can be toggled on or off. The `main` component is a flex container that takes up the remaining space in the `div` element and is styled to grow to the maximum height of its content. The `Popups` component is used to render any popups that may appear on the web page, and the `Footer` component is used to render the footer of the web page. - -Overall, the `Layout` component is a reusable component that can be used to render the layout of any web page in the `zoo` project. It provides a consistent layout across all pages and allows for the easy rendering of child components. Here is an example of how the `Layout` component can be used: - -``` -import Layout from "./Layout"; -import HomePage from "./HomePage"; - -const App = () => { - return ( -This is the content of my modal window.
-Current bid: 1 ETH
- - {showModal &&Index | -Name | -Floor Price | -24h Volume | -
---|---|---|---|
Here you can buy and sell unique digital assets.
-Please wait while we process your payment...
-Selected currency: {selectedCurrency ? selectedCurrency.symbol : 'None'}
- {/* rest of payment form */} -Rank | -Column A | -Column B | -Column C | -Column D | -Column E | -
---|
Column A | -Column B | -Column C | -Column D | -Actions | -
---|
Name | -Age | -
- |
-
---|
{metadata.description}
- Visit Zoo - > - ) -} - -export async function getStaticProps() { - const res = await fetch('/api/metadata') - const metadata = await res.json() - return { - props: { - metadata - } - } -} - -export default ZooPage -``` - -In this example, the ZooPage component fetches the metadata from the /api/metadata API route and uses it to populate the page's title, description, and Open Graph tags. The metadata is also used to display the project's name and description on the page, as well as to provide a link to the project's external URL. -## Questions: - 1. What is the purpose of the `withSentry` function imported from `@sentry/nextjs`? - - The `withSentry` function is likely used to add Sentry error tracking to the `handler` function. - -2. What is the purpose of the commented out code related to `req.query.type` and the switch statement? - - It is unclear without more context, but it appears that the code may have been used to handle different types of requests based on the `type` parameter in the query string. - -3. What is the expected output of the `handler` function? - - The `handler` function is expected to respond to requests with a JSON object containing metadata about the project, including a name, description, and potentially other properties. \ No newline at end of file diff --git a/.autodoc/docs/markdown/core/src/pages/api/moonpay.md b/.autodoc/docs/markdown/core/src/pages/api/moonpay.md deleted file mode 100644 index ce24c68ef..000000000 --- a/.autodoc/docs/markdown/core/src/pages/api/moonpay.md +++ /dev/null @@ -1,40 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/core/src/pages/api/moonpay.ts) - -This code defines an API route for the Next.js project that returns an HTML iframe containing a MoonPay button. The MoonPay button is imported from a component called `MoonpayBtn` and is rendered within the `MonComp` string. The `allow` attribute of the iframe specifies the permissions required for the iframe to function properly, including accelerometer, autoplay, camera, gyroscope, and payment. The `src` attribute of the iframe specifies the URL of the MoonPay sandbox environment, along with an API key and a currency code. - -When a request is made to this API route, the `moonpay` function is executed. The function extracts the `address` property from the request body and uses it to construct the `MonComp` string. The function then sends the `MonComp` string as the response to the request. - -This code can be used in the larger project to provide a way for users to purchase cryptocurrency using MoonPay. The `MoonpayBtn` component can be customized to fit the design of the project, and the `moonpay` API route can be integrated into the project's payment flow. For example, a user could click on a "Buy Crypto" button in the project's UI, which would trigger a request to the `moonpay` API route. The `moonpay` function would then return the HTML iframe containing the MoonPay button, which the user could interact with to complete the purchase. - -Example usage: - -```javascript -import MoonpayBtn from "components/Moonpaybtn/MoonpayBtn"; - -function BuyCrypto() { - const handlePurchase = async () => { - const response = await fetch("/api/moonpay", { - method: "POST", - body: JSON.stringify({ address: "0x123abc" }), - }); - const html = await response.text(); - document.getElementById("moonpay-container").innerHTML = html; - }; - - return ( -You do not have access to this section.
} -Check back soon for updates!
-Learn more about our project by reading our white paper.
-Current price: {barData?.price}
-Historical prices:
-Loading...
; - if (error) returnError :(
; - - const { bar } = data; - - return ( -Total Supply: {bar.totalSupply}
-Ratio: {bar.ratio}
-xSushi Minted: {bar.xSushiMinted}
-xSushi Burned: {bar.xSushiBurned}
-Sushi Staked: {bar.sushiStaked}
-Sushi Staked USD: {bar.sushiStakedUSD}
-Sushi Harvested: {bar.sushiHarvested}
-Sushi Harvested USD: {bar.sushiHarvestedUSD}
-xSushi Age: {bar.xSushiAge}
-xSushi Age Destroyed: {bar.xSushiAgeDestroyed}
-Loading...
; - if (error) returnError :(
; - - return ( -Pool ID: {pool.id}
-Pair: {pool.pair}
-Allocation Point: {pool.allocPoint}
-SLP Balance: {pool.slpBalance}
-Loading...
; - if (error) returnError :(
; - - return ( -Pool ID: {pool.id}
-Assets: {pool.pair}
-Allocation: {pool.allocPoint}
-Balance: {pool.balance}
-Current gas price: {gasPrice}
- handleGasPriceChange(Number(e.target.value))} /> -Welcome to the Zoo!
-...
-Loaded!
} -{bid ? `Current bid: ${bid.amount}` : "No bids yet"}
- - {isModalOpen && ( -Token ID: {tokenId}
-Amount: {amount}
-This is a great app that does amazing things.
- - -``` - -In this example, the `link` element with `rel="manifest"` specifies the location of the metadata file, and the `link` element with `rel="icon"` specifies the location of a favicon that can be used to represent the application in the browser's UI. - -Overall, this code is an important part of a web application's infrastructure, as it provides information that can be used to optimize the user experience and make the application more accessible and user-friendly. -## Questions: - 1. What is the purpose of this code? - This code is a JSON file that defines the name, icons, theme color, background color, and display settings for a web application. - -2. What are the dimensions of the icons? - The icons have two different sizes: 192x192 and 512x512. - -3. What does the "display" property mean? - The "display" property is set to "standalone", which means that the web application should be launched in a standalone mode, without any browser UI elements. \ No newline at end of file diff --git a/.autodoc/docs/markdown/foundation/public/robots.md b/.autodoc/docs/markdown/foundation/public/robots.md deleted file mode 100644 index c7437fa1e..000000000 --- a/.autodoc/docs/markdown/foundation/public/robots.md +++ /dev/null @@ -1,22 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/robots.txt) - -This code is a robots.txt file that is used to communicate with web crawlers or robots that visit a website. The purpose of this file is to provide instructions to these robots on which pages or sections of the website they are allowed to access and index. - -The first line of the code, "User-agent: *", specifies that the following instructions apply to all robots that visit the website. The next line, "Allow: /", allows all robots to access all pages and sections of the website. - -The following lines specify the host and sitemap of the website. The "Host" line specifies the URL of the website that the robots should visit. The "Sitemap" line specifies the location of the sitemap file, which contains a list of all the pages on the website that the robots should index. - -This code is important for search engine optimization (SEO) as it helps ensure that the website is properly indexed by search engines. By providing clear instructions to robots on which pages to index, the website can improve its search engine rankings and visibility. - -An example of how this code may be used in the larger project is if the zoo website has multiple sections or pages that are not meant to be indexed by search engines, such as administrative pages or pages with sensitive information. The robots.txt file can be used to block these pages from being indexed, ensuring that they remain private and secure. - -Overall, the robots.txt file is a crucial component of any website's SEO strategy, and this code provides clear instructions to robots on how to properly index the zoo website. -## Questions: - 1. **What is the purpose of this code?**\ -A smart developer might wonder what this code is for and how it fits into the overall project. Based on the content, it appears to be a robots.txt file that specifies which pages of the website can be crawled by search engines. - -2. **What does the "User-agent" and "Allow" directives mean?**\ -A smart developer might be curious about the meaning of the "User-agent" and "Allow" directives in the code. The "User-agent" directive specifies which search engine robots are allowed to access the site, while the "Allow" directive specifies which pages or directories are allowed to be crawled. - -3. **Why is the "Host" and "Sitemap" specified in the code?**\ -A smart developer might question why the "Host" and "Sitemap" are specified in the code. The "Host" directive specifies the domain name of the website, while the "Sitemap" directive specifies the location of the sitemap file that contains a list of all the pages on the website. This information is useful for search engines to properly index the site. \ No newline at end of file diff --git a/.autodoc/docs/markdown/foundation/public/sitemap-0.md b/.autodoc/docs/markdown/foundation/public/sitemap-0.md deleted file mode 100644 index f112a6a1a..000000000 --- a/.autodoc/docs/markdown/foundation/public/sitemap-0.md +++ /dev/null @@ -1,25 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/sitemap-0.xml) - -This code is an XML sitemap file that provides information about the URLs of a website to search engines. The sitemap is a list of URLs that are organized in a specific format to help search engines crawl and index the website more efficiently. - -The file starts with an XML declaration that specifies the version and encoding of the document. The root element of the document is `urlset`, which is defined by the `http://www.sitemaps.org/schemas/sitemap/0.9` namespace. The `urlset` element contains a list of `url` elements, each of which represents a URL on the website. - -Each `url` element contains a `loc` element that specifies the URL of the page, a `changefreq` element that indicates how frequently the page is likely to change, a `priority` element that indicates the relative priority of the page compared to other pages on the site, and a `lastmod` element that specifies the date and time the page was last modified. - -This sitemap file can be used by search engines to discover and index the pages on the website more efficiently. It can also be used by website owners to monitor the crawling and indexing of their site. - -For example, a website owner can submit the sitemap file to Google Search Console to monitor the indexing status of their site. They can also use the sitemap to identify any crawl errors or indexing issues that may be preventing their site from appearing in search results. - -Overall, this sitemap file is an important component of a website's SEO strategy, as it helps search engines discover and index the pages on the site more efficiently. -## Questions: - 1. What is the purpose of this code? - - This code is an XML sitemap that lists the URLs of various pages on the website `https://tsnext-tw.thcl.dev` along with some metadata such as the last modification date and priority. - -2. What is the significance of the `changefreq`, `priority`, and `lastmod` elements? - - The `changefreq` element indicates how frequently the page is likely to change, the `priority` element indicates the relative importance of the page compared to other pages on the site, and the `lastmod` element indicates the date and time when the page was last modified. - -3. Is there any reason why some URLs have additional path components (e.g. `/animals/Carousel`) while others do not? - - It's possible that the additional path components correspond to different sections or categories of the website, but without more context it's difficult to say for sure. \ No newline at end of file diff --git a/.autodoc/docs/markdown/foundation/public/sitemap.md b/.autodoc/docs/markdown/foundation/public/sitemap.md deleted file mode 100644 index 37b89963e..000000000 --- a/.autodoc/docs/markdown/foundation/public/sitemap.md +++ /dev/null @@ -1,39 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/foundation/public/sitemap.xml) - -This code is an XML file that contains a sitemap index for a website. The sitemap index is a list of all the sitemaps for the website, which are XML files that contain information about the website's pages and how they are organized. - -The XML file starts with a declaration that specifies the version of XML being used and the character encoding. The sitemap index is then defined using the "sitemapindex" tag, which is part of the sitemap schema. The schema defines the structure and elements that can be used in a sitemap or sitemap index. - -Within the sitemap index, there is a single sitemap defined using the "sitemap" tag. The "loc" element within the sitemap tag specifies the URL of the sitemap file. In this case, the URL is "https://tsnext-tw.thcl.dev/sitemap-0.xml". - -This code is important for search engine optimization (SEO) because it helps search engines like Google understand the structure of the website and how its pages are organized. By providing a sitemap index, the website owner can ensure that all of their pages are being indexed by search engines and that the search engines are able to find the most important pages on the site. - -In the larger project, this code would be used in conjunction with other sitemap files to provide a comprehensive list of all the pages on the website. The sitemap files would be generated automatically by a tool or plugin that crawls the website and extracts information about each page. The sitemap index would then be submitted to search engines like Google using the Google Search Console, which would help the website get indexed more quickly and accurately. - -Example usage: - -```xml - -Check out our latest fundraising campaign:
-Learn about our mission and subscribe to our newsletter:
-{animal.description}
- - > - ); -} -``` -## Questions: - 1. What is the purpose of this code? - - This code defines a React component called `Seo` that generates meta tags for search engine optimization (SEO) and social media sharing. It uses default values for the meta tags, but allows for customization through props. - -2. What is the `defaultMeta` object and what does it contain? - - `defaultMeta` is an object that contains default values for the meta tags generated by the `Seo` component. It includes values for the page title, site name, description, URL, image, and other properties related to SEO and social media sharing. - -3. What is the purpose of the `favicons` array? - - The `favicons` array contains a list of links to various favicon images used by the website. These images are used to represent the website in browser tabs, bookmarks, and other places where a small icon is needed. The array includes links to images of different sizes and formats to ensure compatibility with different devices and browsers. \ No newline at end of file diff --git a/.autodoc/docs/markdown/foundation/src/components/Skeleton.md b/.autodoc/docs/markdown/foundation/src/components/Skeleton.md deleted file mode 100644 index 483a213b2..000000000 --- a/.autodoc/docs/markdown/foundation/src/components/Skeleton.md +++ /dev/null @@ -1,53 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/foundation/src/components/Skeleton.tsx) - -This code defines a React component called `Skeleton` that renders a rectangular box with a shimmering effect. The purpose of this component is to provide a visual placeholder for content that is being loaded asynchronously, so that the user knows that something is happening and doesn't get confused by a blank screen. - -The component takes in a `className` prop, which can be used to add additional CSS classes to the component, and any other props that would normally be passed to a `div` element. The `className` prop is passed to a utility function called `clsxm`, which concatenates the classes together with a space separator. This allows the user to easily add their own custom styles to the component. - -The component renders a `div` element with a background image that consists of a linear gradient that goes from a light gray color to a slightly darker gray color and back to the light gray color. This creates the shimmering effect, as the background appears to move from left to right. The `backgroundSize` property is set to `700px 100%` to ensure that the gradient covers the entire width of the component, and the `backgroundRepeat` property is set to `no-repeat` to prevent the gradient from repeating. - -Overall, this component is a simple but effective way to provide visual feedback to the user while content is being loaded. It can be used in a variety of contexts, such as when fetching data from an API or when rendering a complex UI that takes a while to load. Here is an example of how the `Skeleton` component could be used in a React application: - -```jsx -import React, { useState, useEffect } from 'react'; -import Skeleton from './Skeleton'; - -function App() { - const [isLoading, setIsLoading] = useState(true); - const [data, setData] = useState([]); - - useEffect(() => { - fetch('https://api.example.com/data') - .then(response => response.json()) - .then(data => { - setData(data); - setIsLoading(false); - }); - }, []); - - return ( -This is my component.
-Check out our
Welcome to the homepage!
-My content
". -## Questions: - 1. What is the purpose of this code? - - This code defines a React component called `Content` that takes in a `title` and `content` as props and returns a styled div with the `title` displayed in a large font and the `content` displayed in a smaller font with HTML formatting. - -2. What styling classes are being used in this code? - - The code uses several Tailwind CSS classes for styling, including `bg-black`, `md:px-64`, `max-md:flex-col`, `max-md:px-4`, `py-20`, `relative`, `md:w-1/2`, `max-md:w-full`, `md:pr-32`, `max-md:pb-8`, `text-white`, `text-4xl`, `w-1/2`, `flex`, `justify-between`, `space-x-16`, `flex-1`, `text-xl`, and `md:columns-2`. - -3. What is the purpose of the `dangerouslySetInnerHTML` prop? - - The `dangerouslySetInnerHTML` prop is used to render the `content` prop as HTML, which allows for the use of HTML tags and formatting within the `content` string. However, it is important to note that using this prop can pose a security risk if the `content` string is not properly sanitized. \ No newline at end of file diff --git a/.autodoc/docs/markdown/foundation/src/pages/animals/Header.md b/.autodoc/docs/markdown/foundation/src/pages/animals/Header.md deleted file mode 100644 index dd5460886..000000000 --- a/.autodoc/docs/markdown/foundation/src/pages/animals/Header.md +++ /dev/null @@ -1,36 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/foundation/src/pages/animals/Header.tsx) - -The `Header` function in this code file is a React component that renders a header section for a website. The header includes an image that flips when clicked, a title, a description, and two links for purchasing and adding items to a cart. The header also includes a navigation bar for mobile devices that displays links to different animal pages. - -The `useState` hook is used to create a state variable `flip` that is initially set to `false`. This variable is used to determine whether the image should be flipped or not. When the image is clicked, the `setFlip` function is called with the opposite value of `flip`, which causes the image to flip. - -The `ReactCardFlip` component is used to create a flipping effect for the image. It takes two `Image` components as children, each with a different image source. When the `isFlipped` prop is set to `true`, the second `Image` component is displayed, and when it is set to `false`, the first `Image` component is displayed. - -The `Link` components are used to create two buttons for purchasing and adding items to a cart. They are styled with different colors and borders to differentiate them. The `href` prop is set to `#` for both links, indicating that they are not functional in this code file. - -The navigation bar for mobile devices is created using `Link` components that link to different animal pages. The `className` prop is used to style the links with white text and a black background. The `active` class is added to the second link to indicate the current page. - -This `Header` component can be used in a larger project as a reusable header section for different pages. The image, title, and description can be customized for each page, and the links can be made functional by adding appropriate URLs. The navigation bar can also be customized with different links and styles. Here is an example of how this component can be used in a larger project: - -``` -import Header from './Header'; - -function HomePage() { - return ( -Explore our collection of rare and endangered animals.
-Welcome to the Zoo Labs Foundation website!
-
- This is the Terms of Service page for Zoo Labs Foundation. By using our website or services, you agree to the terms of this agreement. We may update this agreement from time to time, so please review it periodically to stay informed about any changes.
- 1. Acceptance of Terms
-By using our website or services, you agree to the terms of this agreement. If you do not agree to these terms, you should not use our website or services.
-2. Use of Website and Services
-You may use our website and services only for lawful purposes and in accordance with these terms. You agree not to use our website or services:
-(a) In any way that violates any applicable federal, state, local, or international law or regulation.
-(b) To engage in any conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
-(c) To impersonate or attempt to impersonate Zoo Labs Foundation, a Zoo Labs Foundation employee, another user, or any other person or entity.
-(d) To engage in any other conduct that restricts or inhibits anyone's use or enjoyment of the website or services, or which, as determined by us, may harm Zoo Labs Foundation or users of the website or services or expose them to liability.
-3. Intellectual Property
-The website and its entire contents, features, and functionality (including but not limited to all information, software, text, displays, images, video, and audio, and the design, selection, and arrangement thereof), are owned by Zoo Labs Foundation, its licensors, or other providers of such material and are protected by United States and international copyright, trademark, patent, trade secret, and other intellectual property or proprietary rights laws.
-4. Disclaimer of Warranties
-YOUR USE OF THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE IS AT YOUR OWN RISK. THE WEBSITE, ITS CONTENT, AND ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE ARE PROVIDED ON AN "AS IS" AND "AS AVAILABLE" BASIS, WITHOUT ANY WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. NEITHER ZOO LABS FOUNDATION NOR ANY PERSON ASSOCIATED WITH ZOO LABS FOUNDATION MAKES ANY WARRANTY OR REPRESENTATION WITH RESPECT TO THE COMPLETENESS, SECURITY, RELIABILITY, QUALITY, ACCURACY, OR AVAILABILITY OF THE WEBSITE. WITHOUT LIMITING THE FOREGOING, NEITHER ZOO LABS FOUNDATION NOR ANYONE ASSOCIATED WITH ZOO LABS FOUNDATION REPRESENTS OR WARRANTS THAT THE WEBSITE, ITS CONTENT, OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL BE ACCURATE, RELIABLE, ERROR-FREE, OR UNINTERRUPTED, THAT DEFECTS WILL BE CORRECTED, THAT OUR SITE OR THE SERVER THAT MAKES IT AVAILABLE ARE FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS, OR THAT THE WEBSITE OR ANY SERVICES OR ITEMS OBTAINED THROUGH THE WEBSITE WILL OTHERWISE MEET YOUR NEEDS OR EXPECTATIONS.
-5. Limitation of Liability
-IN NO EVENT WILL ZOO LABS FOUNDATION, ITS AFFILIATES, OR THEIR LICENSORS, SERVICE PROVIDERS, EMPLOYEES, AGENTS, OFFICERS, OR DIRECTORS BE LIABLE FOR DAMAGES OF ANY KIND, UNDER ANY LEGAL THEORY, ARISING OUT OF OR IN CONNECTION WITH YOUR USE, OR INABILITY TO USE, THE WEBSITE, ANY WEBSITES LINKED TO IT, ANY CONTENT ON THE WEBSITE OR SUCH OTHER WEBSITES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, OR PUNITIVE DAMAGES, INCLUDING BUT NOT LIMITED TO, PERSONAL INJURY, PAIN AND SUFFERING, EMOTIONAL DISTRESS, LOSS OF REVENUE, LOSS OF PROFITS, LOSS OF BUSINESS OR ANTICIPATED SAVINGS, LOSS OF USE, LOSS OF GOODWILL, LOSS OF DATA, AND WHETHER CAUSED BY TORT (INCLUDING NEGLIGENCE), BREACH OF CONTRACT, OR OTHERWISE, EVEN IF FORESEEABLE.
-6. Indemnification
-You agree to defend, indemnify, and hold harmless Zoo Labs Foundation, its affiliates, licensors, and service providers, and its and their respective officers, directors, employees, contractors, agents, licensors, suppliers, successors, and assigns from and against any claims, liabilities, damages, judgments, awards, losses, costs, expenses, or fees (including reasonable attorneys' fees) arising out of or relating to your violation of these terms or your use of the website or services, including, but not limited to, any use of the website's content, services, and products other than as expressly authorized in these terms or your use of any information obtained from the website.
-7. Governing Law and Jurisdiction
-All matters relating to the website and these terms and any dispute or claim arising therefrom or related thereto (in each case, including non-contractual disputes or claims), shall be governed by and construed in accordance with the internal laws of the State of California without giving effect to any choice or conflict of law provision or rule (whether of the State of California or any other jurisdiction). Any legal suit, action, or proceeding arising out of, or related to, these terms or the website shall be instituted exclusively in the federal courts of the United States or the courts of the State of California in each case located in the City and County of San Francisco although we retain the right to bring any suit, action, or proceeding against you for breach of these terms in your country of residence or any other relevant country. You waive any and all objections to the exercise of jurisdiction over you by such courts and to venue in such courts.
-8. Changes to These Terms
-We may revise and update these terms from time to time in our sole discretion. All changes are effective immediately when we post them, and apply to all access to and use of the website thereafter. Your continued use of the website following the posting of revised terms means that you accept and agree to the changes. You are expected to check this page from time to time so you are aware of any changes, as they are binding on you.
-9. Contact Us
-If you have any questions, concerns, or requests regarding these terms or our privacy practices, please contact us at:
-Zoo Labs Foundation
-
-hello@zoo.ngo
-415-373-2496
-
-We will make every effort to respond to your inquiries and address any concerns as quickly as possible.
-
-
This is some sample text.
- - -``` - -In this example, the font file is preloaded using the `link` element with the `rel` attribute set to "preload". This tells the browser to fetch the font file as soon as possible, but not to block the rendering of the page. The `as` attribute is set to "font" to indicate that this is a font file, and the `type` attribute is set to "font/woff2" to specify the file type. The `crossorigin` attribute is included to allow the font file to be loaded from a different domain if necessary. - -Overall, this code is a small but important part of a larger project that aims to optimize the performance of a web page by reducing the number of requests made to the server. By specifying a cache control directive for the font file, the browser can store it locally and avoid requesting it from the server on subsequent page loads, resulting in faster page load times and a better user experience. -## Questions: - 1. What is the purpose of this code? - This code defines a JSON object with a single header that specifies the cache control settings for a font file. - -2. Where is this code used in the project? - It is unclear where this code is used in the project without additional context. - -3. Are there any other headers or files that have cache control settings defined? - It is unclear if there are any other headers or files with cache control settings defined without additional context or inspection of other files in the project. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/gulpfile.md b/.autodoc/docs/markdown/lab/gulpfile.md deleted file mode 100644 index f5811c845..000000000 --- a/.autodoc/docs/markdown/lab/gulpfile.md +++ /dev/null @@ -1,39 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/gulpfile.js) - -This code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS using the csso plugin. The compiled CSS is then saved to the `public` directory. - -The task starts by requiring the necessary dependencies: `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`. - -The `gulp.task` function defines a new task called `less`. This task takes all Less files in the `src/themes` directory that end with `-theme.less` and compiles them into CSS. The `debug` function is used to log the names of the Less files being processed. - -The `gulpless` function is used to compile the Less files into CSS. The `javascriptEnabled` option is set to `true` to enable JavaScript evaluation in Less files. The `less-plugin-npm-import` plugin is used to allow importing of Less files from installed npm packages using the `~` prefix. - -The resulting CSS is then piped through the `postcss` function, which applies the `autoprefixer` plugin to add vendor prefixes to CSS rules. - -Finally, the `csso` function is used to minify the CSS. The `debug` option is set to `true` to log the size reduction achieved by the minification. - -The resulting CSS is saved to the `public` directory using the `gulp.dest` function. - -This task can be used as part of a larger build process for a web application that uses Less for styling. It allows developers to write Less code and have it automatically compiled and minified into CSS that is ready for production use. - -Example usage: - -``` -// gulpfile.js - -const gulp = require('gulp'); -const lessTask = require('./zoo/less-task'); - -gulp.task('build', gulp.series(lessTask)); -``` - -This code defines a `build` task that runs the `less` task defined in the `less-task.js` file located in the `zoo` directory. When the `build` task is run, all Less files in the `src/themes` directory are compiled and minified into CSS and saved to the `public` directory. -## Questions: - 1. What is the purpose of this code? - This code is a Gulp task that compiles Less files into CSS, applies PostCSS plugins, and minifies the resulting CSS before outputting it to a `public` directory. - -2. What are the dependencies required for this code to run? - This code requires several dependencies to run, including `gulp`, `gulp-less`, `gulp-postcss`, `gulp-debug`, `gulp-csso`, `autoprefixer`, and `less-plugin-npm-import`. - -3. What is the input and output of this code? - The input of this code is any Less files located in the `src/themes` directory that match the pattern `*-theme.less`. The output of this code is minified CSS files that are output to the `public` directory. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/public/index.md b/.autodoc/docs/markdown/lab/public/index.md deleted file mode 100644 index 939ba0f29..000000000 --- a/.autodoc/docs/markdown/lab/public/index.md +++ /dev/null @@ -1,25 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/index.html) - -This code is an HTML template file for a web application called "Lab". The file contains metadata and links to various resources that are used by the web application. The purpose of this file is to provide a basic structure for the web application and to ensure that all necessary resources are included. - -The file starts with a DOCTYPE declaration that specifies the version of HTML being used. The next section contains the head element, which includes various meta tags that provide information about the web application, such as the character set, viewport settings, and theme color. The head element also includes links to the favicon and apple-touch-icon, which are small images that are used to represent the web application in the browser and on mobile devices. - -The next section of the file includes a link to the manifest.json file, which provides metadata about the web application that is used when it is installed on a user's device. The manifest.json file includes information such as the name of the web application, its icons, and its start URL. - -The body element of the file contains a div element with an id of "root". This is where the content of the web application will be rendered. The file also includes a noscript element that displays a message if JavaScript is not enabled in the user's browser. - -Finally, the file includes a comment that provides instructions for starting the development server and building the web application for production. - -Overall, this file is an essential part of the web application and provides a basic structure and necessary resources for the application to function properly. Developers can use this file as a starting point for building their web application and customize it as needed. For example, they can add additional meta tags, links to external resources, and modify the content of the body element to create a unique user interface. -## Questions: - 1. What is the purpose of this HTML file? - - This HTML file serves as a template for a web app created using scaffold-eth, with metadata for mobile devices and desktops, and a title of "Lab". - -2. What is the significance of the %PUBLIC_URL% placeholder in the code? - - The %PUBLIC_URL% placeholder is used to reference files inside the `public` folder during the build, and will be replaced with the URL of the `public` folder. This allows for correct referencing of files with client-side routing and a non-root public URL. - -3. What are the recommended commands for development and production of this web app? - - The recommended commands for development are `npm start` or `yarn start`, and for production are `npm run build` or `yarn build`. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/public/manifest.md b/.autodoc/docs/markdown/lab/public/manifest.md deleted file mode 100644 index 9f9a19639..000000000 --- a/.autodoc/docs/markdown/lab/public/manifest.md +++ /dev/null @@ -1,40 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/manifest.json) - -This code is a JSON object that defines the configuration for a web application. Specifically, it sets the metadata for the application's icons, name, start URL, display mode, and theme and background colors. - -The `short_name` and `name` properties define the name of the application, with the former being a shorter version that may be used in places where space is limited. The `icons` property is an array of objects that define the icons for the application, with each object specifying the source file, size, and type. This allows the application to have different icons for different devices and contexts. - -The `start_url` property specifies the URL that the application should load when it is launched. In this case, it is set to "." which means the application will load the index.html file in the root directory. - -The `display` property specifies the display mode for the application, with "standalone" meaning that the application should be launched in its own window without any browser UI. This is useful for creating web applications that look and feel like native applications. - -The `theme_color` and `background_color` properties define the colors for the application's theme and background, respectively. These colors can be used to customize the appearance of the application and provide a consistent look and feel across different devices and platforms. - -Overall, this code is an important part of the configuration for a web application and helps to ensure that the application looks and behaves consistently across different devices and contexts. Here is an example of how this code might be used in an HTML file: - -```html - - - - - -This is a web application that uses the latest web technologies.
- - -``` - -In this example, the `link` element specifies the location of the `manifest.json` file that contains the configuration for the application. This allows the browser to load the correct icons and other metadata for the application. -## Questions: - 1. What is the purpose of this code? - This code is a JSON file that defines the metadata for a web application, including its name, icons, start URL, and display settings. - -2. What is the significance of the different icon sizes and types? - The different icon sizes and types allow the web application to be displayed properly on different devices and platforms, such as desktops, mobile devices, and browsers. - -3. What is the difference between "display" and "background_color"? - "Display" refers to how the web application should be displayed to the user, such as in a standalone window or as part of a browser tab. "Background_color" refers to the color of the background of the web application. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/public/robots.md b/.autodoc/docs/markdown/lab/public/robots.md deleted file mode 100644 index 57d8ea3f3..000000000 --- a/.autodoc/docs/markdown/lab/public/robots.md +++ /dev/null @@ -1,22 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/public/robots.txt) - -This code is a standard robots.txt file that is used to communicate with web crawlers and search engines about which pages or sections of a website should be crawled and indexed. The file starts with a comment that provides a link to the official documentation for the robots.txt protocol. - -The first line of the file specifies the user-agent that the following rules apply to. In this case, the wildcard symbol (*) is used to indicate that the rules apply to all user-agents. - -The following lines contain the rules for the web crawlers and search engines. Each rule consists of a directive and a value. The most common directives are "Disallow" and "Allow". The "Disallow" directive tells the web crawler not to crawl a specific page or section of the website, while the "Allow" directive tells the web crawler that it is allowed to crawl a specific page or section of the website. - -In this specific file, there are no rules specified, which means that all pages and sections of the website are allowed to be crawled by any web crawler or search engine. - -This file is an important part of any website as it helps to ensure that search engines are able to crawl and index the website correctly. Without a robots.txt file, search engines may crawl and index pages that should not be visible to the public, such as admin pages or pages with sensitive information. - -An example of how this file can be used in the larger project is to specify rules for specific user-agents. For example, if there is a web crawler that is causing issues with the website, the robots.txt file can be updated to disallow that specific user-agent from crawling the website. This can help to improve the performance and security of the website. -## Questions: - 1. What is the purpose of this code and how does it relate to the overall functionality of the zoo project? - - This code is the contents of a `robots.txt` file, which is used to instruct web crawlers on which pages of a website they are allowed to access. It is important for the SEO and security of the website, but does not directly relate to the functionality of the zoo project. - -2. Why is the `User-agent: *` line included and what does it mean? - - The `User-agent: *` line specifies that the following rules apply to all web crawlers. This means that any crawler that accesses the website will be subject to the rules outlined in the `robots.txt` file. - -3. Are there any other rules or directives that could be included in this `robots.txt` file? - - Yes, there are several other directives that can be included in a `robots.txt` file, such as `Disallow` to block specific pages or directories, `Allow` to override a `Disallow` directive, and `Sitemap` to specify the location of the website's sitemap. However, it is up to the website owner to determine which directives are necessary for their specific website. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/scripts/create_contracts.md b/.autodoc/docs/markdown/lab/scripts/create_contracts.md deleted file mode 100644 index 000f55b48..000000000 --- a/.autodoc/docs/markdown/lab/scripts/create_contracts.md +++ /dev/null @@ -1,59 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/create_contracts.js) - -This code checks if a file called "hardhat_contracts.json" exists in the "./src/contracts/" directory. If the file does not exist, the code creates an empty JSON object and writes it to the file. - -This code is likely used in a larger project to ensure that a specific file exists and is properly formatted before other parts of the project attempt to read from or write to it. The file "hardhat_contracts.json" may contain important information or configurations for the project, and this code ensures that it is present and ready to be used. - -Here is an example of how this code may be used in a larger project: - -```javascript -const fs = require("fs"); - -function readContracts() { - let contracts = {}; - - if (fs.existsSync("./src/contracts/hardhat_contracts.json")) { - try { - contracts = JSON.parse(fs.readFileSync("./src/contracts/hardhat_contracts.json")); - } catch (error) { - console.log(error); - } - } else { - console.log("src/contracts/hardhat_contracts.json not found."); - } - - return contracts; -} - -function writeContracts(contracts) { - try { - fs.writeFileSync("./src/contracts/hardhat_contracts.json", JSON.stringify(contracts)); - console.log("src/contracts/hardhat_contracts.json updated."); - } catch (error) { - console.log(error); - } -} - -let contracts = readContracts(); - -// Do something with contracts... - -writeContracts(contracts); -``` - -In this example, the `readContracts` function first checks if the "hardhat_contracts.json" file exists and is properly formatted. If it is, the function reads the contents of the file and returns it as a JSON object. If the file does not exist or is not properly formatted, the function returns an empty object. - -The `writeContracts` function takes a JSON object as an argument and writes it to the "hardhat_contracts.json" file. - -The `contracts` variable is initialized by calling `readContracts`, and then some operation is performed on it. Finally, the updated `contracts` object is written back to the "hardhat_contracts.json" file by calling `writeContracts`. - -Overall, this code ensures that the "hardhat_contracts.json" file exists and is properly formatted, allowing other parts of the project to safely read from and write to it. -## Questions: - 1. What is the purpose of this code? - This code checks if a file called "hardhat_contracts.json" exists in the "./src/contracts/" directory, and if it doesn't, it creates an empty JSON file with that name. - -2. What happens if there is an error while writing the file? - If there is an error while writing the file, the error message will be logged to the console. - -3. What is the expected output of this code? - If the file doesn't exist and is successfully created, the message "src/contracts/hardhat_contracts.json created." will be logged to the console. If the file already exists, nothing will happen. If there is an error while writing the file, the error message will be logged to the console. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/scripts/ipfs.md b/.autodoc/docs/markdown/lab/scripts/ipfs.md deleted file mode 100644 index 3f1103263..000000000 --- a/.autodoc/docs/markdown/lab/scripts/ipfs.md +++ /dev/null @@ -1,27 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/ipfs.js) - -This code is a script that deploys a web application to the InterPlanetary File System (IPFS) and publishes it to the IPNS (InterPlanetary Name System). IPFS is a distributed file system that allows users to store and access files in a decentralized manner. IPNS is a naming system built on top of IPFS that allows users to create human-readable names for IPFS content. - -The script uses the ipfs-http-client library to interact with the IPFS network. It also uses the chalk and readline libraries for console output formatting. The script defines the IPFS gateway and IPNS gateway URLs, as well as the options for adding files to IPFS. - -The `pushDirectoryToIPFS` function takes a path to a directory and recursively adds its contents to IPFS using the `ipfs.add` method. The function returns the response from IPFS, which includes the content identifier (CID) of the added content. - -The `publishHashToIPNS` function takes an IPFS hash (CID) and publishes it to IPNS using the `ipfs.name.publish` method. The function returns the response from IPFS, which includes the IPNS name. - -The `nodeMayAllowPublish` function checks if the IPFS node allows publishing IPNS names. It does this by comparing the node's host URL to a blacklist of known nodes that do not allow IPNS publishing. - -The `deploy` function deploys the web application to IPFS and publishes it to IPNS. It first adds the contents of the `./build` directory to IPFS using `pushDirectoryToIPFS`. If the add operation fails, the function returns false. Otherwise, it publishes the IPFS hash to IPNS using `publishHashToIPNS` if the IPFS node allows it. Finally, the function outputs the IPFS and IPNS URLs for accessing the deployed application. - -To use this script, the user needs to have an IPFS node running. They can then run the script to deploy their web application to IPFS and publish it to IPNS. The script can be integrated into a larger project as part of a continuous deployment pipeline to automatically deploy new versions of the application to IPFS and IPNS. -## Questions: - 1. What is the purpose of this code? - - This code is used to deploy an application to IPFS (InterPlanetary File System) and publish it to IPNS (InterPlanetary Name System) for easy access. - -2. What are the dependencies of this code? - - This code depends on the `ipfs-http-client`, `chalk`, and `readline` packages. - -3. What is the difference between IPFS and IPNS? - - IPFS is a distributed file system that allows users to store and access files in a decentralized manner, while IPNS is a naming system that allows users to assign human-readable names to IPFS content. IPNS names can be updated to point to new content, while IPFS content is immutable. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/scripts/s3.md b/.autodoc/docs/markdown/lab/scripts/s3.md deleted file mode 100644 index cb1508e20..000000000 --- a/.autodoc/docs/markdown/lab/scripts/s3.md +++ /dev/null @@ -1,33 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/s3.js) - -This code is responsible for creating an AWS S3 bucket and uploading a directory to it. The code first imports the necessary dependencies, including the `s3-folder-upload` package and the `fs` module. It then sets the name of the directory to be uploaded to the `build` directory and the name of the S3 bucket to be created to `testbucket.xyz`. - -The code then checks if a bucket name has been set and exits the process if it has not. It also reads the AWS credentials from a file called `aws.json` and sets the bucket name in the credentials object. - -The code then creates an S3 service object and uses it to create a new bucket with the specified name. It also sets the bucket's website configuration to use `index.html` as the index document and `index.html` as the error document. - -Once the bucket is created, the code uploads the contents of the `build` directory to the bucket using the `s3FolderUpload` function from the `s3-folder-upload` package. - -This code can be used as part of a larger project to automate the deployment of a static website to an S3 bucket. By running this code, developers can create a new bucket and upload the contents of the `build` directory to it with a single command. - -Example usage: - -``` -// Import the code from the file -const deployToS3 = require('./path/to/s3.js'); - -// Call the function to create the bucket and upload the directory -deployToS3(); -``` -## Questions: - 1. What is the purpose of this code? - - This code is used to create an S3 bucket and upload a directory to it. - -2. What is the significance of the `aws.json` file? - - The `aws.json` file contains the AWS credentials required to access the S3 bucket. It is read by the code to authenticate the user. - -3. What are the options available for the `s3FolderUpload` method? - - The `s3FolderUpload` method takes an optional `options` parameter that can be used to configure the upload process. The available options are `useFoldersForFileTypes` and `useIAMRoleCredentials`. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/scripts/watch.md b/.autodoc/docs/markdown/lab/scripts/watch.md deleted file mode 100644 index ae73f87e6..000000000 --- a/.autodoc/docs/markdown/lab/scripts/watch.md +++ /dev/null @@ -1,22 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/scripts/watch.js) - -The code above is a Node.js script that watches for changes in a specific directory and runs a command to compile and generate new files whenever a change is detected. The purpose of this script is to automate the process of compiling and generating files, which can be time-consuming and error-prone if done manually. - -The script uses two Node.js modules: `node-watch` and `child_process`. `node-watch` is used to watch for changes in the `./src/themes` directory, while `child_process` is used to execute the command to compile and generate files. - -The `run` function is responsible for executing the command to compile and generate files. It uses the `exec` method from the `child_process` module to run the command `npx gulp less`. This command is used to compile `.less` files into `.css` files using the Gulp task runner. The function also logs the output of the command to the console. - -The `watch` function is used to watch for changes in the `./src/themes` directory. Whenever a change is detected, the function logs the name of the file that was changed to the console and calls the `run` function to compile and generate new files. - -Finally, the script calls the `run` function once at the beginning to compile and generate files for the first time. - -This script can be used in a larger project to automate the process of compiling and generating files whenever changes are made to the source files. For example, in a web development project, this script can be used to compile `.less` files into `.css` files whenever changes are made to the `.less` files. This can save time and reduce errors by automating a repetitive and error-prone task. -## Questions: - 1. What does this code do? - This code sets up a watch on the `./src/themes` directory and runs a Gulp task to compile LESS files whenever a change is detected in that directory. - -2. What dependencies does this code have? - This code requires the `node-watch` and `child_process` modules to be installed. - -3. What command should be run to start this code? - This code can be started by running the file with Node.js (`node filename.js`) or by incorporating it into a larger Node.js project. \ No newline at end of file diff --git a/.autodoc/docs/markdown/lab/src/App.md b/.autodoc/docs/markdown/lab/src/App.md deleted file mode 100644 index 5104637b8..000000000 --- a/.autodoc/docs/markdown/lab/src/App.md +++ /dev/null @@ -1,37 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/lab/src/App.css) - -The code provided is a CSS file that defines the styling for the `.App` class. The purpose of this code is to center the text within any HTML element that has the `.App` class applied to it. This code can be used in conjunction with HTML and JavaScript to create a user interface for a web application. - -For example, if we have an HTML file with the following code: - -``` -Explore our collection of animals.
-Current amount: {amount} ETH
-Current value: ${amount * price}
-Explore our collection of animals and exhibits.
-Address: {address}
-Balance: {balance}
-Contract is deployed!
:Contract is not deployed.
} -Current price: {price}
-Current gas price: {gasPrice} wei
-Count: {count}
- -Address: {address}
-ENS Name: {ensName}
-Nonce: {nonce}
-Signed transaction: {signedTx}
-Current block number: {blockNumber}
-Count: {count}
-This text is highlighted
-Total price: {totalPrice}
-Total: {data.total}
- -Text copied to clipboard!
} -{token.description}
-Price: {token.market.floorAsk.price.amount}
- {token.isInCart ? ( - - ) : ( - - )} -Count: {count}
- -Loading...
} - {royaltyInfo.error &&Error: {royaltyInfo.error.message}
} - {royaltyInfo.data && ( -Posted {
This is a post
-{response.collection.description}
-This token is banned on OpenSea.
- } else { - returnThis token is not banned on OpenSea.
- } -} -``` -## Questions: - 1. What is the purpose of this code? - This code is a React hook that checks if a given token on a given contract is banned on OpenSea. - -2. What is the '@reservoir0x/reservoir-sdk' package used for? - The '@reservoir0x/reservoir-sdk' package is used to check if a given token is banned on OpenSea. - -3. What happens if either the contract or tokenId parameters are not provided? - If either the contract or tokenId parameters are not provided, the hook will return false for isBanned. \ No newline at end of file diff --git a/.autodoc/docs/markdown/ui/src/hooks/useTokens.md b/.autodoc/docs/markdown/ui/src/hooks/useTokens.md deleted file mode 100644 index 0e029dc7c..000000000 --- a/.autodoc/docs/markdown/ui/src/hooks/useTokens.md +++ /dev/null @@ -1,50 +0,0 @@ -[View code on GitHub](zoo-labs/zoo/blob/master/ui/src/hooks/useTokens.ts) - -This code exports a function that retrieves token details from a Reservoir API endpoint. The function takes in three optional parameters: `options`, `swrOptions`, and `chainId`. - -`options` is an object that contains query parameters to be sent with the API request. If `options` is not provided or is falsey, the function returns null. - -`swrOptions` is an object that contains options for the SWR library, which is used to handle caching and revalidation of the API response. The default options are set to revalidate on mount and not on the first page. - -`chainId` is an optional parameter that specifies the ID of the chain to use for the API request. If `chainId` is provided, the function searches for the chain with the matching ID in the client's list of chains. If `chainId` is not provided, the function uses the current chain from the client. - -The function then calls `useInfiniteApi` from the `./` module, passing in a callback function and the `swrOptions` object. The callback function takes in two parameters: `pageIndex` and `previousPageData`. `pageIndex` is the index of the current page being fetched, and `previousPageData` is the data from the previous page. - -The callback function constructs the API endpoint URL using the `chain` object and the `/tokens/v6` endpoint path. It then sets the query parameters using the `options` object and the `setParams` function from the `@reservoir0x/reservoir-sdk` module. If `normalizeRoyalties` is not specified in the query parameters and the client has a `normalizeRoyalties` property, the function sets `normalizeRoyalties` to the client's value. - -If `previousPageData` is truthy and has a `continuation` property, the function sets the `continuation` query parameter to the value of `previousPageData.continuation`. This allows the function to fetch subsequent pages of data. If `previousPageData` is falsy and `pageIndex` is greater than 0, the function returns null. - -The callback function then returns an array containing the constructed URL, the chain's API key, and the client's version. This array is used by `useInfiniteApi` to make the API request. - -The function then extracts the `tokens` array from the API response data and returns an object containing the `response` object from `useInfiniteApi` and the `tokens` array. - -This function can be used to fetch token details from the Reservoir API and handle pagination of the response data using the SWR library. An example usage of this function might look like: - -``` -import useTokens from './useTokens' - -function TokenList() { - const { data, error, size, setSize } = useTokens({ limit: 10 }) - - if (error) returnHere's a cool hexagon icon:
-Capital: {country.capital}
-Population: {country.population}
-Can you spot the bird in this image?
-This is the content of my modal.
-Price: $10.00
-Selected currency: {selectedCurrency.symbol}
-Collapsible content goes here
-Value: {value}
-