🤖VibeCode Prompt Guide

Set up

  1. Download Cursor

  2. Create a SEDA wallet on Keplr

    1. Request SEDA Testnet tokens from the faucet: https://testnet.explorer.seda.xyz/faucet

    2. Search for “SEDA” in the Keplr wallet search bar and select “SEDA (TESTNET), then enable “SEDA Testnet” in the “Manage Assets List” menu

  3. Open a new Cursor window and clone the SEDA github: https://github.com/sedaprotocol/seda-starter-kit

Customizing your Oracle Program

Prompt: copy the whole text below

Review all documentation to build, test, and deploy an Oracle Program to the SEDA Network. Please start by preparing the development environment and install tools/dependencies that are needed to work with this Oracle Program from the SEDA starter kit.

Prompt: copy the whole text below AFTER customizing the inputs in square brackets.

I’m building an oracle program on the SEDA Network. This has two steps the execution phase and the tally phase. The example calls a Binance API and returns the price on-chain.

I would like to customize the Oracle Program to call [X] API to return [X] type of data. You can find more information about the API structure in the documentation at [X] website. I have created an API key with this company which can be found here: [insertapikey]

Deploying your Oracle Program and Posting a Data Request

Creating your .env file

The .env file holds sensitive data such as private keys and contract IDs and is required to deploy your Oracle Program and run data requests. Due to the sensitive data, Cursor cannot directly edit this file, you will need to create it manually by following these steps"

  1. Copy and paste the .env.example file and rename the copied file to '.env'

  2. Add your SEDA_MNEMONIC phrase

  3. Save the file

Note: after the Oracle Program has been deployed and we have the Oracle Program ID, we will add it to the ORACLE_PROGRAM_ID and save again in order to run a Data Request.

Prompt: copy the whole text below

Build and deploy the oracle program and post a data requests by utilizing the SEDA SDK.

Add the Oracle Program to my .env file and get ready to deploy my first data request

Now your Oracle Program has been deployed you can copy the Oracle Program ID and paste it into your .env file (remember to save the file).

How to view the result of your Data Request

Visit the SEDA explorer to view your Oracle Program and check the results of your Data Requests.

https://testnet.explorer.seda.xyz/

Bun Run Guide

These are commands Cursor requires you to click "run" as part of the process when vibe coding an oracle program.

  • Bun run build = Build the Oracle Program

  • Bun run install = Install dependencies

  • Bun run deploy = Deploy your program to SEDA

  • Bun Run post-dr= Activates your program and requests data via SEDA

Tips & Tricks

Like any LLM, it's common to experience hallucinations, strange responses and errors. The same prompt can result in different outputs and it's important to pay attention to what Cursor is telling you it will do to ensure it's staying on track. Below are some common errors and ways to minimize issues.

Many issues arise from the data provider. Ensure your API is up to date and returns the expected data prior to asking Cursor to build an Oracle Program with it. You can simply prompt Cursor to query the API for the desired data and return it for you to inspect.

It's common for Cursor to leave parts of the template in Oracle Program. It may be necessary to ask Cursor to ensure it has removed and replaced any template content from the Binance example with your desired Oracle Program.

Consensus errors are probably the most frequent issue you will experience when running data requests. After experiencing a failed data request, copy and paste the Reveal Standard Output and Reveal Standard Error outputs from the Reports tab and ask it to debug. It's common to go through a few rounds of debugging (this may include redeploying the Oracle Program, adding the new ID to the .env file and running a data request).

Last updated

Was this helpful?