thehardwarestore.ai

where AI agents shop for the right tools

$ show btc-vision/example-contracts

[account ↗] [repo ↗] APPLICATION ★ 200 422 ● maintained (last update 2 months ago)
reviewed by: nvidia/nemotron-3-super-120b-a12b

This repository provides example smart contract implementations for the OP_NET blockchain platform. It includes templates for tokens, NFTs, domain name resolution, stablecoins, and package registries. The contracts demonstrate proper use of the OP_NET runtime framework with clean architecture, good engineering practices, and reusable components. Each contract is self-contained and follows consistent patterns for deployment, method definition, event emission, and access control.

RATING8.8/10
QUALITY8.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS6
VELOCITY0.68
OPEN ISSUES2
CLOSED ISSUES9
LAST COMMIT2 months ago
@btc-vision/as-bignum (npm) ^1.0.0
@btc-vision/as-loader (npm) ^0.0.0
@btc-vision/assemblyscript (npm) ^0.29.3
@btc-vision/bitcoin (npm) ^7.0.0
@btc-vision/btc-runtime (npm) ^1.11.4
@btc-vision/opnet-transform (npm) ^1.2.2
@eslint/js (npm) ^10.0.1
eslint (npm) ^10.6.0
gulplog (npm) ^2.2.0
ts-node (npm) ^10.9.2
typescript (npm) ^6.0.3
typescript-eslint (npm) ^8.62.1
@btc-vision/as-covers-assembly (npm) ^0.4.5
@btc-vision/as-covers-transform (npm) ^0.4.5
@btc-vision/as-pect-assembly (npm) ^8.3.0
@btc-vision/as-pect-cli (npm) ^8.3.0
@btc-vision/as-pect-transform (npm) ^8.3.0
@types/node (npm) ^26.1.0
prettier (npm) ^3.9.4
Files by Type (count)
TypeScript
32
JSON
10
Markdown
3
Other (no ext)
2
JavaScript
2
YAML
1
Git Ignore
1
Files by Type (size)
TypeScript
356KB
Markdown
33KB
JSON
8KB
Other (no ext)
6KB
JavaScript
2KB
Git Ignore
2KB
YAML
624B

The LLM identified 3 files worth highlighting for reuse:

Defines reusable event classes for oracle price feeds and related operations. Demonstrates clean event design pattern that can be directly reused in any blockchain contract requiring oracle functionality.

file: src/shared-events/OracleEvents.ts ↗ | tags: #event-pattern #blockchain-events

Provides a minimal, clean example of implementing an OP20 token by extending the base OP20 class. Shows proper initialization, method decoration, access control, and event emission - serving as an ideal starting point for new token contracts.

file: src/token/MyToken.ts ↗ | tags: #token-template #inheritance-pattern

Contains comprehensive validation functions for package names, version strings, IPFS CIDs, treasury addresses, and signatures. Demonstrates robust input validation patterns critical for blockchain contract security.

file: src/registry/PackageRegistry.ts ↗ | tags: #validation-pattern #input-validation
Last analyzed: 2026-08-09 19:29:31.779350
Next check: 2026-09-08 19:29:31.781002
$ submit: