Skip to content

Instantly share code, notes, and snippets.

@shapeshed
shapeshed / reset.sh
Created July 31, 2024 08:05
Reset validator state
#!/bin/sh
# Configuration
SNAPSHOT_URL=https://osmosis.fra1.cdn.digitaloceanspaces.com/osmosis-1/snapshots/v25/osmosis-snapshot-202407310709-18675339.tar.lz4
OSMOSIS_HOME=$HOME/.osmosisd
COSMOVISOR_SERVICE=cosmovisor
# Stop the Cosmovisor service
sudo systemctl stop $COSMOVISOR_SERVICE
if [ $? -ne 0 ]; then
@shapeshed
shapeshed / claimable_spreads.rs
Last active May 9, 2024 16:42
no claimable_spread_rewards / test-tube
// Setup
pub const TICK_SPACING: u64 = 100;
pub const SPREAD_FACTOR: &str = "1";
pub const BASE_DENOM: &str = "uosmo";
pub const QUOTE_DENOM: &str = "usdc";
gov.propose_and_execute(
CreateConcentratedLiquidityPoolsProposal::TYPE_URL.to_string(),
CreateConcentratedLiquidityPoolsProposal {
title: "Create concentrated uosmo:usdc pool".to_string(),
#!/usr/bin/env sh
#
# A script to test
# * the creation of a CW20 contract
# * the creation of a CW4 contract
# * the staking of CW20 tokens in the CW4 contract
CW20_CONTRACT_NAME=cw20_base.wasm
CW20_CONTRACT_URL=https://github.com/CosmWasm/cw-plus/releases/download/v0.13.4/cw20_base.wasm
CW4_CONTRACT_NAME=cw4_stake.wasm
wasm.execute(
&vault_address,
&deposit_msg,
&[Coin {
amount: deposit_amount,
denom: base_token.to_string(),
}],
&signer,
)
.unwrap();
#!/usr/bin/env bash
shopt -s nullglob globstar
typeit=0
if [[ $1 == "--type" ]]; then
typeit=1
shift
fi
@shapeshed
shapeshed / reading_list.md
Last active February 1, 2018 14:40
Cryptocurrency Reading List

Privacy

  • [Zerocash][1]
  • [Cryptonote][2]
  • [Mimblewimble][3]
  • [Tumblebit][4]
  • [Hawk][5]
  • [Mobius][6]
  • [Enigma][7]
  • [Dash][8]
@shapeshed
shapeshed / tmux settings
Last active August 29, 2017 15:32
tmux cricket status bar
set-option -g status on
set-option -g status-left-length 80
set-option -g status-interval 2
set-option -g status-left '#(curl -k -L -s http://www.cricinfo.com/ci/engine/match/1031661.html | pup "title text{}" | cut -d "|" -f 1)'
#!/bin/sh
xrandr --output HDMI2 --off --output HDMI1 --primary --mode 3840x2160 --scale 1x1 --pos 0x0 --rotate normal --output DP1 --off --output eDP1 --mode 3840x2160 --pos 0x2160 --rotate normal --output DP2 --off
@shapeshed
shapeshed / ethup.sh
Created August 16, 2017 09:01
ethup - bring up an eth cluster and unlock accounts
#!/usr/bin/env bash
set -eEu -o pipefail
NODES=(node0 node1)
ETHDATA=~/.ethraft
GETH=/home/go/.gvm/pkgsets/go1.8.1/global/src/github.com/ethereum/go-ethereum/build/bin/geth
VERBOSITY=9
for n in ${NODES[@]}; do
0xF436D87D0F0238F1078392cc6c58E7798a81E8fD