Skip to content

Instantly share code, notes, and snippets.

export CHAIN_ID="tgrade-testnet-2"
export RPC="https://rpc.testnet-2.tgrade.io:443"
export LCD="https://lcd.testnet-2.tgrade.io"
export FAUCET="https://faucet.testnet-2.tgrade.io"
export NODE="--node $RPC"
export TXFLAG="${NODE} --chain-id ${CHAIN_ID} --gas-prices 0.01utgd --gas auto --gas-adjustment 1.3"
@orkunkl
orkunkl / cosmovisor.service
Created February 4, 2021 09:31
cosmovisor.service definition
[Unit]
Description=cosmovisor
Requires=network-online.target
After=network-online.target
[Service]
TimeoutStartSec=5
Restart=always
User=root
Group=root
/*
* This is a set of helpers meant for use with @cosmjs/cli
* With these you can easily use the cw20 contract without worrying about forming messages and parsing queries.
*
* Usage: npx @cosmjs/cli@^0.23 --init https://raw.githubusercontent.com/CosmWasm/cosmwasm-plus/master/contracts/cw20-base/helpers.ts
*
* Create a client:
* const client = await useOptions(hackatomOptions).setup(password);
* await client.getAccount()
*
const someone = "coral1kl9my2rql4vlwrj8tku2tqephvcgul2g2clw3f";
const other = "coral1mfyug6ceg25htnz2x6unlaqdqt0054zp2g6fa5";
// You have the permission to mint, you did give yourself that special permission on init.
> dizz.mint(someone,"9988000")
'711D4E533323A943425B6C31FF6DBC60059B69BBF89F142AD77BBC4547543351' // tx hash
// check the tx on block explorer:
// https://bigdipper.coralnet.cosmwasm.com/transactions/711D4E533323A943425B6C31FF6DBC60059B69BBF89F142AD77BBC4547543351
>> dizz.balance()
>> dizz.tokenInfo()
{
name: 'DIZZ COIN',
symbol: 'DIZZ',
decimals: 6,
total_supply: '1000888000'
}
>> dizz.minter()
{
const address = client.senderAddress;
const cw20 = CW20(client);
const initMsg: InitMsg = {
name: "DIZZ COIN",
symbol: "DIZZ",
decimals: 6,
initial_balances: [{ address, amount: "1000000" }],
mint: {
minter: address,
npx @cosmjs/cli --init https://raw.githubusercontent.com/CosmWasm/cosmwasm-plus/master/contracts/cw20-base/helpers.ts

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@orkunkl
orkunkl / boarnet_dump-25-09-2019.txt
Last active September 25, 2019 11:15
boarnet block metrics dump 25-10-2019
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.6
-- Dumped by pg_dump version 11.5
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
gpg> save