This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Run this code with `ts-node main.ts` | |
import { IbcClient, Link } from "@confio/relayer"; | |
import { stringToPath } from "@cosmjs/crypto"; | |
import { DirectSecp256k1HdWallet } from "@cosmjs/proto-signing"; | |
import { GasPrice } from "@cosmjs/stargate"; | |
import Long from "long"; | |
import { fromHex } from "secretjs"; | |
export async function createIbcConnection(): Promise<Link> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fatal error: unexpected signal during runtime execution | |
[signal SIGSEGV: segmentation violation code=0x2 addr=0x7f12160ac000 pc=0x7f125f3d931f] | |
runtime stack: | |
runtime.throw({0x1c913b1?, 0x7f125f3d92d6?}) | |
/usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0x7f12168aacd0 sp=0x7f12168aaca0 pc=0x44189d | |
runtime.sigpanic() | |
/usr/local/go/src/runtime/signal_unix.go:819 +0x369 fp=0x7f12168aad20 sp=0x7f12168aacd0 pc=0x458389 | |
goroutine 1 [syscall]: | |
runtime.cgocall(0x187fe50, 0xc004846138) | |
/usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0048460a0 sp=0xc004846068 pc=0x40b79c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
BroadcastMode, | |
coinsFromString, | |
SecretNetworkClient, | |
Wallet, | |
} from "secretjs"; | |
import { BaseAccount } from "secretjs/dist/grpc_gateway/cosmos/auth/v1beta1/auth.pb"; | |
import { AminoWallet } from "secretjs/dist/wallet_amino"; | |
function sleep(ms: number) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch $'curl -s localhost:26657/status | | |
jq .result.sync_info.latest_block_time | | |
perl -pe "s/\.\d+Z/Z/" | | |
jq -r \'"Last block: " + (now - (. | fromdate) | floor | tostring) + " seconds ago"\'' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/assafmo/01d7ee0d131a99518d2a4189a9250460 | |
BLOCK_WINDOW="${1}" # e.g. 100000 blocks in the past | |
UPGRADE_TIME="${2}" # e.g. 2023-03-02T19:07:13Z | |
LCD="${3}" # e.g. https://lcd.secret.express or https://api.pulsar.scrttestnet.com | |
LATEST="$(curl -s "$LCD/cosmos/base/tendermint/v1beta1/blocks/latest")" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SGX_MODE=SW SCRT_SGX_STORAGE="$(pwd)/.sgx_secrets" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" RUST_BACKTRACE=1 ./secretd --home "$(pwd)/.secretd" tx gov submit-proposal software-upgrade v1.3 --upgrade-height 28100 --title hi --description bye --deposit 10000000uscrt -y --from a | |
SGX_MODE=SW SCRT_SGX_STORAGE="$(pwd)/.sgx_secrets" LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)" RUST_BACKTRACE=1 ./secretd --home "$(pwd)/.secretd" tx gov vote 1 yes --from a -y | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="icon" type="image/svg+xml" href="/favicon.ico" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<!-- SEO Title --> | |
<meta name="application-name" content="$SHORT_TITLE" /> | |
<meta name="title" content="$TITLE" /> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo wget -O /bin/secretcli https://github.com/enigmampc/SecretNetwork/releases/download/v1.0.4/secretcli-linux-amd64 | |
sudo chmod +x /bin/secretcli | |
mkdir -p ~/.secretcli/config | |
echo 'chain-id = "holodeck-2" | |
indent = true | |
keyring-backend = "test" | |
node = "https://chainofsecrets.secrettestnet.io:26667" | |
output = "json" |
NewerOlder