Skip to content

Instantly share code, notes, and snippets.

View drewstaylor's full-sized avatar
:octocat:
Meow

Drew Taylor drewstaylor

:octocat:
Meow
View GitHub Profile
@drewstaylor
drewstaylor / archid-check-domain-exists.rs
Last active October 6, 2023 19:26
ArchID 3rd party integration examples
// You can check if domain name already exists by querying the
// `ResolveRecord` entry point of the Registry contract; however,
// it should be noted this query will return an error for domain
// names that are available, and a DNS record for domains that do
use cosmwasm_std::{to_binary, QueryRequest, WasmQuery,};
use crate::archid_registry;
let registry_contract = "Registry contract address goes here";
let desired_domain_name = "archid.arch";
const CwStargate = require("@cosmjs/cosmwasm-stargate");
const RPC = process.env.RPC;
const CONTRACT = process.env.CONTRACT;
async function cwClient() {
const cwClient = await CwStargate.SigningCosmWasmClient.connectWithSigner(RPC, null);
return cwClient;
}
@drewstaylor
drewstaylor / cwClient.null-signer.js
Created July 11, 2022 19:53
CW null signer instance (read only)
const CwStargate = require("@cosmjs/cosmwasm-stargate");
async function getClient() {
const cwClient = await CwStargate.SigningCosmWasmClient.connectWithSigner("https://rpc.constantine-1.archway.tech",null);
return cwClient;
}
async function main() {
let client = await getClient();
let queryHandler = client.queryClient.wasm.queryContractSmart;
@drewstaylor
drewstaylor / uAES.py
Created November 3, 2021 16:10
Uanon AES Tool in Python
#!/usr/bin/python3
import base64
import sys
from Crypto import Random
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = AES.block_size
@drewstaylor
drewstaylor / package.json
Last active July 29, 2021 15:44
Change IPFS Provider in Taquito 9.2
{
"name": "ipfs-gateway-test",
"version": "1.0.0",
"description": "",
"main": "fa2.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "node tzipIpfsProvider.js"
},
"keywords": [
@drewstaylor
drewstaylor / balanceOf.js
Last active July 26, 2021 16:21
FA2 balance_of request in Node.js
const TezosToolkit = require('@taquito/taquito')
const compose = require('@taquito/taquito');
const tzip12 = require('@taquito/tzip12');
const Tzip12Module = require('@taquito/tzip12');
const tzip16 = require('@taquito/tzip16');
const Tzip16Module = require('@taquito/tzip16');
const importKey = require('@taquito/signer').importKey;
const Tezos = new TezosToolkit.TezosToolkit("https://mainnet-tezos.giganode.io");
@drewstaylor
drewstaylor / fa2.js
Created July 26, 2021 08:11
Get Tezos FA2 Token
const TezosToolkit = require('@taquito/taquito')
const compose = require('@taquito/taquito');
const tzip12 = require('@taquito/tzip12');
const Tzip12Module = require('@taquito/tzip12');
const tzip16 = require('@taquito/tzip16');
const Tzip16Module = require('@taquito/tzip16');
const Tezos = new TezosToolkit.TezosToolkit("https://mainnet-tezos.giganode.io");
Tezos.addExtension(new Tzip12Module.Tzip12Module());
@drewstaylor
drewstaylor / github-user-stats.md
Last active May 2, 2022 16:46
Show GitHub User Data

Drew Taylor's Github Stats

Top Langauges

Readme Card

Readme Card

Readme Card

@drewstaylor
drewstaylor / 27547452418984864.rs
Last active August 4, 2021 19:55
SATOSHI'S LOST FAUCET - Genesis Exhibit (-50n shills)
/**
* Leonard is having trouble with his program, but the flame is its own reflection. Perhaps his coding skills are just rusty.
* Do you have the patience and memory capacity to compute this simplest of equations? Shouldn't human brain power be enough?
*/
fn make(n: u32) -> u32 {
match n {
0 => 1,
1 => 1,
_ => make(n-1) + make(n-2),
}
@drewstaylor
drewstaylor / hypercube.m
Created June 28, 2021 12:31 — forked from krazkidd/hypercube.m
Tesseract (hypercube) in Matlab
% 4-Dimensional Object: The Tesseract
% Matlab script
%
% Copyright 2009 Ian E., Adam H., Mark Ross <krazkidd@gmail.com>
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%