Git Product home page Git Product logo

axiom-quickstart's Introduction

Axiom Quickstart

Introduction

This starter repo is a guide to get you started making your first Axiom query as quickly as possible using the Axiom SDK. To learn more about Axiom, check out the developer docs at docs.axiom.xyz or join our developer Telegram.

Setup

Install npm or yarn or pnpm:

# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
source ~/.bashrc
# Install latest LTS node
nvm install --lts
# Install pnpm
npm install -g pnpm
pnpm setup
source ~/.bashrc

To install this project's dependencies, run

pnpm install

Copy env.example to .env and fill in with your provider URL (and optionally Goerli private key). You can export your Goerli private key in Metamask by going to "Account Details" and then "Export Private Key".

โš ๏ธ WARNING: Never use your mainnet private key on a testnet! You should never use a private key for an account you have on both mainnet and a testnet.

Run

To run the script in index.ts that sends a query to AxiomV1QueryMock on Goerli testnet, run

pnpm start

Validate Witness

For an example of how to read your query results from AxiomV1QueryMock after they are fulfilled, see getWitness.ts. This can be used to generate calldata for apps using Axiom.

Run the script with

pnpm getWitness

This particular script was used to generate the test data for the Uniswap V3 TWAP demo app smart contract.

axiom-quickstart's People

Contributors

yi-sun avatar wuminzhe avatar jonathanpwang avatar ytham avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.