diff --git a/.gitignore b/.gitignore index d42ce46a8..4eca50bb7 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ public/ .deploy*/ .MWebMetaData source/.MWebMetaData +Gemfile.lock +Package-lock.json +yarn.lock diff --git a/_config.next.yml b/_config.next.yml index 9d641f5f9..406dd0f43 100644 --- a/_config.next.yml +++ b/_config.next.yml @@ -23,6 +23,7 @@ custom_file_path: #header: source/_data/header.njk #sidebar: source/_data/sidebar.njk #postMeta: source/_data/post-meta.njk + #postBodyStart: source/_data/post-body-start.njk #postBodyEnd: source/_data/post-body-end.njk #footer: source/_data/footer.njk #bodyEnd: source/_data/body-end.njk @@ -72,13 +73,26 @@ creative_commons: # CC licenses are available in 39 languages, you can find the specific and correct abbreviation you need on https://creativecommons.org language: +# Open graph settings +# See: https://hexo.io/docs/helpers#open-graph +open_graph: + enable: true + options: + #twitter_card: + #twitter_id: + #twitter_site: + #twitter_image: + #google_plus: + #fb_admins: + #fb_app_id: + # --------------------------------------------------------------- # Menu Settings # --------------------------------------------------------------- # Usage: `Key: /link/ || icon` -# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-senstive. +# Key is the name of menu item. If the translation for this item is available, the translated text will be loaded, otherwise the Key name will be used. Key is case-sensitive. # Value before `||` delimiter is the target link, value after `||` delimiter is the name of Font Awesome icon. # External url should start with http:// or https:// menu: @@ -128,7 +142,7 @@ sidebar: avatar: # Replace the default image and set the url here. url: /images/avatar.png - # If true, the avatar will be dispalyed in circle. + # If true, the avatar will be displayed in circle. rounded: true # If true, the avatar will be rotated with the cursor. rotated: true @@ -155,14 +169,14 @@ social_icons: # Blog rolls links_settings: icon: fa fa-globe - title: 友情链接 # Available values: block | inline layout: block links: + #Title: https://example.com # Table of Contents in the Sidebar -# Front-matter variable (unsupport wrap expand_all). +# Front-matter variable (nonsupport wrap expand_all). toc: enable: true # Automatically add list number to toc. @@ -197,12 +211,13 @@ footer: color: "#1D3150" # If not defined, `author` from Hexo `_config.yml` will be used. + # Set to `false` to disable the copyright statement. copyright: # Powered by Hexo & NexT powered: false - # Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, http://www.beian.gov.cn + # Beian ICP and gongan information for Chinese users. See: https://beian.miit.gov.cn, https://beian.mps.gov.cn beian: enable: false icp: 蜀ICP备20000598号-1 @@ -219,7 +234,7 @@ footer: # See: https://theme-next.js.org/docs/theme-settings/posts # --------------------------------------------------------------- -# Automatically excerpt description in homepage as preamble text. +# Use `description` in front-matter to specify post excerpt. excerpt_description: true # Read more button @@ -245,7 +260,7 @@ symbols_count_time: tag_icon: true # Donate (Sponsor) settings -# Front-matter variable (unsupport animation). +# Front-matter variable (nonsupport animation). reward_settings: # If true, a donate button will be displayed in every article by default. enable: true @@ -263,21 +278,14 @@ reward: follow_me: #Twitter: https://twitter.com/username || fab fa-twitter #Telegram: https://t.me/channel_name || fab fa-telegram - #WeChat: /images/wechat_channel.jpg || fab fa-weixin + #WeChat: /images/wechat_channel.png || fab fa-weixin #RSS: /atom.xml || fa fa-rss # Related popular posts -# Dependencies: https://github.com/tea3/hexo-related-popular-posts +# Dependencies: https://github.com/sergeyzwezdin/hexo-related-posts related_posts: enable: false - title: # Custom header, leave empty to use the default one - display_in_home: false - params: - maxCount: 5 - #PPMixingRate: 0.0 - #isDate: false - #isImage: false - #isExcerpt: false + icon: fa fa-signs-post # Post edit # Easily browse and edit blog source code online. @@ -298,8 +306,8 @@ post_navigation: left # TagCloud settings for tags page. tagcloud: - min: 12 # Minimun font size in px - max: 30 # Maxium font size in px + min: 12 # Minimum font size in px + max: 30 # Maximum font size in px amount: 200 # Total amount of tags orderby: name # Order of tags order: 1 # Sort order @@ -323,7 +331,7 @@ calendar: # See: https://theme-next.js.org/docs/theme-settings/miscellaneous # --------------------------------------------------------------- -# Preconnect CDN for fonts and plugins. +# Preload styles and preconnect CDN for fonts and plugins. # For more information: https://www.w3.org/TR/resource-hints/#preconnect preconnect: false @@ -336,8 +344,10 @@ text_align: # Reduce padding / margin indents on devices with narrow width. mobile_layout_economy: false -# Android Chrome header panel color ($brand-bg / $headband-bg => $black-deep). -android_chrome_color: "#222" +# Browser header panel color. +theme_color: + light: "#222" + dark: "#222" # Override browsers' default behavior. body_scrollbar: @@ -360,6 +370,10 @@ codeblock: enable: true # Available values: default | flat | mac style: + # Fold code block + fold: + enable: false + height: 500 back2top: enable: true @@ -392,7 +406,6 @@ bookmark: github_banner: enable: true permalink: https://github.com/xwal - title: Follow me on GitHub # --------------------------------------------------------------- @@ -408,7 +421,7 @@ github_banner: # --------------------------------------------------------------- font: - enable: true + enable: false # Uri of fonts host, e.g. https://fonts.googleapis.com (Default). host: @@ -421,8 +434,8 @@ font: # Global font settings used for all elements inside . global: external: true - family: - size: 0.8 + family: Lato + size: # Font settings for site title (.site-title). title: @@ -452,7 +465,7 @@ font: # See: https://theme-next.js.org/docs/theme-settings/seo # --------------------------------------------------------------- -# If true, site-subtitle will be added to index page. +# If true, site-subtitle will be added to the title of index page. # Remember to set up your site-subtitle in Hexo `_config.yml` (e.g. subtitle: Subtitle) index_with_subtitle: false @@ -478,21 +491,70 @@ yandex_site_verification: baidu_site_verification: iYaX85B5Bg +# --------------------------------------------------------------- +# Tags Settings +# See: https://theme-next.js.org/docs/tag-plugins/ +# --------------------------------------------------------------- + +# Note tag (bootstrap callout) +note: + # Note tag style values: + # - simple bootstrap callout old alert style. Default. + # - modern bootstrap callout new (v2-v3) alert style. + # - flat flat callout style with background, like on Mozilla or StackOverflow. + # - disabled disable all CSS styles import of note tag. + style: simple + icons: false + # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). + # Offset also applied to label tag variables. This option can work with disabled note tag. + light_bg_offset: 0 + +# Tabs tag +tabs: + # Make the nav bar of tabs with long content stick to the top. + sticky: false + transition: + tabs: false + labels: true + +# PDF tag +# NexT will try to load pdf files natively, if failed, pdf.js will be used. +# So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers. +# Dependencies: https://github.com/next-theme/theme-next-pdf +pdf: + enable: false + # Default height + height: 500px + +# Mermaid tag +mermaid: + enable: true + # Available themes: default | dark | forest | neutral + theme: + light: default + dark: dark + +# WaveDrom tag +wavedrom: + enable: false + # --------------------------------------------------------------- # Third Party Plugins & Services Settings # See: https://theme-next.js.org/docs/third-party-services/ # More plugins: https://github.com/next-theme/awesome-next -# You may need to install the corresponding dependency packages # --------------------------------------------------------------- +# --------------------------------------------------------------- # Math Formulas Render Support -# Warning: Please install / uninstall the relevant renderer according to the documentation. # See: https://theme-next.js.org/docs/third-party-services/math-equations +# Warning: Please install / uninstall the relevant renderer according to the documentation. # Server-side plugin: https://github.com/next-theme/hexo-filter-mathjax +# --------------------------------------------------------------- + math: # Default (false) will load mathjax / katex script on demand. # That is it only render those page which has `mathjax: true` in front-matter. - # If you set it to true, it will load mathjax / katex srcipt EVERY PAGE. + # If you set it to true, it will load mathjax / katex script EVERY PAGE. every_page: false mathjax: @@ -505,6 +567,12 @@ math: # See: https://github.com/KaTeX/KaTeX/tree/master/contrib/copy-tex copy_tex: false + +# --------------------------------------------------------------- +# External Libraries +# See: https://theme-next.js.org/docs/third-party-services/external-libraries +# --------------------------------------------------------------- + # Easily enable fast Ajax navigation on your website. # For more information: https://github.com/next-theme/pjax pjax: false @@ -513,7 +581,7 @@ pjax: false # For more information: https://fancyapps.com/fancybox/ fancybox: false -# A JavaScript library for zooming images like Medium. +# Medium Zoom is a JavaScript library for zooming images like Medium. # Warning: Do not enable both `fancybox` and `mediumzoom`. # For more information: https://medium-zoom.francoischalifour.com mediumzoom: false @@ -522,14 +590,14 @@ mediumzoom: false # For more information: https://apoorv.pro/lozad.js/demo/ lazyload: false -# Pangu Support +# Automatically insert whitespace between CJK and half-width characters. # For more information: https://github.com/vinta/pangu.js # Server-side plugin: https://github.com/next-theme/hexo-pangu pangu: false -# Quicklink Support +# Prefetch links based on what is in the user's viewport. # For more information: https://getquick.link -# Front-matter variable (unsupport home archive). +# Front-matter variable (nonsupport home archive). quicklink: enable: false @@ -546,6 +614,46 @@ quicklink: priority: true +# --------------------------------------------------------------- +# Animation Settings +# --------------------------------------------------------------- + +# Use Animate.css to animate everything. +# For more information: https://animate.style +motion: + enable: false + async: false + transition: + # All available transition variants: https://theme-next.js.org/animate/ + menu_item: fadeInDown + post_block: fadeIn + post_header: fadeInDown + post_body: fadeInDown + coll_header: fadeInLeft + # Only for Pisces | Gemini. + sidebar: fadeInUp + +# Progress bar in the top during page loading. +# For more information: https://github.com/CodeByZach/pace +pace: + enable: false + # All available colors: + # black | blue | green | orange | pink | purple | red | silver | white | yellow + color: blue + # All available themes: + # big-counter | bounce | barber-shop | center-atom | center-circle | center-radar | center-simple + # corner-indicator | fill-left | flat-top | flash | loading-bar | mac-osx | material | minimal + theme: minimal + +# Generate a ribbon in your website with HTML5 canvas. +# For more information: https://github.com/hustcc/ribbon.js +canvas_ribbon: + enable: false + size: 300 # The width of the ribbon + alpha: 0.6 # The transparency of the ribbon + zIndex: -1 # The display level of the ribbon + + # --------------------------------------------------------------- # Comments Settings # See: https://theme-next.js.org/docs/third-party-services/comments @@ -562,7 +670,7 @@ comments: storage: true # Lazyload all comment systems. lazyload: false - # Modify texts or order for any navs, here are some examples. + # Modify texts or order for any naves, here are some examples. nav: #disqus: # text: Load Disqus @@ -595,6 +703,8 @@ changyan: enable: false appid: appkey: + # Show comments count + count: true # LiveRe comments system # You can get your uid from https://livere.com/insight/myCode (General web site) @@ -611,24 +721,24 @@ gitalk: admin_user: xwal distraction_free_mode: true # Facebook-like distraction free mode # When the official proxy is not available, you can change it to your own proxy address - proxy: https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token # This is official proxy adress + proxy: https://cors-anywhere.azm.workers.dev/https://github.com/login/oauth/access_token # This is official proxy address # Gitalk's display language depends on user's browser or system environment # If you want everyone visiting your site to see a uniform language, you can set a force language value # Available values: en | es-ES | fr | ru | zh-CN | zh-TW - language: zh-CN + language: # Utterances # For more information: https://utteranc.es utterances: enable: false - repo: # Github repository name + repo: user-name/repo-name # Github repository owner and name # Available values: pathname | url | title | og:title issue_term: pathname # Available values: github-light | github-dark | preferred-color-scheme | github-dark-orange | icy-dark | dark-blue | photon-dark | boxy-light theme: github-light # Isso -# For more information: https://posativ.org/isso/ +# For more information: https://isso-comments.de isso: # # Giscus @@ -661,16 +771,14 @@ giscus: # See: https://theme-next.js.org/docs/third-party-services/post-widgets # --------------------------------------------------------------- -# Star rating support to each article. -# To get your ID visit https://widgetpack.com -rating: - enable: false - id: # - color: "#fc6423" - -# AddThis Share. See: https://www.addthis.com -# Go to https://www.addthis.com/dashboard to customize your tools. -add_this_id: +# AddToAny Share. See: https://www.addtoany.com +addtoany: + enable: true + buttons: + - facebook + - twitter + - telegram + - wechat # --------------------------------------------------------------- @@ -685,6 +793,8 @@ google_analytics: # By default, NexT will load an external gtag.js script on your site. # If you only need the pageview feature, set the following option to true to get a better performance. only_pageview: false + # only needed if you are using `only_pageview` mode, https://developers.google.com/analytics/devguides/collection/protocol/ga4 + measure_protocol_api_secret: # Baidu Analytics # See: https://tongji.baidu.com @@ -698,6 +808,32 @@ growingio_analytics: # # See: https://www.cloudflare.com/web-analytics/ cloudflare_analytics: +# Microsoft Clarity Analytics +# See: https://clarity.microsoft.com/ +clarity_analytics: # + +# Matomo Analytics +# See: https://matomo.org/ +matomo: + enable: false + server_url: # https://www.example.com/ + site_id: # + +# Umami Analytics +# See: https://umami.is/ +umami: + enable: false + script_url: # https://umami.example.com/script.js + website_id: # + host_url: # + +# Plausible Analytics +# See: https://plausible.io/ +plausible: + enable: false + script_url: # https://plausible.io/js/script.js + site_domain: # www.example.com + # Show number of visitors of each article. # You can visit https://www.leancloud.cn to get AppID and AppKey. leancloud_visitors: @@ -768,10 +904,9 @@ local_search: # Firstly, you need to enable and configure the chat service. chat: enable: false - icon: fa fa-comment # Icon name in Font Awesome, set false to disable icon. - text: Chat # Button text, change it as you wish. + icon: fa fa-comment # Icon name in Font Awesome, set to `false` to disable icon. -# Chatra Support +# Chatra is a functional, easy to use piece of chat software for websites. # For more information: https://chatra.com # Dashboard: https://app.chatra.io/settings/general chatra: @@ -780,98 +915,13 @@ chatra: id: # Visit Dashboard to get your ChatraID #embed: # Unfinished experimental feature for developers. See: https://chatra.com/help/api/#injectto -# Tidio Support +# Tidio is a powerful, all-in-one customer service tool. # For more information: https://www.tidio.com # Dashboard: https://www.tidio.com/panel/dashboard tidio: enable: false key: # Public Key, get it from dashboard. See: https://www.tidio.com/panel/settings/developer -# Gitter Support -# For more information: https://gitter.im -gitter: - enable: false - room: - - -# --------------------------------------------------------------- -# Tags Settings -# See: https://theme-next.js.org/docs/tag-plugins/ -# --------------------------------------------------------------- - -# Note tag (bootstrap callout) -note: - # Note tag style values: - # - simple bootstrap callout old alert style. Default. - # - modern bootstrap callout new (v2-v3) alert style. - # - flat flat callout style with background, like on Mozilla or StackOverflow. - # - disabled disable all CSS styles import of note tag. - style: simple - icons: true - # Offset lighter of background in % for modern and flat styles (modern: -12 | 12; flat: -18 | 6). - # Offset also applied to label tag variables. This option can work with disabled note tag. - light_bg_offset: -3 - -# Tabs tag -tabs: - transition: - tabs: true - labels: true - -# PDF tag -# NexT will try to load pdf files natively, if failed, pdf.js will be used. -# So, you have to install the dependency of pdf.js if you want to use pdf tag and make it available to all browsers. -# Dependencies: https://github.com/next-theme/theme-next-pdf -pdf: - enable: false - # Default height - height: 500px - -# Mermaid tag -mermaid: - enable: true - # Available themes: default | dark | forest | neutral - theme: forest - - -# --------------------------------------------------------------- -# Animation Settings -# --------------------------------------------------------------- - -# Use Animate.css to animate everything. -# For more information: https://animate.style -motion: - enable: false - async: true - transition: - # All available transition variants: https://theme-next.js.org/animate/ - post_block: fadeIn - post_header: fadeInDown - post_body: fadeInDown - coll_header: fadeInLeft - # Only for Pisces | Gemini. - sidebar: fadeInUp - -# Progress bar in the top during page loading. -# For more information: https://github.com/CodeByZach/pace -pace: - enable: false - # All available colors: - # black | blue | green | orange | pink | purple | red | silver | white | yellow - color: blue - # All available themes: - # big-counter | bounce | barber-shop | center-atom | center-circle | center-radar | center-simple - # corner-indicator | fill-left | flat-top | flash | loading-bar | mac-osx | material | minimal - theme: minimal - -# Canvas ribbon -# For more information: https://github.com/hustcc/ribbon.js -canvas_ribbon: - enable: false - size: 300 # The width of the ribbon - alpha: 0.6 # The transparency of the ribbon - zIndex: -1 # The display level of the ribbon - # --------------------------------------------------------------- # CDN Settings @@ -880,16 +930,22 @@ canvas_ribbon: vendors: # The CDN provider of NexT internal scripts. - # Available values: local | jsdelivr | unpkg | cdnjs + # Available values: local | jsdelivr | unpkg | cdnjs | custom # Warning: If you are using the latest master branch of NexT, please set `internal: local` internal: local # The default CDN provider of third-party plugins. - # Available values: local | jsdelivr | unpkg | cdnjs + # Available values: local | jsdelivr | unpkg | cdnjs | custom # Dependencies for `plugins: local`: https://github.com/next-theme/plugins - plugins: jsdelivr + plugins: cdnjs + # Custom CDN URL + # For example: + # custom_cdn_url: https://cdn.jsdelivr.net/npm/${npm_name}@${version}/${minified} + # custom_cdn_url: https://cdnjs.cloudflare.com/ajax/libs/${cdnjs_name}/${version}/${cdnjs_file} + custom_cdn_url: # Assets # Accelerate delivery of static files using a CDN +# The js option is only valid when vendors.internal is local. css: css js: js images: images diff --git a/_config.yml b/_config.yml index f5eb7dd00..0dac236e8 100644 --- a/_config.yml +++ b/_config.yml @@ -8,7 +8,10 @@ subtitle: Strategy, Execution, Communication. description: Hi, I'm an iOS engineer, focusing on mobile software development. keywords: iOS author: Alex Lin -language: zh-CN +language: + - zh-CN + - en + - zh-TW timezone: '' # URL diff --git a/package.json b/package.json index e780b5c7c..162dfcc3a 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,11 @@ "server": "hexo server" }, "hexo": { - "version": "7.0.0-rc1" + "version": "7.2.0" }, "dependencies": { "gitment": "^0.0.3", - "hexo": "^7.0.0-rc1", + "hexo": "^7.2.0", "hexo-deployer-git": "^4.0.0", "hexo-generator-archive": "^2.0.0", "hexo-generator-category": "^2.0.0", @@ -22,15 +22,15 @@ "hexo-generator-searchdb": "^1.4.1", "hexo-generator-sitemap": "^3.0.1", "hexo-generator-tag": "^2.0.0", - "hexo-next-giscus": "^1.1.0", + "hexo-next-giscus": "^1.3.0", "hexo-renderer-ejs": "^2.0.0", - "hexo-renderer-marked": "^6.0.0", + "hexo-renderer-marked": "^6.3.0", "hexo-renderer-pug": "^3.0.0", - "hexo-renderer-stylus": "^2.1.0", + "hexo-renderer-stylus": "^3.0.1", "hexo-server": "^3.0.0", - "hexo-theme-next": "^8.15.0", - "hexo-word-counter": "^0.1.0", + "hexo-theme-next": "^8.19.2", + "hexo-word-counter": "^0.2.0", "hexo-wordcount": "^6.0.1", "yarn-upgrade-all": "^0.7.2" } -} \ No newline at end of file +} diff --git a/source/_drafts/A-deep-dive-into-ERC-4337.md b/source/_drafts/A-deep-dive-into-ERC-4337.md new file mode 100644 index 000000000..52bd5c8d7 --- /dev/null +++ b/source/_drafts/A-deep-dive-into-ERC-4337.md @@ -0,0 +1,47 @@ +title: 深入研究 ERC-4337 智能合约 +date: 2023-08-15 22:17:07 +updated: 2023-08-15 22:17:07 +tags: + +- ethereum +categories: +- Web3 +--- +### A deep dive into ERC-4337 smart contracts & how to spin up smart wallets for your app's users:深入研究 ERC-4337 智能合约以及如何为应用程序的用户启动智能钱包: + +By design, EOA wallets are limited in both features & flexibility. They can only perform 2 actions: +从设计上来说,EOA 钱包的功能和灵活性都受到限制。他们只能执行 2 个操作: + +1. Transfer tokens to other EOAs +2. Initiate transactions that trigger another smart contract transaction + +1. 将代币转移到其他EOA +2. 发起交易触发另一笔智能合约交易 + +These limitations present many challenges for users & developers: + +这些限制给用户和开发人员带来了许多挑战: + +### EOA disadvantages: EOA的缺点: + +1. Security: Dependent on one seed phrase. No spend limits, social recovery options, 2FA +2. Customization: Transactions from EOAs can't be customized/automated & must be manually signed +3. Gas: Must own ETH to pay for gas at all times, can't use other tokens + +1. 安全性:依赖于一个助记词。无支出限制、社交恢复选项、2FA +2. 定制:来自 EOA 的交易无法定制/自动化,必须手动签名 +3. Gas:必须始终拥有 ETH 来支付 Gas,不能使用其他代币 + +### So why smart wallets? 那么为什么是智能钱包呢? + +As an individual, you may want to use a wallet with account recovery & multisig capability. + +作为个人,您可能希望使用具有帐户恢复和多重签名功能的钱包。 + +As a developer, you may want to issue wallets to your app's users with better UX: 'invisible wallets', gasless, batch txs... + +作为开发人员,您可能希望以更好的用户体验向应用程序的用户发行钱包:“隐形钱包”、无gas、批量交易...... + +But how do you put this into practice? + +但如何将其付诸实践呢? \ No newline at end of file