├── scripts ├── multisig │ ├── .gitkeep │ ├── tx-data.txt │ ├── upgrade-packageinfo.ts │ └── upgrade-mvr.ts ├── graphql.mainnet.config.toml ├── graphql.testnet.config.toml ├── src │ ├── publish-mvr.ts │ ├── lookups.ts │ └── contracts │ │ └── registration.ts ├── package-info.mainnet.json ├── package-info.testnet.json ├── published.mainnet.json ├── package.json ├── testest.svg ├── tsconfig.json ├── README.md ├── package-info-display.svg └── mvr-cap-display.svg ├── packages ├── proxy │ ├── .gitignore │ ├── Move.toml │ ├── sources │ │ └── utils.move │ └── README.md ├── public_names │ ├── .gitignore │ ├── Move.toml │ └── README.md ├── tests │ ├── upgraded │ │ ├── tests │ │ │ └── upgraded_tests.move │ │ ├── sources │ │ │ └── upgraded.move │ │ ├── Move.toml │ │ └── Move.lock │ ├── demo │ │ ├── sources │ │ │ └── demo.move │ │ ├── Move.toml │ │ └── Move.lock │ └── ts_tests │ │ ├── Move.toml │ │ ├── sources │ │ └── demo.move │ │ └── Move.lock ├── .prettierrc ├── package_info │ ├── tests │ │ ├── display_tests.move │ │ └── package_info_tests.move │ ├── sources │ │ └── partials │ │ │ └── git.move │ ├── Move.toml │ ├── README.md │ └── Move.lock └── mvr │ ├── Move.toml │ ├── sources │ ├── constants.move │ └── app_info.move │ ├── tests │ └── label_tests.move │ ├── Move.lock │ └── README.md ├── crates ├── mvr-api │ ├── .gitignore │ ├── src │ │ ├── utils │ │ │ └── mod.rs │ │ ├── data │ │ │ └── mod.rs │ │ ├── main.rs │ │ └── metrics │ │ │ └── middleware.rs │ ├── tests │ │ ├── packages │ │ │ ├── Cv1 │ │ │ │ ├── Move.toml │ │ │ │ └── sources │ │ │ │ │ └── c.move │ │ │ └── Cv2 │ │ │ │ ├── Move.toml │ │ │ │ └── sources │ │ │ │ └── c.move │ │ └── snapshots │ │ │ ├── mvr_api_tests__package_by_name-3.snap │ │ │ ├── mvr_api_tests__bulk_lookup_limit_exceeded.snap │ │ │ ├── mvr_api_tests__basic_search.snap │ │ │ ├── mvr_api_tests__package_by_name-2.snap │ │ │ └── mvr_api_tests__package_by_name.snap │ ├── README.md │ └── Cargo.toml ├── mvr-cli │ ├── Makefile │ ├── src │ │ ├── utils │ │ │ └── mod.rs │ │ ├── constants.rs │ │ ├── errors.rs │ │ └── main.rs │ ├── tests │ │ ├── templates │ │ │ ├── missing_deps.toml │ │ │ └── regular.toml │ │ ├── test_data │ │ │ └── test_local_dep_to_git │ │ │ │ ├── Move.toml │ │ │ │ └── Move.lock │ │ ├── snapshots │ │ │ ├── manifest_parsing_tests__manifest_with_no_dependencies.snap │ │ │ ├── manifest_parsing_tests__regular_manifest.snap │ │ │ └── unit_tests__local_dep_to_git_dep.snap │ │ └── manifest_parsing_tests.rs │ └── Cargo.toml ├── mvr-types │ ├── src │ │ ├── lib.rs │ │ └── errors.rs │ └── Cargo.toml ├── mvr-schema │ ├── migrations │ │ ├── 2025-05-21-101249_immediate_dependency │ │ │ ├── down.sql │ │ │ └── up.sql │ │ ├── 2025-02-10-104023_mvr │ │ │ └── down.sql │ │ ├── 2025-04-02-095701_search_indexes │ │ │ ├── down.sql │ │ │ └── up.sql │ │ ├── 2025-04-15-124613_analytics_and_indexes │ │ │ ├── down.sql │ │ │ └── up.sql │ │ └── 00000000000000_diesel_initial_setup │ │ │ ├── down.sql │ │ │ └── up.sql │ ├── src │ │ └── lib.rs │ ├── diesel.toml │ ├── Cargo.toml │ └── README.md ├── ci-tests │ ├── tests │ │ ├── cases │ │ │ ├── dependencies │ │ │ │ ├── unsupported-network-without-env │ │ │ │ │ ├── commands.txt │ │ │ │ │ ├── source.move │ │ │ │ │ └── initial.toml │ │ │ │ ├── regular-testnet │ │ │ │ │ ├── commands.txt │ │ │ │ │ ├── source.move │ │ │ │ │ └── initial.toml │ │ │ │ ├── versioned-mainnet-no-sui-dep │ │ │ │ │ ├── commands.txt │ │ │ │ │ ├── source.move │ │ │ │ │ └── initial.toml │ │ │ │ ├── regular-mainnet-add-with-dot-sui │ │ │ │ │ ├── commands.txt │ │ │ │ │ ├── source.move │ │ │ │ │ └── initial.toml │ │ │ │ ├── unsupported-network-with-env │ │ │ │ │ ├── commands.txt │ │ │ │ │ ├── source.move │ │ │ │ │ └── initial.toml │ │ │ │ └── regular-mainnet │ │ │ │ │ ├── source.move │ │ │ │ │ ├── commands.txt │ │ │ │ │ └── initial.toml │ │ │ └── commands │ │ │ │ └── commands.txt │ │ └── snapshots │ │ │ ├── use_case_tester__cmd-sui_client_switch_--env_mainnet.snap │ │ │ ├── use_case_tester__toml-unsupported-network-without-env.snap │ │ │ ├── use_case_tester__toml-unsupported-network-with-env.snap │ │ │ ├── use_case_tester__toml-versioned-mainnet-no-sui-dep.snap │ │ │ ├── use_case_tester__toml-regular-mainnet-add-with-dot-sui.snap │ │ │ ├── use_case_tester__std-output-regular-testnet.snap │ │ │ ├── use_case_tester__std-output-unsupported-network-with-env.snap │ │ │ ├── use_case_tester__std-output-versioned-mainnet-no-sui-dep.snap │ │ │ ├── use_case_tester__std-output-regular-mainnet-add-with-dot-sui.snap │ │ │ ├── use_case_tester__cmd-mvr_search_@testingafreeclaim__upgraded.snap │ │ │ ├── use_case_tester__std-output-unsupported-network-without-env.snap │ │ │ ├── use_case_tester__toml-regular-testnet.snap │ │ │ ├── use_case_tester__cmd-mvr_search_@testingafreeclaim__upgraded_--limit_1.snap │ │ │ ├── use_case_tester__toml-regular-mainnet.snap │ │ │ ├── use_case_tester__std-output-regular-mainnet.snap │ │ │ ├── use_case_tester__cmd-mvr_resolve_@pkg__qwer__1.snap │ │ │ ├── use_case_tester__cmd-mvr_resolve_@pkg__qwer__1_--network_testnet.snap │ │ │ └── use_case_tester__cmd-mvr_--help.snap │ └── Cargo.toml └── mvr-indexer │ ├── tests │ ├── checkpoints │ │ ├── packages_write │ │ │ └── 0.chk │ │ ├── git_infos_write │ │ │ └── 111890386.chk │ │ ├── name_records_write │ │ │ └── 116129830.chk │ │ ├── immediate_dependency │ │ │ └── 92045642.chk │ │ └── package_infos_write │ │ │ └── 119751079.chk │ └── snapshots │ │ ├── mvr_data_tests__name_records_write__name_records.snap │ │ ├── mvr_data_tests__git_infos_write__git_infos.snap │ │ ├── mvr_data_tests__package_infos_write__package_infos.snap │ │ ├── mvr_data_tests__immediate_dependency__packages.snap │ │ ├── mvr_data_tests__packages_write__package_dependencies.snap │ │ └── mvr_data_tests__packages_write__packages.snap │ ├── src │ └── lib.rs │ ├── examples │ └── download_checkpoint.rs │ └── Cargo.toml ├── app ├── public │ ├── favicon.png │ ├── mvr-docs-bg.webp │ └── default-icon.svg ├── postcss.config.cjs ├── src │ ├── assets │ │ ├── fonts │ │ │ ├── TWKEverett-Bold.woff2 │ │ │ ├── TWKEverett-Medium.woff2 │ │ │ ├── TWKEverett-Regular.woff2 │ │ │ ├── TWKEverettMono-Bold.woff2 │ │ │ ├── TWKEverettMono-Medium.woff2 │ │ │ └── TWKEverettMono-Regular.woff2 │ │ └── icons │ │ │ ├── x.svg │ │ │ ├── linkedin.svg │ │ │ ├── sui-symbol.svg │ │ │ └── youtube.svg │ ├── data │ │ └── localStorage.ts │ ├── components │ │ ├── ui │ │ │ ├── public-name-label.tsx │ │ │ ├── utils │ │ │ │ └── sizeAndWeight.ts │ │ │ ├── image-with-fallback.tsx │ │ │ ├── explorer-link.tsx │ │ │ ├── load-more.tsx │ │ │ ├── label.tsx │ │ │ ├── CopyBtn.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── textarea.tsx │ │ │ ├── input.tsx │ │ │ ├── checkbox.tsx │ │ │ ├── TabTitle.tsx │ │ │ ├── popover.tsx │ │ │ ├── dependency-label.tsx │ │ │ ├── switch.tsx │ │ │ ├── alert.tsx │ │ │ └── resizable.tsx │ │ ├── layouts │ │ │ ├── PlainPageLayout.tsx │ │ │ ├── WalletConnectedContent.tsx │ │ │ └── BaseLayout.tsx │ │ ├── providers │ │ │ ├── packages-provider.tsx │ │ │ ├── mvr-provider.tsx │ │ │ ├── app-provider.tsx │ │ │ └── Providers.tsx │ │ ├── animations │ │ │ └── FadeInUpDiv.tsx │ │ ├── apps │ │ │ └── AppViewer.tsx │ │ ├── single-package │ │ │ ├── ReadMeRenderer.tsx │ │ │ ├── SinglePackageLayout.tsx │ │ │ └── SinglePackageHeader.tsx │ │ ├── homepage │ │ │ ├── HomeSearchSection.tsx │ │ │ ├── ShareOnMVR.tsx │ │ │ └── DocsCTA.tsx │ │ ├── modals │ │ │ └── ModalFooter.tsx │ │ └── packages │ │ │ └── Version.tsx │ ├── hooks │ │ ├── useDecodedUriName.ts │ │ ├── useBreakpoint.ts │ │ ├── useIsFocused.ts │ │ ├── useActiveAddress.ts │ │ ├── useWalletNetwork.ts │ │ ├── useCopy.ts │ │ ├── useDebounce.ts │ │ ├── useSuiNSResolution.ts │ │ ├── usePackageModules.ts │ │ ├── useChainIdentifier.ts │ │ ├── useGetPackageInfo.ts │ │ ├── useMediaQuery.ts │ │ ├── useNameAnalytics.ts │ │ ├── useGetObjectsById.ts │ │ ├── useIsNameAvailable.ts │ │ ├── useVersionsTable.ts │ │ ├── useGetPackageInfoObjects.ts │ │ ├── useGetUpgradeCaps.ts │ │ └── useKioskItems.ts │ ├── app │ │ ├── privacy-policy │ │ │ └── page.tsx │ │ ├── sitemap.xml │ │ │ └── route.tsx │ │ ├── package │ │ │ └── [...name] │ │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── faq │ │ │ └── page.tsx │ │ └── apps │ │ │ └── layout.tsx │ ├── lib │ │ ├── use-forwarded-ref.tsx │ │ └── constants.ts │ ├── icons │ │ ├── SocialX.tsx │ │ ├── Delete.tsx │ │ ├── CodeIcon.tsx │ │ ├── AnimatedCheckmark.tsx │ │ ├── Disconnect.tsx │ │ ├── SocialYoutube.tsx │ │ ├── Copied.tsx │ │ ├── PackageSelected.tsx │ │ ├── PackageUnselected.tsx │ │ ├── Copy.tsx │ │ ├── SocialDiscord.tsx │ │ └── MvrLogo.tsx │ ├── fonts.ts │ ├── env.js │ └── utils │ │ └── helpers.ts ├── README.md ├── prettier.config.js ├── next.config.js ├── components.json ├── .env.example ├── .gitignore ├── tsconfig.json └── .eslintrc.cjs ├── docker ├── mvr-api │ ├── entry.sh │ ├── build.sh │ └── Dockerfile └── mvr-indexer │ ├── entry.sh │ ├── build.sh │ └── Dockerfile ├── .gitignore ├── .github └── workflows │ └── move-formatter.yml ├── create-new-release.sh └── README.md /scripts/multisig/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /scripts/multisig/tx-data.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/proxy/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | -------------------------------------------------------------------------------- /packages/public_names/.gitignore: -------------------------------------------------------------------------------- 1 | build/* 2 | -------------------------------------------------------------------------------- /crates/mvr-api/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | .env.local 3 | -------------------------------------------------------------------------------- /crates/mvr-api/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod pagination; 2 | -------------------------------------------------------------------------------- /crates/mvr-cli/Makefile: -------------------------------------------------------------------------------- 1 | all: 2 | cargo build 3 | 4 | .PHONY: 5 | all 6 | -------------------------------------------------------------------------------- /app/public/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/public/favicon.png -------------------------------------------------------------------------------- /packages/tests/upgraded/tests/upgraded_tests.move: -------------------------------------------------------------------------------- 1 | module upgraded::upgraded_tests; 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/public/mvr-docs-bg.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/public/mvr-docs-bg.webp -------------------------------------------------------------------------------- /packages/tests/demo/sources/demo.move: -------------------------------------------------------------------------------- 1 | module demo::demo; 2 | 3 | public fun num(): u64 { 4 | 42 5 | } 6 | -------------------------------------------------------------------------------- /crates/mvr-cli/src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod api_data; 2 | pub mod git; 3 | pub mod manifest; 4 | pub mod sui_binary; 5 | -------------------------------------------------------------------------------- /crates/mvr-types/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod errors; 2 | pub mod name; 3 | pub mod name_service; 4 | pub mod named_type; 5 | -------------------------------------------------------------------------------- /app/postcss.config.cjs: -------------------------------------------------------------------------------- 1 | const config = { 2 | plugins: { 3 | tailwindcss: {}, 4 | }, 5 | }; 6 | 7 | module.exports = config; 8 | -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverett-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverett-Bold.woff2 -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverett-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverett-Medium.woff2 -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-05-21-101249_immediate_dependency/down.sql: -------------------------------------------------------------------------------- 1 | alter table package_dependencies drop immediate_dependency; -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverett-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverett-Regular.woff2 -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverettMono-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverettMono-Bold.woff2 -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-without-env/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env devnet 2 | mvr add @mvr/core 3 | -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverettMono-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverettMono-Medium.woff2 -------------------------------------------------------------------------------- /app/src/assets/fonts/TWKEverettMono-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/app/src/assets/fonts/TWKEverettMono-Regular.woff2 -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-testnet/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env testnet 2 | mvr add @pkg/qwer 3 | sui move build 4 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-05-21-101249_immediate_dependency/up.sql: -------------------------------------------------------------------------------- 1 | alter table package_dependencies 2 | add immediate_dependency boolean; -------------------------------------------------------------------------------- /packages/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 4, 4 | "useModuleLabel": true, 5 | "autoGroupImports": "package" 6 | } 7 | -------------------------------------------------------------------------------- /app/README.md: -------------------------------------------------------------------------------- 1 | # Move Registry frontend app 2 | 3 | The frontend app for Move Registry (mvr). 4 | Allows package maintainers to manage their packages. 5 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/versioned-mainnet-no-sui-dep/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env mainnet 2 | mvr add @pkg/qwer/1 3 | sui move build 4 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet-add-with-dot-sui/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env mainnet 2 | mvr add pkg.sui/qwer/1 3 | sui move build 4 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-with-env/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env devnet 2 | MVR_FALLBACK_NETWORK=mainnet mvr add @mvr/core 3 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/checkpoints/packages_write/0.chk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/crates/mvr-indexer/tests/checkpoints/packages_write/0.chk -------------------------------------------------------------------------------- /docker/mvr-api/entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export RUST_BACKTRACE=1 4 | export RUST_LOG=debug 5 | 6 | /opt/mysten/bin/mvr-api --database-url "$DB_URL" --network "$NETWORK" 7 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/packages/Cv1/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "C" 3 | version = "0.0.1" 4 | published-at = "0xc1" 5 | edition = "2024.beta" 6 | 7 | [addresses] 8 | c = "0xc1" 9 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/packages/Cv2/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "C" 3 | version = "0.0.2" 4 | published-at = "0xc2" 5 | edition = "2024.beta" 6 | 7 | [addresses] 8 | c = "0xc1" 9 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/checkpoints/git_infos_write/111890386.chk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/crates/mvr-indexer/tests/checkpoints/git_infos_write/111890386.chk -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use demo::demo; 3 | 4 | public fun new(): u64 { 5 | return demo::num() 6 | } 7 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/checkpoints/name_records_write/116129830.chk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/crates/mvr-indexer/tests/checkpoints/name_records_write/116129830.chk -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/versioned-mainnet-no-sui-dep/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use mvr_a::mvr_a; 3 | 4 | public fun new() { 5 | mvr_a::new_v1(); 6 | } 7 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/checkpoints/immediate_dependency/92045642.chk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/crates/mvr-indexer/tests/checkpoints/immediate_dependency/92045642.chk -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/checkpoints/package_infos_write/119751079.chk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/MystenLabs/mvr/HEAD/crates/mvr-indexer/tests/checkpoints/package_infos_write/119751079.chk -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_STORE 3 | build 4 | target 5 | 6 | *.localnet.* 7 | published.localnet.json 8 | .trace 9 | *.mvcov 10 | scripts/multisig/tx-data.txt 11 | 12 | .env 13 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet-add-with-dot-sui/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use mvr_a::mvr_a; 3 | 4 | public fun new() { 5 | mvr_a::new_v1(); 6 | } 7 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-with-env/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use demo::demo; 3 | 4 | public fun new(): u64 { 5 | return demo::num() 6 | } 7 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/templates/missing_deps.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr" 3 | edition = "2024.alpha" # edition = "legacy" to use legacy (pre-2024) Move 4 | 5 | [addresses] 6 | mvr = "0x0" 7 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-testnet/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use mvr_a::mvr_a; 3 | 4 | public fun new() { 5 | mvr_a::noop_with_one_type_param() 6 | } 7 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-without-env/source.move: -------------------------------------------------------------------------------- 1 | module nftmaker::nftmaker; 2 | use demo::demo; 3 | 4 | public fun new(): u64 { 5 | return demo::num() 6 | } 7 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet/commands.txt: -------------------------------------------------------------------------------- 1 | sui client switch --env mainnet 2 | mvr add @mvr/demo 3 | mvr add @testingafreeclaim/upgraded 4 | mvr add @pkg/qwer 5 | sui move build 6 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-with-env/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | 7 | [addresses] 8 | nftmaker = "0x0" 9 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/unsupported-network-without-env/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | 7 | [addresses] 8 | nftmaker = "0x0" 9 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/versioned-mainnet-no-sui-dep/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | 7 | [addresses] 8 | nftmaker = "0x0" 9 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-02-10-104023_mvr/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS packages; 2 | DROP TABLE IF EXISTS name_records; 3 | DROP TABLE IF EXISTS package_infos; 4 | DROP TABLE IF EXISTS git_infos; 5 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet-add-with-dot-sui/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | 7 | [addresses] 8 | nftmaker = "0x0" 9 | -------------------------------------------------------------------------------- /packages/tests/upgraded/sources/upgraded.move: -------------------------------------------------------------------------------- 1 | module upgraded::upgraded; 2 | 3 | public struct V1 has copy, drop {} 4 | public struct V2 has copy, drop {} 5 | 6 | public fun v1() {} 7 | 8 | public fun v2() {} 9 | -------------------------------------------------------------------------------- /app/src/data/localStorage.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | export enum LocalStorageKeys { 4 | MVRSetup = 'MVRSetup', 5 | SELECTED_NS_NAME = 'SELECTED_NS_NAME', 6 | } 7 | -------------------------------------------------------------------------------- /crates/mvr-schema/src/lib.rs: -------------------------------------------------------------------------------- 1 | use diesel_migrations::{embed_migrations, EmbeddedMigrations}; 2 | 3 | pub mod models; 4 | pub mod schema; 5 | 6 | pub const MIGRATIONS: EmbeddedMigrations = embed_migrations!("migrations"); 7 | -------------------------------------------------------------------------------- /app/prettier.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */ 2 | const config = { 3 | plugins: ["prettier-plugin-tailwindcss"], 4 | }; 5 | 6 | export default config; 7 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-sui_client_switch_--env_mainnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | Active environment switched to [mainnet] 6 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/snapshots/mvr_api_tests__package_by_name-3.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-api/tests/mvr_api_tests.rs 3 | expression: non_existent.to_string() 4 | --- 5 | {"message":"Package @test/does-not-exist not found"} 6 | -------------------------------------------------------------------------------- /scripts/graphql.mainnet.config.toml: -------------------------------------------------------------------------------- 1 | [move-registry] 2 | package-address = "0x62c1f5b1cb9e3bfc3dd1f73c95066487b662048a6358eabdbf67f6cdeca6db4b" 3 | registry-id = "0xe8417c530cde59eddf6dfb760e8a0e3e2c6f17c69ddaab5a73dd6a6e65fc463b" 4 | -------------------------------------------------------------------------------- /scripts/graphql.testnet.config.toml: -------------------------------------------------------------------------------- 1 | [move-registry] 2 | package-address = "0x8c21e7301b34e0f3cb939b609258b330464cfc67347220cd96b66945e33b0a2a" 3 | registry-id = "0x5b6656965b0abf56e085dfe974d024a060aee5ab93c93375d7f7900bf68d8f5b" 4 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/snapshots/mvr_api_tests__bulk_lookup_limit_exceeded.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-api/tests/mvr_api_tests.rs 3 | expression: err.to_string() 4 | --- 5 | Error: {"message":"Batch size limit exceeded: 51 > 50"} 6 | -------------------------------------------------------------------------------- /crates/mvr-schema/diesel.toml: -------------------------------------------------------------------------------- 1 | # For documentation on how to configure this file, 2 | # see https://diesel.rs/guides/configuring-diesel-cli 3 | 4 | [print_schema] 5 | file = "src/schema.rs" 6 | 7 | [migrations_directory] 8 | dir = "migrations" 9 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/commands/commands.txt: -------------------------------------------------------------------------------- 1 | mvr --help 2 | mvr search @testingafreeclaim/upgraded 3 | sui client switch --env mainnet 4 | mvr resolve @pkg/qwer/1 5 | mvr resolve @pkg/qwer/1 --network testnet 6 | mvr search @testingafreeclaim/upgraded --limit 1 7 | -------------------------------------------------------------------------------- /scripts/src/publish-mvr.ts: -------------------------------------------------------------------------------- 1 | import { publishDotMove } from "./publish"; 2 | 3 | 4 | const publish = async (network: 'mainnet' | 'testnet') => { 5 | await publishDotMove(network, '/Users/manosliolios/.sui/sui_config/client.yaml'); 6 | } 7 | 8 | publish('mainnet'); 9 | -------------------------------------------------------------------------------- /app/src/components/ui/public-name-label.tsx: -------------------------------------------------------------------------------- 1 | export function PublicNameLabel() { 2 | return ( 3 | 4 | Public Name 5 | 6 | ); 7 | } 8 | -------------------------------------------------------------------------------- /crates/ci-tests/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ci_tests" 3 | version = "0.1.0" 4 | edition = "2021" 5 | publish = false 6 | 7 | [dev-dependencies] 8 | insta.workspace = true 9 | tempfile.workspace = true 10 | anyhow.workspace = true 11 | strip-ansi-escapes = "0.2.1" 12 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-04-02-095701_search_indexes/down.sql: -------------------------------------------------------------------------------- 1 | -- This file should undo anything in `up.sql` 2 | 3 | DROP INDEX IF EXISTS idx_name_similar_to; 4 | DROP INDEX IF EXISTS idx_metadata_desc; 5 | 6 | -- Drop the `pg_trgm` extension 7 | DROP EXTENSION IF EXISTS pg_trgm; 8 | -------------------------------------------------------------------------------- /docker/mvr-indexer/entry.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | export RUST_BACKTRACE=1 4 | export RUST_LOG=debug 5 | 6 | # for initdb 7 | export PATH="/usr/lib/postgresql/$(ls /usr/lib/postgresql | head -n 1)/bin:$PATH" 8 | 9 | /opt/mysten/bin/mvr-indexer --database-url "$DB_URL" --env "$NETWORK" 10 | -------------------------------------------------------------------------------- /packages/tests/demo/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "demo" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 7 | 8 | [addresses] 9 | demo = "0x0" 10 | -------------------------------------------------------------------------------- /scripts/package-info.mainnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageId": "0x0f6b71233780a3f362137b44ac219290f4fd34eb81e0cb62ddf4bb38d1f9a3a1", 3 | "upgradeCap": "0xd28751219386a463d569d008525e0ea19d72cde8b5b24d601b7f1bfac07d85dc", 4 | "publisher": "0x9557196b652ab2d619dafda1066d96a84258956cde6eb97092a32fedb95d1acc" 5 | } -------------------------------------------------------------------------------- /scripts/package-info.testnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageId": "0xb96f44d08ae214887cae08d8ae061bbf6f0908b1bfccb710eea277f45150b9f4", 3 | "upgradeCap": "0xf8a8b89514e66e059189f36c7e8a9e21e4640ca1f476c877c9e9d8dceaa59867", 4 | "publisher": "0xedb5432ebd02b7565d8dae79f4907657b9a36efb0d3a46446fd4908a9f2eb02f" 5 | } -------------------------------------------------------------------------------- /app/src/hooks/useDecodedUriName.ts: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { useParams } from "next/navigation"; 4 | 5 | export function useDecodedUriName() { 6 | const params = useParams(); 7 | const name = params.name as string[]; 8 | 9 | return name?.map((x) => decodeURIComponent(x)).join("/"); 10 | } 11 | -------------------------------------------------------------------------------- /packages/tests/upgraded/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "upgraded" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 7 | 8 | [addresses] 9 | upgraded = "0x0" 10 | -------------------------------------------------------------------------------- /packages/tests/ts_tests/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ts_tests" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet" } 7 | 8 | [addresses] 9 | ts_tests = "0x0" 10 | 11 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-unsupported-network-without-env.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | 11 | [addresses] 12 | nftmaker = "0x0" 13 | -------------------------------------------------------------------------------- /crates/mvr-types/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr-types" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | serde = { workspace = true, features = ["derive"] } 8 | anyhow.workspace = true 9 | thiserror.workspace = true 10 | once_cell.workspace = true 11 | regex = "1.11.1" 12 | sui-sdk-types.workspace = true 13 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-mainnet/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 7 | 8 | [addresses] 9 | nftmaker = "0x0" 10 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/cases/dependencies/regular-testnet/initial.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nftmaker" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 7 | 8 | [addresses] 9 | nftmaker = "0x0" 10 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-unsupported-network-with-env.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | mvr = { r.mvr = "@mvr/core" } 11 | 12 | [addresses] 13 | nftmaker = "0x0" 14 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-versioned-mainnet-no-sui-dep.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | mvr_a = { r.mvr = "@pkg/qwer/1" } 11 | 12 | [addresses] 13 | nftmaker = "0x0" 14 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-regular-mainnet-add-with-dot-sui.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | mvr_a = { r.mvr = "pkg.sui/qwer/1" } 11 | 12 | [addresses] 13 | nftmaker = "0x0" 14 | -------------------------------------------------------------------------------- /app/next.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-unsafe-call */ 2 | /** 3 | * Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful 4 | * for Docker builds. 5 | */ 6 | await import("./src/env.js"); 7 | 8 | /** @type {import("next").NextConfig} */ 9 | const config = {}; 10 | 11 | export default config; 12 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/templates/regular.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr" 3 | edition = "2024.alpha" # edition = "legacy" to use legacy (pre-2024) Move 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override = true } 7 | 8 | [addresses] 9 | mvr = "0x0" 10 | -------------------------------------------------------------------------------- /packages/proxy/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr_subdomain_proxy" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override = true } 7 | mvr = { local = "../mvr" } 8 | 9 | [addresses] 10 | mvr_subdomain_proxy = "0x0" 11 | 12 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-regular-testnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [testnet] 6 | 7 | Successfully added dependency @pkg/qwer to your Move.toml 8 | 9 | You can use this dependency in your modules by calling: use mvr_a::; 10 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-04-15-124613_analytics_and_indexes/down.sql: -------------------------------------------------------------------------------- 1 | DROP INDEX IF EXISTS package_analytics_call_date_package_id_idx; 2 | DROP INDEX IF EXISTS package_analytics_package_id_idx; 3 | DROP INDEX IF EXISTS idx_package_dependencies_package_id; 4 | DROP INDEX IF EXISTS idx_package_dependencies_dependency_package_id; 5 | DROP TABLE IF EXISTS package_analytics; 6 | -------------------------------------------------------------------------------- /packages/public_names/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "public_names" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override = true } 7 | mvr_subdomain_proxy = { local = "../proxy" } 8 | 9 | [addresses] 10 | public_names = "0x0" 11 | 12 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-unsupported-network-with-env.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [devnet] 6 | 7 | Successfully added dependency @mvr/core to your Move.toml 8 | 9 | You can use this dependency in your modules by calling: use mvr::; 10 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-versioned-mainnet-no-sui-dep.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [mainnet] 6 | 7 | Successfully added dependency @pkg/qwer/1 to your Move.toml 8 | 9 | You can use this dependency in your modules by calling: use mvr_a::; 10 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/test_data/test_local_dep_to_git/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "deepbook" 3 | edition = "2024.beta" 4 | version = "0.0.1" 5 | 6 | [dependencies] 7 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 8 | token = { local = "../token" } 9 | 10 | [addresses] 11 | deepbook = "0x0" 12 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-regular-mainnet-add-with-dot-sui.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [mainnet] 6 | 7 | Successfully added dependency pkg.sui/qwer/1 to your Move.toml 8 | 9 | You can use this dependency in your modules by calling: use mvr_a::; 10 | -------------------------------------------------------------------------------- /app/src/components/layouts/PlainPageLayout.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from "react"; 2 | import Header from "@/components/Header"; 3 | 4 | export function PlainPageLayout({ children }: { children: ReactNode }) { 5 | return ( 6 | <> 7 |
8 |
9 |
{children}
10 |
11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /app/src/app/privacy-policy/page.tsx: -------------------------------------------------------------------------------- 1 | import { PlainPageLayout } from "@/components/layouts/PlainPageLayout"; 2 | import { Text } from "@/components/ui/Text"; 3 | 4 | export default function PrivacyPolicy() { 5 | return ( 6 | 7 | 8 | Privacy Policy would go here! 9 | 10 | 11 | ); 12 | } 13 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/00000000000000_diesel_initial_setup/down.sql: -------------------------------------------------------------------------------- 1 | -- This file was automatically created by Diesel to setup helper functions 2 | -- and other internal bookkeeping. This file is safe to edit, any future 3 | -- changes will be added to existing projects as new migrations. 4 | 5 | DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass); 6 | DROP FUNCTION IF EXISTS diesel_set_updated_at(); 7 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/snapshots/manifest_parsing_tests__manifest_with_no_dependencies.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-cli/tests/manifest_parsing_tests.rs 3 | expression: move_toml.doc.to_string() 4 | --- 5 | [package] 6 | name = "mvr" 7 | edition = "2024.alpha" # edition = "legacy" to use legacy (pre-2024) Move 8 | 9 | [addresses] 10 | mvr = "0x0" 11 | 12 | [dependencies] 13 | mvr_demo = { r.mvr = "@mvr/demo" } 14 | -------------------------------------------------------------------------------- /crates/mvr-schema/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr-schema" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | sui-field-count.workspace = true 8 | diesel = { workspace = true, features = ["postgres", "uuid", "chrono", "serde_json", "numeric"] } 9 | diesel_migrations.workspace = true 10 | serde = { workspace = true } 11 | serde_json = { workspace = true } 12 | chrono = { workspace = true } 13 | -------------------------------------------------------------------------------- /packages/package_info/tests/display_tests.move: -------------------------------------------------------------------------------- 1 | module package_info::display_tests; 2 | 3 | use package_info::display; 4 | 5 | #[test] 6 | fun test_display() { 7 | let mut display = display::new( 8 | b"Demo NFT".to_string(), 9 | b"E0E1EC".to_string(), 10 | b"BDBFEC".to_string(), 11 | b"030F1C".to_string(), 12 | ); 13 | 14 | display.encode_label(@0x0.to_string()); 15 | } 16 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-mvr_search_@testingafreeclaim__upgraded.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | - @testingafreeclaim/upgraded 6 | # -- 7 | Networks: mainnet 8 | 9 | - @testingafreeclaim/upgraded-demo 10 | # 11 | Networks: mainnet 12 | 13 | Tip: You can find more information about a package by using: mvr resolve 14 | -------------------------------------------------------------------------------- /app/src/components/ui/utils/sizeAndWeight.ts: -------------------------------------------------------------------------------- 1 | interface SizeAndWeightProps { 2 | size?: string | null; 3 | weight?: string | null; 4 | } 5 | export type SizeAndWeightVariant = 6 | `${NonNullable}/${NonNullable}`; 7 | 8 | export function parseVariant(variant: string) { 9 | return variant.split("/") as [T["size"], T["weight"]]; 10 | } 11 | -------------------------------------------------------------------------------- /crates/mvr-indexer/src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod handlers; 2 | pub mod models; 3 | 4 | pub const MAINNET_REMOTE_STORE_URL: &str = "https://checkpoints.mainnet.sui.io"; 5 | pub const TESTNET_REMOTE_STORE_URL: &str = "https://checkpoints.testnet.sui.io"; 6 | pub const DEVNET_FULL_NODE_REST_API_URL: &str = "https://mysten-rpc.devnet.sui.io/rest"; 7 | pub const MAINNET_CHAIN_ID: &str = "35834a8a"; 8 | pub const TESTNET_CHAIN_ID: &str = "4c78adac"; 9 | -------------------------------------------------------------------------------- /app/src/components/providers/packages-provider.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 'use client'; 4 | 5 | import { Network } from '@/utils/types'; 6 | import { createContext, useContext } from 'react'; 7 | 8 | export const PackagesNetworkContext = createContext("mainnet"); 9 | 10 | export function usePackagesNetwork() { 11 | return useContext(PackagesNetworkContext); 12 | } 13 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/snapshots/mvr_data_tests__name_records_write__name_records.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-indexer/tests/mvr_data_tests.rs 3 | expression: rows 4 | --- 5 | [ 6 | { 7 | "name": "demo@testingafreeclaim/sub", 8 | "object_version": "497770418", 9 | "mainnet_id": "0x10016ab4d6c9447c60980df6d896ce2283d3cdf8ba8a2f6a6f33b302a55c70cb", 10 | "testnet_id": null, 11 | "metadata": {} 12 | } 13 | ] 14 | -------------------------------------------------------------------------------- /crates/mvr-cli/src/constants.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::{self, Display, Formatter}; 2 | 3 | pub const MINIMUM_BUILD_SUI_VERSION: (u32, u32) = (1, 35); 4 | 5 | pub enum EnvVariables { 6 | SuiBinaryPath, 7 | } 8 | 9 | impl Display for EnvVariables { 10 | fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { 11 | match self { 12 | EnvVariables::SuiBinaryPath => write!(f, "SUI_BINARY_PATH"), 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /app/src/hooks/useBreakpoint.ts: -------------------------------------------------------------------------------- 1 | import { useMediaQuery } from '@/hooks/useMediaQuery'; 2 | 3 | /** 4 | * values taken from tailwind.config.js 5 | */ 6 | export const BREAK_POINT = { 7 | sm: 640, 8 | md: 768, 9 | lg: 1024, 10 | xl: 1280, 11 | '2xl': 1536, 12 | }; 13 | 14 | export function useBreakpoint(breakpoint: keyof typeof BREAK_POINT) { 15 | return useMediaQuery(`(min-width: ${BREAK_POINT[breakpoint]}px)`); 16 | } 17 | -------------------------------------------------------------------------------- /app/src/hooks/useIsFocused.ts: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | 3 | export function useIsFocused() { 4 | const [isFocused, setIsFocused] = useState(false); 5 | 6 | const handleFocus = () => setIsFocused(true); 7 | 8 | const handleBlur = () => { 9 | // Timeout needed to allow dropdown click before it disappears 10 | setTimeout(() => setIsFocused(false), 100); 11 | }; 12 | 13 | return { isFocused, handleFocus, handleBlur }; 14 | } 15 | -------------------------------------------------------------------------------- /app/src/hooks/useActiveAddress.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | import { useCurrentAccount } from "@mysten/dapp-kit"; 4 | import { useMVRContext } from "@/components/providers/mvr-provider"; 5 | 6 | export function useActiveAddress() { 7 | const { isCustom, customAddress } = useMVRContext(); 8 | const account = useCurrentAccount(); 9 | 10 | return isCustom ? customAddress : account?.address; 11 | } 12 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-unsupported-network-without-env.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [devnet] 6 | Error: The requested network (or chain identifier) is not supported. Only `mainnet` and `testnet` are supported. 7 | If you are using this locally, you can set the `MVR_FALLBACK_NETWORK` environment variable to `mainnet` or `testnet`. 8 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/packages/Cv1/sources/c.move: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | module c::c { 5 | public struct C { 6 | x: u64 7 | } 8 | 9 | public struct WPhantomTypeParam { 10 | x: u64 11 | } 12 | 13 | public struct WTypeParam { 14 | x: u64, 15 | t: T 16 | } 17 | 18 | public fun c(): u64 { 19 | 42 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /app/src/assets/icons/x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/src/hooks/useWalletNetwork.ts: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | import { useCurrentAccount } from '@mysten/dapp-kit'; 5 | 6 | /** Returns the connected wallet's active network (mainnet, testnet, devnet, localnet) */ 7 | export function useWalletNetwork() { 8 | const account = useCurrentAccount(); 9 | return account?.chains[0]?.replace('sui:', '') as 'mainnet' | 'testnet' | 'devnet' | 'localnet' | undefined; 10 | } 11 | -------------------------------------------------------------------------------- /app/src/lib/use-forwarded-ref.tsx: -------------------------------------------------------------------------------- 1 | import type React from 'react'; 2 | import { useEffect, useRef } from 'react'; 3 | 4 | export function useForwardedRef(ref: React.ForwardedRef) { 5 | const innerRef = useRef(null); 6 | 7 | useEffect(() => { 8 | if (!ref) return; 9 | if (typeof ref === 'function') { 10 | ref(innerRef.current); 11 | } else { 12 | ref.current = innerRef.current; 13 | } 14 | }); 15 | 16 | return innerRef; 17 | } 18 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-regular-testnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 11 | mvr_a = { r.mvr = "@pkg/qwer" } 12 | 13 | [addresses] 14 | nftmaker = "0x0" 15 | -------------------------------------------------------------------------------- /scripts/published.mainnet.json: -------------------------------------------------------------------------------- 1 | { 2 | "packageId": "0x62c1f5b1cb9e3bfc3dd1f73c95066487b662048a6358eabdbf67f6cdeca6db4b", 3 | "upgradeCap": "0xfb024867d7e2d1e9246e326f4debb3f33404354137c3685a50ab1f188cd09a0e", 4 | "publisher": "0x03fb80df12106872d772e016a0624cd110ecef9e824e33e76cb0af41795e9be0", 5 | "appRegistry": "0x0e5d473a055b6b7d014af557a13ad9075157fdc19b6d51562a18511afd397727", 6 | "appRegistryTable": "0xe8417c530cde59eddf6dfb760e8a0e3e2c6f17c69ddaab5a73dd6a6e65fc463b" 7 | } -------------------------------------------------------------------------------- /crates/mvr-api/README.md: -------------------------------------------------------------------------------- 1 | # MVR API 2 | 3 | This is a REST API for MVR. 4 | 5 | ## Running the API 6 | 7 | By default, the API will run on port `8000`. To specify a different port, use the `--api-port` flag. 8 | 9 | The `network` can be either `mainnet` or `testnet`. This will determine which network all resolution requests will be made to. 10 | 11 | ```bash 12 | cargo run --bin mvr-api -- --database-url postgres://postgres:postgres@localhost:5432/mvr --network mainnet 13 | ``` 14 | -------------------------------------------------------------------------------- /crates/mvr-schema/README.md: -------------------------------------------------------------------------------- 1 | # MVR Schema 2 | 3 | This crate contains the schema for the MVR project. This will be used by both the indexer 4 | and the API crate. 5 | 6 | ## How to setup your database 7 | 8 | 1. Create a `.env` file and add the following: 9 | ``` 10 | DATABASE_URL=postgres://:@localhost:5432/mvr 11 | ``` 12 | 13 | 2. Run the following command to create the database: 14 | ``` 15 | diesel setup 16 | ``` 17 | 18 | > You can now use all diesel commands to manage your database. 19 | 20 | -------------------------------------------------------------------------------- /packages/tests/ts_tests/sources/demo.move: -------------------------------------------------------------------------------- 1 | module ts_tests::demo; 2 | 3 | public struct DemoNFT has key, store { 4 | id: UID, 5 | } 6 | 7 | public struct DemoWitness has drop {} 8 | public struct NestedDemoWitness has drop {} 9 | public struct NewVersionWitness has drop {} 10 | 11 | public fun new_nft(ctx: &mut TxContext): DemoNFT { 12 | DemoNFT { 13 | id: object::new(ctx), 14 | } 15 | } 16 | 17 | #[allow(unused_type_parameter)] 18 | public fun noop_w_type_param() {} 19 | -------------------------------------------------------------------------------- /app/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "new-york", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/styles/globals.css", 9 | "baseColor": "neutral", 10 | "cssVariables": false, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } -------------------------------------------------------------------------------- /app/src/hooks/useCopy.ts: -------------------------------------------------------------------------------- 1 | import { useState } from "react"; 2 | import { toast } from "sonner"; 3 | 4 | export const useCopy = (text: string) => { 5 | const [copied, setCopied] = useState(false); 6 | 7 | const copy = () => { 8 | navigator.clipboard.writeText(text); 9 | setCopied(true); 10 | toast.success("Copied to clipboard", { 11 | duration: 1000, 12 | position: "bottom-center", 13 | }); 14 | setTimeout(() => setCopied(false), 1500); 15 | }; 16 | 17 | return { copied, copy }; 18 | }; 19 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-mvr_search_@testingafreeclaim__upgraded_--limit_1.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | - @testingafreeclaim/upgraded 6 | # -- 7 | Networks: mainnet 8 | 9 | Tip: You can find more information about a package by using: mvr resolve 10 | 11 | There are multiple pages of results. Use the cursor to paginate through the results. 12 | mvr search --cursor eyJuYW1lIjoiQHRlc3RpbmdhZnJlZWNsYWltL3VwZ3JhZGVkIn0= 13 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/snapshots/mvr_data_tests__git_infos_write__git_infos.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-indexer/tests/mvr_data_tests.rs 3 | expression: rows 4 | --- 5 | [ 6 | { 7 | "table_id": "0x642a89123353726c004dd2c2fd52f2d4b48ec04fdb374163e099094706199423", 8 | "object_version": "483220501", 9 | "version": "2", 10 | "chain_id": "35834a8a", 11 | "repository": "https://github.com/mystenlabs/mvr", 12 | "path": "packages/mvr", 13 | "tag": "9081c38e594b70db4e1e10c1d1bd20bc34eaa937" 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /scripts/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "scripts", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "devDependencies": { 13 | "@types/node": "^22.5.2", 14 | "ts-node": "^10.9.2", 15 | "typescript": "^5.5.4" 16 | }, 17 | "dependencies": { 18 | "@mysten/graphql-transport": "^0.2.42", 19 | "@mysten/sui": "^1.21.2" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/packages/Cv2/sources/c.move: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | module c::c { 5 | public struct C { 6 | x: u64 7 | } 8 | 9 | public struct WPhantomTypeParam { 10 | x: u64 11 | } 12 | 13 | public struct WTypeParam { 14 | x: u64, 15 | t: T 16 | } 17 | 18 | 19 | public struct D { 20 | x: u64, 21 | y: u64, 22 | } 23 | 24 | public fun c(): u64 { 25 | 43 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/snapshots/mvr_api_tests__basic_search.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-api/tests/mvr_api_tests.rs 3 | expression: basic_dummy_data.to_string() 4 | --- 5 | {"data":[{"name":"@test/core","metadata":{"icon_url":"https://moveregistry.com/icon.png","description":"This is a test package","website_url":"https://moveregistry.com","documentation_url":"https://docs.suins.io/move-registry"},"mainnet_package_info_id":"0x0000000000000000000000000000000000000000000000000000000000000002","testnet_package_info_id":null}],"next_cursor":null,"limit":20,"total":null} 6 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__toml-regular-mainnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: output_toml 4 | --- 5 | [package] 6 | name = "nftmaker" 7 | edition = "2024.beta" 8 | 9 | [dependencies] 10 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet" } 11 | demo = { r.mvr = "@mvr/demo" } 12 | upgraded = { r.mvr = "@testingafreeclaim/upgraded" } 13 | mvr_a = { r.mvr = "@pkg/qwer" } 14 | 15 | [addresses] 16 | nftmaker = "0x0" 17 | -------------------------------------------------------------------------------- /packages/proxy/sources/utils.move: -------------------------------------------------------------------------------- 1 | module mvr_subdomain_proxy::utils; 2 | 3 | use mvr::{app_record::AppCap, move_registry::MoveRegistry}; 4 | use std::string::String; 5 | use sui::clock::Clock; 6 | use suins::subdomain_registration::SubDomainRegistration; 7 | 8 | /// No testing needed, we're only calling public functions. 9 | public fun register( 10 | registry: &mut MoveRegistry, 11 | nft: &SubDomainRegistration, 12 | name: String, 13 | clock: &Clock, 14 | ctx: &mut TxContext, 15 | ): AppCap { 16 | registry.register(nft.nft(), name, clock, ctx) 17 | } 18 | -------------------------------------------------------------------------------- /packages/package_info/sources/partials/git.move: -------------------------------------------------------------------------------- 1 | module package_info::git; 2 | 3 | use std::string::String; 4 | 5 | public struct GitInfo has copy, drop, store { 6 | // The repository that our code's open source at 7 | repository: String, 8 | // The sub-path inside the repository 9 | path: String, 10 | // the tag or commit hash for the current version 11 | tag: String, 12 | } 13 | 14 | public fun new(repository: String, path: String, tag: String): GitInfo { 15 | GitInfo { 16 | repository, 17 | path, 18 | tag, 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-04-02-095701_search_indexes/up.sql: -------------------------------------------------------------------------------- 1 | -- Enable the `pg_trgm` extension for similar name search 2 | CREATE EXTENSION IF NOT EXISTS pg_trgm; 3 | 4 | -- Create a GIN index on the name column for similar name search (SIMILAR TO 'name') 5 | CREATE INDEX IF NOT EXISTS idx_name_similar_to ON name_records USING gin (name gin_trgm_ops); 6 | 7 | -- Create a GIN index on the metadata->'description' column for full-text search on the description field 8 | CREATE INDEX IF NOT EXISTS idx_metadata_desc ON name_records USING gin (to_tsvector('english', metadata->>'description')); 9 | -------------------------------------------------------------------------------- /scripts/testest.svg: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | Beautifully resized! 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/lib/constants.ts: -------------------------------------------------------------------------------- 1 | /** App-wide global constants */ 2 | export const Constants = { 3 | appsPackageId: 4 | "0x62c1f5b1cb9e3bfc3dd1f73c95066487b662048a6358eabdbf67f6cdeca6db4b", 5 | appsRegistryTableId: 6 | "0xe8417c530cde59eddf6dfb760e8a0e3e2c6f17c69ddaab5a73dd6a6e65fc463b", 7 | appsRegistryId: 8 | "0x0e5d473a055b6b7d014af557a13ad9075157fdc19b6d51562a18511afd397727", 9 | 10 | // tODO: Remove this once we fix the `getDynamicField` queries on the TS SDK. 11 | appsNameType: '0x62c1f5b1cb9e3bfc3dd1f73c95066487b662048a6358eabdbf67f6cdeca6db4b::name::Name', 12 | 13 | }; 14 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/test_data/test_local_dep_to_git/Move.lock: -------------------------------------------------------------------------------- 1 | # @generated by Move, please check-in and do not edit manually. 2 | [move] 3 | version = 3 4 | dependencies = [ 5 | { id = "Sui", name = "Sui" }, 6 | { id = "token", name = "token" }, 7 | ] 8 | 9 | [[move.package]] 10 | id = "Sui" 11 | source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/mainnet", subdir = "crates/sui-framework/packages/sui-framework" } 12 | 13 | 14 | [[move.package]] 15 | id = "token" 16 | source = { local = "../token" } 17 | 18 | dependencies = [ 19 | { id = "Sui", name = "Sui" }, 20 | ] 21 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/snapshots/mvr_data_tests__package_infos_write__package_infos.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-indexer/tests/mvr_data_tests.rs 3 | expression: rows 4 | --- 5 | [ 6 | { 7 | "id": "0xc26a4e0911be378f8d27f6d2455d710d33dc7c241d434cb0c0444eff6a5ddca9", 8 | "object_version": "498036367", 9 | "package_id": "0x51f46d8fe32e6b94808c4dc950fe61f445cc76fee0d0b2aa4bc7ef05945e06aa", 10 | "git_table_id": "0x04cf253187a53c55a94864b383e63591728cca329501f63b40ee2a3220bcb646", 11 | "chain_id": "35834a8a", 12 | "default_name": null, 13 | "metadata": {} 14 | } 15 | ] 16 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/snapshots/manifest_parsing_tests__regular_manifest.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-cli/tests/manifest_parsing_tests.rs 3 | expression: move_toml.doc.to_string() 4 | --- 5 | [package] 6 | name = "mvr" 7 | edition = "2024.alpha" # edition = "legacy" to use legacy (pre-2024) Move 8 | 9 | [dependencies] 10 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override = true } 11 | mvr_demo = { r.mvr = "@mvr/demo" } 12 | another_demo = { r.mvr = "@mvr/another_demo" } 13 | 14 | [addresses] 15 | mvr = "0x0" 16 | -------------------------------------------------------------------------------- /.github/workflows/move-formatter.yml: -------------------------------------------------------------------------------- 1 | name: Check Move formatting 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - 'packages/**' 7 | 8 | env: 9 | MOVE_PACKAGES_PATH: packages 10 | 11 | jobs: 12 | prettier-move: 13 | name: Check Move files formatting 14 | runs-on: ubuntu-latest 15 | defaults: 16 | run: 17 | working-directory: ${{ env.MOVE_PACKAGES_PATH }} 18 | steps: 19 | - uses: actions/checkout@v4 20 | - name: Use Node.js 21 | uses: actions/setup-node@v4 22 | - run: npm i @mysten/prettier-plugin-move 23 | - run: npx prettier-move -c **/*.move 24 | -------------------------------------------------------------------------------- /app/.env.example: -------------------------------------------------------------------------------- 1 | # Since the ".env" file is gitignored, you can use the ".env.example" file to 2 | # build a new ".env" file when you clone the repo. Keep this file up-to-date 3 | # when you add new variables to `.env`. 4 | 5 | # This file will be committed to version control, so make sure not to have any 6 | # secrets in it. If you are cloning this repo, create a copy of this file named 7 | # ".env" and populate it with your secrets. 8 | 9 | # When adding additional environment variables, the schema in "/src/env.js" 10 | # should be updated accordingly. 11 | 12 | # Example: 13 | # SERVERVAR="foo" 14 | # NEXT_PUBLIC_CLIENTVAR="bar" 15 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/snapshots/mvr_api_tests__package_by_name-2.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-api/tests/mvr_api_tests.rs 3 | expression: v1.to_string() 4 | --- 5 | {"name":"@test/core","metadata":{"icon_url":"https://moveregistry.com/icon.png","description":"This is a test package","website_url":"https://moveregistry.com","documentation_url":"https://docs.suins.io/move-registry"},"package_info":{"id":"0x0000000000000000000000000000000000000000000000000000000000000002","git_table_id":"","default_name":"@test/core","metadata":null},"git_info":null,"version":1,"package_address":"0x00000000000000000000000000000000000000000000000000000000000000c1"} 6 | -------------------------------------------------------------------------------- /crates/mvr-api/tests/snapshots/mvr_api_tests__package_by_name.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-api/tests/mvr_api_tests.rs 3 | expression: v2.to_string() 4 | --- 5 | {"name":"@test/core","metadata":{"icon_url":"https://moveregistry.com/icon.png","description":"This is a test package","website_url":"https://moveregistry.com","documentation_url":"https://docs.suins.io/move-registry"},"package_info":{"id":"0x0000000000000000000000000000000000000000000000000000000000000002","git_table_id":"","default_name":"@test/core","metadata":null},"git_info":null,"version":2,"package_address":"0x00000000000000000000000000000000000000000000000000000000000000c2"} 6 | -------------------------------------------------------------------------------- /app/src/components/ui/image-with-fallback.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | 3 | type ImageWithFallbackProps = React.ImgHTMLAttributes & { 4 | fallback?: string; 5 | }; 6 | 7 | const ImageWithFallback: React.FC = ({ 8 | src, 9 | fallback = "/default-icon.svg", 10 | alt, 11 | ...props 12 | }) => { 13 | const [imgSrc, setImgSrc] = useState(src); 14 | 15 | return ( 16 | {alt} setImgSrc(fallback)} 20 | {...props} 21 | /> 22 | ); 23 | }; 24 | 25 | export default ImageWithFallback; 26 | -------------------------------------------------------------------------------- /app/src/app/sitemap.xml/route.tsx: -------------------------------------------------------------------------------- 1 | import { NextRequest, NextResponse } from "next/server"; 2 | 3 | export const runtime = "edge"; 4 | // 1 hour 5 | export const revalidate = 60 * 60; 6 | 7 | const API_XML_URL = "https://qa.mainnet.mvr.mystenlabs.com/v1/sitemap"; 8 | 9 | export async function GET(_: NextRequest) { 10 | const xml = await fetch(API_XML_URL).then((res) => res.text()); 11 | 12 | return new NextResponse(xml, { 13 | status: 200, 14 | headers: { 15 | "Content-Type": "application/xml", 16 | "Cache-Control": 17 | "public, max-age=3600, s-maxage=3600, stale-while-revalidate=60", 18 | }, 19 | }); 20 | } 21 | -------------------------------------------------------------------------------- /packages/package_info/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "package_info" 3 | edition = "2024.beta" 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/testnet", override=true } 7 | 8 | # goes into [dependencies] section 9 | Codec = { git = "https://github.com/sui-potatoes/app.git", subdir = "packages/codec", rev = "codec@mainnet-v1" } 10 | 11 | 12 | # goes into [dependencies] section 13 | # Codec = { git = "https://github.com/sui-potatoes/app.git", subdir = "packages/codec", rev = "codec@testnet-v1" } 14 | 15 | [addresses] 16 | package_info="0x0" 17 | -------------------------------------------------------------------------------- /app/src/components/providers/mvr-provider.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | import { getFullnodeUrl, SuiClient } from '@mysten/sui/client'; 4 | import { createContext, useContext } from 'react'; 5 | 6 | export type MVRSetup = { 7 | isCustom: boolean; 8 | customAddress: string | undefined; 9 | mainnetClient: SuiClient; 10 | }; 11 | 12 | export const MVRContext = createContext({ 13 | isCustom: false, 14 | customAddress: undefined, 15 | mainnetClient: new SuiClient({ 16 | url: getFullnodeUrl('mainnet') 17 | }), 18 | }); 19 | 20 | export function useMVRContext() { 21 | return useContext(MVRContext); 22 | } 23 | -------------------------------------------------------------------------------- /app/src/components/ui/explorer-link.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { Network } from "@/utils/types"; 4 | import Link from "next/link"; 5 | 6 | export default function ExplorerLink({ 7 | network, 8 | type = 'object', 9 | idOrHash, 10 | children 11 | }: { 12 | network: Network 13 | type: "object" | "address" | 'tx'; 14 | idOrHash: string; 15 | children: React.ReactNode; 16 | }) { 17 | return ( 18 | 24 | {children} 25 | 26 | ); 27 | } 28 | -------------------------------------------------------------------------------- /app/src/components/providers/app-provider.tsx: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 'use client'; 4 | 5 | import { SuinsName } from '@/hooks/useOrganizationList'; 6 | import { createContext, useContext } from 'react'; 7 | 8 | export type AppContextType = { 9 | value: { 10 | selectedSuinsName: SuinsName | null; 11 | }; 12 | setValue: (value: AppContextType['value']) => void; 13 | } 14 | 15 | export const AppContext = createContext({ 16 | value: { 17 | selectedSuinsName: null, 18 | }, 19 | setValue: () => {}, 20 | }); 21 | 22 | export function useAppState() { 23 | return useContext(AppContext); 24 | } 25 | -------------------------------------------------------------------------------- /app/src/icons/SocialX.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { SVGProps } from "react" 3 | const SocialX = (props: SVGProps) => ( 4 | 12 | 13 | 17 | 18 | ) 19 | export default SocialX 20 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__std-output-regular-mainnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: std_output 4 | --- 5 | Active environment switched to [mainnet] 6 | 7 | Successfully added dependency @mvr/demo to your Move.toml 8 | 9 | You can use this dependency in your modules by calling: use demo::; 10 | 11 | 12 | Successfully added dependency @testingafreeclaim/upgraded to your Move.toml 13 | 14 | You can use this dependency in your modules by calling: use upgraded::; 15 | 16 | 17 | Successfully added dependency @pkg/qwer to your Move.toml 18 | 19 | You can use this dependency in your modules by calling: use mvr_a::; 20 | -------------------------------------------------------------------------------- /packages/mvr/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "mvr" 3 | edition = "2024.alpha" # edition = "legacy" to use legacy (pre-2024) Move 4 | 5 | [dependencies] 6 | Sui = { git = "https://github.com/MystenLabs/sui.git", subdir = "crates/sui-framework/packages/sui-framework", rev = "framework/mainnet", override=true } 7 | package_info = { local = "../package_info" } 8 | 9 | # SuiNS dependency. TODO: Replace with MVR style :)) 10 | # mainnet 11 | suins = { git = "https://github.com/mystenlabs/suins-contracts/", subdir = "packages/suins", rev = "releases/mainnet/core/v3" } 12 | Codec = { git = "https://github.com/sui-potatoes/app.git", subdir = "packages/codec", rev = "codec@mainnet-v1" } 13 | 14 | [addresses] 15 | mvr = "0x0" 16 | -------------------------------------------------------------------------------- /crates/mvr-indexer/tests/snapshots/mvr_data_tests__immediate_dependency__packages.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-indexer/tests/mvr_data_tests.rs 3 | expression: rows 4 | --- 5 | [ 6 | { 7 | "package_id": "0x0ce90717ec5f301c84c0be83893ab8cb64e6fe574f627c040b16ec4b1f87fbb6", 8 | "original_id": "0x0ce90717ec5f301c84c0be83893ab8cb64e6fe574f627c040b16ec4b1f87fbb6", 9 | "package_version": "1", 10 | "chain_id": "35834a8a", 11 | "move_package": "4JTuCBbZpDPkxaHo5qOk7uxYqCshHjIxTmIxxFF3qt4=", 12 | "tx_hash": "C2L7ChM9DQcAhugbfNQjNL7aVQEZcCdSAyxA7muSqon7", 13 | "sender": "0xeb8a8770e34c76d62c9e692c894adb1fdd775a71bc78ed54c6dca1a368e779f5", 14 | "timestamp": "2024-12-19 06:16:52.373" 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /app/src/icons/Delete.tsx: -------------------------------------------------------------------------------- 1 | import type { SVGProps } from 'react'; 2 | const SvgDelete = (props: SVGProps) => ( 3 | 11 | 18 | 19 | ); 20 | export default SvgDelete; 21 | -------------------------------------------------------------------------------- /app/src/hooks/useDebounce.ts: -------------------------------------------------------------------------------- 1 | import { useState, useEffect } from "react"; 2 | 3 | export function useDebounce( 4 | value: T, 5 | delay: number = 300, 6 | ): { value: T; isDebouncing: boolean } { 7 | const [isDebouncing, setIsDebouncing] = useState(false); 8 | const [debouncedValue, setDebouncedValue] = useState(value); 9 | 10 | useEffect(() => { 11 | setIsDebouncing(true); 12 | const handler = setTimeout(() => { 13 | setDebouncedValue(value); 14 | setIsDebouncing(false); 15 | }, delay); 16 | 17 | return () => { 18 | clearTimeout(handler); 19 | setIsDebouncing(false); 20 | }; 21 | }, [value, delay]); 22 | 23 | return { 24 | value: debouncedValue, 25 | isDebouncing: isDebouncing, 26 | }; 27 | } 28 | -------------------------------------------------------------------------------- /docker/mvr-api/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) Mysten Labs, Inc. 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # fast fail. 6 | set -e 7 | 8 | DIR="$( cd "$( dirname "$0" )" && pwd )" 9 | REPO_ROOT="$(git rev-parse --show-toplevel)" 10 | DOCKERFILE="$DIR/Dockerfile" 11 | GIT_REVISION="$(git describe --always --abbrev=12 --dirty --exclude '*')" 12 | BUILD_DATE="$(date -u +'%Y-%m-%d')" 13 | 14 | echo 15 | echo "Building mvr-indexer docker image" 16 | echo "Dockerfile: \t$DOCKERFILE" 17 | echo "docker context: $REPO_ROOT" 18 | echo "build date: \t$BUILD_DATE" 19 | echo "git revision: \t$GIT_REVISION" 20 | echo 21 | 22 | docker build -f "$DOCKERFILE" "$REPO_ROOT" \ 23 | --build-arg GIT_REVISION="$GIT_REVISION" \ 24 | --build-arg BUILD_DATE="$BUILD_DATE" \ 25 | "$@" 26 | -------------------------------------------------------------------------------- /docker/mvr-indexer/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) Mysten Labs, Inc. 3 | # SPDX-License-Identifier: Apache-2.0 4 | 5 | # fast fail. 6 | set -e 7 | 8 | DIR="$( cd "$( dirname "$0" )" && pwd )" 9 | REPO_ROOT="$(git rev-parse --show-toplevel)" 10 | DOCKERFILE="$DIR/Dockerfile" 11 | GIT_REVISION="$(git describe --always --abbrev=12 --dirty --exclude '*')" 12 | BUILD_DATE="$(date -u +'%Y-%m-%d')" 13 | 14 | echo 15 | echo "Building mvr-indexer docker image" 16 | echo "Dockerfile: \t$DOCKERFILE" 17 | echo "docker context: $REPO_ROOT" 18 | echo "build date: \t$BUILD_DATE" 19 | echo "git revision: \t$GIT_REVISION" 20 | echo 21 | 22 | docker build -f "$DOCKERFILE" "$REPO_ROOT" \ 23 | --build-arg GIT_REVISION="$GIT_REVISION" \ 24 | --build-arg BUILD_DATE="$BUILD_DATE" \ 25 | "$@" -------------------------------------------------------------------------------- /packages/mvr/sources/constants.move: -------------------------------------------------------------------------------- 1 | module mvr::constants; 2 | 3 | use std::string::String; 4 | 5 | /// Max networks that can be saved for a single app. 6 | public macro fun max_networks(): u64 { 7 | 25 8 | } 9 | /// The max length an app's label can be. 10 | public macro fun max_label_length(): u64 { 11 | 64 12 | } 13 | /// The separator between an org and an app. 14 | public macro fun app_separator(): String { 15 | b"/".to_string() 16 | } 17 | /// Classic "." separator which is used in 3+ level domains. 18 | public macro fun dot_separator(): String { 19 | b".".to_string() 20 | } 21 | /// The separator that replaces `.sui` with `@` (DOT formatting to AT 22 | /// formatting). 23 | public macro fun sui_tld_separator(): String { 24 | b"@".to_string() 25 | } 26 | -------------------------------------------------------------------------------- /packages/mvr/sources/app_info.move: -------------------------------------------------------------------------------- 1 | /// A simple re-usable struct to store an app's information. 2 | module mvr::app_info; 3 | 4 | public struct AppInfo has copy, drop, store { 5 | package_info_id: Option, 6 | package_address: Option
, 7 | upgrade_cap_id: Option, 8 | } 9 | 10 | public fun new( 11 | package_info_id: Option, 12 | package_address: Option
, 13 | upgrade_cap_id: Option, 14 | ): AppInfo { 15 | AppInfo { 16 | package_info_id, 17 | package_address, 18 | upgrade_cap_id, 19 | } 20 | } 21 | 22 | public fun default(): AppInfo { 23 | AppInfo { 24 | package_info_id: option::none(), 25 | package_address: option::none(), 26 | upgrade_cap_id: option::none(), 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /app/src/components/layouts/WalletConnectedContent.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useActiveAddress } from "@/hooks/useActiveAddress"; 3 | import { EmptyState } from "../EmptyState"; 4 | import { Button } from "../ui/button"; 5 | import Link from "next/link"; 6 | import { Content } from "@/data/content"; 7 | 8 | export function WalletConnectedContent({ 9 | children, 10 | }: { 11 | children: React.ReactNode; 12 | }) { 13 | const activeAddress = useActiveAddress(); 14 | 15 | if (!activeAddress) { 16 | return ( 17 | 18 | 21 | 22 | ); 23 | } 24 | 25 | return children; 26 | } 27 | -------------------------------------------------------------------------------- /packages/proxy/README.md: -------------------------------------------------------------------------------- 1 | # MVR Subnames Proxy Package 2 | 3 | This directory contains the `@mvr/subnames-proxy` package, a minimal utility used to proxy subdomain-based registrations into the Move Registry (MVR). 4 | 5 | You can find the latest addresses for this package and more information [in the docs page](https://docs.suins.io/move-registry). 6 | 7 | ## Overview 8 | 9 | The `@mvr/subnames-proxy` package provides a thin wrapper that enables registering applications using SuiNS subnames. This allows subdomains to create app records in the Move Registry. 10 | 11 | Intended for integration scenarios where subdomains are used for app registration. 12 | 13 | ## Installing 14 | 15 | ### [Move Registry CLI](https://docs.mvr.app/move-registry) 16 | 17 | ```bash 18 | mvr add @mvr/subnames-proxy --network mainnet 19 | ``` 20 | -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # database 12 | /prisma/db.sqlite 13 | /prisma/db.sqlite-journal 14 | db.sqlite 15 | 16 | # next.js 17 | /.next/ 18 | /out/ 19 | next-env.d.ts 20 | 21 | # production 22 | /build 23 | 24 | # misc 25 | .DS_Store 26 | *.pem 27 | 28 | # debug 29 | npm-debug.log* 30 | yarn-debug.log* 31 | yarn-error.log* 32 | .pnpm-debug.log* 33 | 34 | # local env files 35 | # do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables 36 | .env 37 | .env*.local 38 | 39 | # vercel 40 | .vercel 41 | 42 | # typescript 43 | *.tsbuildinfo 44 | 45 | # idea files 46 | .idea -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-mvr_resolve_@pkg__qwer__1.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | { 6 | "name": "@pkg/qwer", 7 | "metadata": {}, 8 | "package_info": { 9 | "id": "0x16a0e731eb2a8f698a8682a01237cb9314d338bd46dcc95cb090f93965c4c1a0", 10 | "git_table_id": "0x357c89025f9c3a34037570747cb153b2e5db00aba14c56dd2a05e847422cfabe", 11 | "default_name": "@pkg/qwer", 12 | "metadata": { 13 | "default": "@pkg/qwer" 14 | } 15 | }, 16 | "git_info": { 17 | "repository_url": "https://github.com/MystenLabs/mvr-demo", 18 | "path": "mvr_a/", 19 | "tag": "19be11331bde43d017f024aab942c6d3db7a9a83" 20 | }, 21 | "version": 1, 22 | "package_address": "0xc168b8766e69c07b1b5ed194e3dc2b4a2a0e328ae6a06a2cae40e2ec83a3f94f" 23 | } 24 | -------------------------------------------------------------------------------- /app/src/hooks/useSuiNSResolution.ts: -------------------------------------------------------------------------------- 1 | import { useSuiClientsContext } from "@/components/providers/client-provider"; 2 | import { AppQueryKeys, Network } from "@/utils/types"; 3 | import { isValidSuiNSName } from "@mysten/sui/utils"; 4 | import { useQuery } from "@tanstack/react-query"; 5 | 6 | export function useSuiNSResolution(name: string, network: Network) { 7 | const client = useSuiClientsContext()[network]; 8 | 9 | return useQuery({ 10 | queryKey: [AppQueryKeys.SUINS_NAME_RESOLUTION, name, network], 11 | queryFn: async () => { 12 | const address = await client.resolveNameServiceAddress({ 13 | name, 14 | }); 15 | return address; 16 | }, 17 | enabled: !!name && isValidSuiNSName(name), 18 | refetchOnMount: false, 19 | refetchOnWindowFocus: false, 20 | refetchOnReconnect: false, 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /crates/mvr-api/src/data/mod.rs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Mysten Labs, Inc. 2 | // SPDX-License-Identifier: Apache-2.0 3 | 4 | use crate::errors::ApiError; 5 | 6 | pub(crate) mod app_state; 7 | pub(crate) mod name_analytics; 8 | pub(crate) mod package_analytics; 9 | pub(crate) mod package_by_name_loader; 10 | pub(crate) mod package_dependencies; 11 | pub(crate) mod package_dependents; 12 | pub(crate) mod package_resolver; 13 | pub(crate) mod reader; 14 | pub(crate) mod resolution_loader; 15 | pub(crate) mod reverse_resolution_loader; 16 | 17 | fn network_field(network: &str) -> Result<&str, ApiError> { 18 | match network { 19 | "mainnet" => Ok("mainnet_id"), 20 | "testnet" => Ok("testnet_id"), 21 | _ => Err(ApiError::BadRequest(format!( 22 | "Invalid network: {}", 23 | network 24 | ))), 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/src/components/ui/load-more.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils"; 2 | import { Button } from "./button"; 3 | 4 | export function LoadMore({ 5 | hasNextPage, 6 | fetchNextPage, 7 | isLoading, 8 | className, 9 | }: { 10 | hasNextPage: boolean; 11 | fetchNextPage: () => void; 12 | isLoading: boolean; 13 | className?: string; 14 | }) { 15 | if (!hasNextPage) return null; 16 | 17 | return ( 18 |
19 | 32 |
33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-mvr_resolve_@pkg__qwer__1_--network_testnet.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | { 6 | "name": "@pkg/qwer", 7 | "metadata": {}, 8 | "package_info": { 9 | "id": "0x2fef5ad8c3f89f14d36651f789cea90f8acc680f5e7d783cb1ab2f497b283f38", 10 | "git_table_id": "0x3255800addf2cb93ea4090165428e1b2a4c5bf925342acb4a80767ef716e2bb7", 11 | "default_name": "@pkg/qwer", 12 | "metadata": { 13 | "default": "@pkg/qwer" 14 | } 15 | }, 16 | "git_info": { 17 | "repository_url": "https://github.com/MystenLabs/mvr-demo", 18 | "path": "mvr_a/", 19 | "tag": "19be11331bde43d017f024aab942c6d3db7a9a83" 20 | }, 21 | "version": 1, 22 | "package_address": "0x077adfd262090b6645ea05087e252796a205d0369f165c99aa8147f3c678b579" 23 | } 24 | -------------------------------------------------------------------------------- /crates/mvr-indexer/examples/download_checkpoint.rs: -------------------------------------------------------------------------------- 1 | use clap::Parser; 2 | use reqwest::Client; 3 | use std::fs; 4 | use url::Url; 5 | 6 | #[derive(Parser)] 7 | #[clap(rename_all = "kebab-case", author, version)] 8 | struct Args { 9 | #[clap(env, long)] 10 | checkpoint: u64, 11 | #[clap(env, long, default_value = "https://checkpoints.mainnet.sui.io")] 12 | checkpoint_url: Url, 13 | } 14 | #[tokio::main] 15 | async fn main() { 16 | let Args { 17 | checkpoint, 18 | checkpoint_url, 19 | } = Args::parse(); 20 | 21 | let client = Client::new(); 22 | let url = checkpoint_url 23 | .join(&format!("/{checkpoint}.chk")) 24 | .expect("Unexpected invalid URL"); 25 | let response = client.get(url).send().await.unwrap(); 26 | 27 | fs::write(format!("{checkpoint}.chk"), response.bytes().await.unwrap()).unwrap(); 28 | } 29 | -------------------------------------------------------------------------------- /app/src/components/animations/FadeInUpDiv.tsx: -------------------------------------------------------------------------------- 1 | import { ComponentPropsWithRef } from "react"; 2 | import { motion, MotionProps } from "framer-motion"; 3 | 4 | type FadeInUpDivProps = ComponentPropsWithRef<"div"> & 5 | MotionProps & { 6 | delay?: number; 7 | duration?: number; 8 | initialY?: number; 9 | initialX?: number; 10 | }; 11 | 12 | export function FadeInUpDiv({ 13 | children, 14 | delay, 15 | duration, 16 | initialY, 17 | initialX, 18 | ...props 19 | }: FadeInUpDivProps) { 20 | return ( 21 | 28 | {children} 29 | 30 | ); 31 | } 32 | -------------------------------------------------------------------------------- /app/src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | "use client" 2 | 3 | import * as React from "react" 4 | import * as LabelPrimitive from "@radix-ui/react-label" 5 | import { cva, type VariantProps } from "class-variance-authority" 6 | 7 | import { cn } from "@/lib/utils" 8 | 9 | const labelVariants = cva( 10 | "text-12 leading-20 font-inter font-bold text-content-primary peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 11 | ) 12 | 13 | const Label = React.forwardRef< 14 | React.ElementRef, 15 | React.ComponentPropsWithoutRef & 16 | VariantProps 17 | >(({ className, ...props }, ref) => ( 18 | 23 | )) 24 | Label.displayName = LabelPrimitive.Root.displayName 25 | 26 | export { Label } 27 | -------------------------------------------------------------------------------- /crates/ci-tests/tests/snapshots/use_case_tester__cmd-mvr_--help.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/ci-tests/tests/use_case_tester.rs 3 | expression: cmd_output 4 | --- 5 | MVR is a command line tool to interact with the Move Registry for the Sui network. 6 | 7 | Usage: mvr [OPTIONS] [COMMAND] 8 | 9 | Commands: 10 | add Add a new dependency from the move registry to your Move.toml file 11 | resolve Resolve the app name to a package info 12 | search Search for an app in the move registry 13 | help Print this message or the help of the given subcommand(s) 14 | 15 | Options: 16 | --resolve-move-dependencies 17 | --json Output the result in JSON format 18 | -h, --help Print help 19 | -V, --version Print version 20 | -------------------------------------------------------------------------------- /app/src/components/ui/CopyBtn.tsx: -------------------------------------------------------------------------------- 1 | import { useCopy } from "@/hooks/useCopy"; 2 | import { CopyIcon } from "lucide-react"; 3 | import { Button } from "./button"; 4 | import { CheckIcon } from "@radix-ui/react-icons"; 5 | import { cn } from "@/lib/utils"; 6 | 7 | const iconSize = { 8 | sm: "h-3 w-3", 9 | md: "h-3.5 w-3.5", 10 | }; 11 | 12 | export function CopyBtn({ 13 | text, 14 | className, 15 | size = "md", 16 | }: { 17 | text: string; 18 | className?: string; 19 | size?: "sm" | "md"; 20 | }) { 21 | const { copied, copy } = useCopy(text); 22 | 23 | return ( 24 | 36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /app/src/hooks/usePackageModules.ts: -------------------------------------------------------------------------------- 1 | import { useSuiClientsContext } from "@/components/providers/client-provider"; 2 | import { usePackagesNetwork } from "@/components/providers/packages-provider"; 3 | import { AppQueryKeys } from "@/utils/types"; 4 | import { useQuery } from "@tanstack/react-query"; 5 | 6 | export function usePackageModules(packageId: string) { 7 | const selectedNetwork = usePackagesNetwork(); 8 | const clients = useSuiClientsContext(); 9 | 10 | const client = clients[selectedNetwork]; 11 | 12 | return useQuery({ 13 | queryKey: [AppQueryKeys.UPGRADE_CAP_MODULE, packageId], 14 | 15 | queryFn: async () => { 16 | const modules = await client.getNormalizedMoveModulesByPackage({ 17 | package: packageId, 18 | }); 19 | 20 | return modules; 21 | }, 22 | 23 | 24 | select(data) { 25 | return Object.keys(data); 26 | }, 27 | enabled: !!packageId, 28 | }); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/app/package/[...name]/page.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { usePackagesNetwork } from "@/components/providers/packages-provider"; 4 | import { SinglePackage } from "@/components/single-package/SinglePackage"; 5 | import { useResolveMvrName } from "@/hooks/mvrResolution"; 6 | import { useDecodedUriName } from "@/hooks/useDecodedUriName"; 7 | 8 | export default function PackagePage() { 9 | const decodedName = useDecodedUriName(); 10 | const network = usePackagesNetwork(); 11 | 12 | const { data: packageInfo } = useResolveMvrName( 13 | decodedName, 14 | network as "mainnet" | "testnet", 15 | ); 16 | 17 | return ( 18 |
19 |
20 | {packageInfo && ( 21 | 25 | )} 26 |
27 |
28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /app/src/assets/icons/linkedin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/components/ui/tooltip.tsx: -------------------------------------------------------------------------------- 1 | import { Tooltip } from "react-tooltip"; 2 | 3 | const generateRandomId = () => { 4 | return `id-${Math.random().toString(36).substr(2, 9)}-${Date.now()}`; 5 | }; 6 | 7 | export function TooltipWrapper({ 8 | children, 9 | tooltipText, 10 | tooltipPlace, 11 | }: { 12 | children: React.ReactNode; 13 | tooltipText: string; 14 | tooltipPlace: "top" | "bottom" | "left" | "right"; 15 | }) { 16 | const tooltipId = generateRandomId(); 17 | 18 | return ( 19 | <> 20 |
26 | {children} 27 |
28 | 32 | 33 | ); 34 | } 35 | -------------------------------------------------------------------------------- /crates/mvr-schema/migrations/2025-04-15-124613_analytics_and_indexes/up.sql: -------------------------------------------------------------------------------- 1 | -- Package analytics table 2 | CREATE TABLE IF NOT EXISTS package_analytics ( 3 | call_date DATE NOT NULL, 4 | package_id TEXT NOT NULL, 5 | direct_calls BIGINT NOT NULL, 6 | aggregated_direct_calls BIGINT NOT NULL, 7 | propagated_calls BIGINT NOT NULL, 8 | aggregated_propagated_calls BIGINT NOT NULL, 9 | total_calls BIGINT NOT NULL, 10 | aggregated_total_calls BIGINT NOT NULL, 11 | CONSTRAINT package_analytics_pkey PRIMARY KEY (call_date, package_id) 12 | ); 13 | 14 | -- Package analytics indexes 15 | CREATE INDEX IF NOT EXISTS package_analytics_package_id_idx ON package_analytics (package_id); 16 | -- Package dependencies indexes 17 | CREATE INDEX IF NOT EXISTS idx_package_dependencies_package_id ON package_dependencies (package_id); 18 | CREATE INDEX IF NOT EXISTS idx_package_dependencies_dependency_package_id ON package_dependencies (dependency_package_id); 19 | -------------------------------------------------------------------------------- /crates/mvr-cli/tests/snapshots/unit_tests__local_dep_to_git_dep.snap: -------------------------------------------------------------------------------- 1 | --- 2 | source: crates/mvr-cli/tests/unit_tests.rs 3 | expression: "result[0]" 4 | --- 5 | # @generated by Move, please check-in and do not edit manually. 6 | [move] 7 | version = 3 8 | dependencies = [{ name = "deepbook", id = "deepbook" }] 9 | 10 | [[move.package]] 11 | id = "Sui" 12 | source = { git = "https://github.com/MystenLabs/sui.git", rev = "framework/mainnet", subdir = "crates/sui-framework/packages/sui-framework" } 13 | 14 | 15 | [[move.package]] 16 | id = "token" 17 | source = { git = "https://github.com/example/demo.git", rev = "v1.0.0", subdir = "packages/demo/../token" } 18 | 19 | dependencies = [ 20 | { id = "Sui", name = "Sui" }, 21 | ] 22 | 23 | [[move.package]] 24 | id = "deepbook" 25 | source = { git = "https://github.com/example/demo.git", rev = "v1.0.0", subdir = "packages/demo" } 26 | dependencies = [ 27 | { id = "Sui", name = "Sui" }, 28 | { id = "token", name = "token" }, 29 | ] 30 | -------------------------------------------------------------------------------- /app/src/hooks/useChainIdentifier.ts: -------------------------------------------------------------------------------- 1 | import { useSuiClientsContext } from "@/components/providers/client-provider"; 2 | import { Network } from "@/utils/types"; 3 | import { useQuery } from "@tanstack/react-query"; 4 | 5 | export const STATIC_CHAIN_IDENTIFIERS = { 6 | mainnet: '35834a8a', 7 | testnet: '4c78adac' 8 | } 9 | 10 | export function useChainIdentifier(network: Network) { 11 | const clients = useSuiClientsContext(); 12 | 13 | return useQuery({ 14 | queryKey: ["chainIdentifier", network], 15 | queryFn: async () => { 16 | 17 | if (network === 'mainnet') { 18 | return STATIC_CHAIN_IDENTIFIERS.mainnet; 19 | } 20 | if (network === 'testnet') { 21 | return STATIC_CHAIN_IDENTIFIERS.testnet; 22 | } 23 | 24 | const chainId = await clients[network].getChainIdentifier(); 25 | return chainId; 26 | }, 27 | refetchOnMount: false, 28 | refetchOnReconnect: false, 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /create-new-release.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | # Get the version number from Cargo.toml file 5 | NEXT_VERSION=$(grep -m1 version crates/mvr-cli/Cargo.toml | sed 's/[^0-9.]*//g') 6 | 7 | echo "Preparing to create release v$NEXT_VERSION" 8 | 9 | # Check if the tag already exists 10 | if git rev-parse "v$NEXT_VERSION" >/dev/null 2>&1; then 11 | echo "Tag v$NEXT_VERSION already exists. Check that Release v$NEXT_VERSION exists. It might be that Cargo.toml was not updated to the new upcoming version." 12 | exit 1 13 | fi 14 | 15 | git tag -a "v$NEXT_VERSION" -m "Release v$NEXT_VERSION" 16 | 17 | echo "Tag v$NEXT_VERSION created successfully" 18 | 19 | # Push the tag to the remote repository 20 | git push origin "v$NEXT_VERSION" 21 | 22 | echo "Tag v$NEXT_VERSION pushed to the remote repository" 23 | 24 | echo "Release v$NEXT_VERSION created successfully" 25 | 26 | # Bump the Cargo.toml version 27 | echo "Please bump the version in the Cargo.toml file, commit, and push the commit!" 28 | -------------------------------------------------------------------------------- /app/src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | 5 | export interface TextAreaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const TextArea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |