Skip to content

Instantly share code, notes, and snippets.

View anonymoussprocket's full-sized avatar
🌴
On vacation

anonymoussprocket

🌴
On vacation
View GitHub Profile
@anonymoussprocket
anonymoussprocket / mockContract.ts
Created July 21, 2022 21:35
Mock a mainnet contract dynamically
import fetch from 'node-fetch';
import { smock } from '@defi-wonderland/smock';
async function deployMockContractFromAddress(contractAddress: string, etherscanKey: string) {
const abi = await fetch(`https://api.etherscan.io/api?module=contract&action=getabi&address=${contractAddress}&apikey=${etherscanKey}`)
.then(response => response.json())
.then(data => JSON.parse(data['result']));
return smock.fake(abi, {address: contractAddress});
}
I am attesting that this GitHub handle anonymoussprocket is linked to the Tezos account tz1eU1NCk7U6sNxDKos7CJMM7P97bW3wyGB1 for tzprofiles
sig:edsigtwwTgkiJZuqnGFDgsHsfV1Ejt8K2WXhD6Nei8WKgHr8CnbHrvcqJoUpT1LwRgzHWtPzqxQZ5itS4LHTC3KNX7iyNbhSCq1
@anonymoussprocket
anonymoussprocket / README.md
Last active January 15, 2022 04:35
Querying Tezos historical data with Conseil

Querying Tezos historical data with Conseil

<html>
<head>
<style>
#hen-embed {
border: 1px solid black;
height: 800px;
width: 500px;
}
</style>
<script>
@anonymoussprocket
anonymoussprocket / README.md
Last active November 11, 2020 05:10
TZIP-7/FA1.2 token sample #87651

blah

@anonymoussprocket
anonymoussprocket / README.md
Last active May 14, 2021 05:07
Tezos FA1.2 token workflow sample

Tezos FA1.2 token workflow sample

The purpose of this script is to demonstrate common operations on an FA1.2 token on the Tezos platform using the ConseilJS library and Nautilus Cloud infrastructure.

Workflow Outline

Using

@anonymoussprocket
anonymoussprocket / README.md
Last active November 28, 2020 18:09
Tezos Token Tantrum
@anonymoussprocket
anonymoussprocket / README.md
Last active May 16, 2020 02:17
Tezos Commons Baker Registry demo

Description

This is an example of how to extract data from the Tezos Commons Baker Registry on Tezos mainnet, the details of which are outlined in this Tezos Agora thread. It works by querying Conseil for all registered bakers that are not deactivated, have a staking balance and delegated balance greater than 0. We use these filters as a proxy for identifying public bakers. You can see this result set on [Arronax](https://arronax.io?e=Tezos%20Mainnet/delegates&amp;q=eyJmaWVsZHMiOlsiYmxvY2tfbGV2ZWwiLCJwa2giLCJiYWxhbmNlIiwiZGVsZWdhdGVkX2JhbGFuY2UiLCJzdGFraW5nX2JhbGFuY2UiXSwicHJlZGljYXRlcyI6W3siZmllbGQiOiJkZWFjdGl2YXRlZCIsIm9wZXJhdGlvbiI6ImVxIiwic2V0IjpbZmFsc2VdLCJpbnZlcnNlIjpmYWxzZX0seyJmaWVsZCI6InN0YWtpbmdfYmFsYW5jZSIsIm9wZXJhdGlvbiI6Imd0Iiwic2V0IjpbIjAiXSwiaW52ZXJzZSI6ZmFsc2V9LHsiZmllbGQiOiJkZWxlZ2F0ZWRfYmFsYW5jZSIsIm9wZXJhdGlvbiI6Imd0Iiwic2V0Ijp

@anonymoussprocket
anonymoussprocket / README.md
Last active December 15, 2019 18:48
Tezos testnet balance accumulator

Purpose

A quick way to transfer balances from multiple testnet faucet files to a target account. This is useful for example if you would like to run a baker.

Requirements

nodejs 10.17+.

Usage

@anonymoussprocket
anonymoussprocket / README.md
Last active June 17, 2021 14:37
Basic smart contract interaction UI example in HTML with ConseilJS

Purpose

This is the full code for an simplistic dApp on Tezos. It is presented as part of the Cryptonomic dApp development curriculum with ConseilJS & SmartPy. The relevant discussion of this code is in Part 6.

Environment

To get access to Tezos & Conseil infrastructure signup for an account at Nautilus Cloud. The missing parameters in the code below will come from there.

Confirmed Environment Configurations