Skip to content

Instantly share code, notes, and snippets.

View arnabmitra's full-sized avatar
🙈

Arnab Mitra arnabmitra

🙈
View GitHub Profile
@arnabmitra
arnabmitra / regtest balance call
Created February 22, 2024 22:22
Simple call to regtest to get balances
package main
import (
"fmt"
"github.com/btcsuite/btcd/rpcclient"
"os"
)
func main() {
// Command-line arguments: address
import io.jsonwebtoken.ExpiredJwtException
import io.jsonwebtoken.Jwts
import io.jsonwebtoken.MalformedJwtException
import io.jsonwebtoken.SignatureAlgorithm
import io.jsonwebtoken.UnsupportedJwtException
import org.bouncycastle.jce.ECNamedCurveTable
import org.bouncycastle.jce.provider.BouncyCastleProvider
import org.bouncycastle.jce.spec.ECNamedCurveParameterSpec
#!/bin/bash
# Check if the number of arguments is correct
if [ "$#" -ne 2 ]; then
echo "Usage: ./get_and_watch_logs.sh <namespace> <prefix>"
exit 1
fi
namespace="$1"
prefix="$2"
# The global section has parameters that apply globally to the relayer operation.
[global]
# Specify the verbosity for the relayer logging output. Default: 'info'
# Valid options are 'error', 'warn', 'info', 'debug', 'trace'.
log_level = 'trace'
# Specify the mode to be used by the relayer. [Required]
[mode]
{
"jsonrpc": "2.0",
"id": -1,
"result": {
"round_state": {
"height/round/step": "8485556/20/6",
"start_time": "2022-12-01T23:55:49.210791387Z",
"proposal_block_hash": "8162FAF025D1F4F735BA6872A5E686F78E3C6C0C1685949DEBB4B1FE6256B2B7",
"locked_block_hash": "",
"valid_block_hash": "",
package types
import (
"testing"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"
)
func TestMarkerAddressLength(t *testing.T) {
https://x25519.ulfheim.net/
@arnabmitra
arnabmitra / gist:afc783250463fe04d7d5e96a23398843
Created November 10, 2021 00:13
create fee proposal with fee denom same as additional fee denom
#!/bin/bash
# I'm using a provenance "run" instance for these tests
# provenance setup, clean project, make, adjust the voting period in the config to test msg based fee proposals:
# 'make clean ; make build; make run-config; cat ./build/node0/config/genesis.json | jq '\'' .app_state.gov.voting_params.voting_period="20s" '\'' | tee ./build/node0/config/genesis.json; cat ./build/node0/config/genesis.json'
PROVENANCE_DEV_DIR=~/provenance
COMMON_TX_FLAGS="--gas auto --gas-prices 1905nhash --gas-adjustment 2 --chain-id chain-local --keyring-backend test --yes -o json"
######################################### SETUP FOR ATS CONTRACT EXECUTION ##############################################
@arnabmitra
arnabmitra / gist:b03896033d7ca87b9658bf44d9740fd3
Created November 9, 2021 20:03
Gov proposal and vote provenance chain.
#!/bin/bash
# I'm using a provenance "run" instance for these tests
# provenance setup, clean project, make, adjust the voting period in the config to test msg based fee proposals:
# 'make clean ; make build; make run-config; cat ./build/node0/config/genesis.json | jq '\'' .app_state.gov.voting_params.voting_period="20s" '\'' | tee ./build/node0/config/genesis.json; cat ./build/node0/config/genesis.json'
PROVENANCE_DEV_DIR=~/provenance
COMMON_TX_FLAGS="--gas auto --gas-prices 1905nhash --gas-adjustment 2 --chain-id chain-local --keyring-backend test --yes -o json"
######################################### SETUP FOR ATS CONTRACT EXECUTION ##############################################
@arnabmitra
arnabmitra / exposed-tricks.kt
Created June 14, 2021 04:35 — forked from bastman/exposed-tricks.kt
exposed tricks
# =========
# demo: https://github.com/JetBrains/Exposed/tree/master/src/test/kotlin/demo
# dml tests: https://github.com/JetBrains/Exposed/blob/master/src/test/kotlin/org/jetbrains/exposed/sql/tests/shared/DMLTests.kt
# ===== GIS
https://github.com/JetBrains/Exposed/issues/459
# === native