-
Notifications
You must be signed in to change notification settings - Fork 899
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dddc1b1
commit f06888b
Showing
16 changed files
with
3,702 additions
and
0 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
mover/fengfengxiong123/code/task6/my-first-sui-dapp/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Sui dApp Starter Template | ||
|
||
This dApp was created using `@mysten/create-dapp` that sets up a basic React | ||
Client dApp using the following tools: | ||
|
||
- [React](https://react.dev/) as the UI framework | ||
- [TypeScript](https://www.typescriptlang.org/) for type checking | ||
- [Vite](https://vitejs.dev/) for build tooling | ||
- [Radix UI](https://www.radix-ui.com/) for pre-built UI components | ||
- [ESLint](https://eslint.org/) | ||
- [`@mysten/dapp-kit`](https://sdk.mystenlabs.com/dapp-kit) for connecting to | ||
wallets and loading data | ||
- [pnpm](https://pnpm.io/) for package management | ||
|
||
## Starting your dApp | ||
|
||
To install dependencies you can run | ||
|
||
```bash | ||
pnpm install | ||
``` | ||
|
||
To start your dApp in development mode run | ||
|
||
```bash | ||
pnpm dev | ||
``` | ||
|
||
## Building | ||
|
||
To build your app for deployment you can run | ||
|
||
```bash | ||
pnpm build | ||
``` |
59 changes: 59 additions & 0 deletions
59
mover/fengfengxiong123/code/task6/my-first-sui-dapp/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<!doctype html> | ||
<html lang="en" class="dark-theme" style="color-scheme: dark"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="icon" type="image/svg+xml" href="/vite.svg" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>Sui dApp Starter</title> | ||
|
||
<style> | ||
/* | ||
Josh's Custom CSS Reset | ||
https://www.joshwcomeau.com/css/custom-css-reset/ | ||
*/ | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
* { | ||
margin: 0; | ||
} | ||
body { | ||
line-height: 1.5; | ||
-webkit-font-smoothing: antialiased; | ||
} | ||
img, | ||
picture, | ||
video, | ||
canvas, | ||
svg { | ||
display: block; | ||
max-width: 100%; | ||
} | ||
input, | ||
button, | ||
textarea, | ||
select { | ||
font: inherit; | ||
} | ||
p, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
h5, | ||
h6 { | ||
overflow-wrap: break-word; | ||
} | ||
#root, | ||
#__next { | ||
isolation: isolate; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
<script type="module" src="/src/main.tsx"></script> | ||
</body> | ||
</html> |
205 changes: 205 additions & 0 deletions
205
mover/fengfengxiong123/code/task6/my-first-sui-dapp/npminstall-debug.log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,205 @@ | ||
{ | ||
root: 'D:\\github_projects\\letsmove\\mover\\fengfengxiong123\\code\\task6\\my-first-sui-dapp', | ||
registry: 'https://registry.npmmirror.com', | ||
pkgs: [ | ||
{ | ||
name: 'navi-sdk', | ||
version: 'latest', | ||
type: 'tag', | ||
alias: undefined, | ||
arg: [Result] | ||
} | ||
], | ||
production: false, | ||
cacheStrict: false, | ||
cacheDir: 'C:\\Users\\35997\\.npminstall_tarball', | ||
env: { | ||
npm_config_registry: 'https://registry.npmmirror.com', | ||
npm_config_argv: '{"remain":[],"cooked":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\35997\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","navi-sdk"],"original":["--fix-bug-versions","--china","--userconfig=C:\\\\Users\\\\35997\\\\.cnpmrc","--disturl=https://cdn.npmmirror.com/binaries/node","--registry=https://registry.npmmirror.com","navi-sdk"]}', | ||
npm_config_user_agent: 'npminstall/7.12.0 npm/? node/v22.2.0 win32 x64', | ||
npm_config_cache: 'C:\\Users\\35997\\.npminstall_tarball', | ||
NODE: 'D:\\Program Files\\nodejs\\node.exe', | ||
npm_node_execpath: 'D:\\Program Files\\nodejs\\node.exe', | ||
npm_execpath: 'C:\\Users\\35997\\AppData\\Roaming\\npm\\node_modules\\cnpm\\node_modules\\npminstall\\bin\\install.js', | ||
npm_config_userconfig: 'C:\\Users\\35997\\.cnpmrc', | ||
npm_config_disturl: 'https://cdn.npmmirror.com/binaries/node', | ||
npm_config_r: 'https://registry.npmmirror.com', | ||
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com', | ||
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver', | ||
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node', | ||
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node', | ||
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs', | ||
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver', | ||
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver', | ||
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip', | ||
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/', | ||
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/', | ||
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass', | ||
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc', | ||
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v', | ||
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing', | ||
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing', | ||
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright', | ||
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli', | ||
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl', | ||
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2', | ||
RE2_DOWNLOAD_SKIP_PATH: 'true', | ||
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma', | ||
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3', | ||
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar', | ||
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp', | ||
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips', | ||
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs', | ||
npm_rootpath: 'D:\\github_projects\\letsmove\\mover\\fengfengxiong123\\code\\task6\\my-first-sui-dapp', | ||
INIT_CWD: 'D:\\github_projects\\letsmove\\mover\\fengfengxiong123\\code\\task6\\my-first-sui-dapp' | ||
}, | ||
binaryMirrors: { | ||
ENVS: { | ||
COREPACK_NPM_REGISTRY: 'https://registry.npmmirror.com', | ||
EDGEDRIVER_CDNURL: 'https://npmmirror.com/mirrors/edgedriver', | ||
NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node', | ||
NVM_NODEJS_ORG_MIRROR: 'https://cdn.npmmirror.com/binaries/node', | ||
PHANTOMJS_CDNURL: 'https://cdn.npmmirror.com/binaries/phantomjs', | ||
CHROMEDRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/chromedriver', | ||
OPERADRIVER_CDNURL: 'https://cdn.npmmirror.com/binaries/operadriver', | ||
CYPRESS_DOWNLOAD_PATH_TEMPLATE: 'https://cdn.npmmirror.com/binaries/cypress/${version}/${platform}-${arch}/cypress.zip', | ||
ELECTRON_MIRROR: 'https://cdn.npmmirror.com/binaries/electron/', | ||
ELECTRON_BUILDER_BINARIES_MIRROR: 'https://cdn.npmmirror.com/binaries/electron-builder-binaries/', | ||
SASS_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-sass', | ||
SWC_BINARY_SITE: 'https://cdn.npmmirror.com/binaries/node-swc', | ||
NWJS_URLBASE: 'https://cdn.npmmirror.com/binaries/nwjs/v', | ||
PUPPETEER_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/chrome-for-testing', | ||
PUPPETEER_DOWNLOAD_BASE_URL: 'https://cdn.npmmirror.com/binaries/chrome-for-testing', | ||
PLAYWRIGHT_DOWNLOAD_HOST: 'https://cdn.npmmirror.com/binaries/playwright', | ||
SENTRYCLI_CDNURL: 'https://cdn.npmmirror.com/binaries/sentry-cli', | ||
SAUCECTL_INSTALL_BINARY_MIRROR: 'https://cdn.npmmirror.com/binaries/saucectl', | ||
RE2_DOWNLOAD_MIRROR: 'https://cdn.npmmirror.com/binaries/node-re2', | ||
RE2_DOWNLOAD_SKIP_PATH: 'true', | ||
PRISMA_ENGINES_MIRROR: 'https://cdn.npmmirror.com/binaries/prisma', | ||
npm_config_better_sqlite3_binary_host: 'https://cdn.npmmirror.com/binaries/better-sqlite3', | ||
npm_config_keytar_binary_host: 'https://cdn.npmmirror.com/binaries/keytar', | ||
npm_config_sharp_binary_host: 'https://cdn.npmmirror.com/binaries/sharp', | ||
npm_config_sharp_libvips_binary_host: 'https://cdn.npmmirror.com/binaries/sharp-libvips', | ||
npm_config_robotjs_binary_host: 'https://cdn.npmmirror.com/binaries/robotjs' | ||
}, | ||
'@ali/s2': { host: 'https://cdn.npmmirror.com/binaries/looksgood-s2' }, | ||
sharp: { replaceHostFiles: [Array], replaceHostMap: [Object] }, | ||
'@tensorflow/tfjs-node': { | ||
replaceHostFiles: [Array], | ||
replaceHostRegExpMap: [Object], | ||
replaceHostMap: [Object] | ||
}, | ||
cypress: { | ||
host: 'https://cdn.npmmirror.com/binaries/cypress', | ||
newPlatforms: [Object] | ||
}, | ||
'utf-8-validate': { | ||
host: 'https://cdn.npmmirror.com/binaries/utf-8-validate/v{version}' | ||
}, | ||
xprofiler: { | ||
remote_path: './xprofiler/v{version}/', | ||
host: 'https://cdn.npmmirror.com/binaries' | ||
}, | ||
leveldown: { host: 'https://cdn.npmmirror.com/binaries/leveldown/v{version}' }, | ||
couchbase: { host: 'https://cdn.npmmirror.com/binaries/couchbase/v{version}' }, | ||
gl: { host: 'https://cdn.npmmirror.com/binaries/gl/v{version}' }, | ||
sqlite3: { | ||
host: 'https://cdn.npmmirror.com/binaries/sqlite3', | ||
remote_path: 'v{version}' | ||
}, | ||
'@journeyapps/sqlcipher': { host: 'https://cdn.npmmirror.com/binaries' }, | ||
grpc: { | ||
host: 'https://cdn.npmmirror.com/binaries', | ||
remote_path: '{name}/v{version}' | ||
}, | ||
'grpc-tools': { host: 'https://cdn.npmmirror.com/binaries' }, | ||
wrtc: { | ||
host: 'https://cdn.npmmirror.com/binaries', | ||
remote_path: '{name}/v{version}' | ||
}, | ||
fsevents: { host: 'https://cdn.npmmirror.com/binaries/fsevents' }, | ||
nodejieba: { host: 'https://cdn.npmmirror.com/binaries/nodejieba' }, | ||
canvas: { host: 'https://cdn.npmmirror.com/binaries/canvas' }, | ||
'skia-canvas': { host: 'https://cdn.npmmirror.com/binaries/skia-canvas' }, | ||
'flow-bin': { | ||
replaceHost: 'https://github.com/facebook/flow/releases/download/v', | ||
host: 'https://cdn.npmmirror.com/binaries/flow/v' | ||
}, | ||
'jpegtran-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/jpegtran-bin' | ||
}, | ||
'cwebp-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/cwebp-bin' | ||
}, | ||
'zopflipng-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/zopflipng-bin' | ||
}, | ||
'optipng-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/optipng-bin' | ||
}, | ||
mozjpeg: { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/mozjpeg-bin' | ||
}, | ||
gifsicle: { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/gifsicle-bin' | ||
}, | ||
'pngquant-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/pngquant-bin', | ||
replaceHostMap: [Object] | ||
}, | ||
'pngcrush-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/pngcrush-bin' | ||
}, | ||
'jpeg-recompress-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/jpeg-recompress-bin' | ||
}, | ||
'advpng-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/advpng-bin' | ||
}, | ||
'pngout-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/pngout-bin' | ||
}, | ||
'jpegoptim-bin': { | ||
replaceHost: [Array], | ||
host: 'https://cdn.npmmirror.com/binaries/jpegoptim-bin' | ||
}, | ||
argon2: { host: 'https://cdn.npmmirror.com/binaries/argon2' }, | ||
'ali-zeromq': { host: 'https://cdn.npmmirror.com/binaries/ali-zeromq' }, | ||
'ali-usb_ctl': { host: 'https://cdn.npmmirror.com/binaries/ali-usb_ctl' }, | ||
'gdal-async': { host: 'https://cdn.npmmirror.com/binaries/node-gdal-async' }, | ||
'libpg-query': { host: 'https://cdn.npmmirror.com/binaries' } | ||
}, | ||
forbiddenLicenses: null, | ||
flatten: false, | ||
proxy: undefined, | ||
prune: false, | ||
disableFallbackStore: false, | ||
workspacesMap: Map(0) {}, | ||
enableWorkspace: false, | ||
workspaceRoot: 'D:\\github_projects\\letsmove\\mover\\fengfengxiong123\\code\\task6\\my-first-sui-dapp', | ||
isWorkspaceRoot: true, | ||
isWorkspacePackage: false, | ||
offline: false, | ||
strictSSL: true, | ||
ignoreScripts: false, | ||
foregroundScripts: false, | ||
ignoreOptionalDependencies: false, | ||
detail: false, | ||
forceLinkLatest: false, | ||
trace: false, | ||
engineStrict: false, | ||
registryOnly: false, | ||
client: false, | ||
autoFixVersion: [Function: autoFixVersion] | ||
} |
37 changes: 37 additions & 0 deletions
37
mover/fengfengxiong123/code/task6/my-first-sui-dapp/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"name": "my-first-sui-dapp", | ||
"private": true, | ||
"version": "0.0.0", | ||
"type": "module", | ||
"scripts": { | ||
"dev": "vite", | ||
"build": "tsc && vite build", | ||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
"preview": "vite preview" | ||
}, | ||
"dependencies": { | ||
"@mysten/dapp-kit": "0.14.43", | ||
"@mysten/sui": "1.17.0", | ||
"@radix-ui/colors": "^3.0.0", | ||
"@radix-ui/react-icons": "^1.3.0", | ||
"@radix-ui/themes": "^3.1.1", | ||
"@tanstack/react-query": "^5.50.1", | ||
"dotenv": "^16.4.7", | ||
"navi-sdk": "^1.4.8", | ||
"react": "^18.3.1", | ||
"react-dom": "^18.3.1" | ||
}, | ||
"devDependencies": { | ||
"@types/react": "^18.3.3", | ||
"@types/react-dom": "^18.3.0", | ||
"@typescript-eslint/eslint-plugin": "^7.16.0", | ||
"@typescript-eslint/parser": "^7.16.0", | ||
"@vitejs/plugin-react-swc": "^3.7.0", | ||
"eslint": "^9.6.0", | ||
"eslint-plugin-react-hooks": "^4.6.2", | ||
"eslint-plugin-react-refresh": "^0.4.7", | ||
"prettier": "^3.3.2", | ||
"typescript": "^5.5.3", | ||
"vite": "^5.3.3" | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
mover/fengfengxiong123/code/task6/my-first-sui-dapp/prettier.config.cjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// eslint-disable-next-line no-undef | ||
module.exports = { | ||
proseWrap: "always", | ||
}; |
40 changes: 40 additions & 0 deletions
40
mover/fengfengxiong123/code/task6/my-first-sui-dapp/src/App.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { ConnectButton } from "@mysten/dapp-kit"; | ||
import { Box, Container, Flex, Heading } from "@radix-ui/themes"; | ||
import { WalletStatus } from "./WalletStatus"; | ||
|
||
|
||
function App() { | ||
return ( | ||
<> | ||
<Flex | ||
position="sticky" | ||
px="4" | ||
py="2" | ||
justify="between" | ||
style={{ | ||
borderBottom: "1px solid var(--gray-a2)", | ||
}} | ||
> | ||
<Box> | ||
<Heading>dApp Starter Template</Heading> | ||
</Box> | ||
|
||
<Box> | ||
<ConnectButton /> | ||
</Box> | ||
</Flex> | ||
<Container> | ||
<Container | ||
mt="5" | ||
pt="2" | ||
px="4" | ||
style={{ background: "var(--gray-a2)", minHeight: 500 }} | ||
> | ||
<WalletStatus /> | ||
</Container> | ||
</Container> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.