Skip to content

Instantly share code, notes, and snippets.

View fmorency's full-sized avatar
💭
🚀

Félix C. Morency fmorency

💭
🚀
View GitHub Profile
@fmorency
fmorency / groups.md
Created June 19, 2024 15:07
Group creation and proposal

Cosmos x/group creation and proposal

Create a new group and a new group policy

  1. Create the following members.json file
    {
      "members": [
        {
          "address": "[ADDR1]",
@fmorency
fmorency / osmo-ibc-lp.md
Created June 4, 2024 14:54
Osmosis Testnet IBC + LP

This document provides instructions on how to create IBC connection from the manifest chain to Osmosis Testnet 5 as well as how to create a Liquidity Pool.

Requirements

  • Manifest manifestd binary
  • Osmosis osmosisd binary
  • Manifest node with public endpoints
  • Manifest relayer account funded with umfx
  • Osmosis relayer account funded with uosmo
  • Hermes relayer binary
@fmorency
fmorency / xfeegrant.md
Created May 30, 2024 17:59
Using xfeegrant

Allow manifest1efd63aw40lxf3n4mhf7dzhjkr453axurm6rp3z (user2) to pay gas fees for manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct (user1) for message type /cosmos.bank.v1beta1.MsgSend only.

manifestd tx feegrant grant manifest1efd63aw40lxf3n4mhf7dzhjkr453axurm6rp3z manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct \
    --allowed-messages /cosmos.bank.v1beta1.MsgSend \
    --keyring-backend test \
    --home ~/.manifest-local1 \
    --gas auto \
    --gas-prices 0.001umfx \
    --gas-adjustment 1.3 \
@fmorency
fmorency / xfeegrant.md
Created May 30, 2024 17:56
Using x/feegrant

Allow manifest1efd63aw40lxf3n4mhf7dzhjkr453axurm6rp3z (user2) to pay gas fees for manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct (user1) for message type /cosmos.bank.v1beta1.MsgSend only.

manifestd tx feegrant grant manifest1efd63aw40lxf3n4mhf7dzhjkr453axurm6rp3z manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct \
    --allowed-messages /cosmos.bank.v1beta1.MsgSend \
    --keyring-backend test \
    --home ~/.manifest-local1 \
    --gas auto \
    --gas-prices 0.001umfx \
    --gas-adjustment 1.3 \
@fmorency
fmorency / poa-sw-upgrade.md
Last active May 17, 2024 15:10
POA Software Upgrade

Create an unsigned transaction file upgrade.json containing

{
  "body": {
    "messages": [
      {
        "@type": "/cosmos.upgrade.v1beta1.MsgSoftwareUpgrade",
        "authority": "[POA_ADMIN_ADDRESS]",
 "plan": {
@fmorency
fmorency / gentx-ledger.md
Last active June 5, 2024 15:02
gentx + ledger
  1. Install the Cosmos App on the Ledger device
  2. Connect the Ledger device and open the Cosmos App

./build/manifestd keys add val --ledger

Approve on the Ledger Device

./build/manifestd genesis add-genesis-account val 10000000upoa ./build/manifestd genesis gentx val 1000000upoa --chain-id test

@fmorency
fmorency / main.rs
Created March 22, 2022 15:49
tokio-cron-scheduler shutdown handling/signal
use tokio_cron_scheduler::{Job, JobScheduler};
#[tokio::main]
async fn main() {
let mut sched = JobScheduler::new();
let _ = sched.add(
Job::new_async("1/7 * * * * *", |_uuid, _l| {
Box::pin(async {
println!("I run async every 7 seconds");
@fmorency
fmorency / pyside_bug.py
Created July 17, 2012 20:54
PySide bug?
#Traceback (most recent call last):
# File "example.py", line 57, in <module>
# root.appendRow(list(p))
#TypeError: 'PySide.QtGui.QStandardItem.appendRow' called with wrong argument types:
# PySide.QtGui.QStandardItem.appendRow(list)
#Supported signatures:
# PySide.QtGui.QStandardItem.appendRow(PySide.QtGui.QStandardItem)
# PySide.QtGui.QStandardItem.appendRow(list)
if __name__ == '__main__':
app = QApplication(sys.argv)
@fmorency
fmorency / destroy_qt_widget.py
Created July 9, 2012 19:13
Destroy Qt widgets properly
import sys
from PySide.QtCore import *
from PySide.QtGui import *
@Slot()
def destroy_slot():
print 'Destroyed'
if __name__ == '__main__':
@fmorency
fmorency / MainWindow.py
Created July 4, 2012 20:13
Create GUI from .ui files. Events do not propagate correctly.
from PySide.QtCore import *
from PySide.QtGui import *
from ui.uiloader import UiLoader
class CloseEventFilter(QObject):
def eventFilter(self, target, event):
print event.type(), target
return False