Skip to content

Instantly share code, notes, and snippets.

View anilcse's full-sized avatar
🎯
Focusing

Anil anilcse

🎯
Focusing
View GitHub Profile
@anilcse
anilcse / autodelegate.sh
Last active March 15, 2022 10:51
Cosmos SDK : Auto delegate rewards using authz + feegrant
# all the below params are required.
granter=
grantee=
fee_payer=
validator=cosmosvaloper1ddle9tczl87gsvmeva3c48nenyng4n56nghmjk
maintenance_balance=1000000 # minimum balance to maintain in the granter account
while true
do
echo "About to withdraw commission and reward"
#!/usr/bin/env bash
export OSMOSIS_CHAIN_ID="osmosis-1"
export OSMOSIS_BROADCAST_MODE="sync"
export NODE="http://143.198.234.89:26657"
HACKED_ACCOUNT="osmo1vcgt5wz8jtp99lkunn4axwdyt3lkd586y4utna"
RECOVER_ACCOUNT=""
declare -a unbond_times=(2021-12-01T20:06:18.759183863Z)
@anilcse
anilcse / devnet-37.sh
Last active September 30, 2020 12:45
devnet-37.sh
echo "this requires go 1.13+"
YOUR_KEY_NAME=mykey
YOUR_NAME=myname
DAEMON=gaiad
PERSISTENT_PEERS="20daee1a8d19c070ed27ab5fb291335611f02ad3@157.245.65.98:26656"
echo "install gaia v2.0.13, Cosmos-SDK@0.37.14"
git clone https://github.com/cosmos/gaia $GOPATH/src/github.com/cosmos/gaia
cd $GOPATH/src/github.com/cosmos/gaia
export DENOM=akt
export CHAINID=testchain
export VP=600000000000
export DAEMON=akashd
export CLI=akashctl

## This script assumes following keys to be created before hand. Create keys if not present.
$CLI keys add validator
$CLI keys add faucet
@anilcse
anilcse / ibc_script.sh
Last active December 11, 2019 17:52
ibc_script.sh
# Create clients on two different IBC nodes
set -x
# Each chain needs to have an RPC endpoint to run transactions against
NODE0="http://34.82.17.52:26657"
NODE1="http://34.83.208.127:26657"
# Input the two chains you would like to begin connecting CHAINID0 should be "your" chain
CHAINID0="testnetibc0"
## To fix checksum mismatch btcd error something like below:
```verifying github.com/btcsuite/btcd@v0.20.0-beta: checksum mismatch
downloaded: h1:PamBMopnHxO2nEIsU89ibVVnqnXR2yFTgGNc+PdG68o=
go.sum: h1:DnZGUjFbRkpytojHWwy6nfUSA7vFrzWXDLpFNzt74ZA=
make: *** [Makefile:92: build] Error 1```
1. Ensure you have latest go (go1.13+)
2. go get -d github.com/btcsuite/btcd
Retry your build, it should work

Keybase proof

I hereby claim:

  • I am anilcse on github.
  • I am anilcse (https://keybase.io/anilcse) on keybase.
  • I have a public key ASDBP2NwdyEHRxJvbhYt6i_me1Ociz5W0TqsD_i7yNRUOwo

To claim this, I am signing this object:

@anilcse
anilcse / stateMock.js
Last active September 10, 2016 05:18 — forked from wilsonwc/stateMock.js
Angular Mock for properly resolving ui-router $state in Karma unit tests
angular.module('stateMock',[]);
angular.module('stateMock').service('$state', function ($q) {
this.expectedTransitions = [];
this.transitionTo = function(stateName) {
if(this.expectedTransitions.length) {
var expectedState = this.expectedTransitions.shift();
if (expectedState !== stateName) {
throw Error('Expected transition to state: ' + expectedState + ' but transitioned to ' + stateName);