張泰瑋(Chang Tai Wei)
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # All Weather 前端需求 ## Problem <https://github.com/all-weather-protocol/all-weather-frontend> 按優先級排序 ![](https://hackmd.io/_uploads/SyFZqdNpn.png) ![](https://hackmd.io/_uploads/ByLNZWLph.png) 1. Deposit 的交易,希望能 1-click 跳出 approve -> deposit 的交易視窗: in short 就是希望 user 只要點一次 deposit 按鈕,不用學什麼 approve 是啥意思用 js 讓 approve -> deposit 這兩個 transaction 依次序跳出來讓 user 簽但不知道怎麼做UI 隨意,主要是 transaction 能按順序跳出來就好xd 2. `Deposit` 的 input 欄位太短,如果 input `0.0001` eth 的話,後面幾會都看不到 3. 效能問題:每次在 input 欄位 `onChange`, 都會 send requests to my backend server. 但太多了,會等很久,只要能變快就算會浪費後端算力或多花錢也都能接受。以 UX 為主 ## Solutions 自由發揮,會動就好 ```flow st=>start: Input Number cond7=>condition: Check if the number is greater than minimum zap in amount op6=>operation: show the slippage somewhere (hardcoded) op8=>operation: show the error msg somewhere and remind the user to zap in more e=>end: End op=>operation: Approve (show the pop up component) cond=>condition: Number exceeds user's allowance? op2=>operation: Fetch Routes op5=>operation: Deposit (also, show the pop up component) st->cond7 op6->cond->e cond(yes)->op cond(no)->op2 op->op2->op5 cond7(yes)->op6 cond7(no)->op8 ``` ## Scopes - [ ] deposit 功能 - [ ] input 欄位要看得清你要付多少 eth - [ ] 希望能在 8/30 前搞定 ## No-Go 除了input欄位跟美觀有關,其他美觀都不需要改xd ## Resources 1. [github](https://github.com/all-weather-protocol/all-weather-frontend/blob/main/pages/views/ZapInButton.jsx) 2. [website](https://all-weather-protocol.on.fleek.co/) 3. 用 hardhat 去 `deposit` 能成功:[zapIn.js](https://github.com/david30907d/all-weather-scaffold/blob/master/packages/hardhat/deploy/zapIn.js) 4. DepositData which works in hardhat ``` { "amount": { "type": "BigNumber", "hex": "0x1550f7dca70000" }, "receiver": "0x78000b0605E81ea9df54b33f72ebC61B5F5c8077", "oneInchDataDpx": "0xe449022e0000000000000000000000000000000000000000000000000002a8131d217c000000000000000000000000000000000000000000000000000038c09912310a2900000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001800000000000000000000000b52781c275431bd48d290a4318e338fe0df89eb98b1ccac8", "glpMinLpOut": { "type": "BigNumber", "hex": "0x11ff2b3d7038afdc" }, "glpGuessPtReceivedFromSy": { "guessMin": { "type": "BigNumber", "hex": "0x05e61462dcdc0227" }, "guessMax": { "type": "BigNumber", "hex": "0x09d4cca4c56eae41" }, "guessOffchain": { "type": "BigNumber", "hex": "0x068dddc32e49c981" }, "maxIteration": 13, "eps": "1000000000000000" }, "glpInput": { "tokenIn": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "netTokenIn": { "type": "BigNumber", "hex": "0x0550263a42f800" }, "tokenMintSy": "0x82af49447d8a07e3bd95bd0d56f35241523fbab1", "bulk": "0x0000000000000000000000000000000000000000", "pendleSwap": "0x0000000000000000000000000000000000000000", "swapData": { "swapType": 0, "extRouter": "0x0000000000000000000000000000000000000000", "extCalldata": [], "needScale": false } }, "gdaiMinLpOut": { "type": "BigNumber", "hex": "0x07f55cd989b8aa7d" }, "gdaiGuessPtReceivedFromSy": { "guessMin": { "type": "BigNumber", "hex": "0x038dcd9e516f80e4" }, "guessMax": { "type": "BigNumber", "hex": "0x05ec56b287b9d6d2" }, "guessOffchain": { "type": "BigNumber", "hex": "0x03f2e47705268f37" }, "maxIteration": 13, "eps": "1000000000000000" }, "gdaiInput": { "tokenIn": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", "netTokenIn": { "type": "BigNumber", "hex": "0x1164fcfd54f65cc4" }, "tokenMintSy": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1", "bulk": "0x0000000000000000000000000000000000000000", "pendleSwap": "0x0000000000000000000000000000000000000000", "swapData": { "swapType": 0, "extRouter": "0x0000000000000000000000000000000000000000", "extCalldata": [], "needScale": false } }, "gdaiOneInchDataGDAI": "0xe449022e000000000000000000000000000000000000000000000000000550263a42f800000000000000000000000000000000000000000000000000210cad7aee3a7d0e0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000031fa55e03bad93c7f8affdd2ec616ebfde2460018b1ccac8", "rethMinLpOut": { "type": "BigNumber", "hex": "0x025a6299f85626" }, "rethGuessPtReceivedFromSy": { "guessMin": { "type": "BigNumber", "hex": "0xffb226eb2cf6" }, "guessMax": { "type": "BigNumber", "hex": "0x01aa28eb87f59b" }, "guessOffchain": { "type": "BigNumber", "hex": "0x011c1b47aff912" }, "maxIteration": 13, "eps": "1000000000000000" }, "rethInput": { "tokenIn": "0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8", "netTokenIn": { "type": "BigNumber", "hex": "0x04a39563ce6bd1" }, "tokenMintSy": "0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8", "bulk": "0x0000000000000000000000000000000000000000", "pendleSwap": "0x0000000000000000000000000000000000000000", "swapData": { "swapType": 0, "extRouter": "0x0000000000000000000000000000000000000000", "extCalldata": [], "needScale": false } }, "rethOneInchDataRETH": "0xe449022e000000000000000000000000000000000000000000000000000550263a42f8000000000000000000000000000000000000000000000000000004a39563ce6bd10000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000009ba302a3f5ad2bf8853266e271b005a5b3716fe8b1ccac8" } ``` 4. DepositData which fails on Frontend side ``` ContractFunctionExecutionError: The contract function "deposit" reverted with the following reason: SafeERC20: approve from non-zero to non-zero allowance Contract Call: address: 0x36bb138Eb364889317Fd324a8f4A1d4CB244A198 function: deposit((uint256 amount, address receiver, bytes oneInchDataDpx, uint256 glpMinLpOut, (uint256 guessMin, uint256 guessMax, uint256 guessOffchain, uint256 maxIteration, uint256 eps), (address tokenIn, uint256 netTokenIn, address tokenMintSy, address bulk, address pendleSwap, (uint8 swapType, address extRouter, bytes extCalldata, bool needScale)), uint256 gdaiMinLpOut, (uint256 guessMin, uint256 guessMax, uint256 guessOffchain, uint256 maxIteration, uint256 eps), (address tokenIn, uint256 netTokenIn, address tokenMintSy, address bulk, address pendleSwap, (uint8 swapType, address extRouter, bytes extCalldata, bool needScale)), bytes gdaiOneInchDataGDAI, uint256 rethMinLpOut, (uint256 guessMin, uint256 guessMax, uint256 guessOffchain, uint256 maxIteration, uint256 eps), (address tokenIn, uint256 netTokenIn, address tokenMintSy, address bulk, address pendleSwap, (uint8 swapType, address extRouter, bytes extCalldata, bool needScale)), bytes rethOneInchDataRETH)) args: ({"amount":{"type":"BigNumber","hex":"0x4a9b6384488000"},"receiver":"0x78000b0605E81ea9df54b33f72ebC61B5F5c8077","oneInchDataDpx":"0xe449022e00000000000000000000000000000000000000000000000000094c42e5f5320000000000000000000000000000000000000000000000000000c69527c8a66c1900000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001800000000000000000000000b52781c275431bd48d290a4318e338fe0df89eb98b1ccac8","glpMinLpOut":{"type":"BigNumber","hex":"0x3ee8e449c870e10d"},"glpGuessPtReceivedFromSy":{"guessMin":{"type":"BigNumber","hex":"0x149eb41b7d43e277"},"guessMax":{"type":"BigNumber","hex":"0x225dd6d87b71241d"},"guessOffchain":{"type":"BigNumber","hex":"0x16e939e5a7a0c2be"},"maxIteration":13,"eps":{"type":"BigNumber","hex":"0x038d7ea4c68000"}},"glpInput":{"tokenIn":"0x82af49447d8a07e3bd95bd0d56f35241523fbab1","netTokenIn":{"type":"BigNumber","hex":"0x129885cbea6400"},"tokenMintSy":"0x82af49447d8a07e3bd95bd0d56f35241523fbab1","bulk":"0x0000000000000000000000000000000000000000","pendleSwap":"0x0000000000000000000000000000000000000000","swapData":{"swapType":0,"extRouter":"0x0000000000000000000000000000000000000000","extCalldata":[],"needScale":false}},"gdaiMinLpOut":{"type":"BigNumber","hex":"0x1d35c1a74d33bb81"},"gdaiGuessPtReceivedFromSy":{"guessMin":{"type":"BigNumber","hex":"0x0d0b30fbb5c761cc"},"guessMax":{"type":"BigNumber","hex":"0x15bd51a3844c4daa"},"guessOffchain":{"type":"BigNumber","hex":"0x0e7e366d02dd891c"},"maxIteration":13,"eps":"1000000000000000"},"gdaiInput":{"tokenIn":"0xda10009cbd5d07dd0cecc66161fc93d7c9000da1","netTokenIn":{"type":"BigNumber","hex":"0x3ccab9a237e1aa65"},"tokenMintSy":"0xd85e038593d7a098614721eae955ec2022b9b91b","bulk":"0x0000000000000000000000000000000000000000","pendleSwap":"0x38812c3ac3563bf200482ac9d096952d7cb55f9b","swapData":{"swapType":1,"extRouter":"0x6131b5fae19ea4f9d964eac0408e4408b66337b5","extCalldata":"0xe21fd0e90000000000000000000000000000000000000000000000000000000000000020000000000000000000000000a665a94de06acabbc4306e97a51df03c86ca37ce000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000005a000000000000000000000000000000000000000000000000000000000000007e000000000000000000000000000000000000000000000000000000000000004e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1000000000000000000000000d85e038593d7a098614721eae955ec2022b9b91b0000000000000000000000000000000001e4ef00d069e71d6ba041b0a16f7ea0000000000000000000000000000000000000000000000000000000007fffffff000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c85b0c1b84566708dd391ae0fece1a32e33682ee3d0000000000000000000003e1000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc80000000000000000000000000000000000000000000000003ccab9a237e1aa6500000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c80510ccf9eb3ab03c1508d3b9769e8ee2cfd6fdcf00000000000000000000005d000000000000000000000000ff970a61a04b1ca14834a43f5de4533ebddb5cc80000000000000000000000003f56e0c36d275367b8c502090edf38289b3dea0d000000000000000000000000000000000000000000000000000000000043dc6300000000000000000000000000000000000000000000000000000000000000408cc7a56b0000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000ba12222222228d8ba445958a75a0704d566bf2c870ba7dc356b41c849e74c679932c852cc0331a900000000000000000000003570000000000000000000000003f56e0c36d275367b8c502090edf38289b3dea0d000000000000000000000000d85e038593d7a098614721eae955ec2022b9b91b000000000000000000000000000000000000000000000000410e05da168e218700000000000000000000000000000000000000000000000000000000000000200000000000000000000003de983a5c0e00000000000000003b0b46507f281644000000000000000000000000da10009cbd5d07dd0cecc66161fc93d7c9000da1000000000000000000000000d85e038593d7a098614721eae955ec2022b9b91b000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000001e4ef00d069e71d6ba041b0a16f7ea00000000000000000000000000000000000000000000000003ccab9a237e1aa650000000000000000000000000000000000000000000000003523bf487270e0d6000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a665a94de06acabbc4306e97a51df03c86ca37ce00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000003ccab9a237e1aa6500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001f57b22536f75726365223a2250656e646c65222c22416d6f756e74496e555344223a22342e3337393335363835363735353731222c22416d6f756e744f7574555344223a22342e35383130393734353135323035313035222c22526566657272616c223a22222c22466c616773223a312c22496e74656772697479496e666f223a7b224b65794944223a2231222c225369676e6174757265223a2243452f7763562b57596f6f65474f6b79632b597662774a3256723268723367704b55384c4f63364c6c486b34383276686838386471354447474f55616a474452474950326a4a5962566a4f7931503744306b4532457a5a5463656f7454446a6b7a436b6b4a6a4634755a425a6659465a4f4d5249472b566b4a3361393237494c4b4d376571427a57563967616c5034466b7031414a3874544c363677644461456269577a665570653638746348464b61654a4569464f6e4152466e735a6853472f756a4f7867475032386159644530634d71686848536e4e485578473630796c54322f757758456d435842414b5a646d324d4c625032374b7a4f4962443075714d2f516c646f542f756c4e5545336657306362734c3356337955665474306173327968575346422f56797170434d6641487535424d5a7444654e42394e2b63706a62326d4d38343066533365444d43585342733564773d3d227d7d0000000000000000000000","needScale":false}},"gdaiOneInchDataGDAI":"0xe449022e00000000000000000000000000000000000000000000000000129885cbea640000000000000000000000000000000000000000000000000073812d8103c65d590000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000031fa55e03bad93c7f8affdd2ec616ebfde2460018b1ccac8","rethMinLpOut":{"type":"BigNumber","hex":"0x083a05b4e4cb16"},"rethGuessPtReceivedFromSy":{"guessMin":{"type":"BigNumber","hex":"0x037deb67eb226b"},"guessMax":{"type":"BigNumber","hex":"0x05d1ddad328eb3"},"guessOffchain":{"type":"BigNumber","hex":"0x03e13e737709cd"},"maxIteration":13,"eps":"1000000000000000"},"rethInput":{"tokenIn":"0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8","netTokenIn":{"type":"BigNumber","hex":"0x103833a3d295b6"},"tokenMintSy":"0xec70dcb4a1efa46b8f2d97c310c9c4790ba5ffa8","bulk":"0x0000000000000000000000000000000000000000","pendleSwap":"0x0000000000000000000000000000000000000000","swapData":{"swapType":0,"extRouter":"0x0000000000000000000000000000000000000000","extCalldata":[],"needScale":false}},"rethOneInchDataRETH":"0xe449022e00000000000000000000000000000000000000000000000000129885cbea640000000000000000000000000000000000000000000000000000103833a3d295b60000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000100000000000000000000000009ba302a3f5ad2bf8853266e271b005a5b3716fe8b1ccac8"}) sender: 0x78000b0605E81ea9df54b33f72ebC61B5F5c8077 Docs: https://viem.sh/docs/contract/simulateContract.html Version: viem@1.1.7 at getContractError (getContractError.js:24:1) at simulateContract (simulateContract.js:71:31) at async prepareWriteContract (chunk-LAFZBYO7.js:2078:29) at async writeContract (chunk-LAFZBYO7.js:2354:1) console.error @ client.js:1 window.console.error @ next-dev.js:24 execute @ mutation.mjs:158 await in execute (async) mutate @ mutationObserver.mjs:85 eval @ useMutation.mjs:19 eval @ index.js:1597 handleZapIn @ VM37289 ZapInButton.jsx:165 handleClick @ button.js:130 callCallback @ react-dom.development.js:4164 invokeGuardedCallbackDev @ react-dom.development.js:4213 invokeGuardedCallback @ react-dom.development.js:4277 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4291 executeDispatch @ react-dom.development.js:9041 processDispatchQueueItemsInOrder @ react-dom.development.js:9073 processDispatchQueue @ react-dom.development.js:9086 dispatchEventsForPlugins @ react-dom.development.js:9097 eval @ react-dom.development.js:9288 batchedUpdates$1 @ react-dom.development.js:26140 batchedUpdates @ react-dom.development.js:3991 dispatchEventForPluginEventSystem @ react-dom.development.js:9287 dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay @ react-dom.development.js:6465 dispatchEvent @ react-dom.development.js:6457 dispatchDiscreteEvent @ react-dom.development.js:6430 ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully