Skip to content

Instantly share code, notes, and snippets.

View aeither's full-sized avatar
:octocat:
building stuff

aeither aeither

:octocat:
building stuff
  • Metaverse
View GitHub Profile
# first line #
<!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</head>
<body>
<div class="cerchio-esterno">
<span class="luce-colore"></span>
<span class="luce-bianca"></span>
did:3:kjzl6cwe1jw148lyqqkqqr50zcxnr9nt3d51bxbywn5v6sge9xna09mqry7d2gi
@aeither
aeither / basicNFT.sol
Last active September 25, 2021 12:22
Basic NFT contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Counters.sol';
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol';
import 'https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol';
contract GameItem is ERC721URIStorage, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
@aeither
aeither / miniblog.sol
Created September 22, 2021 17:04
First miniblog contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract MiniBlog {
uint256 public latestPostId = 0;
struct User {
string username;
string bio;
uint256[] postIds;
import {
clusterApiUrl,
Connection,
Keypair,
LAMPORTS_PER_SOL,
PublicKey,
sendAndConfirmTransaction,
Transaction,
TransactionInstruction,
TransactionSignature,

TABLELAND Javascript SDK

  • connect > tableland > {create, siwe, write, read, receipt...}
  • create create tables for storing, querying, and relating data
  • write to manipulate rows
  • receipt to verify tx went through correctly
  • siwe get signer when connect from client side
  • hash for schema validation
  • list to see tables ids
  • set/get/lockController allow someone else to edit table
import * as web3 from "@solana/web3.js";
import { initializeKeypair } from "./initializeKeypair";
// Token Program
import * as token from "@solana/spl-token";
async function main() {
const connection = new web3.Connection(web3.clusterApiUrl("devnet"));
const user = await initializeKeypair(connection);
import { ethers } from "ethers";
import * as dotenv from "dotenv";
dotenv.config();
async function main() {
const API_KEY = process.env.API_KEY;
if (!API_KEY) {
console.log("No api key");
return;
}
@aeither
aeither / anchor_cheatsheet.rs
Last active September 20, 2022 10:29
Solana Anchor Lang Cheatsheet
// ---------------------------------------------------------- //
// Use Anchor Prelude
use anchor_lang::prelude::*;
// - Import mods
pub mod constant;
pub mod states;
use crate::{constant::*, states::*};