Skip to content

Instantly share code, notes, and snippets.

View ries9112's full-sized avatar

ries9112

View GitHub Profile
@ries9112
ries9112 / wwwwwwwwwwindows Exhibition CV Script
Last active February 15, 2022 15:16
The script for the skulls in the wwwwwwwwwwindows exhibition in CV
// FINAL SCRIPT
let skull_trigger = 0
// set length of timer for art changing
let numSecs=30
// read in all features to overwrite URLs
let w1 = parcel.getFeatureById('w1')
let w1i = parcel.getFeatureById('w1i')//finger icon for interactive objkt
@ries9112
ries9112 / CV_backup.yml
Created July 15, 2021 12:37
arweave CV backups GithubActions
name: Automated Backups Cryptovoxels
on:
schedule:
- cron: '0 10 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ries9112
ries9112 / CV_API_pull.R
Created August 22, 2021 02:31
R script that pulls all data for CV parcels, then collects data about their prices using opensea API
# https://wiki.cryptovoxels.com/en/External-API
# Pull data from opensea using vox tokenIDs pulled in grt_vox_pull_tokenID.R
library(jsonlite)
library(httr)
library(tidyverse)
# example
url <- 'https://www.cryptovoxels.com/api/parcels.json'
# Get the data from the url
@ries9112
ries9112 / CV_pull_TheGraph
Created June 29, 2021 11:53
CV pull data using TheGraph
// add script to a button inside Cryptovoxels to return a response
feature.on('click',e=>{
// Use GraphQL endpoint to pull data and make model that takes x,y Decentraland coordinates and returns prediction based on the latest 10 sales!
fetch('https://api.thegraph.com/subgraphs/name/decentraland/marketplace', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
@ries9112
ries9112 / CV_arweave_backups.yml
Created March 13, 2022 21:48
Script to automate upload of CV parcel content to arweave
name: Automated Backups Cryptovoxels
on:
schedule:
- cron: '0 10 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
library(ghql)
library(jsonlite)
library(tidyverse)
# connect to endpoint
con = GraphqlClient$new(
url = "https://api.thegraph.com/subgraphs/name/graphprotocol/graph-network-analytics"
)
# initialize a new query
graphql_request = Query$new()
@ries9112
ries9112 / CV_TheGraph_delegation_pull.R
Created May 16, 2022 09:44
A script that makes an API request using the users's address to make a plot of the user's delegation on The Graph
let image_show = parcel.getFeatureById('image_show_delegation')
feature.on('click',e=>{
image_show.set({'url':"http://r-cv-api.org/delegation/delegations_unrealized_rewards?delegator="+e.player.wallet})
console.log(e.player.wallet)
})
import * as ethUtil from 'ethereumjs-util';
console.log('got here');
window.ethUtil = ethUtil;