@@ -10,17 +10,54 @@ A set of Solidity smart contracts implementing [RMRK](https://rmrk.app) modular
1010To use the RMRK legos and smart contracts contained in this repository, simply add them to your project:
1111
1212``` shell
13- yarn add @rmrk-team/evm-contracts
13+ bun add @rmrk-team/evm-contracts
1414```
1515
16- or
16+ Once the dependency is added to your project, simply import the smart contracts you wish to utilize into your own smart
17+ contract.
18+
19+ ## Development
1720
1821``` shell
19- npm -i @rmrk-team/evm-contracts
22+ bun install
23+ bun run docs:import
24+ bun run test
25+ bun run coverage
26+ bun run build:artifacts
27+ bun run docs:prepare
28+ bun run docs:build
2029```
2130
22- Once the dependency is added to your project, simply import the smart contracts you wish to utilize into your own smart
23- contract.
31+ ## Docs workflow
32+
33+ Docs are built with Nextra/Next.js using the content in ` pages/ ` plus the contract docs generated
34+ from ` docs/ ` :
35+
36+ - ` bun run docs:import ` pulls the original ` evm-docs ` pages/components/public assets into this repo
37+ (run once, then edit locally).
38+ - ` bun run docs:prepare ` runs ` hardhat dodoc ` , syncs the generated contract docs into
39+ ` pages/evm-package/ ` , and generates ` _meta.json ` navigation.
40+ - ` bun run docs:build ` runs ` docs:prepare ` , then ` next build && next export ` to emit the static site
41+ in ` out/ ` .
42+ - ` bun run docs:dev ` runs the local docs dev server.
43+
44+ ## Automation
45+
46+ On each push to ` master ` , Cloudflare Pages builds and deploys the docs using the repo settings from
47+ the CF UI.
48+
49+ On each published GitHub Release, GitHub Actions publishes the npm package: it installs
50+ dependencies with Bun, runs ` bun run test ` , runs ` bun run build:artifacts ` , and publishes the
51+ package with ` bun publish --access public ` when the package version is not already on npm.
52+
53+ Cloudflare Pages settings:
54+
55+ - ** Build command** : ` bun run docs:build `
56+ - ** Output directory** : ` out `
57+
58+ Required secrets for automation:
59+
60+ - ` NPM_TOKEN ` for npm publishing
2461
2562## RMRK Legos
2663
@@ -32,7 +69,7 @@ So far we have created 6 modules as ERC proposals, all of which are ERC721 compa
3269- Composable & Equippable: [ ERC-6220: Composable NFTs utilizing Equippable Parts] ( https://eips.ethereum.org/EIPS/eip-6220 )
3370- Soulbound: [ ERC-6454: Minimal Transferable NFT detection interface] ( https://eips.ethereum.org/EIPS/eip-6454 )
3471- Emotable: [ ERC-7409: Public Non-Fungible Tokens Emote Repository] ( https://eips.ethereum.org/EIPS/eip-7409 )
35- - Dynamic Attributes: [ ERC-7508: Dynamic On-Chain Token Attributes Repository ] ( https://eips.ethereum.org/EIPS/eip-7508 )
36- - ERC20-Holder: [ ERC-7590: ERC-20 Holder Extension for NFTs ] ( https://eips.ethereum.org/EIPS/eip-7590 )
72+ - Dynamic Attributes: [ ERC-7508: Dynamic On-Chain Token Attributes Repository] ( https://eips.ethereum.org/EIPS/eip-7508 )
73+ - ERC20-Holder: [ ERC-7590: ERC-20 Holder Extension for NFTs] ( https://eips.ethereum.org/EIPS/eip-7590 )
3774
3875![ RMRK Modules] ( /img/General_Overview_Modules.png )
0 commit comments