Skip to content

Files

Latest commit

 

History

History
164 lines (105 loc) · 4.97 KB

tutorial.mdx

File metadata and controls

164 lines (105 loc) · 4.97 KB
section title whatsnext
vrf
Page Title
Try out the advanced tutorial Get a random number using VRF
/product-path/tutorials/advanced
/vrf/v2/subscription/examples/get-a-random-number

{/* Fill out the fields in the frontmatter above.

  • Section: What section of the top-nav this page appears in dataFeeds, vrf, automation, chainlinkFunctions, nodeOperator
  • Title: The title appearing at the top of the page
  • What's Next: A list of pages to include in the What's Next section. Preferably imperative sentences describing the goal of the next page. */}

{/* Import components when necessary */} import { Aside } from "@components" import { YouTube } from "@astro-community/astro-embed-youtube"

{/* Add a brief description of the tutorial that leads into the Overview section */} This tutorial shows you how to build an example application.

{/* Add an overview description of the tutorial with significant conceptual information, architecture information, and descriptive diagrams. This section describes what the reader will build in the tutorial, what the completed tutorial demonstrates, and what use cases might be enabled by adopting the technology behind the tutorial. */}

Overview

This tutorial connects X to Y using Z.

{/* Include an architecture diagram if possible. */}

{/* Optional - A prerequisites section with an unordered list of what you need before you begin the tutorial. */}

Before you begin

Before you start this tutorial, complete the following items:

  • Item 1
  • Item 2
  • Item 3

{/* Heading names with ##

style. If

or

are required for sub-sections, add more # characters. */}

Setup the example

{/* Rename this heading to an imperative sentence relevant and specific to the task in this guide */}

{/* A brief description of the components the user will set up in the tutorial. Include an unordered list with heading links to the sub-sections */} This tutorial requires you to set up two primary components:

{/* Use sub-sections for major components of the tutorial. Usually multiple major components go into creating a tutorial. Separate each one into a different section if it makes sense. */}

Setup sub-section 1

{/_ Optional - Use the

component to call extra attention to risks, warnings, or potential issues. Available types are: note tip caution danger _/}

Example notice.

{/* Brief description of what components you are setting up and why it is necessary for the guide. */} Run ./setup-example to install the required config files.

{/* An ordered list of steps to run with example output and descriptions of each step where possible. */}

  1. Run the ./setup-example command.

    {/* Command to run for setting up */}

    ./setup-example

    This command prints the expected result.

    {/* Command output */}

    Expected results
    
  2. {/* Step 2 */}

    1. {/* Sub-step A */}
    2. {/* Sub-step B */}
  3. {/* Step 3 */}

{/* Sub-section 2 - Add additional sub sections for each major component of the tutorial. */}

Setup sub-section 2

{/* The section for running the tutorial and reaching the final result. */}

Run the example

{/* Rename this heading to an imperative sentence relevant and specific to the task in this guide */}

{/* Brief description for running or deploying the completed tutorial result. This section should be the final section of the tutorial instructions. */} Run the example in a terminal. When you are done, you will have a complete running solution.

{/* An ordered list of steps to run with example output and descriptions of what is happening in each step. */}

  1. Run the ./run-tutorial command.

    {/* Command to run */}

    ./run-tutorial

    This command prints the expected result.

    {/* Command output */}

    Expected result
    
  2. {/* Step 2 */}

  3. {/* Step 3 */}

{/* Optional - Include code examples and a description of how it works. If there are specific best practices or details that you want to call out, highlight them. */}

Code example

The main part of this tutorial is the test.js script.

{/* Add the code sample to the /public/samples folder and reference it using the CodeSample component. */}

{/* Describe the important parts of the code example and what they accomplish. */} This example has the following components:

  • const test: An example constant storing a string.
  • print(): A function used to print test to the console.

Summary (Optional)

{/* Add an optional summary leading into the What's Next links. */}

This example used the following parameters:

Parameter Value
Param 1 foo
Param 2 bar
Param 3 baz