├── friend-tech ├── solana │ ├── web │ │ ├── public │ │ │ ├── .gitkeep │ │ │ ├── favicon.ico │ │ │ └── solana-logo.png │ │ ├── app │ │ │ ├── page.module.css │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── clusters │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ ├── account │ │ │ │ ├── page.tsx │ │ │ │ └── [address] │ │ │ │ │ └── page.tsx │ │ │ ├── friend-tech │ │ │ │ └── page.tsx │ │ │ ├── global.css │ │ │ └── react-query-provider.tsx │ │ ├── index.d.ts │ │ ├── next-env.d.ts │ │ ├── tailwind.config.js │ │ ├── postcss.config.js │ │ ├── components │ │ │ └── account │ │ │ │ └── account-list-feature.tsx │ │ └── next.config.js │ ├── .eslintignore │ ├── .prettierrc │ ├── vercel.json │ ├── anchor │ │ ├── programs │ │ │ └── friend-tech │ │ │ │ ├── Xargo.toml │ │ │ │ ├── src │ │ │ │ ├── state │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── config.rs │ │ │ │ │ ├── holding.rs │ │ │ │ │ └── issuer.rs │ │ │ │ └── instructions │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── initialize.rs │ │ │ │ └── Cargo.toml │ │ ├── src │ │ │ └── index.ts │ │ ├── README.md │ │ ├── package.json │ │ ├── Cargo.toml │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── migrations │ │ │ └── deploy.ts │ │ ├── Anchor.toml │ │ ├── .swcrc │ │ └── .eslintrc.json │ ├── jest.preset.js │ ├── jest.config.ts │ ├── .editorconfig │ ├── .prettierignore │ └── tsconfig.base.json └── aptos │ ├── .prettierignore │ ├── vite-env.d.ts │ ├── .prettierrc │ ├── frontend │ ├── constants.ts │ ├── lib │ │ └── utils.ts │ ├── utils │ │ ├── types.ts │ │ └── aptosClient.ts │ ├── components │ │ └── ui │ │ │ ├── collapsible.tsx │ │ │ └── info.tsx │ └── main.tsx │ ├── public │ └── aptos.png │ ├── postcss.config.js │ ├── vercel.json │ ├── tsconfig.node.json │ ├── move │ ├── Move.toml │ └── scripts │ │ └── issue_share_and_buy_share.move │ ├── scripts │ ├── move │ │ ├── test.js │ │ ├── issue_share_and_buy_share.js │ │ ├── upgrade.js │ │ └── get_abi.js │ └── init.js │ ├── vite.config.ts │ ├── components.json │ ├── .gitignore │ ├── index.html │ └── tsconfig.json ├── simple-todo-list ├── solana │ ├── web │ │ ├── public │ │ │ ├── .gitkeep │ │ │ ├── favicon.ico │ │ │ └── solana-logo.png │ │ ├── app │ │ │ ├── page.module.css │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── clusters │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ ├── account │ │ │ │ ├── page.tsx │ │ │ │ └── [address] │ │ │ │ │ └── page.tsx │ │ │ ├── simple-todo-list │ │ │ │ └── page.tsx │ │ │ ├── global.css │ │ │ └── react-query-provider.tsx │ │ ├── index.d.ts │ │ ├── next-env.d.ts │ │ ├── tailwind.config.js │ │ ├── postcss.config.js │ │ ├── components │ │ │ └── account │ │ │ │ └── account-list-feature.tsx │ │ └── next.config.js │ ├── .eslintignore │ ├── .prettierrc │ ├── anchor │ │ ├── programs │ │ │ └── simple-todo-list │ │ │ │ ├── src │ │ │ │ ├── state │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── todo_list.rs │ │ │ │ ├── instructions │ │ │ │ │ ├── initialize.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── create_todo.rs │ │ │ │ │ └── create_todo_list.rs │ │ │ │ └── error.rs │ │ │ │ ├── Xargo.toml │ │ │ │ └── Cargo.toml │ │ ├── src │ │ │ └── index.ts │ │ ├── README.md │ │ ├── Cargo.toml │ │ ├── package.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── migrations │ │ │ └── deploy.ts │ │ ├── Anchor.toml │ │ ├── .swcrc │ │ └── .eslintrc.json │ ├── vercel.json │ ├── jest.preset.js │ ├── jest.config.ts │ ├── .vscode │ │ └── extensions.json │ ├── .editorconfig │ ├── .prettierignore │ └── tsconfig.base.json ├── aptos │ └── move │ │ ├── .gitignore │ │ ├── contract_address.txt │ │ ├── sh_scripts │ │ ├── test.sh │ │ ├── upgrade.sh │ │ ├── complete_all_todos.sh │ │ └── create_todo_list_if_not_exists_and_todos.sh │ │ └── Move.toml └── README.MD ├── advanced-todo-list ├── solana │ ├── web │ │ ├── public │ │ │ ├── .gitkeep │ │ │ ├── favicon.ico │ │ │ └── solana-logo.png │ │ ├── app │ │ │ ├── page.module.css │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── clusters │ │ │ │ └── page.tsx │ │ │ ├── page.tsx │ │ │ ├── account │ │ │ │ ├── page.tsx │ │ │ │ └── [address] │ │ │ │ │ └── page.tsx │ │ │ ├── advanced-todo-list │ │ │ │ └── page.tsx │ │ │ ├── global.css │ │ │ └── react-query-provider.tsx │ │ ├── index.d.ts │ │ ├── next-env.d.ts │ │ ├── tailwind.config.js │ │ ├── postcss.config.js │ │ ├── components │ │ │ └── account │ │ │ │ └── account-list-feature.tsx │ │ └── next.config.js │ ├── .eslintignore │ ├── .prettierrc │ ├── vercel.json │ ├── anchor │ │ ├── programs │ │ │ └── advanced-todo-list │ │ │ │ ├── Xargo.toml │ │ │ │ ├── src │ │ │ │ ├── state │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── user_todo_list_counter.rs │ │ │ │ │ └── todo_list.rs │ │ │ │ ├── instructions │ │ │ │ │ ├── initialize.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ ├── create_todo.rs │ │ │ │ │ └── complete_todo.rs │ │ │ │ └── error.rs │ │ │ │ └── Cargo.toml │ │ ├── src │ │ │ └── index.ts │ │ ├── README.md │ │ ├── Cargo.toml │ │ ├── package.json │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── migrations │ │ │ └── deploy.ts │ │ ├── Anchor.toml │ │ ├── .swcrc │ │ └── .eslintrc.json │ ├── jest.preset.js │ ├── jest.config.ts │ ├── .vscode │ │ └── extensions.json │ ├── .editorconfig │ ├── .prettierignore │ └── tsconfig.base.json ├── aptos │ └── move │ │ ├── .gitignore │ │ ├── contract_address.txt │ │ ├── sh_scripts │ │ ├── test.sh │ │ ├── upgrade.sh │ │ ├── complete_all_todos_in_latest_todo_list.sh │ │ └── create_todo_list_and_todos.sh │ │ └── Move.toml └── README.MD ├── fungible-asset-launchpad ├── solana │ ├── web │ │ ├── public │ │ │ ├── .gitkeep │ │ │ ├── favicon.ico │ │ │ └── solana-logo.png │ │ ├── app │ │ │ ├── page.module.css │ │ │ ├── api │ │ │ │ └── hello │ │ │ │ │ └── route.ts │ │ │ ├── page.tsx │ │ │ ├── clusters │ │ │ │ └── page.tsx │ │ │ ├── launchpad │ │ │ │ └── page.tsx │ │ │ ├── account │ │ │ │ ├── page.tsx │ │ │ │ └── [address] │ │ │ │ │ └── page.tsx │ │ │ ├── global.css │ │ │ └── react-query-provider.tsx │ │ ├── index.d.ts │ │ ├── next-env.d.ts │ │ ├── tailwind.config.js │ │ ├── postcss.config.js │ │ ├── components │ │ │ └── account │ │ │ │ └── account-list-feature.tsx │ │ └── next.config.js │ ├── .eslintignore │ ├── .prettierrc │ ├── anchor │ │ ├── programs │ │ │ └── launchpad │ │ │ │ ├── src │ │ │ │ ├── state │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── registry.rs │ │ │ │ ├── instructions │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── initialize.rs │ │ │ │ └── lib.rs │ │ │ │ ├── Xargo.toml │ │ │ │ └── Cargo.toml │ │ ├── src │ │ │ └── index.ts │ │ ├── target │ │ │ └── CACHEDIR.TAG │ │ ├── README.md │ │ ├── package.json │ │ ├── Cargo.toml │ │ ├── tsconfig.lib.json │ │ ├── tsconfig.json │ │ ├── tsconfig.spec.json │ │ ├── migrations │ │ │ └── deploy.ts │ │ ├── .swcrc │ │ ├── .eslintrc.json │ │ └── Anchor.toml │ ├── vercel.json │ ├── jest.preset.js │ ├── jest.config.ts │ ├── .vscode │ │ └── extensions.json │ ├── .editorconfig │ ├── .prettierignore │ └── tsconfig.base.json └── aptos │ ├── .prettierignore │ ├── vite-env.d.ts │ ├── .prettierrc │ ├── postcss.config.js │ ├── public │ └── aptos.png │ ├── vercel.json │ ├── frontend │ ├── utils │ │ ├── truncateAddress.ts │ │ ├── clampNumber.ts │ │ ├── aptosClient.ts │ │ └── helpers.ts │ ├── constants.ts │ ├── assets │ │ ├── placeholders │ │ │ └── asset.png │ │ └── icons │ │ │ ├── twitter.svg │ │ │ └── external-link.svg │ ├── lib │ │ └── utils.ts │ ├── components │ │ ├── ui │ │ │ ├── collapsible.tsx │ │ │ ├── warning-alert.tsx │ │ │ └── info.tsx │ │ └── UploadSpinner.tsx │ ├── view-functions │ │ └── accountBalance.ts │ └── entry-functions │ │ └── mint_asset.ts │ ├── tsconfig.node.json │ ├── move │ └── Move.toml │ ├── scripts │ ├── move │ │ ├── test.js │ │ ├── compile.js │ │ └── upgrade.js │ └── init.js │ ├── components.json │ ├── .gitignore │ ├── .eslintrc.cjs │ └── index.html ├── surf-for-type-safety ├── move │ ├── .gitignore │ └── Move.toml ├── .prettierignore ├── vite-env.d.ts ├── .prettierrc ├── frontend │ ├── constants.ts │ ├── lib │ │ └── utils.ts │ ├── components │ │ ├── ui │ │ │ └── collapsible.tsx │ │ └── Header.tsx │ ├── utils │ │ ├── helpers.ts │ │ └── aptosClient.ts │ └── main.tsx ├── public │ └── aptos.png ├── postcss.config.js ├── .env ├── tsconfig.node.json ├── scripts │ ├── move │ │ ├── test.js │ │ ├── compile.js │ │ └── upgrade.js │ └── init.js ├── vite.config.ts ├── components.json ├── README.md ├── index.html └── tsconfig.json ├── nft-launchpad ├── .prettierignore ├── frontend │ ├── vite-env.d.ts │ ├── assets │ │ ├── placeholders │ │ │ ├── bear-1.png │ │ │ ├── bear-2.png │ │ │ └── bear-3.png │ │ └── icons │ │ │ ├── twitter.svg │ │ │ └── external-link.svg │ ├── utils │ │ ├── truncateAddress.ts │ │ ├── clampNumber.ts │ │ ├── aptosClient.ts │ │ └── helpers.ts │ ├── constants.ts │ ├── lib │ │ └── utils.ts │ ├── components │ │ ├── ui │ │ │ ├── collapsible.tsx │ │ │ ├── warning-alert.tsx │ │ │ └── info.tsx │ │ ├── UploadSpinner.tsx │ │ └── WalletProvider.tsx │ ├── entry-functions │ │ └── mint_nft.ts │ └── view-functions │ │ └── accountBalance.ts ├── .prettierrc ├── public │ └── aptos.png ├── postcss.config.js ├── vercel.json ├── tsconfig.node.json ├── scripts │ ├── init.js │ └── move │ │ └── test.js ├── components.json ├── .eslintrc.cjs ├── .gitignore ├── move │ └── Move.toml ├── index.html └── tsconfig.json ├── nft-marketplace ├── move │ ├── .gitignore │ ├── contract_address.txt │ ├── sh_scripts │ │ ├── test.sh │ │ └── upgrade.sh │ └── Move.toml └── frontend │ ├── .eslintrc.json │ ├── next.config.mjs │ ├── src │ ├── app │ │ ├── favicon.ico │ │ ├── provider.tsx │ │ └── layout.tsx │ ├── components │ │ ├── Page.tsx │ │ ├── AllNfts.tsx │ │ └── ListedNfts.tsx │ ├── hooks │ │ ├── useGetAllSellers.tsx │ │ └── useGetAllNfts.tsx │ ├── utils │ │ ├── constants.ts │ │ └── types.ts │ └── context │ │ └── WalletProvider.tsx │ ├── public │ ├── pet-parts │ │ ├── ear1.png │ │ ├── ear2.png │ │ ├── ear3.png │ │ ├── ear4.png │ │ ├── ear5.png │ │ ├── ear6.png │ │ ├── head.png │ │ ├── body1.png │ │ ├── body2.png │ │ ├── body3.png │ │ ├── body4.png │ │ ├── body5.png │ │ ├── face1.png │ │ ├── face2.png │ │ ├── face3.png │ │ ├── face4.png │ │ └── question_mark.png │ └── vercel.svg │ ├── gen_abi.sh │ ├── .gitignore │ └── tsconfig.json ├── fungible-asset-vesting ├── .gitignore ├── contract_address.txt ├── sh_scripts │ ├── test.sh │ ├── fmt.sh │ └── upgrade.sh └── Move.toml ├── telegram-boilerplate-template ├── .prettierignore ├── vite-env.d.ts ├── .prettierrc ├── frontend │ ├── constants.ts │ ├── lib │ │ └── utils.ts │ ├── components │ │ ├── ui │ │ │ └── collapsible.tsx │ │ └── Header.tsx │ └── utils │ │ ├── helpers.ts │ │ └── aptosClient.ts ├── postcss.config.js ├── public │ └── aptos.png ├── tsconfig.node.json ├── move │ └── Move.toml ├── scripts │ ├── move │ │ ├── test.js │ │ ├── compile.js │ │ └── upgrade.js │ └── init.js ├── vite.config.ts ├── components.json ├── .gitignore └── index.html ├── telegram-boilerplate-template-with-mizu-core ├── .prettierignore ├── vite-env.d.ts ├── .prettierrc ├── frontend │ ├── constants.ts │ ├── lib │ │ └── utils.ts │ ├── components │ │ ├── ui │ │ │ └── collapsible.tsx │ │ └── Header.tsx │ └── utils │ │ └── aptosClient.ts ├── postcss.config.js ├── public │ └── aptos.png ├── tsconfig.node.json ├── move │ └── Move.toml ├── scripts │ ├── move │ │ ├── test.js │ │ ├── compile.js │ │ └── upgrade.js │ └── init.js ├── vite.config.ts ├── components.json ├── .gitignore └── index.html ├── multidex-router └── move │ ├── .gitignore │ └── third_party_dependencies │ └── PancakeSwap │ └── Move.toml ├── .gitignore ├── fungible-asset-with-buy-sell-tax └── move │ ├── ScriptsOnly │ ├── sources │ │ └── dummy_module.move │ └── sh_scripts │ │ ├── init.sh │ │ └── fmt.sh │ ├── FungibleAssetWithBuySellTax │ ├── contract_address.txt │ ├── sh_scripts │ │ ├── test.sh │ │ ├── init.sh │ │ ├── fmt.sh │ │ └── upgrade.sh │ └── Move.toml │ ├── ThalaV2Interface │ ├── Move.toml │ └── sources │ │ ├── coin_wrapper.move │ │ └── pool.move │ ├── HyperionInterface │ ├── sources │ │ ├── v3 │ │ │ ├── position_blacklist.move │ │ │ └── tick_bitmap.move │ │ └── math │ │ │ ├── i128.move │ │ │ ├── i32.move │ │ │ └── swap_math.move │ └── Move.toml │ └── ThalaV2RouterInterface │ ├── Move.toml │ └── sources │ └── router.move ├── fungible-asset-with-permission └── move │ ├── contract_address.txt │ ├── sh_scripts │ ├── test.sh │ ├── init.sh │ ├── fmt.sh │ └── upgrade.sh │ ├── Move.toml │ └── README.md ├── billboard ├── move │ └── Move.toml ├── solidity │ ├── tsconfig.json │ ├── package.json │ └── hardhat.config.ts └── README.MD ├── dutch-auction ├── solidity │ ├── tsconfig.json │ ├── package.json │ └── hardhat.config.ts ├── move │ └── Move.toml └── README.MD ├── fungible-asset-voting └── move │ └── Move.toml └── LICENSE /friend-tech/solana/web/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /friend-tech/solana/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/public/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /surf-for-type-safety/move/.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | .aptos -------------------------------------------------------------------------------- /advanced-todo-list/solana/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /nft-launchpad/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /simple-todo-list/solana/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /friend-tech/aptos/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/page.module.css: -------------------------------------------------------------------------------- 1 | .page { 2 | } 3 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /nft-marketplace/move/.gitignore: -------------------------------------------------------------------------------- 1 | .aptos 2 | .idea 3 | build 4 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/page.module.css: -------------------------------------------------------------------------------- 1 | .page { 2 | } 3 | -------------------------------------------------------------------------------- /friend-tech/solana/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/page.module.css: -------------------------------------------------------------------------------- 1 | .page { 2 | } 3 | -------------------------------------------------------------------------------- /surf-for-type-safety/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/.gitignore: -------------------------------------------------------------------------------- 1 | .aptos 2 | .idea 3 | build 4 | -------------------------------------------------------------------------------- /friend-tech/aptos/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/page.module.css: -------------------------------------------------------------------------------- 1 | .page { 2 | } 3 | -------------------------------------------------------------------------------- /fungible-asset-vesting/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | contract_spec 3 | .aptos 4 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/.gitignore: -------------------------------------------------------------------------------- 1 | .aptos 2 | .idea 3 | build 4 | -------------------------------------------------------------------------------- /simple-todo-list/solana/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /surf-for-type-safety/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true 3 | } 4 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/.prettierignore: -------------------------------------------------------------------------------- 1 | dist/ 2 | node_modules/ 3 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /nft-launchpad/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /friend-tech/aptos/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /multidex-router/move/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | .aptos 3 | script.mv 4 | gas-profiling 5 | .DS_Store 6 | -------------------------------------------------------------------------------- /surf-for-type-safety/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .nx 2 | .idea 3 | .vscode 4 | .aptos 5 | node_modules 6 | move-by-examples.iml 7 | **/build/ 8 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | -------------------------------------------------------------------------------- /nft-marketplace/move/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0x37e99215fe71a4efb1d2ad2940a80c77f20ff4159309a2bd967cfe99f28a7ab9 2 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | mod registry; 2 | pub use registry::*; 3 | -------------------------------------------------------------------------------- /fungible-asset-vesting/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0x5b4901526d02528941d31e9a8f7338a0dac68500a4f73b1f54bf9b00f32ee922 2 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ScriptsOnly/sources/dummy_module.move: -------------------------------------------------------------------------------- 1 | module taxed_fa_addr::dummy_module {} 2 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | mod todo_list; 2 | pub use todo_list::*; 3 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0xcb8b57d6f98f4295fc261eddca12af69988e5a2a02e0359e5f2ab71e57277de4 2 | -------------------------------------------------------------------------------- /friend-tech/solana/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "outputDirectory": "dist/web/.next" 4 | } 5 | -------------------------------------------------------------------------------- /nft-launchpad/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-launchpad/public/aptos.png -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0x915adbca3965434abc072fdd135b0f37bca6da89b9142a24fb23af8f44f02a6f 2 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120 4 | } 5 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0x37ea0326cf628132a8f83462a758b6c20a92c2af307d5ed4b7ae6366acb42397 2 | -------------------------------------------------------------------------------- /simple-todo-list/solana/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "outputDirectory": "dist/web/.next" 4 | } 5 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "outputDirectory": "dist/web/.next" 4 | } 5 | -------------------------------------------------------------------------------- /friend-tech/aptos/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/friend-tech/aptos/public/aptos.png -------------------------------------------------------------------------------- /friend-tech/solana/jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "buildCommand": "npm run build", 3 | "outputDirectory": "dist/web/.next" 4 | } 5 | -------------------------------------------------------------------------------- /nft-launchpad/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /simple-todo-list/solana/jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /surf-for-type-safety/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/surf-for-type-safety/public/aptos.png -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/Xargo.toml: -------------------------------------------------------------------------------- 1 | [target.bpfel-unknown-unknown.dependencies.std] 2 | features = [] 3 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /friend-tech/aptos/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /friend-tech/solana/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/friend-tech/solana/web/public/favicon.ico -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/jest.preset.js: -------------------------------------------------------------------------------- 1 | const nxPreset = require('@nx/jest/preset').default; 2 | 3 | module.exports = { ...nxPreset }; 4 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/next.config.mjs: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | const nextConfig = {}; 3 | 4 | export default nextConfig; 5 | -------------------------------------------------------------------------------- /surf-for-type-safety/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /friend-tech/solana/jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nx/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/public/solana-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/friend-tech/solana/web/public/solana-logo.png -------------------------------------------------------------------------------- /fungible-asset-vesting/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --dev 9 | -------------------------------------------------------------------------------- /nft-launchpad/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/(.*)", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/src/app/favicon.ico -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nx/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /friend-tech/aptos/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/(.*)", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/fungible-asset-launchpad/aptos/public/aptos.png -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/contract_address.txt: -------------------------------------------------------------------------------- 1 | 0xed56ae2d0d3e769c70b6e9daf19672af84e0fe590c1e02d35b5938e493addffe 2 | -------------------------------------------------------------------------------- /simple-todo-list/solana/jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nx/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/simple-todo-list/solana/web/public/favicon.ico -------------------------------------------------------------------------------- /telegram-boilerplate-template/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/telegram-boilerplate-template/public/aptos.png -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/advanced-todo-list/solana/web/public/favicon.ico -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/jest.config.ts: -------------------------------------------------------------------------------- 1 | import { getJestProjects } from '@nx/jest'; 2 | 3 | export default { 4 | projects: getJestProjects(), 5 | }; 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/api/hello/route.ts: -------------------------------------------------------------------------------- 1 | export async function GET(request: Request) { 2 | return new Response('Hello, from API!'); 3 | } 4 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear1.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear2.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear3.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear4.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear5.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/ear6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/ear6.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/head.png -------------------------------------------------------------------------------- /simple-todo-list/solana/web/public/solana-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/simple-todo-list/solana/web/public/solana-logo.png -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/public/solana-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/advanced-todo-list/solana/web/public/solana-logo.png -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --dev 9 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/body1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/body1.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/body2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/body2.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/body3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/body3.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/body4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/body4.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/body5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/body5.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/face1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/face1.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/face2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/face2.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/face3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/face3.png -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/face4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/face4.png -------------------------------------------------------------------------------- /friend-tech/solana/anchor/src/index.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by preset-anchor. Programs are exported from this file. 2 | 3 | export * from './friend-tech-exports'; 4 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/vercel.json: -------------------------------------------------------------------------------- 1 | { 2 | "rewrites": [ 3 | { 4 | "source": "/(.*)", 5 | "destination": "/index.html" 6 | } 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/fungible-asset-launchpad/solana/web/public/favicon.ico -------------------------------------------------------------------------------- /nft-launchpad/frontend/assets/placeholders/bear-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-launchpad/frontend/assets/placeholders/bear-1.png -------------------------------------------------------------------------------- /nft-launchpad/frontend/assets/placeholders/bear-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-launchpad/frontend/assets/placeholders/bear-2.png -------------------------------------------------------------------------------- /nft-launchpad/frontend/assets/placeholders/bear-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-launchpad/frontend/assets/placeholders/bear-3.png -------------------------------------------------------------------------------- /nft-launchpad/frontend/utils/truncateAddress.ts: -------------------------------------------------------------------------------- 1 | export function truncateAddress(address: string) { 2 | return `${address?.slice(0, 4)}...${address?.slice(-4)}`; 3 | } 4 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | }; 7 | -------------------------------------------------------------------------------- /surf-for-type-safety/.env: -------------------------------------------------------------------------------- 1 | PROJECT_NAME=surf-for-type-safety 2 | VITE_APP_NETWORK=testnet 3 | VITE_MODULE_ADDRESS=0xd01f58c69ccac6569e13a7cfdf68409d513c1492b3f13399a7ba3415dff36fa4 -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/public/solana-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/fungible-asset-launchpad/solana/web/public/solana-logo.png -------------------------------------------------------------------------------- /nft-launchpad/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | export const MODULE_ADDRESS = import.meta.env.VITE_MODULE_ADDRESS; 3 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/pet-parts/question_mark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/nft-marketplace/frontend/public/pet-parts/question_mark.png -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/src/index.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by preset-anchor. Programs are exported from this file. 2 | 3 | export * from './simple-todo-list-exports'; 4 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/src/index.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by preset-anchor. Programs are exported from this file. 2 | 3 | export * from './advanced-todo-list-exports'; 4 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | mod config; 2 | mod holding; 3 | mod issuer; 4 | 5 | pub use config::*; 6 | pub use holding::*; 7 | pub use issuer::*; 8 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/src/index.ts: -------------------------------------------------------------------------------- 1 | // This file was generated by preset-anchor. Programs are exported from this file. 2 | 3 | export * from './launchpad-exports'; 4 | -------------------------------------------------------------------------------- /nft-marketplace/move/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --package-dir move \ 9 | --dev 10 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/public/aptos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/telegram-boilerplate-template-with-mizu-core/public/aptos.png -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/state/mod.rs: -------------------------------------------------------------------------------- 1 | mod todo_list; 2 | mod user_todo_list_counter; 3 | pub use todo_list::*; 4 | pub use user_todo_list_counter::*; 5 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/utils/truncateAddress.ts: -------------------------------------------------------------------------------- 1 | export function truncateAddress(address: string) { 2 | return `${address?.slice(0, 4)}...${address?.slice(-4)}`; 3 | } 4 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --package-dir move \ 9 | --dev 10 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/clusters/page.tsx: -------------------------------------------------------------------------------- 1 | import ClusterFeature from '@/components/cluster/cluster-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/page.tsx: -------------------------------------------------------------------------------- 1 | import DashboardFeature from '@/components/dashboard/dashboard-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/constants.ts: -------------------------------------------------------------------------------- 1 | export const NETWORK = import.meta.env.VITE_APP_NETWORK ?? "testnet"; 2 | export const MODULE_ADDRESS = import.meta.env.VITE_MODULE_ADDRESS; 3 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --dev 9 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/sh_scripts/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running tests #####" 6 | 7 | aptos move test \ 8 | --package-dir move \ 9 | --dev 10 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/clusters/page.tsx: -------------------------------------------------------------------------------- 1 | import ClusterFeature from '@/components/cluster/cluster-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/page.tsx: -------------------------------------------------------------------------------- 1 | import DashboardFeature from '@/components/dashboard/dashboard-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/state/config.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(Default)] 5 | pub struct Config { 6 | pub admin: Pubkey, 7 | } 8 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/state/holding.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(Default)] 5 | pub struct Holding { 6 | pub shares: u16, 7 | } 8 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/assets/placeholders/asset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aptos-labs/move-by-examples/HEAD/fungible-asset-launchpad/aptos/frontend/assets/placeholders/asset.png -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/clusters/page.tsx: -------------------------------------------------------------------------------- 1 | import ClusterFeature from '@/components/cluster/cluster-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/page.tsx: -------------------------------------------------------------------------------- 1 | import DashboardFeature from '@/components/dashboard/dashboard-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/account/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountListFeature from '@/components/account/account-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/page.tsx: -------------------------------------------------------------------------------- 1 | import DashboardFeature from '@/components/dashboard/dashboard-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/friend-tech/page.tsx: -------------------------------------------------------------------------------- 1 | import FriendTechFeature from '@/components/friend-tech/friend-tech-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/clusters/page.tsx: -------------------------------------------------------------------------------- 1 | import ClusterFeature from '@/components/cluster/cluster-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/account/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountListFeature from '@/components/account/account-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/account/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountListFeature from '@/components/account/account-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | mod initialize; 2 | mod issue_key; 3 | mod transact_key; 4 | 5 | pub use initialize::*; 6 | pub use issue_key::*; 7 | pub use transact_key::*; 8 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/launchpad/page.tsx: -------------------------------------------------------------------------------- 1 | import LaunchpadFeature from '@/components/launchpad/launchpad-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/account/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountListFeature from '@/components/account/account-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/account/[address]/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountDetailFeature from '@/components/account/account-detail-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/account/[address]/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountDetailFeature from '@/components/account/account-detail-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | mod create_token; 2 | mod initialize; 3 | mod mint_token; 4 | 5 | pub use create_token::*; 6 | pub use initialize::*; 7 | pub use mint_token::*; 8 | -------------------------------------------------------------------------------- /fungible-asset-vesting/sh_scripts/fmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Lint and format #####" 6 | 7 | aptos move fmt 8 | 9 | aptos move lint \ 10 | --named-addresses vesting=0x10000 # dummy address 11 | -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/sh_scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Creating a new Aptos account #####" 6 | 7 | aptos init \ 8 | --network testnet \ 9 | --profile testnet-profile-1 10 | -------------------------------------------------------------------------------- /simple-todo-list/solana/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "esbenp.prettier-vscode", 5 | "dbaeumer.vscode-eslint", 6 | "firsttris.vscode-jest-runner" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/account/[address]/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountDetailFeature from '@/components/account/account-detail-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "esbenp.prettier-vscode", 5 | "dbaeumer.vscode-eslint", 6 | "firsttris.vscode-jest-runner" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/account/[address]/page.tsx: -------------------------------------------------------------------------------- 1 | import AccountDetailFeature from '@/components/account/account-detail-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/index.d.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | declare module '*.svg' { 3 | const content: any; 4 | export const ReactComponent: any; 5 | export default content; 6 | } 7 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": [ 3 | "nrwl.angular-console", 4 | "esbenp.prettier-vscode", 5 | "dbaeumer.vscode-eslint", 6 | "firsttris.vscode-jest-runner" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/sh_scripts/fmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Lint and format #####" 6 | 7 | aptos move fmt 8 | 9 | aptos move lint \ 10 | --named-addresses permissioned_fa_addr=0x10 11 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/simple-todo-list/page.tsx: -------------------------------------------------------------------------------- 1 | import SimpleTodoListFeature from '@/components/simple-todo-list/simple-todo-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/target/CACHEDIR.TAG: -------------------------------------------------------------------------------- 1 | Signature: 8a477f597d28d172789f06886806bc55 2 | # This file is a cache directory tag created by cargo. 3 | # For information about cache directory tags see https://bford.info/cachedir/ 4 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ScriptsOnly/sh_scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Creating a new Aptos account #####" 6 | 7 | aptos init \ 8 | --network testnet \ 9 | --profile testnet-profile-1 10 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/advanced-todo-list/page.tsx: -------------------------------------------------------------------------------- 1 | import AdvancedTodoListFeature from '@/components/advanced-todo-list/advanced-todo-list-feature'; 2 | 3 | export default function Page() { 4 | return ; 5 | } 6 | -------------------------------------------------------------------------------- /friend-tech/solana/web/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/sh_scripts/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Creating a new Aptos account #####" 6 | 7 | aptos init \ 8 | --network testnet \ 9 | --profile testnet-profile-1 10 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/frontend/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { type ClassValue, clsx } from "clsx"; 2 | import { twMerge } from "tailwind-merge"; 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)); 6 | } 7 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[derive(Accounts)] 4 | pub struct Initialize {} 5 | 6 | pub fn handle_initialize(_ctx: Context) -> Result<()> { 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[derive(Accounts)] 4 | pub struct Initialize {} 5 | 6 | pub fn handle_initialize(_ctx: Context) -> Result<()> { 7 | Ok(()) 8 | } 9 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/state/issuer.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(Default)] 5 | pub struct Issuer { 6 | pub issuer: Pubkey, 7 | pub username: String, 8 | pub shares: u16, 9 | pub bump: u8, 10 | } 11 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/src/state/registry.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(InitSpace)] 5 | pub struct Registry { 6 | #[max_len(10000)] // Reserve space for up to 10000 tokens 7 | pub tokens: Vec, 8 | } 9 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/sh_scripts/fmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Lint and format #####" 6 | 7 | aptos move fmt 8 | 9 | aptos move lint \ 10 | --named-addresses taxed_fa_addr=0x10,tfa_recipient_addr=0x20 11 | -------------------------------------------------------------------------------- /nft-launchpad/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | mod complete_todo; 2 | mod create_todo; 3 | mod create_todo_list; 4 | mod initialize; 5 | 6 | pub use complete_todo::*; 7 | pub use create_todo::*; 8 | pub use create_todo_list::*; 9 | pub use initialize::*; 10 | -------------------------------------------------------------------------------- /billboard/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "billboard" 3 | version = "1.0.0" 4 | 5 | [addresses] 6 | billboard_address = "0x1337" 7 | 8 | [dependencies.AptosFramework] 9 | git = "https://github.com/aptos-labs/aptos-core.git" 10 | rev = "mainnet" 11 | subdir = "aptos-move/framework/aptos-framework" -------------------------------------------------------------------------------- /billboard/solidity/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2022", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true, 10 | } 11 | } -------------------------------------------------------------------------------- /friend-tech/solana/anchor/README.md: -------------------------------------------------------------------------------- 1 | # anchor 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build anchor` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test anchor` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@friend-tech/anchor", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "@coral-xyz/anchor": "^0.29.0", 6 | "@solana/web3.js": "1.90.0" 7 | }, 8 | "type": "commonjs", 9 | "main": "./index.cjs", 10 | "module": "./index.js" 11 | } 12 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/README.md: -------------------------------------------------------------------------------- 1 | # anchor 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build anchor` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test anchor` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /dutch-auction/solidity/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es2022", 4 | "module": "commonjs", 5 | "esModuleInterop": true, 6 | "forceConsistentCasingInFileNames": true, 7 | "strict": true, 8 | "skipLibCheck": true, 9 | "resolveJsonModule": true, 10 | } 11 | } -------------------------------------------------------------------------------- /friend-tech/solana/anchor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/README.md: -------------------------------------------------------------------------------- 1 | # anchor 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build anchor` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test anchor` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /friend-tech/aptos/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/README.md: -------------------------------------------------------------------------------- 1 | # anchor 2 | 3 | This library was generated with [Nx](https://nx.dev). 4 | 5 | ## Building 6 | 7 | Run `nx build anchor` to build the library. 8 | 9 | ## Running unit tests 10 | 11 | Run `nx test anchor` to execute the unit tests via [Jest](https://jestjs.io). 12 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/utils/clampNumber.ts: -------------------------------------------------------------------------------- 1 | export function clampNumber(num: number, min: number = 0, max: number = 1000): string { 2 | if (num < min) { 3 | return `<${min.toString()}`; 4 | } 5 | 6 | if (num > max) { 7 | return `>${max.toString()}`; 8 | } 9 | 10 | return num.toString(); 11 | } 12 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@simple-todo-list/anchor", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "@coral-xyz/anchor": "^0.29.0", 6 | "@solana/web3.js": "1.90.0" 7 | }, 8 | "type": "commonjs", 9 | "main": "./index.cjs", 10 | "module": "./index.js" 11 | } 12 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/error.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | pub enum ContractError { 5 | #[msg("The todo with the given id is not found")] 6 | TodoNotFound, 7 | #[msg("The todo is already completed")] 8 | TodoAlreadyCompleted, 9 | } 10 | -------------------------------------------------------------------------------- /surf-for-type-safety/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@advanced-todo-list/anchor", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "@coral-xyz/anchor": "^0.29.0", 6 | "@solana/web3.js": "1.90.0" 7 | }, 8 | "type": "commonjs", 9 | "main": "./index.cjs", 10 | "module": "./index.js" 11 | } 12 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/error.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[error_code] 4 | pub enum ContractError { 5 | #[msg("The todo with the given id is not found")] 6 | TodoNotFound, 7 | #[msg("The todo is already completed")] 8 | TodoAlreadyCompleted, 9 | } 10 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@launchpad/anchor", 3 | "version": "0.0.1", 4 | "dependencies": { 5 | "@coral-xyz/anchor": "^0.29.0", 6 | "@solana/web3.js": "1.90.0" 7 | }, 8 | "type": "commonjs", 9 | "main": "./index.cjs", 10 | "module": "./index.js" 11 | } 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/Cargo.toml: -------------------------------------------------------------------------------- 1 | [workspace] 2 | members = [ 3 | "programs/*" 4 | ] 5 | resolver = "2" 6 | 7 | [profile.release] 8 | overflow-checks = true 9 | lto = "fat" 10 | codegen-units = 1 11 | [profile.release.build-override] 12 | opt-level = 3 13 | incremental = false 14 | codegen-units = 1 15 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type Holding = { 2 | issuer: `0x${string}`; 3 | holder: `0x${string}`; 4 | shares: number; 5 | }; 6 | 7 | export type Issuer = { 8 | issuerObjectAddress: `0x${string}`; 9 | issuerAddress: `0x${string}`; 10 | username: string; 11 | totalIssuedShares: number; 12 | }; 13 | -------------------------------------------------------------------------------- /friend-tech/solana/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /fungible-asset-vesting/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vesting" 3 | version = "0.0.0" 4 | 5 | [addresses] 6 | vesting = "_" 7 | 8 | [dev-addresses] 9 | vesting = "0x123" 10 | 11 | [dependencies] 12 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 13 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ScriptsOnly/sh_scripts/fmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Lint and format #####" 6 | 7 | aptos move fmt 8 | 9 | aptos move lint \ 10 | --named-addresses taxed_fa_addr=0x10,tfa_recipient_addr=0x20,thala_swap_v2_interface_addr=0x30,thala_swap_v2_router_interface_addr=0x40 11 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/components/Page.tsx: -------------------------------------------------------------------------------- 1 | import { Box } from "@chakra-ui/react"; 2 | import { ReactNode } from "react"; 3 | 4 | export default function Page({ children }: { children: ReactNode }) { 5 | return ( 6 | 7 | {children} 8 | 9 | ); 10 | } 11 | -------------------------------------------------------------------------------- /simple-todo-list/solana/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/utils/clampNumber.ts: -------------------------------------------------------------------------------- 1 | export function clampNumber(num: number, min: number = 0, max: number = 100_000_000): string { 2 | if (num < min) { 3 | return `<${min.toString()}`; 4 | } 5 | 6 | if (num > max) { 7 | return `>${max.toString()}`; 8 | } 9 | 10 | return num.toString(); 11 | } 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/tsconfig.lib.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "declaration": true, 6 | "types": ["node"] 7 | }, 8 | "include": ["src/**/*.ts"], 9 | "exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true, 8 | "strict": true 9 | }, 10 | "include": ["vite.config.ts"] 11 | } 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /surf-for-type-safety/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: {}, 11 | }); 12 | } 13 | test(); 14 | -------------------------------------------------------------------------------- /friend-tech/aptos/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "AptosFriend" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | aptos_friend_addr = "_" 8 | 9 | [dependencies] 10 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 11 | 12 | [dev-dependencies] 13 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "files": [], 7 | "include": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.lib.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/assets/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { NETWORK } from "@/constants"; 2 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 3 | 4 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 5 | 6 | // Reuse same Aptos instance to utilize cookie based sticky routing 7 | export function aptosClient() { 8 | return aptos; 9 | } 10 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "files": [], 7 | "include": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.lib.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "files": [], 7 | "include": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.lib.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ThalaV2Interface/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ThalaSwapV2Interface" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | thala_swap_v2_interface_addr = "_" 8 | 9 | [dependencies] 10 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 11 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/assets/icons/twitter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.base.json", 3 | "compilerOptions": { 4 | "module": "commonjs" 5 | }, 6 | "files": [], 7 | "include": [], 8 | "references": [ 9 | { 10 | "path": "./tsconfig.lib.json" 11 | }, 12 | { 13 | "path": "./tsconfig.spec.json" 14 | } 15 | ] 16 | } 17 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { NETWORK } from "@/constants"; 2 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 3 | 4 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 5 | 6 | // Reuse same Aptos instance to utilize cookie based sticky routing 7 | export function aptosClient() { 8 | return aptos; 9 | } 10 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "fungible_asset_launchpad" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | launchpad_addr = '_' 8 | 9 | [dependencies] 10 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework"} 11 | 12 | [dev-dependencies] 13 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../dist/out-tsc", 5 | "module": "commonjs", 6 | "types": ["jest", "node"] 7 | }, 8 | "include": [ 9 | "jest.config.ts", 10 | "src/**/*.test.ts", 11 | "src/**/*.spec.ts", 12 | "src/**/*.d.ts" 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/instructions/mod.rs: -------------------------------------------------------------------------------- 1 | mod complete_todo; 2 | mod create_todo; 3 | mod create_todo_list; 4 | mod create_user_todo_list_counter; 5 | mod initialize; 6 | 7 | pub use complete_todo::*; 8 | pub use create_todo::*; 9 | pub use create_todo_list::*; 10 | pub use create_user_todo_list_counter::*; 11 | pub use initialize::*; 12 | -------------------------------------------------------------------------------- /fungible-asset-voting/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "FungibleAssetVoting" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | voting_app_addr = "_" 8 | fa_obj_addr = "_" 9 | 10 | [dependencies] 11 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 12 | 13 | [dev-dependencies] -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "FungibleAssetWithPermission" 3 | version = "0.0.0" 4 | 5 | [addresses] 6 | permissioned_fa_addr = "_" 7 | 8 | [dev-addresses] 9 | permissioned_fa_addr = "0x10" 10 | 11 | [dependencies] 12 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 13 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "TelegramCounterAppTemplate" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | counter_app_addr = "_" 8 | 9 | [dependencies] 10 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 11 | 12 | [dev-dependencies] 13 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/state/user_todo_list_counter.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[account] 4 | #[derive(InitSpace)] // automatically calculate the space required for the struct 5 | pub struct UserTodoListCounter { 6 | pub owner: Pubkey, // The owner of the account 7 | pub counter: u64, // A counter for owner's TodoList PDAs 8 | } 9 | -------------------------------------------------------------------------------- /friend-tech/aptos/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: { 11 | aptos_friend_addr: "0x100", 12 | }, 13 | }); 14 | } 15 | test(); 16 | -------------------------------------------------------------------------------- /simple-todo-list/README.MD: -------------------------------------------------------------------------------- 1 | # Simple Todo List 2 | 3 | ## Overview 4 | 5 | Anyone can create todo list, create todo and complete todo. 6 | 7 | ## Aptos Specific Things 8 | 9 | each user can only have one todo list, stored directly under the user's account 10 | 11 | ## Solana Specific Things 12 | 13 | Each todo list is a stored in a regular account owned by the todo list contract. 14 | -------------------------------------------------------------------------------- /billboard/README.MD: -------------------------------------------------------------------------------- 1 | # Billboard 2 | 3 | ## Overview 4 | 5 | Anyone can create a billboard, post message, remove message, and read message. 6 | 7 | ## Aptos Specific Things 8 | 9 | each user can only have one billboard, stored directly under the user's account as a resource 10 | 11 | ## Solidity Specific Things 12 | 13 | Each billboard is a stored in a regular account owned by contract. 14 | -------------------------------------------------------------------------------- /friend-tech/aptos/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | export const APT_DECIMALS = 8; 2 | 3 | export const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => { 4 | return value * Math.pow(10, decimal); 5 | }; 6 | 7 | export const convertAmountFromOnChainToHumanReadable = (value: number, decimal: number) => { 8 | return value / Math.pow(10, decimal); 9 | }; 10 | -------------------------------------------------------------------------------- /nft-launchpad/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: { 11 | launchpad_addr: "0x100", 12 | }, 13 | }); 14 | } 15 | test(); 16 | -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/README.md: -------------------------------------------------------------------------------- 1 | # Permissioned Fungible Asset 2 | 3 | ## Overview 4 | 5 | This example demonstrates how to implement a permissioned fungible asset using the Dispatchable Fungible Asset standard. The contract allows only whitelisted accounts to transfer the asset, providing a controlled environment for asset management, tailored for use cases like RWAs or regulated assets. 6 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /surf-for-type-safety/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "TelegramCounterAppTemplate" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | counter_app_addr = "_" 8 | 9 | [dependencies] 10 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 11 | 12 | [dev-dependencies] 13 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: { 11 | counter_app_addr: "0x100", 12 | }, 13 | }); 14 | } 15 | test(); 16 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/sources/v3/position_blacklist.move: -------------------------------------------------------------------------------- 1 | module hyperion_interface_addr::position_blacklist { 2 | use aptos_std::smart_vector::{SmartVector}; 3 | 4 | struct PositionBlackList has store { 5 | addresses: SmartVector
6 | } 7 | 8 | const EALREADY_ADDED: u64 = 140001; 9 | const ENOT_CONTAINTED: u64 = 140002; 10 | } 11 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | export const dateToSeconds = (date: Date | undefined) => { 2 | if (!date) return; 3 | const dateInSeconds = Math.floor(+date / 1000); 4 | return dateInSeconds; 5 | }; 6 | 7 | export const APT_DECIMALS = 8; 8 | 9 | export const convertAmountFromHumanReadableToOnChain = (value: number, decimal: number) => { 10 | return value * Math.pow(10, decimal); 11 | }; 12 | -------------------------------------------------------------------------------- /nft-launchpad/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: { 11 | launchpad_addr: "0x100", 12 | minter: "0x101", 13 | }, 14 | }); 15 | } 16 | test(); 17 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/hooks/useGetAllSellers.tsx: -------------------------------------------------------------------------------- 1 | import { getAllSellers } from "@/utils/aptos"; 2 | import { useEffect, useState } from "react"; 3 | 4 | export const useGetAllSellers = () => { 5 | const [sellers, setSellers] = useState(); 6 | useEffect(() => { 7 | getAllSellers().then((res) => { 8 | setSellers(res); 9 | }); 10 | }, []); 11 | return sellers; 12 | }; 13 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /friend-tech/solana/.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache 5 | .anchor 6 | anchor/target/deploy 7 | anchor/target/debug 8 | anchor/target/release 9 | anchor/target/sbf-solana-solana 10 | anchor/target/.rustc_info.json 11 | !anchor/target/idl/*.json 12 | !anchor/target/types/*.ts 13 | node_modules 14 | dist 15 | tmp 16 | build 17 | test-ledger -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/scripts/move/test.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function test() { 6 | const move = new cli.Move(); 7 | 8 | await move.test({ 9 | packageDirectoryPath: "move", 10 | namedAddresses: { 11 | counter_app_addr: "0x100", 12 | }, 13 | }); 14 | } 15 | test(); 16 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache 5 | .anchor 6 | anchor/target/deploy 7 | anchor/target/debug 8 | anchor/target/release 9 | anchor/target/sbf-solana-solana 10 | anchor/target/.rustc_info.json 11 | !anchor/target/idl/*.json 12 | !anchor/target/types/*.ts 13 | node_modules 14 | dist 15 | tmp 16 | build 17 | test-ledger -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /simple-todo-list/solana/.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache 5 | .anchor 6 | anchor/target/deploy 7 | anchor/target/debug 8 | anchor/target/release 9 | anchor/target/sbf-solana-solana 10 | anchor/target/.rustc_info.json 11 | !anchor/target/idl/*.json 12 | !anchor/target/types/*.ts 13 | node_modules 14 | dist 15 | tmp 16 | build 17 | test-ledger -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/.prettierignore: -------------------------------------------------------------------------------- 1 | # Add files here to ignore them from prettier formatting 2 | /dist 3 | /coverage 4 | /.nx/cache 5 | .anchor 6 | anchor/target/deploy 7 | anchor/target/debug 8 | anchor/target/release 9 | anchor/target/sbf-solana-solana 10 | anchor/target/.rustc_info.json 11 | !anchor/target/idl/*.json 12 | !anchor/target/types/*.ts 13 | node_modules 14 | dist 15 | tmp 16 | build 17 | test-ledger -------------------------------------------------------------------------------- /surf-for-type-safety/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "message-board" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | message_board_addr = "_" 8 | 9 | [dev-addresses] 10 | message_board_addr = "0x999" 11 | 12 | [dependencies] 13 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 14 | 15 | [dev-dependencies] 16 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/scripts/init.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | 3 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 4 | 5 | async function init() { 6 | const move = new cli.Move(); 7 | 8 | await move.init({ 9 | network: process.env.VITE_APP_NETWORK, 10 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 11 | }); 12 | } 13 | init(); 14 | -------------------------------------------------------------------------------- /billboard/solidity/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "billboard", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "compile": "npx hardhat compile" 6 | }, 7 | "dependencies": { 8 | "@openzeppelin/contracts": "4.9.5", 9 | "@openzeppelin/contracts-upgradeable": "4.9.5", 10 | "hardhat": "2.20.1" 11 | }, 12 | "devDependencies": { 13 | "ts-node": "^10.9.2", 14 | "typescript": "^5.3.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /friend-tech/aptos/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import react from "@vitejs/plugin-react"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | build: { 7 | outDir: "dist", 8 | }, 9 | server: { 10 | open: true, 11 | }, 12 | plugins: [react()], 13 | resolve: { 14 | alias: { 15 | "@": path.resolve(__dirname, "./frontend"), 16 | }, 17 | }, 18 | }); 19 | -------------------------------------------------------------------------------- /dutch-auction/solidity/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dutch-auction", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "compile": "npx hardhat compile" 6 | }, 7 | "dependencies": { 8 | "@openzeppelin/contracts": "4.9.5", 9 | "@openzeppelin/contracts-upgradeable": "4.9.5", 10 | "hardhat": "2.20.1" 11 | }, 12 | "devDependencies": { 13 | "ts-node": "^10.9.2", 14 | "typescript": "^5.3.3" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple-todo-list" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | simple_todo_list_addr = "_" 8 | 9 | [dev-addresses] 10 | simple_todo_list_addr = "0x111" 11 | 12 | [dependencies] 13 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework"} 14 | 15 | [dev-dependencies] 16 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/frontend/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "advanced-todo-list" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | advanced_todo_list_addr = "_" 8 | 9 | [dev-addresses] 10 | advanced_todo_list_addr = "0x111" 11 | 12 | [dependencies] 13 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework"} 14 | 15 | [dev-dependencies] 16 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/app/provider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { WalletProvider } from "@/context/WalletProvider"; 4 | import { ChakraProvider } from "@chakra-ui/react"; 5 | import { ReactNode } from "react"; 6 | 7 | export function Providers({ children }: { children: ReactNode }) { 8 | return ( 9 | 10 | {children} 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/sources/v3/tick_bitmap.move: -------------------------------------------------------------------------------- 1 | module hyperion_interface_addr::tick_bitmap { 2 | 3 | use aptos_std::table::{Table}; 4 | 5 | use hyperion_interface_addr::i32::{I32}; 6 | 7 | // u32 as tick, higher 24 bits represents words, lower 8 bits represents tick bit position 8 | // tick need to be 9 | struct BitMap has store { 10 | map: Table 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /nft-launchpad/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "zinc", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /surf-for-type-safety/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import react from "@vitejs/plugin-react"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | build: { 7 | outDir: "build", 8 | }, 9 | server: { 10 | open: true, 11 | }, 12 | plugins: [ 13 | react() 14 | ], 15 | resolve: { 16 | alias: { 17 | "@": path.resolve(__dirname, "./frontend"), 18 | }, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /friend-tech/aptos/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /surf-for-type-safety/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import react from "@vitejs/plugin-react"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | build: { 7 | outDir: "dist", 8 | }, 9 | server: { 10 | open: true, 11 | }, 12 | plugins: [ 13 | react() 14 | ], 15 | resolve: { 16 | alias: { 17 | "@": path.resolve(__dirname, "./frontend"), 18 | }, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "FungibleAssetWithBuySellTax" 3 | version = "0.0.0" 4 | 5 | [addresses] 6 | taxed_fa_addr = "_" 7 | tfa_recipient_addr = "_" 8 | 9 | [dev-addresses] 10 | taxed_fa_addr = "0x10" 11 | tfa_recipient_addr = "0x20" 12 | 13 | [dependencies] 14 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 15 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/utils/constants.ts: -------------------------------------------------------------------------------- 1 | export const BASE_PATH = "/pet-parts/"; 2 | 3 | export const bodies = [ 4 | "body1.png", 5 | "body2.png", 6 | "body3.png", 7 | "body4.png", 8 | "body5.png", 9 | ]; 10 | 11 | export const ears = [ 12 | "ear1.png", 13 | "ear2.png", 14 | "ear3.png", 15 | "ear4.png", 16 | "ear5.png", 17 | "ear6.png", 18 | ]; 19 | 20 | export const faces = ["face1.png", "face2.png", "face3.png", "face4.png"]; 21 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/gen_abi.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | NETWORK=testnet 4 | 5 | CONTRACT_ADDRESS=$(cat ../move/contract_address.txt) 6 | 7 | PACKAGE_NAME=$(cat ../move/sources/$(ls ../move/sources/ | head -n 1) | head -n 1 | sed -n 's/module [^:]*::\(.*\) {/\1/p') 8 | 9 | echo "export const ABI = $(curl https://fullnode.$NETWORK.aptoslabs.com/v1/accounts/$CONTRACT_ADDRESS/module/$PACKAGE_NAME | sed -n 's/.*"abi":\({.*}\).*}$/\1/p') as const" > src/utils/abi.ts 10 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/vite.config.ts: -------------------------------------------------------------------------------- 1 | import path from "path"; 2 | import react from "@vitejs/plugin-react"; 3 | import { defineConfig } from "vite"; 4 | 5 | export default defineConfig({ 6 | build: { 7 | outDir: "dist", 8 | }, 9 | server: { 10 | open: true, 11 | }, 12 | plugins: [ 13 | react() 14 | ], 15 | resolve: { 16 | alias: { 17 | "@": path.resolve(__dirname, "./frontend"), 18 | }, 19 | }, 20 | }); 21 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { WalletSelector } from "./WalletSelector"; 2 | 3 | export function Header() { 4 | return ( 5 |
6 |

CAD Boilerplate Template

7 | 8 |
9 | 10 |
11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": true, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "frontend/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | } 9 | 10 | .wallet-adapter-button-trigger { 11 | background: rgb(100, 26, 230) !important; 12 | border-radius: 8px !important; 13 | padding-left: 16px !important; 14 | padding-right: 16px !important; 15 | } 16 | .wallet-adapter-dropdown-list, 17 | .wallet-adapter-button { 18 | font-family: inherit !important; 19 | } 20 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "HyperionInterface" 3 | version = "1.0.0" 4 | upgrade_policy = "compatible" 5 | authors = [] 6 | 7 | [addresses] 8 | hyperion_interface_addr = "_" 9 | 10 | [dev-addresses] 11 | hyperion_interface_addr = "0xAA" 12 | 13 | [dependencies] 14 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ThalaV2RouterInterface/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "ThalaSwapV2RouterInterface" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | thala_swap_v2_router_interface_addr = "_" 8 | thala_swap_v2_interface_addr = "_" 9 | 10 | [dependencies] 11 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-framework.git", subdir = "aptos-framework", rev = "mainnet" } 12 | ThalaSwapV2Interface = { local = "../ThalaV2Interface" } 13 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { WalletSelector } from "./WalletSelector"; 2 | 3 | export function Header() { 4 | return ( 5 |
6 |

Boilerplate Template

7 | 8 |
9 | 10 |
11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /dutch-auction/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dutch_auction" 3 | version = "1.0.0" 4 | 5 | [addresses] 6 | dutch_auction_address = "0x1337" 7 | 8 | [dependencies.AptosFramework] 9 | git = "https://github.com/aptos-labs/aptos-core.git" 10 | rev = "mainnet" 11 | subdir = "aptos-move/framework/aptos-framework" 12 | 13 | [dependencies.AptosTokenObjects] 14 | git = "https://github.com/aptos-labs/aptos-core.git" 15 | rev = "mainnet" 16 | subdir = "aptos-move/framework/aptos-token-objects" -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | } 9 | 10 | .wallet-adapter-button-trigger { 11 | background: rgb(100, 26, 230) !important; 12 | border-radius: 8px !important; 13 | padding-left: 16px !important; 14 | padding-right: 16px !important; 15 | } 16 | .wallet-adapter-dropdown-list, 17 | .wallet-adapter-button { 18 | font-family: inherit !important; 19 | } 20 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | } 9 | 10 | .wallet-adapter-button-trigger { 11 | background: rgb(100, 26, 230) !important; 12 | border-radius: 8px !important; 13 | padding-left: 16px !important; 14 | padding-right: 16px !important; 15 | } 16 | .wallet-adapter-dropdown-list, 17 | .wallet-adapter-button { 18 | font-family: inherit !important; 19 | } 20 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | import * as anchor from '@coral-xyz/anchor'; 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/global.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | 5 | html, 6 | body { 7 | height: 100%; 8 | } 9 | 10 | .wallet-adapter-button-trigger { 11 | background: rgb(100, 26, 230) !important; 12 | border-radius: 8px !important; 13 | padding-left: 16px !important; 14 | padding-right: 16px !important; 15 | } 16 | .wallet-adapter-dropdown-list, 17 | .wallet-adapter-button { 18 | font-family: inherit !important; 19 | } 20 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/frontend/components/Header.tsx: -------------------------------------------------------------------------------- 1 | import { WalletSelector } from "./WalletSelector"; 2 | 3 | export function Header() { 4 | return ( 5 |
6 |

Boilerplate Template

7 | 8 |
9 | 10 |
11 |
12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | import * as anchor from '@coral-xyz/anchor'; 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | import * as anchor from '@coral-xyz/anchor'; 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/migrations/deploy.ts: -------------------------------------------------------------------------------- 1 | // Migrations are an early feature. Currently, they're nothing more than this 2 | // single deploy script that's invoked from the CLI, injecting a provider 3 | // configured from the workspace's Anchor.toml. 4 | 5 | import * as anchor from '@coral-xyz/anchor'; 6 | 7 | module.exports = async function (provider) { 8 | // Configure client to use the provider. 9 | anchor.setProvider(provider); 10 | 11 | // Add your deploy script here. 12 | }; 13 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/.gitignore: -------------------------------------------------------------------------------- 1 | # Aptos related files 2 | .aptos 3 | .env 4 | move/build 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | lerna-debug.log* 14 | 15 | node_modules 16 | dist 17 | build 18 | dist-ssr 19 | *.local 20 | package-lock.json 21 | pnpm-lock.yaml 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/sources/math/i128.move: -------------------------------------------------------------------------------- 1 | module hyperion_interface_addr::i128 { 2 | const OVERFLOW: u64 = 0; 3 | 4 | const MIN_AS_U128: u128 = 1 << 127; 5 | const MAX_AS_U128: u128 = 0x7fffffffffffffffffffffffffffffff; 6 | 7 | const LT: u8 = 0; 8 | const EQ: u8 = 1; 9 | const GT: u8 = 2; 10 | 11 | struct I128 has copy, drop, store { 12 | bits: u128 13 | } 14 | 15 | public fun zero(): I128 { 16 | I128 { bits: 0 } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/components/AllNfts.tsx: -------------------------------------------------------------------------------- 1 | import { useGetAllNfts } from "@/hooks/useGetAllNfts"; 2 | import { SimpleGrid } from "@chakra-ui/react"; 3 | import { NftCard } from "./NftCard"; 4 | 5 | export const AllNfts = () => { 6 | const allNfts = useGetAllNfts(); 7 | return allNfts ? ( 8 | 9 | {allNfts.map((nft) => { 10 | return ; 11 | })} 12 | 13 | ) : ( 14 | <> 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /friend-tech/solana/web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); 2 | const { join } = require('path'); 3 | 4 | /** @type {import('tailwindcss').Config} */ 5 | module.exports = { 6 | content: [ 7 | join( 8 | __dirname, 9 | '{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' 10 | ), 11 | ...createGlobPatternsForDependencies(__dirname), 12 | ], 13 | theme: { 14 | extend: {}, 15 | }, 16 | plugins: [require('daisyui')], 17 | }; 18 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); 2 | const { join } = require('path'); 3 | 4 | /** @type {import('tailwindcss').Config} */ 5 | module.exports = { 6 | content: [ 7 | join( 8 | __dirname, 9 | '{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' 10 | ), 11 | ...createGlobPatternsForDependencies(__dirname), 12 | ], 13 | theme: { 14 | extend: {}, 15 | }, 16 | plugins: [require('daisyui')], 17 | }; 18 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); 2 | const { join } = require('path'); 3 | 4 | /** @type {import('tailwindcss').Config} */ 5 | module.exports = { 6 | content: [ 7 | join( 8 | __dirname, 9 | '{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' 10 | ), 11 | ...createGlobPatternsForDependencies(__dirname), 12 | ], 13 | theme: { 14 | extend: {}, 15 | }, 16 | plugins: [require('daisyui')], 17 | }; 18 | -------------------------------------------------------------------------------- /dutch-auction/README.MD: -------------------------------------------------------------------------------- 1 | # Dutch Auction 2 | 3 | ## Overview 4 | 5 | This smart contract enables the sale of NFTs for fungible Assets utilizing Dutch Auction principles 6 | 7 | ## Aptos Specific Things 8 | 9 | In this example, we use the Digital Assets standard `Object` for representing each individual token 10 | 11 | ## Solidity Specific Things 12 | 13 | The DutchAuction contract inherits from the Ownable and ERC721 contracts, allowing for the implementation of the ownership logic and seamless integration of the NFT functionallity. -------------------------------------------------------------------------------- /nft-launchpad/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | ignorePatterns: ['dist', '.eslintrc.cjs'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': [ 14 | 'warn', 15 | { allowConstantExport: true }, 16 | ], 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | export type Aptogotchi = { 2 | name: string; 3 | address: string; 4 | }; 5 | 6 | export type AptogotchiTraits = { 7 | body: number; 8 | ear: number; 9 | face: number; 10 | }; 11 | 12 | export type Listing = { 13 | listing_object_address: string; 14 | price: number; 15 | seller_address: string; 16 | }; 17 | 18 | export type AptogotchiWithTraits = Aptogotchi & AptogotchiTraits; 19 | export type ListedAptogotchiWithTraits = Aptogotchi & 20 | AptogotchiTraits & 21 | Listing; 22 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | import { Network } from "@aptos-labs/ts-sdk"; 2 | import { NetworkInfo, isAptosNetwork } from "@aptos-labs/wallet-adapter-react"; 3 | 4 | export const isValidNetworkName = (network: NetworkInfo | null) => { 5 | if (isAptosNetwork(network)) { 6 | return Object.values(Network).includes(network?.name); 7 | } 8 | // If the configured network is not an Aptos network, i.e is a custom network 9 | // we resolve it as a valid network name 10 | return true; 11 | }; 12 | -------------------------------------------------------------------------------- /billboard/solidity/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | 3 | const config: HardhatUserConfig = { 4 | networks: { 5 | hardhat: { 6 | initialDate: "1970-01-01T00:00:00Z", 7 | }, 8 | }, 9 | solidity: { 10 | version: "0.8.20", 11 | settings: { 12 | optimizer: { 13 | enabled: true, 14 | runs: 200, 15 | }, 16 | evmVersion: "paris", 17 | }, 18 | }, 19 | }; 20 | export default config; -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const { createGlobPatternsForDependencies } = require('@nx/react/tailwind'); 2 | const { join } = require('path'); 3 | 4 | /** @type {import('tailwindcss').Config} */ 5 | module.exports = { 6 | content: [ 7 | join( 8 | __dirname, 9 | '{src,pages,components,app}/**/*!(*.stories|*.spec).{ts,tsx,html}' 10 | ), 11 | ...createGlobPatternsForDependencies(__dirname), 12 | ], 13 | theme: { 14 | extend: {}, 15 | }, 16 | plugins: [require('daisyui')], 17 | }; 18 | -------------------------------------------------------------------------------- /dutch-auction/solidity/hardhat.config.ts: -------------------------------------------------------------------------------- 1 | import { HardhatUserConfig } from "hardhat/config"; 2 | 3 | const config: HardhatUserConfig = { 4 | networks: { 5 | hardhat: { 6 | initialDate: "1970-01-01T00:00:00Z", 7 | }, 8 | }, 9 | solidity: { 10 | version: "0.8.20", 11 | settings: { 12 | optimizer: { 13 | enabled: true, 14 | runs: 200, 15 | }, 16 | evmVersion: "paris", 17 | }, 18 | }, 19 | }; 20 | export default config; -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/utils/helpers.ts: -------------------------------------------------------------------------------- 1 | import { Network } from "@aptos-labs/ts-sdk"; 2 | import { NetworkInfo, isAptosNetwork } from "@aptos-labs/wallet-adapter-react"; 3 | 4 | export const isValidNetworkName = (network: NetworkInfo | null) => { 5 | if (isAptosNetwork(network)) { 6 | return Object.values(Network).includes(network?.name); 7 | } 8 | // If the configured network is not an Aptos network, i.e is a custom network 9 | // we resolve it as a valid network name 10 | return true; 11 | }; 12 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | 'plugin:react-hooks/recommended', 8 | ], 9 | ignorePatterns: ['dist', '.eslintrc.cjs'], 10 | parser: '@typescript-eslint/parser', 11 | plugins: ['react-refresh'], 12 | rules: { 13 | 'react-refresh/only-export-components': [ 14 | 'warn', 15 | { allowConstantExport: true }, 16 | ], 17 | }, 18 | } 19 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/context/WalletProvider.tsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react"; 4 | import { PetraWallet } from "petra-plugin-wallet-adapter"; 5 | import { ReactNode } from "react"; 6 | 7 | const wallets = [new PetraWallet()]; 8 | 9 | export function WalletProvider({ children }: { children: ReactNode }) { 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /nft-marketplace/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "marketplace" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | marketplace_addr = "_" 8 | 9 | [dev-addresses] 10 | marketplace_addr = "0x111" 11 | 12 | [dependencies] 13 | AptosFramework = {git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework"} 14 | AptosTokenObjects = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-token-objects"} 15 | 16 | [dev-dependencies] 17 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/state/todo_list.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)] 4 | pub struct Todo { 5 | #[max_len(200)] // Reserve space for up to 50 characters, considering UTF-8 encoding 6 | pub content: String, 7 | pub completed: bool, 8 | } 9 | 10 | #[account] 11 | #[derive(InitSpace)] 12 | pub struct TodoList { 13 | pub owner: Pubkey, 14 | #[max_len(10)] // Reserve space for up to 10 todos 15 | pub todos: Vec, 16 | } 17 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/state/todo_list.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | 3 | #[derive(AnchorSerialize, AnchorDeserialize, Clone, InitSpace)] 4 | pub struct Todo { 5 | #[max_len(200)] // Reserve space for up to 50 characters, considering UTF-8 encoding 6 | pub content: String, 7 | pub completed: bool, 8 | } 9 | 10 | #[account] 11 | #[derive(InitSpace)] 12 | pub struct TodoList { 13 | pub owner: Pubkey, 14 | #[max_len(10)] // Reserve space for up to 10 todos 15 | pub todos: Vec, 16 | } 17 | -------------------------------------------------------------------------------- /friend-tech/aptos/.gitignore: -------------------------------------------------------------------------------- 1 | # Aptos related files 2 | .aptos 3 | .env 4 | move/build 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | lerna-debug.log* 14 | 15 | node_modules 16 | dist 17 | build 18 | dist-ssr 19 | *.local 20 | package-lock.json 21 | pnpm-lock.yaml 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | # template related files 35 | example-collection/ 36 | -------------------------------------------------------------------------------- /friend-tech/solana/web/postcss.config.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | 3 | // Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build 4 | // option from your application's configuration (i.e. project.json). 5 | // 6 | // See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries 7 | 8 | module.exports = { 9 | plugins: { 10 | tailwindcss: { 11 | config: join(__dirname, 'tailwind.config.js'), 12 | }, 13 | autoprefixer: {}, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /fungible-asset-vesting/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | CONTRACT_ADDRESS=$(cat contract_address.txt) 12 | 13 | aptos move upgrade-object-package \ 14 | --object-address $CONTRACT_ADDRESS \ 15 | --named-addresses vesting=$CONTRACT_ADDRESS \ 16 | --profile $PUBLISHER_PROFILE \ 17 | --assume-yes 18 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ThalaV2Interface/sources/coin_wrapper.move: -------------------------------------------------------------------------------- 1 | module thala_swap_v2_interface_addr::coin_wrapper { 2 | use aptos_framework::fungible_asset::{Metadata}; 3 | use aptos_framework::object::Object; 4 | 5 | struct Notacoin {} 6 | 7 | public entry fun create_pool_weighted( 8 | sender: &signer, 9 | fa_metadatas: vector>, 10 | seed_amounts: vector, 11 | weights: vector, 12 | fee_tier: u64, 13 | ) { 14 | abort 0; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /nft-launchpad/.gitignore: -------------------------------------------------------------------------------- 1 | # Aptos related files 2 | .aptos 3 | .env 4 | move/build 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | lerna-debug.log* 14 | 15 | node_modules 16 | dist 17 | build 18 | dist-ssr 19 | *.local 20 | package-lock.json 21 | pnpm-lock.yaml 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | # template related files 35 | example-collection/ 36 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/postcss.config.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | 3 | // Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build 4 | // option from your application's configuration (i.e. project.json). 5 | // 6 | // See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries 7 | 8 | module.exports = { 9 | plugins: { 10 | tailwindcss: { 11 | config: join(__dirname, 'tailwind.config.js'), 12 | }, 13 | autoprefixer: {}, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/postcss.config.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | 3 | // Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build 4 | // option from your application's configuration (i.e. project.json). 5 | // 6 | // See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries 7 | 8 | module.exports = { 9 | plugins: { 10 | tailwindcss: { 11 | config: join(__dirname, 'tailwind.config.js'), 12 | }, 13 | autoprefixer: {}, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/postcss.config.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | 3 | // Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build 4 | // option from your application's configuration (i.e. project.json). 5 | // 6 | // See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries 7 | 8 | module.exports = { 9 | plugins: { 10 | tailwindcss: { 11 | config: join(__dirname, 'tailwind.config.js'), 12 | }, 13 | autoprefixer: {}, 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/entry-functions/mint_nft.ts: -------------------------------------------------------------------------------- 1 | import { InputTransactionData } from "@aptos-labs/wallet-adapter-react"; 2 | 3 | export type MintNftArguments = { 4 | collectionId: string; 5 | amount: number; 6 | }; 7 | 8 | export const mintNFT = (args: MintNftArguments): InputTransactionData => { 9 | const { collectionId, amount } = args; 10 | return { 11 | data: { 12 | function: `${import.meta.env.VITE_MODULE_ADDRESS}::launchpad::mint_nft`, 13 | typeArguments: [], 14 | functionArguments: [collectionId, amount], 15 | }, 16 | }; 17 | }; 18 | -------------------------------------------------------------------------------- /nft-marketplace/move/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | CONTRACT_ADDRESS=$(cat contract_address.txt) 12 | 13 | aptos move upgrade-object-package \ 14 | --object-address $CONTRACT_ADDRESS \ 15 | --named-addresses marketplace_addr=$CONTRACT_ADDRESS \ 16 | --profile $PUBLISHER_PROFILE \ 17 | --assume-yes 18 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 2 | import { createSurfClient } from "@thalalabs/surf"; 3 | 4 | import { NETWORK } from "@/constants"; 5 | import { ABI } from "@/utils/abi"; 6 | 7 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 8 | const surf = createSurfClient(aptos).useABI(ABI); 9 | 10 | // Reuse same Aptos instance to utilize cookie based sticky routing 11 | export function aptosClient() { 12 | return aptos; 13 | } 14 | 15 | export function surfClient() { 16 | return surf; 17 | } 18 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/.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 | .yarn/install-state.gz 8 | 9 | # testing 10 | /coverage 11 | 12 | # next.js 13 | /.next/ 14 | /out/ 15 | 16 | # production 17 | /build 18 | 19 | # misc 20 | .DS_Store 21 | *.pem 22 | 23 | # debug 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | 28 | # local env files 29 | .env*.local 30 | 31 | # vercel 32 | .vercel 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | next-env.d.ts 37 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | CONTRACT_ADDRESS=$(cat contract_address.txt) 12 | 13 | aptos move upgrade-object-package \ 14 | --object-address $CONTRACT_ADDRESS \ 15 | --named-addresses simple_todo_list_addr=$CONTRACT_ADDRESS \ 16 | --profile $PUBLISHER_PROFILE \ 17 | --assume-yes 18 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "simple-todo-list" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "simple_todo_list" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = "0.29.0" 20 | # fix error: use of unstable library feature 'build_hasher_simple_hash_one' 21 | ahash = "=0.8.6" 22 | solana-program = "=1.17.0" 23 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | CONTRACT_ADDRESS=$(cat contract_address.txt) 12 | 13 | aptos move upgrade-object-package \ 14 | --object-address $CONTRACT_ADDRESS \ 15 | --named-addresses advanced_todo_list_addr=$CONTRACT_ADDRESS \ 16 | --profile $PUBLISHER_PROFILE \ 17 | --assume-yes 18 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/assets/icons/external-link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { createSurfClient } from "@thalalabs/surf"; 2 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 3 | 4 | import { NETWORK } from "@/constants"; 5 | import { ABI } from "@/utils/abi"; 6 | 7 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 8 | 9 | // Reuse same Aptos instance to utilize cookie based sticky routing 10 | export function aptosClient() { 11 | return aptos; 12 | } 13 | 14 | export function surfClient() { 15 | const surf = createSurfClient(aptosClient()).useABI(ABI); 16 | return surf; 17 | } 18 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/.gitignore: -------------------------------------------------------------------------------- 1 | # Aptos related files 2 | .aptos 3 | .env 4 | move/build 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | lerna-debug.log* 14 | 15 | node_modules 16 | dist 17 | build 18 | dist-ssr 19 | *.local 20 | package-lock.json 21 | pnpm-lock.yaml 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | # template related files 35 | example-collection/ 36 | .vercel 37 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "advanced-todo-list" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "advanced_todo_list" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = "0.29.0" 20 | # fix error: use of unstable library feature 'build_hasher_simple_hash_one' 21 | ahash = "=0.8.6" 22 | solana-program = "=1.17.0" 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2024 Aptos Labs 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/assets/icons/external-link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/.gitignore: -------------------------------------------------------------------------------- 1 | # Aptos related files 2 | .aptos 3 | .env 4 | move/build 5 | 6 | # Logs 7 | logs 8 | *.log 9 | npm-debug.log* 10 | yarn-debug.log* 11 | yarn-error.log* 12 | pnpm-debug.log* 13 | lerna-debug.log* 14 | 15 | node_modules 16 | dist 17 | build 18 | dist-ssr 19 | *.local 20 | package-lock.json 21 | pnpm-lock.yaml 22 | 23 | # Editor directories and files 24 | .vscode/* 25 | !.vscode/extensions.json 26 | .idea 27 | .DS_Store 28 | *.suo 29 | *.ntvs* 30 | *.njsproj 31 | *.sln 32 | *.sw? 33 | 34 | # template related files 35 | example-collection/ 36 | .vercel 37 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "friend-tech" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "friend_tech" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = { version = "0.29.0", features = ["init-if-needed"] } 20 | # fix error: use of unstable library feature 'build_hasher_simple_hash_one' 21 | ahash = "=0.8.6" 22 | solana-program = "=1.17.0" 23 | -------------------------------------------------------------------------------- /surf-for-type-safety/README.md: -------------------------------------------------------------------------------- 1 | # Full stack example to demonstrate Surf 2 | 3 | Surf is a type safe tool for Move contracts in TypeScript environment. [Learn more about Surf on the doc](https://aptos.dev/en/build/sdks/ts-sdk/type-safe-contract#what-is-surf). 4 | 5 | We built a simple message board contract that allows anyone to read and write message to the board. Note: message can be overwritten by anyone. It demonstrate how the type safety is provided by Surf. 6 | 7 | Demo contract deployed at https://explorer.aptoslabs.com/object/0xd01f58c69ccac6569e13a7cfdf68409d513c1492b3f13399a7ba3415dff36fa4?network=testnet. 8 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ThalaV2Interface/sources/pool.move: -------------------------------------------------------------------------------- 1 | module thala_swap_v2_interface_addr::pool { 2 | use aptos_framework::fungible_asset::{Metadata, MintRef, TransferRef, BurnRef}; 3 | use aptos_framework::object::{Object, ExtendRef}; 4 | 5 | struct Pool has key { 6 | extend_ref: ExtendRef, 7 | assets_metadata: vector>, 8 | pool_type: u8, 9 | swap_fee_bps: u64, 10 | locked: bool, 11 | lp_token_mint_ref: MintRef, 12 | lp_token_transfer_ref: TransferRef, 13 | lp_token_burn_ref: BurnRef 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/components/ui/warning-alert.tsx: -------------------------------------------------------------------------------- 1 | import { AlertOctagon } from "lucide-react"; 2 | import { FC, ReactNode } from "react"; 3 | import { Alert, AlertTitle, AlertDescription } from "./alert"; 4 | 5 | export const WarningAlert: FC<{ 6 | title: string; 7 | children?: ReactNode; 8 | }> = ({ title, children }) => { 9 | return ( 10 | 11 | 12 | {title} 13 | {children} 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/view-functions/accountBalance.ts: -------------------------------------------------------------------------------- 1 | import { aptosClient } from "@/utils/aptosClient"; 2 | 3 | export type AccountAPTBalanceArguments = { 4 | accountAddress: string; 5 | }; 6 | 7 | export const accountAPTBalance = async (args: AccountAPTBalanceArguments): Promise => { 8 | const { accountAddress } = args; 9 | const balance = await aptosClient().view<[number]>({ 10 | payload: { 11 | function: "0x1::coin::balance", 12 | typeArguments: ["0x1::aptos_coin::AptosCoin"], 13 | functionArguments: [accountAddress], 14 | }, 15 | }); 16 | return balance[0]; 17 | }; 18 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use crate::state::Registry; 2 | use anchor_lang::prelude::*; 3 | 4 | #[derive(Accounts)] 5 | pub struct Initialize<'info> { 6 | #[account(mut)] 7 | pub payer: Signer<'info>, 8 | #[account(init, payer = payer, space = 10000)] 9 | pub registry: Account<'info, Registry>, 10 | pub system_program: Program<'info, System>, 11 | } 12 | 13 | pub fn handle_initialize(ctx: Context) -> Result<()> { 14 | let registry = &mut ctx.accounts.registry; 15 | registry.tokens = Vec::new(); 16 | Ok(()) 17 | } 18 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = false 5 | skip-lint = false 6 | 7 | [programs.localnet] 8 | friend_tech = "GcdUTgTLJ5TFQpD5r2Da8ogVnSCr8XBpmUxYdU2nzdK" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Localnet" 15 | wallet = "~/.config/solana/id.json" 16 | 17 | [scripts] 18 | test = "../node_modules/.bin/nx run anchor:jest" 19 | 20 | [test] 21 | startup_wait = 5000 22 | shutdown_wait = 2000 23 | upgradeable = false 24 | 25 | [test.validator] 26 | bind_address = "127.0.0.1" 27 | ledger = ".anchor/test-ledger" 28 | rpc_port = 8899 29 | -------------------------------------------------------------------------------- /friend-tech/solana/web/app/react-query-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { ReactNode, useState } from 'react'; 4 | import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; 5 | import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; 6 | 7 | export function ReactQueryProvider({ children }: { children: ReactNode }) { 8 | const [client] = useState(new QueryClient()); 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /advanced-todo-list/README.MD: -------------------------------------------------------------------------------- 1 | # Advanced Todo List 2 | 3 | ## Overview 4 | 5 | Difference from simple todo list user can own multiple todo list contract. 6 | 7 | ## Aptos Specific Things 8 | 9 | Each user can have multiple todo lists, each todo list is stored under an object owned by the user, this is similar to PDA on Solana. 10 | 11 | ## Solana Specific Things 12 | 13 | Each todo list is a stored in a PDA account owned by the todo list contract, each user has a `UserTodoListCounter` struct in a regular account owned by the todo list contract. We use the counter as the seed to generate new PDA for new todo list of the user. 14 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/app/react-query-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { ReactNode, useState } from 'react'; 4 | import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; 5 | import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; 6 | 7 | export function ReactQueryProvider({ children }: { children: ReactNode }) { 8 | const [client] = useState(new QueryClient()); 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/components/ui/warning-alert.tsx: -------------------------------------------------------------------------------- 1 | import { AlertOctagon } from "lucide-react"; 2 | import { FC, ReactNode } from "react"; 3 | import { Alert, AlertTitle, AlertDescription } from "./alert"; 4 | 5 | export const WarningAlert: FC<{ 6 | title: string; 7 | children?: ReactNode; 8 | }> = ({ title, children }) => { 9 | return ( 10 | 11 | 12 | {title} 13 | {children} 14 | 15 | ); 16 | }; 17 | -------------------------------------------------------------------------------- /nft-launchpad/move/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "nft_launchpad" 3 | version = "1.0.0" 4 | authors = [] 5 | 6 | [addresses] 7 | launchpad_addr = "_" 8 | minter = "_" 9 | 10 | [dependencies] 11 | AptosFramework = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-framework" } 12 | AptosTokenObjects = { git = "https://github.com/aptos-labs/aptos-core.git", rev = "mainnet", subdir = "aptos-move/framework/aptos-token-objects" } 13 | TokenMinter = { git = "https://github.com/aptos-labs/token-minter.git", rev = "main", subdir = "token-minter" } 14 | 15 | [dev-dependencies] 16 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/app/react-query-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { ReactNode, useState } from 'react'; 4 | import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; 5 | import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; 6 | 7 | export function ReactQueryProvider({ children }: { children: ReactNode }) { 8 | const [client] = useState(new QueryClient()); 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/view-functions/accountBalance.ts: -------------------------------------------------------------------------------- 1 | import { aptosClient } from "@/utils/aptosClient"; 2 | 3 | export type AccountAPTBalanceArguments = { 4 | accountAddress: string; 5 | }; 6 | 7 | export const accountAPTBalance = async (args: AccountAPTBalanceArguments): Promise => { 8 | const { accountAddress } = args; 9 | const balance = await aptosClient().view<[number]>({ 10 | payload: { 11 | function: "0x1::coin::balance", 12 | typeArguments: ["0x1::aptos_coin::AptosCoin"], 13 | functionArguments: [accountAddress], 14 | }, 15 | }); 16 | return balance[0]; 17 | }; 18 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/app/react-query-provider.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import React, { ReactNode, useState } from 'react'; 4 | import { ReactQueryStreamedHydration } from '@tanstack/react-query-next-experimental'; 5 | import { QueryClientProvider, QueryClient } from '@tanstack/react-query'; 6 | 7 | export function ReactQueryProvider({ children }: { children: ReactNode }) { 8 | const [client] = useState(new QueryClient()); 9 | 10 | return ( 11 | 12 | {children} 13 | 14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = false 5 | skip-lint = false 6 | 7 | [programs.localnet] 8 | simple_todo_list = "AoFCssRtKUgXfhwb2T4F3jLenCZaSxmkAwrZAL9SQB9G" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Localnet" 15 | wallet = "~/.config/solana/id.json" 16 | 17 | [scripts] 18 | test = "../node_modules/.bin/nx run anchor:jest" 19 | 20 | [test] 21 | startup_wait = 5000 22 | shutdown_wait = 2000 23 | upgradeable = false 24 | 25 | [test.validator] 26 | bind_address = "127.0.0.1" 27 | ledger = ".anchor/test-ledger" 28 | rpc_port = 8899 29 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = false 5 | skip-lint = false 6 | 7 | [programs.localnet] 8 | advanced_todo_list = "CpdzsbyuX6ZpS37LqtN5qL4SXSz2LXzz7mckgYQupJ3V" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Localnet" 15 | wallet = "~/.config/solana/id.json" 16 | 17 | [scripts] 18 | test = "../node_modules/.bin/nx run anchor:jest" 19 | 20 | [test] 21 | startup_wait = 5000 22 | shutdown_wait = 2000 23 | upgradeable = false 24 | 25 | [test.validator] 26 | bind_address = "127.0.0.1" 27 | ledger = ".anchor/test-ledger" 28 | rpc_port = 8899 29 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/instructions/create_todo.rs: -------------------------------------------------------------------------------- 1 | use crate::state::{Todo, TodoList}; 2 | use anchor_lang::prelude::*; 3 | 4 | #[derive(Accounts)] 5 | pub struct CreateTodo<'info> { 6 | #[account(mut, has_one = owner)] 7 | pub todo_list: Account<'info, TodoList>, 8 | pub owner: Signer<'info>, 9 | } 10 | 11 | pub fn handle_create_todo(ctx: Context, content: String) -> Result<()> { 12 | let todo_list = &mut ctx.accounts.todo_list; 13 | let todo = Todo { 14 | content, 15 | completed: false, 16 | }; 17 | todo_list.todos.push(todo); 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/instructions/create_todo.rs: -------------------------------------------------------------------------------- 1 | use crate::state::{Todo, TodoList}; 2 | use anchor_lang::prelude::*; 3 | 4 | #[derive(Accounts)] 5 | pub struct CreateTodo<'info> { 6 | #[account(mut, has_one = owner)] 7 | pub todo_list: Account<'info, TodoList>, 8 | pub owner: Signer<'info>, 9 | } 10 | 11 | pub fn handle_create_todo(ctx: Context, content: String) -> Result<()> { 12 | let todo_list = &mut ctx.accounts.todo_list; 13 | let todo = Todo { 14 | content, 15 | completed: false, 16 | }; 17 | todo_list.todos.push(todo); 18 | Ok(()) 19 | } 20 | -------------------------------------------------------------------------------- /friend-tech/solana/web/components/account/account-list-feature.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useWallet } from '@solana/wallet-adapter-react'; 4 | import { WalletButton } from '../solana/solana-provider'; 5 | 6 | import { redirect } from 'next/navigation'; 7 | 8 | export default function AccountListFeature() { 9 | const { publicKey } = useWallet(); 10 | 11 | if (publicKey) { 12 | return redirect(`/account/${publicKey.toString()}`); 13 | } 14 | 15 | return ( 16 |
17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/ThalaV2RouterInterface/sources/router.move: -------------------------------------------------------------------------------- 1 | module thala_swap_v2_router_interface_addr::router { 2 | use aptos_framework::fungible_asset::Metadata; 3 | use aptos_framework::object::Object; 4 | 5 | use thala_swap_v2_interface_addr::pool::Pool; 6 | 7 | struct Notacoin {} 8 | 9 | public entry fun swap_exact_in_router_entry( 10 | sender: &signer, 11 | pools: vector>, 12 | arg2: vector>, 13 | from_amount: u64, 14 | from_fa: Object, 15 | min_received: u64 16 | ) { 17 | abort 0; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/components/ui/info.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip"; 3 | import { Info as InfoIcon } from "lucide-react"; 4 | 5 | export interface InfoProps { 6 | description: string; 7 | } 8 | 9 | export const Info: React.FC = ({ description }) => { 10 | return ( 11 | 12 | 13 | 14 | 15 | 16 | 17 |

{description}

18 |
19 |
20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/components/UploadSpinner.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | 3 | import { cn } from "@/lib/utils"; 4 | import { Spinner } from "@/components/ui/spinner"; 5 | 6 | export const UploadSpinner: FC<{ on: boolean }> = ({ on }) => { 7 | return ( 8 |
14 |

Uploading Files...

15 | 16 |
17 | ); 18 | }; 19 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/components/account/account-list-feature.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useWallet } from '@solana/wallet-adapter-react'; 4 | import { WalletButton } from '../solana/solana-provider'; 5 | 6 | import { redirect } from 'next/navigation'; 7 | 8 | export default function AccountListFeature() { 9 | const { publicKey } = useWallet(); 10 | 11 | if (publicKey) { 12 | return redirect(`/account/${publicKey.toString()}`); 13 | } 14 | 15 | return ( 16 |
17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/components/account/account-list-feature.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useWallet } from '@solana/wallet-adapter-react'; 4 | import { WalletButton } from '../solana/solana-provider'; 5 | 6 | import { redirect } from 'next/navigation'; 7 | 8 | export default function AccountListFeature() { 9 | const { publicKey } = useWallet(); 10 | 11 | if (publicKey) { 12 | return redirect(`/account/${publicKey.toString()}`); 13 | } 14 | 15 | return ( 16 |
17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/main.tsx: -------------------------------------------------------------------------------- 1 | import "./index.css"; 2 | 3 | import React from "react"; 4 | import ReactDOM from "react-dom/client"; 5 | 6 | import App from "@/App.tsx"; 7 | // Internal components 8 | import { Toaster } from "@/components/ui/toaster.tsx"; 9 | import { WalletProvider } from "@/components/WalletProvider.tsx"; 10 | import { WrongNetworkAlert } from "@/components/WrongNetworkAlert"; 11 | 12 | ReactDOM.createRoot(document.getElementById("root")!).render( 13 | 14 | 15 | 16 | 17 | 18 | 19 | , 20 | ); 21 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/components/ui/info.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Tooltip, TooltipContent, TooltipTrigger } from "./tooltip"; 3 | import { Info as InfoIcon } from "lucide-react"; 4 | 5 | export interface InfoProps { 6 | description: string; 7 | } 8 | 9 | export const Info: React.FC = ({ description }) => { 10 | return ( 11 | 12 | 13 | 14 | 15 | 16 | 17 |

{description}

18 |
19 |
20 | ); 21 | }; 22 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/components/account/account-list-feature.tsx: -------------------------------------------------------------------------------- 1 | 'use client'; 2 | 3 | import { useWallet } from '@solana/wallet-adapter-react'; 4 | import { WalletButton } from '../solana/solana-provider'; 5 | 6 | import { redirect } from 'next/navigation'; 7 | 8 | export default function AccountListFeature() { 9 | const { publicKey } = useWallet(); 10 | 11 | if (publicKey) { 12 | return redirect(`/account/${publicKey.toString()}`); 13 | } 14 | 15 | return ( 16 |
17 |
18 | 19 |
20 |
21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /surf-for-type-safety/frontend/main.tsx: -------------------------------------------------------------------------------- 1 | import "./index.css"; 2 | 3 | import React from "react"; 4 | import ReactDOM from "react-dom/client"; 5 | 6 | import App from "@/App.tsx"; 7 | // Internal components 8 | import { Toaster } from "@/components/ui/toaster.tsx"; 9 | import { WalletProvider } from "@/components/WalletProvider.tsx"; 10 | import { WrongNetworkAlert } from "@/components/WrongNetworkAlert"; 11 | 12 | ReactDOM.createRoot(document.getElementById("root")!).render( 13 | 14 | 15 | 16 | 17 | 18 | 19 | , 20 | ); 21 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 2 | import { createSurfClient } from "@thalalabs/surf"; 3 | 4 | import { NETWORK } from "@/constants"; 5 | import { ABI } from "@/utils/abi"; 6 | 7 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 8 | const surf = createSurfClient(aptos).useABI(ABI); 9 | 10 | // Reuse same Aptos instance to utilize cookie based sticky routing 11 | export function aptosClient() { 12 | return aptos; 13 | } 14 | 15 | // Reuse same Surf instance to utilize cookie based sticky routing 16 | export function surfClient() { 17 | return surf; 18 | } 19 | -------------------------------------------------------------------------------- /friend-tech/aptos/frontend/components/ui/info.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react"; 2 | import { Info as InfoIcon } from "lucide-react"; 3 | 4 | import { Tooltip, TooltipContent, TooltipTrigger } from "@/components/ui/tooltip"; 5 | 6 | export interface InfoProps { 7 | description: string; 8 | } 9 | 10 | export const Info: React.FC = ({ description }) => { 11 | return ( 12 | 13 | 14 | 15 | 16 | 17 | 18 |

{description}

19 |
20 |
21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/frontend/utils/aptosClient.ts: -------------------------------------------------------------------------------- 1 | import { Aptos, AptosConfig } from "@aptos-labs/ts-sdk"; 2 | import { createSurfClient } from "@thalalabs/surf"; 3 | 4 | import { NETWORK } from "@/constants"; 5 | import { ABI } from "@/utils/abi"; 6 | 7 | const aptos = new Aptos(new AptosConfig({ network: NETWORK })); 8 | const surf = createSurfClient(aptos).useABI(ABI); 9 | 10 | // Reuse same Aptos instance to utilize cookie based sticky routing 11 | export function aptosClient() { 12 | return aptos; 13 | } 14 | 15 | // Reuse same Surf instance to utilize cookie based sticky routing 16 | export function surfClient() { 17 | return surf; 18 | } 19 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "target": "es2017", 4 | "parser": { 5 | "syntax": "typescript", 6 | "decorators": true, 7 | "dynamicImport": true 8 | }, 9 | "transform": { 10 | "decoratorMetadata": true, 11 | "legacyDecorator": true 12 | }, 13 | "keepClassNames": true, 14 | "externalHelpers": true, 15 | "loose": true 16 | }, 17 | "module": { 18 | "type": "es6" 19 | }, 20 | "sourceMaps": true, 21 | "exclude": [ 22 | "jest.config.ts", 23 | ".*\\.spec.tsx?$", 24 | ".*\\.test.tsx?$", 25 | "./src/jest-setup.ts$", 26 | "./**/jest-setup.ts$", 27 | ".*.js$" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /friend-tech/solana/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "importHelpers": true, 11 | "target": "es2015", 12 | "module": "esnext", 13 | "lib": ["es2020", "dom"], 14 | "skipLibCheck": true, 15 | "skipDefaultLibCheck": true, 16 | "baseUrl": ".", 17 | "paths": { 18 | "@/*": ["./web/*"], 19 | "@friend-tech/anchor": ["anchor/src/index.ts"] 20 | } 21 | }, 22 | "exclude": ["node_modules", "tmp"] 23 | } 24 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "launchpad" 3 | version = "0.1.0" 4 | description = "Created with Anchor" 5 | edition = "2021" 6 | 7 | [lib] 8 | crate-type = ["cdylib", "lib"] 9 | name = "launchpad" 10 | 11 | [features] 12 | no-entrypoint = [] 13 | no-idl = [] 14 | no-log-ix-name = [] 15 | cpi = ["no-entrypoint"] 16 | default = [] 17 | 18 | [dependencies] 19 | anchor-lang = { version = "0.29.0", features = ["init-if-needed"] } 20 | # # fix error: use of unstable library feature 'build_hasher_simple_hash_one' 21 | ahash = "=0.8.6" 22 | solana-program = "=1.17.0" 23 | anchor-spl = { version = "0.29.0", features = ["metadata"] } 24 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/components/ListedNfts.tsx: -------------------------------------------------------------------------------- 1 | import { useGetAllListedNfts } from "@/hooks/useGetAllListedNfts"; 2 | import { SimpleGrid } from "@chakra-ui/react"; 3 | import { NftCard } from "./NftCard"; 4 | import { Buy } from "./Buy"; 5 | 6 | export const ListedNfts = () => { 7 | const listedNfts = useGetAllListedNfts(); 8 | 9 | return listedNfts ? ( 10 | 11 | {listedNfts.map((nft) => { 12 | return ( 13 | 14 | 15 | 16 | ); 17 | })} 18 | 19 | ) : ( 20 | <> 21 | ); 22 | }; 23 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "target": "es2017", 4 | "parser": { 5 | "syntax": "typescript", 6 | "decorators": true, 7 | "dynamicImport": true 8 | }, 9 | "transform": { 10 | "decoratorMetadata": true, 11 | "legacyDecorator": true 12 | }, 13 | "keepClassNames": true, 14 | "externalHelpers": true, 15 | "loose": true 16 | }, 17 | "module": { 18 | "type": "es6" 19 | }, 20 | "sourceMaps": true, 21 | "exclude": [ 22 | "jest.config.ts", 23 | ".*\\.spec.tsx?$", 24 | ".*\\.test.tsx?$", 25 | "./src/jest-setup.ts$", 26 | "./**/jest-setup.ts$", 27 | ".*.js$" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/programs/simple-todo-list/src/instructions/create_todo_list.rs: -------------------------------------------------------------------------------- 1 | use crate::state::TodoList; 2 | use anchor_lang::prelude::*; 3 | 4 | #[derive(Accounts)] 5 | pub struct CreateTodoList<'info> { 6 | #[account(init, payer = user, space = 10240)] 7 | pub todo_list: Account<'info, TodoList>, 8 | #[account(mut)] 9 | pub user: Signer<'info>, 10 | pub system_program: Program<'info, System>, 11 | } 12 | 13 | pub fn handle_create_todo_list(ctx: Context) -> Result<()> { 14 | let todo_list = &mut ctx.accounts.todo_list; 15 | todo_list.owner = *ctx.accounts.user.key; 16 | todo_list.todos = Vec::new(); 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "target": "es2017", 4 | "parser": { 5 | "syntax": "typescript", 6 | "decorators": true, 7 | "dynamicImport": true 8 | }, 9 | "transform": { 10 | "decoratorMetadata": true, 11 | "legacyDecorator": true 12 | }, 13 | "keepClassNames": true, 14 | "externalHelpers": true, 15 | "loose": true 16 | }, 17 | "module": { 18 | "type": "es6" 19 | }, 20 | "sourceMaps": true, 21 | "exclude": [ 22 | "jest.config.ts", 23 | ".*\\.spec.tsx?$", 24 | ".*\\.test.tsx?$", 25 | "./src/jest-setup.ts$", 26 | "./**/jest-setup.ts$", 27 | ".*.js$" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "importHelpers": true, 11 | "target": "es2015", 12 | "module": "esnext", 13 | "lib": ["es2020", "dom"], 14 | "skipLibCheck": true, 15 | "skipDefaultLibCheck": true, 16 | "baseUrl": ".", 17 | "paths": { 18 | "@/*": ["./web/*"], 19 | "@advanced-todo-list/anchor": ["anchor/src/index.ts"] 20 | } 21 | }, 22 | "exclude": ["node_modules", "tmp"] 23 | } 24 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "importHelpers": true, 11 | "target": "es2015", 12 | "module": "esnext", 13 | "lib": ["es2020", "dom"], 14 | "skipLibCheck": true, 15 | "skipDefaultLibCheck": true, 16 | "baseUrl": ".", 17 | "paths": { 18 | "@/*": ["./web/*"], 19 | "@launchpad/anchor": ["anchor/src/index.ts"] 20 | } 21 | }, 22 | "exclude": ["node_modules", "tmp"] 23 | } 24 | -------------------------------------------------------------------------------- /simple-todo-list/solana/tsconfig.base.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "rootDir": ".", 5 | "sourceMap": true, 6 | "declaration": false, 7 | "moduleResolution": "node", 8 | "emitDecoratorMetadata": true, 9 | "experimentalDecorators": true, 10 | "importHelpers": true, 11 | "target": "es2015", 12 | "module": "esnext", 13 | "lib": ["es2020", "dom"], 14 | "skipLibCheck": true, 15 | "skipDefaultLibCheck": true, 16 | "baseUrl": ".", 17 | "paths": { 18 | "@/*": ["./web/*"], 19 | "@simple-todo-list/anchor": ["anchor/src/index.ts"] 20 | } 21 | }, 22 | "exclude": ["node_modules", "tmp"] 23 | } 24 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/programs/friend-tech/src/instructions/initialize.rs: -------------------------------------------------------------------------------- 1 | use crate::state::Config; 2 | use anchor_lang::prelude::*; 3 | 4 | #[derive(Accounts)] 5 | pub struct Initialize<'info> { 6 | #[account(init, seeds = [b"config"], bump, payer = signer, space = std::mem::size_of::< Config > () + 8)] 7 | pub config: Account<'info, Config>, 8 | /// Solana Stuff 9 | #[account(mut)] 10 | pub signer: Signer<'info>, 11 | pub system_program: Program<'info, System>, 12 | pub rent: Sysvar<'info, Rent>, 13 | } 14 | 15 | pub fn handle_initialize(ctx: Context) -> Result<()> { 16 | ctx.accounts.config.admin = ctx.accounts.signer.key(); 17 | Ok(()) 18 | } 19 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/.swcrc: -------------------------------------------------------------------------------- 1 | { 2 | "jsc": { 3 | "target": "es2017", 4 | "parser": { 5 | "syntax": "typescript", 6 | "decorators": true, 7 | "dynamicImport": true 8 | }, 9 | "transform": { 10 | "decoratorMetadata": true, 11 | "legacyDecorator": true 12 | }, 13 | "keepClassNames": true, 14 | "externalHelpers": true, 15 | "loose": true 16 | }, 17 | "module": { 18 | "type": "es6" 19 | }, 20 | "sourceMaps": true, 21 | "exclude": [ 22 | "jest.config.ts", 23 | ".*\\.spec.tsx?$", 24 | ".*\\.test.tsx?$", 25 | "./src/jest-setup.ts$", 26 | "./**/jest-setup.ts$", 27 | ".*.js$" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/components/UploadSpinner.tsx: -------------------------------------------------------------------------------- 1 | import { FC } from "react"; 2 | // Internal utils 3 | import { cn } from "@/lib/utils"; 4 | // Internal components 5 | import { Spinner } from "@/components/ui/spinner"; 6 | 7 | export const UploadSpinner: FC<{ on: boolean }> = ({ on }) => { 8 | return ( 9 |
15 |

Uploading Files...

16 | 17 |
18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import type { Metadata } from "next"; 2 | import { Providers } from "./provider"; 3 | import { ReactNode } from "react"; 4 | import { NavBar } from "@/components/Navbar"; 5 | import Page from "@/components/Page"; 6 | 7 | export const metadata: Metadata = { 8 | title: "NFT Marketplace", 9 | description: "NFT Marketplace for Aptogotchi Collection", 10 | }; 11 | 12 | export default function RootLayout({ children }: { children: ReactNode }) { 13 | return ( 14 | 15 | 16 | 17 | 18 | {children} 19 | 20 | 21 | 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "lib": ["dom", "dom.iterable", "esnext"], 4 | "allowJs": true, 5 | "skipLibCheck": true, 6 | "strict": true, 7 | "noEmit": true, 8 | "esModuleInterop": true, 9 | "module": "esnext", 10 | "moduleResolution": "bundler", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "jsx": "preserve", 14 | "incremental": true, 15 | "plugins": [ 16 | { 17 | "name": "next" 18 | } 19 | ], 20 | "paths": { 21 | "@/*": ["./src/*"] 22 | } 23 | }, 24 | "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], 25 | "exclude": ["node_modules"] 26 | } 27 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/scripts/move/compile.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const fs = require("node:fs"); 3 | const yaml = require("js-yaml"); 4 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 5 | 6 | const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8")); 7 | const accountAddress = config["profiles"][`${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`]["account"]; 8 | 9 | async function compile() { 10 | const move = new cli.Move(); 11 | 12 | await move.compile({ 13 | packageDirectoryPath: "move", 14 | namedAddresses: { 15 | // Publish module to account address 16 | launchpad_addr: accountAddress, 17 | }, 18 | }); 19 | } 20 | compile(); 21 | -------------------------------------------------------------------------------- /nft-launchpad/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | Aptos Digital Asset 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/scripts/move/compile.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const fs = require("node:fs"); 3 | const yaml = require("js-yaml"); 4 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 5 | 6 | const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8")); 7 | const accountAddress = config["profiles"][`${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`]["account"]; 8 | 9 | async function compile() { 10 | const move = new cli.Move(); 11 | 12 | await move.compile({ 13 | packageDirectoryPath: "move", 14 | namedAddresses: { 15 | // Compile module with account address 16 | counter_app_addr: accountAddress, 17 | }, 18 | }); 19 | } 20 | compile(); 21 | -------------------------------------------------------------------------------- /friend-tech/aptos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | Aptos Fungible Asset 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /friend-tech/solana/anchor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | }, 17 | { 18 | "files": ["*.json"], 19 | "parser": "jsonc-eslint-parser", 20 | "rules": { 21 | "@nx/dependency-checks": [ 22 | "error", 23 | { 24 | "ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] 25 | } 26 | ] 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /fungible-asset-with-permission/move/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | PUBLISHER_ADDR=0x$(aptos config show-profiles --profile=$PUBLISHER_PROFILE | grep 'account' | sed -n 's/.*"account": \"\(.*\)\".*/\1/p') 12 | 13 | CONTRACT_ADDRESS=$(cat contract_address.txt) 14 | 15 | aptos move upgrade-object-package \ 16 | --object-address $CONTRACT_ADDRESS \ 17 | --named-addresses permissioned_fa_addr=$CONTRACT_ADDRESS \ 18 | --profile $PUBLISHER_PROFILE \ 19 | --assume-yes 20 | -------------------------------------------------------------------------------- /surf-for-type-safety/scripts/move/compile.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const fs = require("node:fs"); 3 | const yaml = require("js-yaml"); 4 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 5 | 6 | const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8")); 7 | const accountAddress = 8 | config["profiles"][`${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`]["account"]; 9 | 10 | async function compile() { 11 | 12 | const move = new cli.Move(); 13 | 14 | await move.compile({ 15 | packageDirectoryPath: "move", 16 | namedAddresses: { 17 | // Compile module with account address 18 | message_board_addr: accountAddress, 19 | }, 20 | }); 21 | } 22 | compile(); 23 | -------------------------------------------------------------------------------- /simple-todo-list/solana/anchor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | }, 17 | { 18 | "files": ["*.json"], 19 | "parser": "jsonc-eslint-parser", 20 | "rules": { 21 | "@nx/dependency-checks": [ 22 | "error", 23 | { 24 | "ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] 25 | } 26 | ] 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /surf-for-type-safety/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | Aptos Fungible Asset 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | }, 17 | { 18 | "files": ["*.json"], 19 | "parser": "jsonc-eslint-parser", 20 | "rules": { 21 | "@nx/dependency-checks": [ 22 | "error", 23 | { 24 | "ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] 25 | } 26 | ] 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/scripts/move/compile.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const fs = require("node:fs"); 3 | const yaml = require("js-yaml"); 4 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 5 | 6 | const config = yaml.load(fs.readFileSync("./.aptos/config.yaml", "utf8")); 7 | const accountAddress = config["profiles"][`${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`]["account"]; 8 | 9 | async function compile() { 10 | const move = new cli.Move(); 11 | 12 | await move.compile({ 13 | packageDirectoryPath: "move", 14 | namedAddresses: { 15 | // Compile module with account address 16 | counter_app_addr: accountAddress, 17 | }, 18 | }); 19 | } 20 | compile(); 21 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | Aptos Fungible Asset 14 | 15 | 16 |
17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": ["../.eslintrc.json"], 3 | "ignorePatterns": ["!**/*"], 4 | "overrides": [ 5 | { 6 | "files": ["*.ts", "*.tsx", "*.js", "*.jsx"], 7 | "rules": {} 8 | }, 9 | { 10 | "files": ["*.ts", "*.tsx"], 11 | "rules": {} 12 | }, 13 | { 14 | "files": ["*.js", "*.jsx"], 15 | "rules": {} 16 | }, 17 | { 18 | "files": ["*.json"], 19 | "parser": "jsonc-eslint-parser", 20 | "rules": { 21 | "@nx/dependency-checks": [ 22 | "error", 23 | { 24 | "ignoredFiles": ["{projectRoot}/rollup.config.{js,ts,mjs,mts}"] 25 | } 26 | ] 27 | } 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/sh_scripts/complete_all_todos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running move script to complete all todos in 1 tx #####" 6 | 7 | CONTRACT_ADDRESS=$(cat contract_address.txt) 8 | 9 | # Need to compile the package first 10 | aptos move compile \ 11 | --named-addresses simple_todo_list_addr=$CONTRACT_ADDRESS 12 | 13 | # Profile is the account you used to execute transaction 14 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 15 | SENDER_PROFILE=testnet-profile-1 16 | 17 | # Run the script 18 | aptos move run-script \ 19 | --assume-yes \ 20 | --profile $SENDER_PROFILE \ 21 | --compiled-script-path build/simple-todo-list/bytecode_scripts/complete_all_todos.mv 22 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/sources/math/i32.move: -------------------------------------------------------------------------------- 1 | module hyperion_interface_addr::i32 { 2 | const EOverflow: u64 = 0; 3 | 4 | const MIN_AS_U32: u32 = 1 << 31; 5 | const MAX_AS_U32: u32 = 0x7fffffff; 6 | 7 | const LT: u8 = 0; 8 | const EQ: u8 = 1; 9 | const GT: u8 = 2; 10 | 11 | struct I32 has copy, drop, store { 12 | bits: u32 13 | } 14 | 15 | struct I32_RES has copy, drop { 16 | sign: bool, 17 | value: u32 18 | } 19 | 20 | public fun zero(): I32 { 21 | I32 { bits: 0 } 22 | } 23 | 24 | public fun as_u32(_v: I32): u32 { 25 | 0 26 | } 27 | 28 | public fun from_u32(v: u32): I32 { 29 | I32 { bits: v } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/frontend/entry-functions/mint_asset.ts: -------------------------------------------------------------------------------- 1 | import { InputTransactionData } from "@aptos-labs/wallet-adapter-react"; 2 | // Internal utils 3 | import { convertAmountFromHumanReadableToOnChain } from "@/utils/helpers"; 4 | 5 | export type MintAssetArguments = { 6 | assetType: string; 7 | amount: number; 8 | decimals: number; 9 | }; 10 | 11 | export const mintAsset = (args: MintAssetArguments): InputTransactionData => { 12 | const { assetType, amount, decimals } = args; 13 | return { 14 | data: { 15 | function: `${import.meta.env.VITE_MODULE_ADDRESS}::launchpad::mint_fa`, 16 | typeArguments: [], 17 | functionArguments: [assetType, convertAmountFromHumanReadableToOnChain(amount, decimals)], 18 | }, 19 | }; 20 | }; 21 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/Anchor.toml: -------------------------------------------------------------------------------- 1 | [toolchain] 2 | 3 | [features] 4 | seeds = false 5 | skip-lint = false 6 | 7 | [programs.localnet] 8 | launchpad = "7kUij7HeYodZGUGB1d1TQpHC3gxUqf4t6NQBf3QjVpru" 9 | 10 | [registry] 11 | url = "https://api.apr.dev" 12 | 13 | [provider] 14 | cluster = "Localnet" 15 | wallet = "~/.config/solana/id.json" 16 | 17 | [scripts] 18 | test = "../node_modules/.bin/nx run anchor:jest" 19 | 20 | [test] 21 | startup_wait = 5000 22 | shutdown_wait = 2000 23 | upgradeable = false 24 | 25 | [test.validator] 26 | bind_address = "127.0.0.1" 27 | ledger = ".anchor/test-ledger" 28 | rpc_port = 8899 29 | url = "https://api.mainnet-beta.solana.com" 30 | 31 | [[test.validator.clone]] 32 | address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" 33 | -------------------------------------------------------------------------------- /nft-marketplace/frontend/src/hooks/useGetAllNfts.tsx: -------------------------------------------------------------------------------- 1 | import { getAllAptogotchis, getAptogotchi } from "@/utils/aptos"; 2 | import { AptogotchiWithTraits } from "@/utils/types"; 3 | import { useEffect, useState } from "react"; 4 | 5 | export const useGetAllNfts = () => { 6 | const [nfts, setNfts] = useState(); 7 | useEffect(() => { 8 | getAllAptogotchis().then(async (res) => { 9 | const aptogotchiWithTraits = []; 10 | for (const aptogotchi of res) { 11 | const [_, traits] = await getAptogotchi(aptogotchi.address); 12 | aptogotchiWithTraits.push({ 13 | ...aptogotchi, 14 | ...traits, 15 | }); 16 | } 17 | setNfts(aptogotchiWithTraits); 18 | }); 19 | }, []); 20 | return nfts; 21 | }; 22 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/HyperionInterface/sources/math/swap_math.move: -------------------------------------------------------------------------------- 1 | module hyperion_interface_addr::swap_math { 2 | use hyperion_interface_addr::i32::{I32}; 3 | 4 | public fun get_amount_by_liquidity( 5 | _tick_lower: I32, 6 | _tick_upper: I32, 7 | _current_tick_index: I32, 8 | _current_sqrt_price: u128, 9 | _liquidity: u128, 10 | _round_up: bool 11 | ): (u64, u64) { 12 | (0, 0) 13 | } 14 | 15 | public fun get_liquidity_by_amount( 16 | _lower_index: I32, 17 | _upper_index: I32, 18 | _current_tick_index: I32, 19 | _current_sqrt_price: u128, 20 | _amount: u64, 21 | _is_fixed_a: bool 22 | ): (u128, u64, u64) { 23 | (0, 0, 0) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /multidex-router/move/third_party_dependencies/PancakeSwap/Move.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "PancakeSwap" 3 | version = "0.0.1" 4 | 5 | [dependencies] 6 | AptosFramework = {git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-framework/", rev = "mainnet"} 7 | AptosStdlib = {git = "https://github.com/aptos-labs/aptos-core.git", subdir = "aptos-move/framework/aptos-stdlib/", rev = "mainnet"} 8 | 9 | [addresses] 10 | pancake = "c7efb4076dbe143cbcd98cfaaa929ecfc8f299203dfff63b95ccb6bfe19850fa" 11 | dev = "0f9d24010ad96659ee980598ff3848911253bda014e8fe59ce40e9eed9f6585a" 12 | zero = "0000000000000000000000000000000000000000000000000000000000000000" 13 | default_admin = "a2c656b06aeff1406fd5ff837fa5b07825437a5f1ce6d75cad3f4e5c39ea955b" 14 | test_coin = "0x16" 15 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/sh_scripts/complete_all_todos_in_latest_todo_list.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running move script to complete all todos in 1 tx #####" 6 | 7 | CONTRACT_ADDRESS=$(cat contract_address.txt) 8 | 9 | # Need to compile the package first 10 | aptos move compile \ 11 | --named-addresses advanced_todo_list_addr=$CONTRACT_ADDRESS 12 | 13 | # Profile is the account you used to execute transaction 14 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 15 | SENDER_PROFILE=testnet-profile-1 16 | 17 | # Run the script 18 | aptos move run-script \ 19 | --assume-yes \ 20 | --profile $SENDER_PROFILE \ 21 | --compiled-script-path build/advanced-todo-list/bytecode_scripts/complete_all_todos_in_latest_todo_list.mv 22 | -------------------------------------------------------------------------------- /friend-tech/aptos/scripts/move/issue_share_and_buy_share.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | const packageName = "AptosFriend"; 5 | const scriptName = "issue_share_and_buy_share"; 6 | 7 | async function issueAndBuyShare() { 8 | if (!process.env.VITE_MODULE_ADDRESS) { 9 | throw new Error( 10 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before running this Move script", 11 | ); 12 | } 13 | 14 | const move = new cli.Move(); 15 | 16 | move.runScript({ 17 | compiledScriptPath: `move/build/${packageName}/bytecode_scripts/${scriptName}.mv`, 18 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 19 | }); 20 | } 21 | issueAndBuyShare(); 22 | -------------------------------------------------------------------------------- /fungible-asset-with-buy-sell-tax/move/FungibleAssetWithBuySellTax/sh_scripts/upgrade.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Upgrade module #####" 6 | 7 | # Profile is the account you used to execute transaction 8 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 9 | PUBLISHER_PROFILE=testnet-profile-1 10 | 11 | PUBLISHER_ADDR=0x$(aptos config show-profiles --profile=$PUBLISHER_PROFILE | grep 'account' | sed -n 's/.*"account": \"\(.*\)\".*/\1/p') 12 | 13 | CONTRACT_ADDRESS=$(cat contract_address.txt) 14 | 15 | aptos move upgrade-object-package \ 16 | --object-address $CONTRACT_ADDRESS \ 17 | --named-addresses taxed_fa_addr=$CONTRACT_ADDRESS,tfa_recipient_addr=$PUBLISHER_ADDR \ 18 | --profile $PUBLISHER_PROFILE \ 19 | --assume-yes 20 | -------------------------------------------------------------------------------- /friend-tech/aptos/scripts/move/upgrade.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | async function publish() { 5 | if (!process.env.VITE_MODULE_ADDRESS) { 6 | throw new Error( 7 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before upgrading it", 8 | ); 9 | } 10 | 11 | const move = new cli.Move(); 12 | 13 | move.upgradeObjectPackage({ 14 | packageDirectoryPath: "move", 15 | objectAddress: process.env.VITE_MODULE_ADDRESS, 16 | namedAddresses: { 17 | // Upgrade module from an object 18 | aptos_friend_addr: process.env.VITE_MODULE_ADDRESS, 19 | }, 20 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 21 | }); 22 | } 23 | publish(); 24 | -------------------------------------------------------------------------------- /advanced-todo-list/aptos/move/sh_scripts/create_todo_list_and_todos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running move script to create a todo list under a new object owned by sender and todos in 1 tx #####" 6 | 7 | CONTRACT_ADDRESS=$(cat contract_address.txt) 8 | 9 | # Need to compile the package first 10 | aptos move compile \ 11 | --named-addresses advanced_todo_list_addr=$CONTRACT_ADDRESS 12 | 13 | # Profile is the account you used to execute transaction 14 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 15 | SENDER_PROFILE=testnet-profile-1 16 | 17 | # Run the script 18 | aptos move run-script \ 19 | --assume-yes \ 20 | --profile $SENDER_PROFILE \ 21 | --compiled-script-path build/advanced-todo-list/bytecode_scripts/create_todo_list_and_todos.mv 22 | -------------------------------------------------------------------------------- /friend-tech/aptos/scripts/move/get_abi.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const axios = require("axios"); 3 | const fs = require("node:fs"); 4 | 5 | const moduleName = "aptos_friend"; 6 | 7 | const url = `https://fullnode.${process.env.VITE_APP_NETWORK}.aptoslabs.com/v1/accounts/${process.env.VITE_MODULE_ADDRESS}/module/${moduleName}`; 8 | 9 | async function getAbi() { 10 | axios 11 | .get(url) 12 | .then((response) => { 13 | const abi = response.data.abi; 14 | const abiString = `export const ABI = ${JSON.stringify(abi)} as const;`; 15 | fs.writeFileSync("frontend/utils/abi.ts", abiString); 16 | console.log("ABI saved to frontend/utils/abi.ts"); 17 | }) 18 | .catch((error) => { 19 | console.error("Error fetching ABI:", error); 20 | }); 21 | } 22 | 23 | getAbi(); 24 | -------------------------------------------------------------------------------- /surf-for-type-safety/scripts/move/upgrade.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | async function publish() { 5 | if (!process.env.VITE_MODULE_ADDRESS) { 6 | throw new Error( 7 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before upgrading it", 8 | ); 9 | } 10 | 11 | const move = new cli.Move(); 12 | 13 | move.upgradeObjectPackage({ 14 | packageDirectoryPath: "move", 15 | objectAddress: process.env.VITE_MODULE_ADDRESS, 16 | namedAddresses: { 17 | // Upgrade module from an object 18 | message_board_addr: process.env.VITE_MODULE_ADDRESS, 19 | }, 20 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 21 | }); 22 | } 23 | publish(); 24 | -------------------------------------------------------------------------------- /friend-tech/aptos/move/scripts/issue_share_and_buy_share.move: -------------------------------------------------------------------------------- 1 | script { 2 | use std::signer; 3 | use std::string; 4 | 5 | use aptos_friend_addr::aptos_friend; 6 | 7 | // This Move script runs atomically, i.e. it issues a share and buys some of it in the same transaction. 8 | // Move script is how we batch multiple function calls in 1 tx, similar to Solana allows multiple instructions in 1 tx 9 | fun issue_share_and_buy_share(sender: &signer) { 10 | let sender_addr = signer::address_of(sender); 11 | // issue my share 12 | aptos_friend::issue_share(sender, string::utf8(b"user_1")); 13 | let issuer_obj = aptos_friend::get_issuer_obj(sender_addr); 14 | // buy 10 shares of my own share 15 | aptos_friend::buy_share(sender, issuer_obj, 10); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /friend-tech/solana/web/next.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const { composePlugins, withNx } = require('@nx/next'); 5 | 6 | /** 7 | * @type {import('@nx/next/plugins/with-nx').WithNxOptions} 8 | **/ 9 | const nextConfig = { 10 | webpack: (config) => { 11 | config.externals = [ 12 | ...(config.externals || []), 13 | 'bigint', 14 | 'node-gyp-build', 15 | ]; 16 | return config; 17 | }, 18 | nx: { 19 | // Set this to true if you would like to use SVGR 20 | // See: https://github.com/gregberge/svgr 21 | svgr: false, 22 | }, 23 | }; 24 | 25 | const plugins = [ 26 | // Add more Next.js plugins to this list if needed. 27 | withNx, 28 | ]; 29 | 30 | module.exports = composePlugins(...plugins)(nextConfig); 31 | -------------------------------------------------------------------------------- /nft-launchpad/frontend/components/WalletProvider.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from "react"; 2 | import { AptosWalletAdapterProvider } from "@aptos-labs/wallet-adapter-react"; 3 | 4 | import { useToast } from "@/components/ui/use-toast"; 5 | import { NETWORK } from "@/constants"; 6 | 7 | export function WalletProvider({ children }: PropsWithChildren) { 8 | const { toast } = useToast(); 9 | 10 | return ( 11 | { 15 | toast({ 16 | variant: "destructive", 17 | title: "Error", 18 | description: error || "Unknown wallet error", 19 | }); 20 | }} 21 | > 22 | {children} 23 | 24 | ); 25 | } 26 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | My Aptos Dapp 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /telegram-boilerplate-template/scripts/move/upgrade.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | async function publish() { 5 | if (!process.env.VITE_MODULE_ADDRESS) { 6 | throw new Error( 7 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before upgrading it", 8 | ); 9 | } 10 | 11 | const move = new cli.Move(); 12 | 13 | move.upgradeObjectPackage({ 14 | packageDirectoryPath: "move", 15 | objectAddress: process.env.VITE_MODULE_ADDRESS, 16 | namedAddresses: { 17 | // Upgrade module from an object 18 | counter_app_addr: process.env.VITE_MODULE_ADDRESS, 19 | }, 20 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 21 | }); 22 | } 23 | publish(); 24 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/web/next.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const { composePlugins, withNx } = require('@nx/next'); 5 | 6 | /** 7 | * @type {import('@nx/next/plugins/with-nx').WithNxOptions} 8 | **/ 9 | const nextConfig = { 10 | webpack: (config) => { 11 | config.externals = [ 12 | ...(config.externals || []), 13 | 'bigint', 14 | 'node-gyp-build', 15 | ]; 16 | return config; 17 | }, 18 | nx: { 19 | // Set this to true if you would like to use SVGR 20 | // See: https://github.com/gregberge/svgr 21 | svgr: false, 22 | }, 23 | }; 24 | 25 | const plugins = [ 26 | // Add more Next.js plugins to this list if needed. 27 | withNx, 28 | ]; 29 | 30 | module.exports = composePlugins(...plugins)(nextConfig); 31 | -------------------------------------------------------------------------------- /simple-todo-list/solana/web/next.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const { composePlugins, withNx } = require('@nx/next'); 5 | 6 | /** 7 | * @type {import('@nx/next/plugins/with-nx').WithNxOptions} 8 | **/ 9 | const nextConfig = { 10 | webpack: (config) => { 11 | config.externals = [ 12 | ...(config.externals || []), 13 | 'bigint', 14 | 'node-gyp-build', 15 | ]; 16 | return config; 17 | }, 18 | nx: { 19 | // Set this to true if you would like to use SVGR 20 | // See: https://github.com/gregberge/svgr 21 | svgr: false, 22 | }, 23 | }; 24 | 25 | const plugins = [ 26 | // Add more Next.js plugins to this list if needed. 27 | withNx, 28 | ]; 29 | 30 | module.exports = composePlugins(...plugins)(nextConfig); 31 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/web/next.config.js: -------------------------------------------------------------------------------- 1 | //@ts-check 2 | 3 | // eslint-disable-next-line @typescript-eslint/no-var-requires 4 | const { composePlugins, withNx } = require('@nx/next'); 5 | 6 | /** 7 | * @type {import('@nx/next/plugins/with-nx').WithNxOptions} 8 | **/ 9 | const nextConfig = { 10 | webpack: (config) => { 11 | config.externals = [ 12 | ...(config.externals || []), 13 | 'bigint', 14 | 'node-gyp-build', 15 | ]; 16 | return config; 17 | }, 18 | nx: { 19 | // Set this to true if you would like to use SVGR 20 | // See: https://github.com/gregberge/svgr 21 | svgr: false, 22 | }, 23 | }; 24 | 25 | const plugins = [ 26 | // Add more Next.js plugins to this list if needed. 27 | withNx, 28 | ]; 29 | 30 | module.exports = composePlugins(...plugins)(nextConfig); 31 | -------------------------------------------------------------------------------- /simple-todo-list/aptos/move/sh_scripts/create_todo_list_if_not_exists_and_todos.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | echo "##### Running move script to create a todo list under sender if not exists and todos in 1 tx #####" 6 | 7 | CONTRACT_ADDRESS=$(cat contract_address.txt) 8 | 9 | # Need to compile the package first 10 | aptos move compile \ 11 | --named-addresses simple_todo_list_addr=$CONTRACT_ADDRESS 12 | 13 | # Profile is the account you used to execute transaction 14 | # Run "aptos init" to create the profile, then get the profile name from .aptos/config.yaml 15 | SENDER_PROFILE=testnet-profile-1 16 | 17 | # Run the script 18 | aptos move run-script \ 19 | --assume-yes \ 20 | --profile $SENDER_PROFILE \ 21 | --compiled-script-path build/simple-todo-list/bytecode_scripts/create_todo_list_if_not_exists_and_todos.mv 22 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 13 | My Aptos Dapp 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /telegram-boilerplate-template-with-mizu-core/scripts/move/upgrade.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | async function publish() { 5 | if (!process.env.VITE_MODULE_ADDRESS) { 6 | throw new Error( 7 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before upgrading it", 8 | ); 9 | } 10 | 11 | const move = new cli.Move(); 12 | 13 | move.upgradeObjectPackage({ 14 | packageDirectoryPath: "move", 15 | objectAddress: process.env.VITE_MODULE_ADDRESS, 16 | namedAddresses: { 17 | // Upgrade module from an object 18 | counter_app_addr: process.env.VITE_MODULE_ADDRESS, 19 | }, 20 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 21 | }); 22 | } 23 | publish(); 24 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/solana/anchor/programs/launchpad/src/lib.rs: -------------------------------------------------------------------------------- 1 | use anchor_lang::prelude::*; 2 | use instructions::*; 3 | mod instructions; 4 | mod state; 5 | 6 | declare_id!("7kUij7HeYodZGUGB1d1TQpHC3gxUqf4t6NQBf3QjVpru"); 7 | 8 | #[program] 9 | pub mod launchpad { 10 | use super::*; 11 | 12 | pub fn initialize(ctx: Context) -> Result<()> { 13 | handle_initialize(ctx) 14 | } 15 | 16 | pub fn create_token( 17 | ctx: Context, 18 | token_name: String, 19 | token_symbol: String, 20 | token_uri: String, 21 | ) -> Result<()> { 22 | handle_create_token(ctx, token_name, token_symbol, token_uri) 23 | } 24 | 25 | pub fn mint_token(ctx: Context, amount: u64) -> Result<()> { 26 | handle_mint_token(ctx, amount) 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /friend-tech/aptos/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | 23 | "baseUrl": ".", 24 | "paths": { 25 | "@/*": ["./frontend/*"] 26 | } 27 | }, 28 | "include": ["frontend", "vite-env.d.ts"], 29 | "references": [{ "path": "./tsconfig.node.json" }] 30 | } 31 | -------------------------------------------------------------------------------- /fungible-asset-launchpad/aptos/scripts/move/upgrade.js: -------------------------------------------------------------------------------- 1 | require("dotenv").config(); 2 | const cli = require("@aptos-labs/ts-sdk/dist/common/cli/index.js"); 3 | 4 | async function publish() { 5 | // Check VITE_MODULE_ADDRESS is set 6 | if (!process.env.VITE_MODULE_ADDRESS) { 7 | throw new Error( 8 | "VITE_MODULE_ADDRESS variable is not set, make sure you have published the module before upgrading it", 9 | ); 10 | } 11 | 12 | const move = new cli.Move(); 13 | 14 | move.upgradeObjectPackage({ 15 | packageDirectoryPath: "move", 16 | objectAddress: process.env.VITE_MODULE_ADDRESS, 17 | namedAddresses: { 18 | // Upgrade module from an object 19 | launchpad_addr: process.env.VITE_MODULE_ADDRESS, 20 | }, 21 | profile: `${process.env.PROJECT_NAME}-${process.env.VITE_APP_NETWORK}`, 22 | }); 23 | } 24 | publish(); 25 | -------------------------------------------------------------------------------- /nft-launchpad/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "noImplicitAny": true, 23 | "baseUrl": ".", 24 | "paths": { 25 | "@/*": ["./frontend/*"] 26 | } 27 | }, 28 | "include": ["frontend"], 29 | "references": [{ "path": "./tsconfig.node.json" }] 30 | } 31 | -------------------------------------------------------------------------------- /surf-for-type-safety/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true, 22 | 23 | "baseUrl": ".", 24 | "paths": { 25 | "@/*": ["./frontend/*"] 26 | } 27 | }, 28 | "include": ["frontend", "vite-env.d.ts"], 29 | "references": [{ "path": "./tsconfig.node.json" }] 30 | } 31 | -------------------------------------------------------------------------------- /advanced-todo-list/solana/anchor/programs/advanced-todo-list/src/instructions/complete_todo.rs: -------------------------------------------------------------------------------- 1 | use crate::error::*; 2 | use crate::state::TodoList; 3 | use anchor_lang::prelude::*; 4 | 5 | #[derive(Accounts)] 6 | pub struct CompleteTodo<'info> { 7 | #[account(mut, has_one = owner)] 8 | pub todo_list: Account<'info, TodoList>, 9 | pub owner: Signer<'info>, 10 | } 11 | 12 | pub fn handle_complete_todo(ctx: Context, todo_idx: u32) -> Result<()> { 13 | let todo_list = &mut ctx.accounts.todo_list; 14 | require!( 15 | (todo_idx as usize) < todo_list.todos.len(), 16 | ContractError::TodoNotFound 17 | ); 18 | require!( 19 | !todo_list.todos[todo_idx as usize].completed, 20 | ContractError::TodoAlreadyCompleted 21 | ); 22 | todo_list.todos[todo_idx as usize].completed = true; 23 | Ok(()) 24 | } 25 | --------------------------------------------------------------------------------