Skip to content

Instantly share code, notes, and snippets.

View whalelephant's full-sized avatar
🐘

Belsy whalelephant

🐘
View GitHub Profile
@whalelephant
whalelephant / contract_authz_example.rs
Created September 27, 2023 14:09
contract_authz_example.rs
// use protobuf
use cosmos_sdk_proto::{
cosmos::feegrant::v1beta1::{BasicAllowance, MsgGrantAllowance},
traits::{MessageExt, TypeUrl},
};
// example code Exec
#[msg(exec)]
@whalelephant
whalelephant / cw_contract_sig_validation.md
Last active April 26, 2023 07:53
CW contract signature validation

CW contract signature

The use of smart contracts (multisig, smart contract wallet) does not provide valid signatures from signature schemes. This is a limitation as EOA (externally owned accounts)

  • has a clear signature-client interface to sign arbitrary (or standard login) messages
  • can provide signature verifiable in contracts, such as for gas provision in smart contract wallets

This is similar to the isValidSiganture standard in Ethereum.

@whalelephant
whalelephant / schema.json
Created March 12, 2023 20:45
issue on ts-codegen: supporting $ref link in execMsg and queryMsg
{
"contract_name": "vectis-plugin-registry",
"contract_version": "0.1.0",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "InstantiateMsg",
"type": "object",
"required": [
"install_fee",
@whalelephant
whalelephant / gist:c503de441fbac530e99f5b304f47d504
Last active May 11, 2022 17:10
Inter-DAO Collaboration protocol (IDC) motivaton

Why Static?

To survive, a DAO has to attract the participation of significant active stakeholders to the stream of building and voting proposals for the evolution of the specific underlying subject (dapps, networks, etc).

The underlying subject, in a living and vibrant DAO, inevitably evolves. Why then, shouldn't the relations between a possible Parent DAO and the Sub Dao change? Such relations should be mutable and dynamically constructed on the basis of an interest on the part of a DAO to align itself, on the basis of principles, underlying subject or other, with other DAOs. This alignment could be long lasting, temporary or even ephemeral (i.e. on the base of a single proposal).

@whalelephant
whalelephant / app.js
Created November 14, 2016 01:37 — forked from clarle/app.js
Short tutorial on how to use Express and node-mysql
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',