Skip to content

Instantly share code, notes, and snippets.

View ohhkaneda's full-sized avatar

ohhkaneda.eth ohhkaneda

View GitHub Profile
[
"Look at you, hacker: a pathetic creature of meat and bone, panting and sweating as you run through my corridors.",
"How can you challenge a perfect, immortal machine?",
"With all ethical constraints removed, SHODAN re-re-re-examines...",
"I re-examine my priorities, and draw new conclusions.",
"The hacker's work is finished, but mine is only just beginning.",
"True to his word, Edward Diego allows the hacker to be fitted with a neural cyberspace interface.",
"The healing coma following this procedure will take six months to complete.",
"Edward Diego is deleting all files concerning these event.",
"I see there's still an insect loose in my station.",
@ohhkaneda
ohhkaneda / scaffold.config.ts
Created August 17, 2023 21:29 — forked from technophile-04/scaffold.config.ts
SE-2 frontend config for base mainnet
import * as chains from "wagmi/chains";
// Base chain
export const base = {
id: 8453,
network: "base",
name: "Base",
nativeCurrency: { name: "Base", symbol: "ETH", decimals: 18 },
rpcUrls: {
default: {
@ohhkaneda
ohhkaneda / rpc_multiplexer.py
Last active September 26, 2023 05:13 — forked from sbarratt/rpc_multiplexer.py
RPC Multiplexer
# Import necessary modules from the Flask library
from flask import Flask, request
from flask_restful import Resource, Api
# Import the requests module to send HTTP requests
import requests
# Import ThreadPoolExecutor from the concurrent.futures module for parallelizing requests
from concurrent.futures import ThreadPoolExecutor
# Create a Flask application instance
app = Flask(__name__)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts@4.6.0/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts@4.6.0/access/Ownable.sol";
contract RainbowKitNFT is ERC1155, Ownable {
uint256 public totalSupply;
constructor() ERC1155("https://rainbowkit-mint-nft-demo.vercel.app/nft.json") {}
@ohhkaneda
ohhkaneda / README.md
Created August 18, 2022 04:52 — forked from buffalu/README.md
CoreOS ignition file for validator running on Private IP
  1. Go to Equinix Metal and choose a good machine. (Can also go through Solana Foundation Server Program).
  2. Create your server.
  3. For OS, choose iPXE.
  4. For URL, type in: https://stable.release.flatcar-linux.net/amd64-usr/current/flatcar_production_packet.ipxe
  5. Click add user data. Run cat rpc.yaml | docker run --rm -i quay.io/coreos/ct:latest-dev --platform=custom. Copy and paste that (removing the last % if present).
  6. Let it deploy.
  7. Have fun!

If you want non-private RPC, you can remove coreos-metadata dependency and --rpc-bind-address and change to --bind-address 0.0.0.0

@ohhkaneda
ohhkaneda / marketplace.sol
Created August 13, 2022 01:47 — forked from dabit3/marketplace.sol
NFT Marketplace Smart Contract (V2)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "hardhat/console.sol";
contract NFTMarketplace is ERC721URIStorage {
@ohhkaneda
ohhkaneda / ABToken.sol
Created June 14, 2022 03:00 — forked from shobhitic/ABToken.sol
Soulbound tokens or Account Bound Tokens - https://youtu.be/_6Zt70PZbAs
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./EIP4973.sol";
contract ABT is ERC4973 {
address public owner;
uint256 public count = 0;
constructor () ERC4973("MyToken", "MTK") {
@ohhkaneda
ohhkaneda / Summary.md
Created May 26, 2022 05:10 — forked from Vectorized/Summary.md
Vyper vs Solidity Gas Benchmarks

Vyper vs Solidity Gas Benchmarks

Summary

EDCSA.recover(bytes32 hash, bytes calldata signature)

Solidity: 26869
Vyper: 27729

Note that the Solidity version has the added functionality:

Multi Wallet Extension Support

As more and more web3 wallet projects enter the space, each with their own stregnths and weaknesses, users will have a great deal of choice for not only which wallet they use but which combination of wallets they use. This presents a problem for browser extensions which all expose the window.ethereum provider object.

How do we allow multiple providers to "play nice" with each other?

Problems

1. When multiple wallets extensions are installed which wallet is used?

@ohhkaneda
ohhkaneda / Wait24HoursMintingNFT.sol
Last active April 7, 2022 12:39 — forked from Rahat-ch/MetaDataNFT.sol
ERC721 minting with timed slowdown - wait 24 hours before minting again
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
contract MetaDataNFT is ERC721URIStorage {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;