Skip to content

Instantly share code, notes, and snippets.

View arivictor's full-sized avatar
πŸ‘‹
Hola, mi nombre es Ari

Ari Victor arivictor

πŸ‘‹
Hola, mi nombre es Ari
View GitHub Profile
@arivictor
arivictor / vamp.ts
Last active August 24, 2022 12:47
Makes best effort to get hash list of master edition collections
import {JsonMetadata, Metadata, Metaplex, TaskStatus} from "@metaplex-foundation/js";
import {Connection, PublicKey, ConfirmedSignatureInfo} from "@solana/web3.js";
import * as fs from "fs";
const RPC_URL = 'https://...';
const MASTER_EDITION_ADDRESS = '...FHaH';
const RESULT_OUTPUT_PATH = './hashlist.json';
(async () => {
const connection = new Connection(RPC_URL);
project/
β”œβ”€ environments/
β”‚ β”œβ”€ dev/
β”‚ β”‚ β”œβ”€ buckets/
β”‚ β”‚ β”œβ”€ networks/
β”‚ β”‚ β”œβ”€ iam/
β”‚ β”‚ β”œβ”€ servers/
β”‚ β”œβ”€ prod/
β”‚ β”‚ β”œβ”€ buckets/
β”‚ β”‚ β”œβ”€ networks/
terraform {
backend "gcs" {
bucket = "tf-state"
prefix = "project/buckets"
}
}
project/
β”œβ”€ buckets/
β”‚ β”œβ”€ main.tf
β”‚ β”œβ”€ backend.tf
β”‚ β”œβ”€ providers.tf
β”‚ β”œβ”€ variables.tf
β”‚ β”œβ”€ terraform.tfvars
β”œβ”€ networks/
β”‚ β”œβ”€ main.tf
β”‚ β”œβ”€ backend.tf
terraform {
backend "gcs" {}
}
project/
β”œβ”€ main.tf
β”œβ”€ backend.tf
β”œβ”€ providers.tf
β”œβ”€ variables.tf
β”œβ”€ testing.tfvars
β”œβ”€ production.tfvars
β”œβ”€ development.tfvars
bucket_name = "my-bucket"
bucket_location = "asia"
variable "bucket_name" {
type = string
description = "Bucket Name (Required)"
}
variable "bucket_location" {
type = string
description = "Bucket Location (Default: US)"
default = "US"
}
resource "google_storage_bucket" "bucket" {
name = var.bucket_name
location = var.bucket_location
}
project/
β”œβ”€ main.tf
β”œβ”€ backend.tf
β”œβ”€ providers.tf
β”œβ”€ variables.tf
β”œβ”€ terraform.tfvars