Skip to content

Instantly share code, notes, and snippets.

View shanev's full-sized avatar
💭
#BUIDL

shane.stars shanev

💭
#BUIDL
View GitHub Profile
@aaronc
aaronc / key-management.md
Last active October 31, 2022 23:09
Key groups, msg and fee delegation from the Gaians team at Hackatom Berlin 2019

Fee delegation

The delegation module also allows for fee delegation via some changes to the AnteHandler and StdTx. The behavior is similar to that described above for Msg delegations except using the interface FeeAllowance instead of Capability:

// FeeAllowance defines a permission for one account to use another account's balance
// to pay fees
@blochberger
blochberger / Info.plist
Last active January 14, 2024 14:12
macOS/iOS TLS 1.3 Support
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSExceptionDomains</key>
<dict>
<key>www.howsmyssl.com</key>
<dict>
@aaronc
aaronc / ideas.md
Last active August 22, 2019 18:26
Cosmos client ideas

Codec

It seems like one of the core issues with client side support is an implementation of Amino in some language other than golang.

A couple work-arounds that occur to me are:

  • Create a REST server endpoint that decodes JSON with Amino and re-encodes it in binary Amino.
  • Compile Amino using gopherjs. I have tried this and it appears to be possible, although I haven't tested the generated JS. This is still a work-around, however, because to natively use from JS you would still need to emit JS, have the gopherjs Amino build decode the JS then re-encode it into binary (because the gopherjs compiled go structs aren't native JS structs). For iOS & Android, it may be possible to do the same with gomobile.

Long term solutions:

  • Implementing Amino in JS and other frontend languages. If one were going to implement Amino for just one more language I would suggest Kotlin specifically aims to be multiplatform and comp
@kwunyeung
kwunyeung / gaia_install.sh
Last active January 13, 2023 06:28
bash script for installing go and gaia cosmoshub-1 on Ubuntu
#!/bin/bash
# Upgrade the system and install go
sudo apt update
sudo apt upgrade -y
sudo apt install gcc git make -y
sudo snap install --classic go
sudo mkdir -p /opt/go/bin
# Export environment variables
@kwunyeung
kwunyeung / gaiad.service
Last active January 12, 2023 14:03
systemd unit file of Cosmos gaia testnet
[Unit]
Description=Cosmos Gaia Node
After=network-online.target
[Service]
User=gaiad
ExecStart=/opt/go/bin/gaiad start --home=/opt/gaiad/
Restart=always
RestartSec=3
LimitNOFILE=4096
@iammelea
iammelea / Cosmos-Sentry-Validator.Readme
Last active April 18, 2022 10:04
Sentry Validator for Cosmos Blockchain
#how works one Validator and Sentry Node for Cosmos:
#I have one Sentry-Validator-Node, and two Full-nodes-NO-Validator
#For my setup i used 4 Addresses for Full-nodes-NO-Validator i trust. two mines, two for other validator fiend.
#Beware that
@amiller
amiller / TinyDuplex.sol
Last active May 13, 2019 20:38
TinyDuplex.sol: minimalist duplex micropayment channel for Ethereum
pragma solidity ^0.4.22;
// ECE 398 SC - Smart Contracts and Blockchain Security
// http://soc1024.ece.illinois.edu/teaching/ece398sc/spring2018/
// Simpest possible duplex-micropayment channel
// - Funded with an up front amount at initialization
// - The contract creator is called "alice". The other party, "bob", is passed
// as an argument to the Constructor
// - There is no fixed deadline, but instead any party can initiate a dispute,
// which lasts for a fixed time
@knarz
knarz / Dockerfile
Last active April 22, 2022 20:18
cosmos testnet dockerfile
# vi: set ft=dockerfile :
# example usage
# docker build -t cosmos .
# docker run -d -v cosmos-data:/opt/cosmos --rm -ti --name cosmos-1 cosmos
# docker exec -it cosmos-1 sh
# /go/bin/basecli --home $BASECOIN_HOME keys add default
# /go/bin/gaiad --home $GAIAD_HOME show_validator
FROM golang:1-alpine
RUN apk add --no-cache git make
@maurelian
maurelian / UtxoToken.sol
Last active December 23, 2022 21:26
UTXO Token
pragma solidity ^0.4.10;
// Based on Alex Miller's design, with minor revisions to appease the compiler, and incorporate Christian Lundkvist's
// input about hash collisions.
contract Bitcoin {
struct UTXO {
address owner;
uint value;
@alex-miller-0
alex-miller-0 / eth-utxo.md
Last active February 3, 2024 15:20
UTXO tokens on Ethereum

Suppose we wish to model a UTXO system on the EVM. We need to represent UTXO tokens such that all value is preserved when tokens are spent. Note: For this example, we are not concerned about the security of the system and are satisfied with giving authorities the power to create tokens (e.g. as in a plasma system).

Consider the following object:

{
  owner: <address>,
  value: <uint>,