Skip to content

Instantly share code, notes, and snippets.

@toml01
toml01 / export.json
Created March 8, 2020 12:29
Bad state export cosmos-sdk v0.38.
{"app_hash":"","app_state":{"auth":{"accounts":[{"type":"cosmos-sdk/Account","value":{"account_number":3,"address":"enigma18puz3k8c5863ell0ffg4z7gkmy78vz2uvp2vcw","coins":[],"public_key":"enigmapub1addwnpepqgzd4k2lltgcmk79gv6nl6u3ladharyd8q7cyxuhkzm8u8r8v79u6wx7rf9","sequence":2}},{"type":"cosmos-sdk/Account","value":{"account_number":4,"address":"enigma18ch86qqlgnr8v3n9dpzlvaw8yzyz5snc3nmd5k","coins":[{"amount":"999900000000","denom":"uscrt"}],"public_key":"enigmapub1addwnpepqvh3226azjxgjzs966cwlq60aes07ejjptrqcfnsckflxecxu6k6usl4khw","sequence":1}},{"type":"cosmos-sdk/ModuleAccount","value":{"account_number":1,"address":"enigma1fl48vsnmsdzcv85q5d2q4z5ajdha8yu3ynsnu4","coins":[{"amount":"100000000","denom":"uscrt"}],"name":"bonded_tokens_pool","permissions":["burner","staking"],"public_key":"","sequence":0}},{"type":"cosmos-sdk/Account","value":{"account_number":11,"address":"enigma12rj5fx0fwk0j5yvnh6sf9cdpecnypqhgyx3mwj","coins":[{"amount":"999999999999829","denom":"uscrt"}],"public_key":"enigmapub1addwnpep
@toml01
toml01 / clock_sync.bat
Last active April 19, 2020 13:38
Automatic clock sync
REM For this to work, you need to run it as admin
REM Create a shortcut of this file, go to Properties -> Shourcut -> Advanced -> Run as admin
REM Point the .vbs file to the shortcut
w32tm /resync
@toml01
toml01 / 01-holo-master.sh
Last active November 25, 2021 11:42
SEFI liquidity mining initialization scripts - testnet
#!/bin/bash
set -e
function wait_for_tx() {
until (secretcli q tx "$1"); do
sleep 5
done
}
@toml01
toml01 / legendao_apis.md
Created April 6, 2022 15:19
LegenDAO APIs Description

Platform

Transactions

/// Once a user redeems, the amount redeemed starts the unconding period
Redeem {
    amount: Option<Uint128>,
},
/// Once an unbonding is vested, the user can claim it (claims everything that is available to claim)
# This commands are using `secretcli`
# It is possible to use the same messages using `secretjs` or any preferred client
CONTRACT_ADDRESS="secret19prkwdj0yue044rrleszga3e4t5x2fypzrcg82"
BENEFICIARY_ADDRESS="<enter address here>"
# Query beneficiaries for the fund
secretcli q compute query "$CONTRACT_ADDRESS" '{"get_beneficiaries":{}}'
# Query beneficiary's available balance
@toml01
toml01 / cursor_fix.sh
Created September 5, 2024 14:22
Automate cursor symlink fix for WSL (building on top of @swayducky 's great gist!)
#! /bin/bash
# HOW TO INSTALL:
# 1) Save this script as cursor_fix.sh
# 2) chmod +x cursor_fix.sh
# 3) ./cursor_fix.sh
wget -O cursor_fix_template https://gist.githubusercontent.com/swayducky/8ba8f2db156c7f445d562cdc12c0ddb4/raw/6c3a3c0be667ed487de5c6fd94fad7a7d8e5d61f/cursor
perl -i -pe 's/<YOUR_USERNAME>/`cmd.exe \/c echo %USERNAME% 2>\/dev\/null | tr -d "\r\n"`/ge' cursor_fix_template
perl -i -pe 's/ln -s "\$MY_CLI_DIR_YO\/cursor" "\$MY_CLI_DIR_YO\/code"/ln -sf "\$MY_CLI_DIR_YO\/cursor" "\$MY_CLI_DIR_YO\/code"/g' cursor_fix_template