Skip to content

Instantly share code, notes, and snippets.

View rdixon22's full-sized avatar

Rob Dixon rdixon22

View GitHub Profile
@rdixon22
rdixon22 / exampleOutput.json
Created January 22, 2021 00:37
Just a suggestion about a way to create OpenSea-style metadata for an ArtBlocks token.
{
"external_url": "https://api.artblocks.io/generator/18000234",
"name": "MyProject by Me #234",
"image": "https://api.artblocks.io/generator/18000234.jpg",
"attributes": [{
"trait_type": "serial_num",
"value": 234,
"max_value": 500,
"display_type": "number"
},
@rdixon22
rdixon22 / artblocks_page_template.html
Last active March 14, 2021 04:14
Here's a simple web page template to use for testing an artblocks.io project. It generates a random hash and token ID each time the page reloads. It assumes a p5.js project (pulling that from a CDN to limit dependencies). Your project code goes in myproject.js.
<!DOCTYPE html>
<html lang="en">
<head>
<script>
// Generates a random hash and token id each time you reload, in the following format
//let tokenData = {"hash":"0xd9134c11cd5ed9798ea0811364d63bd850c69c5d13383c9983ade39847e9ea86","tokenId":"99000000"};
function genTokenData(projectNum)
{
let data = {};