Skip to content

Instantly share code, notes, and snippets.

Avatar
🔒
Fighting for freedom, security and privacy 🔐

Charlike Mike Reagent tunnckoCore

🔒
Fighting for freedom, security and privacy 🔐
View GitHub Profile
@tunnckoCore
tunnckoCore / EthsBidding.sol
Last active September 1, 2023 22:02
Ethscriptions Bidding solution
View EthsBidding.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.21;
// Author: wgw.eth / wgw.lol / tunnckoCore
// Date: August 2023
contract EthsBidding {
struct Offer {
bytes32 bidTxHash;
bytes32 ethscriptionId;
@tunnckoCore
tunnckoCore / name-service-resolver.js
Created August 14, 2023 06:32
Ethscriptions hosting & resolving domains (handles/words/ens), not just "user profiles" with `application/vnd.esc.user.profile+json`
View name-service-resolver.js
import { verifyMessage } from "viem";
/**
* Ethscriptions Hosting & Resolving of ens domains & ethscriptions handles eg. `data,hirsch`
*
* `data:application/vnd.esc.wgw.deploy.`
* -> hex = 646174613a6170706c69636174696f6e2f766e642e6573632e7767772e6465706c6f792e
*
* `+json`
* -> hex = 2b6a736f6e
View html5-named-colors.json
[
{
"hex": "#f0f8ff",
"name": "aliceblue"
},
{
"hex": "#faebd7",
"name": "antiquewhite"
},
{
View Trading-Ethscriptions.md

New (old) Way of Trading.

I think I solved the problem of safe #Ethscriptions trading.

A multi step process, but safe and sane. Basically, offers-based.


1/ Here's how it could work:

@tunnckoCore
tunnckoCore / EthscriptionsMarketplace.sol
Last active July 10, 2023 16:11
Fully customizable on-chain Ethscriptions Marketplace in 350 lines of Solidity!
View EthscriptionsMarketplace.sol
// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.18;
// Fully on-chain, fully customizable, Ethscriptions Marketplace
// Info: ethscriptions.com
// Author: @tunnckoCore / wgw.eth / Sigma Wolf
// Date: June 29, 2023
error NotAdmin();
error NotAdminOrPaymentAddress();
@tunnckoCore
tunnckoCore / ord721-types.ts
Last active June 22, 2023 06:10
ORD-721 protocol - TypeScript types, Zod Schemas, zod inferred typescript types
View ord721-types.ts
export type ORD721RoyaltyType = {
address: string;
amount: number;
token: string;
type?: string;
};
export type ORD721RoyaltyManifestType = {
protocol: { name: "ORD721"; version: string; type: "royalty" };
View ORD721.md

ORD-721 was started around the same time when BRC-721 was started, about 3 months ago.

Differences are mostly technical, and that BRC-721 is promoting off-chain data. Ord-721 support both off-chain and on-chain, but recommending on-chain. It's easy to add a "fallback" link image to HQ but you should at least own/have some content.

Neither are visible on the ord wallet, or on other wallets and marketplaces, for now.

Ord721 has more structure and can define many things on the Collection Manifest inscription - which plays as the source of truth for a collection. Things like name, description, max supply, mint price, and optionally royalties definition, website, twitter and etc stuff if creator decides. Brc721 doesn't support much of that, at least such things won't be on the collection definition.

Each item of a collection is called Token Manifest, in which both the content (image, svg, html, or anything), and the metadata (like traits/attributes, and token id) are in one place - the content insi

View cats-holders.csv
address token_id inscription_number inscription_id
bc1pk42g9szvyl7xxdpdszn5ql6ce2mzc0wmy05y97qfmu7hs8uftnns5tc37k 47 9268408 63cad99d0828689fd0b7c865737428237c461aac0b700c42f747b15947a62503i0
bc1pgw7am8ttfpwu6qlj4xkum7hh29jc6algy8ugl683mfgu9g68n0fql64wdy 44 9321125 d27c3715c205e95fa4db74846ab277d7e038b6e3c80c8930691536140524e7b2i0
bc1prcspr4afwa4t99uu80gl7eyutfsfjhun7pmluqr5uygegueflrpqgpfv2h 43 9321126 2908fdb46b95fce9376931e216f917b192f389af43576785570b49e30a29d5e0i0
bc1p2l0r8nmqnjlmefkujtth78mvf4q7pcrf5uq68jzyye6w42xeegrs4065mn 88 9321127 2f53392e4a19fdd37f88a1a994ac563d8f6101ec506ec3c1a1dcdc4d19f5a548i0
bc1pgw7am8ttfpwu6qlj4xkum7hh29jc6algy8ugl683mfgu9g68n0fql64wdy 57 9321128 440f36f3ec02e8666801385d757db54354c858e484a898c6663de8d8a1da13b0i0
bc1p2l0r8nmqnjlmefkujtth78mvf4q7pcrf5uq68jzyye6w42xeegrs4065mn 45 9321129 b07c1ac38a3df03249d49098b6cb80af979a3cf60406899651cc5615e5284b8ei0
bc1pqqhjw3v2frj0tur9ljv2928sdglhc2mzul35ll4d4pu765v3ds0q6a44md 38 9321130 142c64fbd3e10eacbc5306541cfa6d7fad006292cc28dad85b6b7
@tunnckoCore
tunnckoCore / mapping.csv
Last active April 28, 2023 18:51
All holders of $NEK0 BRC-20 and the inscriptionIds - all are 782 inscriptions, but only 696 of them are valid.
View mapping.csv
address inscriptionId
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc 9010b0da4217107931fb99330fb1624ad2c97696b89f8147df329df5b34dee02i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc e82db1a92cf7de7d351941c301f8e09eaa1d06e2506d26d97d757f4186ef9313i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc abb4f4a6446b084bfa876e5b14fcd8260bce40536d70d564203b619fbf26bf40i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc dbf1e08e162f1cd4a7aebcff926aa272763aa3301ff5b7c38651aee340c8a153i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc 918d2d2db6404590388b90c35c22256e7c27342192abbfe99d8d1da9b8109064i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc 651a2ab9188e0587b4d469d0361c821be4bc1c9393798cdbd690abcb67c06074i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc 29659f936ebc17f075b1c14089265b489100baf35795f8659b3f53b70d08cc81i0
bc1pcma0kehzu8aztcnzuwp7dr4yd3el0nykvv9fzrz4s9s485mkxukq70twnc 046de67e54ae6e955cf5e8d45b0f3
@tunnckoCore
tunnckoCore / WTF20.sol
Last active April 25, 2023 23:43
Solidity v0.8 Token Deployer Factory for cheaply deploying secure ERC-20 Burnable tokens with no ownership. Allows for deploying with CREATE2 too. The ownership of the created token is renounced immediately after creation.
View WTF20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.18;
// Created by @tunnckoCore / @wgw_eth / wgw.eth
// Compatible with IERC20 (OpenZeppelin impl), IERC20Metadata, ERC20Burnable, Ownable
// The reason to be custom copy, is this a bit cheaper to deploy and i'm short on funds.
// ERC20Burnable and Ownable are also implemented and included at the end of the contract.
// There's also a public mint function, available only for the owner of the contract.