Skip to content

Instantly share code, notes, and snippets.

View JSeam2's full-sized avatar

Jseam JSeam2

View GitHub Profile
@JSeam2
JSeam2 / gpg-decrypt.sh
Created January 15, 2024 20:40
Decrypt an AES256 digest with GPG
gpg --output secrets.out -d secrets.gpg
gpgconf --reload gpg-agent
@JSeam2
JSeam2 / gpg-encrypt.sh
Created January 15, 2024 20:39
Encrypt with GPG using AES256
gpg --output secrets.gpg --symmetric --no-symkey-cache --cipher-algo AES256 secrets
@JSeam2
JSeam2 / CryptoIdol_v0_2.sol
Created July 7, 2023 12:52
Smart contract for cryptoidol, v0.2
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface Verifier {
function verify(
uint256[] memory pubInputs,
bytes memory proof
) external view returns(bool);
}
@JSeam2
JSeam2 / gelkin explained.md
Created March 5, 2023 13:34
more about gelkin

Gelkin Explained

Smart contracts on the EVM are very limited. This makes it challenging to create applications that require more compute and data beyond the state of the blockchain. Furthermore, data is mostly public, making it difficult to remain private. ZKP (Zero Knowledge Proofs) offer a way to scale Ethereum and help offer privacy where needed. However, writing custom circuits novel applications is difficult.

Using machine learning, developers don't need to write custom circuits and can specify intended behaviors and have a computer learn the circuit. Leveraging on the EZKL library, Gelkin helps developers extend their smart contracts with ZKML (Zero Knowledge Machine Learning). Developers can then extend their smart contracts by leveraging on existing verifiers or by deploying verifiers themselves through the service.

Through Gelkin, EZKL, and ZKML, smart contracts will be able to offer more complex functionality like:

On-chain credit scoring to offer more kinds of DeFi loan arrangements

Anomaly d

Sponsor Bounty Explanations

Covalent Unified API Endpoints

Covalent API was used to help provide data to train the ML models using the Gelkin

Developer Infrastructure/Tooling Mantle

Gelkin allows developers to deploy ZKML verifiers on Mantle network

Build on Pokt Network

Gelkin uses Pokt Network RPC endpoints to deploy the ZKML verifiers

@JSeam2
JSeam2 / Recover_Account.py
Created October 25, 2021 07:41
Recover eth account on web3.py signed with signMessage() on ethers.js
import web3
w3 = web3.Web3()
prefix = "\x19Ethereum Signed Message:\n"
message = "Verify your Eth address. zveyIPmNyiaCNRjJ9hsbYqEJPb7gJTgNzm2ybM_F-SQ"
signed = "0x4481dffa200bc4c9cadad4083002585fbe20aebef1916aa7d58e66682860097747df3f7fb608c30ff19adbf52ab4ef2a8eabb553857373b0767d43afd83f09ea1c"
prefix = w3.toBytes(text=prefix)
msg = w3.toBytes(text=message)
@JSeam2
JSeam2 / Token_wrapper.sol
Created May 21, 2021 14:14
Token Wrapping
contract ERC20Wrapper is ERC20, ERC1155Receiver {
uint256 public tokenId;
IShareToken public shareToken;
IERC20 public cash;
address public augurFoundry;
/**
* @dev sets values for
* @param _augurFoundry A trusted factory contract so that users can wrap multiple tokens in one
* transaction without giving individual approvals
@JSeam2
JSeam2 / nginx.conf
Created September 14, 2019 08:09
Example Nginx Conf to redirect http to https
# Redirect to HTTPS
server {
listen 80;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443;
server_name example.com www.example.com;
@JSeam2
JSeam2 / vanecks.py
Last active June 10, 2019 19:22
Van Ecks Sequence python
#!/usr/bin/env python
"""
Sample code for van eck's sequence
"""
output = [0, 0, 1]
for i in range(2, 1000):
init_len = len(output)
@JSeam2
JSeam2 / extract_username_twitter.py
Created April 23, 2019 00:59
extract username from twitter url
import re
strings = [
"http://www.twitter.com/#!/donttrythis",
"http://twitter.com/KimKardashian",
"http://www.twitter.com/#!/KourtneuyKardash/following",
"http://twitter.com/#!/jasonterry31/lists/memberships",
]