Skip to content

An example repo of how wildcards can use DirectAuth to give our users a smooth and familiar web2 like experience

Notifications You must be signed in to change notification settings

wildcards-world/direct-auth-easy-onboarding-spike

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Live example

Bridge - Persist data from Skale to Arweave Tweet

Preview image

Need info? Join the Skale Discord | or Create an issue | Built with 💚 by Avo Labs

GitHub issues GitHub pull requests License Contributions welcome Awesome

Summary

The Bridge project is a tool allowing Skale node operators to easily persist 'snapshots' of Skale sub-chains at a specified frequency. The data is uploaded to Arweave, a decentralized solution for eternal storage.

How the bridge works? It Loads data from the skale chain via the RPC snapshot endpoint and pushes it to Arweave at a predetermined interval with simple UI.

Backend

Start the backend via docker-compose: make start-dev

When hasura is in a bad state :) make hard-restart-dev

Hasura

Development

First copy the .example.env file to .env. Change the passwords ports as desired.

Start Hasura:

make start-dev

Print Hasura logs:

make hasura-logs

Restart: (this keeps the database data intact)

make restart-dev

Restart and clear all data:

make hard-restart-dev

Migrations

HASURA_GRAPHQL_ENABLE_CONSOLE=false So that it isn't possible to run migrations via the console.

Install cli: npm install --global hasura-cli

Initialise new hasura project (Not needed for general use, this project is already initialised - ie don't run):

hasura init --directory my-project --endpoint https://api.wildcards.world

Run migrations:

(Please add a space at the beginning of this line so that it doesn't save the password into your bash-history. We will find a better way to handle this when we are more established.)

hasura migrate apply --admin-secret <your password>

Access the hasura console:

hasura console --admin-secret <your password>

Note, you can use an env file to avoid the need for typing passwords in the terminal. You specify the env file using --envfile <path-to-env-file>.

Extra

Config hasura to autocomplete when typing in terminal docs

hasura completion zsh --file=\$HOME/.zprezto/modules/completion/external/src/\_hasura

UI

start ui

cd ui && yarn dev

build scss (needed when creating a new scss file)

cd ui && yarn scss

build ui

cd ui && yarn build

big dev helper for compile time errors

cd ui && re:watch

If and when you ever make changes to the graphql schema you should update the file called graphql_schema.json which is autogenerated via cd ui && yarn update-schema. This file should be commited to git.

Under the hood / Behind the scenes

About

An example repo of how wildcards can use DirectAuth to give our users a smooth and familiar web2 like experience

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published