{"action":"created","comment":{"url":"https://api.github.com/repos/cosmos/gaia/pulls/comments/143346645","pull_request_review_id":67849235,"id":143346645,"diff_hunk":"@@ -0,0 +1,280 @@\n+package stake\n+\n+import (\n+\t\"fmt\"\n+\t\"strconv\"\n+\n+\tabci \"github.com/tendermint/abci/types\"\n+\t\"github.com/tendermint/tmlibs/log\"\n+\n+\t\"github.com/cosmos/cosmos-sdk\"\n+\t\"github.com/cosmos/cosmos-sdk/errors\"\n+\t\"github.com/cosmos/cosmos-sdk/modules/auth\"\n+\t\"github.com/cosmos/cosmos-sdk/modules/coin\"\n+\t\"github.com/cosmos/cosmos-sdk/stack\"\n+\t\"github.com/cosmos/cosmos-sdk/state\"\n+)\n+\n+//nolint\n+const (\n+\tname = \"stake\"\n+)\n+\n+//nolint\n+var (\n+\t//TODO should all these global parameters be moved to the state?\n+\tbondDenom string = \"mycoin\" // bondable coin denomination\n+\tmaxVal    int    = 100      // maximum number of validators\n+\n+\t// GasAllocations per staking transaction\n+\tcostBond   = uint64(20)\n+\tcostUnbond = uint64(0)\n+)\n+\n+// Name - simply the name TODO do we need name to be unexposed for security?\n+func Name() string {\n+\treturn name\n+}\n+\n+// Handler - the transaction processing handler\n+type Handler struct {\n+\tstack.PassInitValidate\n+}\n+\n+var _ stack.Dispatchable = Handler{} // enforce interface at compile time\n+\n+// Name - return stake namespace\n+func (Handler) Name() string {\n+\treturn name\n+}\n+\n+// AssertDispatcher - placeholder for stack.Dispatchable\n+func (Handler) AssertDispatcher() {}\n+\n+// InitState - set genesis parameters for staking\n+func (Handler) InitState(l log.Logger, store state.SimpleDB,\n+\tmodule, key, value string, cb sdk.InitStater) (log string, err error) {\n+\treturn \"\", initState(module, key, value, store)\n+}\n+\n+//separated for testing\n+func initState(module, key, value string, store state.SimpleDB) (err error) {\n+\tif module != name {\n+\t\treturn errors.ErrUnknownModule(module)\n+\t}\n+\tswitch key {\n+\tcase \"bond_coin\":\n+\t\tbondDenom = value\n+\tcase \"maxval\",\n+\t\t\"cost_bond\",\n+\t\t\"cost_unbond\":\n+\t\ti, err := strconv.Atoi(value)\n+\t\tif err != nil {\n+\t\t\treturn fmt.Errorf(\"input must be integer, Error: %v\", err.Error())\n+\t\t}\n+\t\tswitch key {\n+\t\tcase \"maxval\":\n+\t\t\tmaxVal = i\n+\t\tcase \"cost_bond\":\n+\t\t\tcostBond = uint64(i)\n+\t\tcase \"cost_unbond\":\n+\t\t\tcostUnbond = uint64(i)\n+\t\t}\n+\t}\n+\treturn errors.ErrUnknownKey(key)\n+}\n+\n+// CheckTx checks if the tx is properly structured\n+func (h Handler) CheckTx(ctx sdk.Context, store state.SimpleDB,\n+\ttx sdk.Tx, _ sdk.Checker) (res sdk.CheckResult, err error) {\n+\n+\terr = tx.ValidateBasic()\n+\tif err != nil {\n+\t\treturn res, err\n+\t}\n+\n+\tswitch tx.Unwrap().(type) {\n+\tcase TxBond:\n+\t\t// TODO could also check for existence of validator here? (already checked in deliverTx)\n+\n+\t\t//check for suffient funds to send\n+\t\t_, abciRes := getSingleSender(ctx)\n+\t\tif abciRes.IsErr() {\n+\t\t\treturn res, abciRes\n+\t\t}\n+\n+\t\treturn sdk.NewCheck(costBond, \"\"), nil\n+\n+\tcase TxUnbond:\n+\t\t// TODO check for sufficient validator tokens to unbond here? (already checked in deliverTx)\n+\t\treturn sdk.NewCheck(costUnbond, \"\"), nil\n+\t}\n+\t//return res, errors.ErrUnknownTxType(tx.Unwrap())\n+\treturn res, errors.ErrUnknownTxType(\"GTH\")\n+}\n+\n+// DeliverTx executes the tx if valid\n+func (h Handler) DeliverTx(ctx sdk.Context, store state.SimpleDB,\n+\ttx sdk.Tx, dispatch sdk.Deliver) (res sdk.DeliverResult, err error) {\n+\n+\t_, err = h.CheckTx(ctx, store, tx, nil)\n+\tif err != nil {\n+\t\treturn\n+\t}\n+\n+\t//Run the transaction\n+\tunwrap := tx.Unwrap()\n+\tvar abciRes abci.Result\n+\tswitch txType := unwrap.(type) {\n+\tcase TxBond:\n+\t\tabciRes = runTxBond(ctx, store, txType, dispatch)\n+\tcase TxUnbond:\n+\t\tabciRes = runTxUnbond(ctx, store, txType, dispatch)\n+\t}\n+\n+\tres = sdk.DeliverResult{\n+\t\tData: abciRes.Data,\n+\t\tLog:  abciRes.Log,\n+\t}\n+\treturn\n+}\n+\n+///////////////////////////////////////////////////////////////////////////////////////////////////\n+\n+func runTxBond(ctx sdk.Context, store state.SimpleDB, tx TxBond,\n+\tdispatch sdk.Deliver) (res abci.Result) {\n+\n+\tsender, res := getSingleSender(ctx)\n+\tif res.IsErr() {\n+\t\treturn res\n+\t}\n+\n+\treturn runTxBondGuts(getSendFunc(ctx, store, dispatch), store, tx, sender)\n+}\n+\n+// sendCoins is a helper function\n+func getSendFunc(ctx sdk.Context, store state.SimpleDB,\n+\tdispatch sdk.Deliver) func(sender, receiver sdk.Actor, amount coin.Coins) (res abci.Result) {\n+\n+\treturn func(sender, receiver sdk.Actor, amount coin.Coins) (res abci.Result) {\n+\t\t// Move coins from the deletator account to the validator lock account\n+\t\tsend := coin.NewSendOneTx(sender, receiver, amount)\n+\n+\t\t// If the deduction fails (too high), abort the command\n+\t\t_, err := dispatch.DeliverTx(ctx, store, send)\n+\t\tif err != nil {\n+\t\t\treturn abci.ErrInsufficientFunds.AppendLog(err.Error())\n+\t\t}\n+\t\treturn\n+\t}\n+}\n+\n+func getSingleSender(ctx sdk.Context) (sender sdk.Actor, res abci.Result) {\n+\tsenders := ctx.GetPermissions(\"\", auth.NameSigs) //XXX does auth need to be checked here?\n+\tif len(senders) != 1 {\n+\t\treturn sender, resMissingSignature\n+\t}\n+\treturn senders[0], abci.OK\n+}\n+\n+func runTxBondGuts(sendCoins func(sender, receiver sdk.Actor, amount coin.Coins) abci.Result,\n+\tstore state.SimpleDB, tx TxBond, sender sdk.Actor) abci.Result {\n+\n+\t// Get amount of coins to bond\n+\tbondCoin := tx.Amount\n+\tbondAmt := uint64(bondCoin.Amount)\n+\n+\t// Get the validator bond account\n+\tvalidatorBonds, err := LoadValidatorBonds(store)\n+\tif err != nil {\n+\t\treturn resErrLoadingValidators(err)\n+\t}\n+\ti, validatorBond := validatorBonds.Get(sender)\n+\tif validatorBond == nil { //if it doesn't yet exist create it\n+\t\tvalidatorBond = &ValidatorBond{\n+\t\t\tValidator:    sender,\n+\t\t\tPubKey:       tx.PubKey,\n+\t\t\tBondedTokens: 0,\n+\t\t\tHoldAccount:  getHoldAccount(sender),\n+\t\t\tVotingPower:  0,\n+\t\t}\n+\t\tvalidatorBonds = append(validatorBonds, validatorBond)\n+\t}\n+\n+\t// Move coins from the delegator account to the validator lock account\n+\tres := sendCoins(sender, validatorBond.HoldAccount, coin.Coins{bondCoin})\n+\tif res.IsErr() {\n+\t\treturn res\n+\t}\n+\n+\tvalidatorBonds[i].BondedTokens += bondAmt\n+\n+\t// Save to store\n+\tsaveValidatorBonds(store, validatorBonds)\n+\n+\treturn abci.OK\n+}\n+\n+func getHoldAccount(sender sdk.Actor) sdk.Actor {\n+\tholdAddr := append([]byte{0x00}, sender.Address[1:]...) //shift and prepend a zero\n+\treturn sdk.NewActor(name, holdAddr)\n+}\n+\n+func runTxUnbond(ctx sdk.Context, store state.SimpleDB, tx TxUnbond,\n+\tdispatch sdk.Deliver) (res abci.Result) {\n+\n+\tsender, res := getSingleSender(ctx)\n+\tif res.IsErr() {\n+\t\treturn res\n+\t}\n+\n+\t//context with hold account permissions\n+\tctxHoldPermission := ctx.WithPermissions(getHoldAccount(sender))\n+\n+\treturn runTxUnbondGuts(sender, getSendFunc(ctxHoldPermission, store, dispatch), store, tx)\n+}\n+\n+func runTxUnbondGuts(sender sdk.Actor,\n+\tsendCoins func(sender, receiver sdk.Actor, amount coin.Coins) abci.Result,\n+\tstore state.SimpleDB, tx TxUnbond) (res abci.Result) {\n+\n+\tbondAmt := uint64(tx.Amount.Amount)\n+\n+\t//get validator bond\n+\tvalidatorBonds, err := LoadValidatorBonds(store)\n+\tif err != nil {\n+\t\treturn resErrLoadingValidators(err)\n+\t}\n+\tbvIndex, validatorBond := validatorBonds.Get(sender)\n+\tif validatorBond == nil {\n+\t\treturn resNoValidatorForAddress\n+\t}\n+\n+\t// subtract tokens from validatorBonds\n+\tswitch {\n+\tcase validatorBond.BondedTokens > bondAmt:\n+\t\tvalidatorBond.BondedTokens -= bondAmt\n+\tcase validatorBond.BondedTokens == bondAmt:\n+\t\tvalidatorBonds, err = validatorBonds.Remove(bvIndex)\n+\t\tif err != nil {","path":"modules/stake/handler.go","position":259,"original_position":259,"commit_id":"3a9986779abedbae9d1b8d9d4423dc2850a4958a","original_commit_id":"3a9986779abedbae9d1b8d9d4423dc2850a4958a","user":{"login":"rigelrozanski","id":20132176,"avatar_url":"https://avatars1.githubusercontent.com/u/20132176?v=4","gravatar_id":"","url":"https://api.github.com/users/rigelrozanski","html_url":"https://github.com/rigelrozanski","followers_url":"https://api.github.com/users/rigelrozanski/followers","following_url":"https://api.github.com/users/rigelrozanski/following{/other_user}","gists_url":"https://api.github.com/users/rigelrozanski/gists{/gist_id}","starred_url":"https://api.github.com/users/rigelrozanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rigelrozanski/subscriptions","organizations_url":"https://api.github.com/users/rigelrozanski/orgs","repos_url":"https://api.github.com/users/rigelrozanski/repos","events_url":"https://api.github.com/users/rigelrozanski/events{/privacy}","received_events_url":"https://api.github.com/users/rigelrozanski/received_events","type":"User","site_admin":false},"body":"Correct","created_at":"2017-10-08T05:29:17Z","updated_at":"2017-10-08T05:29:17Z","html_url":"https://github.com/cosmos/gaia/pull/14#discussion_r143346645","pull_request_url":"https://api.github.com/repos/cosmos/gaia/pulls/14","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/comments/143346645"},"html":{"href":"https://github.com/cosmos/gaia/pull/14#discussion_r143346645"},"pull_request":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/14"}},"in_reply_to_id":143341670},"pull_request":{"url":"https://api.github.com/repos/cosmos/gaia/pulls/14","id":144848650,"html_url":"https://github.com/cosmos/gaia/pull/14","diff_url":"https://github.com/cosmos/gaia/pull/14.diff","patch_url":"https://github.com/cosmos/gaia/pull/14.patch","issue_url":"https://api.github.com/repos/cosmos/gaia/issues/14","number":14,"state":"open","locked":false,"title":"WIP Onlybonding","user":{"login":"rigelrozanski","id":20132176,"avatar_url":"https://avatars1.githubusercontent.com/u/20132176?v=4","gravatar_id":"","url":"https://api.github.com/users/rigelrozanski","html_url":"https://github.com/rigelrozanski","followers_url":"https://api.github.com/users/rigelrozanski/followers","following_url":"https://api.github.com/users/rigelrozanski/following{/other_user}","gists_url":"https://api.github.com/users/rigelrozanski/gists{/gist_id}","starred_url":"https://api.github.com/users/rigelrozanski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rigelrozanski/subscriptions","organizations_url":"https://api.github.com/users/rigelrozanski/orgs","repos_url":"https://api.github.com/users/rigelrozanski/repos","events_url":"https://api.github.com/users/rigelrozanski/events{/privacy}","received_events_url":"https://api.github.com/users/rigelrozanski/received_events","type":"User","site_admin":false},"body":"Remaining Issues: \r\n - [ ] Rename Repo to Cosmos-Hub??\r\n - [x] Validator Set changes (abci.Validator) needs to use PubKey not address\r\n - [ ] Write bash tests for multiple validators\r\n - [x] solve funky error when you attempt to unbond more than you have in the bond account\r\n - [ ] CheckTx should perform checks to see if there are enough coins/tokens to bond/unbond\r\n - [ ] global variables held in a persistent state\r\n - [ ] Add checks for `getSingleSender = tx.pubkey` So that only the validator can unbond themselves","created_at":"2017-10-05T07:50:30Z","updated_at":"2017-10-08T05:29:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9e3159bd7922cf1fe62efd513eba5446aaa91a2a","assignee":{"login":"ebuchman","id":2300911,"avatar_url":"https://avatars3.githubusercontent.com/u/2300911?v=4","gravatar_id":"","url":"https://api.github.com/users/ebuchman","html_url":"https://github.com/ebuchman","followers_url":"https://api.github.com/users/ebuchman/followers","following_url":"https://api.github.com/users/ebuchman/following{/other_user}","gists_url":"https://api.github.com/users/ebuchman/gists{/gist_id}","starred_url":"https://api.github.com/users/ebuchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebuchman/subscriptions","organizations_url":"https://api.github.com/users/ebuchman/orgs","repos_url":"https://api.github.com/users/ebuchman/repos","events_url":"https://api.github.com/users/ebuchman/events{/privacy}","received_events_url":"https://api.github.com/users/ebuchman/received_events","type":"User","site_admin":false},"assignees":[{"login":"ebuchman","id":2300911,"avatar_url":"https://avatars3.githubusercontent.com/u/2300911?v=4","gravatar_id":"","url":"https://api.github.com/users/ebuchman","html_url":"https://github.com/ebuchman","followers_url":"https://api.github.com/users/ebuchman/followers","following_url":"https://api.github.com/users/ebuchman/following{/other_user}","gists_url":"https://api.github.com/users/ebuchman/gists{/gist_id}","starred_url":"https://api.github.com/users/ebuchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebuchman/subscriptions","organizations_url":"https://api.github.com/users/ebuchman/orgs","repos_url":"https://api.github.com/users/ebuchman/repos","events_url":"https://api.github.com/users/ebuchman/events{/privacy}","received_events_url":"https://api.github.com/users/ebuchman/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/cosmos/gaia/pulls/14/commits","review_comments_url":"https://api.github.com/repos/cosmos/gaia/pulls/14/comments","review_comment_url":"https://api.github.com/repos/cosmos/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cosmos/gaia/issues/14/comments","statuses_url":"https://api.github.com/repos/cosmos/gaia/statuses/3a9986779abedbae9d1b8d9d4423dc2850a4958a","head":{"label":"cosmos:onlybonding","ref":"onlybonding","sha":"3a9986779abedbae9d1b8d9d4423dc2850a4958a","user":{"login":"cosmos","id":228843,"avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"repo":{"id":94568655,"name":"gaia","full_name":"cosmos/gaia","owner":{"login":"cosmos","id":228843,"avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmos/gaia","description":"Cosmos Gaia chain (pre-genesis)","fork":false,"url":"https://api.github.com/repos/cosmos/gaia","forks_url":"https://api.github.com/repos/cosmos/gaia/forks","keys_url":"https://api.github.com/repos/cosmos/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmos/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmos/gaia/teams","hooks_url":"https://api.github.com/repos/cosmos/gaia/hooks","issue_events_url":"https://api.github.com/repos/cosmos/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/cosmos/gaia/events","assignees_url":"https://api.github.com/repos/cosmos/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/cosmos/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/cosmos/gaia/tags","blobs_url":"https://api.github.com/repos/cosmos/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmos/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmos/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmos/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmos/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmos/gaia/languages","stargazers_url":"https://api.github.com/repos/cosmos/gaia/stargazers","contributors_url":"https://api.github.com/repos/cosmos/gaia/contributors","subscribers_url":"https://api.github.com/repos/cosmos/gaia/subscribers","subscription_url":"https://api.github.com/repos/cosmos/gaia/subscription","commits_url":"https://api.github.com/repos/cosmos/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmos/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmos/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmos/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmos/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/cosmos/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmos/gaia/merges","archive_url":"https://api.github.com/repos/cosmos/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmos/gaia/downloads","issues_url":"https://api.github.com/repos/cosmos/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/cosmos/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmos/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmos/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmos/gaia/labels{/name}","releases_url":"https://api.github.com/repos/cosmos/gaia/releases{/id}","deployments_url":"https://api.github.com/repos/cosmos/gaia/deployments","created_at":"2017-06-16T17:53:14Z","updated_at":"2017-09-22T03:58:02Z","pushed_at":"2017-10-06T20:23:55Z","git_url":"git://github.com/cosmos/gaia.git","ssh_url":"git@github.com:cosmos/gaia.git","clone_url":"https://github.com/cosmos/gaia.git","svn_url":"https://github.com/cosmos/gaia","homepage":null,"size":210,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"base":{"label":"cosmos:master","ref":"master","sha":"92c5492a7050026ec65731369ff59a6c7701df87","user":{"login":"cosmos","id":228843,"avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"repo":{"id":94568655,"name":"gaia","full_name":"cosmos/gaia","owner":{"login":"cosmos","id":228843,"avatar_url":"https://avatars0.githubusercontent.com/u/228843?v=4","gravatar_id":"","url":"https://api.github.com/users/cosmos","html_url":"https://github.com/cosmos","followers_url":"https://api.github.com/users/cosmos/followers","following_url":"https://api.github.com/users/cosmos/following{/other_user}","gists_url":"https://api.github.com/users/cosmos/gists{/gist_id}","starred_url":"https://api.github.com/users/cosmos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cosmos/subscriptions","organizations_url":"https://api.github.com/users/cosmos/orgs","repos_url":"https://api.github.com/users/cosmos/repos","events_url":"https://api.github.com/users/cosmos/events{/privacy}","received_events_url":"https://api.github.com/users/cosmos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cosmos/gaia","description":"Cosmos Gaia chain (pre-genesis)","fork":false,"url":"https://api.github.com/repos/cosmos/gaia","forks_url":"https://api.github.com/repos/cosmos/gaia/forks","keys_url":"https://api.github.com/repos/cosmos/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cosmos/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cosmos/gaia/teams","hooks_url":"https://api.github.com/repos/cosmos/gaia/hooks","issue_events_url":"https://api.github.com/repos/cosmos/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/cosmos/gaia/events","assignees_url":"https://api.github.com/repos/cosmos/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/cosmos/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/cosmos/gaia/tags","blobs_url":"https://api.github.com/repos/cosmos/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cosmos/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cosmos/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/cosmos/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cosmos/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/cosmos/gaia/languages","stargazers_url":"https://api.github.com/repos/cosmos/gaia/stargazers","contributors_url":"https://api.github.com/repos/cosmos/gaia/contributors","subscribers_url":"https://api.github.com/repos/cosmos/gaia/subscribers","subscription_url":"https://api.github.com/repos/cosmos/gaia/subscription","commits_url":"https://api.github.com/repos/cosmos/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/cosmos/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/cosmos/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/cosmos/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/cosmos/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/cosmos/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cosmos/gaia/merges","archive_url":"https://api.github.com/repos/cosmos/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cosmos/gaia/downloads","issues_url":"https://api.github.com/repos/cosmos/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/cosmos/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/cosmos/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/cosmos/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cosmos/gaia/labels{/name}","releases_url":"https://api.github.com/repos/cosmos/gaia/releases{/id}","deployments_url":"https://api.github.com/repos/cosmos/gaia/deployments","created_at":"2017-06-16T17:53:14Z","updated_at":"2017-09-22T03:58:02Z","pushed_at":"2017-10-06T20:23:55Z","git_url":"git://github.com/cosmos/gaia.git","ssh_url":"git@github.com:cosmos/gaia.git","clone_url":"https://github.com/cosmos/gaia.git","svn_url":"https://github.com/cosmos/gaia","homepage":null,"size":210,"stargazers_count":5,"watchers_count":5,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":12,"forks":3,"open_issues":12,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/14"},"html":{"href":"https://github.com/cosmos/gaia/pull/14"},"issue":{"href":"https://api.github.com/repos/cosmos/gaia/issues/14"},"comments":{"href":"https://api.github.com/repos/cosmos/gaia/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cosmos/gaia/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/cosmos/gaia/statuses/3a9986779abedbae9d1b8d9d4423dc2850a4958a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"rigelrozanski"}}