AyinkxLab/novapaws
关于
Generative dog NFTs on Stellar: a Soroban NFT contract with a React and Freighter front end.
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 正在收集历史
- 15天
- 正在收集历史
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文NovaPaws
Generative dog NFTs on Stellar, minted by a Soroban smart contract and browsed in a React front end.
The contract is a small non-fungible token: an administrator mints tokens to an address, holders transfer or approve them, and every token gets a URI picked from a fixed set of dog portraits at mint time. The front end connects to Freighter, shows the token carousel, and drives the wallet flow.
Status: deployed on Stellar testnet at
CCL7HNJKC74PIMDTOP3THTA3DNPQLYTSQUJKJZ3IRR7TEAYGKFAH5E5Oand served at https://ayinkxlab.github.io/novapaws/. The contract runs onsoroban-sdk22 and the modernAddress/require_authAPI;scripts/deploy-testnet.mjsredeploys it from source.
Layout
contracts/ Soroban NFT contract (Rust, soroban-sdk 22)
src/contract.rs entry points: initialize, mint, mint_next, xfer, appr, burn
src/balance.rs balances, supply and the one-mint-per-address guard
src/metadata.rs name, symbol and token URI selection
src/test.rs contract tests
src/ React front end (Vite, Mantine, Freighter)
components/ carousel, mint button, wallet menu
hooks/ contract reads and the wallet context
utils/contract.ts RPC client, read helper and ScVal encoding
public/images/ the nine portrait images tokens are minted from
rpc.sh local Stellar quickstart node for contract development
Stack
| Layer | Choice |
|---|---|
| Contract | Rust, soroban-sdk 22 |
| Front end | React 18, Vite 6, Mantine 5, TypeScript |
| Chain access | @stellar/stellar-sdk 17, @stellar/freighter-api |
Contract interface
| Function | Purpose |
|---|---|
initialize(admin, name, symbol) |
One-time setup; panics if already initialised |
admin() / set_admin(new_admin) |
Read or hand over the administrator role |
mint(to, id) |
Admin mints a specific id |
mint_next(to) |
Mints the next unused id, once per address |
xfer(from, to, id) |
Transfer an owned token |
xfer_from(spender, from, to, id) |
Transfer using an approval |
appr(owner, operator, id) |
Approve one operator for one token |
appr_all(owner, operator, approved) |
Approve or revoke an operator for every token |
burn(id) |
Admin burns a token |
owner(id) / balance(address) / total_supply() |
Reads |
token_uri(id) / name() / symbol() |
Metadata |
Authorisation uses the contract host (Address::require_auth), so there is no nonce or signature argument to build by hand. Token ids are u32, and owner returns an Option so a burned or unminted id reads as empty.
Configuration
Copy .env.example to .env and set the contract id once the contract is deployed:
VITE_CONTRACT_ID=C...
VITE_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
VITE_NETWORK_PASSPHRASE=Test SDF Network ; September 2015
Running it
npm install
npm run dev # http://localhost:5173
npm run typecheck # tsc --noEmit
npm run build # production bundle in dist/
The contract needs a current Rust toolchain plus the wasm target:
rustup target add wasm32-unknown-unknown
cd contracts
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo build --target wasm32-unknown-unknown --release
Then deploy with the Stellar CLI:
stellar contract deploy \
--wasm target/wasm32-unknown-unknown/release/novapaws.wasm \
--source <your-key> \
--network testnet
Or use the script, which needs nothing but Node: it funds a throwaway testnet key with friendbot, uploads the wasm, creates the instance, calls initialize, and writes the contract id to .env.local. Set NOVAPAWS_SECRET to deploy with an existing key (S...).
node scripts/deploy-testnet.mjs
rpc.sh starts a local quickstart node on port 8000 if you would rather deploy against a private network.
Checks in CI
Every push and pull request runs three jobs: TypeScript type check plus production build, the contract's format check, clippy, tests and wasm build, and a gitleaks secret scan.
Contributing
Issues are labelled by area and difficulty; good first issue marks the ones that do not need contract or wallet knowledge.
Everyone who has contributed is listed in CONTRIBUTORS.md.
License
MIT. See LICENSE.md.
This project started from SoroDogs by Altuğ Bakan, used under the MIT License. The upstream licence and copyright notice are kept verbatim.
探索相关项目
加载中…