Skip to content

Instantly share code, notes, and snippets.

View anilcse's full-sized avatar
🎯
Focusing

Anil anilcse

🎯
Focusing
View GitHub Profile
@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);
@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"