Skip to content

Instantly share code, notes, and snippets.

View fadeev's full-sized avatar

Denis Fadeev fadeev

View GitHub Profile
diff --git a/app/app.go b/app/app.go
index 2e98e62..db0ea46 100644
--- a/app/app.go
+++ b/app/app.go
@@ -88,6 +88,9 @@ import (
"github.com/cosmonaut/testchain/docs"
+ foobarmodule "github.com/cosmonaut/testchain/x/foobar"
+ foobarmodulekeeper "github.com/cosmonaut/testchain/x/foobar/keeper"
diff --git a/app/app.go b/app/app.go
index 666a944..14e10b8 100644
--- a/app/app.go
+++ b/app/app.go
@@ -84,6 +84,9 @@ import (
tmjson "github.com/tendermint/tendermint/libs/json"
tmproto "github.com/tendermint/tendermint/proto/tendermint/types"
// this line is used by starport scaffolding # stargate/app/moduleImport
+ blogmodule "github.com/cosmos/gaia/x/blog"
+ blogmodulekeeper "github.com/cosmos/gaia/x/blog/keeper"
1:41:01 AM: Build ready to start
1:41:03 AM: build-image version: c6001ed68662a13e5deb24abec2b46058c58248a
1:41:03 AM: build-image tag: v3.9.0
1:41:03 AM: buildbot version: 0d69a20db0b5dda37e383402cf2a26e5b4f328ad
1:41:03 AM: Fetching cached dependencies
1:41:04 AM: Starting to download cache of 215.1MB
1:41:05 AM: Finished downloading cache in 1.652439539s
1:41:05 AM: Starting to extract cache
1:41:12 AM: Finished extracting cache in 7.386198466s
1:41:13 AM: Finished fetching cache in 9.089447848s

IBC Hello World

The Hello World example is a time-honored tradition in computer programming.

The Inter-Blockchain Communication protocol (IBC) is an important part of the Cosmos SDK ecosystem.

This tutorial builds an understanding of how to create and send packets across blockchain. This foundational knowledge helps you navigate between blockchains with the Cosmos SDK.

You will learn how to

async QueryBalance(
{ commit, rootGetters },
{ payload, subscribe = false }
) {
const queryUrl = '/cosmos/bank/v1beta1/balances'
const queryParams = Object.keys(payload).join("/")
try {
const balance = await rootGetters['modules/env/apiClient'].query(
queryUrl,
queryParams
@fadeev
fadeev / script.js
Created January 1, 2021 13:21
Example of using CosmJS with `protobufjs` to encode a custom proto message
// Every chain has at least two API endpoints: 26657 (the Tendermint one, roughly
// speaking, lower level, deals with bytes, exposes info about blocks, consensus,
// validators, etc.) and 1317 (the Cosmos one, higher level, your chain's API).
// Since every transaction broadcasted to a chain should be signed (and you don't
// want to do the signing manually), it makes sense to use a signing library.
// For JS/TS it's CosmJS.
// With CosmJS you create a wallet from a mnemonic, create a client from a wallet,
// and use client.signAndBroadcast method to, well, sign and broadcast transaction
// (an array of messages from an address). The client uses 26657 endpoint under the

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@fadeev
fadeev / settings.json
Created March 9, 2019 05:43
VS Code Settings
{
"workbench.sideBar.location": "right",
"editor.minimap.enabled": false,
"workbench.statusBar.feedback.visible": false,
"editor.tabSize": 2,
"editor.renderIndentGuides": false,
"editor.detectIndentation": false,
"html.format.indentInnerHtml": true,
"terminal.integrated.macOptionIsMeta": true,
"explorer.confirmDelete": false,
(setq backup-directory-alist '(("." . "~/.emacs.d/backups/"))
backup-by-copying 1
auto-save-default 0
inhibit-splash-screen 1
ring-bell-function 'ignore
coding-system-for-write 'utf-8
coding-system-for-read 'utf-8
inferior-lisp-program "/usr/local/bin/sbcl --noinform")
(set-language-environment "Russian")