Skip to content

Instantly share code, notes, and snippets.

@the-frey
the-frey / listen-cw20-transfer.go
Created June 24, 2022 08:50 — forked from giansalex/listen-cw20-transfer.go
Listen cw20 transactions (Cosmwasm v1)
package main
import (
"context"
"fmt"
"log"
"time"
rpchttp "github.com/tendermint/tendermint/rpc/client/http"
)
# assuming you already have cargo
# check with
cargo version
# then install
cargo install cargo-generate --features vendored-openssl
cargo install cargo-run-script
# now you can generate
cargo generate --git https://github.com/InterWasm/cw-template.git --name dummies_example
@the-frey
the-frey / README.md
Created January 26, 2022 10:54 — forked from joeabbey/README.md
Measuring Osmosis Epoch

Introduction

Osmosis is an automated market maker for interchain assets. Over the past 7 months, the adoption has continued to accelerate with nearly $1.5B in TVL as of the time of writing. Additionally, the AMM supports 33 unique assets and continues to add new assets as new chains join IBC.

Osmosis is unique from other Cosmos Chains with the implementation of an epochs module. The epochs module hooks the incentives and mint keepers to distribute various rewards once a day. With the growth of the network, increase in incentivized pools, the time to compute the epoch block and produce a NewHeight has increased to roughly 20 minutes.

New users are coming to Osmosis everyday and stay for its ease-of-use, access to many new assets, and incredible speed. The epoch block takes new users by surprise, and can be a negative experience. With more AMMs arriving in the IBC ecosystem, giving us

@the-frey
the-frey / sync.md
Created January 26, 2022 10:54 — forked from blockpane/sync.md

State Sync on Osmosis

State sync can greatly speed up the time it takes to bring a node online, and the smaller state size will make processing the epoch much faster. There is however a bug that affects osmosisd v5.0.0-v6.0.1 which causes the replay to fail after syncing

This walks through the steps to bring up a new node using state sync on osmosis v6.0.1, this will likely be outdated pretty quickly (Jan 2, 2022) once the bug is fixed.

Install Osmosis

Juno bug reporting and feature requests

The Juno core development team uses GitHub to manage feature requests and bugs. This is done via GitHub Issues.

Triage and progress 🔜

Issues added to GitHub will be triaged as they come in.

Tracking of in-flight issues will be done through the Juno Core project board, but of course we reserve the right to not make a public issue if there is a security implication in doing so.

{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
import axios from "axios"
import { SigningCosmWasmClient } from "@cosmjs/cosmwasm-stargate";
// TODO: Extract to separate folder: interfaces and funcs
interface Balances {
readonly address: string
readonly amount: string // decimal as string
}
@the-frey
the-frey / unofficial_faqs.md
Last active March 24, 2021 12:27
Unofficial FAQs
const sharedPipeline = (event: requests.MinimalRequestEvent): RTE.ReaderTaskEither<db.System, t.Error, st.DbSave[]> =>
Do(RTE.readerTaskEither)
.bind('userId', RTE.fromEither(requests.getIdFromPath(event)))
.bindL('user', ({ userId }) => checkIdAgainstHeaderRTE(event, userId))
.bindL('savesRes', ({ user }) => sDb.getSavesByUserIdRTE(user.uuid_id))
.bindL('saves', ({ savesRes }) => RTE.fromEither(sXfms.getSavesFromResE(savesRes)))
.return(({ saves }) => saves);
const uasPipeline = (event: requests.MinimalRequestEvent): RTE.ReaderTaskEither<db.System, t.Error, t.Entity> =>
Do(RTE.readerTaskEither)
type idDbFn = (id: string) => RTE.ReaderTaskEither<db.System, t.Error, pg.QueryResult<st.DbSave>>;
type idEntDbFn = (id: string, entId: string) => RTE.ReaderTaskEither<db.System, t.Error, pg.QueryResult<st.DbSave>>;