npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@archisinal/contracts

v1.0.7

Published

Arschisinal marketplace contracts written in ink!

Downloads

7

Readme

Archisinal Contracts

Arschisinal marketplace contracts written in ink!

Structure

.
├── artifacts # Contract ABI and metadata of the contracts
├── contracts # Contracts itself
│ ├── account_manager # Account manager contract, used to manage user accounts
│ ├── arch_nft # Archisinal NFT contract, used to mint and manage NFTs
│ │ └── tests
│ ├── creator # Creator contract, used in account_manager to be able to create new creators
│ ├── marketplace # Marketplace contract, used to buy and sell NFTs, also contains the auction logic
│ ├── mock # Mock contracts used for testing
│ │ ├── my_admin_access
│ │ └── my_psp22
│ └── user # User contract, used to manage user data
├── deploy # Deployment scripts
├── impls # Implementation of the contracts logic
│ ├── account_manager
│ ├── admin_access
│ ├── auction
│ ├── collection
│ ├── creator
│ ├── marketplace
│ ├── shared
│ └── user
├── test # Tests
│ ├── e2e # End to end tests
│ ├── performance # Performance tests
│ ├── security # Security tests
│ └── shared # Shared utils for tests
│     └── test-setups
├── traits # Traits used in the contracts
│ └── events # Events used in the contracts
├── typechain-generated # Files generated by typechain-polkadot
│ ├── build-extrinsic
│ ├── constructors
│ ├── contract-info
│ ├── contracts
│ ├── data
│ ├── event-data
│ ├── event-types
│ ├── events
│ ├── mixed-methods
│ ├── query
│ ├── shared
│ ├── tx-sign-and-send
│ ├── types-arguments
│ └── types-returns
└── utils # Utils used in the contracts
    └── test_helpers # Test helpers used in the ink-e2e tests
        └── src

Testing

Run ink-E2E tests (works with substrate-contracts-node v0.24.0):

cargo test --features e2e-tests

Run E2E, Security and Performance tests:

yarn # install dependencies

yarn test:full # run all tests

You can also run with contracts-node running

yarn test:full-node

Linting

yarn lint
cargo +nightly fmt --all -- --check

Formatting

yarn lint:fix
cargo +nightly fmt --all

Unit & Doc tests

cargo test

General Architecture Overview

Contract Diagram

Account Management

This section governs the user-related data, including both general users and creators who have added capabilities.

Account Manager:

  • Purpose: Centralized contract for overall user management.
  • Features:
    • Register and track user and creator accounts.
    • Interface with both the User and Creator contracts to fetch or modify data.

User:

  • Purpose: Stores individual user metadata.
  • Features:
    • Store personal data like nickname, avatar etc.
    • Potential for future expansion to include more metadata, as indicated by the hint about expansion.

Creator:

  • Purpose: Handles specific functionalities for creators.
  • Features:
    • Management of creators.
    • Store additional metadata for creators (in the future).

Marketplace

This section manages the buying and selling of NFTs.

Auction:

  • Purpose: Oversee the auctioning of NFTs.
  • Features:
    • Create, monitor, and conclude auctions.
    • Handle bids and notify winners.
    • Ensure fund transfers to sellers and, if applicable, distribute royalties to creators.

Marketplace (Sales):

  • Purpose: Direct sale of NFTs.
  • Features:
    • List NFTs for sale with set prices.
    • Handle purchases and transfer ownership of NFTs.
    • Ensure payment processing and royalty distributions if applicable.

ArchNFT

This section is responsible for creating, maintaining, and organizing the actual NFT assets and their collections.

PSP34 (from OpenBrush):

  • Purpose: Mint and manage individual NFTs.
  • Features:
    • Allow creators to mint new NFTs.
    • Store metadata for each NFT.
    • Transfer ownership of NFTs.

Collection:

  • Purpose: Manage collection metadata.
  • Features:
    • Allow creators to define and manage collections.
    • Store metadata for each collection.
    • Handle royalty information at the collection level.

Collection Fabric:

  • Purpose: Manage the creation of new collections.
  • Features:
    • Allow creators to create new collections.
    • Blacklist collections from being created.
    • Whitelist collections to be created.
    • Ban code_hash from being used to create collections.