Skip to content

Instantly share code, notes, and snippets.

View BoomchainLabs's full-sized avatar
💭
I may be slow to respond.

BoomchainLabs BoomchainLabs

💭
I may be slow to respond.
View GitHub Profile
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
import "./IComplianceModule.sol";
import "./IGroth16Verifier.sol";
contract ComplianceModule is IComplianceModule {
IGroth16Verifier public verifier;
@BoomchainLabs
BoomchainLabs / deploy_forwarder_browser.js
Created February 27, 2026 08:46
ETH Forwarder Deployment Script - browser/Node.js
import { ethers } from "https://cdn.jsdelivr.net/npm/ethers@6.8.0/dist/ethers.min.js";
// === CONFIG ===
const RPC_URL = "https://eth-mainnet.g.alchemy.com/v2/mEaeaviMZAJ1PVDZWrWWdKyHqwbpcdpH";
const RECIPIENT = "0xFfb6505912FCE95B42be4860477201bb4e204E9f"; // ETH goes here
async function main() {
// Deployment wallet — can be any wallet with ETH for gas
const privateKey = prompt("Enter deployment wallet private key (never share it!)");
const provider = new ethers.JsonRpcProvider(RPC_URL);
@BoomchainLabs
BoomchainLabs / forwarder.sol
Created February 27, 2026 08:28
ETH Forwarder Contract – automatically forwards any ETH received to a specified recipient address. Includes Solidity contract, deployment script, and instructions for using your own wallet.
{
"description": "ETH Forwarder Contract - automatically forwards any ETH received to your address",
"public": true,
"files": {
"forwarder.sol": {
"content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.21;\n\ncontract EthForwarder {\n address payable public recipient;\n\n constructor(address payable _recipient) {\n recipient = _recipient;\n }\n\n receive() external payable {\n _forward();\n }\n\n fallback() external payable {\n _forward();\n }\n\n function _forward() internal {\n uint256 balance = address(this).balance;\n if (balance > 0) {\n (bool sent, ) = recipient.call{value: balance}(\"\");\n require(sent, \"Forward failed\");\n }\n }\n\n function changeRecipient(address payable _recipient) external {\n recipient = _recipient;\n }\n}"
},
"deploy_forwarder_browser.js": {
"content": "import { ethers } from \"https://cdn.jsdelivr.net/npm/ethers@6.8.0/dist/ethers.mi
@BoomchainLabs
BoomchainLabs / .deps...npm...hardhat...console.sol
Created February 23, 2026 03:49
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.31+commit.fd3a2265.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS =
0x000000000000000000636F6e736F6c652e6c6f67;
function _sendLogPayloadImplementation(bytes memory payload) internal view {
address consoleAddress = CONSOLE_ADDRESS;
/// @solidity memory-safe-assembly
@BoomchainLabs
BoomchainLabs / boomchainlabs-llama3-web3-colab-live.py
Created February 18, 2026 18:27
One-click Google Colab setup for BoomchainLabs Llama-3 Web3 AI: - Generates dataset, LoRA training configs, API, and LoRA merge config - Pushes all files to GitHub automatically - Starts LoRA fine-tuning on Tesla T4 - Launches a live FastAPI server in Colab with a public ngrok URL - Includes a ready-to-use curl command for instant testing
# BoomchainLabs Llama-3 Web3 AI → One-click Colab: generate dataset, LoRA configs, API, push to GitHub, fine-tune & start server
# Usage: Open in Google Colab, enable GPU, run all cells, paste GitHub token when prompted. FastAPI server starts automatically.
import os, json, random
from getpass import getpass
# --------- CONFIGURATION ---------
GITHUB_USERNAME = "BoomchainLabs"
REPO_NAME = "boomchain-ai"
GITHUB_EMAIL = "cashapppaymentpay01@gmail.com"
@BoomchainLabs
BoomchainLabs / boomchainlabs-llama3-web3-colab.py
Created February 18, 2026 18:20
One-click Google Colab setup for BoomchainLabs Llama-3 Web3 AI: - Generates dataset, training configs, API file, LoRA merge config - Pushes files to GitHub automatically - Starts LoRA fine-tuning on Tesla T4
# BoomchainLabs Llama-3 Web3 AI → One-click Colab: generate dataset, LoRA configs, API, push to GitHub, fine-tune & start server
# Usage: Open in Google Colab, enable GPU, run all cells, paste GitHub token when prompted. FastAPI server starts automatically.
import os, json, random
from getpass import getpass
# --------- CONFIGURATION ---------
GITHUB_USERNAME = "BoomchainLabs"
REPO_NAME = "boomchain-ai"
GITHUB_EMAIL = "cashapppaymentpay01@gmail.com"