Skip to content

Instantly share code, notes, and snippets.

View mccallofthewild's full-sized avatar

McCall Alexander mccallofthewild

  • Cosmos
View GitHub Profile
#!/usr/bin/env bash
set -euo pipefail
usage() {
cat <<'USAGE'
Usage: install.sh [latest|TAG|VERSION]
Downloads the precompiled Done CLI binary that matches your platform and installs it globally.
Specify a GitHub release tag (e.g. v0.1.4) or semantic version (e.g. 0.1.4). Defaults to latest.
USAGE
@mccallofthewild
mccallofthewild / cw-ibc-price-oracle-example.rs
Created October 2, 2022 23:10
Cosmwasm IBC Price Oracle Example
# Reference: https://github.com/CosmWasm/cosmwasm/blob/main/contracts/ibc-reflect/src/contract.rs
<!-- msg.rs -->
#[cw_serde]
pub enum PacketMsg {
Dispatch { msgs: Vec<CosmosMsg> },
WhoAmI {},
Balances {},
UpdatePrice { denom: String, price: Uint128 }
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"name": "Sifchain",
"logoURI": "https://dex-sifchain-finance.ipns.dweb.link/images/tokens/ROWAN.svg",
"keywords": [
"peggy",
"pegged assets",
"cosmos ecosystem"
],
"tags": {},
"timestamp": "2021-09-10T21:47:27.416Z",
function decodeHtml(html) {
var txt = document.createElement('textarea');
txt.innerHTML = html;
return txt.value;
}
let renderTemplateElements = (state: State) => {
const stateful = document.querySelectorAll('[stateful]');
const elementsToTemplates = new Map<Element, string>();
function renderer(state: State) {
// 🚨🚨 THIS DOESN'T WORK 🚨🚨
class DataService {
// ...
async constructor () {
this.data = [];
await this.loadData();
}
// ...
}
@mccallofthewild
mccallofthewild / async-constructor-starter.js
Last active August 17, 2018 01:02
Async Constructor Examples for Medium Article.
/** Class for loading, storing, and managing data. */
class DataService {
/**
* Creates a DataService.
* Initializes `data` property with an empty array.
*/
constructor () {
this.data = [];
}

Keybase proof

I hereby claim:

  • I am mccallofthewild on github.
  • I am mccallalexander (https://keybase.io/mccallalexander) on keybase.
  • I have a public key ASAMXBEmpRzZC9K_uH-2cOytwVJX1dGCztch6C86SND_9Qo

To claim this, I am signing this object: